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s,jOe,VOe,zOe,KO,Lt,rJ,HOe,YO,$Oe,oJ,_t,Pe,Fe,bn,ft,ie,iJ,Un,oe,Y,UOe,Cr,de,Ya,dr,aJ,lJ,Je,XO,WOe,ku,a9t=(async()=>{if(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const n of document.querySelectorAll('link[rel="modulepreload"]'))t(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&t(o)}).observe(document,{childList:!0,subtree:!0})}function t(n){if(n.ep)return;n.ep=!0;const r=function(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}(n);fetch(n.href,r)}}(),typeof window<"u"){let e=function(){var t=document.body,n=document.getElementById("__svg__icons__dom__");n||((n=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.position="absolute",n.style.width="0",n.style.height="0",n.id="__svg__icons__dom__",n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),n.innerHTML='<symbol viewBox="0 0 800 800" id="icon-403"><style>#icon-403 .st26{fill:#fff}</style><g id="icon-403_\u56FE\u5C42_11"><linearGradient id="icon-403_SVGID_1_" gradientUnits="userSpaceOnUse" x1="401.773" y1="162.104" x2="401.773" y2="717.596"><stop offset="0" stop-color="#F4F2FB" /><stop offset="1" stop-color="#E1EEF5" /></linearGradient><path d="M485.03 203.46c-38.37 30.29-120.74 33.81-181.17-2.22s-172-31.38-202.22 34.87 37.19 131.33 12.78 178.98S8.66 530.13 64.45 611.49s126.6 60.62 169.22 52.45c84.17-16.13 189.79 115.67 308.62 16.13 68.47-57.35 170.44 42.09 210.17-81.36 32.78-101.86-85.67-139.5-49.97-208.03 37.96-72.88 30.67-159.24-10.46-201.06-38.31-38.96-140.75-38.46-207 13.84z" style="fill:url(#icon-403_SVGID_1_)" /><linearGradient id="icon-403_SVGID_2_" gradientUnits="userSpaceOnUse" x1="494.782" y1="599.604" x2="494.782" y2="428.659"><stop offset=".34" stop-color="#B0B9E1" /><stop offset=".866" stop-color="#EAF0F8" /></linearGradient><path d="M406.65 428.66h216.44l-22.53 49.03s59.19 57.87-14.13 121.91c-134.28-44.17-221.74-37.1-219.98-38.87 1.77-1.76 40.2-132.07 40.2-132.07z" style="fill:url(#icon-403_SVGID_2_)" /><linearGradient id="icon-403_SVGID_3_" gradientUnits="userSpaceOnUse" x1="116.855" y1="542.49" x2="116.855" y2="405.316"><stop offset=".227" stop-color="#B7ACE0" /><stop offset=".789" stop-color="#E8E7FA" /></linearGradient><path d="M117.64 405.56s-.22-.57-.52.04c-2.7 5.49-27.15 64.96-29.09 110.86 0 0-4.08 26.37 30.11 26.02 28.54-.29 27.78-24.6 27.68-32.79-.39-33.22-28.18-104.13-28.18-104.13z" style="fill:url(#icon-403_SVGID_3_)" /><linearGradient id="icon-403_SVGID_4_" gradientUnits="userSpaceOnUse" x1="116.857" y1="420.547" x2="116.857" y2="571.681"><stop offset="0" stop-color="#ECF1FB" /><stop offset=".818" stop-color="#AFB0E7" /></linearGradient><path d="M116.86 571.68c-.55 0-1-.45-1-1V421.55c0-.55.45-1 1-1s1 .45 1 1v149.13c0 .55-.45 1-1 1z" style="fill:url(#icon-403_SVGID_4_)" /><linearGradient id="icon-403_SVGID_5_" gradientUnits="userSpaceOnUse" x1="617.984" y1="450.968" x2="617.984" y2="362.644"><stop offset=".227" stop-color="#CCD4F4" /><stop offset=".789" stop-color="#ECF1FB" /></linearGradient><path d="M618.49 362.8s-.14-.37-.33.03c-1.74 3.53-17.48 41.83-18.73 71.38 0 0-2.63 16.98 19.39 16.76 18.38-.18 17.89-15.84 17.82-21.11-.25-21.4-18.15-67.06-18.15-67.06z" style="fill:url(#icon-403_SVGID_5_)" /><linearGradient id="icon-403_SVGID_6_" gradientUnits="userSpaceOnUse" x1="617.985" y1="372.451" x2="617.985" y2="469.764"><stop offset="0" stop-color="#ECF1FB" /><stop offset="1" stop-color="#A6A8E2" /></linearGradient><path d="M617.99 469.76c-.36 0-.64-.29-.64-.64V373.1c0-.36.29-.64.64-.64s.64.29.64.64v96.02c0 .36-.29.64-.64.64z" style="fill:url(#icon-403_SVGID_6_)" /><linearGradient id="icon-403_SVGID_7_" gradientUnits="userSpaceOnUse" x1="463.902" y1="88.362" x2="429.148" y2="148.558"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><circle cx="446.52" cy="118.46" r="34.75" style="fill:url(#icon-403_SVGID_7_)" /><linearGradient id="icon-403_SVGID_8_" gradientUnits="userSpaceOnUse" x1="421.565" y1="118.828" x2="421.565" y2="176.282"><stop offset="0" stop-color="#F9FAFE" /><stop offset="1" stop-color="#E5EDF7" /></linearGradient><path d="M466.3 137.41h-34.57c-2.23-10.61-11.65-18.58-22.93-18.58s-20.69 7.97-22.93 18.58h-9.05c-10.73 0-19.44 8.7-19.44 19.44 0 10.73 8.7 19.44 19.44 19.44h89.47c10.73 0 19.44-8.7 19.44-19.44.01-10.74-8.69-19.44-19.43-19.44z" style="fill:url(#icon-403_SVGID_8_)" /><linearGradient id="icon-403_SVGID_9_" gradientUnits="userSpaceOnUse" x1="688.586" y1="540.208" x2="688.586" y2="512.38"><stop offset=".227" stop-color="#AFB0E7" /><stop offset="1" stop-color="#ECF1FB" /></linearGradient><circle cx="688.59" cy="526.29" r="13.91" style="fill:url(#icon-403_SVGID_9_)" /><linearGradient id="icon-403_SVGID_10_" gradientUnits="userSpaceOnUse" x1="688.635" y1="515.894" x2="688.635" y2="560.69"><stop offset="0" stop-color="#DDE1F6" /><stop offset=".818" stop-color="#A6A8E2" /></linearGradient><path d="M688.64 560.69c-.24 0-.43-.19-.43-.43v-43.94c0-.24.19-.43.43-.43s.43.19.43.43v43.94a.44.44 0 0 1-.43.43z" style="fill:url(#icon-403_SVGID_10_)" /><linearGradient id="icon-403_SVGID_11_" gradientUnits="userSpaceOnUse" x1="2622.045" y1="266.481" x2="2451.058" y2="562.64" gradientTransform="matrix(-1 0 0 1 2941.346 0)"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M248.82 393.99c0-24.52-.03-49.03.01-73.54.02-14.37 4.24-18.36 17.97-20.53 41.87-6.61 82.03-18.72 117.91-42.29 10.38-6.82 18.3-7.59 29.06-.47 34.85 23.06 73.26 37.11 114.55 42.8 13.12 1.81 16.84 5.88 16.85 19.25.04 45.72-.4 91.44.18 137.15.34 26.77-8.17 49.99-24.02 70.73-31.46 41.17-74.88 63.76-122.21 80.03-2.5.86-5.83.67-8.36-.23-38.47-13.74-74.58-31.84-104.15-61.09-22.97-22.73-37.84-49.56-37.79-83.22.03-22.87.01-45.73 0-68.59z" style="fill:url(#icon-403_SVGID_11_)" /><linearGradient id="icon-403_SVGID_12_" gradientUnits="userSpaceOnUse" x1="2625.25" y1="279.944" x2="2462.749" y2="561.403" gradientTransform="matrix(-1 0 0 1 2941.346 0)"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M247.94 401.44c0-23.21-.03-46.42.01-69.63.02-13.61 4.06-17.38 17.23-19.43 40.15-6.26 78.67-17.72 113.07-40.04 9.95-6.46 17.55-7.18 27.86-.44 33.42 21.83 70.25 35.14 109.84 40.52 12.58 1.71 16.14 5.56 16.15 18.22.03 43.28-.38 86.57.18 129.84.33 25.34-7.83 47.33-23.03 66.96-30.17 38.98-71.81 60.36-117.19 75.77-2.4.81-5.59.64-8.01-.22-36.89-13.01-71.52-30.14-99.87-57.84-22.03-21.52-36.28-46.91-36.23-78.78.02-21.65-.01-43.29-.01-64.93z" style="fill:url(#icon-403_SVGID_12_)" /><linearGradient id="icon-403_SVGID_13_" gradientUnits="userSpaceOnUse" x1="361.421" y1="346.477" x2="449.513" y2="499.057"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M411.59 435.75c23.18-5.61 40.41-26.11 40.41-50.49 0-28.68-23.85-52.01-53.17-52.01s-53.17 23.33-53.17 52.01c0 24.38 17.24 44.88 40.41 50.49v85.2h25.52v-36.38h32.67v-24.96h-32.67v-23.86zm-40.41-50.49c0-14.91 12.41-27.05 27.65-27.05s27.65 12.14 27.65 27.05-12.41 27.05-27.65 27.05-27.65-12.14-27.65-27.05z" style="fill:url(#icon-403_SVGID_13_)" /><path class="st26" d="M407.67 439.03c21.8-5.39 38.01-25.1 38.01-48.54 0-27.58-22.43-50.01-50.01-50.01s-50.01 22.43-50.01 50.01c0 23.44 16.21 43.15 38.01 48.54v81.92h24v-34.98h30.73v-24h-30.73v-22.94zm-38.01-48.55c0-14.34 11.67-26.01 26.01-26.01s26.01 11.67 26.01 26.01-11.67 26.01-26.01 26.01-26.01-11.67-26.01-26.01z" /><linearGradient id="icon-403_SVGID_14_" gradientUnits="userSpaceOnUse" x1="484.836" y1="475.674" x2="565.754" y2="615.828"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><circle cx="525.3" cy="545.75" r="80.9" style="fill:url(#icon-403_SVGID_14_)" /><linearGradient id="icon-403_SVGID_15_" gradientUnits="userSpaceOnUse" x1="482.787" y1="483.323" x2="559.605" y2="616.376"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#C6D5F4" /></linearGradient><circle cx="521.2" cy="549.85" r="76.81" style="fill:url(#icon-403_SVGID_15_)" /><path class="st26" d="m538.5 547.62 23.01-23.01c4.44-4.44 4.44-11.63 0-16.06-4.44-4.44-11.63-4.44-16.06 0l-23.01 23.01-23.01-23.01c-4.44-4.44-11.63-4.44-16.06 0-4.44 4.44-4.44 11.63 0 16.06l23.01 23.01-23.01 23.01c-4.44 4.44-4.44 11.63 0 16.06 2.22 2.22 5.13 3.33 8.03 3.33 2.91 0 5.81-1.11 8.03-3.33l23.01-23.01 23.01 23.01c2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33c4.44-4.44 4.44-11.63 0-16.06l-23.01-23.01z" /><linearGradient id="icon-403_SVGID_16_" gradientUnits="userSpaceOnUse" x1="232.569" y1="558.709" x2="232.569" y2="484.191"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M224.88 484.54s-18.08-2.5-23.95 5.81-8.02 29.58-8.02 29.58l13.61-.72-1.15 24.78 25.11 14.72 35.77-19.24-5.44-22.45 11.43-2.98s-3.4-32.58-19.31-27.77c-8.17.87-10.74.73-10.74.73s-2.15 6.85-9.53 6.27c-7.38-.59-7.78-8.73-7.78-8.73z" style="fill:url(#icon-403_SVGID_16_)" /><linearGradient id="icon-403_SVGID_17_" gradientUnits="userSpaceOnUse" x1="233.602" y1="471.483" x2="233.602" y2="495.089"><stop offset="0" stop-color="#F4AE98" /><stop offset="1" stop-color="#FAD1BB" /></linearGradient><path d="m226.69 474.3-3.76 16.76c-.18.79.23 1.59.98 1.89 1.94.79 5.83 2.13 9.82 2.13 4.15 0 8.06-2.27 9.86-3.48.62-.42.88-1.19.64-1.9l-5.75-17.09a1.643 1.643 0 0 0-1.86-1.1l-8.61 1.53c-.65.11-1.18.61-1.32 1.26z" style="fill:url(#icon-403_SVGID_17_)" /><linearGradient id="icon-403_SVGID_18_" gradientUnits="userSpaceOnUse" x1="-816.068" y1="920.854" x2="-804.529" y2="839.612" gradientTransform="rotate(-8.082 -2795.015 -6505.71)"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M204.24 487.44c5.26-1.75 12.4-.58 12.69 11.22s-11.28 30.62-7.13 37.16c4.2 6.63 13.17 16.05 18.89 21.41-1.33 6.3-4.91 11.61-4.91 11.61s-21.05-9.71-30.21-19.44c-9.17-9.73-4.54-32.03-.3-47.9 3.19-11.95 10.97-14.06 10.97-14.06z" style="fill:url(#icon-403_SVGID_18_)" /><linearGradient id="icon-403_SVGID_19_" gradientUnits="userSpaceOnUse" x1="-6575.898" y1="102.823" x2="-6564.359" y2="21.581" gradientTransform="scale(-1 1) rotate(-8.082 -118.103 -44396.273)"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M259.39 487.44c-5.26-1.75-12.4-.58-12.69 11.22s11.28 30.62 7.13 37.16c-4.2 6.63-13.17 16.05-18.89 21.41 1.33 6.3 4.91 11.61 4.91 11.61s21.05-9.71 30.21-19.44c9.17-9.73 4.54-32.03.3-47.9-3.19-11.95-10.97-14.06-10.97-14.06z" style="fill:url(#icon-403_SVGID_19_)" /><linearGradient id="icon-403_SVGID_20_" gradientUnits="userSpaceOnUse" x1="232.569" y1="531.798" x2="232.569" y2="579.152"><stop offset="0" stop-color="#275C89" /><stop offset="1" stop-color="#013F7C" /></linearGradient><path d="M206.79 579.15h51.1c2.31 0 4.38-1.75 5.19-4.4l10.3-33.89c1.34-4.4-1.33-9.07-5.19-9.07h-71.23c-3.82 0-6.48 4.6-5.21 8.98l9.84 33.89c.77 2.69 2.86 4.49 5.2 4.49z" style="fill:url(#icon-403_SVGID_20_)" /><path class="st26" d="M204.75 594.74s-.79-1.74-1.4-1.93c-.61-.19-9.35-.54-12.53-1.36-3.19-.83-12.38-2.14-16.32 1.59-3.43 3.25-4.56 10.84.66 15.2 1.96 1.7 3.89 2.2 11.14 1.86 7.26-.34 17.78-.26 20.09-3.63-.07-5.55-1.64-11.73-1.64-11.73z" /><linearGradient id="icon-403_SVGID_21_" gradientUnits="userSpaceOnUse" x1="-5720.751" y1="599.589" x2="-5703.986" y2="599.589" gradientTransform="matrix(-1 0 0 1 -5504.059 0)"><stop offset="0" stop-color="#F4B9A4" /><stop offset=".652" stop-color="#FAD1BB" /></linearGradient><path d="M212.86 592.81s-8.44 1.9-11.45 1.62-.49 11.87-.49 11.87 8.05.56 15.18-1.51c2.4-9.3-3.24-11.98-3.24-11.98z" style="fill:url(#icon-403_SVGID_21_)" /><linearGradient id="icon-403_SVGID_22_" gradientUnits="userSpaceOnUse" x1="209.839" y1="581.112" x2="296.322" y2="581.112"><stop offset="0" stop-color="#18264B" /><stop offset=".652" stop-color="#2D3C65" /></linearGradient><path d="m209.84 592.37 4.39 13.64s94.25-12.41 80.78-43c-11.27-25.57-85.17 29.36-85.17 29.36z" style="fill:url(#icon-403_SVGID_22_)" /><linearGradient id="icon-403_SVGID_23_" gradientUnits="userSpaceOnUse" x1="190.339" y1="591.445" x2="190.339" y2="609.24"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><path d="M203.66 593.42s3.45 1.35 3.89 6.17c.44 4.82-.99 8.05-8.33 8.94s-9.21.56-13.81.67-11.29.56-12.27-8.2c-.99-8.75 7.96-10.98 17.24-8.75 2.92.56 13.28 1.17 13.28 1.17z" style="fill:url(#icon-403_SVGID_23_)" /><path class="st26" d="M263.56 594.74s.79-1.74 1.4-1.93c.61-.19 9.35-.54 12.53-1.36 3.19-.83 11.75-2.2 16.08 1.49 4.01 3.42 4.27 11-.29 15.18-1.96 1.7-4.02 2.32-11.28 1.98-7.26-.34-17.78-.26-20.09-3.63.09-5.55 1.65-11.73 1.65-11.73z" /><linearGradient id="icon-403_SVGID_24_" gradientUnits="userSpaceOnUse" x1="251.623" y1="599.589" x2="268.387" y2="599.589"><stop offset="0" stop-color="#F4B9A4" /><stop offset=".652" stop-color="#FAD1BB" /></linearGradient><path d="M255.45 592.81s8.44 1.9 11.45 1.62.49 11.87.49 11.87-8.05.56-15.18-1.51c-2.4-9.3 3.24-11.98 3.24-11.98z" style="fill:url(#icon-403_SVGID_24_)" /><linearGradient id="icon-403_SVGID_25_" gradientUnits="userSpaceOnUse" x1="171.993" y1="581.112" x2="258.476" y2="581.112"><stop offset="0" stop-color="#445677" /><stop offset="1" stop-color="#293861" /></linearGradient><path d="M258.48 592.37 254.09 606s-94.25-12.41-80.78-43c11.26-25.56 85.17 29.37 85.17 29.37z" style="fill:url(#icon-403_SVGID_25_)" /><linearGradient id="icon-403_SVGID_26_" gradientUnits="userSpaceOnUse" x1="277.976" y1="591.445" x2="277.976" y2="609.24"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><path d="M264.66 593.42s-3.45 1.35-3.89 6.17.99 8.05 8.33 8.94c7.34.89 9.21.56 13.81.67s11.29.56 12.27-8.2c.99-8.75-7.96-10.98-17.24-8.75-2.92.56-13.28 1.17-13.28 1.17z" style="fill:url(#icon-403_SVGID_26_)" /><linearGradient id="icon-403_SVGID_27_" gradientUnits="userSpaceOnUse" x1="249.053" y1="466.067" x2="218.202" y2="466.067"><stop offset="0" stop-color="#F4B9A4" /><stop offset=".652" stop-color="#FAD1BB" /></linearGradient><path d="M248.39 467.6c.56-.8.91-2.84.46-3.44-.83-.67-1.61-.28-2.21.3.14-4.88-.31-8.94-.41-9.97-.3-2.99-3.35-8.48-13.3-8.48-9.95 0-11.88 7.18-11.88 7.18s-.65 5.08-.46 11.24c-.59-.57-1.37-.93-2.18-.27-.46.6-.1 2.64.46 3.44.56.8.91 2.69 1.02 3.74.1.99-.62 3.65 2 3.31 1.56 6.25 7.89 11.47 11.82 11.47 4.3 0 10.01-5.26 11.63-11.48 2.68.37 1.95-2.31 2.04-3.31.09-1.04.45-2.93 1.01-3.73z" style="fill:url(#icon-403_SVGID_27_)" /><linearGradient id="icon-403_SVGID_28_" gradientUnits="userSpaceOnUse" x1="213.957" y1="454.142" x2="249.774" y2="454.142"><stop offset="0" stop-color="#4F5C7C" /><stop offset="1" stop-color="#274168" /></linearGradient><path d="M240.1 443.88s-1.94-6.12-9.39-4.65c-7.44 1.46-7.95 4.98-10.87 5.12-4.99.23-8.97 6.45-2.58 13.03 2.85 2.93.44 4.19 1.79 6.78s1.34 5.12 1.34 5.12 2.38-7.6.81-10.84c-.81-1.67 2.77-2.13 7.24-1.73s11.51-1.08 12.06-4.12c1.32 6.23 2.64 6.88 4.31 7.83 1.68.95 1.78 8.48 1.78 8.48s.3-5.53 1.47-6.78c.96-2.04 2.85-10.07.72-12.02s-.32-8.19-8.68-6.22z" style="fill:url(#icon-403_SVGID_28_)" /></g></symbol><symbol viewBox="0 0 800 800" id="icon-404"><style>#icon-404 .st49{fill:#d4e4fe}</style><g id="icon-404_\u56FE\u5C42_5"><linearGradient id="icon-404_SVGID_1_" gradientUnits="userSpaceOnUse" x1="401.193" y1="159.763" x2="401.193" y2="715.254"><stop offset="0" stop-color="#F4F2FB" /><stop offset="1" stop-color="#E1EEF5" /></linearGradient><path d="M484.45 201.12c-38.37 30.29-120.74 33.81-181.17-2.22s-172-31.38-202.22 34.87 37.19 131.33 12.78 178.98S8.08 527.79 63.87 609.15s126.6 60.62 169.22 52.45c84.17-16.13 189.79 115.67 308.62 16.13 68.47-57.35 170.44 42.09 210.17-81.36 32.78-101.86-85.67-139.5-49.97-208.03 37.96-72.88 30.67-159.24-10.46-201.06-38.31-38.96-140.75-38.46-207 13.84z" style="fill:url(#icon-404_SVGID_1_)" /><linearGradient id="icon-404_SVGID_2_" gradientUnits="userSpaceOnUse" x1="484.537" y1="604.68" x2="484.537" y2="493.367"><stop offset=".34" stop-color="#B0B9E1" /><stop offset=".866" stop-color="#EAF0F8" /></linearGradient><path d="M285.1 583.44c1.77-1.63 77.74-90.07 77.74-90.07h321.13l-99.5 111.31-299.37-21.24z" style="fill:url(#icon-404_SVGID_2_)" /><linearGradient id="icon-404_SVGID_3_" gradientUnits="userSpaceOnUse" x1="616.023" y1="627.266" x2="657.332" y2="555.716"><stop offset="0" stop-color="#B0B9E1" /><stop offset=".866" stop-color="#EAF0F8" /></linearGradient><path d="m604.49 620.61 54.94-63.68-26.21 67.19z" style="fill:url(#icon-404_SVGID_3_)" /><linearGradient id="icon-404_SVGID_4_" gradientUnits="userSpaceOnUse" x1="116.275" y1="540.149" x2="116.275" y2="402.974"><stop offset=".003" stop-color="#9A9ADB" /><stop offset=".789" stop-color="#CECDF1" /></linearGradient><path d="M117.06 403.22s-.22-.57-.52.04c-2.7 5.49-27.15 64.96-29.09 110.86 0 0-4.08 26.37 30.11 26.02 28.54-.29 27.78-24.6 27.68-32.79-.39-33.22-28.18-104.13-28.18-104.13z" style="fill:url(#icon-404_SVGID_4_)" /><linearGradient id="icon-404_SVGID_5_" gradientUnits="userSpaceOnUse" x1="116.277" y1="418.206" x2="116.277" y2="569.34"><stop offset="0" stop-color="#ECF1FB" /><stop offset=".818" stop-color="#AFB0E7" /></linearGradient><path d="M116.28 569.34c-.55 0-1-.45-1-1V419.21c0-.55.45-1 1-1s1 .45 1 1v149.13c0 .55-.45 1-1 1z" style="fill:url(#icon-404_SVGID_5_)" /><linearGradient id="icon-404_SVGID_6_" gradientUnits="userSpaceOnUse" x1="617.404" y1="448.627" x2="617.404" y2="360.303"><stop offset=".227" stop-color="#CCD4F4" /><stop offset=".789" stop-color="#ECF1FB" /></linearGradient><path d="M617.91 360.46s-.14-.37-.33.03c-1.74 3.53-17.48 41.83-18.73 71.38 0 0-2.63 16.98 19.39 16.76 18.38-.18 17.89-15.84 17.82-21.11-.25-21.4-18.15-67.06-18.15-67.06z" style="fill:url(#icon-404_SVGID_6_)" /><linearGradient id="icon-404_SVGID_7_" gradientUnits="userSpaceOnUse" x1="617.405" y1="370.11" x2="617.405" y2="467.422"><stop offset="0" stop-color="#ECF1FB" /><stop offset="1" stop-color="#A6A8E2" /></linearGradient><path d="M617.41 467.42c-.36 0-.64-.29-.64-.64v-96.02c0-.36.29-.64.64-.64.36 0 .64.29.64.64v96.02c0 .35-.29.64-.64.64z" style="fill:url(#icon-404_SVGID_7_)" /><linearGradient id="icon-404_SVGID_8_" gradientUnits="userSpaceOnUse" x1="463.322" y1="86.02" x2="428.568" y2="146.217"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><circle cx="445.95" cy="116.12" r="34.75" style="fill:url(#icon-404_SVGID_8_)" /><linearGradient id="icon-404_SVGID_9_" gradientUnits="userSpaceOnUse" x1="420.985" y1="116.487" x2="420.985" y2="173.941"><stop offset="0" stop-color="#F9FAFE" /><stop offset="1" stop-color="#E5EDF7" /></linearGradient><path d="M465.72 135.07h-34.57c-2.23-10.61-11.65-18.58-22.93-18.58s-20.69 7.97-22.93 18.58h-9.05c-10.73 0-19.44 8.7-19.44 19.44 0 10.73 8.7 19.44 19.44 19.44h89.47c10.73 0 19.44-8.7 19.44-19.44.01-10.74-8.69-19.44-19.43-19.44z" style="fill:url(#icon-404_SVGID_9_)" /><linearGradient id="icon-404_SVGID_10_" gradientUnits="userSpaceOnUse" x1="688.006" y1="537.867" x2="688.006" y2="510.039"><stop offset=".227" stop-color="#AFB0E7" /><stop offset="1" stop-color="#ECF1FB" /></linearGradient><circle cx="688.01" cy="523.95" r="13.91" style="fill:url(#icon-404_SVGID_10_)" /><linearGradient id="icon-404_SVGID_11_" gradientUnits="userSpaceOnUse" x1="688.056" y1="513.553" x2="688.056" y2="558.349"><stop offset="0" stop-color="#DDE1F6" /><stop offset=".818" stop-color="#A6A8E2" /></linearGradient><path d="M688.06 558.35c-.24 0-.43-.19-.43-.43v-43.94c0-.24.19-.43.43-.43s.43.19.43.43v43.94a.44.44 0 0 1-.43.43z" style="fill:url(#icon-404_SVGID_11_)" /><linearGradient id="icon-404_SVGID_12_" gradientUnits="userSpaceOnUse" x1="2879.853" y1="308.382" x2="2737.462" y2="450.774" gradientTransform="matrix(-1 0 0 1 3207.18 0)"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="m270.73 392.79 91.4-73.3c7.43 11.92 20.65 19.87 35.7 19.87 16.43 0 30.69-9.48 37.6-23.26l92.11 76.85 10.83-12.98-98.5-82.19c0-.16.01-.31.01-.47 0-23.18-18.86-42.04-42.05-42.04-23.18 0-42.04 18.86-42.04 42.04 0 1.8.13 3.58.35 5.32l-95.98 76.97 10.57 13.19zm101.96-95.48c0-13.86 11.28-25.14 25.14-25.14s25.14 11.28 25.14 25.14-11.28 25.14-25.14 25.14-25.14-11.27-25.14-25.14z" style="fill:url(#icon-404_SVGID_12_)" /><linearGradient id="icon-404_SVGID_13_" gradientUnits="userSpaceOnUse" x1="2814.247" y1="259.815" x2="2814.247" y2="392.836" gradientTransform="matrix(-1 0 0 1 3207.18 0)"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#C6D5F4" /></linearGradient><path d="m268.75 392.68 88.31-70.82c7.18 11.51 19.95 19.2 34.49 19.2 15.88 0 29.65-9.16 36.33-22.47l88.99 74.25 10.46-12.54-95.17-79.41c0-.15.01-.3.01-.46 0-22.4-18.22-40.62-40.62-40.62s-40.62 18.22-40.62 40.62c0 1.74.12 3.46.34 5.14l-92.73 74.37 10.21 12.74zm98.51-92.24c0-13.4 10.9-24.29 24.29-24.29 13.4 0 24.29 10.9 24.29 24.29 0 13.4-10.9 24.29-24.29 24.29-13.4 0-24.29-10.9-24.29-24.29z" style="fill:url(#icon-404_SVGID_13_)" /><linearGradient id="icon-404_SVGID_14_" gradientUnits="userSpaceOnUse" x1="2966.463" y1="329.794" x2="2654.707" y2="641.55" gradientTransform="matrix(-1 0 0 1 3203.43 0)"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M230.6 619.91h326.35c17.89 0 32.39-14.5 32.39-32.39V388.31c0-21.39-17.34-38.72-38.72-38.72H230.6c-17.89 0-32.39 14.5-32.39 32.39v205.54c-.01 17.88 14.5 32.39 32.39 32.39z" style="fill:url(#icon-404_SVGID_14_)" /><linearGradient id="icon-404_SVGID_15_" gradientUnits="userSpaceOnUse" x1="2716.773" y1="319.563" x2="2914.293" y2="661.678" gradientTransform="matrix(-1 0 0 1 3203.43 0)"><stop offset="0" stop-color="#EBF2FA" /><stop offset=".525" stop-color="#FDFEFF" /></linearGradient><path d="M223.6 619.91h328.59c14.03 0 25.4-11.37 25.4-25.4V386.73c0-14.03-11.37-25.4-25.4-25.4H223.6c-14.03 0-25.4 11.37-25.4 25.4v207.78c0 14.03 11.38 25.4 25.4 25.4z" style="fill:url(#icon-404_SVGID_15_)" /><linearGradient id="icon-404_SVGID_16_" gradientUnits="userSpaceOnUse" x1="2815.495" y1="361.334" x2="2815.495" y2="425.526" gradientTransform="matrix(-1 0 0 1 3203.43 0)"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M198.24 425.53h379.39v-38.79c0-14.03-11.37-25.4-25.4-25.4H223.64c-14.03 0-25.4 11.37-25.4 25.4v38.79z" style="fill:url(#icon-404_SVGID_16_)" /><linearGradient id="icon-404_SVGID_17_" gradientUnits="userSpaceOnUse" x1="276.445" y1="488.742" x2="350.685" y2="531.604"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M328.82 457.46H307.7c-1.27 0-2.46.59-3.24 1.59L261.91 514c-.56.72-.86 1.6-.86 2.51v23.15c0 2.26 1.83 4.09 4.09 4.09h41.34c2.26 0 4.09 1.83 4.09 4.09v13.46c0 2.26 1.83 4.09 4.09 4.09h14.14c2.26 0 4.09-1.83 4.09-4.09v-13.46c0-2.26 1.83-4.09 4.09-4.09s4.09-1.83 4.09-4.09V525.5c0-2.26-1.83-4.09-4.09-4.09s-4.09-1.83-4.09-4.09v-55.77a4.059 4.059 0 0 0-4.07-4.09zm-39.3 57.35 13.74-17.74c2.39-3.08 7.33-1.4 7.33 2.51v17.74c0 2.26-1.83 4.09-4.09 4.09h-13.74c-3.41 0-5.33-3.91-3.24-6.6z" style="fill:url(#icon-404_SVGID_17_)" /><linearGradient id="icon-404_SVGID_18_" gradientUnits="userSpaceOnUse" x1="455.095" y1="488.742" x2="529.335" y2="531.604"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M511.56 517.32v-55.77c0-2.26-1.83-4.09-4.09-4.09h-21.12c-1.27 0-2.46.59-3.24 1.59L440.56 514c-.56.72-.86 1.6-.86 2.51v23.15c0 2.26 1.83 4.09 4.09 4.09h41.34c2.26 0 4.09 1.83 4.09 4.09v13.46c0 2.26 1.83 4.09 4.09 4.09h14.14c2.26 0 4.09-1.83 4.09-4.09v-13.46c0-2.26 1.83-4.09 4.09-4.09s4.09-1.83 4.09-4.09V525.5c0-2.26-1.83-4.09-4.09-4.09-2.24 0-4.07-1.83-4.07-4.09zm-43.39-2.51 13.74-17.74c2.39-3.08 7.33-1.4 7.33 2.51v17.74c0 2.26-1.83 4.09-4.09 4.09H471.4c-3.4 0-5.32-3.91-3.23-6.6z" style="fill:url(#icon-404_SVGID_18_)" /><linearGradient id="icon-404_SVGID_19_" gradientUnits="userSpaceOnUse" x1="339.488" y1="482.174" x2="441.31" y2="540.961"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M356.4 566.16h68c2.26 0 4.09-1.83 4.09-4.09v-101c0-2.26-1.83-4.09-4.09-4.09h-68c-2.26 0-4.09 1.83-4.09 4.09v101c0 2.26 1.83 4.09 4.09 4.09zm49.76-82.76v56.34c0 2.26-1.83 4.09-4.09 4.09h-23.34c-2.26 0-4.09-1.83-4.09-4.09V483.4c0-2.26 1.83-4.09 4.09-4.09h23.34c2.26 0 4.09 1.83 4.09 4.09z" style="fill:url(#icon-404_SVGID_19_)" /><linearGradient id="icon-404_SVGID_20_" gradientUnits="userSpaceOnUse" x1="871.514" y1="4485.232" x2="872.065" y2="4498.77" gradientTransform="rotate(2.333 95904.663 -3670.234)"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><path d="M605.95 610.6s3.25 4.88 10.55 1.06c3.91 2.72 8.92 4.97 12.39 5.88 3.47.91 3.68 5.4 3.12 6.61-4.66-.47-18.14.64-27.3-2.94.72-7.53 1.24-10.61 1.24-10.61z" style="fill:url(#icon-404_SVGID_20_)" /><path class="st49" d="m604.06 623.84.43-3.23s10.54 2.63 28.38 1.03c.17 1.66.35 2.48.35 2.48s-13.56 2.02-29.16-.28z" /><linearGradient id="icon-404_SVGID_21_" gradientUnits="userSpaceOnUse" x1="-1427.263" y1="-235.579" x2="-1409.896" y2="-215.318" gradientTransform="rotate(40.6 -1575.457 2818.52)"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><path d="M520.47 596.12s-.05 5.81 7.27 7.94c1.95 5-3.73 11.79 5.37 12.42 3.34.23 1.75 5.12.73 5.63-10.95 4.01-14.63-10.12-19.62-18.98 4.32-5.09 6.25-7.01 6.25-7.01z" style="fill:url(#icon-404_SVGID_21_)" /><linearGradient id="icon-404_SVGID_22_" gradientUnits="userSpaceOnUse" x1="-3772.01" y1="604.486" x2="-3772.01" y2="502.198" gradientTransform="matrix(-1 0 0 1 -3222.68 0)"><stop offset="0" stop-color="#445677" /><stop offset="1" stop-color="#293861" /></linearGradient><path d="M569.3 502.2s-14.44-.26-17.67 18.85c-3.23 19.11 1.57 23.66-5.38 37.29-3.62 7.1-27.15 41.12-27.15 41.12l6.83 5.03s37.94-34.72 43.52-48.71 9.83-28.83 10.13-41.46c.28-12.62-10.28-12.12-10.28-12.12z" style="fill:url(#icon-404_SVGID_22_)" /><linearGradient id="icon-404_SVGID_23_" gradientUnits="userSpaceOnUse" x1="-3839.642" y1="559.801" x2="-3786.238" y2="559.801" gradientTransform="matrix(-1 0 0 1 -3222.68 0)"><stop offset="0" stop-color="#445677" /><stop offset="1" stop-color="#293861" /></linearGradient><path d="M572.72 506.19s14.87 3.53 15.75 3.98c.44.23 2.89 7.07 5.24 13.95 5.04 6.87 23.02 32.28 23.21 45.51.29 20.13-.96 43.67-.96 43.67l-9.24.11s-3.5-38.9-5.85-42.31c-.42-.61-1.29-1.95-2.42-3.74-5.14-6.22-16.5-16.65-28.16-27.07-16.45-14.66 2.43-34.1 2.43-34.1z" style="fill:url(#icon-404_SVGID_23_)" /><linearGradient id="icon-404_SVGID_24_" gradientUnits="userSpaceOnUse" x1="5317.908" y1="132.095" x2="5317.908" y2="56.817" gradientTransform="rotate(26.086 2112.504 -9908.036)"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M603.14 448.91s-10.69-8.37-16.99-4.36c-6.3 4-14.27 18.91-14.27 18.91l8.85 4.38-23.8 39.67 40.69 21.83 14.6-42.28 11.79.69s7.96-25.24-3.62-27.43c-5.45-2.3-7.04-3.34-7.04-3.34s-3.49 4.27-7.99 1.18-2.22-9.25-2.22-9.25z" style="fill:url(#icon-404_SVGID_24_)" /><linearGradient id="icon-404_SVGID_25_" gradientUnits="userSpaceOnUse" x1="5161.945" y1="1134.369" x2="5171.26" y2="1068.78" gradientTransform="rotate(18.006 4848.87 -13687.47)"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M589.15 443.6c3.88.61 8.04 4.05 4.56 12.85-3.48 8.8-16.66 18.5-16.06 24.82.6 6.4 3.37 16.58 5.33 22.6-2.8 4.17-6.72 6.78-6.72 6.78s-10.33-14.75-13.12-25.23 7.07-25.25 14.69-35.41c5.73-7.67 11.32-6.41 11.32-6.41z" style="fill:url(#icon-404_SVGID_25_)" /><linearGradient id="icon-404_SVGID_26_" gradientUnits="userSpaceOnUse" x1="-8924.659" y1="-865.525" x2="-8915.544" y2="-929.706" gradientTransform="scale(-1 1) rotate(-34.172 -2504.53 -13720.806)"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M624.12 463.5c-2.79-3.19-7.68-4.9-11.53 3.69s-2.35 26.64-7.02 29.97c-4.72 3.37-13.34 7.07-18.62 8.96-1.12 5.12-.49 10.33-.49 10.33s16.36.44 25.19-3.42c8.83-3.86 12.82-21.97 15.06-35.2 1.69-9.97-2.59-14.33-2.59-14.33z" style="fill:url(#icon-404_SVGID_26_)" /><linearGradient id="icon-404_SVGID_27_" gradientUnits="userSpaceOnUse" x1="-3813.896" y1="480.898" x2="-3841.811" y2="423.883" gradientTransform="matrix(-1 0 0 1 -3222.68 0)"><stop offset="0" stop-color="#4F5C7C" /><stop offset="1" stop-color="#274168" /></linearGradient><path d="M590.9 439.68c.43-4.69 4.5-7.9 9.3-7.17.4-1.31 4.44-2.98 5.38-4.6 3.5-6.03 9.26-7 14-3.56 9.79 2.79 8.01 12.2 4.75 21.55 2.8 5.61 1.52 12.41-.06 15.18 4.75 5.07 2.09 11.58-1.39 16.52-.4.56-.82 1.06-1.25 1.52-.21 5.85-8.34 7.86-11.32 4.89-3.17-3.16-3.57-4.49-9.32-1.76-5.75 2.73-11.24-1.54-11.3-7.34-.06-5.8-4.28-4.1-6.12-5.63-3.33-2.77-1.15-5.93-1.15-5.93s-4.85-.26-6.01-7.38c-1.33-16.99 11.95-17.08 14.49-16.29z" style="fill:url(#icon-404_SVGID_27_)" /><path class="st49" d="M515.38 601.24s4.92 12.03 5.91 13.61 5.9 9.27 14.26 5.05c-.04 1.49-.11 2.43-.11 2.43s-9.42 6.26-15.33-4.62c-5.91-10.88-6.75-14.63-6.75-14.63l2.02-1.84z" /></g></symbol><symbol viewBox="0 0 800 800" id="icon-500"><style>#icon-500 .st26{fill:#fff}</style><g id="icon-500_\u56FE\u5C42_16"><linearGradient id="icon-500_SVGID_1_" gradientUnits="userSpaceOnUse" x1="402.832" y1="159.843" x2="402.832" y2="715.335"><stop offset="0" stop-color="#F4F2FB" /><stop offset="1" stop-color="#E1EEF5" /></linearGradient><path d="M486.09 201.2c-38.37 30.29-120.74 33.81-181.17-2.22s-172-31.38-202.22 34.87 37.19 131.33 12.78 178.98S9.72 527.87 65.5 609.23s126.6 60.62 169.22 52.45c84.17-16.13 189.79 115.67 308.62 16.13 68.47-57.35 170.44 42.09 210.17-81.36 32.78-101.86-85.67-139.5-49.97-208.03 37.96-72.88 30.67-159.24-10.46-201.06-38.3-38.96-140.75-38.46-206.99 13.84z" style="fill:url(#icon-500_SVGID_1_)" /><linearGradient id="icon-500_SVGID_2_" gradientUnits="userSpaceOnUse" x1="117.913" y1="540.229" x2="117.913" y2="403.055"><stop offset=".227" stop-color="#B7ACE0" /><stop offset=".789" stop-color="#E8E7FA" /></linearGradient><path d="M118.7 403.3s-.22-.57-.52.04c-2.7 5.49-27.15 64.96-29.09 110.86 0 0-4.08 26.37 30.11 26.02 28.54-.29 27.78-24.6 27.68-32.79-.39-33.22-28.18-104.13-28.18-104.13z" style="fill:url(#icon-500_SVGID_2_)" /><linearGradient id="icon-500_SVGID_3_" gradientUnits="userSpaceOnUse" x1="117.915" y1="418.287" x2="117.915" y2="569.42"><stop offset="0" stop-color="#ECF1FB" /><stop offset=".818" stop-color="#AFB0E7" /></linearGradient><path d="M117.92 569.42c-.55 0-1-.45-1-1V419.29c0-.55.45-1 1-1s1 .45 1 1v149.13c0 .55-.45 1-1 1z" style="fill:url(#icon-500_SVGID_3_)" /><linearGradient id="icon-500_SVGID_4_" gradientUnits="userSpaceOnUse" x1="619.042" y1="448.707" x2="619.042" y2="360.383"><stop offset=".227" stop-color="#CCD4F4" /><stop offset=".789" stop-color="#ECF1FB" /></linearGradient><path d="M619.55 360.54s-.14-.37-.33.03c-1.74 3.53-17.48 41.83-18.73 71.38 0 0-2.63 16.98 19.39 16.76 18.38-.18 17.89-15.84 17.82-21.11-.26-21.4-18.15-67.06-18.15-67.06z" style="fill:url(#icon-500_SVGID_4_)" /><linearGradient id="icon-500_SVGID_5_" gradientUnits="userSpaceOnUse" x1="619.043" y1="370.19" x2="619.043" y2="467.503"><stop offset="0" stop-color="#ECF1FB" /><stop offset="1" stop-color="#A6A8E2" /></linearGradient><path d="M619.04 467.5c-.36 0-.64-.29-.64-.64v-96.02c0-.36.29-.64.64-.64s.64.29.64.64v96.02c.01.35-.28.64-.64.64z" style="fill:url(#icon-500_SVGID_5_)" /><linearGradient id="icon-500_SVGID_6_" gradientUnits="userSpaceOnUse" x1="464.96" y1="86.101" x2="430.206" y2="146.297"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><circle cx="447.58" cy="116.2" r="34.75" style="fill:url(#icon-500_SVGID_6_)" /><linearGradient id="icon-500_SVGID_7_" gradientUnits="userSpaceOnUse" x1="422.623" y1="116.567" x2="422.623" y2="174.021"><stop offset="0" stop-color="#F9FAFE" /><stop offset="1" stop-color="#E5EDF7" /></linearGradient><path d="M467.36 135.15h-34.57c-2.23-10.61-11.65-18.58-22.93-18.58s-20.69 7.97-22.93 18.58h-9.05c-10.73 0-19.44 8.7-19.44 19.44 0 10.73 8.7 19.44 19.44 19.44h89.47c10.73 0 19.44-8.7 19.44-19.44.01-10.74-8.7-19.44-19.43-19.44z" style="fill:url(#icon-500_SVGID_7_)" /><linearGradient id="icon-500_SVGID_8_" gradientUnits="userSpaceOnUse" x1="689.644" y1="537.948" x2="689.644" y2="510.119"><stop offset=".227" stop-color="#AFB0E7" /><stop offset="1" stop-color="#ECF1FB" /></linearGradient><circle cx="689.64" cy="524.03" r="13.91" style="fill:url(#icon-500_SVGID_8_)" /><linearGradient id="icon-500_SVGID_9_" gradientUnits="userSpaceOnUse" x1="689.694" y1="513.633" x2="689.694" y2="558.429"><stop offset="0" stop-color="#DDE1F6" /><stop offset=".818" stop-color="#A6A8E2" /></linearGradient><path d="M689.69 558.43c-.24 0-.43-.19-.43-.43v-43.94c0-.24.19-.43.43-.43s.43.19.43.43V558c0 .24-.19.43-.43.43z" style="fill:url(#icon-500_SVGID_9_)" /><linearGradient id="icon-500_SVGID_10_" gradientUnits="userSpaceOnUse" x1="289.384" y1="477.19" x2="289.384" y2="411.226"><stop offset="0" stop-color="#B0B9E1" /><stop offset="1" stop-color="#E7EFF7" /></linearGradient><path d="m202.07 451.28 68.03-40.05h106.6l-61.55 65.96-77.74-1.18z" style="fill:url(#icon-500_SVGID_10_)" /><linearGradient id="icon-500_SVGID_11_" gradientUnits="userSpaceOnUse" x1="454.145" y1="502.809" x2="454.145" y2="420.65"><stop offset="0" stop-color="#B0B9E1" /><stop offset="1" stop-color="#E7EFF7" /></linearGradient><path d="m386.71 479.55 45.05-58.9h89.82l-97.77 82.16-29.44-7.66z" style="fill:url(#icon-500_SVGID_11_)" /><linearGradient id="icon-500_SVGID_12_" gradientUnits="userSpaceOnUse" x1="589.016" y1="472.132" x2="589.016" y2="397.68"><stop offset="0" stop-color="#B0B9E1" /><stop offset="1" stop-color="#E7EFF7" /></linearGradient><path d="m501.26 458.64 64.79-60.96h110.72l-48.99 66.61a19.243 19.243 0 0 1-17.85 7.7l-108.67-13.35z" style="fill:url(#icon-500_SVGID_12_)" /><linearGradient id="icon-500_SVGID_13_" gradientUnits="userSpaceOnUse" x1="314.267" y1="607.349" x2="314.267" y2="497.361"><stop offset="0" stop-color="#B0B9E1" /><stop offset="1" stop-color="#E7EFF7" /></linearGradient><path d="m212.23 592.77 91.44-95.41H416.3L297.04 607.35l-49.47-2.65z" style="fill:url(#icon-500_SVGID_13_)" /><linearGradient id="icon-500_SVGID_14_" gradientUnits="userSpaceOnUse" x1="515.604" y1="312.867" x2="613.092" y2="481.721"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M564.35 296.53c-41.79 0-75.67 33.6-75.67 75.05v51.43c0 41.45 33.88 75.05 75.67 75.05s75.67-33.6 75.67-75.05v-51.43c-.01-41.45-33.88-75.05-75.67-75.05zm23.82 137.83c0 13.05-10.67 23.63-23.82 23.63-13.16 0-23.82-10.58-23.82-23.63v-74.13c0-13.05 10.67-23.63 23.82-23.63 13.16 0 23.82 10.58 23.82 23.63v74.13z" style="fill:url(#icon-500_SVGID_14_)" /><linearGradient id="icon-500_SVGID_15_" gradientUnits="userSpaceOnUse" x1="513.839" y1="321.619" x2="606.64" y2="482.355"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M560.24 305.91c-39.52 0-71.56 32.04-71.56 71.56v49.03c0 39.52 32.04 71.56 71.56 71.56s71.56-32.04 71.56-71.56v-49.03c0-39.52-32.04-71.56-71.56-71.56zm22.53 131.41c0 12.44-10.09 22.53-22.53 22.53-12.44 0-22.53-10.09-22.53-22.53v-70.67c0-12.44 10.09-22.53 22.53-22.53 12.44 0 22.53 10.09 22.53 22.53v70.67z" style="fill:url(#icon-500_SVGID_15_)" /><linearGradient id="icon-500_SVGID_16_" gradientUnits="userSpaceOnUse" x1="217.031" y1="307.363" x2="316.583" y2="479.793"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M333.72 412.6c-5.55-58.15-65.99-54.01-90.14-49.98l2.26-15.28 71.49 5.88 8.98-5.88V307.2h-109l-9.09 7.47-14.81 92.41h43.6c22.73-19.99 38.77-11.37 45.38 0 6.34 10.92 7.27 43.26-19.71 43.87-23.34.53-23.13-19.92-23.13-19.92l-41.55.58-8.06 7.52s6.18 59.41 69.73 59.41 77.3-50.09 74.05-85.94z" style="fill:url(#icon-500_SVGID_16_)" /><linearGradient id="icon-500_SVGID_17_" gradientUnits="userSpaceOnUse" x1="212.735" y1="311.982" x2="309.699" y2="479.928"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M324.26 415.94c-5.19-55.89-61.65-51.92-84.21-48.04l2.11-14.69h75.17v-38.58H208.14l-14.95 96h40.73c21.23-19.21 36.22-10.93 42.39 0 5.92 10.49 6.79 46.38-18.41 46.97-21.8.51-24.41-19.14-24.41-19.14l-43.54.66s5.78 59.41 65.14 59.41 72.2-48.14 69.17-82.59z" style="fill:url(#icon-500_SVGID_17_)" /><linearGradient id="icon-500_SVGID_18_" gradientUnits="userSpaceOnUse" x1="368.459" y1="304.731" x2="452.448" y2="450.205"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M387.26 461.26s-54.09-36.72-56.49-83.83c-2.29-45.03 25.47-81.27 76.27-81.27 55.29 0 78.12 47.95 78.12 73.99 0 26.04-10.63 63.25-55.73 93.35-23.53 0-42.17-2.24-42.17-2.24z" style="fill:url(#icon-500_SVGID_18_)" /><linearGradient id="icon-500_SVGID_19_" gradientUnits="userSpaceOnUse" x1="366.623" y1="312.428" x2="445.175" y2="448.483"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M384.76 461.29s-51.7-34.94-53.99-79.77c-2.19-42.85 24.35-77.34 72.9-77.34 52.85 0 73.47 45.54 73.47 70.32 0 24.78-12.03 58.72-55.14 87.36-22.49.01-37.24-.57-37.24-.57z" style="fill:url(#icon-500_SVGID_19_)" /><linearGradient id="icon-500_SVGID_20_" gradientUnits="userSpaceOnUse" x1="400.418" y1="454.748" x2="417.994" y2="485.191"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M414.59 486.78h-16.64c-.85 0-1.64-.44-2.08-1.17l-11.39-18.8c-.7-1.15-.33-2.64.82-3.34 1.15-.69 2.64-.33 3.34.82l10.68 17.62h13.84l10.6-19.05c.65-1.17 2.13-1.6 3.31-.94 1.17.65 1.6 2.13.94 3.31l-11.29 20.3c-.44.77-1.25 1.25-2.13 1.25z" style="fill:url(#icon-500_SVGID_20_)" /><linearGradient id="icon-500_SVGID_21_" gradientUnits="userSpaceOnUse" x1="397.841" y1="454.748" x2="415.417" y2="485.191"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M412.01 486.78h-16.64c-.85 0-1.64-.44-2.08-1.17l-11.39-18.8c-.7-1.15-.33-2.64.82-3.34 1.15-.69 2.64-.33 3.34.82l10.68 17.62h13.84l10.6-19.05c.65-1.17 2.13-1.6 3.31-.94 1.17.65 1.6 2.13.94 3.31l-11.29 20.3c-.43.77-1.25 1.25-2.13 1.25z" style="fill:url(#icon-500_SVGID_21_)" /><linearGradient id="icon-500_SVGID_22_" gradientUnits="userSpaceOnUse" x1="395.626" y1="441.888" x2="415.816" y2="476.856"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M429.22 468.35h-47.66c-2.76 0-5-2.24-5-5V452.9h57.65v10.45c0 2.76-2.23 5-4.99 5z" style="fill:url(#icon-500_SVGID_22_)" /><linearGradient id="icon-500_SVGID_23_" gradientUnits="userSpaceOnUse" x1="395.022" y1="445.756" x2="412.776" y2="476.507"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M425.57 468.35h-44.01c-2.76 0-5-2.24-5-5v-6.93h54.01v6.93c0 2.76-2.24 5-5 5z" style="fill:url(#icon-500_SVGID_23_)" /><linearGradient id="icon-500_SVGID_24_" gradientUnits="userSpaceOnUse" x1="396.171" y1="472.261" x2="416.697" y2="507.813"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M418.79 505.46h-25.7c-4.09 0-7.4-3.31-7.4-7.4v-19.75h40.5v19.75c0 4.09-3.31 7.4-7.4 7.4z" style="fill:url(#icon-500_SVGID_24_)" /><linearGradient id="icon-500_SVGID_25_" gradientUnits="userSpaceOnUse" x1="395.099" y1="476.159" x2="413.018" y2="507.195"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><path d="M414.04 505.46h-20.95c-4.09 0-7.4-3.31-7.4-7.4v-16.47h35.75v16.47c0 4.09-3.31 7.4-7.4 7.4z" style="fill:url(#icon-500_SVGID_25_)" /><linearGradient id="icon-500_SVGID_26_" gradientUnits="userSpaceOnUse" x1="370.752" y1="345.042" x2="439.366" y2="413.656"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M404.4 311.4s-17.23 79.51 1.33 135.9c47.84-62.43-1.33-135.9-1.33-135.9z" style="fill:url(#icon-500_SVGID_26_)" /><linearGradient id="icon-500_SVGID_27_" gradientUnits="userSpaceOnUse" x1="352.936" y1="350.49" x2="415.513" y2="413.067"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M386.43 316.99s-15.24 26.94-16.34 62.72c-.75 24.43 11.93 66.85 11.93 66.85s-20.76-36.07-20.76-70.23 25.17-59.34 25.17-59.34z" style="fill:url(#icon-500_SVGID_27_)" /><linearGradient id="icon-500_SVGID_28_" gradientUnits="userSpaceOnUse" x1="389.798" y1="347.846" x2="456.792" y2="414.84"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><path d="M420.65 316.99s34.1 22.12 34.1 60.99-29.68 68.58-29.68 68.58 23.5-42.18 23.5-70.9c0-14.24-13.98-48.76-27.92-58.67z" style="fill:url(#icon-500_SVGID_28_)" /><path class="st26" d="M386.43 316.99s-62.13 47.12-4.42 129.57c-7.06-15.6-36.21-73.62 4.42-129.57zm34.22 0s62.13 47.12 4.42 129.57c7.07-15.6 36.22-73.62-4.42-129.57zm-16.25-5.59s-35.48 79.66 1.33 135.9c32.24-57.5-1.33-135.9-1.33-135.9z" /><linearGradient id="icon-500_SVGID_29_" gradientUnits="userSpaceOnUse" x1="234.692" y1="561.708" x2="234.692" y2="486.088"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M226.89 486.45s-18.35-2.54-24.31 5.89c-5.96 8.43-8.14 30.01-8.14 30.01l13.81-.73-1.16 25.14 25.48 14.94 36.3-19.52-5.52-22.78 11.6-3.03s-3.46-33.06-19.59-28.18c-8.29.89-10.9.74-10.9.74s-2.18 6.95-9.67 6.36c-7.49-.58-7.9-8.84-7.9-8.84z" style="fill:url(#icon-500_SVGID_29_)" /><linearGradient id="icon-500_SVGID_30_" gradientUnits="userSpaceOnUse" x1="235.741" y1="473.191" x2="235.741" y2="497.147"><stop offset="0" stop-color="#F4AE98" /><stop offset="1" stop-color="#FAD1BB" /></linearGradient><path d="m228.72 476.05-3.81 17.01c-.18.8.24 1.61 1 1.92 1.97.8 5.91 2.17 9.97 2.17 4.21 0 8.18-2.3 10-3.53.63-.42.89-1.21.65-1.93l-5.83-17.35a1.681 1.681 0 0 0-1.89-1.12l-8.74 1.55c-.67.11-1.2.62-1.35 1.28z" style="fill:url(#icon-500_SVGID_30_)" /><linearGradient id="icon-500_SVGID_31_" gradientUnits="userSpaceOnUse" x1="-1535.437" y1="750.954" x2="-1523.728" y2="668.51" gradientTransform="rotate(-8.082 -1929.216 -11692.611)"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M205.94 489.39c5.34-1.77 12.58-.59 12.88 11.39.29 11.98-11.45 31.07-7.24 37.71 4.26 6.73 13.37 16.29 19.17 21.73-1.35 6.4-4.99 11.78-4.99 11.78s-21.36-9.86-30.66-19.73c-9.3-9.87-4.61-32.5-.3-48.61 3.24-12.13 11.14-14.27 11.14-14.27z" style="fill:url(#icon-500_SVGID_31_)" /><linearGradient id="icon-500_SVGID_32_" gradientUnits="userSpaceOnUse" x1="-5585.118" y1="175.804" x2="-5573.409" y2="93.36" gradientTransform="scale(-1 1) rotate(-8.082 -118.041 -37329.02)"><stop offset="0" stop-color="#C3D5FD" /><stop offset="1" stop-color="#1A90FC" /></linearGradient><path d="M261.91 489.39c-5.34-1.77-12.58-.59-12.88 11.39-.29 11.98 11.45 31.07 7.24 37.71-4.26 6.73-13.37 16.29-19.17 21.73 1.35 6.4 4.99 11.78 4.99 11.78s21.36-9.86 30.66-19.73c9.3-9.87 4.61-32.5.3-48.61-3.24-12.13-11.14-14.27-11.14-14.27z" style="fill:url(#icon-500_SVGID_32_)" /><linearGradient id="icon-500_SVGID_33_" gradientUnits="userSpaceOnUse" x1="234.692" y1="534.399" x2="234.692" y2="582.454"><stop offset="0" stop-color="#275C89" /><stop offset="1" stop-color="#013F7C" /></linearGradient><path d="M208.53 582.45h51.85c2.35 0 4.45-1.78 5.26-4.46l10.45-34.39c1.36-4.46-1.35-9.21-5.26-9.21h-72.29c-3.87 0-6.58 4.67-5.29 9.11l9.98 34.39c.8 2.74 2.92 4.56 5.3 4.56z" style="fill:url(#icon-500_SVGID_33_)" /><path class="st26" d="M206.46 598.27s-.8-1.76-1.42-1.95c-.62-.19-9.49-.54-12.72-1.38s-12.56-2.17-16.56 1.61c-3.48 3.3-4.63 11 .67 15.43 1.99 1.73 3.94 2.23 11.31 1.89s18.04-.27 20.38-3.68c-.07-5.65-1.66-11.92-1.66-11.92z" /><linearGradient id="icon-500_SVGID_34_" gradientUnits="userSpaceOnUse" x1="-3991.106" y1="603.193" x2="-3974.093" y2="603.193" gradientTransform="matrix(-1 0 0 1 -3772.525 0)"><stop offset="0" stop-color="#F4B9A4" /><stop offset=".652" stop-color="#FAD1BB" /></linearGradient><path d="M214.69 596.31s-8.56 1.92-11.62 1.64c-3.06-.28-.5 12.05-.5 12.05s8.17.57 15.4-1.53c2.45-9.44-3.28-12.16-3.28-12.16z" style="fill:url(#icon-500_SVGID_34_)" /><linearGradient id="icon-500_SVGID_35_" gradientUnits="userSpaceOnUse" x1="211.625" y1="584.443" x2="299.388" y2="584.443"><stop offset="0" stop-color="#18264B" /><stop offset=".652" stop-color="#2D3C65" /></linearGradient><path d="m211.63 595.87 4.45 13.84s95.64-12.6 81.97-43.63c-11.43-25.96-86.42 29.79-86.42 29.79z" style="fill:url(#icon-500_SVGID_35_)" /><linearGradient id="icon-500_SVGID_36_" gradientUnits="userSpaceOnUse" x1="191.837" y1="594.929" x2="191.837" y2="612.987"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><path d="M205.35 596.94s3.5 1.37 3.95 6.26c.44 4.89-1 8.17-8.45 9.07-7.45.91-9.34.57-14.01.68-4.67.11-11.45.57-12.46-8.32-1-8.88 8.08-11.15 17.5-8.88 2.96.56 13.47 1.19 13.47 1.19z" style="fill:url(#icon-500_SVGID_36_)" /><path class="st26" d="M266.14 598.27s.8-1.76 1.42-1.95c.62-.19 9.49-.54 12.72-1.38 3.23-.84 11.93-2.24 16.32 1.51 4.07 3.48 4.34 11.16-.3 15.4-1.99 1.73-4.08 2.35-11.44 2.01s-18.04-.27-20.38-3.68c.08-5.64 1.66-11.91 1.66-11.91z" /><linearGradient id="icon-500_SVGID_37_" gradientUnits="userSpaceOnUse" x1="254.028" y1="603.193" x2="271.04" y2="603.193"><stop offset="0" stop-color="#F4B9A4" /><stop offset=".652" stop-color="#FAD1BB" /></linearGradient><path d="M257.92 596.31s8.56 1.92 11.62 1.64c3.06-.28.5 12.05.5 12.05s-8.17.57-15.4-1.53c-2.45-9.44 3.28-12.16 3.28-12.16z" style="fill:url(#icon-500_SVGID_37_)" /><linearGradient id="icon-500_SVGID_38_" gradientUnits="userSpaceOnUse" x1="173.22" y1="584.443" x2="260.983" y2="584.443"><stop offset="0" stop-color="#445677" /><stop offset="1" stop-color="#293861" /></linearGradient><path d="m260.98 595.87-4.45 13.84s-95.64-12.6-81.97-43.63c11.43-25.96 86.42 29.79 86.42 29.79z" style="fill:url(#icon-500_SVGID_38_)" /><linearGradient id="icon-500_SVGID_39_" gradientUnits="userSpaceOnUse" x1="280.771" y1="594.929" x2="280.771" y2="612.987"><stop offset="0" stop-color="#FFDB80" /><stop offset="1" stop-color="#FFBB24" /></linearGradient><path d="M267.26 596.94s-3.5 1.37-3.95 6.26 1 8.17 8.45 9.07 9.34.57 14.01.68 11.45.57 12.46-8.32c1-8.88-8.08-11.15-17.5-8.88-2.96.56-13.47 1.19-13.47 1.19z" style="fill:url(#icon-500_SVGID_39_)" /><linearGradient id="icon-500_SVGID_40_" gradientUnits="userSpaceOnUse" x1="251.42" y1="467.696" x2="220.113" y2="467.696"><stop offset="0" stop-color="#F4B9A4" /><stop offset=".652" stop-color="#FAD1BB" /></linearGradient><path d="M250.74 469.25c.57-.81.93-2.88.46-3.49-.84-.68-1.63-.29-2.24.3.14-4.96-.31-9.07-.42-10.12-.31-3.04-3.4-8.6-13.5-8.6s-12.05 7.29-12.05 7.29-.66 5.15-.46 11.41c-.6-.58-1.39-.95-2.22-.28-.46.61-.1 2.68.46 3.49.57.81.93 2.73 1.03 3.79.1 1.01-.63 3.7 2.03 3.36 1.59 6.35 8.01 11.64 11.99 11.64 4.36 0 10.16-5.33 11.8-11.65 2.71.37 1.98-2.34 2.07-3.35.13-1.06.49-2.98 1.05-3.79z" style="fill:url(#icon-500_SVGID_40_)" /><linearGradient id="icon-500_SVGID_41_" gradientUnits="userSpaceOnUse" x1="215.804" y1="455.594" x2="252.152" y2="455.594"><stop offset="0" stop-color="#4F5C7C" /><stop offset="1" stop-color="#274168" /></linearGradient><path d="M242.34 445.19s-1.97-6.21-9.53-4.72c-7.55 1.48-8.06 5.06-11.03 5.19-5.06.24-9.11 6.54-2.61 13.22 2.89 2.97.45 4.25 1.82 6.88s1.36 5.19 1.36 5.19 2.41-7.71.82-11c-.82-1.7 2.82-2.16 7.35-1.75s11.68-1.1 12.24-4.18c1.34 6.32 2.68 6.98 4.38 7.94 1.7.96 1.8 8.6 1.8 8.6s.3-5.62 1.49-6.88c.98-2.07 2.89-10.22.73-12.19s-.34-8.31-8.82-6.3z" style="fill:url(#icon-500_SVGID_41_)" /><linearGradient id="icon-500_SVGID_42_" gradientUnits="userSpaceOnUse" x1="509.948" y1="612.061" x2="509.948" y2="547.57"><stop offset="0" stop-color="#B0B9E1" /><stop offset="1" stop-color="#E7EFF7" /></linearGradient><path d="m452.67 596.16 45.65-48.59h68.9l-60.95 64.49z" style="fill:url(#icon-500_SVGID_42_)" /><linearGradient id="icon-500_SVGID_43_" gradientUnits="userSpaceOnUse" x1="461.835" y1="563.724" x2="495.632" y2="622.263"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><circle cx="478.73" cy="592.99" r="33.79" style="fill:url(#icon-500_SVGID_43_)" /><linearGradient id="icon-500_SVGID_44_" gradientUnits="userSpaceOnUse" x1="455.798" y1="564.313" x2="489.595" y2="622.851"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><circle cx="472.7" cy="593.58" r="33.79" style="fill:url(#icon-500_SVGID_44_)" /><linearGradient id="icon-500_SVGID_45_" gradientUnits="userSpaceOnUse" x1="479.001" y1="231.35" x2="503.267" y2="273.38"><stop offset="0" stop-color="#C8CBF2" /><stop offset="1" stop-color="#AFB0E7" /></linearGradient><circle cx="491.13" cy="252.36" r="24.26" style="fill:url(#icon-500_SVGID_45_)" /><linearGradient id="icon-500_SVGID_46_" gradientUnits="userSpaceOnUse" x1="474.666" y1="231.772" x2="498.933" y2="273.803"><stop offset=".116" stop-color="#DEE4FF" /><stop offset=".847" stop-color="#BACBEE" /></linearGradient><circle cx="486.8" cy="252.79" r="24.26" style="fill:url(#icon-500_SVGID_46_)" /></g></symbol><symbol viewBox="0 0 128 128" id="icon-icon"><path d="M115.147.062a13 13 0 0 1 4.94.945c1.55.63 2.907 1.526 4.069 2.688a13.148 13.148 0 0 1 2.761 4.069c.678 1.55 1.017 3.245 1.017 5.086v102.3c0 3.681-1.187 6.733-3.56 9.155-2.373 2.422-5.352 3.633-8.937 3.633H12.992c-3.875 0-7-1.26-9.373-3.779-2.373-2.518-3.56-5.667-3.56-9.445V12.704c0-3.39 1.163-6.345 3.488-8.863C5.872 1.32 8.972.062 12.847.062h102.3zM81.434 109.047c1.744 0 3.003-.412 3.778-1.235.775-.824 1.163-1.914 1.163-3.27 0-1.26-.388-2.325-1.163-3.197-.775-.872-2.034-1.307-3.778-1.307H72.57c.097-.194.145-.485.145-.872V27.09h9.01c1.743 0 2.954-.436 3.633-1.308.678-.872 1.017-1.938 1.017-3.197 0-1.26-.34-2.325-1.017-3.197-.679-.872-1.89-1.308-3.633-1.308H46.268c-1.743 0-2.954.436-3.632 1.308-.678.872-1.018 1.938-1.018 3.197 0 1.26.34 2.325 1.018 3.197.678.872 1.889 1.308 3.632 1.308h8.138v72.075c0 .193.024.339.073.436.048.096.072.242.072.436H46.56c-1.744 0-3.003.435-3.778 1.307-.775.872-1.163 1.938-1.163 3.197 0 1.356.388 2.446 1.163 3.27.775.823 2.034 1.235 3.778 1.235h34.875z" /></symbol><symbol viewBox="0 0 5760 3040" id="icon-login-bg"><image width="5760" height="3040" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAFoAAAAvgAQMAAAC1QKagAAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABlBMVEUsNEr///91v/yPAAAA AWJLR0QB/wIt3gAAAAd0SU1FB+YBBQYyN1c3BnEAAAhjSURBVHja7cExAQAAAMKg9U9tDB+gAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAACAtwFzzwABY3VrRQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMS0wNVQwNjo1 MDo1MyswMDowMCfNlVoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDEtMDVUMDY6NTA6NTQrMDA6 MDCTNxNoAAAAAElFTkSuQmCC"></image></symbol><symbol viewBox="0 0 700 700" id="icon-login-box-bg"><style>#icon-login-box-bg .st0{fill:#e5e6eb}#icon-login-box-bg .st1{fill:#fff}#icon-login-box-bg .st2{fill:#84a9ff}#icon-login-box-bg .st3{fill:#050f64}#icon-login-box-bg .st4{fill:#155bcd}#icon-login-box-bg .st5{fill:#ffbd00}#icon-login-box-bg .st6{fill:#ff654f}#icon-login-box-bg .st9{fill:#f5bdc8}#icon-login-box-bg .st10{fill:#ea8096}#icon-login-box-bg .st11{opacity:0}#icon-login-box-bg .st13{fill:#dca000}</style><path class="st0" d="M101.8 176.7c21.4-19.8 48.8-33.2 77.8-37.2 92.4-12.6 158.2 78.1 240.3 104.9 40.8 13.3 85.4 12.6 125.4 28 68.5 26.2 131.4 117.8 101 191.6-23.7 57.5-79.6 71.8-134.6 54-33.5-10.9-64.1-29.4-97.6-40.5-38.1-12.6-78.7-15.1-118.9-16.7s-80.6-2.4-119.6-12-77-28.9-101.2-60.9C40.8 343.4 48 260.8 73.1 213.7c7.4-13.9 17.2-26.3 28.7-37z" /><path class="st1" d="M82 257.1c5.7-23.2 18.9-44.7 37.3-60.4l1.7-1.5 1.8-1.4 1.8-1.4 1.8-1.3c.6-.4 1.2-.9 1.8-1.3l1.9-1.3c.6-.4 1.2-.9 1.9-1.3l1.9-1.2c5.1-3.2 10.5-6 16.1-8.4 11.1-4.7 23-7.8 35.1-9 12.1-1.1 24.3-.5 36.1 1.5 5.9 1 11.8 2.4 17.6 4 .7.2 1.5.4 2.2.6l2.2.7 2.2.7 2.1.7 2.1.7 2.1.8 2.1.8 2.1.8c5.6 2.2 11.1 4.6 16.5 7.2 5.4 2.6 10.7 5.4 15.9 8.3 10.4 5.9 20.6 12.2 30.5 18.8-10.4-5.9-20.7-11.8-31.4-17.2-5.3-2.7-10.7-5.3-16.1-7.7-5.4-2.4-10.9-4.7-16.5-6.7l-2.1-.8-2.1-.7-2.1-.7-2.1-.7-2.1-.7-2.1-.6-2.1-.6-2.1-.6c-5.7-1.5-11.5-2.8-17.3-3.7-11.6-1.9-23.5-2.5-35.2-1.3-11.7 1.1-23.2 4-34.1 8.5-5.4 2.2-10.7 4.9-15.8 7.9l-1.9 1.1c-.6.4-1.2.8-1.9 1.2l-1.8 1.2c-.6.4-1.2.8-1.8 1.3l-1.8 1.3-1.8 1.3-1.8 1.3-1.7 1.4c-18.2 15.2-32 35.7-39.1 58.4z" /><path class="st2" d="M183.1 543.2c-.3 1.2-.5 1.8-.5 1.8-.7-.5-1.4-.9-2.1-1.4-120.8-82.8-72.6-232.2-72.6-232.2 115.7 67.3 80.1 213.8 75.2 231.8z" /><path class="st3" d="M183.1 543.2c-.3 1.2-.5 1.8-.5 1.8-.7-.5-1.4-.9-2.1-1.4-10.1-29.9-20.1-59.8-29.8-89.8-5-15.5-10-31.1-14.8-46.7l-3.6-11.7-3.5-11.7c-1.2-3.9-2.2-7.8-3.4-11.8-.6-2-1.1-3.9-1.6-5.9l-1.6-5.9 1.6 5.9c.5 2 1.1 3.9 1.7 5.9 1.2 3.9 2.3 7.8 3.5 11.7l3.6 11.7 3.7 11.7c5 15.5 10.2 31 15.4 46.5 10.4 30 20.8 59.9 31.4 89.7zm-45.2-158.3c-.1 0-.2 0-.4-.1-.3-.1-.4-.5-.2-.8 3.7-7.2 6-15.3 6.7-23.4 0-.3.3-.5.6-.5s.5.3.5.6c-.7 8.2-3.1 16.5-6.9 23.8 0 .3-.2.4-.3.4zm16.1 45.6h-.3c-.3-.1-.4-.5-.3-.7 3.4-8.3 7.6-16.4 12.3-24.1.2-.3.5-.3.8-.2.3.2.3.5.2.8-4.7 7.6-8.8 15.6-12.2 23.9-.1.1-.3.3-.5.3zm-16.6 9.8h-.3c-9.5-3.9-18.3-9.3-26.1-16.1-.2-.2-.3-.6-.1-.8.2-.2.6-.3.8-.1 7.7 6.7 16.3 12 25.7 15.9.3.1.4.5.3.7 0 .2-.1.3-.3.4zm-11.5-49.8c-.2.1-.4.1-.6-.1l-19.2-15c-.2-.2-.3-.6-.1-.8.2-.2.6-.3.8-.1l19.2 15c.2.2.3.6.1.8 0 .1-.1.2-.2.2zm44.8 87.9h-.3c-.3-.1-.4-.5-.3-.7l10.1-23.5c.1-.3.5-.4.7-.3.3.1.4.5.3.7l-10.1 23.5c0 .1-.2.3-.4.3zm-19.1 3.2h-.3l-24.3-10c-.3-.1-.4-.5-.3-.7.1-.3.5-.4.7-.3l24.3 10c.3.1.4.5.3.7-.1.1-.3.3-.4.3z" /><path class="st4" d="M182.3 543.2c.3 1.2.4 1.9.4 1.9-.8-.1-1.7-.2-2.5-.3C35 525 11 369.8 11 369.8c133.5 8.2 167.5 155.1 171.3 173.4z" /><path class="st1" d="M182.3 543.2c.3 1.2.4 1.9.4 1.9-.8-.1-1.7-.2-2.5-.3-22.5-22.1-44.8-44.4-66.9-66.8-11.5-11.6-22.9-23.3-34.2-35.1l-8.5-8.8-8.4-8.9c-2.8-3-5.5-6-8.3-9-1.4-1.5-2.7-3-4.1-4.6l-4-4.6 4.1 4.5c1.4 1.5 2.7 3 4.1 4.5 2.8 3 5.6 6 8.4 8.9l8.5 8.8 8.6 8.7c11.5 11.6 23 23.1 34.7 34.6 22.5 22.2 45.2 44.3 68.1 66.2zM70.7 422.1c-.1.1-.2.1-.3.1-.3 0-.6-.3-.6-.6.1-8.1-1.5-16.4-4.5-23.9-.1-.3 0-.6.3-.7.3-.1.6 0 .7.3 3 7.7 4.6 16.1 4.6 24.4 0 .1-.1.3-.2.4zm34.9 33.4c-.1.1-.2.1-.3.1-.3 0-.6-.2-.6-.5-.7-9-.6-18.1.2-27 0-.3.3-.5.6-.5s.5.3.5.6c-.8 8.9-.9 17.9-.2 26.8.1.2 0 .4-.2.5zm-10.4 16.2c-.1.1-.2.1-.3.1-10.3.8-20.5-.1-30.5-2.7-.3-.1-.5-.4-.4-.7.1-.3.4-.5.7-.4 9.9 2.5 20 3.4 30.1 2.6.3 0 .6.2.6.5 0 .4-.1.5-.2.6zm-32.6-39.3c-.1.1-.3.2-.5.2l-23.9-4.8c-.3-.1-.5-.4-.4-.7.1-.3.4-.5.7-.4l23.9 4.8c.3.1.5.4.4.7-.1.1-.1.2-.2.2zm79.5 58.4c-.1.1-.2.1-.3.1-.3 0-.6-.2-.6-.5l-1.5-25.5c0-.3.2-.6.5-.6s.6.2.6.5l1.5 25.5c0 .2-.1.4-.2.5zm-15.7 11.5c-.1.1-.2.1-.3.1l-26.2 2c-.3 0-.6-.2-.6-.5s.2-.6.5-.6l26.2-2c.3 0 .6.2.6.5 0 .2-.1.4-.2.5z" /><path class="st5" d="M259.6 503.3c1.2.5 1.8.7 1.8.7-.5.7-1.1 1.3-1.7 1.9C164 616.8 20.9 552.3 20.9 552.3c79.7-107.4 221.4-55.9 238.7-49z" /><path class="st1" d="M259.6 503.3c1.2.5 1.8.7 1.8.7-.5.7-1.1 1.3-1.7 1.9-30.8 6.8-61.6 13.3-92.5 19.7-16 3.3-32 6.5-48 9.6l-12 2.3-12 2.2c-4 .7-8 1.4-12.1 2-2 .4-4 .6-6 .9l-6.1.9 6-1c2-.3 4-.6 6-1 4-.7 8-1.4 12-2.2l12-2.3 12-2.4c16-3.3 31.9-6.7 47.9-10.2 31-6.9 61.9-13.9 92.7-21.1zM97.3 530.8c0 .1 0 .2-.1.3-.2.3-.5.3-.8.2-6.8-4.5-14.6-7.7-22.5-9.3-.3-.1-.5-.4-.4-.7.1-.3.4-.5.7-.4 8.1 1.6 16 4.9 22.9 9.5.1 0 .1.2.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 224.2 35.4 241.2z" /><path class="st1" d="M552.1 373.7c-.5 1.1-.8 1.7-.8 1.7l-1.8-1.8c-5-31.1-9.8-62.3-14.4-93.5-2.4-16.1-4.7-32.3-6.8-48.5l-1.6-12.1-1.5-12.2c-.5-4.1-.9-8.1-1.4-12.2-.2-2-.4-4.1-.6-6.1l-.5-6.1.6 6.1c.2 2 .4 4.1.7 6.1.5 4 1 8.1 1.5 12.1l1.6 12.1 1.7 12.1c2.4 16.1 4.9 32.3 7.5 48.4 5.1 31.4 10.3 62.7 15.8 93.9zM533.9 210c-.1 0-.2 0-.3-.1-.3-.2-.3-.5-.1-.8 4.9-6.5 8.5-14.1 10.6-21.9.1-.3.4-.5.7-.4.3.1.5.4.4.7-2.1 8-5.8 15.7-10.7 22.3-.3.1-.5.2-.6.2zm8.3 47.6c-.1 0-.2 0-.3-.1-.3-.2-.3-.5-.2-.8 4.8-7.6 10.2-14.9 16.2-21.7.2-.2.6-.3.8-.1.2.2.3.6.1.8-5.9 6.7-11.3 13.9-16.1 21.5-.1.3-.3.4-.5.4zm-18 6.9c-.1 0-.2 0-.3-.1-8.7-5.4-16.5-12.2-23-20.2-.2-.2-.2-.6.1-.8.2-.2.6-.2.8.1 6.4 7.9 14.1 14.6 22.7 19.9.3.2.3.5.2.8-.2.2-.4.3-.5.3zm-3-51c-.2 0-.4 0-.5-.2l-16.5-18c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l16.5 18c.2.2.2.6 0 .8-.1.2-.2.2-.3.2zm29.5 94.2c-.1 0-.2 0-.3-.1-.3-.2-.3-.5-.2-.8l13.9-21.5c.2-.3.5-.3.8-.2.3.2.3.5.2.8l-13.9 21.5c-.1.2-.3.3-.5.3zm-19.5-.1c-.1 0-.2 0-.3-.1l-22.3-13.9c-.3-.2-.3-.5-.2-.8.2-.3.5-.3.8-.2l22.3 13.9c.3.2.3.5.2.8-.1.2-.3.3-.5.3z" /><path class="st4" d="M526.6 382.8c-1 .7-1.6 1-1.6 1-.2-.8-.4-1.6-.6-2.5-35-142.2 100.5-221.5 100.5-221.5 41.5 127.2-82.7 212.8-98.3 223z" /><path class="st3" d="M526.6 382.8c-1 .7-1.6 1-1.6 1-.2-.8-.4-1.6-.6-2.5 12.3-29 24.8-58 37.5-86.8 6.6-14.9 13.3-29.8 20-44.7l5.1-11.1 5.2-11.1c1.7-3.7 3.6-7.3 5.3-11 .9-1.8 1.8-3.6 2.7-5.5l2.8-5.4-2.7 5.5c-.9 1.8-1.8 3.6-2.7 5.5-1.7 3.7-3.5 7.4-5.2 11.1l-5.1 11.1-5 11.2c-6.6 14.9-13 29.9-19.4 44.9-12.2 29.2-24.3 58.5-36.3 87.8zm71.6-148.3c-.1-.1-.2-.2-.2-.3-.1-.3 0-.6.3-.7 7.6-2.9 14.7-7.4 20.6-13 .2-.2.6-.2.8 0 .2.2.2.6 0 .8-6 5.7-13.3 10.2-21 13.2-.1.1-.3.1-.5 0zM580 279.3c-.1-.1-.2-.1-.2-.2-.1-.3 0-.6.3-.8 8.1-3.9 16.6-7.2 25.2-9.7.3-.1.6.1.7.4.1.3-.1.6-.4.7-8.6 2.5-17 5.8-25 9.7-.3 0-.5 0-.6-.1zm-19-3.8c-.1-.1-.2-.1-.2-.3-4.5-9.3-7.4-19.1-8.7-29.3 0-.3.2-.6.5-.6s.6.2.6.5c1.3 10.1 4.2 19.8 8.6 29 .1.3 0 .6-.3.8-.1 0-.3 0-.5-.1zm24.6-44.7c-.2-.1-.3-.2-.4-.4l-4.4-24c-.1-.3.1-.6.5-.7.3-.1.6.1.7.5l4.4 24c.1.3-.1.6-.5.7-.1-.1-.2-.1-.3-.1zm-25.1 95.4c-.1-.1-.2-.1-.2-.2-.1-.3 0-.6.3-.8l23.2-10.8c.3-.1.6 0 .8.3.1.3 0 .6-.3.8l-23.2 10.8c-.2 0-.4 0-.6-.1zm-16.4-10.4c-.1-.1-.2-.1-.2-.2l-11.5-23.7c-.1-.3 0-.6.3-.8.3-.1.6 0 .8.3l11.5 23.7c.1.3 0 .6-.3.8-.2 0-.5 0-.6-.1z" /><path class="st5" d="M482.2 415.1c-1.2 0-1.9-.1-1.9-.1l.9-2.4C532.4 275.4 689 286.2 689 286.2c-37.4 128.5-188.2 129.3-206.8 128.9z" /><path class="st1" d="M482.2 415.1c-1.2 0-1.9-.1-1.9-.1l.9-2.4c26.5-17 53.2-33.9 79.9-50.6 13.9-8.6 27.8-17.2 41.7-25.6l10.5-6.3 10.5-6.2c3.5-2.1 7.1-4.1 10.6-6.1 1.8-1 3.6-2 5.3-3l5.4-2.9-5.3 3c-1.8 1-3.6 2-5.3 3-3.5 2.1-7 4.1-10.5 6.2l-10.5 6.4-10.4 6.4c-13.8 8.6-27.6 17.4-41.4 26.2-26.6 17.2-53.1 34.5-79.5 52zM624.9 333c0-.1-.1-.2 0-.4.1-.3.4-.5.7-.4 7.9 1.8 16.3 2.2 24.3.9.3 0 .6.2.7.5 0 .3-.2.6-.5.7-8.2 1.3-16.7 1-24.8-.9l-.4-.4zm-40.3 26.7c0-.1-.1-.2 0-.3 0-.3.3-.5.6-.5 8.9 1.3 17.8 3.4 26.3 6.2.3.1.5.4.4.7-.1.3-.4.5-.7.4-8.5-2.7-17.3-4.8-26.1-6.1-.3-.1-.4-.3-.5-.4zm-13.5-13.8c-.1-.1-.1-.2-.1-.3 1.5-10.2 4.6-20 9.3-29.2.1-.3.5-.4.8-.2.3.1.4.5.2.8-4.6 9.1-7.7 18.7-9.2 28.8 0 .3-.3.5-.6.5-.2-.2-.4-.3-.4-.4zm45.5-23.1c-.1-.2-.1-.4-.1-.6l9.9-22.3c.1-.3.5-.4.8-.3.3.1.4.5.3.8l-9.9 22.3c-.1.3-.5.4-.8.3l-.2-.2zm-74.5 64.6c0-.1-.1-.2 0-.3.1-.3.3-.5.7-.5l25.2 4.2c.3.1.5.3.5.7-.1.3-.3.5-.7.5l-25.2-4.2c-.3-.1-.4-.2-.5-.4zm-7.7-17.8c0-.1-.1-.2 0-.3l3.9-26c0-.3.3-.5.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.3 20.4v-.3c.1-1 .3-2.4.5-4s.5-3.3.8-5c.3-1.7.7-3.3 1-4.6 1.3-5.2 3.6-6.3 5.7-4.5 1.1.9 1.8 3.9 1 7.5-.4 1.8-1.3 3.9-2.8 6-1.3 1.9-3.2 3.9-5.8 5.8 3.2 6.2 6.6 12.2 10.3 18.1 0-1.2.1-2.8.2-4.6.1-1.8.3-3.9.5-5.8.1-1 .2-1.9.3-2.8.1-.9.3-1.7.4-2.5 1-6 3.5-7.5 6.1-5.6.6.5 1.2 1.5 1.6 3 .3 1.5.5 3.3.2 5.5s-1.1 4.5-2.6 7.1c-1.3 2.3-3.2 4.7-5.9 7 3.6 5.7 7.5 11.3 11.6 16.7l-2.2 1.6c-4-5.6-7.8-11.3-11.3-17.2-3.3 1.3-6.3 1.9-9 1.9-3 0-5.6-.6-7.7-1.6-2.1-1-3.8-2.3-4.9-3.6-1.1-1.3-1.8-2.6-1.8-3.4-.3-3.5 2.4-4.5 8.2-1.7 2.9 1.5 7 3.5 10.3 5.2 1.7.8 3.1 1.5 4.2 2-3.6-6-6.9-12.2-9.9-18.5-3 .9-5.7 1.2-8.1 1-2.6-.2-4.7-1-6.5-2-3.6-2-5.3-5-5.4-6.6 0-3.1 2.4-3.8 7.2-.9 2.4 1.5 5.8 3.5 8.6 5.2 1.4.9 2.6 1.6 3.5 2.1.1 0 .1.1.2.1-3.3-6.8-6.2-13.7-8.8-20.7-5.3 1.1-9.2 0-11.9-1.8-2.7-1.9-3.9-4.4-3.8-5.6-.1-.9.5-1.6 1.5-1.7z" /><path class="st4" d="M106.8 558.3c0 13.1 8.1 23.7 18.2 23.7h455c10.1 0 18.2-10.6 18.2-23.7H106.8z" /><path class="st2" d="M155.4 290.9h394.2v247.6H155.4z" /><path class="st3" d="M556.6 264.8h-408c-7.6 0-13.8 6.2-13.8 13.8V540c0 7.6 6.2 13.8 13.8 13.8h408c7.6 0 13.8-6.2 13.8-13.8V278.6c0-7.7-6.2-13.8-13.8-13.8z" /><path class="st1" d="M155.4 285.5h394.2v247.6H155.4z" /><path class="st0" d="M295.7 558.3h-99.1l.3-4.4.4-5.5h97.6zm212.9 0h-99.2l.4-4.4.4-5.5h97.6zM188 451.7h34.4v3.9H188zm47 0h34.4v3.9H235zm93.6 0h24.9v3.9h-24.9zm46.2 0h38.7v3.9h-38.7zm-32.5 13.4h17.6v3.9h-17.6zm0 10.2h17.6v3.9h-17.6zm0 10.3h17.6v3.9h-17.6zm0 10.2h17.6v3.9h-17.6z" /><path class="st6" d="M209.7 465.1h12.7v3.9h-12.7z" /><path class="st2" d="M209.7 475.3h12.7v3.9h-12.7z" /><path class="st4" d="M209.7 485.6h12.7v3.9h-12.7z" /><path class="st5" d="M209.7 495.8h12.7v3.9h-12.7z" /><path class="st0" d="M399.7 465.1h17.6v3.9h-17.6zm0 10.2h17.6v3.9h-17.6zm0 10.3h17.6v3.9h-17.6zm0 10.2h17.6v3.9h-17.6zm-165.1-30.7h17.6v3.9h-17.6zm0 10.2h26.1v3.9h-26.1zm0 10.3h32.9v3.9h-32.9zm0 10.2h15.1v3.9h-15.1zm-54.2-181.2H306v6.9H180.4z" /><path class="st4" d="M180.4 340.4h17.8v7.5h-17.8zm35.7 0h17.8v7.5h-17.8zm35.7 0h17.8v7.5h-17.8zm35.7 0h17.8v7.5h-17.8zm35.8 0h17.8v7.5h-17.8zm35.7 0h17.8v7.5H359zm35.7 0h17.8v7.5h-17.8z" /><path class="st0" d="M180.4 355.7h249.8v2.3H180.4z" /><path class="st0" d="M427.7 446.2H181v-90.4h-2v92.5h250.7v-92.5h-2v90.4z" /><path class="st0" d="M405.1 355.7h2v91.5h-2zm-22.7 0h2.1v91.5h-2.1zm-22.6 0h2v91.5h-2zm-22.6 0h2v91.5h-2zm-22.6 0h2v91.5h-2zm-22.6 0h2v91.5h-2zm-22.6 0h2v91.5h-2zm-22.6 0h2v91.5h-2zm-22.6 0h2v91.5h-2zm-22.6 0h2.1v91.5h-2.1z" /><path class="st0" d="M179 355.7h250.7v2H179zm1 22.7h248.7v2H180zm0 22.6h248.7v2H180zm0 22.6h248.7v2H180z" /><path class="st2" d="M203.6 396.2h16.2v50.1h-16.2zm45.2-10.4H265v60.5h-16.2zm45.3 24.7h16.2v35.8h-16.2zm45.2-36.8h16.2v72.6h-16.2zm45.2 19.6h16.2v53h-16.2z" /><path class="st6" d="M201.6 396.2h16.2v50.1h-16.2zm45.2-10.4H263v60.5h-16.2zm45.2 24.7h16.2v35.8H292zm45.2-36.8h16.2v72.6h-16.2zm45.3 19.6h16.2v53h-16.2z" /><path class="st0" d="M179 471.1h250.7v2.1H179zM179 481.3h250.7v2.1H179zM179 491.6h250.7v2.1H179zM179 501.8h250.7v2.1H179z" /><path class="st6" d="M473.5 352.4c.9-5.5 5.4-9.8 10.9-10.6l-.2-5.1-.5-12.6c-14.7 1.2-26.4 12.7-27.9 27.2l12.6.8 5.1.3z" /><path class="st5" d="M491.1 366.7c-1.5.6-3.1.9-4.8.9-2.9 0-5.6-.9-7.7-2.5l-3.5 3.8-8.5 9.2c5.3 4.5 12.2 7.2 19.7 7.2 4.7 0 9.1-1 13-2.9l-5.9-11.1-2.3-4.6zm25.2-5.4-12.4-2.1c-1.2 4.6-4 8.4-7.9 10.9l5.9 11.1 2.7 5.2c8.8-5.1 15.3-13.8 17.5-24.1l-5.8-1z" /><path class="st6" d="m468.2 354.9-12.6-.8-5.9-.4v.9c0 10.1 4.1 19.3 10.7 25.9l4-4.3 8.5-9.2c-2.8-3.2-4.6-7.4-4.7-12.1z" /><path class="st4" d="m495.9 339.3-2.4 4.6c3.5 2.3 5.7 6.3 5.7 10.8v.8l5.1.9 12.4 2.1c.2-1.3.2-2.5.2-3.8 0-11.3-6.1-21.2-15.2-26.5l-5.8 11.1zm-8.9-2.7c2.3.1 4.4.6 6.4 1.4l5.8-11.2 2.7-5.2c-4.7-2.3-10-3.5-15.7-3.5l.2 5.9.6 12.6z" /><path class="st0" d="M446.7 407.2h78.4v3.9h-78.4zm0 34.3h3.9v3.9h-3.9zm7.7 0h70.7v3.9h-70.7z" /><path class="st4" d="M446.7 456.1h3.9v3.9h-3.9z" /><path class="st0" d="M454.4 456.1h70.7v3.9h-70.7z" /><path d="M446.7 470.8h3.9v3.9h-3.9z" style="fill:#6292ff" /><path class="st0" d="M454.4 470.8h70.7v3.9h-70.7z" /><path d="M446.7 485.4h3.9v3.9h-3.9z" style="fill:#da5544" /><path class="st0" d="M454.4 485.4h70.7v3.9h-70.7z" /><path class="st5" d="M446.7 500h3.9v3.9h-3.9z" /><path class="st0" d="M454.4 500h70.7v3.9h-70.7zm-7.7-82.3h78.4v13h-78.4z" /><path class="st3" d="M522.8 556.7c.3-.3.7-.5 1.1-.6.4-.1.8-.1 1.3-.1 1-.1 2-.3 2.9-.8.5-.3.9-.6 1.4-.8l2.9.1c.4.4.7 1 .8 1.6.1.5.1 1.1.1 1.6v.6h-10.8v-.6c0-.4 0-.8.3-1z" /><path class="st9" d="m532.7 551.2-.3 3.3-3-.1-.2-3z" /><path class="st3" d="M494 555.5c.3-.3.7-.4 1.1-.5.4 0 .8 0 1.3.1 1 .1 2.1-.1 3-.5.5-.2 1-.5 1.5-.6l2.9.4c.4.5.5 1.1.6 1.7.1.5 0 1.1-.1 1.6l-.1.6-10.7-1.2.1-.6c0-.4.1-.8.4-1z" /><path class="st4" d="M535.3 503.7c.6-11.4.5-27.5-2.6-36.6 0-.2-23.9 2-23.9 2l-5.6 22.9c-2 8.1-2.9 16.3-2.8 24.6l.3 34.4 4 .3 7.5-45.5c2.8-5.4 5.8-11.6 8.1-17.7l8.7 63.4 4-.2c0-.1 2.3-47.6 2.3-47.6z" /><path class="st9" d="m504.5 551.2-.7 3.2-2.9-.4.1-3z" /><path class="st10" d="M481.6 394.3c.7-.3 1.6 0 1.9.7 2 4 4.2 7.8 6.6 11.5 2.4 3.7 5 7.2 7.8 10.5s5.8 6.4 9.1 9.1c1.6 1.4 3.3 2.7 5 3.9.4.3.9.6 1.3.9l1.3.9c.9.6 1.8 1.1 2.7 1.7.3.2.5.4.8.6.2.2.4.5.6.7.3.5.6 1.1.7 1.8.3 1.3.1 2.7-.7 4-.8 1.3-2 2.1-3.3 2.3-.7.1-1.4.1-2.1 0-.3-.1-.7-.2-1-.3l-.9-.6c-.9-.7-1.8-1.5-2.7-2.3l-1.3-1.2c-.4-.4-.9-.8-1.3-1.2-1.7-1.6-3.4-3.4-4.9-5.1-3.1-3.5-6-7.3-8.5-11.2-2.5-3.9-4.7-8-6.6-12.2-1.9-4.2-3.6-8.4-5.1-12.7-.5-.7-.1-1.5.6-1.8z" /><path class="st2" d="m500.2 434.6 9.4 7.3c2.8 2.2 6.8 1.9 9-.9s1.8-7.2-1.1-9.4l-9.4-7.3-7.9 10.3z" /><path class="st2" d="M521.8 428.5c-9-.1-16 7.9-14.8 16.8l1.8 23.7c10 3.6 17.5 1.6 23.9-2l1.1-25.2c.7-7.1-4.9-13.2-12-13.3z" /><path class="st1" d="m531.8 433.5-.2.2c1 1.4 1.7 3 2 4.7h.3c-.3-1.7-1-3.4-2.1-4.9zm-9.9 37.3v.3c2.2-.2 4.4-.8 6.6-1.7l-.1-.2c-2.1.8-4.2 1.3-6.5 1.6zm5.1-41.3c-1.6-.8-3.4-1.2-5.2-1.2h-.2c-4.3 0-8.5 1.9-11.3 5.2-1.7 1.9-2.8 4.2-3.3 6.6l.3.1c1.5-6.6 7.4-11.6 14.5-11.5 1.9 0 3.6.5 5.2 1.2v-.4zM508.6 466c-.1 0-.2.1-.3.1l.2 3 .2.1c2.2.8 4.5 1.4 6.6 1.7v-.3c-2.1-.3-4.2-.8-6.5-1.7l-.2-2.9zm-1.8-20.6.9 12h.3l-.9-12h-.3z" /><path class="st3" d="M524 412.1s6.2 1.5 4.7 8.4c-1 4.6-4.4 7-9.2 7.8l4.5-16.2z" /><path class="st9" d="m517.5 423.7.5 7.1c2 1.2 4 1.1 5.9-.3l-.5-7.1-5.9.3z" /><path class="st10" d="m517.6 424.6.1 2.2c.9.5 1.9.7 3 .7h.2c1-.1 2-.5 2.7-1.2l-.1-2.1-5.9.4z" /><path class="st9" d="m514.6 415.4.4 5.3.1 1.2c.3 2.9 2.7 5.1 5.6 5.1.3 0 .6 0 .9-.1.1 0 .2-.1.3-.1h.1c.4-.2.8-.4 1.1-.8.7-.8 1.1-1.6 1.5-2.5.3-.7.6-1.5.8-2.2.2-.9.4-1.8.2-2.8l-.4-4.6-9-.7-1.6 2.2z" /><path class="st3" d="M523.9 414s-10.3.6-8.2 9.7c0 0-3.2-6.5.1-10.9 3.6-4.8 8.5-3.2 10.2-.9 1.7 2.3 3 6.1-1.8 8.9-.1-.1 1.5-3.5-.3-6.8z" /><path class="st9" d="M523.7 419.5c.1 1.2 1.1 2.1 2.3 2 1.2-.1 2.1-1.1 2-2.3-.1-1.2-1.1-2.1-2.3-2-1.2.1-2.1 1.1-2 2.3z" /><path class="st3" d="m503.8 450.8-7.4-8c4.5-4.2 6.9-9.8 6.9-15.9h10.9c0 9.1-3.8 17.8-10.4 23.9z" /><path class="st4" d="M514.2 427h-10.9c0-12-9.7-21.7-21.7-21.7-2.6 0-5.1.4-7.5 1.3l-3.8-10.2c3.6-1.3 7.4-2 11.3-2 18-.1 32.6 14.6 32.6 32.6z" /><path class="st2" d="M481.6 459.6c-18 0-32.6-14.6-32.6-32.6 0-13.6 8.6-25.9 21.4-30.6l3.8 10.2c-8.5 3.1-14.2 11.3-14.2 20.4 0 12 9.7 21.7 21.7 21.7 5.5 0 10.8-2.1 14.8-5.8l7.4 8c-6.1 5.6-14 8.7-22.3 8.7z" /><path class="st9" d="M471.1 455.3c0-.8.5-1.5 1.3-1.5 4.4-.5 8.8-1.1 13.1-2.1 4.3-.9 8.5-2.1 12.6-3.5 4.1-1.5 8-3.2 11.8-5.2 1.9-1 3.7-2.1 5.5-3.3.4-.3.9-.6 1.3-.9l1.3-.9c.8-.6 1.7-1.2 2.5-1.9.3-.2.6-.4.8-.5l.9-.3c.6-.1 1.3-.1 1.9 0 1.3.2 2.6.9 3.5 2.1.9 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 2.4.2 4.8.4 7.1.4 2.4.1 4.7.1 7 .1 1 0 1.7-.6 1.7-1.3z" /><path class="st3" d="m190.5 450.4-6.3-10c-1.9-3-1.3-7 1.8-8.9 3-1.9 7.3-1.1 9.2 2l6.3 10-11 6.9z" /><path class="st9" d="m181.4 505.2 8.3 49.2 2.9-.5.8-49.1z" /><path class="st4" d="m194.2 504.7-13.6.5c-3.7-9-6.9-28.9-3.1-38.1l15.2 3.4 1.5 34.2z" /><circle transform="rotate(-16.739 184.847 470.406)" class="st4" cx="184.8" cy="470.4" r="7.9" /><path class="st9" d="m165.9 503.2-4.8 50.2 3 .2 13.5-47.8z" /><path class="st4" d="M180.4 462.7c-3.2-1-6.5.2-8.5 2.7-.1.2-.3.4-.4.6-5.7 8.3-7.5 27.6-6.3 37l13.2 3 7.3-33.4c1.3-4.2-1.1-8.6-5.3-9.9z" /><path class="st2" d="m180.4 497.1-1.9 8.9-2.2-.5v.3l2.4.5 2-9.1-.3-.1zm-11.9-25.8c-1.3 3.5-2.4 7.8-3.1 12.8v.3h.3c.6-4.6 1.7-9.1 3.1-12.9l-.3-.2zm-3.9 23.7h.3c0-2.2.2-4.5.4-6.8h-.3c-.3 2.3-.4 4.6-.4 6.8zm.6 8c-.2-1.3-.3-2.8-.3-4.4h-.3c.1 1.6.2 3.1.3 4.4v.2l8 1.8.1-.2-7.8-1.8zm18.6-21.8-1.7 7.9h.3l1.7-7.9h-.3z" /><path class="st3" d="M170.4 556.6c-.2-.4-.6-.6-1-.7-.4-.1-.8-.1-1.2-.2-1-.2-2-.6-2.8-1.2-.4-.3-.8-.7-1.3-.9l-2.9-.3c-.4.4-.8.9-1 1.5-.2.5-.2 1.1-.3 1.6l-.1.6 10.7 1.2.1-.6c.1-.3 0-.7-.2-1zm29.1-1.5c-.3-.3-.7-.4-1.2-.4-.4 0-.8.1-1.3.1-1 .1-2.1 0-3-.4l-1.5-.6-2.9.5c-.3.5-.5 1.1-.5 1.7 0 .5 0 1.1.1 1.6l.1.6 10.7-1.6-.1-.6c0-.3-.1-.6-.4-.9zM182 428.8c9 .1 15.8 8.2 14.4 17.1l-3.6 24c-6.5 2.3-15.6 1.5-23.1-.7v-27.4c-.5-7.1 5.2-13.1 12.3-13z" /><path class="st1" d="M169.4 457.4v10.4h.3v-10.4h-.3zm12.6-28.8h-.1c-.4 0-.8 0-1.2.1v.3c.4 0 .8-.1 1.3-.1 2.1 0 4 .5 5.8 1.2l.1-.2c-1.8-.9-3.8-1.3-5.9-1.3zm11.3 5.3c-.8-.9-1.7-1.8-2.7-2.5l-.2.2c3.7 2.7 6.1 7.1 6.1 11.9 0 .8-.1 1.6-.2 2.4l-.8 5.3.3.1.8-5.3c.7-4.4-.5-8.8-3.3-12.1zm-.6 36c-5.9 2.1-13.9 1.6-20.9-.1v.3c4 1 8.1 1.5 11.8 1.5 3.5 0 6.6-.5 9.2-1.4l.1-.1 2.1-13.8h-.3l-2 13.6zm-16.9-39.5-.1-.3c-1.1.6-2.1 1.4-2.9 2.3-2.4 2.5-3.6 5.9-3.3 9.3v6.4h.3v-6.4c-.4-4.7 2.1-9 6-11.3z" /><path class="st9" d="m186.2 424.7-.4 7.3c-2.1 1.1-4 1-5.9-.4l.4-7.3 5.9.4z" /><path class="st10" d="M186.1 426.9v.8c-.9.5-2 .7-3.1.7h-.2c-1-.1-1.9-.5-2.6-1.2l.1-2.1 5.8 1.8z" /><path class="st9" d="m189.3 416.4-.5 5.2-.1 1.2c-.3 2.9-2.8 5.1-5.7 5-.3 0-.6-.1-.9-.1-.1 0-.2-.1-.3-.1h-.1c-.4-.2-.8-.5-1.1-.8-.6-.8-1-1.6-1.4-2.5-.3-.8-.6-1.5-.8-2.3-.2-.9-.3-1.8-.2-2.8l.2-3.6 9.3-1.5 1.6 2.3z" /><path class="st3" d="M189 424.6s0-3.1-.1-4.6c-.1-1.4-.4-2.8-1.5-2.6-2.1.4-2.9-1.4-2.9-1.4-.6 0-1.2.1-1.9.3-3.1.8-3.6 0-4-.5-.8 2.4-.5 5.5-.5 5.8 0 .1.1.3.1.4.2.8.5 1.5.8 2.3.3.7.6 1.4 1 2v.5c-2.2-.4-4.9-2.8-5.6-4.7-2.3-7.2 1.6-11.5 7.1-12.6 4.8-.9 7.4 3.5 8.4 7.5.8 2.3-.3 7-.9 7.6z" /><path class="st9" d="M180.2 420.3c-.1 1.2-1.1 2.1-2.3 2-1.2-.1-2.1-1.1-2-2.3.1-1.2 1.1-2.1 2.3-2 1.2.1 2 1.1 2 2.3z" /><path transform="rotate(-180 274.437 454.01)" class="st2" d="M269 446.1h10.8V462H269z" /><path transform="rotate(-180 260.511 447.387)" class="st2" d="M255.1 432.8h10.8v29.1h-10.8z" /><path transform="rotate(-180 246.585 443.424)" class="st4" d="M241.2 424.9H252v37h-10.8z" /><path transform="rotate(-180 232.659 439.712)" class="st4" d="M227.2 417.5H238v44.4h-10.8z" /><path transform="rotate(-180 218.732 441.217)" class="st4" d="M213.3 420.5h10.8v41.4h-10.8z" /><path transform="rotate(-180 204.806 443.424)" class="st2" d="M199.4 424.9h10.8v37h-10.8z" /><path transform="rotate(-180 190.88 447.387)" class="st4" d="M185.5 432.8h10.8v29.1h-10.8z" /><path transform="rotate(-180 232.659 462.663)" class="st3" d="M183.1 461.9h99.2v1.5h-99.2z" /><path class="st9" d="M227.5 461.9c-.1-.8-.7-1.4-1.5-1.4h-6.9c-2.3-.1-4.6-.2-6.8-.4s-4.4-.6-6.4-1.1c-2-.6-3.9-1.3-5.7-2.4-3.5-2.1-6.5-5.1-9.3-8.5-.4-.4-.7-.8-1.1-1.3l-1-1.3c-.7-.9-1.4-1.8-2-2.7-1.4-1.8-2.7-3.7-4-5.6-1.7-2.3-5.1-2.8-7.4-.9-2.3 1.8-2.6 5.3-.6 7.5 1.6 1.7 3.2 3.4 4.9 5.2.8.9 1.7 1.7 2.5 2.6l1.3 1.3c.4.4.9.8 1.3 1.2 1.8 1.7 3.7 3.3 5.8 4.8 2.1 1.5 4.3 2.8 6.7 3.9 2.4 1 5 1.7 7.5 2 2.5.3 5 .4 7.4.3 2.4-.1 4.8-.3 7.1-.6s4.7-.6 7-.9c.7-.3 1.2-1 1.2-1.7z" /><path class="st3" d="m181.9 454.2-7.7-9c-2.3-2.7-2.2-6.7.5-9.1 2.7-2.3 7.1-2.1 9.4.7l7.7 9-9.9 8.4z" /><path class="st1" d="M179.6 434.3c-1.2-.1-2.3.1-3.4.6l.1.2c2.6-1.2 5.9-.6 7.8 1.7l.7.8.2-.2-.7-.8c-1.1-1.3-2.8-2.2-4.7-2.3zm12.2 11.6-8.1 6.8.2.2 8.3-7-4.4-5.2-.2.2 4.2 5zm-18-9.1c-1.8 2.1-1.9 5.2-.4 7.7l.2-.1c-1.4-2.3-1.4-5.3.3-7.4l-.1-.2zm7.4 17 .2-.2-3.7-4.4-.2.2 3.7 4.4z" /><path class="st3" d="M630.9 587.7H74.2c-1.6 0-2.9-1.3-2.9-2.9 0-1.6 1.3-2.9 2.9-2.9H631c1.6 0 2.9 1.3 2.9 2.9-.1 1.6-1.4 2.9-3 2.9z" /><path transform="rotate(-40.957 194.403 297.627)" class="st2" d="M179.5 288.7h29.7v17.7h-29.7z" /><path transform="rotate(-40.957 148.955 337.083)" class="st4" d="M103.6 323.8h90.6v26.6h-90.6z" /><path class="st4" d="M294.2 300.4c28.1-24.4 31.2-67.2 6.7-95.3-24.4-28.1-67.2-31.2-95.3-6.7-25.9 22.5-30.5 60.4-12.1 88.2 1.6 2.4 3.4 4.8 5.4 7.1 2 2.3 4.1 4.4 6.2 6.3 25 22.1 63.3 22.9 89.1.4zm-76.9-88.6c20.7-18 52.3-15.8 70.3 5s15.8 52.3-5 70.3-52.3 15.8-70.3-5-15.8-52.3 5-70.3z" /><path class="st2" d="M212.3 282.1c-18-20.8-15.8-52.3 5-70.3 20.7-18 52.3-15.8 70.3 5s15.8 52.3-5 70.3c-20.7 17.9-52.3 15.7-70.3-5z" style="opacity:.5" /><path class="st1" d="M263.6 217c.2-.4.4-.7.8-1 1-.8 2.5-.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-.2.3-.2.3-.4.7-.9 1.3-.9 1.3-.4.7c-.1.2-.3.4-.5.7l-1.8 2.6-.5.6c-.2.2-.3.4-.5.6l-1 1.3c-1.3 1.7-2.7 3.3-4.1 4.9-2.9 3.1-6 6.1-9.2 8.7l-.6.5-.6.5-1.3.9c-.4.3-.8.6-1.3.9-.4.3-.8.6-1.3.9-1.7 1.2-3.4 2.3-5 3.4-.5.4-1.3.3-1.9-.3-.3-.6-.3-1.4.2-1.9z" /><path class="st4" d="m383.8 465.5 5.6-12.2c1.7-3.7.4-8-3.3-9.7-3.7-1.7-8.4-.1-10 3.6l-5.6 12.2 13.3 6.1z" /><path class="st4" d="M389.8 435.7c-7.7 1.9-12.2 9.9-9.6 17.5l11.9 36.1c13.9 1.7 20.3-2.7 29.7-9.7l-12.4-33.5c-3-7.9-11.4-12.4-19.6-10.4z" /><path class="st1" d="M403.3 438.2c1.4 1 2.7 2.2 3.8 3.7l.3-.3c-1.1-1.4-2.4-2.7-3.8-3.7l-.3.3zm16 43.1.2.3c.8-.6 1.5-1.1 2.3-1.7l.2-.2-3.2-8.7-.4.1 3.1 8.5c-.6.5-1.4 1.1-2.2 1.7zm-27.6 8.3h.3c2.7.3 5.1.5 7.3.4l-.1-.4c-2.2.1-4.5 0-7.2-.3l-7-21.2-.4.1 7.1 21.4zm20.6-3.7c-1 .5-1.9 1-3 1.4l.2.4c1.1-.5 2.1-1 3.1-1.5l-.3-.3zm2.1-26 .4-.2-3-8-.4.2 3 8zm-32.6-.2.4-.1-2.1-6.5c-2.3-6.8 1.2-14.1 7.6-16.8.3-.1.6-.3 1-.4l-.2-.4-.9.3c-6.8 2.8-10.3 10.4-7.9 17.4l2.1 6.5z" /><path class="st4" d="M353.2 491.4c8.2 7.9 20.6 10.6 31.7 6l-11.3-26.9-20.4 20.9z" /><path class="st3" d="m373.6 470.4 29.2-1.4c-.2-3.3-.9-6.7-2.3-9.9-2.7-6.4-7.4-11.3-13.1-14.4l-13.8 25.7zm-11.4-26.9 11.3 26.9 13.9-25.7c-7.4-4-16.7-4.8-25.2-1.2z" /><path class="st3" d="m373.6 470.4 11.3 26.9c11.6-4.9 18.4-16.4 17.8-28.3l-29.1 1.4z" /><path class="st4" d="M346.7 481.8c1.6 3.7 3.8 7 6.6 9.6l20.4-21-29-3.4c-.7 4.9-.1 9.9 2 14.8z" /><path class="st9" d="M371.3 467.3c.5-.6 1.3-.7 1.9-.3 1.8 1.2 3.7 2.4 5.6 3.4.9.5 1.9 1 2.9 1.4 1 .4 1.9.8 2.9 1.1 1 .3 1.9.5 2.8.5h1.2c.4 0 .8-.1 1.1-.2.3-.1.6-.3.9-.4.3-.2.5-.4.8-.6.2-.2.5-.5.7-.8.2-.3.4-.6.6-1 .4-.7.7-1.6 1-2.5.3-.9.5-1.8.7-2.8.4-2 .6-4 .7-6.1.1-2.1.2-4.2.2-6.4 0-2.1-.1-4.3-.2-6.5 0-1.4.5-2.6 1.5-3.6.9-.9 2.2-1.5 3.7-1.5 1.4 0 2.7.6 3.7 1.6.9 1 1.4 2.3 1.3 3.7-.2 2.3-.4 4.6-.8 6.8-.3 2.3-.7 4.6-1.1 6.9-.5 2.3-1 4.6-1.8 7-.4 1.2-.8 2.3-1.4 3.5-.6 1.2-1.2 2.3-2 3.4-.4.6-.9 1.1-1.4 1.6-.5.5-1.1 1-1.7 1.4-.6.4-1.3.8-2.1 1.1-.7.3-1.5.5-2.2.6-.7.1-1.5.1-2.2.1h-.6l-.5-.1c-.3-.1-.7-.1-1-.2-1.3-.3-2.5-.7-3.6-1.2s-2.2-1.1-3.2-1.7c-1-.6-2-1.3-2.9-2-1.9-1.4-3.6-2.8-5.3-4.3-.6-.5-.7-1.3-.2-1.9z" /><path class="st4" d="m406.8 461.8.4-13.4c.1-4.1-2.8-7.6-6.8-7.7-4.1-.1-7.7 3.2-7.9 7.2l-.4 13.4 14.7.5z" /><path class="st1" d="M392.2 449.3h.4V448c0-.5.1-.9.2-1.4l-.4-.1c-.1.5-.2 1-.2 1.5v1.3zm11.3 12.8 3.7.1.1-4.1-.4-.1-.1 3.8-3.3-.1v.4zm3.7-11.4-.2 4.9h.4l.2-5-.4.1zm-12.7-7.9.4.1c1.5-1.4 3.4-2.2 5.5-2.2 1.7.1 3.3.7 4.4 1.8l.2-.3c-1.3-1.2-2.9-1.8-4.6-1.9-1.1 0-2.2.2-3.3.6-1 .5-1.9 1.1-2.6 1.9zm-2.6 15.2.4.1.1-3.4h-.4l-.1 3.3zm4.5 3.9 3.4.1v-.4l-3.3-.1-.1.4z" /><path class="st9" d="m383 434.5 4.8 8.4c2.5.2 4.3-.9 5.5-3.1l-4.8-8.4-5.5 3.1z" /><path class="st10" d="m383 434.5 2.2 3.8c.5-.1.9-.2 1.4-.4.1-.1.3-.1.4-.2 1.5-.9 2.5-2.4 2.8-4l-1.3-2.3-5.5 3.1z" /><path class="st9" d="m377.6 430.8 2.1 3.5.9 1.4c1.2 1.9 3.7 2.7 5.7 1.7.7-.3 1.3-.8 1.7-1.3.1-.1.2-.3.3-.4.1-.1.1-.2.2-.3.5-.9.8-1.8.7-2.9-.1-.9-.2-1.8-.3-2.8-.1-.6-.2-1.1-.3-1.7-.5-2.5-2.3-4.6-4.7-5.3-2.1-.6-4-.1-5.6 1.6-1.7 1.8-2 4.4-.7 6.5z" /><path class="st3" d="M385.7 429.1h-.8s0-3.2-.8-3.9c-1.2-1-4.5.3-5.9 1.4-.4.4-.7.7-.7 1.3.1 1.2.5 3.5 1.7 5.5 0 0-5-5.2-4.5-9.4.3-2.8.8-4.8 4.3-4.8 5.5 0 9.6 2.7 11.2 8.4l-3.5.2-1 1.3z" /><path class="st9" d="M385.9 429.5c.6 1 2 1.3 3.1.7s1.6-2 1-3c-.6-1-2-1.3-3.1-.7-1.2.6-1.6 2-1 3z" /><path class="st5" d="M305 499.7h70.1v58.6H305z" /><path class="st13" d="M281.2 499.7H305v58.6h-23.8z" /><path class="st13" d="m305 499.7-9.4 17.9h-26.2l11.8-17.9zm81 19.9-70 4.5-11-24.4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3l-3.1-1.7-1.5-.9-1.5-.8-3.1-1.7-3.1-1.6-1.6-.8-1.6-.8-3.2-1.5-3.2-1.4-1.6-.7c-.5-.2-1.1-.4-1.6-.7-17.2-7.2-35.7-11.2-54.3-11.9-18.6-.8-37.4 1.5-55.2 6.9-4.5 1.3-8.9 2.9-13.2 4.6-4.3 1.7-8.6 3.7-12.7 5.8-8.3 4.2-16.2 9.2-23.7 14.8-7.4 5.7-14.4 11.9-20.8 18.8-6.4 6.8-12.2 14.2-17.4 22-10.6 15.9-18.3 33.3-22.9 51.7zM658 370.2c6.5 13.9 10.3 29.1 11.5 44.5 1.1 15.4-.4 31.1-4.6 46.1-4.2 14.9-11.2 29.1-20.3 41.6-9.1 12.5-20.3 23.5-33.2 31.9 11.9-9.7 22.3-21 30.7-33.6 8.4-12.6 14.9-26.4 19-41 4.1-14.5 5.9-29.7 5.3-44.9-.4-15.1-3.3-30.2-8.4-44.6z" /><path class="st1" d="M639.8 422.2c.4 9.5-.9 19.2-3.6 28.3-1.4 4.6-3.1 9.1-5.2 13.4-2.1 4.3-4.6 8.5-7.3 12.4-2.8 3.9-5.9 7.6-9.2 11.1-3.4 3.4-7 6.6-10.9 9.4-7.7 5.7-16.4 10.1-25.5 12.9 8.8-3.5 17.1-8.3 24.6-14.1 3.7-2.9 7.2-6.1 10.5-9.5 3.3-3.4 6.3-7 9-10.9 2.7-3.8 5.1-7.9 7.3-12.1 2.1-4.2 3.9-8.6 5.4-13.1 2.9-8.8 4.5-18.2 4.9-27.8z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-member_balance"><path d="M983.8 312.7C958 251.7 921 197 874 150c-47-47-101.8-83.9-162.7-109.7C648.2 13.5 581.1 0 512 0S375.8 13.5 312.7 40.2C251.7 66 197 102.9 150 150c-47 47-83.9 101.8-109.7 162.7C13.5 375.8 0 442.9 0 512s13.5 136.2 40.2 199.3C66 772.3 102.9 827 150 874c47 47 101.8 83.9 162.7 109.7 63.1 26.7 130.2 40.2 199.3 40.2s136.2-13.5 199.3-40.2C772.3 958 827 921 874 874c47-47 83.9-101.8 109.7-162.7 26.7-63.1 40.2-130.2 40.2-199.3s-13.4-136.2-40.1-199.3zm-55.3 375.2c-22.8 53.8-55.4 102.2-96.9 143.7s-89.9 74.1-143.7 96.9C632.2 952.1 573 964 512 964s-120.2-11.9-175.9-35.5c-53.8-22.8-102.2-55.4-143.7-96.9s-74.1-89.9-96.9-143.7C71.9 632.2 60 573 60 512s11.9-120.2 35.5-175.9c22.8-53.8 55.4-102.2 96.9-143.7s89.9-74.1 143.7-96.9C391.8 71.9 451 60 512 60s120.2 11.9 175.9 35.5c53.8 22.8 102.2 55.4 143.7 96.9s74.1 89.9 96.9 143.7C952.1 391.8 964 451 964 512s-11.9 120.2-35.5 175.9z" /><path d="M706 469.1H574.7l84.2-180.6c7-15 .4-32.9-14.5-39.9-15-7-32.9-.4-39.9 14.5L512 461.5l-92.5-198.3c-7-15-24.9-21.5-39.9-14.5s-21.5 24.9-14.5 39.9l84.2 180.6H318c-16.5 0-30 13.5-30 30s13.5 30 30 30h164v64h-92.5c-20.6 0-37.5 13.5-37.5 30s16.9 30 37.5 30H482v95c0 16.5 13.5 30 30 30s30-13.5 30-30v-95h92.5c20.6 0 37.5-13.5 37.5-30s-16.9-30-37.5-30H542v-64h164c16.5 0 30-13.5 30-30 0-16.6-13.5-30.1-30-30.1z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-member_expenditure_balance"><path d="M510.72 962.56C262.4 960 61.44 757.76 64 509.44 66.56 263.68 264.96 65.28 510.72 62.72c17.92 0 34.56 14.08 34.56 32s-14.08 34.56-32 34.56h-2.56C299.52 130.56 128 300.8 128 512s171.52 382.72 382.72 382.72S893.44 723.2 893.44 512c0-17.92 16.64-33.28 34.56-32 17.92 0 32 15.36 32 32 0 248.32-200.96 450.56-449.28 450.56z" /><path d="M645.12 480H375.04c-17.92 0-34.56-14.08-34.56-32s14.08-34.56 32-34.56h272.64c17.92 0 33.28 16.64 32 34.56 0 17.92-14.08 32-32 32zm0 130.56H375.04c-17.92 0-33.28-16.64-32-34.56 0-17.92 15.36-32 32-32h270.08c17.92 0 33.28 16.64 32 34.56 0 16.64-14.08 32-32 32z" /><path d="M510.72 746.24c-17.92 0-33.28-15.36-33.28-33.28V441.6c0-17.92 16.64-33.28 34.56-32 17.92 0 32 15.36 32 32v270.08c0 19.2-15.36 34.56-33.28 34.56z" /><path d="M510.72 458.24c-8.96 0-17.92-3.84-24.32-10.24L375.04 336.64c-14.08-12.8-15.36-33.28-2.56-47.36s33.28-15.36 47.36-2.56l2.56 2.56 111.36 111.36c12.8 12.8 12.8 34.56 0 47.36-6.4 6.4-15.36 10.24-23.04 10.24z" /><path d="M510.72 458.24c-8.96 0-17.92-3.84-24.32-10.24-12.8-12.8-12.8-34.56 0-47.36l111.36-111.36c14.08-12.8 35.84-10.24 47.36 2.56 11.52 12.8 11.52 32 0 44.8L533.76 448c-6.4 6.4-15.36 10.24-23.04 10.24zm414.72-216.32c17.92 0 33.28-15.36 33.28-33.28 0-8.96-3.84-17.92-10.24-24.32L837.12 72.96c-12.8-14.08-33.28-14.08-47.36-1.28s-14.08 33.28-1.28 47.36l1.28 1.28 111.36 111.36c7.68 6.4 15.36 10.24 24.32 10.24z" /><path d="M815.36 353.28c8.96 0 17.92-3.84 24.32-10.24l111.36-111.36c12.8-14.08 10.24-35.84-2.56-47.36-12.8-11.52-32-11.52-44.8 0L792.32 295.68c-12.8 12.8-12.8 34.56 0 47.36 5.12 6.4 14.08 10.24 23.04 10.24z" /><path d="M920.32 241.92c17.92 0 34.56-14.08 34.56-32s-14.08-34.56-32-34.56H695.04c-17.92 0-33.28 16.64-32 34.56 0 17.92 15.36 32 32 32h225.28z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-member_level"><path d="m936.96 385.877-203.435-204.8-18.09-7.68h-406.87l-18.09 7.68-203.435 204.8c-9.728 9.899-9.899 25.942-.17 35.84l406.869 421.035c4.778 4.95 11.434 7.85 18.432 7.85 6.997 0 13.653-2.9 18.432-7.85l406.869-421.035c9.387-10.069 9.216-25.941-.512-35.84zm-68.437 3.755H726.528l-163.84-165.035h141.995l163.84 165.035zM319.317 224.768h143.019l-163.84 165.035H155.477l163.84-165.035zM176.47 440.832h132.608l18.091-7.51 185.173-186.538 185.174 186.539 18.09 7.509H847.19L512 787.968 176.47 440.832z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-member_point"><path d="M509.092 501.653c241.775 0 424.087-78.085 424.087-181.64 0-103.543-182.312-181.628-424.087-181.628S84.994 216.47 84.994 320.015c0 103.554 182.322 181.638 424.098 181.638zm0-317.432c222.909 0 378.252 71.562 378.252 135.793S732.002 455.818 509.092 455.818c-222.92 0-378.263-71.573-378.263-135.804s155.343-135.793 378.263-135.793z" /><path d="M509.084 694.062c241.115 0 422.937-77.599 422.937-180.483 0-27.17-13.128-52.454-36.241-75.131-.149-.154-.266-.32-.419-.469-.17-.167-.285-.346-.456-.51l-.115.125c-3.717-3.407-8.576-5.608-14.017-5.608-11.543 0-20.899 9.356-20.899 20.899 0 6.11 2.722 11.481 6.901 15.302l-.083.091c13.949 14.025 21.81 31.155 21.81 45.301 0 64.785-155.814 136.966-379.42 136.966-223.595 0-379.41-72.18-379.41-136.966 0-16.14 4.538-29.952 22.324-45.67.214-.205.43-.382.635-.595.137-.118.24-.233.379-.354l-.085-.08c3.417-3.72 5.623-8.59 5.623-14.038 0-11.543-9.356-20.9-20.899-20.9-5.77 0-10.993 2.341-14.773 6.12l-.123-.119c-23.408 22.798-36.595 48.278-36.595 75.636 0 102.883 181.821 180.483 422.926 180.483z" /><path d="M895.577 629.53c-.169-.165-.282-.343-.453-.508l-.115.125c-3.717-3.408-8.577-5.609-14.018-5.609-11.54 0-20.898 9.356-20.898 20.9 0 6.11 2.72 11.482 6.901 15.302l-.084.09c13.95 14.025 21.811 31.155 21.811 45.302 0 64.787-155.814 136.966-379.42 136.966-223.595 0-379.41-72.18-379.41-136.966 0-16.14 4.538-29.953 22.322-45.67.214-.203.43-.382.635-.595.137-.119.24-.233.379-.354l-.085-.081c3.417-3.72 5.623-8.589 5.623-14.038 0-11.543-9.356-20.899-20.898-20.899-5.77 0-10.993 2.34-14.773 6.12l-.123-.119c-23.41 22.797-36.595 48.279-36.595 75.636 0 102.884 181.821 180.482 422.927 180.482 241.114 0 422.935-77.598 422.935-180.482 0-27.167-13.126-52.453-36.235-75.127-.152-.158-.272-.324-.426-.475z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-member_recharge_balance"><path d="M512 750.51c-19.08 0-31.801-12.721-31.801-31.802V432.497c0-19.08 12.72-31.801 31.801-31.801s31.801 12.72 31.801 31.8v286.212c-6.36 19.08-19.08 31.801-31.801 31.801z" /><path d="M651.925 534.26h-286.21c-19.081 0-31.802-12.72-31.802-31.8 0-19.081 12.72-31.802 31.801-31.802h286.211c19.081 0 31.802 12.72 31.802 31.802 0 19.08-12.72 31.8-31.802 31.8zM651.925 648.745h-286.21c-19.081 0-31.802-12.72-31.802-31.8 0-19.082 12.72-31.802 31.801-31.802h286.211c19.081 0 31.802 12.72 31.802 31.801 0 19.08-12.72 31.801-31.802 31.801zM512 464.298c-6.36 0-19.08 0-25.441-6.36L352.994 324.373c-12.72-12.72-12.72-31.802 0-44.522 12.72-12.72 31.801-12.72 44.522 0L531.08 413.416c12.72 12.72 12.72 31.801 0 44.522-6.36 6.36-12.72 6.36-19.081 6.36z" /><path d="M512 464.298c-6.36 0-19.08 0-25.441-6.36-12.72-12.72-12.72-31.801 0-44.522l133.565-133.565c12.72-12.72 31.801-12.72 44.522 0 12.72 12.72 12.72 31.801 0 44.522L531.081 457.938c-6.36 6.36-12.72 6.36-19.081 6.36z" /><path d="M512 1017.64c-279.85 0-508.82-228.97-508.82-508.82S232.15 0 512 0s508.82 228.969 508.82 508.82c0 25.44 0 50.882-6.36 82.683 0 19.08-19.081 31.801-38.162 25.441-19.08 0-31.801-19.08-25.44-38.161 6.36-25.441 6.36-44.522 6.36-69.963C957.217 260.77 760.05 63.602 512 63.602S66.783 267.13 66.783 515.18 263.95 960.398 512 960.398c25.441 0 57.242 0 82.683-6.36 19.081-6.361 31.801 6.36 38.162 25.44 6.36 19.081-6.36 31.802-25.441 38.162H512z" /><path d="M989.019 864.994H671.006c-19.08 0-31.801-12.72-31.801-31.801s12.72-31.802 31.801-31.802H989.02c19.08 0 31.8 12.72 31.8 31.802s-19.08 31.8-31.8 31.8z" /><path d="M830.012 1024c-19.08 0-31.8-12.72-31.8-31.801V674.186c0-19.08 12.72-31.8 31.8-31.8s31.802 12.72 31.802 31.8V992.2c0 12.72-19.081 31.801-31.802 31.801z" /></symbol><symbol viewBox="0 0 128 128" id="icon-message"><path d="M0 20.967v59.59c0 11.59 8.537 20.966 19.075 20.966h28.613l1 26.477L76.8 101.523h32.125c10.538 0 19.075-9.377 19.075-20.966v-59.59C128 9.377 119.463 0 108.925 0h-89.85C8.538 0 0 9.377 0 20.967zm82.325 33.1c0-5.524 4.013-9.935 9.037-9.935 5.026 0 9.038 4.41 9.038 9.934 0 5.524-4.025 9.934-9.038 9.934-5.024 0-9.037-4.41-9.037-9.934zm-27.613 0c0-5.524 4.013-9.935 9.038-9.935s9.037 4.41 9.037 9.934c0 5.524-4.025 9.934-9.037 9.934-5.025 0-9.038-4.41-9.038-9.934zm-27.1 0c0-5.524 4.013-9.935 9.038-9.935s9.038 4.41 9.038 9.934c0 5.524-4.026 9.934-9.05 9.934-5.013 0-9.025-4.41-9.025-9.934z" /></symbol><symbol viewBox="0 0 128 128" id="icon-money"><path d="M54.122 127.892v-28.68H7.513V87.274h46.609v-12.4H7.513v-12.86h38.003L.099 0h22.6l32.556 45.07c3.617 5.144 6.44 9.611 8.487 13.385 1.788-3.05 4.89-7.779 9.301-14.186L103.93 0h24.01L82.385 62.013h38.34v12.862h-46.41v12.4h46.41v11.937h-46.41v28.68H54.123z" /></symbol><symbol viewBox="0 0 128 128" id="icon-peoples"><path d="M95.648 118.762c0 5.035-3.563 9.121-7.979 9.121H7.98c-4.416 0-7.979-4.086-7.979-9.121C0 100.519 15.408 83.47 31.152 76.75c-9.099-6.43-15.216-17.863-15.216-30.987v-9.128c0-20.16 14.293-36.518 31.893-36.518s31.894 16.358 31.894 36.518v9.122c0 13.137-6.123 24.556-15.216 30.993 15.738 6.726 31.141 23.769 31.141 42.012z" /><path d="M106.032 118.252h15.867c3.376 0 6.101-3.125 6.101-6.972 0-13.957-11.787-26.984-23.819-32.123 6.955-4.919 11.638-13.66 11.638-23.704v-6.985c0-15.416-10.928-27.926-24.39-27.926-1.674 0-3.306.193-4.89.561 1.936 4.713 3.018 9.974 3.018 15.526v9.121c0 13.137-3.056 23.111-11.066 30.993 14.842 4.41 27.312 23.42 27.541 41.509z" /></symbol><symbol viewBox="0 0 128 128" id="icon-shopping"><path d="M42.913 101.36c1.642 0 3.198.332 4.667.996a12.28 12.28 0 0 1 3.89 2.772c1.123 1.184 1.987 2.582 2.592 4.193.605 1.612.908 3.318.908 5.118 0 1.8-.303 3.507-.908 5.118-.605 1.611-1.469 3.01-2.593 4.194a13.3 13.3 0 0 1-3.889 2.843 10.582 10.582 0 0 1-4.667 1.066c-1.729 0-3.306-.355-4.732-1.066a13.604 13.604 0 0 1-3.825-2.843c-1.123-1.185-1.988-2.583-2.593-4.194a14.437 14.437 0 0 1-.907-5.118c0-1.8.302-3.506.907-5.118.605-1.61 1.47-3.009 2.593-4.193a12.515 12.515 0 0 1 3.825-2.772c1.426-.664 3.003-.996 4.732-.996zm53.932.285c1.643 0 3.22.331 4.733.995a11.386 11.386 0 0 1 3.889 2.772c1.08 1.185 1.945 2.583 2.593 4.194.648 1.61.972 3.317.972 5.118 0 1.8-.324 3.506-.972 5.117-.648 1.611-1.513 3.01-2.593 4.194a12.253 12.253 0 0 1-3.89 2.843 11 11 0 0 1-4.732 1.066 10.58 10.58 0 0 1-4.667-1.066 12.478 12.478 0 0 1-3.824-2.843c-1.08-1.185-1.945-2.583-2.593-4.194a13.581 13.581 0 0 1-.973-5.117c0-1.801.325-3.507.973-5.118.648-1.611 1.512-3.01 2.593-4.194a11.559 11.559 0 0 1 3.824-2.772 11.212 11.212 0 0 1 4.667-.995zm21.781-80.747c2.42 0 4.3.355 5.64 1.066 1.34.71 2.29 1.587 2.852 2.63a6.427 6.427 0 0 1 .778 3.34c-.044 1.185-.195 2.204-.454 3.057-.26.853-.8 2.606-1.62 5.26a589.268 589.268 0 0 1-2.788 8.743 1236.373 1236.373 0 0 0-3.047 9.453c-.994 3.128-1.75 5.592-2.269 7.393-1.123 3.79-2.55 6.42-4.278 7.89-1.728 1.469-3.846 2.203-6.352 2.203H39.023l1.945 12.795h65.342c4.148 0 6.223 1.943 6.223 5.828 0 1.896-.41 3.53-1.232 4.905-.821 1.374-2.442 2.061-4.862 2.061H38.505c-1.729 0-3.176-.426-4.343-1.28-1.167-.852-2.14-1.966-2.917-3.34a21.277 21.277 0 0 1-1.88-4.478 44.128 44.128 0 0 1-1.102-4.55c-.087-.568-.324-1.942-.713-4.122-.39-2.18-.865-4.904-1.426-8.174l-1.88-10.947c-.692-4.027-1.383-8.079-2.075-12.154-1.642-9.572-3.5-20.234-5.574-31.986H6.87c-1.296 0-2.377-.356-3.24-1.067a9.024 9.024 0 0 1-2.14-2.558 10.416 10.416 0 0 1-1.167-3.2C.108 8.53 0 7.488 0 6.54c0-1.896.583-3.46 1.75-4.69C2.917.615 4.494 0 6.482 0h13.095c1.728 0 3.111.284 4.148.853 1.037.569 1.858 1.28 2.463 2.132a8.548 8.548 0 0 1 1.297 2.701c.26.948.475 1.754.648 2.417.173.758.346 1.825.519 3.199.173 1.374.345 2.772.518 4.193.26 1.706.519 3.507.778 5.403h88.678z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-pay-icon-alipay_app"><path d="M938.7 669.525V249.412c0-90.555-73.522-164.079-164.146-164.079H249.378c-90.556 0-164.079 73.49-164.079 164.08v525.209c0 90.556 73.455 164.079 164.08 164.079h525.209c80.725 0 147.865-58.368 161.553-135.1-43.52-18.842-232.107-100.284-330.377-147.183-74.786 90.59-153.088 144.93-271.12 144.93S137.83 728.644 147.284 639.693c6.247-58.402 46.285-153.907 220.297-137.523 91.682 8.601 133.666 25.736 208.418 50.415 19.354-35.43 35.43-74.514 47.616-116.02H292.045v-32.87H456.09v-58.982H256V308.53h200.124v-85.197s1.809-13.312 16.52-13.312h82.057v98.475h213.333v36.181H554.701v58.983h174.046c-16.009 65.126-40.278 124.962-70.69 177.22 50.551 18.296 280.644 88.644 280.644 88.644zm-617.13 75.47c-124.723 0-144.452-78.746-137.83-111.651 6.553-32.734 42.666-75.503 112.025-75.503 79.668 0 151.04 20.446 236.715 62.089-60.177 78.404-134.11 125.064-210.91 125.064zm0 0" fill="#1296db" /></symbol><symbol class="icon" viewBox="0 0 1036 1024" id="icon-pay-icon-alipay_bar"><defs><style>@font-face{font-family:feedback-iconfont;src:url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.eot?#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff2) format("woff2"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff) format("woff"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.ttf) format("truetype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.svg#iconfont) format("svg")}</style></defs><path d="M27.587 336.62h69.148a13.979 13.979 0 0 0 13.793-13.98V13.99A13.979 13.979 0 0 0 96.735.01H27.587A13.979 13.979 0 0 0 13.795 13.99v308.65a13.979 13.979 0 0 0 13.792 13.98zm165.881 0h27.585a13.979 13.979 0 0 0 13.792-13.98V13.99A13.979 13.979 0 0 0 221.053.01h-27.585a13.979 13.979 0 0 0-13.792 13.979v308.65a13.979 13.979 0 0 0 13.792 13.98zm138.11 322.628H221.053a27.771 27.771 0 0 0-27.585 28.144v111.83a27.771 27.771 0 0 0 27.585 28.144h110.525a27.957 27.957 0 0 0 27.585-28.144v-111.83a27.957 27.957 0 0 0-27.585-28.144zM816.174 336.62h27.585a13.979 13.979 0 0 0 13.792-13.979V13.99A13.979 13.979 0 0 0 843.013.01H815.43a13.979 13.979 0 0 0-13.98 13.979v308.65a13.979 13.979 0 0 0 13.98 13.98zm-469.872 0h82.382a13.979 13.979 0 0 0 13.792-13.979V13.99A13.979 13.979 0 0 0 428.684.01h-83.127a13.979 13.979 0 0 0-13.793 13.979v308.65a13.979 13.979 0 0 0 13.793 13.98zm594.19 0h69.148a13.979 13.979 0 0 0 13.792-13.979V13.99A13.979 13.979 0 0 0 1008.894.01h-69.148a13.979 13.979 0 0 0-13.792 13.979v308.65a13.979 13.979 0 0 0 13.792 13.98zM528.212 462.8H66.914A67.47 67.47 0 0 0 .002 530.83v425.14A67.47 67.47 0 0 0 66.914 1024h418.803a67.47 67.47 0 0 0 66.911-68.03V487.776a24.789 24.789 0 0 0-24.416-24.976zm-58.338 433.9a42.682 42.682 0 0 1-42.495 43.055h-301.94A42.682 42.682 0 0 1 82.942 896.7V590.1a42.682 42.682 0 0 1 42.495-43.054h301.94a42.682 42.682 0 0 1 42.496 43.054zm525.228-433.9a41.75 41.75 0 0 0-41.377 42.123v55.915a41.377 41.377 0 1 0 82.94 0v-55.915a41.75 41.75 0 0 0-41.563-42.123zm0 223.66a41.75 41.75 0 0 0-41.377 42.123V894.65a45.477 45.477 0 0 1-45.291 45.85h-159.73a43.24 43.24 0 0 0-43.614 37.277A41.936 41.936 0 0 0 745.535 1024h233.538a57.779 57.779 0 0 0 57.406-58.338V729.328a41.75 41.75 0 0 0-41.377-41.936zM732.488 322.64V13.99A13.979 13.979 0 0 0 718.696.01h-82.94a13.979 13.979 0 0 0-13.793 13.979v308.65a13.979 13.979 0 0 0 13.792 13.98h82.94a13.979 13.979 0 0 0 13.793-13.98zM532.126.011c-11.37 0-20.688 6.337-20.688 13.979v308.65c0 7.828 9.319 13.98 20.688 13.98s20.689-6.338 20.689-13.98V13.99c0-7.642-9.32-13.979-20.689-13.979zM745.535 462.8a41.75 41.75 0 0 0-41.377 42.123v252.55a41.377 41.377 0 1 0 82.94 0v-252.55a41.75 41.75 0 0 0-41.563-42.123" fill="#1977FD" /></symbol><symbol class="icon" viewBox="0 0 1285 1024" id="icon-pay-icon-alipay_pc"><path d="M1141.76 855.04H855.04c0 40.96 30.72 71.68 71.68 71.68h107.52c20.48 0 35.84 15.36 35.84 35.84s-15.36 35.84-35.84 35.84H250.88c-20.48 0-35.84-15.36-35.84-35.84s15.36-35.84 35.84-35.84H358.4c40.96 0 71.68-30.72 71.68-71.68H143.36C66.56 855.04 0 793.6 0 711.68V143.36C0 66.56 61.44 0 143.36 0h993.28C1213.44 0 1280 61.44 1280 143.36v568.32c5.12 76.8-56.32 143.36-138.24 143.36zm71.68-711.68c0-40.96-30.72-71.68-71.68-71.68H148.48c-40.96 0-71.68 30.72-71.68 71.68v568.32c0 40.96 30.72 71.68 71.68 71.68h993.28c40.96 0 71.68-30.72 71.68-71.68V143.36zm-143.36 568.32H215.04c-40.96 0-71.68-30.72-71.68-71.68V215.04c0-40.96 30.72-71.68 71.68-71.68h855.04c40.96 0 71.68 30.72 71.68 71.68V640c0 40.96-30.72 71.68-71.68 71.68z" fill="#1977FD" /></symbol><symbol class="icon" viewBox="0 0 1115 1024" id="icon-pay-icon-alipay_qr"><defs><style>@font-face{font-family:feedback-iconfont;src:url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.eot?#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff2) format("woff2"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff) format("woff"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.ttf) format("truetype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.svg#iconfont) format("svg")}</style></defs><path d="M751.388 68.267a34.133 34.133 0 0 1 0-68.267h227.556a91.022 91.022 0 0 1 91.022 91.022v227.556a34.133 34.133 0 1 1-68.266 0V91.022a22.756 22.756 0 0 0-22.756-22.755H751.388M1001.7 705.422a34.133 34.133 0 0 1 68.266 0v227.556A91.022 91.022 0 0 1 978.944 1024H748.885a34.133 34.133 0 0 1 0-68.267H978.49a22.756 22.756 0 0 0 22.755-22.755V705.422M364.09 955.733a34.133 34.133 0 1 1 0 68.267H136.533a91.022 91.022 0 0 1-91.022-91.022V705.422a34.133 34.133 0 0 1 68.267 0v227.556a22.756 22.756 0 0 0 22.755 22.755H364.09M113.778 318.578a34.133 34.133 0 1 1-68.267 0V91.022A91.022 91.022 0 0 1 136.533 0H364.09a34.133 34.133 0 0 1 0 68.267H136.533a22.756 22.756 0 0 0-22.755 22.755v227.556M34.133 477.867a34.133 34.133 0 0 0 0 68.266h168.619v-68.266zm1046.756 0H912.27v68.266h168.619a34.133 34.133 0 0 0 0-68.266zM202.752 157.24h709.746v320.627H202.752zm0 388.893h709.746V866.76H202.752z" fill="#1977FD" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-pay-icon-alipay_wap"><path d="M768.3 0H255.7c-70.8 0-128.1 57.4-128.1 128.1v767.8c0 70.8 57.4 128.1 128.1 128.1h512.6c70.8 0 128.1-57.4 128.1-128.1V128.1C896.4 57.3 839 0 768.3 0zM383.9 96.1c0-17.7 14.3-32 32-32h192.2c17.7 0 32 14.3 32 32s-14.3 32-32 32H415.9c-17.7 0-32-14.3-32-32zM512 959.9c-35.4 0-64.1-28.8-64.1-64.1 0-35.4 28.7-64.1 64.1-64.1 35.4 0 64.1 28.7 64.1 64.1 0 35.3-28.7 64.1-64.1 64.1zm320.3-204.3c0 6.7-5.4 12.2-12.2 12.2H203.9c-6.7 0-12.2-5.4-12.2-12.2V204.3c0-6.7 5.4-12.2 12.2-12.2h616.3c6.7 0 12.2 5.4 12.2 12.2v551.3z" fill="#1977FD" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-pay-icon-mock"><path d="m173.077 362.667 91.115-214.678a65.6 65.6 0 0 1 86.016-34.773c11.584 4.907 24.96 10.283 40.896 16.448 8.277 3.2 16.79 6.464 27.904 10.667 28.203 10.709 39.296 14.933 46.144 17.642l51.477-51.669c28.182-28.16 74.112-27.947 102.571.533l195.925 195.926c16.427 16.426 23.446 38.634 21.056 59.904H896a42.667 42.667 0 0 1 42.667 42.666V896A42.667 42.667 0 0 1 896 938.667H128A42.667 42.667 0 0 1 85.333 896V405.333A42.667 42.667 0 0 1 128 362.667h45.077zm48.96 0h39.104l169.195-169.771-27.328-10.39c-11.2-4.245-19.819-7.53-28.224-10.794a1459.2 1459.2 0 0 1-42.197-17.003 20.523 20.523 0 0 0-26.902 10.88l-83.648 197.078zm108.843 0h454.955a23.51 23.51 0 0 0-5.291-25.323L584.619 141.419a23.36 23.36 0 0 0-33.024-.214L330.88 362.667zM128 405.333V896h768V405.333H128zm597.333 320a85.333 85.333 0 1 1 0-170.666 85.333 85.333 0 0 1 0 170.666zm0-42.666a42.667 42.667 0 1 0 0-85.334 42.667 42.667 0 0 0 0 85.334z" fill="#4296d5" /></symbol><symbol class="icon" viewBox="0 0 1115 1024" id="icon-pay-icon-wx_app"><defs><style>@font-face{font-family:feedback-iconfont;src:url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.eot?#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff2) format("woff2"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff) format("woff"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.ttf) format("truetype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.svg#iconfont) format("svg")}</style></defs><path d="M751.388 68.267a34.133 34.133 0 0 1 0-68.267h227.556a91.022 91.022 0 0 1 91.022 91.022v227.556a34.133 34.133 0 1 1-68.266 0V91.022a22.756 22.756 0 0 0-22.756-22.755H751.388M1001.7 705.422a34.133 34.133 0 0 1 68.266 0v227.556A91.022 91.022 0 0 1 978.944 1024H748.885a34.133 34.133 0 0 1 0-68.267H978.49a22.756 22.756 0 0 0 22.755-22.755V705.422M364.09 955.733a34.133 34.133 0 1 1 0 68.267H136.533a91.022 91.022 0 0 1-91.022-91.022V705.422a34.133 34.133 0 0 1 68.267 0v227.556a22.756 22.756 0 0 0 22.755 22.755H364.09M113.778 318.578a34.133 34.133 0 1 1-68.267 0V91.022A91.022 91.022 0 0 1 136.533 0H364.09a34.133 34.133 0 0 1 0 68.267H136.533a22.756 22.756 0 0 0-22.755 22.755v227.556M34.133 477.867a34.133 34.133 0 0 0 0 68.266h168.619v-68.266zm1046.756 0H912.27v68.266h168.619a34.133 34.133 0 0 0 0-68.266zM202.752 157.24h709.746v320.627H202.752zm0 388.893h709.746V866.76H202.752z" fill="#04C361" /></symbol><symbol class="icon" viewBox="0 0 1036 1024" id="icon-pay-icon-wx_bar"><defs><style>@font-face{font-family:feedback-iconfont;src:url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.eot?#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff2) format("woff2"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff) format("woff"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.ttf) format("truetype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.svg#iconfont) format("svg")}</style></defs><path d="M27.587 336.62h69.148a13.979 13.979 0 0 0 13.793-13.98V13.99A13.979 13.979 0 0 0 96.735.01H27.587A13.979 13.979 0 0 0 13.795 13.99v308.65a13.979 13.979 0 0 0 13.792 13.98zm165.881 0h27.585a13.979 13.979 0 0 0 13.792-13.98V13.99A13.979 13.979 0 0 0 221.053.01h-27.585a13.979 13.979 0 0 0-13.792 13.979v308.65a13.979 13.979 0 0 0 13.792 13.98zm138.11 322.628H221.053a27.771 27.771 0 0 0-27.585 28.144v111.83a27.771 27.771 0 0 0 27.585 28.144h110.525a27.957 27.957 0 0 0 27.585-28.144v-111.83a27.957 27.957 0 0 0-27.585-28.144zM816.174 336.62h27.585a13.979 13.979 0 0 0 13.792-13.979V13.99A13.979 13.979 0 0 0 843.013.01H815.43a13.979 13.979 0 0 0-13.98 13.979v308.65a13.979 13.979 0 0 0 13.98 13.98zm-469.872 0h82.382a13.979 13.979 0 0 0 13.792-13.979V13.99A13.979 13.979 0 0 0 428.684.01h-83.127a13.979 13.979 0 0 0-13.793 13.979v308.65a13.979 13.979 0 0 0 13.793 13.98zm594.19 0h69.148a13.979 13.979 0 0 0 13.792-13.979V13.99A13.979 13.979 0 0 0 1008.894.01h-69.148a13.979 13.979 0 0 0-13.792 13.979v308.65a13.979 13.979 0 0 0 13.792 13.98zM528.212 462.8H66.914A67.47 67.47 0 0 0 .002 530.83v425.14A67.47 67.47 0 0 0 66.914 1024h418.803a67.47 67.47 0 0 0 66.911-68.03V487.776a24.789 24.789 0 0 0-24.416-24.976zm-58.338 433.9a42.682 42.682 0 0 1-42.495 43.055h-301.94A42.682 42.682 0 0 1 82.942 896.7V590.1a42.682 42.682 0 0 1 42.495-43.054h301.94a42.682 42.682 0 0 1 42.496 43.054zm525.228-433.9a41.75 41.75 0 0 0-41.377 42.123v55.915a41.377 41.377 0 1 0 82.94 0v-55.915a41.75 41.75 0 0 0-41.563-42.123zm0 223.66a41.75 41.75 0 0 0-41.377 42.123V894.65a45.477 45.477 0 0 1-45.291 45.85h-159.73a43.24 43.24 0 0 0-43.614 37.277A41.936 41.936 0 0 0 745.535 1024h233.538a57.779 57.779 0 0 0 57.406-58.338V729.328a41.75 41.75 0 0 0-41.377-41.936zM732.488 322.64V13.99A13.979 13.979 0 0 0 718.696.01h-82.94a13.979 13.979 0 0 0-13.793 13.979v308.65a13.979 13.979 0 0 0 13.792 13.98h82.94a13.979 13.979 0 0 0 13.793-13.98zM532.126.011c-11.37 0-20.688 6.337-20.688 13.979v308.65c0 7.828 9.319 13.98 20.688 13.98s20.689-6.338 20.689-13.98V13.99c0-7.642-9.32-13.979-20.689-13.979zM745.535 462.8a41.75 41.75 0 0 0-41.377 42.123v252.55a41.377 41.377 0 1 0 82.94 0v-252.55a41.75 41.75 0 0 0-41.563-42.123" fill="#04C361" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-pay-icon-wx_lite"><path d="M608.6 290.3c67.1 0 121.7 50.5 121.7 112.9 0 19.4-5.6 38.4-15.7 55.5-15.3 25-39.8 43.5-69.4 52.3-7.9 2.3-13.9 3.2-19.4 3.2-13 0-23.1-10.2-23.1-23.1 0-13 10.2-23.1 23.1-23.1.9 0 2.8 0 5.1-.9 19.9-5.6 35.6-17.1 44.4-32.4 6-9.7 8.8-20.4 8.8-31.5 0-36.6-33.8-66.6-75-66.6-14.4 0-28.2 3.7-40.7 10.6-21.8 12.5-34.7 33.3-34.7 56v193.9c0 39.3-21.8 75.4-57.9 95.8-19.4 11.1-41.2 16.7-63.4 16.7-67.1 0-121.7-50.5-121.7-112.9 0-19.4 5.6-38.4 15.7-55.5 15.3-25 39.8-43.5 69.4-52.3 8.3-2.3 13.9-3.2 19.4-3.2 13 0 23.1 10.2 23.1 23.1 0 13-10.2 23.1-23.1 23.1-.9 0-2.8 0-5.1.9-19.9 6-35.6 17.6-44.4 32.4-6 9.7-8.8 20.4-8.8 31.5 0 36.6 33.8 66.6 75.4 66.6 14.4 0 28.2-3.7 40.7-10.6 21.8-12.5 34.7-33.3 34.7-56V403.3c0-39.3 21.8-75.4 57.9-95.8 19-11.6 40.7-17.2 63-17.2zM510.8 929c231.1 0 418.4-187.3 418.4-418.4S741.9 92.1 510.8 92.1 92.4 279.5 92.4 510.6 279.7 929 510.8 929zm0 22C267.5 951 70.3 753.8 70.3 510.6S267.5 70.1 510.8 70.1s440.5 197.2 440.5 440.5S754.1 951 510.8 951z" fill="#58bf6b" /></symbol><symbol class="icon" viewBox="0 0 1115 1024" id="icon-pay-icon-wx_native"><defs><style>@font-face{font-family:feedback-iconfont;src:url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.eot?#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff2) format("woff2"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff) format("woff"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.ttf) format("truetype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.svg#iconfont) format("svg")}</style></defs><path d="M751.388 68.267a34.133 34.133 0 0 1 0-68.267h227.556a91.022 91.022 0 0 1 91.022 91.022v227.556a34.133 34.133 0 1 1-68.266 0V91.022a22.756 22.756 0 0 0-22.756-22.755H751.388M1001.7 705.422a34.133 34.133 0 0 1 68.266 0v227.556A91.022 91.022 0 0 1 978.944 1024H748.885a34.133 34.133 0 0 1 0-68.267H978.49a22.756 22.756 0 0 0 22.755-22.755V705.422M364.09 955.733a34.133 34.133 0 1 1 0 68.267H136.533a91.022 91.022 0 0 1-91.022-91.022V705.422a34.133 34.133 0 0 1 68.267 0v227.556a22.756 22.756 0 0 0 22.755 22.755H364.09M113.778 318.578a34.133 34.133 0 1 1-68.267 0V91.022A91.022 91.022 0 0 1 136.533 0H364.09a34.133 34.133 0 0 1 0 68.267H136.533a22.756 22.756 0 0 0-22.755 22.755v227.556M34.133 477.867a34.133 34.133 0 0 0 0 68.266h168.619v-68.266zm1046.756 0H912.27v68.266h168.619a34.133 34.133 0 0 0 0-68.266zM202.752 157.24h709.746v320.627H202.752zm0 388.893h709.746V866.76H202.752z" fill="#04C361" /></symbol><symbol class="icon" viewBox="0 0 1260 1024" id="icon-pay-icon-wx_pub"><defs><style>@font-face{font-family:feedback-iconfont;src:url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.eot?#iefix) format("embedded-opentype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff2) format("woff2"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff) format("woff"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.ttf) format("truetype"),url(//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.svg#iconfont) format("svg")}</style></defs><path d="M797.148 481.753A269.194 269.194 0 0 0 900.04 269.824C900.04 120.99 779.03 0 630.157 0 481.283 0 360.274 120.99 360.274 269.824c0 85.878 40.33 162.462 102.912 211.929a450.974 450.974 0 0 0-153.344 101.021c-85.543 85.524-132.608 199.208-132.608 320.236 0 25.01 0 51.712.197 76.367a44.898 44.898 0 0 0 44.82 44.623h816.01a44.8 44.8 0 0 0 44.82-44.623V903.01c0-121.009-47.066-234.732-132.609-320.236a451.072 451.072 0 0 0-153.344-101.021z" fill="#04C361" /><path d="M1186.189 580.391a378.644 378.644 0 0 0-124.377-107.361 223.783 223.783 0 0 0 64.237-157.657c0-49.742-15.872-96.67-45.746-136.074A225.34 225.34 0 0 0 964.71 99.9a37.297 37.297 0 0 0-46.14 25.718c-5.592 19.89 5.79 40.724 25.6 46.356 63.114 18.196 107.363 77.135 107.363 143.4a148.913 148.913 0 0 1-81.23 133.06 38.065 38.065 0 0 0-20.363 36.608c1.32 15.203 11.58 28.16 25.975 32.65 125.479 39.601 209.703 155.038 209.703 287.173v63.074c0 20.638 16.62 37.534 37.16 37.711h.196a37.396 37.396 0 0 0 37.337-37.336V805.06c-.197-81.644-25.777-159.35-74.142-224.69zm-901.77-62.503a36.982 36.982 0 0 0 25.955-32.65 37.455 37.455 0 0 0-20.362-36.628 148.913 148.913 0 0 1-81.231-133.06c0-66.245 44.071-125.184 107.382-143.4a37.612 37.612 0 0 0 25.58-46.356 37.376 37.376 0 0 0-46.139-25.718 225.32 225.32 0 0 0-115.593 79.4 223.252 223.252 0 0 0-45.746 136.074c0 60.258 23.533 116.381 64.237 157.676A380.475 380.475 0 0 0 74.145 580.569 373.839 373.839 0 0 0 .002 805.258v63.232c0 20.657 16.798 37.356 37.356 37.356h.197a37.317 37.317 0 0 0 37.14-37.73V805.06c0-132.332 84.401-247.769 209.723-287.173z" fill="#04C361" /></symbol>',t.insertBefore(n,t.lastChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}const uJ=Object.freeze({left:0,top:0,width:16,height:16}),Uw=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),L3=Object.freeze({...uJ,...Uw}),JO=Object.freeze({...L3,body:"",hidden:!1});function cJ(e,t){const n=function(r,o){const i={};!r.hFlip!=!o.hFlip&&(i.hFlip=!0),!r.vFlip!=!o.vFlip&&(i.vFlip=!0);const a=((r.rotate||0)+(o.rotate||0))%4;return a&&(i.rotate=a),i}(e,t);for(const r in JO)r in Uw?r in e&&!(r in n)&&(n[r]=Uw[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function KOe(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function a(l){i=cJ(r[l]||o[l],i)}return a(t),n.forEach(a),cJ(e,i)}function YOe(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=function(o){const i=o.icons,a=o.aliases||Object.create(null),l=Object.create(null);return Object.keys(i).concat(Object.keys(a)).forEach(function s(u){if(i[u])return l[u]=[];if(!(u in l)){l[u]=null;const c=a[u]&&a[u].parent,d=c&&s(c);d&&(l[u]=[c].concat(d))}return l[u]}),l}(e);for(const o in r){const i=r[o];i&&(t(o,KOe(e,o,i)),n.push(o))}return n}const P3=/^[a-z0-9]+(-[a-z0-9]+)*$/,Em=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),s=o.pop(),u={provider:o.length>0?o[0]:r,prefix:s,name:l};return t&&!Ww(u)?null:u}const i=o[0],a=i.split("-");if(a.length>1){const l={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Ww(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:i};return t&&!Ww(l,n)?null:l}return null},Ww=(e,t)=>!!e&&!(e.provider!==""&&!e.provider.match(P3)||!(t&&e.prefix===""||e.prefix.match(P3))||!e.name.match(P3)),XOe={provider:"",aliases:{},not_found:{},...uJ};function ZO(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}const Gw=Object.create(null);function xc(e,t){const n=Gw[e]||(Gw[e]=Object.create(null));return n[t]||(n[t]=function(r,o){return{provider:r,prefix:o,icons:Object.create(null),missing:new Set}}(e,t))}function eT(e,t){return function(n){if(typeof n!="object"||n===null)return null;const r=n;if(typeof r.prefix!="string"||!n.icons||typeof n.icons!="object"||!ZO(n,XOe))return null;const o=r.icons;for(const a in o){const l=o[a];if(!a.match(P3)||typeof l.body!="string"||!ZO(l,JO))return null}const i=r.aliases||Object.create(null);for(const a in i){const l=i[a],s=l.parent;if(!a.match(P3)||typeof s!="string"||!o[s]&&!i[s]||!ZO(l,JO))return null}return r}(t)?YOe(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}let tT=!1;function j3(e){const t=typeof e=="string"?Em(e,!0,tT):e;if(t){const n=xc(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function dJ(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;return Ww({provider:t,prefix:n,name:"a"})?!!eT(xc(t,n),e):!1}const fJ=Object.freeze({width:null,height:null}),pJ=Object.freeze({...fJ,...Uw}),QOe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,JOe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function nT(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(QOe);if(r===null||!r.length)return e;const o=[];let i=r.shift(),a=JOe.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?o.push(i):o.push(Math.ceil(l*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");a=!a}}const ZOe=e=>e==="unset"||e==="undefined"||e==="none";function qw(e,t){const n={...L3,...e},r={...pJ,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(m=>{const v=[],g=m.hFlip,b=m.vFlip;let y,w=m.rotate;switch(g?b?w+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):b&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0),w<0&&(w-=4*Math.floor(w/4)),w%=4,w){case 1:y=o.height/2+o.top,v.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,v.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")")}w%2==1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),v.length&&(i='<g transform="'+v.join(" ")+'">'+i+"</g>")});const a=r.width,l=r.height,s=o.width,u=o.height;let c,d;a===null?(d=l===null?"1em":l==="auto"?u:l,c=nT(d,s/u)):(c=a==="auto"?s:a,d=l===null?nT(c,u/s):l==="auto"?u:l);const f={},p=(m,v)=>{ZOe(v)||(f[m]=v.toString())};return p("width",c),p("height",d),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+s.toString()+" "+u.toString(),{attributes:f,body:i}}const eTe=/\sid="(\S+)"/g,tTe="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let nTe=0;function hJ(e,t=tTe){const n=[];let r;for(;r=eTe.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(nTe++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),"")}const b0={local:!0,session:!0},vJ={local:new Set,session:new Set};let rT=!1;const mJ="iconify2",V3="iconify",gJ=V3+"-count",yJ=V3+"-version",bJ=36e5,rTe=168;function oT(e,t){try{return e.getItem(t)}catch{}}function iT(e,t,n){try{return e.setItem(t,n),!0}catch{}}function AJ(e,t){try{e.removeItem(t)}catch{}}function aT(e,t){return iT(e,gJ,t.toString())}function lT(e){return parseInt(oT(e,gJ))||0}let Kw=typeof window>"u"?{}:window;function wJ(e){const t=e+"Storage";try{if(Kw&&Kw[t]&&typeof Kw[t].length=="number")return Kw[t]}catch{}b0[e]=!1}function xJ(e,t){const n=wJ(e);if(!n)return;const r=oT(n,yJ);if(r!==mJ){if(r){const l=lT(n);for(let s=0;s<l;s++)AJ(n,V3+s.toString())}return iT(n,yJ,mJ),void aT(n,0)}const o=Math.floor(Date.now()/bJ)-rTe,i=l=>{const s=V3+l.toString(),u=oT(n,s);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>o&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,l))return!0}catch{}AJ(n,s)}};let a=lT(n);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,aT(n,a)):vJ[e].add(l))}function _J(){if(!rT){rT=!0;for(const e in b0)xJ(e,t=>{const n=t.data,r=xc(t.provider,n.prefix);if(!eT(r,n).length)return!1;const o=n.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,o):o,!0})}}function EJ(e,t){switch(e){case"local":case"session":b0[e]=t;break;case"all":for(const n in b0)b0[n]=t}}const sT=Object.create(null);function CJ(e,t){sT[e]=t}function uT(e){return sT[e]||sT[""]}function cT(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array&&t.length))return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Yw=Object.create(null),Xw=["https://api.simplesvg.com","https://api.unisvg.com"],dT=[];for(;Xw.length>0;)Xw.length===1||Math.random()>.5?dT.push(Xw.shift()):dT.push(Xw.pop());function SJ(e,t){const n=cT(t);return n!==null&&(Yw[e]=n,!0)}function Qw(e){return Yw[e]}Yw[""]=cT({resources:["https://api.iconify.design"].concat(dT)});let Jw=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();const oTe={prepare:(e,t,n)=>{const r=[],o=function(s,u){const c=Qw(s);if(!c)return 0;let d;if(c.maxURL){let f=0;c.resources.forEach(m=>{f=Math.max(f,m.length)});const p=u+".json?icons=";d=c.maxURL-f-c.path.length-p.length}else d=0;return d}(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((s,u)=>{l+=s.length+1,l>=o&&u>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},l=s.length),a.icons.push(s)}),r.push(a),r},send:(e,t,n)=>{if(!Jw)return void n("abort",424);let r=function(i){if(typeof i=="string"){const a=Qw(i);if(a)return a.path}return"/"}(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(",");r+=i+".json?"+new URLSearchParams({icons:a}).toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:return void n("abort",400)}let o=503;Jw(e+r).then(i=>{const a=i.status;if(a===200)return o=501,i.json();setTimeout(()=>{n(function(l){return l===404}(a)?"abort":"next",a)})}).then(i=>{setTimeout(typeof i=="object"&&i!==null?()=>{n("success",i)}:()=>{i===404?n("abort",i):n("next",o)})}).catch(()=>{n("next",o)})}};function kJ(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}let iTe=0;var aTe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function lTe(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let x=e.resources.slice(0);for(a=[];x.length>1;){const _=Math.floor(Math.random()*x.length);a.push(x[_]),x=x.slice(0,_).concat(x.slice(_+1))}a=a.concat(x)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let s,u="pending",c=0,d=null,f=[],p=[];function m(){d&&(clearTimeout(d),d=null)}function v(){u==="pending"&&(u="aborted"),m(),f.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),f=[]}function g(x,_){_&&(p=[]),typeof x=="function"&&p.push(x)}function b(){u="failed",p.forEach(x=>{x(void 0,s)})}function y(){f.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),f=[]}function w(){if(u!=="pending")return;m();const x=a.shift();if(x===void 0)return f.length?void(d=setTimeout(()=>{m(),u==="pending"&&(y(),b())},e.timeout)):void b();const _={status:"pending",resource:x,callback:(E,C)=>{(function(T,k,I){const O=k!=="success";switch(f=f.filter(F=>F!==T),u){case"pending":break;case"failed":if(O||!e.dataAfterTimeout)return;break;default:return}if(k==="abort")return s=I,void b();if(O)return s=I,void(f.length||(a.length?w():b()));if(m(),y(),!e.random){const F=e.resources.indexOf(T.resource);F!==-1&&F!==e.index&&(e.index=F)}u="completed",p.forEach(F=>{F(I)})})(_,E,C)}};f.push(_),c++,d=setTimeout(w,e.rotate),n(x,t,_.callback)}return typeof r=="function"&&p.push(r),setTimeout(w),function(){return{startTime:l,payload:t,status:u,queriesSent:c,queriesPending:f.length,subscribe:g,abort:v}}}function DJ(e){const t={...aTe,...e};let n=[];function r(){n=n.filter(i=>i().status==="pending")}return{query:function(i,a,l){const s=lTe(t,i,a,(u,c)=>{r(),l&&l(u,c)});return n.push(s),s},find:function(i){return n.find(a=>i(a))||null},setIndex:i=>{t.index=i},getIndex:()=>t.index,cleanup:r}}function OJ(){}const fT=Object.create(null);function TJ(e,t,n){let r,o;if(typeof e=="string"){const i=uT(e);if(!i)return n(void 0,424),OJ;o=i.send;const a=function(l){if(!fT[l]){const s=Qw(l);if(!s)return;const u={config:s,redundancy:DJ(s)};fT[l]=u}return fT[l]}(e);a&&(r=a.redundancy)}else{const i=cT(e);if(i){r=DJ(i);const a=uT(e.resources?e.resources[0]:"");a&&(o=a.send)}}return r&&o?r.query(t,o,n)().abort:(n(void 0,424),OJ)}function sTe(e,t){function n(r){let o;if(!b0[r]||!(o=wJ(r)))return;const i=vJ[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=lT(o),!aT(o,a+1))return;const l={cached:Math.floor(Date.now()/bJ),provider:e.provider,data:t};return iT(o,V3+a.toString(),JSON.stringify(l))}rT||_J(),t.lastModified&&!function(r,o){const i=r.lastModifiedCached;if(i&&i>=o)return i===o;if(r.lastModifiedCached=o,i)for(const a in b0)xJ(a,l=>{const s=l.data;return l.provider!==r.provider||s.prefix!==r.prefix||s.lastModified===o});return!0}(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&delete(t=Object.assign({},t)).not_found,n("local")||n("session"))}function MJ(){}function uTe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const n=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!n.length)return;let r=!1;const o=t.provider,i=t.prefix;n.forEach(a=>{const l=a.icons,s=l.pending.length;l.pending=l.pending.filter(u=>{if(u.prefix!==i)return!0;const c=u.name;if(t.icons[c])l.loaded.push({provider:o,prefix:i,name:c});else{if(!t.missing.has(c))return r=!0,!0;l.missing.push({provider:o,prefix:i,name:c})}return!1}),l.pending.length!==s&&(r||kJ([t],a.id),a.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),a.abort))})}))}(e)}))}const cTe=e=>{const t=xc(e.provider,e.prefix).pendingIcons;return!(!t||!t.has(e.name))},pT=(e,t)=>{const n=function(s,u=!0,c=!1){const d=[];return s.forEach(f=>{const p=typeof f=="string"?Em(f,u,c):f;p&&d.push(p)}),d}(e,!0,tT),r=function(s){const u={loaded:[],missing:[],pending:[]},c=Object.create(null);s.sort((f,p)=>f.provider!==p.provider?f.provider.localeCompare(p.provider):f.prefix!==p.prefix?f.prefix.localeCompare(p.prefix):f.name.localeCompare(p.name));let d={provider:"",prefix:"",name:""};return s.forEach(f=>{if(d.name===f.name&&d.prefix===f.prefix&&d.provider===f.provider)return;d=f;const p=f.provider,m=f.prefix,v=f.name,g=c[p]||(c[p]=Object.create(null)),b=g[m]||(g[m]=xc(p,m));let y;y=v in b.icons?u.loaded:m===""||b.missing.has(v)?u.missing:u.pending;const w={provider:p,prefix:m,name:v};y.push(w)}),u}(n);if(!r.pending.length){let s=!0;return t&&setTimeout(()=>{s&&t(r.loaded,r.missing,r.pending,MJ)}),()=>{s=!1}}const o=Object.create(null),i=[];let a,l;return r.pending.forEach(s=>{const{provider:u,prefix:c}=s;if(c===l&&u===a)return;a=u,l=c,i.push(xc(u,c));const d=o[u]||(o[u]=Object.create(null));d[c]||(d[c]=[])}),r.pending.forEach(s=>{const{provider:u,prefix:c,name:d}=s,f=xc(u,c),p=f.pendingIcons||(f.pendingIcons=new Set);p.has(d)||(p.add(d),o[u][c].push(d))}),i.forEach(s=>{const{provider:u,prefix:c}=s;o[u][c].length&&function(d,f){d.iconsToLoad?d.iconsToLoad=d.iconsToLoad.concat(f).sort():d.iconsToLoad=f,d.iconsQueueFlag||(d.iconsQueueFlag=!0,setTimeout(()=>{d.iconsQueueFlag=!1;const{provider:p,prefix:m}=d,v=d.iconsToLoad;let g;delete d.iconsToLoad,v&&(g=uT(p))&&g.prepare(p,m,v).forEach(b=>{TJ(p,b,y=>{if(typeof y!="object")b.icons.forEach(w=>{d.missing.add(w)});else try{const w=eT(d,y);if(!w.length)return;const x=d.pendingIcons;x&&w.forEach(_=>{x.delete(_)}),sTe(d,y)}catch(w){console.error(w)}uTe(d)})})}))}(s,o[u][c])}),t?function(s,u,c){const d=iTe++,f=kJ.bind(null,c,d);if(!u.pending.length)return f;const p={id:d,icons:u,callback:s,abort:f};return c.forEach(m=>{(m.loaderCallbacks||(m.loaderCallbacks=[])).push(p)}),f}(t,r,i):MJ};function NJ(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in fJ?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const Zw={...pJ,inline:!1},hT="iconify",vT="iconify-inline",If="iconifyData"+Date.now();let A0=[];function z3(e){for(let t=0;t<A0.length;t++){const n=A0[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function FJ(e,t=!1){let n=z3(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},A0.push(n),n)}function H3(){return A0}let $3=null;const dTe={childList:!0,subtree:!0,attributes:!0};function RJ(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,$3&&$3(e)}))}function fTe(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[If]!==void 0)return void(n.paused||RJ(e))}}function IJ(e,t){e.observer.instance.observe(t,dTe)}function e7(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;n&&window&&(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(fTe.bind(null,e)),IJ(e,n),t.paused||RJ(e))}function BJ(){H3().forEach(e7)}function LJ(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function pTe(e){const t=$3!==null;$3!==e&&($3=e,t&&H3().forEach(LJ)),t?BJ():function(n){const r=document;r.readyState&&r.readyState!=="loading"?n():r.addEventListener("DOMContentLoaded",n)}(BJ)}function mT(e){(e?[e]:H3()).forEach(t=>{if(!t.observer)return void(t.observer={paused:1});const n=t.observer;n.paused++,!(n.paused>1||!n.instance)&&n.instance.disconnect()})}function gT(e){(e?[e]:H3()).forEach(t=>{if(!t.observer)return void e7(t);const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(!r)return;n.instance?IJ(t,r):e7(t)}})}function PJ(e,t=!1){const n=FJ(e,t);return e7(n),n}function jJ(e){const t=z3(e);t&&(LJ(t),function(n){A0=A0.filter(r=>n!==r&&n!==(typeof r.node=="function"?r.node():r.node))}(e))}const hTe=/[\s,]+/,vTe=["width","height"],mTe=["inline","hFlip","vFlip"];function gTe(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&Em(t,!0);if(!n)return null;const r={...Zw,inline:e.classList&&e.classList.contains(vT)};vTe.forEach(l=>{const s=e.getAttribute("data-"+l);s&&(r[l]=s)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=function(l,s=0){const u=l.replace(/^-?[0-9.]*/,"");function c(d){for(;d<0;)d+=4;return d%4}if(u===""){const d=parseInt(l);return isNaN(d)?0:c(d)}if(u!==l){let d=0;switch(u){case"%":d=25;break;case"deg":d=90}if(d){let f=parseFloat(l.slice(0,l.length-u.length));return isNaN(f)?0:(f/=d,f%1==0?c(f):0)}}return s}(o));const i=e.getAttribute("data-flip");typeof i=="string"&&function(l,s){s.split(hTe).forEach(u=>{switch(u.trim()){case"horizontal":l.hFlip=!0;break;case"vertical":l.vFlip=!0}})}(r,i),mTe.forEach(l=>{const s="data-"+l,u=function(c,d){return c===d||c==="true"||c!==""&&c!=="false"&&null}(e.getAttribute(s),s);typeof u=="boolean"&&(r[l]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const yTe="svg."+hT+", i."+hT+", span."+hT+", i."+vT+", span."+vT;function VJ(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let U3;function bTe(e){return U3===void 0&&function(){try{U3=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{U3=null}}(),U3?U3.createHTML(e):e}function zJ(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function HJ(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(l=>{o.add(l)})}const i=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&i.push(a):(o.add(a),i.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),i}function $J(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const o=[];for(const i in t)r.getPropertyValue(i)||(o.push(i),r.setProperty(i,t[i]));return o}function UJ(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=qw(n,o),a=e[If],l=VJ(hJ(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=bTe(l);const s=r.childNodes[0],u=e.attributes;for(let p=0;p<u.length;p++){const m=u.item(p),v=m.name;v==="class"||s.hasAttribute(v)||s.setAttribute(v,m.value)}const c=HJ(s,zJ(t.icon),new Set(a&&a.addedClasses),e),d=$J(s,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),f={...t,status:"loaded",addedClasses:c,addedStyles:d};return s[If]=f,e.parentNode&&e.parentNode.replaceChild(s,e),s}const ATe={display:"inline-block"},yT={"background-color":"currentColor"},WJ={"background-color":"transparent"},GJ={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qJ={"-webkit-mask":yT,mask:yT,background:WJ};for(const e in qJ){const t=qJ[e];for(const n in GJ)t[e+"-"+n]=GJ[n]}function KJ(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}let t7=!1;function wTe(){t7||(t7=!0,setTimeout(()=>{t7&&(t7=!1,Cm())}))}function Cm(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:a,prefix:l,name:s}=o,u=xc(a,l),c=u.icons[s];if(c)return{status:"loaded",icon:c};if(u.missing.has(s))return{status:"missing"};if(i&&!cTe(o)){const d=n[a]||(n[a]=Object.create(null));(d[l]||(d[l]=new Set)).add(s)}return{status:"loading"}}(e?[e]:H3()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function s(u,c,d){if(l||(l=!0,mT(o)),u.tagName.toUpperCase()!=="SVG"){const f=c.mode,p=f==="mask"||f!=="bg"&&(f==="style"?d.body.indexOf("currentColor")!==-1:null);if(typeof p=="boolean")return void function(m,v,g,b){const y=v.customisations,w=qw(g,y),x=w.attributes,_=m[If],E=VJ(w.body,{...x,width:g.width+"",height:g.height+""}),C=HJ(m,zJ(v.icon),new Set(_&&_.addedClasses)),T=function(F){return'url("'+function(N){return"data:image/svg+xml,"+function(B){return B.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(N)}(F)+'")'}(E),k={"--svg":T,width:KJ(x.width),height:KJ(x.height),...ATe,...b?yT:WJ};y.inline&&(k["vertical-align"]="-0.125em");const I=$J(m,k,_&&_.addedStyles),O={...v,status:"loaded",addedClasses:C,addedStyles:I};m[If]=O}(u,c,{...L3,...d},p)}UJ(u,c,d)}(function(u){const c=[];return u.querySelectorAll(yTe).forEach(d=>{const f=d[If]||d.tagName.toLowerCase()!=="svg"?gTe(d):null;f&&c.push({node:d,props:f})}),c})(i).forEach(({node:u,props:c})=>{const d=u[If];if(!d){const{status:p,icon:m}=r(c.icon,!0);return m?void s(u,c,m):(a=a||p==="loading",void(u[If]={...c,status:p}))}let f;if(function(p,m){if(p.name!==m.name||p.mode!==m.mode)return!0;const v=p.customisations,g=m.customisations;for(const b in Zw)if(v[b]!==g[b])return!0;return!1}(d,c)){if(f=r(c.icon,d.name!==c.name),!f.icon)return a=a||f.status==="loading",void Object.assign(d,{...c,status:f.status})}else{if(d.status!=="loading")return;if(f=r(c.icon,!1),!f.icon)return void(d.status=f.status)}s(u,c,f.icon)}),o.temporary&&!a?jJ(i):t&&a?PJ(i,!0):l&&o.observer&&gT(o)});for(const o in n){const i=n[o];for(const a in i){const l=i[a];pT(Array.from(l).map(s=>({provider:o,prefix:a,name:s})),wTe)}}}function YJ(e,t,n=!1){const r=j3(e);if(!r)return null;const o=Em(e),i=NJ(Zw,t||{}),a=UJ(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?a.outerHTML:a}if(typeof document<"u"&&typeof window<"u"){(function(){if(document.documentElement)return FJ(document.documentElement);A0.push({node:()=>document.documentElement})})();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!dJ(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{pTe(Cm),Cm()})}if(CJ("",oTe),typeof document<"u"&&typeof window<"u"){_J();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;SJ(n,o)||console.error(r)}catch{console.error(r)}}}}const bT={_api:{getAPIConfig:Qw,setAPIModule:CJ,sendAPIQuery:TJ,setFetch:function(e){Jw=e},getFetch:function(){return Jw},listAPIProviders:function(){return Object.keys(Yw)}},addAPIProvider:SJ,loadIcons:pT,loadIcon:e=>new Promise((t,n)=>{const r=typeof e=="string"?Em(e,!0):e;r?pT([r||e],o=>{if(o.length&&r){const i=j3(r);if(i)return void t({...L3,...i})}n(e)}):n(e)}),iconExists:function(e){return!!j3(e)},getIcon:function(e){const t=j3(e);return t?{...L3,...t}:null},listIcons:function(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Gw)).forEach(r=>{(typeof r=="string"&&typeof t=="string"?[t]:Object.keys(Gw[r]||{})).forEach(o=>{const i=xc(r,o);n=n.concat(Object.keys(i.icons).map(a=>(r!==""?"@"+r+":":"")+o+":"+a))})}),n},addIcon:function(e,t){const n=Em(e,!0,tT);return!!n&&function(r,o,i){try{if(typeof i.body=="string")return r.icons[o]={...i},!0}catch{}return!1}(xc(n.provider,n.prefix),n.name,t)},addCollection:dJ,replaceIDs:hJ,calculateSize:nT,buildIcon:qw,getVersion:function(){return"3.1.1"},renderSVG:function(e,t){return YJ(e,t,!1)},renderHTML:function(e,t){return YJ(e,t,!0)},renderIcon:function(e,t){const n=j3(e);return n?qw(n,NJ(Zw,t||{})):null},scan:function(e){e?function(t){const n=z3(t);n?Cm(n):Cm({node:t,temporary:!0},!0)}(e):Cm()},observe:PJ,stopObserving:jJ,pauseObserver:function(e){if(e){const t=z3(e);t&&mT(t)}else mT()},resumeObserver:function(e){if(e){const t=z3(e);t&&gT(t)}else gT()},enableCache:function(e,t){EJ(e,t!==!1)},disableCache:function(e){EJ(e,!0)}};try{self.Iconify===void 0&&(self.Iconify=bT)}catch{}const XJ=bT.default||bT;JSON.parse('[{"prefix":"et","width":32,"height":32,"icons":{}},{"prefix":"el","width":1200,"height":1200,"icons":{}},{"prefix":"ps","width":512,"height":512,"icons":{}},{"prefix":"ep","width":1024,"height":1024,"icons":{"arrow-down":{"body":"<path fill=\\"currentColor\\" d=\\"M831.872 340.864L512 652.672L192.128 340.864a30.59 30.59 0 0 0-42.752 0a29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728a30.59 30.59 0 0 0-42.752 0z\\"/>"},"arrow-left":{"body":"<path fill=\\"currentColor\\" d=\\"M609.408 149.376L277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0a30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688a29.12 29.12 0 0 0-41.728 0\\"/>"},"arrow-right":{"body":"<path fill=\\"currentColor\\" d=\\"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512L340.864 831.872a30.59 30.59 0 0 0 0 42.752a29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z\\"/>"},"arrow-up":{"body":"<path fill=\\"currentColor\\" d=\\"m488.832 344.32l-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872l319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0\\"/>"},"avatar":{"body":"<path fill=\\"currentColor\\" d=\\"M628.736 528.896A416 416 0 0 1 928 928H96a415.87 415.87 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0a208 208 0 0 1 416 0\\"/>"},"back":{"body":"<path fill=\\"currentColor\\" d=\\"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64\\"/><path fill=\\"currentColor\\" d=\\"m237.248 512l265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z\\"/>"},"basketball":{"body":"<path fill=\\"currentColor\\" d=\\"M778.752 788.224a382.46 382.46 0 0 0 116.032-245.632a256.51 256.51 0 0 0-241.728-13.952a762.9 762.9 0 0 1 125.696 259.584m-55.04 44.224a699.65 699.65 0 0 0-125.056-269.632a256.13 256.13 0 0 0-56.064 331.968a382.7 382.7 0 0 0 181.12-62.336m-254.08 61.248A320.13 320.13 0 0 1 557.76 513.6a716 716 0 0 0-48.192-48.128a320.13 320.13 0 0 1-379.264 88.384a382.4 382.4 0 0 0 110.144 229.696a382.4 382.4 0 0 0 229.184 110.08zM129.28 481.088a256.13 256.13 0 0 0 331.072-56.448a699.65 699.65 0 0 0-268.8-124.352a382.66 382.66 0 0 0-62.272 180.8m106.56-235.84a762.9 762.9 0 0 1 258.688 125.056a256.51 256.51 0 0 0-13.44-241.088A382.46 382.46 0 0 0 235.84 245.248m318.08-114.944c40.576 89.536 37.76 193.92-8.448 281.344a780 780 0 0 1 66.176 66.112a320.83 320.83 0 0 1 282.112-8.128a382.4 382.4 0 0 0-110.144-229.12a382.4 382.4 0 0 0-229.632-110.208zM828.8 828.8a448 448 0 1 1-633.6-633.6a448 448 0 0 1 633.6 633.6\\"/>"},"bell":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64\\"/><path fill=\\"currentColor\\" d=\\"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320\\"/><path fill=\\"currentColor\\" d=\\"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0\\"/>"},"bell-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M640 832a128 128 0 0 1-256 0zm192-64H134.4a38.4 38.4 0 0 1 0-76.8H192V448c0-154.88 110.08-284.16 256.32-313.6a64 64 0 1 1 127.36 0A320.13 320.13 0 0 1 832 448v243.2h57.6a38.4 38.4 0 0 1 0 76.8z\\"/>"},"calendar":{"body":"<path fill=\\"currentColor\\" d=\\"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64\\"/>"},"caret-bottom":{"body":"<path fill=\\"currentColor\\" d=\\"m192 384l320 384l320-384z\\"/>"},"caret-top":{"body":"<path fill=\\"currentColor\\" d=\\"M512 320L192 704h639.936z\\"/>"},"cellphone":{"body":"<path fill=\\"currentColor\\" d=\\"M256 128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h512a128 128 0 0 1 128 128v640a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V192A128 128 0 0 1 256 64m128 128h256a32 32 0 1 1 0 64H384a32 32 0 0 1 0-64m128 640a64 64 0 1 1 0-128a64 64 0 0 1 0 128\\"/>"},"check":{"body":"<path fill=\\"currentColor\\" d=\\"M406.656 706.944L195.84 496.256a32 32 0 1 0-45.248 45.248l256 256l512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z\\"/>"},"checked":{"body":"<path fill=\\"currentColor\\" d=\\"M704 192h160v736H160V192h160.064v64H704zM311.616 537.28l-45.312 45.248L447.36 763.52l316.8-316.8l-45.312-45.184L447.36 673.024zM384 192V96h256v96z\\"/>"},"circle-check":{"body":"<path fill=\\"currentColor\\" d=\\"M512 896a384 384 0 1 0 0-768a384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896a448 448 0 0 1 0 896\\"/><path fill=\\"currentColor\\" d=\\"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z\\"/>"},"circle-close-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512L353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336L616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512L670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z\\"/>"},"circle-plus-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0z\\"/>"},"close":{"body":"<path fill=\\"currentColor\\" d=\\"M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z\\"/>"},"coin":{"body":"<path fill=\\"currentColor\\" d=\\"m161.92 580.736l29.888 58.88C171.328 659.776 160 681.728 160 704c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 615.808 928 657.664 928 704c0 129.728-188.544 224-416 224S96 833.728 96 704c0-46.592 24.32-88.576 65.92-123.264\\"/><path fill=\\"currentColor\\" d=\\"m161.92 388.736l29.888 58.88C171.328 467.84 160 489.792 160 512c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 423.808 928 465.664 928 512c0 129.728-188.544 224-416 224S96 641.728 96 512c0-46.592 24.32-88.576 65.92-123.264\\"/><path fill=\\"currentColor\\" d=\\"M512 544c-227.456 0-416-94.272-416-224S284.544 96 512 96s416 94.272 416 224s-188.544 224-416 224m0-64c196.672 0 352-77.696 352-160S708.672 160 512 160s-352 77.696-352 160s155.328 160 352 160\\"/>"},"comment":{"body":"<path fill=\\"currentColor\\" d=\\"M736 504a56 56 0 1 1 0-112a56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112a56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112a56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z\\"/>"},"copy-document":{"body":"<path fill=\\"currentColor\\" d=\\"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z\\"/><path fill=\\"currentColor\\" d=\\"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64\\"/>"},"cpu":{"body":"<path fill=\\"currentColor\\" d=\\"M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128\\"/><path fill=\\"currentColor\\" d=\\"M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32M64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32\\"/>"},"d-arrow-left":{"body":"<path fill=\\"currentColor\\" d=\\"M529.408 149.376a29.12 29.12 0 0 1 41.728 0a30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264a29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0a30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264a29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z\\"/>"},"d-arrow-right":{"body":"<path fill=\\"currentColor\\" d=\\"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0a30.59 30.59 0 0 1 0-42.752L764.736 512L452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0a30.59 30.59 0 0 1 0-42.752L508.736 512L196.864 192a30.59 30.59 0 0 1 0-42.688\\"/>"},"delete":{"body":"<path fill=\\"currentColor\\" d=\\"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32\\"/>"},"discount":{"body":"<path fill=\\"currentColor\\" d=\\"M224 704h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0L224 318.336zm0 64v128h576V768zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0\\"/><path fill=\\"currentColor\\" d=\\"M512 448a64 64 0 1 0 0-128a64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256a128 128 0 0 1 0 256\\"/>"},"document":{"body":"<path fill=\\"currentColor\\" d=\\"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z\\"/>"},"download":{"body":"<path fill=\\"currentColor\\" d=\\"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696l236.288-236.352l45.248 45.248L508.8 704L192 387.2l45.248-45.248L480 584.704V128h64z\\"/>"},"edit":{"body":"<path fill=\\"currentColor\\" d=\\"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z\\"/><path fill=\\"currentColor\\" d=\\"m469.952 554.24l52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z\\"/>"},"expand":{"body":"<path fill=\\"currentColor\\" d=\\"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352l192 160l-192 128z\\"/>"},"fold":{"body":"<path fill=\\"currentColor\\" d=\\"M896 192H128v128h768zm0 256H384v128h512zm0 256H128v128h768zM320 384L128 512l192 128z\\"/>"},"folder-opened":{"body":"<path fill=\\"currentColor\\" d=\\"M878.08 448H241.92l-96 384h636.16zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896\\"/>"},"help-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M926.784 480H701.312A192.51 192.51 0 0 0 544 322.688V97.216A416.064 416.064 0 0 1 926.784 480m0 64A416.064 416.064 0 0 1 544 926.784V701.312A192.51 192.51 0 0 0 701.312 544zM97.28 544h225.472A192.51 192.51 0 0 0 480 701.312v225.472A416.064 416.064 0 0 1 97.216 544zm0-64A416.064 416.064 0 0 1 480 97.216v225.472A192.51 192.51 0 0 0 322.688 480H97.216z\\"/>"},"hide":{"body":"<path fill=\\"currentColor\\" d=\\"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6s-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8c-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4s12.8 9.6 22.4 9.6s16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2c-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8c160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176\\"/><path fill=\\"currentColor\\" d=\\"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2c64 0 115.2-22.4 160-64c41.6-41.6 64-96 64-160c0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4c0 44.8-16 83.2-48 112s-67.2 48-112 48\\"/>"},"home-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M512 128L128 447.936V896h255.936V640H640v256h255.936V447.936z\\"/>"},"house":{"body":"<path fill=\\"currentColor\\" d=\\"M192 413.952V896h640V413.952L512 147.328zM139.52 374.4l352-293.312a32 32 0 0 1 40.96 0l352 293.312A32 32 0 0 1 896 398.976V928a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V398.976a32 32 0 0 1 11.52-24.576\\"/>"},"info-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296c-44.096 0-108.992 44.736-148.48 101.504c0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04c67.84 0 107.904-43.648 147.456-100.416z\\"/>"},"key":{"body":"<path fill=\\"currentColor\\" d=\\"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384a192 192 0 0 0 0 384\\"/>"},"list":{"body":"<path fill=\\"currentColor\\" d=\\"M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z\\"/>"},"lock":{"body":"<path fill=\\"currentColor\\" d=\\"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96\\"/><path fill=\\"currentColor\\" d=\\"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64\\"/>"},"memo":{"body":"<path fill=\\"currentColor\\" d=\\"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32\\"/><path fill=\\"currentColor\\" d=\\"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z\\"/><path fill=\\"currentColor\\" d=\\"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32\\"/>"},"menu":{"body":"<path fill=\\"currentColor\\" d=\\"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z\\"/>"},"message":{"body":"<path fill=\\"currentColor\\" d=\\"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64\\"/><path fill=\\"currentColor\\" d=\\"M904 224L656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0l210.56 240.704a128 128 0 0 0 192.704 0L818.944 224z\\"/>"},"minus":{"body":"<path fill=\\"currentColor\\" d=\\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64\\"/>"},"phone":{"body":"<path fill=\\"currentColor\\" d=\\"M79.36 432.256L591.744 944.64a32 32 0 0 0 35.2 6.784l253.44-108.544a32 32 0 0 0 9.984-52.032l-153.856-153.92a32 32 0 0 0-36.928-6.016l-69.888 34.944L358.08 394.24l35.008-69.888a32 32 0 0 0-5.952-36.928L233.152 133.568a32 32 0 0 0-52.032 10.048L72.512 397.056a32 32 0 0 0 6.784 35.2zm60.48-29.952l81.536-190.08L325.568 316.48l-24.64 49.216l-20.608 41.216l32.576 32.64l271.552 271.552l32.64 32.64l41.216-20.672l49.28-24.576l104.192 104.128l-190.08 81.472zM512 320v-64a256 256 0 0 1 256 256h-64a192 192 0 0 0-192-192m0-192V64a448 448 0 0 1 448 448h-64a384 384 0 0 0-384-384\\"/>"},"picture":{"body":"<path fill=\\"currentColor\\" d=\\"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32\\"/><path fill=\\"currentColor\\" d=\\"M384 288q64 0 64 64t-64 64t-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472l122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888l49.92 39.936l-215.808 269.824l-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072l-.64-.512a32 32 0 0 0-44.8 5.952z\\"/>"},"plus":{"body":"<path fill=\\"currentColor\\" d=\\"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z\\"/>"},"position":{"body":"<path fill=\\"currentColor\\" d=\\"m249.6 417.088l319.744 43.072l39.168 310.272L845.12 178.88zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992z\\"/>"},"promotion":{"body":"<path fill=\\"currentColor\\" d=\\"m64 448l832-320l-128 704l-446.08-243.328L832 192L242.816 545.472zm256 512V657.024L512 768z\\"/>"},"question-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352c-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992c13.376-19.712 35.2-28.864 66.176-28.864c23.936 0 42.944 6.336 56.32 19.712c12.672 13.376 19.712 31.68 19.712 54.912c0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408c-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76c6.336-12.672 15.488-24.64 28.16-35.2c33.792-29.568 54.208-48.576 60.544-55.616c16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784a49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72a51.97 51.97 0 0 0-15.488-38.016a55.94 55.94 0 0 0-39.424-14.784\\"/>"},"reading":{"body":"<path fill=\\"currentColor\\" d=\\"m512 863.36l384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36\\"/><path fill=\\"currentColor\\" d=\\"M480 192h64v704h-64z\\"/>"},"refresh":{"body":"<path fill=\\"currentColor\\" d=\\"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z\\"/>"},"refresh-left":{"body":"<path fill=\\"currentColor\\" d=\\"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88a384 384 0 0 1-383.936 384a384 384 0 0 1-384-384h64a320 320 0 1 0 640 0a320 320 0 0 0-555.712-216.448z\\"/>"},"refresh-right":{"body":"<path fill=\\"currentColor\\" d=\\"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384a384 384 0 0 1-384-384a384 384 0 0 1 643.712-282.88\\"/>"},"remove":{"body":"<path fill=\\"currentColor\\" d=\\"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64\\"/><path fill=\\"currentColor\\" d=\\"M512 896a384 384 0 1 0 0-768a384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896a448 448 0 0 1 0 896\\"/>"},"scale-to-original":{"body":"<path fill=\\"currentColor\\" d=\\"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512\\"/>"},"search":{"body":"<path fill=\\"currentColor\\" d=\\"m795.904 750.72l124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704a352 352 0 0 0 0 704\\"/>"},"select":{"body":"<path fill=\\"currentColor\\" d=\\"M77.248 415.04a64 64 0 0 1 90.496 0l226.304 226.304L846.528 188.8a64 64 0 1 1 90.56 90.496l-543.04 543.04l-316.8-316.8a64 64 0 0 1 0-90.496\\"/>"},"setting":{"body":"<path fill=\\"currentColor\\" d=\\"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088l-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36l-116.224-25.088l-65.28 113.152l79.68 88.192l-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136l-79.808 88.192l65.344 113.152l116.224-25.024l22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152l24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296l116.288 25.024l65.28-113.152l-79.744-88.192l1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136l79.808-88.128l-65.344-113.152l-116.288 24.96l-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384a192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256a128 128 0 0 0 0-256\\"/>"},"sort":{"body":"<path fill=\\"currentColor\\" d=\\"M384 96a32 32 0 0 1 64 0v786.752a32 32 0 0 1-54.592 22.656L95.936 608a32 32 0 0 1 0-45.312h.128a32 32 0 0 1 45.184 0L384 805.632zm192 45.248a32 32 0 0 1 54.592-22.592L928.064 416a32 32 0 0 1 0 45.312h-.128a32 32 0 0 1-45.184 0L640 218.496V928a32 32 0 1 1-64 0z\\"/>"},"suitcase":{"body":"<path fill=\\"currentColor\\" d=\\"M128 384h768v-64a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64zm0 64v320a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V448zm64-256h640a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H192A128 128 0 0 1 64 768V320a128 128 0 0 1 128-128\\"/><path fill=\\"currentColor\\" d=\\"M384 128v64h256v-64zm0-64h256a64 64 0 0 1 64 64v64a64 64 0 0 1-64 64H384a64 64 0 0 1-64-64v-64a64 64 0 0 1 64-64\\"/>"},"switch-button":{"body":"<path fill=\\"currentColor\\" d=\\"M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128\\"/><path fill=\\"currentColor\\" d=\\"M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32\\"/>"},"ticket":{"body":"<path fill=\\"currentColor\\" d=\\"M640 832H64V640a128 128 0 1 0 0-256V192h576v160h64V192h256v192a128 128 0 1 0 0 256v192H704V672h-64zm0-416v192h64V416z\\"/>"},"tools":{"body":"<path fill=\\"currentColor\\" d=\\"M764.416 254.72a351.7 351.7 0 0 1 86.336 149.184H960v192.064H850.752a351.7 351.7 0 0 1-86.336 149.312l54.72 94.72l-166.272 96l-54.592-94.72a352.64 352.64 0 0 1-172.48 0L371.136 936l-166.272-96l54.72-94.72a351.7 351.7 0 0 1-86.336-149.312H64v-192h109.248a351.7 351.7 0 0 1 86.336-149.312L204.8 160l166.208-96h.192l54.656 94.592a352.64 352.64 0 0 1 172.48 0L652.8 64h.128L819.2 160l-54.72 94.72zM704 499.968a192 192 0 1 0-384 0a192 192 0 0 0 384 0\\"/>"},"upload":{"body":"<path fill=\\"currentColor\\" d=\\"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048L192 444.8L508.8 128l316.8 316.8l-45.312 45.248z\\"/>"},"upload-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M544 864V672h128L512 480L352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.81 239.81 0 0 1 512 192a239.87 239.87 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z\\"/>"},"user":{"body":"<path fill=\\"currentColor\\" d=\\"M512 512a192 192 0 1 0 0-384a192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512a256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0\\"/>"},"video-play":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768a384 384 0 0 0 0 768m-48-247.616L668.608 512L464 375.616zm10.624-342.656l249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z\\"/>"},"view":{"body":"<path fill=\\"currentColor\\" d=\\"M512 160c320 0 512 352 512 352S832 864 512 864S0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288c52.608 79.872 211.456 288 436.8 288c225.28 0 384.128-208.064 436.8-288c-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448a224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160s-71.744-160-160-160\\"/>"},"wallet-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M688 512a112 112 0 1 0 0 224h208v160H128V352h768v160zm32 160h-32a48 48 0 0 1 0-96h32a48 48 0 0 1 0 96m-80-544l128 160H384z\\"/>"},"warning":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768a384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0a48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32\\"/>"},"warning-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4a51.2 51.2 0 0 0 0 102.4\\"/>"},"zoom-in":{"body":"<path fill=\\"currentColor\\" d=\\"m795.904 750.72l124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704a352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z\\"/>"},"zoom-out":{"body":"<path fill=\\"currentColor\\" d=\\"m795.904 750.72l124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704a352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64\\"/>"}}},{"prefix":"ion","width":512,"height":512,"icons":{"create":{"body":"<path fill=\\"currentColor\\" d=\\"M459.94 53.25a16.06 16.06 0 0 0-23.22-.56L424.35 65a8 8 0 0 0 0 11.31l11.34 11.32a8 8 0 0 0 11.34 0l12.06-12c6.1-6.09 6.67-16.01.85-22.38M399.34 90L218.82 270.2a9 9 0 0 0-2.31 3.93L208.16 299a3.91 3.91 0 0 0 4.86 4.86l24.85-8.35a9 9 0 0 0 3.93-2.31L422 112.66a9 9 0 0 0 0-12.66l-9.95-10a9 9 0 0 0-12.71 0\\"/><path fill=\\"currentColor\\" d=\\"M386.34 193.66L264.45 315.79A41.1 41.1 0 0 1 247.58 326l-25.9 8.67a35.92 35.92 0 0 1-44.33-44.33l8.67-25.9a41.1 41.1 0 0 1 10.19-16.87l122.13-121.91a8 8 0 0 0-5.65-13.66H104a56 56 0 0 0-56 56v240a56 56 0 0 0 56 56h240a56 56 0 0 0 56-56V199.31a8 8 0 0 0-13.66-5.65\\"/>"},"language-sharp":{"body":"<path fill=\\"currentColor\\" d=\\"M363 176L246 464h47.24l24.49-58h90.54l24.49 58H480Zm-26.69 186L363 279.85L389.69 362ZM272 320c-.25-.19-20.59-15.77-45.42-42.67c39.58-53.64 62-114.61 71.15-143.33H352V90H214V48h-44v42H32v44h219.25c-9.52 26.95-27.05 69.5-53.79 108.36c-32.68-43.44-47.14-75.88-47.33-76.22L143 152l-38 22l6.87 13.86c.89 1.56 17.19 37.9 54.71 86.57c.92 1.21 1.85 2.39 2.78 3.57c-49.72 56.86-89.15 79.09-89.66 79.47L64 368l23 36l19.3-11.47c2.2-1.67 41.33-24 92-80.78c24.52 26.28 43.22 40.83 44.3 41.67L255 362Z\\"/>"}}},{"prefix":"ls","width":717,"height":717,"icons":{"a":{"body":"<path fill=\\"currentColor\\" d=\\"M491 222v-94h72v526h-72v-74c-50 55-124 91-206 91C133 671 0 551 0 401s133-270 285-270c82 0 156 36 206 91m0 185v-12c-4-110-95-198-207-198c-115 0-215 91-215 204s100 204 215 204c112 0 203-88 207-198\\"/>","width":563,"height":671},"b":{"body":"<path fill=\\"currentColor\\" d=\\"M72 0v324c53-58 132-96 216-96c152 0 275 120 275 270S440 768 288 768c-84 0-163-38-216-96v82H0V0zm215 702c115 0 207-91 207-204s-92-204-207-204S72 385 72 498s100 204 215 204\\"/>","width":563,"height":768},"c":{"body":"<path fill=\\"currentColor\\" d=\\"m507 242l-56 39c-38-51-98-84-167-84c-70 0-134 34-174 85c-26 34-41 75-41 119s15 85 41 119c40 51 104 85 174 85c69 0 129-33 167-84l56 39c-50 68-131 111-222 111c-92 0-178-44-230-112C20 514 0 459 0 401s20-113 55-158c52-68 138-112 230-112c91 0 172 43 222 111\\"/>","width":507,"height":671},"d":{"body":"<path fill=\\"currentColor\\" d=\\"M490 324V0h72v754h-72v-82c-53 58-132 96-216 96C122 768 0 648 0 498s122-270 274-270c84 0 163 38 216 96M275 702c115 0 215-91 215-204S390 294 275 294c-114 0-207 91-207 204s93 204 207 204\\"/>","width":562,"height":768},"e":{"body":"<path fill=\\"currentColor\\" d=\\"M559 399H69v2c0 113 100 204 215 204c82 0 152-47 186-115l61 29c-44 90-137 152-246 152C133 671 0 551 0 401c0-42 11-82 29-117c47-91 147-153 256-153c130 0 238 89 267 208c4 19 7 40 7 60M80 339h400c-27-82-104-142-196-142c-82 0-158 47-194 116c-4 8-7 17-10 26\\"/>","width":559,"height":671},"f":{"body":"<path fill=\\"currentColor\\" d=\\"M255 5v78c-11-7-25-11-39-11c-39 0-70 31-71 70v86h110v60H145v466H73V288H0v-60h73v-84c0-53 29-99 72-124c22-12 45-20 71-20c14 0 27 2 39 5\\"/>","width":255,"height":754},"g":{"body":"<path fill=\\"currentColor\\" d=\\"M15 697h75c36 70 111 118 195 118c103 0 189-74 205-172c1-4 1-30 1-68c-50 57-124 93-207 93C132 668 0 548 0 398s132-270 284-270c82 0 156 36 207 92c-1-54-1-92-1-92h72v484c0 14-1 29-3 42c-22 129-136 227-273 227c-122 0-231-76-271-184m268-95c114 0 207-91 207-204s-93-204-207-204c-115 0-215 91-215 204s100 204 215 204\\"/>","width":562,"height":881},"h":{"body":"<path fill=\\"currentColor\\" d=\\"M72 0v292c42-40 109-64 171-64s110 24 152 64c44 42 71 102 71 168v294h-71V456c-3-87-64-157-152-157c-87 0-169 70-171 157v298H0V0z\\"/>","width":466,"height":754},"i":{"body":"<path fill=\\"currentColor\\" d=\\"M82 82H0V0h82zm-5 608H5V164h72z\\"/>","width":82,"height":690},"j":{"body":"<path fill=\\"currentColor\\" d=\\"M188 82h-82V0h82zm-77 694V164h73v610c0 53-30 99-73 124c-20 12-45 19-72 19c-13 0-27-2-39-5v-78c11 7 25 12 39 12c39 0 71-32 72-70\\"/>","width":188,"height":917},"l":{"body":"<path fill=\\"currentColor\\" d=\\"M0 754V0h72v754z\\"/>","width":72,"height":754},"m":{"body":"<path fill=\\"currentColor\\" d=\\"M71 128v64c42-40 109-64 171-64s110 24 152 64c13 13 26 28 36 44c41-66 124-108 207-108c62 0 108 24 150 64c45 42 73 102 73 168v294h-73V356c-2-87-62-157-150-157s-170 71-171 159v296h-72V356c-3-87-64-157-152-157c-87 0-169 70-171 157v298H0V128z\\"/>","width":860,"height":654},"n":{"body":"<path fill=\\"currentColor\\" d=\\"M72 128v64c42-40 109-64 171-64s109 24 151 64c44 42 72 102 72 168v294h-72V356c-2-87-64-157-151-157c-88 0-169 70-171 157v298H0V128z\\"/>","width":466,"height":654},"o":{"body":"<path fill=\\"currentColor\\" d=\\"M285 113c152 0 275 121 275 271S437 654 285 654S0 534 0 384s133-271 285-271m-1 474c114 0 207-90 207-203s-93-204-207-204c-115 0-215 91-215 204s100 203 215 203\\"/>","width":560,"height":654},"p":{"body":"<path fill=\\"currentColor\\" d=\\"M72 113v97c53-58 132-97 216-97c152 0 275 121 275 271S440 654 288 654c-84 0-163-38-216-96v309H0V113zm215 474c115 0 207-90 207-203s-92-204-207-204S72 271 72 384s100 203 215 203\\"/>","width":563,"height":867},"r":{"body":"<path fill=\\"currentColor\\" d=\\"M71 128v64c42-40 99-64 161-64c19 0 38 3 55 7v75c-17-6-36-11-55-11c-87 0-159 70-161 157v298H0V128z\\"/>","width":287,"height":654},"s":{"body":"<path fill=\\"currentColor\\" d=\\"m280 220l45-47c-50-49-101-74-151-74c-43 0-78 14-107 41c-28 28-42 62-42 103c0 32 9 59 26 85c17 25 52 49 101 75c45 24 75 42 88 57c13 16 19 35 19 55c0 24-11 45-30 63c-19 17-43 27-71 27c-40 0-78-21-114-61L0 595c18 24 42 43 71 56s58 20 90 20c47 0 85-15 117-46c32-32 48-69 48-113c0-32-10-60-28-86c-18-25-55-51-107-78c-43-22-71-42-84-58s-20-33-20-50c0-20 9-38 25-53c16-14 35-22 58-22c36 0 73 18 110 55\\"/>","width":326,"height":671},"t":{"body":"<path fill=\\"currentColor\\" d=\\"M164 228h91v60h-91v466H92V288H0v-60h92V0h72z\\"/>","width":255,"height":754},"u":{"body":"<path fill=\\"currentColor\\" d=\\"M394 654v-47c-42 40-110 64-172 64s-108-24-150-64C28 564 0 505 0 439V128h72v315c2 87 63 157 150 157c88 0 169-70 172-157V128h72v526z\\"/>","width":466,"height":671},"v":{"body":"<path fill=\\"currentColor\\" d=\\"m249 495l169-367h79L249 667L0 128h79z\\"/>","width":497,"height":667},"x":{"body":"<path fill=\\"currentColor\\" d=\\"M519 128L315 380l222 274h-93L269 437L93 654H0l223-274L19 128h93l157 194l156-194z\\"/>","width":537,"height":654},"y":{"body":"<path fill=\\"currentColor\\" d=\\"m249 494l169-366h78L149 881H69l140-301L0 128h79z\\"/>","width":496,"height":881}}},{"prefix":"bx","width":24,"height":24,"icons":{}},{"prefix":"ri","width":24,"height":24,"icons":{}},{"prefix":"bpmn","width":2048,"height":2048,"icons":{}},{"prefix":"ic","width":24,"height":24,"icons":{"round-drag-indicator":{"body":"<path fill=\\"currentColor\\" d=\\"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2s.9-2 2-2s2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2\\"/>"},"round-view-carousel":{"body":"<path fill=\\"currentColor\\" d=\\"M3 7h2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H3c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1m5 12h8c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1M19 7h2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1h-2c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1\\"/>"}}},{"prefix":"map","width":50,"height":50,"icons":{}},{"prefix":"ph","width":256,"height":256,"icons":{"article-medium":{"body":"<path fill=\\"currentColor\\" d=\\"M56 136a8 8 0 0 1-8 8H24a8 8 0 0 1 0-16h8V64h-8a8 8 0 0 1 0-16h16a8 8 0 0 1 6.78 3.74L80 104.91l33.22-53.15A8 8 0 0 1 120 48h16a8 8 0 0 1 0 16h-8v64h8a8 8 0 0 1 0 16h-24a8 8 0 0 1 0-16V83.89l-25.22 40.35a8 8 0 0 1-13.56 0L48 83.89V128a8 8 0 0 1 8 8m112-24h64a8 8 0 0 0 0-16h-64a8 8 0 0 0 0 16m64 16h-64a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16m0 32H80a8 8 0 0 0 0 16h152a8 8 0 0 0 0-16m0 32H80a8 8 0 0 0 0 16h152a8 8 0 0 0 0-16\\"/>"},"function":{"body":"<path fill=\\"currentColor\\" d=\\"M208 40a8 8 0 0 1-8 8h-29.29a24 24 0 0 0-23.62 19.71l-9.5 52.29H184a8 8 0 0 1 0 16h-49.32l-10 55.16A40 40 0 0 1 85.29 224H56a8 8 0 0 1 0-16h29.29a24 24 0 0 0 23.62-19.71l9.5-52.29H72a8 8 0 0 1 0-16h49.32l10-55.16A40 40 0 0 1 170.71 32H200a8 8 0 0 1 8 8\\"/>"}}},{"prefix":"il","width":750,"height":850,"icons":{}},{"prefix":"memory","width":22,"height":22,"icons":{}},{"prefix":"fa","width":1536,"height":1536,"icons":{"align-left":{"body":"<path fill=\\"currentColor\\" d=\\"M1792 1216v128q0 26-19 45t-45 19H64q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45m-384-384v128q0 26-19 45t-45 19H64q-26 0-45-19T0 960V832q0-26 19-45t45-19h1280q26 0 45 19t19 45m256-384v128q0 26-19 45t-45 19H64q-26 0-45-19T0 576V448q0-26 19-45t45-19h1536q26 0 45 19t19 45M1280 64v128q0 26-19 45t-45 19H64q-26 0-45-19T0 192V64q0-26 19-45T64 0h1152q26 0 45 19t19 45\\"/>","width":1792,"height":1408}}},{"prefix":"radix-icons","width":15,"height":15,"icons":{"enter-full-screen":{"body":"<path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M2 2.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1H3v2.5a.5.5 0 0 1-1 0zm7 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V3H9.5a.5.5 0 0 1-.5-.5M2.5 9a.5.5 0 0 1 .5.5V12h2.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5m10 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1 0-1H12V9.5a.5.5 0 0 1 .5-.5\\" clip-rule=\\"evenodd\\"/>"},"exit-full-screen":{"body":"<path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M5.5 2a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1 0-1H5V2.5a.5.5 0 0 1 .5-.5m4 0a.5.5 0 0 1 .5.5V5h2.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5M2 9.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V10H2.5a.5.5 0 0 1-.5-.5m7 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1H10v2.5a.5.5 0 0 1-1 0z\\" clip-rule=\\"evenodd\\"/>"}}},{"prefix":"fe","width":24,"height":24,"icons":{}},{"prefix":"mi","width":24,"height":24,"icons":{}},{"prefix":"geo","width":100,"height":100,"icons":{}},{"prefix":"la","width":32,"height":32,"icons":{}},{"prefix":"fontisto","width":24,"height":24,"icons":{"email":{"body":"<path fill=\\"currentColor\\" d=\\"m16.484 11.976l6.151-5.344v10.627zm-7.926.905l2.16 1.875c.339.288.781.462 1.264.462h.017h-.001h.014c.484 0 .926-.175 1.269-.465l-.003.002l2.16-1.875l6.566 5.639H1.995zM1.986 5.365h20.03l-9.621 8.356a.6.6 0 0 1-.38.132h-.014h.001h-.014a.6.6 0 0 1-.381-.133l.001.001zm-.621 1.266l6.15 5.344l-6.15 5.28zm21.6-2.441c-.24-.12-.522-.19-.821-.19H1.859a1.9 1.9 0 0 0-.835.197l.011-.005A1.86 1.86 0 0 0 0 5.855v12.172a1.86 1.86 0 0 0 1.858 1.858h20.283a1.86 1.86 0 0 0 1.858-1.858V5.855c0-.727-.419-1.357-1.029-1.66l-.011-.005z\\"/>"}}},{"prefix":"carbon","width":32,"height":32,"icons":{"popup":{"body":"<path fill=\\"currentColor\\" d=\\"M28 4H10a2.006 2.006 0 0 0-2 2v14a2.006 2.006 0 0 0 2 2h18a2.006 2.006 0 0 0 2-2V6a2.006 2.006 0 0 0-2-2m0 16H10V6h18Z\\"/><path fill=\\"currentColor\\" d=\\"M18 26H4V16h2v-2H4a2.006 2.006 0 0 0-2 2v10a2.006 2.006 0 0 0 2 2h14a2.006 2.006 0 0 0 2-2v-2h-2Z\\"/>"},"tree-view-alt":{"body":"<path fill=\\"currentColor\\" d=\\"M23 9.005h6a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-6a2 2 0 0 0-2 2v1H11v-1a2 2 0 0 0-2-2H3a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-1h4v20a2 2 0 0 0 2 2h4v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-6a2 2 0 0 0-2 2v1h-4v-9h4v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-6a2 2 0 0 0-2 2v1h-4v-9h4v1a2 2 0 0 0 2 2m0-6h6v4h-6Zm-14 4H3v-4h6Zm14 18h6v4h-6Zm0-11h6v4h-6Z\\"/>"}}},{"prefix":"icon-park-outline","width":48,"height":48,"icons":{"peoples":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"4\\" d=\\"M19 20a7 7 0 1 0 0-14a7 7 0 0 0 0 14M32.608 7A7 7 0 0 1 36 13a7 7 0 0 1-3.392 6M4 40.8V42h30v-1.2c0-4.48 0-6.72-.872-8.432a8 8 0 0 0-3.496-3.496C27.92 28 25.68 28 21.2 28h-4.4c-4.48 0-6.72 0-8.432.872a8 8 0 0 0-3.496 3.496C4 34.08 4 36.32 4 40.8M44 42v-1.2c0-4.48 0-6.72-.872-8.432a8 8 0 0 0-3.496-3.496\\"/>"}}},{"prefix":"emojione-monotone","width":64,"height":64,"icons":{"crescent-moon":{"body":"<path fill=\\"currentColor\\" d=\\"M43.139 2a29.9 29.9 0 0 1 5.121 16.756c0 16.701-13.686 30.24-30.57 30.24a30.66 30.66 0 0 1-15.689-4.285C7.209 54.963 17.93 62 30.318 62C47.816 62 62 47.969 62 30.66C62 17.867 54.246 6.871 43.139 2\\"/>"},"sun":{"body":"<path fill=\\"currentColor\\" d=\\"m20.52 59.717l7.027-7.2a20.9 20.9 0 0 1-6.904-2.87zM43.48 4.284l-7.025 7.199a20.9 20.9 0 0 1 6.904 2.871zm-31.996 32.17l-7.201 7.025l10.07-.122a20.9 20.9 0 0 1-2.869-6.903m41.032-8.907l7.201-7.027l-10.07.123a20.9 20.9 0 0 1 2.869 6.904m-38.162-6.905l-10.07-.123l7.201 7.027a20.8 20.8 0 0 1 2.869-6.904m35.292 22.716l10.07.122l-7.201-7.026a20.8 20.8 0 0 1-2.869 6.904M27.547 11.483l-7.027-7.2l.123 10.07a20.9 20.9 0 0 1 6.904-2.87m8.906 41.034l7.027 7.199l-.123-10.069a20.9 20.9 0 0 1-6.904 2.87m-21.701-8.555l-3.967 9.251l9.252-3.965a21.1 21.1 0 0 1-5.285-5.286m34.496-23.923l3.965-9.252l-9.25 3.965a21.1 21.1 0 0 1 5.285 5.287M11 32c0-1.278.133-2.524.352-3.741L2 31.999l9.352 3.74A21 21 0 0 1 11 32m51 0l-9.352-3.741C52.867 29.476 53 30.722 53 32s-.133 2.525-.352 3.741zM20.039 14.751l-9.252-3.965l3.965 9.252a21.2 21.2 0 0 1 5.287-5.287m23.922 34.497l9.252 3.965l-3.965-9.251a21.1 21.1 0 0 1-5.287 5.286M35.74 11.352L32 2l-3.74 9.352C29.475 11.133 30.721 11 32 11s2.525.133 3.74.352m-7.48 41.296L32 62l3.74-9.352c-1.215.219-2.461.352-3.74.352s-2.525-.133-3.74-.352\\"/><circle cx=\\"32\\" cy=\\"32\\" r=\\"19\\" fill=\\"currentColor\\"/>"}}},{"prefix":"zmdi","width":432,"height":384,"icons":{"fullscreen":{"body":"<path fill=\\"currentColor\\" d=\\"M43 235v64h64v42H0V235zM0 149V43h107v42H43v64zm256 150v-64h43v106H192v-42zM192 43h107v106h-43V85h-64z\\"/>","width":304},"fullscreen-exit":{"body":"<path fill=\\"currentColor\\" d=\\"M0 277v-42h107v106H64v-64zm64-170V43h43v106H0v-42zm128 234V235h107v42h-64v64zm43-234h64v42H192V43h43z\\"/>","width":304}}},{"prefix":"mdi","width":24,"height":24,"icons":{"account-group":{"body":"<path fill=\\"currentColor\\" d=\\"M12 5.5A3.5 3.5 0 0 1 15.5 9a3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 8.5 9A3.5 3.5 0 0 1 12 5.5M5 8c.56 0 1.08.15 1.53.42c-.15 1.43.27 2.85 1.13 3.96C7.16 13.34 6.16 14 5 14a3 3 0 0 1-3-3a3 3 0 0 1 3-3m14 0a3 3 0 0 1 3 3a3 3 0 0 1-3 3c-1.16 0-2.16-.66-2.66-1.62a5.54 5.54 0 0 0 1.13-3.96c.45-.27.97-.42 1.53-.42M5.5 18.25c0-2.07 2.91-3.75 6.5-3.75s6.5 1.68 6.5 3.75V20h-13zM0 20v-1.5c0-1.39 1.89-2.56 4.45-2.9c-.59.68-.95 1.62-.95 2.65V20zm24 0h-3.5v-1.75c0-1.03-.36-1.97-.95-2.65c2.56.34 4.45 1.51 4.45 2.9z\\"/>"},"format-size":{"body":"<path fill=\\"currentColor\\" d=\\"M2 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z\\"/>"},"calendar-time":{"body":"<path fill=\\"currentColor\\" d=\\"M15 13h1.5v2.82l2.44 1.41l-.75 1.3L15 16.69zm4-5H5v11h4.67c-.43-.91-.67-1.93-.67-3a7 7 0 0 1 7-7c1.07 0 2.09.24 3 .67zM5 21a2 2 0 0 1-2-2V5c0-1.11.89-2 2-2h1V1h2v2h8V1h2v2h1a2 2 0 0 1 2 2v6.1c1.24 1.26 2 2.99 2 4.9a7 7 0 0 1-7 7c-1.91 0-3.64-.76-4.9-2zm11-9.85A4.85 4.85 0 0 0 11.15 16c0 2.68 2.17 4.85 4.85 4.85A4.85 4.85 0 0 0 20.85 16c0-2.68-2.17-4.85-4.85-4.85\\"/>"},"user-card-details":{"body":"<path fill=\\"currentColor\\" d=\\"M2 3h20c1.05 0 2 .95 2 2v14c0 1.05-.95 2-2 2H2c-1.05 0-2-.95-2-2V5c0-1.05.95-2 2-2m12 3v1h8V6zm0 2v1h8V8zm0 2v1h7v-1zm-6 3.91C6 13.91 2 15 2 17v1h12v-1c0-2-4-3.09-6-3.09M8 6a3 3 0 0 0-3 3a3 3 0 0 0 3 3a3 3 0 0 0 3-3a3 3 0 0 0-3-3\\"/>"}}},{"prefix":"ant-design","width":1024,"height":1024,"icons":{"align-center-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8m496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8m0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8\\"/>"},"align-left-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8m0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8m784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8m0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8\\"/>"},"cloud-upload-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M518.3 459a8 8 0 0 0-12.6 0l-112 141.7a7.98 7.98 0 0 0 6.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9z\\"/><path fill=\\"currentColor\\" d=\\"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7c-23.5-24.2-36-56.8-34.9-90.6c.9-26.4 9.9-51.2 26.2-72.1c16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9l13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0 1 52.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9c15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5l37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 0 1-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3\\"/>"},"reload-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"m909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92C290 92 102.3 279.5 102 511.5C101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1c1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 0 0-10.1 4.8c-1.8 5-3.8 10-5.9 14.9c-17.3 41-42.1 77.8-73.7 109.4A344.8 344.8 0 0 1 655.9 829c-42.3 17.9-87.4 27-133.8 27c-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 0 1 279 755.2a342.2 342.2 0 0 1-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4s68.4-56.4 109.3-73.8c42.3-17.9 87.4-27 133.8-27c46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 0 1 109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2\\"/>"},"rotate-left-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32m-44 402H188V494h440z\\"/><path fill=\\"currentColor\\" d=\\"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5c42.1 5.2 82.1 18.2 119 38.7c38.1 21.2 71.2 49.7 98.4 84.3c27.1 34.7 46.7 73.7 58.1 115.8c11 40.7 14 82.7 8.9 124.8c-.7 5.4-1.4 10.8-2.4 16.1h74.9c14.8-103.6-11.3-213-81-302.3\\"/>"},"rotate-right-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2c-69.6 89.2-95.7 198.6-81.1 302.4h74.9c-.9-5.3-1.7-10.7-2.4-16.1c-5.1-42.1-2.1-84.1 8.9-124.8c11.4-42.2 31-81.1 58.1-115.8c27.2-34.7 60.3-63.2 98.4-84.3c37-20.6 76.9-33.6 119.1-38.8\\"/><path fill=\\"currentColor\\" d=\\"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32m-44 402H396V494h440z\\"/>"},"scan-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M136 384h56c4.4 0 8-3.6 8-8V200h176c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-37.6 0-68 30.4-68 68v180c0 4.4 3.6 8 8 8m512-184h176v176c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V196c0-37.6-30.4-68-68-68H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8M376 824H200V648c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v180c0 37.6 30.4 68 68 68h180c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8m512-184h-56c-4.4 0-8 3.6-8 8v176H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h180c37.6 0 68-30.4 68-68V648c0-4.4-3.6-8-8-8m16-164H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8\\"/>"},"upload-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13M878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8\\"/>"},"zoom-in-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8m284 424L775 721c122.1-148.9 113.6-369.5-26-509c-148-148.1-388.4-148.1-537 0c-148.1 148.6-148.1 389 0 537c139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11M696 696c-118.8 118.7-311.2 118.7-430 0c-118.7-118.8-118.7-311.2 0-430c118.8-118.7 311.2-118.7 430 0c118.7 118.8 118.7 311.2 0 430\\"/>"},"zoom-out-outlined":{"body":"<path fill=\\"currentColor\\" d=\\"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8m284 424L775 721c122.1-148.9 113.6-369.5-26-509c-148-148.1-388.4-148.1-537 0c-148.1 148.6-148.1 389 0 537c139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11M696 696c-118.8 118.7-311.2 118.7-430 0c-118.7-118.8-118.7-311.2 0-430c118.8-118.7 311.2-118.7 430 0c118.7 118.8 118.7 311.2 0 430\\"/>"}}},{"prefix":"vaadin","icons":{"arrows-long-h":{"body":"<path fill=\\"currentColor\\" d=\\"m16 8l-3-3v2H3V5L0 8l3 3V9h10v2z\\"/>"},"arrows-long-v":{"body":"<path fill=\\"currentColor\\" d=\\"M9 3h2L8 0L5 3h2v10H5l3 3l3-3H9z\\"/>"},"line-h":{"body":"<path fill=\\"currentColor\\" d=\\"M0 7h16v1H0z\\"/>"},"padding":{"body":"<path fill=\\"currentColor\\" d=\\"M0 0v16h16V0zm15 3h-1v1h1v1h-1v1h1v1h-1v1h1v1h-1v1h1v1h-1v1h1v1h-1v1h1v1h-1v-1h-1v1h-1v-1h-1v1h-1v-1H9v1H8v-1H7v1H6v-1H5v1H4v-1H3v1H2v-1H1v-1h1v-1H1v-1h1v-1H1V9h1V8H1V7h1V6H1V5h1V4H1V3h1V2H1V1h1v1h1V1h1v1h1V1h1v1h1V1h1v1h1V1h1v1h1V1h1v1h1V1h1v1h1z\\"/><path fill=\\"currentColor\\" d=\\"M3 2h1v1H3zm1 1h1v1H4zm2 0h1v1H6zM5 2h1v1H5zm2 0h1v1H7zm2 0h1v1H9zM8 3h1v1H8zm2 0h1v1h-1zm2 0h1v1h-1zm-1-1h1v1h-1zm2 0h1v1h-1zm-1 3h1v1h-1zm1-1h1v1h-1zm-1 3h1v1h-1zm1-1h1v1h-1zm-1 3h1v1h-1zm1-1h1v1h-1zm-1 3h1v1h-1zm1-1h1v1h-1zm-1 3h1v1h-1zm1-1h1v1h-1zM2 3h1v1H2zm1 1h1v1H3zM2 5h1v1H2zm1 1h1v1H3zM2 7h1v1H2zm1 1h1v1H3zM2 9h1v1H2zm1 1h1v1H3zm-1 1h1v1H2zm0 2h1v1H2zm1-1h1v1H3zm1-1h1v1H4zm0 2h1v1H4zm1-1h1v1H5zm1 1h1v1H6zm1-1h1v1H7zm2 0h1v1H9zm-1 1h1v1H8zm3-1h1v1h-1zm-1 1h1v1h-1z\\"/>"}}},{"prefix":"system-uicons","width":21,"height":21,"icons":{"carousel":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" d=\\"M14.5 5.5h-8a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2m4 0v10m-16-10v10\\"/>"},"reset-alt":{"body":"<g fill=\\"none\\" fill-rule=\\"evenodd\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\"><path d=\\"M14.5 3.5c2.414 1.377 4 4.022 4 7a8 8 0 1 1-8-8\\"/><path d=\\"M14.5 7.5v-4h4\\"/></g>"}}},{"prefix":"tdesign","width":24,"height":24,"icons":{"component-divider-vertical":{"body":"<path fill=\\"currentColor\\" d=\\"M5 2h14v7H5zm2 2v3h10V4zm-5 7h20v2H2zm3 4h14v7H5zm2 2v3h10v-3z\\"/>"},"image":{"body":"<path fill=\\"currentColor\\" d=\\"M2 2h20v20H2zm2 18h13.586L9 11.414l-5 5zm16-.414V4H4v9.586l5-5zM15.547 7a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0\\"/>"},"qrcode":{"body":"<path fill=\\"currentColor\\" d=\\"M2 2h9v9H2zm2 2v5h5V4zm9-2h9v9h-9zm2 2v5h5V4zM5.5 5.5h2.004v2.004H5.5zm11 0h2.004v2.004H16.5zm-3.504 7.496H15V15h-2.004zm7 0H22V15h-2.004zM2 13h9v9H2zm2 2v5h5v-5zm11.996.996H18v2h2v2h2V22h-2.004v-2h-2v-2h-2zM5.5 16.5h2.004v2.004H5.5zm7.496 3.496H15V22h-2.004z\\"/>"}}},{"prefix":"tabler","width":24,"height":24,"icons":{"box-padding":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm4 10v.01M8 12v.01M8 8v.01M16 16v.01M16 12v.01M16 8v.01M12 8v.01M12 16v.01\\"/>"},"float-right":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M14 6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zM4 7h6m-6 4h6m-6 4h16M4 19h16\\"/>"},"hand-click":{"body":"<g fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\"><path d=\\"M8 13V4.5a1.5 1.5 0 0 1 3 0V12m0-.5v-2a1.5 1.5 0 0 1 3 0V12m0-1.5a1.5 1.5 0 0 1 3 0V12\\"/><path d=\\"M17 11.5a1.5 1.5 0 0 1 3 0V16a6 6 0 0 1-6 6h-2h.208a6 6 0 0 1-5.012-2.7L7 19q-.468-.718-3.286-5.728a1.5 1.5 0 0 1 .536-2.022a1.87 1.87 0 0 1 2.28.28L8 13M5 3L4 2m0 5H3m11-4l1-1m0 4h1\\"/></g>"},"input-search":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M20 11V9a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h5m4 2a3 3 0 1 0 6 0a3 3 0 1 0-6 0m5.2 2.2L22 22\\"/>"},"layout-navbar":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm0 3h16\\"/>"},"line-dashed":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M5 12h2m10 0h2m-8 0h2\\"/>"},"line-dotted":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"2\\" d=\\"M4 12v.01M8 12v.01m4-.01v.01m4-.01v.01m4-.01v.01\\"/>"}}},{"prefix":"entypo","width":20,"height":20,"icons":{"progress-empty":{"body":"<path fill=\\"currentColor\\" d=\\"M18 5H2C.9 5 0 5.9 0 7v6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 8H2V7h16z\\"/>"}}},{"prefix":"fluent","width":20,"height":20,"icons":{"table-bottom-row-16-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M4.5 2A2.5 2.5 0 0 0 2 4.5V10h1V4.5A1.5 1.5 0 0 1 4.5 3h7A1.5 1.5 0 0 1 13 4.5V10h1V4.5A2.5 2.5 0 0 0 11.5 2zM3 13.5a2.5 2.5 0 0 1-1-2V11h3v3h-.5a2.5 2.5 0 0 1-1.5-.5M13.95 12q.05-.243.05-.5V11h-3v3h.5a2.5 2.5 0 0 0 2.45-2M6 14h4v-3H6z\\"/>","width":16,"height":16},"text-column-one-24-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M5 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1\\"/>","width":24,"height":24},"text-column-three-24-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M3 6a1 1 0 0 1 1-1h3a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1m6.58 0a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1M16 6a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1M3 10a1 1 0 0 1 1-1h3a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1m6.58 0a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1M16 10a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1M3 14a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1m6.58 0a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1M16 14a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1M3 18a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1m6.58 0a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1M16 18a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-3a1 1 0 0 1-1-1\\"/>","width":24,"height":24},"text-column-two-24-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1M13 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2h-6a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2h-6a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2h-6a1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2h-6a1 1 0 0 1-1-1\\"/>","width":24,"height":24},"text-column-two-left-24-filled":{"body":"<path fill=\\"currentColor\\" d=\\"M21 6a1 1 0 0 0-1-1h-9a1 1 0 1 0 0 2h9a1 1 0 0 0 1-1M8 6a1 1 0 0 0-1-1H4a1 1 0 0 0 0 2h3a1 1 0 0 0 1-1m13 4a1 1 0 0 0-1-1h-9a1 1 0 1 0 0 2h9a1 1 0 0 0 1-1M8 10a1 1 0 0 0-1-1H4a1 1 0 0 0 0 2h3a1 1 0 0 0 1-1m13 4a1 1 0 0 0-1-1h-9a1 1 0 1 0 0 2h9a1 1 0 0 0 1-1M8 14a1 1 0 0 0-1-1H4a1 1 0 1 0 0 2h3a1 1 0 0 0 1-1m13 4a1 1 0 0 0-1-1h-9a1 1 0 1 0 0 2h9a1 1 0 0 0 1-1M8 18a1 1 0 0 0-1-1H4a1 1 0 1 0 0 2h3a1 1 0 0 0 1-1\\"/>","width":24,"height":24}}},{"prefix":"bi","icons":{"columns":{"body":"<path fill=\\"currentColor\\" d=\\"M0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1zm8.5 0v8H15V2zm0 9v3H15v-3zm-1-9H1v3h6.5zM1 14h6.5V6H1z\\"/>"},"grid-3x2-gap":{"body":"<path fill=\\"currentColor\\" d=\\"M4 4v2H2V4zm1 7V9a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1m0-5V4a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1m5 5V9a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1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z\\"/>"}}},{"prefix":"fa-solid","width":512,"height":512,"icons":{"list":{"body":"<path fill=\\"currentColor\\" d=\\"M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16m0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16m0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16m416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16m0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16m0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16\\"/>"}}},{"prefix":"icon-park-twotone","width":48,"height":48,"icons":{"theme":{"body":"<defs><mask id=\\"ipTTheme0\\"><path fill=\\"#555\\" stroke=\\"#fff\\" stroke-linejoin=\\"round\\" stroke-width=\\"4\\" d=\\"M18 6a6 6 0 0 0 12 0h5.455L42 15.818l-5.727 4.91V42H11.727V20.727L6 15.818L12.546 6z\\"/></mask></defs><path fill=\\"currentColor\\" d=\\"M0 0h48v48H0z\\" mask=\\"url(#ipTTheme0)\\"/>"}}},{"prefix":"iconoir","width":24,"height":24,"icons":{"input-search":{"body":"<path fill=\\"none\\" stroke=\\"currentColor\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" stroke-width=\\"1.5\\" d=\\"M21 12v-2a5 5 0 0 0-5-5H8a5 5 0 0 0-5 5v0a5 5 0 0 0 5 5h4m8.124 4.119a3 3 0 1 0-4.248-4.237a3 3 0 0 0 4.248 4.237m0 0L22 21\\"/>"}}},{"prefix":"material-symbols","width":24,"height":24,"icons":{"line-start":{"body":"<path fill=\\"currentColor\\" d=\\"M4.5 14.5q-1.05 0-1.775-.725T2 12t.725-1.775T4.5 9.5q.775 0 1.4.425T6.8 11H22v2H6.8q-.275.65-.9 1.075t-1.4.425\\"/>"}}}]').forEach(e=>XJ.addCollection(e));let AT;AT={},qe=function(e,t,n){let r=Promise.resolve();return t&&t.length>0&&(document.getElementsByTagName("link"),r=Promise.all(t.map(o=>{if((o=function(s){return"/"+s}(o))in AT)return;AT[o]=!0;const i=o.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${a}`))return;const l=document.createElement("link");return l.rel=i?"stylesheet":"modulepreload",i||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),i?new Promise((s,u)=>{l.addEventListener("load",s),l.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${o}`)))}):void 0}))),r.then(()=>e()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},kQ=(e,t)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((r,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t)))})},_m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_l=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},B3=function(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n};var rs={};const QJ=typeof window<"u";let JJ,ZJ;{const e=QJ&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(JJ=t=>{e.mark(t)},ZJ=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}const xTe=/\{([0-9a-zA-Z]+)\}/g,eZ=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),_Te=Object.assign;let tZ;const ETe=Object.prototype.hasOwnProperty,wT=Array.isArray,xT=e=>typeof e=="function",W3=e=>e!==null&&typeof e=="object",_T=Object.prototype.toString,ET=e=>_T.call(e),CT=e=>{if(!W3(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object};function nZ(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const rZ={},n7=e=>!W3(e)||wT(e),CTe=Object.freeze(Object.defineProperty({__proto__:null,assign:_Te,createEmitter:function(){const e=new Map;return{events:e,on(t,n){const r=e.get(t);r&&r.push(n)||e.set(t,[n])},off(t,n){const r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit(t,n){(e.get(t)||[]).slice().map(r=>r(n)),(e.get("*")||[]).slice().map(r=>r(t,n))}}},deepCopy:function(e,t){if(n7(e)||n7(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:r,des:o}=n.pop();Object.keys(r).forEach(i=>{n7(r[i])||n7(o[i])?o[i]=r[i]:n.push({src:r[i],des:o[i]})})}},escapeHtml:function(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},format:function(e,...t){return t.length===1&&W3(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(xTe,(n,r)=>t.hasOwnProperty(r)?t[r]:"")},friendlyJSONstringify:eZ,generateCodeFrame:function(e,t=0,n=e.length){const r=e.split(/\r?\n/);let o=0;const i=[];for(let a=0;a<r.length;a++)if(o+=r[a].length+1,o>=t){for(let l=a-2;l<=a+2||n>o;l++){if(l<0||l>=r.length)continue;const s=l+1;i.push(`${s}${" ".repeat(3-String(s).length)}| ${r[l]}`);const u=r[l].length;if(l===a){const c=t-(o-u)+1,d=Math.max(1,n>o?u-c:n-t);i.push(" | "+" ".repeat(c)+"^".repeat(d))}else if(l>a){if(n>o){const c=Math.max(Math.min(n-o,u),1);i.push(" | "+"^".repeat(c))}o+=u+1}}break}return i.join(` |
H |
2 |
`)},generateFormatCacheKey:(e,t,n)=>eZ({l:e,k:t,s:n}),getGlobalThis:()=>tZ||(tZ=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),hasOwn:function(e,t){return ETe.call(e,t)},inBrowser:QJ,incrementer:function(e){let t=e;return()=>++t},isArray:wT,isBoolean:e=>typeof e=="boolean",isDate:e=>ET(e)==="[object Date]",isEmptyObject:e=>CT(e)&&Object.keys(e).length===0,isFunction:xT,isNumber:e=>typeof e=="number"&&isFinite(e),isObject:W3,isPlainObject:CT,isPromise:e=>W3(e)&&xT(e.then)&&xT(e.catch),isRegExp:e=>ET(e)==="[object RegExp]",isString:e=>typeof e=="string",isSymbol:e=>typeof e=="symbol",join:function(e,t=""){return e.reduce((n,r,o)=>o===0?n+r:n+t+r,"")},makeSymbol:(e,t=!1)=>t?Symbol.for(e):Symbol(e),get mark(){return JJ},get measure(){return ZJ},objectToString:_T,toDisplayString:e=>e==null?"":wT(e)||CT(e)&&e.toString===_T?JSON.stringify(e,null,2):String(e),toTypeString:ET,warn:nZ,warnOnce:function(e){rZ[e]||(rZ[e]=!0,nZ(e))}},Symbol.toStringTag,{value:"Module"})),STe=B3(CTe),w0=typeof window<"u";let os,x0;{const e=w0&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(os=t=>{e.mark(t)},x0=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}const kTe=/\{([0-9a-zA-Z]+)\}/g;function ST(e,...t){return t.length===1&&ki(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(kTe,(n,r)=>t.hasOwnProperty(r)?t[r]:"")}const DTe=(e,t,n)=>OTe({l:e,k:t,s:n}),OTe=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),is=e=>typeof e=="number"&&isFinite(e),TTe=e=>lZ(e)==="[object Date]",oZ=e=>lZ(e)==="[object RegExp]",kT=e=>_o(e)&&Object.keys(e).length===0,Bf=Object.assign;function iZ(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const _c=Array.isArray,Si=e=>typeof e=="function",jn=e=>typeof e=="string",Xa=e=>typeof e=="boolean",ki=e=>e!==null&&typeof e=="object",MTe=e=>ki(e)&&Si(e.then)&&Si(e.catch),aZ=Object.prototype.toString,lZ=e=>aZ.call(e),_o=e=>{if(!ki(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object};function DT(e,t=""){return e.reduce((n,r,o)=>o===0?n+r:n+t+r,"")}const sZ=2;function G3(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const uZ={};function OT(e,t,n){return{start:e,end:t}}const kn={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},NTe={[kn.EXPECTED_TOKEN]:"Expected token: '{0}'",[kn.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[kn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[kn.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[kn.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[kn.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[kn.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[kn.EMPTY_PLACEHOLDER]:"Empty placeholder",[kn.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[kn.INVALID_LINKED_FORMAT]:"Invalid linked format",[kn.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[kn.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[kn.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[kn.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[kn.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[kn.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Sm(e,t,n={}){const{domain:r,messages:o,args:i}=n,a=ST((o||NTe)[e]||"",...i||[]),l=new SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=r,l}function FTe(e){throw e}const RTe=/<\/?[\w\s="/.':;#-\/]+>/,ITe=e=>RTe.test(e),Sd=" ",BTe="\r",Qa=` |
|
3 |
`,LTe="\u2028",PTe="\u2029";function jTe(e){const t=e;let n=0,r=1,o=1,i=0;const a=f=>t[f]===BTe&&t[f+1]===Qa,l=f=>t[f]===PTe,s=f=>t[f]===LTe,u=f=>a(f)||(p=>t[p]===Qa)(f)||l(f)||s(f),c=f=>a(f)||l(f)||s(f)?Qa:t[f];function d(){return i=0,u(n)&&(r++,o=0),a(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>i,charAt:c,currentChar:()=>c(n),currentPeek:()=>c(n+i),next:d,peek:function(){return a(n+i)&&i++,i++,t[n+i]},reset:function(){n=0,r=1,o=1,i=0},resetPeek:function(f=0){i=f},skipToPeek:function(){const f=n+i;for(;f!==n;)d();i=0}}}const Lf=void 0,VTe=".",cZ="'",zTe="tokenizer";function HTe(e,t={}){const n=t.location!==!1,r=jTe(e),o=()=>r.index(),i=()=>{return P=r.line(),H=r.column(),U=r.index(),{line:P,column:H,offset:U};var P,H,U},a=i(),l=o(),s={currentType:14,offset:l,startLoc:a,endLoc:a,lastType:14,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},u=()=>s,{onError:c}=t;function d(P,H,U,...G){const z=u();if(H.column+=U,H.offset+=U,c){const $=Sm(P,n?OT(z.startLoc,H):null,{domain:zTe,args:G});c($)}}function f(P,H,U){P.endLoc=i(),P.currentType=H;const G={type:H};return n&&(G.loc=OT(P.startLoc,P.endLoc)),U!=null&&(G.value=U),G}const p=P=>f(P,14);function m(P,H){return P.currentChar()===H?(P.next(),H):(d(kn.EXPECTED_TOKEN,i(),0,H),"")}function v(P){let H="";for(;P.currentPeek()===Sd||P.currentPeek()===Qa;)H+=P.currentPeek(),P.peek();return H}function g(P){const H=v(P);return P.skipToPeek(),H}function b(P){if(P===Lf)return!1;const H=P.charCodeAt(0);return H>=97&&H<=122||H>=65&&H<=90||H===95}function y(P,H){const{currentType:U}=H;if(U!==2)return!1;v(P);const G=function(z){if(z===Lf)return!1;const $=z.charCodeAt(0);return $>=48&&$<=57}(P.currentPeek()==="-"?P.peek():P.currentPeek());return P.resetPeek(),G}function w(P){v(P);const H=P.currentPeek()==="|";return P.resetPeek(),H}function x(P,H=!0){const U=(z=!1,$="",W=!1)=>{const K=P.currentPeek();return K==="{"?$!=="%"&&z:K!=="@"&&K?K==="%"?(P.peek(),U(z,"%",!0)):K==="|"?!($!=="%"&&!W)||!($===Sd||$===Qa):K===Sd?(P.peek(),U(!0,Sd,W)):K!==Qa||(P.peek(),U(!0,Qa,W)):$==="%"||z},G=U();return H&&P.resetPeek(),G}function _(P,H){const U=P.currentChar();return U===Lf?Lf:H(U)?(P.next(),U):null}function E(P){return _(P,H=>{const U=H.charCodeAt(0);return U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===95||U===36})}function C(P){return _(P,H=>{const U=H.charCodeAt(0);return U>=48&&U<=57})}function T(P){return _(P,H=>{const U=H.charCodeAt(0);return U>=48&&U<=57||U>=65&&U<=70||U>=97&&U<=102})}function k(P){let H="",U="";for(;H=C(P);)U+=H;return U}function I(P){let H="";for(;;){const U=P.currentChar();if(U==="{"||U==="}"||U==="@"||U==="|"||!U)break;if(U==="%"){if(!x(P))break;H+=U,P.next()}else if(U===Sd||U===Qa)if(x(P))H+=U,P.next();else{if(w(P))break;H+=U,P.next()}else H+=U,P.next()}return H}function O(P){const H=P.currentChar();switch(H){case"\\":case"'":return P.next(),`\\${H}`;case"u":return F(P,H,4);case"U":return F(P,H,6);default:return d(kn.UNKNOWN_ESCAPE_SEQUENCE,i(),0,H),""}}function F(P,H,U){m(P,H);let G="";for(let z=0;z<U;z++){const $=T(P);if(!$){d(kn.INVALID_UNICODE_ESCAPE_SEQUENCE,i(),0,`\\${H}${G}${P.currentChar()}`);break}G+=$}return`\\${H}${G}`}function N(P){g(P);const H=m(P,"|");return g(P),H}function B(P,H){let U=null;switch(P.currentChar()){case"{":return H.braceNest>=1&&d(kn.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),P.next(),U=f(H,2,"{"),g(P),H.braceNest++,U;case"}":return H.braceNest>0&&H.currentType===2&&d(kn.EMPTY_PLACEHOLDER,i(),0),P.next(),U=f(H,3,"}"),H.braceNest--,H.braceNest>0&&g(P),H.inLinked&&H.braceNest===0&&(H.inLinked=!1),U;case"@":return H.braceNest>0&&d(kn.UNTERMINATED_CLOSING_BRACE,i(),0),U=L(P,H)||p(H),H.braceNest=0,U;default:{let G=!0,z=!0,$=!0;if(w(P))return H.braceNest>0&&d(kn.UNTERMINATED_CLOSING_BRACE,i(),0),U=f(H,1,N(P)),H.braceNest=0,H.inLinked=!1,U;if(H.braceNest>0&&(H.currentType===5||H.currentType===6||H.currentType===7))return d(kn.UNTERMINATED_CLOSING_BRACE,i(),0),H.braceNest=0,V(P,H);if(G=function(W,K){const{currentType:X}=K;if(X!==2)return!1;v(W);const te=b(W.currentPeek());return W.resetPeek(),te}(P,H))return U=f(H,5,function(W){g(W);let K="",X="";for(;K=E(W);)X+=K;return W.currentChar()===Lf&&d(kn.UNTERMINATED_CLOSING_BRACE,i(),0),X}(P)),g(P),U;if(z=y(P,H))return U=f(H,6,function(W){g(W);let K="";return W.currentChar()==="-"?(W.next(),K+=`-${k(W)}`):K+=k(W),W.currentChar()===Lf&&d(kn.UNTERMINATED_CLOSING_BRACE,i(),0),K}(P)),g(P),U;if($=function(W,K){const{currentType:X}=K;if(X!==2)return!1;v(W);const te=W.currentPeek()===cZ;return W.resetPeek(),te}(P,H))return U=f(H,7,function(W){g(W),m(W,"'");let K="",X="";const te=se=>se!==cZ&&se!==Qa;for(;K=_(W,te);)X+=K==="\\"?O(W):K;const ne=W.currentChar();return ne===Qa||ne===Lf?(d(kn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),ne===Qa&&(W.next(),m(W,"'")),X):(m(W,"'"),X)}(P)),g(P),U;if(!G&&!z&&!$)return U=f(H,13,function(W){g(W);let K="",X="";const te=ne=>ne!=="{"&&ne!=="}"&&ne!==Sd&&ne!==Qa;for(;K=_(W,te);)X+=K;return X}(P)),d(kn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,U.value),g(P),U;break}}return U}function L(P,H){const{currentType:U}=H;let G=null;const z=P.currentChar();switch(U!==8&&U!==9&&U!==12&&U!==10||z!==Qa&&z!==Sd||d(kn.INVALID_LINKED_FORMAT,i(),0),z){case"@":return P.next(),G=f(H,8,"@"),H.inLinked=!0,G;case".":return g(P),P.next(),f(H,9,".");case":":return g(P),P.next(),f(H,10,":");default:return w(P)?(G=f(H,1,N(P)),H.braceNest=0,H.inLinked=!1,G):function($,W){const{currentType:K}=W;if(K!==8)return!1;v($);const X=$.currentPeek()===".";return $.resetPeek(),X}(P,H)||function($,W){const{currentType:K}=W;if(K!==8&&K!==12)return!1;v($);const X=$.currentPeek()===":";return $.resetPeek(),X}(P,H)?(g(P),L(P,H)):function($,W){const{currentType:K}=W;if(K!==9)return!1;v($);const X=b($.currentPeek());return $.resetPeek(),X}(P,H)?(g(P),f(H,12,function($){let W="",K="";for(;W=E($);)K+=W;return K}(P))):function($,W){const{currentType:K}=W;if(K!==10)return!1;const X=()=>{const ne=$.currentPeek();return ne==="{"?b($.peek()):!(ne==="@"||ne==="%"||ne==="|"||ne===":"||ne==="."||ne===Sd||!ne)&&(ne===Qa?($.peek(),X()):b(ne))},te=X();return $.resetPeek(),te}(P,H)?(g(P),z==="{"?B(P,H)||G:f(H,11,function($){const W=(K=!1,X)=>{const te=$.currentChar();return te!=="{"&&te!=="%"&&te!=="@"&&te!=="|"&&te!=="("&&te!==")"&&te?te===Sd?X:te===Qa||te===VTe?(X+=te,$.next(),W(K,X)):(X+=te,$.next(),W(!0,X)):X};return W(!1,"")}(P))):(U===8&&d(kn.INVALID_LINKED_FORMAT,i(),0),H.braceNest=0,H.inLinked=!1,V(P,H))}}function V(P,H){let U={type:14};if(H.braceNest>0)return B(P,H)||p(H);if(H.inLinked)return L(P,H)||p(H);switch(P.currentChar()){case"{":return B(P,H)||p(H);case"}":return d(kn.UNBALANCED_CLOSING_BRACE,i(),0),P.next(),f(H,3,"}");case"@":return L(P,H)||p(H);default:{if(w(P))return U=f(H,1,N(P)),H.braceNest=0,H.inLinked=!1,U;const{isModulo:G,hasSpace:z}=function($){const W=v($),K=$.currentPeek()==="%"&&$.peek()==="{";return $.resetPeek(),{isModulo:K,hasSpace:W.length>0}}(P);if(G)return z?f(H,0,I(P)):f(H,4,function($){g($);const W=$.currentChar();return W!=="%"&&d(kn.EXPECTED_TOKEN,i(),0,W),$.next(),"%"}(P));if(x(P))return f(H,0,I(P));break}}return U}return{nextToken:function(){const{currentType:P,offset:H,startLoc:U,endLoc:G}=s;return s.lastType=P,s.lastOffset=H,s.lastStartLoc=U,s.lastEndLoc=G,s.offset=o(),s.startLoc=i(),r.currentChar()===Lf?f(s,14):V(r,s)},currentOffset:o,currentPosition:i,context:u}}const $Te="parser",UTe=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function WTe(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"\uFFFD"}}}function GTe(e={}){const t=e.location!==!1,{onError:n}=e;function r(p,m,v,g,...b){const y=p.currentPosition();if(y.offset+=g,y.column+=g,n){const w=Sm(m,t?OT(v,y):null,{domain:$Te,args:b});n(w)}}function o(p,m,v){const g={type:p};return t&&(g.start=m,g.end=m,g.loc={start:v,end:v}),g}function i(p,m,v,g){t&&(p.end=m,p.loc&&(p.loc.end=v))}function a(p,m){const v=p.context(),g=o(3,v.offset,v.startLoc);return g.value=m,i(g,p.currentOffset(),p.currentPosition()),g}function l(p,m){const v=p.context(),{lastOffset:g,lastStartLoc:b}=v,y=o(5,g,b);return y.index=parseInt(m,10),p.nextToken(),i(y,p.currentOffset(),p.currentPosition()),y}function s(p,m){const v=p.context(),{lastOffset:g,lastStartLoc:b}=v,y=o(4,g,b);return y.key=m,p.nextToken(),i(y,p.currentOffset(),p.currentPosition()),y}function u(p,m){const v=p.context(),{lastOffset:g,lastStartLoc:b}=v,y=o(9,g,b);return y.value=m.replace(UTe,WTe),p.nextToken(),i(y,p.currentOffset(),p.currentPosition()),y}function c(p){const m=p.context(),v=o(6,m.offset,m.startLoc);let g=p.nextToken();if(g.type===9){const b=function(y){const w=y.nextToken(),x=y.context(),{lastOffset:_,lastStartLoc:E}=x,C=o(8,_,E);return w.type!==12?(r(y,kn.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),C.value="",i(C,_,E),{nextConsumeToken:w,node:C}):(w.value==null&&r(y,kn.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Ec(w)),C.value=w.value||"",i(C,y.currentOffset(),y.currentPosition()),{node:C})}(p);v.modifier=b.node,g=b.nextConsumeToken||p.nextToken()}switch(g.type!==10&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(g)),g=p.nextToken(),g.type===2&&(g=p.nextToken()),g.type){case 11:g.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(g)),v.key=function(b,y){const w=b.context(),x=o(7,w.offset,w.startLoc);return x.value=y,i(x,b.currentOffset(),b.currentPosition()),x}(p,g.value||"");break;case 5:g.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(g)),v.key=s(p,g.value||"");break;case 6:g.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(g)),v.key=l(p,g.value||"");break;case 7:g.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(g)),v.key=u(p,g.value||"");break;default:{r(p,kn.UNEXPECTED_EMPTY_LINKED_KEY,m.lastStartLoc,0);const b=p.context(),y=o(7,b.offset,b.startLoc);return y.value="",i(y,b.offset,b.startLoc),v.key=y,i(v,b.offset,b.startLoc),{nextConsumeToken:g,node:v}}}return i(v,p.currentOffset(),p.currentPosition()),{node:v}}function d(p){const m=p.context(),v=o(2,m.currentType===1?p.currentOffset():m.offset,m.currentType===1?m.endLoc:m.startLoc);v.items=[];let g=null;do{const b=g||p.nextToken();switch(g=null,b.type){case 0:b.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(b)),v.items.push(a(p,b.value||""));break;case 6:b.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(b)),v.items.push(l(p,b.value||""));break;case 5:b.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(b)),v.items.push(s(p,b.value||""));break;case 7:b.value==null&&r(p,kn.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,Ec(b)),v.items.push(u(p,b.value||""));break;case 8:{const y=c(p);v.items.push(y.node),g=y.nextConsumeToken||null;break}}}while(m.currentType!==14&&m.currentType!==1);return i(v,m.currentType===1?m.lastOffset:p.currentOffset(),m.currentType===1?m.lastEndLoc:p.currentPosition()),v}function f(p){const m=p.context(),{offset:v,startLoc:g}=m,b=d(p);return m.currentType===14?b:function(y,w,x,_){const E=y.context();let C=_.items.length===0;const T=o(1,w,x);T.cases=[],T.cases.push(_);do{const k=d(y);C||(C=k.items.length===0),T.cases.push(k)}while(E.currentType!==14);return C&&r(y,kn.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),i(T,y.currentOffset(),y.currentPosition()),T}(p,v,g,b)}return{parse:function(p){const m=HTe(p,Bf({},e)),v=m.context(),g=o(0,v.offset,v.startLoc);return t&&g.loc&&(g.loc.source=p),g.body=f(m),e.onCacheKey&&(g.cacheKey=e.onCacheKey(p)),v.currentType!==14&&r(m,kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,p[v.offset]||""),i(g,m.currentOffset(),m.currentPosition()),g}}}function Ec(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"\u2026":t}function dZ(e,t){for(let n=0;n<e.length;n++)TT(e[n],t)}function TT(e,t){switch(e.type){case 1:dZ(e.cases,t),t.helper("plural");break;case 2:dZ(e.items,t);break;case 6:TT(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function qTe(e,t={}){const n=function(o){const i={ast:o,helpers:new Set};return{context:()=>i,helper:a=>(i.helpers.add(a),a)}}(e);n.helper("normalize"),e.body&&TT(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function fZ(e){if(e.items.length===1){const t=e.items[0];t.type!==3&&t.type!==9||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(r.type!==3&&r.type!==9||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=DT(t);for(let n=0;n<e.items.length;n++){const r=e.items[n];r.type!==3&&r.type!==9||delete r.value}}}}const KTe="minifier";function km(e){switch(e.t=e.type,e.type){case 0:{const t=e;km(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let r=0;r<n.length;r++)km(n[r]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let r=0;r<n.length;r++)km(n[r]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;km(t.key),t.k=t.key,delete t.key,t.modifier&&(km(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:throw Sm(kn.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:KTe,args:[e.type]})}delete e.type}const YTe="parser";function Dm(e,t){const{helper:n}=e;switch(t.type){case 0:(function(r,o){o.body?Dm(r,o.body):r.push("null")})(e,t);break;case 1:(function(r,o){const{helper:i,needIndent:a}=r;if(o.cases.length>1){r.push(`${i("plural")}([`),r.indent(a());const l=o.cases.length;for(let s=0;s<l&&(Dm(r,o.cases[s]),s!==l-1);s++)r.push(", ");r.deindent(a()),r.push("])")}})(e,t);break;case 2:(function(r,o){const{helper:i,needIndent:a}=r;r.push(`${i("normalize")}([`),r.indent(a());const l=o.items.length;for(let s=0;s<l&&(Dm(r,o.items[s]),s!==l-1);s++)r.push(", ");r.deindent(a()),r.push("])")})(e,t);break;case 6:(function(r,o){const{helper:i}=r;r.push(`${i("linked")}(`),Dm(r,o.key),o.modifier?(r.push(", "),Dm(r,o.modifier),r.push(", _type")):r.push(", undefined, _type"),r.push(")")})(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;default:throw Sm(kn.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:YTe,args:[t.type]})}}const XTe=(e,t={})=>{const n=jn(t.mode)?t.mode:"normal",r=jn(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,i=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` |
|
4 |
`,a=t.needIndent?t.needIndent:n!=="arrow",l=e.helpers||[],s=function(d,f){const{sourceMap:p,filename:m,breakLineCode:v,needIndent:g}=f,b=f.location!==!1,y={filename:m,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:v,needIndent:g,indentLevel:0};function w(_,E){y.code+=_}function x(_,E=!0){const C=E?v:"";w(g?C+" ".repeat(_):C)}return b&&d.loc&&(y.source=d.loc.source),{context:()=>y,push:w,indent:function(_=!0){const E=++y.indentLevel;_&&x(E)},deindent:function(_=!0){const E=--y.indentLevel;_&&x(E)},newline:function(){x(y.indentLevel)},helper:_=>`_${_}`,needIndent:()=>y.needIndent}}(e,{mode:n,filename:r,sourceMap:o,breakLineCode:i,needIndent:a});s.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(a),l.length>0&&(s.push(`const { ${DT(l.map(d=>`${d}: _${d}`),", ")} } = ctx`),s.newline()),s.push("return "),Dm(s,e),s.deindent(a),s.push("}"),delete e.helpers;const{code:u,map:c}=s.context();return{ast:e,code:u,map:c?c.toJSON():void 0}};function QTe(e,t={}){const n=Bf({},t),r=!!n.jit,o=!!n.minify,i=n.optimize==null||n.optimize,a=GTe(n).parse(e);return r?(i&&function(l){const s=l.body;s.type===2?fZ(s):s.cases.forEach(u=>fZ(u))}(a),o&&km(a),{ast:a,code:""}):(qTe(a,n),XTe(a,n))}const Pf=[];Pf[0]={w:[0],i:[3,0],"[":[4],o:[7]},Pf[1]={w:[1],".":[2],"[":[4],o:[7]},Pf[2]={w:[2],i:[3,0],0:[3,0]},Pf[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Pf[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Pf[5]={"'":[4,0],o:8,l:[5,0]},Pf[6]={'"':[4,0],o:8,l:[6,0]};const JTe=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ZTe(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function eMe(e){const t=e.trim();return(e.charAt(0)!=="0"||!isNaN(parseInt(e)))&&(n=t,JTe.test(n)?function(r){const o=r.charCodeAt(0);return o!==r.charCodeAt(r.length-1)||o!==34&&o!==39?r:r.slice(1,-1)}(t):"*"+t);var n}function pZ(e){const t=[];let n,r,o,i,a,l,s,u=-1,c=0,d=0;const f=[];function p(){const m=e[u+1];if(c===5&&m==="'"||c===6&&m==='"')return u++,o="\\"+m,f[0](),!0}for(f[0]=()=>{r===void 0?r=o:r+=o},f[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),d++},f[3]=()=>{if(d>0)d--,c=4,f[0]();else{if(d=0,r===void 0||(r=eMe(r),r===!1))return!1;f[1]()}};c!==null;)if(u++,n=e[u],n!=="\\"||!p()){if(i=ZTe(n),s=Pf[c],a=s[i]||s.l||8,a===8||(c=a[0],a[1]!==void 0&&(l=f[a[1]],l&&(o=n,l()===!1))))return;if(c===7)return t}}const hZ=new Map;function vZ(e,t){return ki(e)?e[t]:null}const tMe=e=>e,nMe=e=>"",mZ="text",rMe=e=>e.length===0?"":DT(e),oMe=e=>e==null?"":_c(e)||_o(e)&&e.toString===aZ?JSON.stringify(e,null,2):String(e);function gZ(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function yZ(e={}){const t=e.locale,n=function(d){const f=is(d.pluralIndex)?d.pluralIndex:-1;return d.named&&(is(d.named.count)||is(d.named.n))?is(d.named.count)?d.named.count:is(d.named.n)?d.named.n:f:f}(e),r=ki(e.pluralRules)&&jn(t)&&Si(e.pluralRules[t])?e.pluralRules[t]:gZ,o=ki(e.pluralRules)&&jn(t)&&Si(e.pluralRules[t])?gZ:void 0,i=e.list||[],a=e.named||{};is(e.pluralIndex)&&function(d,f){f.count||(f.count=d),f.n||(f.n=d)}(n,a);function l(d){return(Si(e.messages)?e.messages(d):!!ki(e.messages)&&e.messages[d])||(e.parent?e.parent.message(d):nMe)}const s=_o(e.processor)&&Si(e.processor.normalize)?e.processor.normalize:rMe,u=_o(e.processor)&&Si(e.processor.interpolate)?e.processor.interpolate:oMe,c={list:d=>i[d],named:d=>a[d],plural:d=>d[r(n,d.length,o)],linked:(d,...f)=>{const[p,m]=f;let v="text",g="";f.length===1?ki(p)?(g=p.modifier||g,v=p.type||v):jn(p)&&(g=p||g):f.length===2&&(jn(p)&&(g=p||g),jn(m)&&(v=m||v));const b=l(d)(c),y=v==="vnode"&&_c(b)&&g?b[0]:b;return g?(w=>e.modifiers?e.modifiers[w]:tMe)(g)(y,v):y},message:l,type:_o(e.processor)&&jn(e.processor.type)?e.processor.type:mZ,interpolate:u,normalize:s,values:Bf({},i,a)};return c}let Om=null;function bZ(e,t,n){Om&&Om.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const AZ=iMe("function:translate");function iMe(e){return t=>Om&&Om.emit(e,t)}const Ja={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,__EXTEND_POINT__:8},aMe={[Ja.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Ja.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Ja.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Ja.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Ja.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Ja.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Ja.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function jf(e,...t){return ST(aMe[e],...t)}const wZ=kn.__EXTEND_POINT__,_0=function(e){let t=e;return()=>++t}(wZ),Gi={INVALID_ARGUMENT:wZ,INVALID_DATE_ARGUMENT:_0(),INVALID_ISO_DATE_ARGUMENT:_0(),NOT_SUPPORT_NON_STRING_MESSAGE:_0(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:_0(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:_0(),NOT_SUPPORT_LOCALE_TYPE:_0(),__EXTEND_POINT__:_0()};function Du(e){return Sm(e,null,{messages:lMe})}const lMe={[Gi.INVALID_ARGUMENT]:"Invalid arguments",[Gi.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Gi.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[Gi.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[Gi.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[Gi.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[Gi.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function r7(e,t){return t.locale!=null?NT(t.locale):NT(e.locale)}let MT;function NT(e){if(jn(e))return e;if(Si(e)){if(e.resolvedOnce&&MT!=null)return MT;if(e.constructor.name==="Function"){const t=e();if(MTe(t))throw Du(Gi.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return MT=t}throw Du(Gi.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw Du(Gi.NOT_SUPPORT_LOCALE_TYPE)}function xZ(e,t,n){return[...new Set([n,..._c(t)?t:ki(t)?Object.keys(t):jn(t)?[t]:[n]])]}function _Z(e,t,n){let r=!0;for(let o=0;o<t.length&&Xa(r);o++){const i=t[o];jn(i)&&(r=sMe(e,t[o],n))}return r}function sMe(e,t,n){let r;const o=t.split("-");do r=uMe(e,o.join("-"),n),o.splice(-1,1);while(o.length&&r===!0);return r}function uMe(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const o=t.replace(/!/g,"");e.push(o),(_c(n)||_o(n))&&n[o]&&(r=n[o])}return r}const EZ="9.10.2",o7="en-US",CZ=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let SZ,kZ,DZ,OZ=null;const TZ=()=>OZ;let MZ=null,NZ=0;function i7(e,t){return e instanceof RegExp?e.test(t):e}function FZ(e,t){return e instanceof RegExp?e.test(t):e}function a7(e,t,n,r,o){const{missing:i,onWarn:a}=e;{const l=e.__v_emitter;l&&l.emit("missing",{locale:n,key:t,type:o,groupId:`${o}:${t}`})}if(i!==null){const l=i(e,n,t,o);return jn(l)?l:t}return FZ(r,t)&&a(jf(Ja.NOT_FOUND_KEY,{key:t,locale:n})),t}function FT(e){return t=>function(n,r){const o=r.b||r.body;if((o.t||o.type)===1){const i=o,a=i.c||i.cases;return n.plural(a.reduce((l,s)=>[...l,RZ(n,s)],[]))}return RZ(n,o)}(t,e)}function RZ(e,t){const n=t.s||t.static;if(n)return e.type==="text"?n:e.normalize([n]);{const r=(t.i||t.items).reduce((o,i)=>[...o,RT(e,i)],[]);return e.normalize(r)}}function RT(e,t){const n=t.t||t.type;switch(n){case 3:{const r=t;return r.v||r.value}case 9:{const r=t;return r.v||r.value}case 4:{const r=t;return e.interpolate(e.named(r.k||r.key))}case 5:{const r=t;return e.interpolate(e.list(r.i!=null?r.i:r.index))}case 6:{const r=t,o=r.m||r.modifier;return e.linked(RT(e,r.k||r.key),o?RT(e,o):void 0,e.type)}case 7:{const r=t;return r.v||r.value}case 8:{const r=t;return r.v||r.value}default:throw new Error(`unhandled node type on format message part: ${n}`)}}const cMe="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function IZ(e,t){t&&ITe(e)&&G3(ST(cMe,{source:e}))}const BZ=e=>e;let E0=Object.create(null);const C0=e=>ki(e)&&(e.t===0||e.type===0)&&("b"in e||"body"in e);function LZ(e,t={}){let n=!1;const r=t.onError||FTe;return t.onError=o=>{n=!0,r(o)},{...QTe(e,t),detectError:n}}const PZ=()=>"",Us=e=>Si(e);function jZ(e,t,n,r,o,i){const{messages:a,onWarn:l,messageResolver:s,localeFallbacker:u}=e,c=u(e,r,n);let d,f={},p=null,m=n,v=null;const g="translate";for(let b=0;b<c.length;b++){if(d=v=c[b],n!==d&&i7(o,t)&&l(jf(Ja.FALLBACK_TO_TRANSLATE,{key:t,target:d})),n!==d){const E=e.__v_emitter;E&&E.emit("fallback",{type:g,key:t,from:m,to:v,groupId:`${g}:${t}`})}f=a[d]||{};let y,w,x=null;if(w0&&(x=window.performance.now(),y="intlify-message-resolve-start",w="intlify-message-resolve-end",os&&os(y)),(p=s(f,t))===null&&(p=f[t]),w0){const E=window.performance.now(),C=e.__v_emitter;C&&x&&p&&C.emit("message-resolve",{type:"message-resolve",key:t,message:p,time:E-x,groupId:`${g}:${t}`}),y&&w&&os&&x0&&(os(w),x0("intlify message resolve",y,w))}if(jn(p)||C0(p)||Us(p))break;const _=a7(e,t,d,i,g);_!==t&&(p=_),m=v}return[p,d,f]}function VZ(e,t,n,r,o,i){const{messageCompiler:a,warnHtmlMessage:l}=e;if(Us(r)){const f=r;return f.locale=f.locale||n,f.key=f.key||t,f}if(a==null){const f=()=>r;return f.locale=n,f.key=t,f}let s,u,c=null;w0&&(c=window.performance.now(),s="intlify-message-compilation-start",u="intlify-message-compilation-end",os&&os(s));const d=a(r,function(f,p,m,v,g,b){return{locale:p,key:m,warnHtmlMessage:g,onError:y=>{b&&b(y);{const w=function(C){if(jn(C))return C;if(C.loc&&C.loc.source)return C.loc.source}(v),x=`Message compilation error: ${y.message}`,_=y.location&&w&&function(C,T=0,k=C.length){const I=C.split(/\r?\n/);let O=0;const F=[];for(let N=0;N<I.length;N++)if(O+=I[N].length+1,O>=T){for(let B=N-sZ;B<=N+sZ||k>O;B++){if(B<0||B>=I.length)continue;const L=B+1;F.push(`${L}${" ".repeat(3-String(L).length)}| ${I[B]}`);const V=I[B].length;if(B===N){const P=T-(O-V)+1,H=Math.max(1,k>O?V-P:k-T);F.push(" | "+" ".repeat(P)+"^".repeat(H))}else if(B>N){if(k>O){const P=Math.max(Math.min(k-O,V),1);F.push(" | "+"^".repeat(P))}O+=V+1}}break}return F.join(` |
|
5 |
`)}(w,y.location.start.offset,y.location.end.offset),E=f.__v_emitter;E&&w&&E.emit("compile-error",{message:w,error:y.message,start:y.location&&y.location.start.offset,end:y.location&&y.location.end.offset,groupId:`translate:${m}`}),console.error(_?`${x} |
|
6 |
${_}`:x)}},onCacheKey:y=>DTe(p,m,y)}}(e,n,o,r,l,i));if(w0){const f=window.performance.now(),p=e.__v_emitter;p&&c&&p.emit("message-compilation",{type:"message-compilation",message:r,time:f-c,groupId:`translate:${t}`}),s&&u&&os&&x0&&(os(u),x0("intlify message compilation",s,u))}return d.locale=n,d.key=t,d.source=r,d}function zZ(...e){const[t,n,r]=e,o={};if(!(jn(t)||is(t)||Us(t)||C0(t)))throw Du(Gi.INVALID_ARGUMENT);const i=is(t)?String(t):(Us(t),t);return is(n)?o.plural=n:jn(n)?o.default=n:_o(n)&&!kT(n)?o.named=n:_c(n)&&(o.list=n),is(r)?o.plural=r:jn(r)?o.default=r:_o(r)&&Bf(o,r),[i,o]}const HZ=typeof Intl<"u",dMe=HZ&&Intl.DateTimeFormat!==void 0,fMe=HZ&&Intl.NumberFormat!==void 0,$Z=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function UZ(...e){const[t,n,r,o]=e,i={};let a,l={};if(jn(t)){const s=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!s)throw Du(Gi.INVALID_ISO_DATE_ARGUMENT);const u=s[3]?s[3].trim().startsWith("T")?`${s[1].trim()}${s[3].trim()}`:`${s[1].trim()}T${s[3].trim()}`:s[1].trim();a=new Date(u);try{a.toISOString()}catch{throw Du(Gi.INVALID_ISO_DATE_ARGUMENT)}}else if(TTe(t)){if(isNaN(t.getTime()))throw Du(Gi.INVALID_DATE_ARGUMENT);a=t}else{if(!is(t))throw Du(Gi.INVALID_ARGUMENT);a=t}return jn(n)?i.key=n:_o(n)&&Object.keys(n).forEach(s=>{$Z.includes(s)?l[s]=n[s]:i[s]=n[s]}),jn(r)?i.locale=r:_o(r)&&(l=r),_o(o)&&(l=o),[i.key||"",a,i,l]}const WZ=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function GZ(...e){const[t,n,r,o]=e,i={};let a={};if(!is(t))throw Du(Gi.INVALID_ARGUMENT);const l=t;return jn(n)?i.key=n:_o(n)&&Object.keys(n).forEach(s=>{WZ.includes(s)?a[s]=n[s]:i[s]=n[s]}),jn(r)?i.locale=r:_o(r)&&(a=r),_o(o)&&(a=o),[i.key||"",l,i,a]}const pMe=Object.freeze(Object.defineProperty({__proto__:null,CompileErrorCodes:kn,CoreErrorCodes:Gi,CoreWarnCodes:Ja,DATETIME_FORMAT_OPTIONS_KEYS:$Z,DEFAULT_LOCALE:o7,DEFAULT_MESSAGE_DATA_TYPE:mZ,MISSING_RESOLVE_VALUE:"",NOT_REOSLVED:-1,NUMBER_FORMAT_OPTIONS_KEYS:WZ,VERSION:EZ,clearCompileCache:function(){E0=Object.create(null)},clearDateTimeFormat:function(e,t,n){const r=e;for(const o in n){const i=`${t}__${o}`;r.__datetimeFormatters.has(i)&&r.__datetimeFormatters.delete(i)}},clearNumberFormat:function(e,t,n){const r=e;for(const o in n){const i=`${t}__${o}`;r.__numberFormatters.has(i)&&r.__numberFormatters.delete(i)}},compile:function(e,t){if(jn(e)){const n=!Xa(t.warnHtmlMessage)||t.warnHtmlMessage;IZ(e,n);const r=(t.onCacheKey||BZ)(e),o=E0[r];if(o)return o;const{ast:i,detectError:a}=LZ(e,{...t,location:!0,jit:!0}),l=FT(i);return a?l:E0[r]=l}{if(!C0(e))return G3(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),()=>e;const n=e.cacheKey;return n?E0[n]||(E0[n]=FT(e)):FT(e)}},compileToFunction:(e,t)=>{if(!jn(e))throw Du(Gi.NOT_SUPPORT_NON_STRING_MESSAGE);{IZ(e,!Xa(t.warnHtmlMessage)||t.warnHtmlMessage);const n=(t.onCacheKey||BZ)(e),r=E0[n];if(r)return r;const{code:o,detectError:i}=LZ(e,t),a=new Function(`return ${o}`)();return i?a:E0[n]=a}},createCompileError:Sm,createCoreContext:function(e={}){const t=Si(e.onWarn)?e.onWarn:G3,n=jn(e.version)?e.version:EZ,r=jn(e.locale)||Si(e.locale)?e.locale:o7,o=Si(r)?o7:r,i=_c(e.fallbackLocale)||_o(e.fallbackLocale)||jn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:o,a=_o(e.messages)?e.messages:{[o]:{}},l=_o(e.datetimeFormats)?e.datetimeFormats:{[o]:{}},s=_o(e.numberFormats)?e.numberFormats:{[o]:{}},u=Bf({},e.modifiers||{},{upper:(B,L)=>L==="text"&&jn(B)?B.toUpperCase():L==="vnode"&&ki(B)&&"__v_isVNode"in B?B.children.toUpperCase():B,lower:(B,L)=>L==="text"&&jn(B)?B.toLowerCase():L==="vnode"&&ki(B)&&"__v_isVNode"in B?B.children.toLowerCase():B,capitalize:(B,L)=>L==="text"&&jn(B)?CZ(B):L==="vnode"&&ki(B)&&"__v_isVNode"in B?CZ(B.children):B}),c=e.pluralRules||{},d=Si(e.missing)?e.missing:null,f=!Xa(e.missingWarn)&&!oZ(e.missingWarn)||e.missingWarn,p=!Xa(e.fallbackWarn)&&!oZ(e.fallbackWarn)||e.fallbackWarn,m=!!e.fallbackFormat,v=!!e.unresolving,g=Si(e.postTranslation)?e.postTranslation:null,b=_o(e.processor)?e.processor:null,y=!Xa(e.warnHtmlMessage)||e.warnHtmlMessage,w=!!e.escapeParameter,x=Si(e.messageCompiler)?e.messageCompiler:SZ;var _;Si(e.messageCompiler)&&(_=jf(Ja.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER),uZ[_]||(uZ[_]=!0,G3(_)));const E=Si(e.messageResolver)?e.messageResolver:kZ||vZ,C=Si(e.localeFallbacker)?e.localeFallbacker:DZ||xZ,T=ki(e.fallbackContext)?e.fallbackContext:void 0,k=e,I=ki(k.__datetimeFormatters)?k.__datetimeFormatters:new Map,O=ki(k.__numberFormatters)?k.__numberFormatters:new Map,F=ki(k.__meta)?k.__meta:{};NZ++;const N={version:n,cid:NZ,locale:r,fallbackLocale:i,messages:a,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:v,postTranslation:g,processor:b,warnHtmlMessage:y,escapeParameter:w,messageCompiler:x,messageResolver:E,localeFallbacker:C,fallbackContext:T,onWarn:t,__meta:F};return N.datetimeFormats=l,N.numberFormats=s,N.__datetimeFormatters=I,N.__numberFormatters=O,N.__v_emitter=k.__v_emitter!=null?k.__v_emitter:void 0,bZ(N,n,F),N},createCoreError:Du,createMessageContext:yZ,datetime:function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:i,localeFallbacker:a}=e,{__datetimeFormatters:l}=e;if(!dMe)return i(jf(Ja.CANNOT_FORMAT_DATE)),"";const[s,u,c,d]=UZ(...t),f=Xa(c.missingWarn)?c.missingWarn:e.missingWarn,p=Xa(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,m=!!c.part,v=r7(e,c),g=a(e,o,v);if(!jn(s)||s==="")return new Intl.DateTimeFormat(v,d).format(u);let b,y={},w=null,x=v,_=null;const E="datetime format";for(let k=0;k<g.length;k++){if(b=_=g[k],v!==b&&i7(p,s)&&i(jf(Ja.FALLBACK_TO_DATE_FORMAT,{key:s,target:b})),v!==b){const I=e.__v_emitter;I&&I.emit("fallback",{type:E,key:s,from:x,to:_,groupId:`${E}:${s}`})}if(y=n[b]||{},w=y[s],_o(w))break;a7(e,s,b,f,E),x=_}if(!_o(w)||!jn(b))return r?-1:s;let C=`${b}__${s}`;kT(d)||(C=`${C}__${JSON.stringify(d)}`);let T=l.get(C);return T||(T=new Intl.DateTimeFormat(b,Bf({},w,d)),l.set(C,T)),m?T.formatToParts(u):T.format(u)},fallbackWithLocaleChain:function(e,t,n){const r=jn(n)?n:o7,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let i=o.__localeChainCache.get(r);if(!i){i=[];let a=[n];for(;_c(a);)a=_Z(i,a,t);const l=_c(t)||!_o(t)?t:t.default?t.default:null;a=jn(l)?[l]:l,_c(a)&&_Z(i,a,!1),o.__localeChainCache.set(r,i)}return i},fallbackWithSimple:xZ,getAdditionalMeta:TZ,getDevToolsHook:function(){return Om},getFallbackContext:()=>MZ,getLocale:r7,getWarnMessage:jf,handleMissing:a7,initI18nDevTools:bZ,isMessageAST:C0,isMessageFunction:Us,isTranslateFallbackWarn:i7,isTranslateMissingWarn:FZ,number:function(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,onWarn:i,localeFallbacker:a}=e,{__numberFormatters:l}=e;if(!fMe)return i(jf(Ja.CANNOT_FORMAT_NUMBER)),"";const[s,u,c,d]=GZ(...t),f=Xa(c.missingWarn)?c.missingWarn:e.missingWarn,p=Xa(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,m=!!c.part,v=r7(e,c),g=a(e,o,v);if(!jn(s)||s==="")return new Intl.NumberFormat(v,d).format(u);let b,y={},w=null,x=v,_=null;const E="number format";for(let k=0;k<g.length;k++){if(b=_=g[k],v!==b&&i7(p,s)&&i(jf(Ja.FALLBACK_TO_NUMBER_FORMAT,{key:s,target:b})),v!==b){const I=e.__v_emitter;I&&I.emit("fallback",{type:E,key:s,from:x,to:_,groupId:`${E}:${s}`})}if(y=n[b]||{},w=y[s],_o(w))break;a7(e,s,b,f,E),x=_}if(!_o(w)||!jn(b))return r?-1:s;let C=`${b}__${s}`;kT(d)||(C=`${C}__${JSON.stringify(d)}`);let T=l.get(C);return T||(T=new Intl.NumberFormat(b,Bf({},w,d)),l.set(C,T)),m?T.formatToParts(u):T.format(u)},parse:pZ,parseDateTimeArgs:UZ,parseNumberArgs:GZ,parseTranslateArgs:zZ,registerLocaleFallbacker:function(e){DZ=e},registerMessageCompiler:function(e){SZ=e},registerMessageResolver:function(e){kZ=e},resolveLocale:NT,resolveValue:function(e,t){if(!ki(e))return null;let n=hZ.get(t);if(n||(n=pZ(t),n&&hZ.set(t,n)),!n)return null;const r=n.length;let o=e,i=0;for(;i<r;){const a=o[n[i]];if(a===void 0||Si(o))return null;o=a,i++}return o},resolveWithKeyValue:vZ,setAdditionalMeta:e=>{OZ=e},setDevToolsHook:function(e){Om=e},setFallbackContext:e=>{MZ=e},translate:function(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,messageCompiler:i,fallbackLocale:a,messages:l}=e,[s,u]=zZ(...t),c=Xa(u.missingWarn)?u.missingWarn:e.missingWarn,d=Xa(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=Xa(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,m=jn(u.default)||Xa(u.default)?Xa(u.default)?i?s:()=>s:u.default:n?i?s:()=>s:"",v=n||m!=="",g=r7(e,u);f&&function(O){_c(O.list)?O.list=O.list.map(F=>jn(F)?iZ(F):F):ki(O.named)&&Object.keys(O.named).forEach(F=>{jn(O.named[F])&&(O.named[F]=iZ(O.named[F]))})}(u);let[b,y,w]=p?[s,g,l[g]||{}]:jZ(e,s,g,a,d,c),x=b,_=s;if(p||jn(x)||C0(x)||Us(x)||v&&(x=m,_=x),!(p||(jn(x)||C0(x)||Us(x))&&jn(y)))return o?-1:s;if(jn(x)&&e.messageCompiler==null)return G3(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${s}'.`),s;let E=!1;const C=Us(x)?x:VZ(e,s,y,x,_,()=>{E=!0});if(E)return x;const T=function(O,F,N,B){const{modifiers:L,pluralRules:V,messageResolver:P,fallbackLocale:H,fallbackWarn:U,missingWarn:G,fallbackContext:z}=O,$=K=>{let X=P(N,K);if(X==null&&z){const[,,te]=jZ(z,K,F,H,U,G);X=P(te,K)}if(jn(X)||C0(X)){let te=!1;const ne=VZ(O,K,F,X,K,()=>{te=!0});return te?PZ:ne}return Us(X)?X:PZ},W={locale:F,modifiers:L,pluralRules:V,messages:$};return O.processor&&(W.processor=O.processor),B.list&&(W.list=B.list),B.named&&(W.named=B.named),is(B.plural)&&(W.pluralIndex=B.plural),W}(e,y,w,u),k=function(O,F,N){let B,L,V=null;w0&&(V=window.performance.now(),B="intlify-message-evaluation-start",L="intlify-message-evaluation-end",os&&os(B));const P=F(N);if(w0){const H=window.performance.now(),U=O.__v_emitter;U&&V&&U.emit("message-evaluation",{type:"message-evaluation",value:P,time:H-V,groupId:`translate:${F.key}`}),B&&L&&os&&x0&&(os(L),x0("intlify message evaluation",B,L))}return P}(e,C,yZ(T)),I=r?r(k,s):k;{const O={timestamp:Date.now(),key:jn(s)?s:Us(x)?x.key:"",locale:y||(Us(x)?x.locale:""),format:jn(x)?x:Us(x)?x.source:"",message:I};O.meta=Bf({},e.__meta,TZ()||{}),AZ(O)}return I},translateDevTools:AZ,updateFallbackLocale:function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}},Symbol.toStringTag,{value:"Module"})),hMe=B3(pMe);function l7(e,t){const n=new Set(e.split(","));return r=>n.has(r)}let Hr,S0,fr,qZ,Tm,s7,vo,u7,KZ,k0,Vf,q3,kd,D0,IT,O0,K3,Y3,c7,T0,X3,YZ,qi,XZ,Za,M0,Mm,Ws,N0,Q3,Nm,J3;Hr={},S0=[],fr=()=>{},qZ=()=>!1,Tm=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s7=e=>e.startsWith("onUpdate:"),vo=Object.assign,u7=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},KZ=Object.prototype.hasOwnProperty,Tn=(e,t)=>KZ.call(e,t),mt=Array.isArray,k0=e=>O0(e)==="[object Map]",Vf=e=>O0(e)==="[object Set]",q3=e=>O0(e)==="[object Date]",Ut=e=>typeof e=="function",an=e=>typeof e=="string",kd=e=>typeof e=="symbol",wn=e=>e!==null&&typeof e=="object",D0=e=>(wn(e)||Ut(e))&&Ut(e.then)&&Ut(e.catch),IT=Object.prototype.toString,O0=e=>IT.call(e),K3=e=>O0(e).slice(8,-1),Y3=e=>O0(e)==="[object Object]",c7=e=>an(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,T0=l7(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),X3=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},YZ=/-(\w)/g,qi=X3(e=>e.replace(YZ,(t,n)=>n?n.toUpperCase():"")),XZ=/\B([A-Z])/g,Za=X3(e=>e.replace(XZ,"-$1").toLowerCase()),M0=X3(e=>e.charAt(0).toUpperCase()+e.slice(1)),Mm=X3(e=>e?`on${M0(e)}`:""),Ws=(e,t)=>!Object.is(e,t),N0=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Q3=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Nm=e=>{const t=parseFloat(e);return isNaN(t)?e:t},J3=e=>{const t=an(e)?Number(e):NaN;return isNaN(t)?e:t};let QZ;const JZ=()=>QZ||(QZ=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),vMe=l7("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");$t=function(e){if(mt(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=an(r)?bMe(r):$t(r);if(o)for(const i in o)t[i]=o[i]}return t}if(an(e)||wn(e))return e};const mMe=/;(?![^(]*\))/g,gMe=/:([^]+)/,yMe=/\/\*[^]*?\*\//g;function bMe(e){const t={};return e.replace(yMe,"").split(mMe).forEach(n=>{if(n){const r=n.split(gMe);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}oe=function(e){let t="";if(an(e))t=e;else if(mt(e))for(let n=0;n<e.length;n++){const r=oe(e[n]);r&&(t+=r+" ")}else if(wn(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()},iJ=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!an(t)&&(e.class=oe(t)),n&&(e.style=$t(n)),e};const AMe=l7("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function ZZ(e){return!!e||e===""}function zf(e,t){if(e===t)return!0;let n=q3(e),r=q3(t);if(n||r)return!(!n||!r)&&e.getTime()===t.getTime();if(n=kd(e),r=kd(t),n||r)return e===t;if(n=mt(e),r=mt(t),n||r)return!(!n||!r)&&function(o,i){if(o.length!==i.length)return!1;let a=!0;for(let l=0;a&&l<o.length;l++)a=zf(o[l],i[l]);return a}(e,t);if(n=wn(e),r=wn(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(const o in e){const i=e.hasOwnProperty(o),a=t.hasOwnProperty(o);if(i&&!a||!i&&a||!zf(e[o],t[o]))return!1}}return String(e)===String(t)}function d7(e,t){return e.findIndex(n=>zf(n,t))}let BT,f7;Ye=e=>an(e)?e:e==null?"":mt(e)||wn(e)&&(e.toString===IT||!Ut(e.toString))?JSON.stringify(e,BT,2):String(e),BT=(e,t)=>t&&t.__v_isRef?BT(e,t.value):k0(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[f7(r,i)+" =>"]=o,n),{})}:Vf(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>f7(n))}:kd(t)?f7(t):!wn(t)||mt(t)||Y3(t)?t:String(t),f7=(e,t="")=>{var n;return kd(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let as,F0;class LT{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=as,!t&&as&&(this.index=(as.scopes||(as.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=as;try{return as=this,t()}finally{as=n}}}on(){as=this}off(){as=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function p7(e){return new LT(e)}function eee(e,t=as){t&&t.active&&t.effects.push(e)}function Z3(){return as}function eb(e){as&&as.cleanups.push(e)}class Fm{constructor(t,n,r,o){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,eee(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,R0();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(n.computed.value,this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),I0()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Hf,n=F0;try{return Hf=!0,F0=this,this._runnings++,tee(this),this.fn()}finally{nee(this),this._runnings--,F0=n,Hf=t}}stop(){var t;this.active&&(tee(this),nee(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function tee(e){e._trackId++,e._depsLength=0}function nee(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)ree(e.deps[t],e);e.deps.length=e._depsLength}}function ree(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Hf=!0,PT=0;const oee=[];function R0(){oee.push(Hf),Hf=!1}function I0(){const e=oee.pop();Hf=e===void 0||e}function jT(){PT++}function VT(){for(PT--;!PT&&zT.length;)zT.shift()()}function iee(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&ree(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const zT=[];function aee(e,t,n){jT();for(const r of e.keys()){let o;r._dirtyLevel<t&&(o??(o=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(o??(o=e.get(r)===r._trackId))&&(r.trigger(),r._runnings&&!r.allowRecurse||r._dirtyLevel===2||(r._shouldSchedule=!1,r.scheduler&&zT.push(r.scheduler)))}VT()}const lee=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},h7=new WeakMap,B0=Symbol(""),HT=Symbol("");function Cl(e,t,n){if(Hf&&F0){let r=h7.get(e);r||h7.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=lee(()=>r.delete(n))),iee(F0,o)}}function Dd(e,t,n,r,o,i){const a=h7.get(e);if(!a)return;let l=[];if(t==="clear")l=[...a.values()];else if(n==="length"&&mt(e)){const s=Number(r);a.forEach((u,c)=>{(c==="length"||!kd(c)&&c>=s)&&l.push(u)})}else switch(n!==void 0&&l.push(a.get(n)),t){case"add":mt(e)?c7(n)&&l.push(a.get("length")):(l.push(a.get(B0)),k0(e)&&l.push(a.get(HT)));break;case"delete":mt(e)||(l.push(a.get(B0)),k0(e)&&l.push(a.get(HT)));break;case"set":k0(e)&&l.push(a.get(B0))}jT();for(const s of l)s&&aee(s,4);VT()}const wMe=l7("__proto__,__v_isRef,__isVue"),see=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kd)),uee=xMe();function xMe(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Zn(this);for(let i=0,a=this.length;i<a;i++)Cl(r,0,i+"");const o=r[t](...n);return o===-1||o===!1?r[t](...n.map(Zn)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){R0(),jT();const r=Zn(this)[t].apply(this,n);return VT(),I0(),r}}),e}function _Me(e){const t=Zn(this);return Cl(t,0,e),t.hasOwnProperty(e)}class cee{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Aee:bee:i?yee:gee).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=mt(t);if(!o){if(a&&Tn(uee,n))return Reflect.get(uee,n,r);if(n==="hasOwnProperty")return _Me}const l=Reflect.get(t,n,r);return(kd(n)?see.has(n):wMe(n))?l:(o||Cl(t,0,n),i?l:Jn(l)?a&&c7(n)?l:l.value:wn(l)?o?xd(l):Qn(l):l)}}class dee extends cee{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];if(!this._isShallow){const s=L0(i);if(tb(r)||L0(r)||(i=Zn(i),r=Zn(r)),!mt(t)&&Jn(i)&&!Jn(r))return!s&&(i.value=r,!0)}const a=mt(t)&&c7(n)?Number(n)<t.length:Tn(t,n),l=Reflect.set(t,n,r,o);return t===Zn(o)&&(a?Ws(r,i)&&Dd(t,"set",n,r):Dd(t,"add",n,r)),l}deleteProperty(t,n){const r=Tn(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&r&&Dd(t,"delete",n,void 0),o}has(t,n){const r=Reflect.has(t,n);return kd(n)&&see.has(n)||Cl(t,0,n),r}ownKeys(t){return Cl(t,0,mt(t)?"length":B0),Reflect.ownKeys(t)}}class fee extends cee{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const EMe=new dee,CMe=new fee,SMe=new dee(!0),kMe=new fee(!0),$T=e=>e,v7=e=>Reflect.getPrototypeOf(e);function m7(e,t,n=!1,r=!1){const o=Zn(e=e.__v_raw),i=Zn(t);n||(Ws(t,i)&&Cl(o,0,t),Cl(o,0,i));const{has:a}=v7(o),l=r?$T:n?WT:nb;return a.call(o,t)?l(e.get(t)):a.call(o,i)?l(e.get(i)):void(e!==o&&e.get(t))}function g7(e,t=!1){const n=this.__v_raw,r=Zn(n),o=Zn(e);return t||(Ws(e,o)&&Cl(r,0,e),Cl(r,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function y7(e,t=!1){return e=e.__v_raw,!t&&Cl(Zn(e),0,B0),Reflect.get(e,"size",e)}function pee(e){e=Zn(e);const t=Zn(this);return v7(t).has.call(t,e)||(t.add(e),Dd(t,"add",e,e)),this}function hee(e,t){t=Zn(t);const n=Zn(this),{has:r,get:o}=v7(n);let i=r.call(n,e);i||(e=Zn(e),i=r.call(n,e));const a=o.call(n,e);return n.set(e,t),i?Ws(t,a)&&Dd(n,"set",e,t):Dd(n,"add",e,t),this}function vee(e){const t=Zn(this),{has:n,get:r}=v7(t);let o=n.call(t,e);o||(e=Zn(e),o=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return o&&Dd(t,"delete",e,void 0),i}function mee(){const e=Zn(this),t=e.size!==0,n=e.clear();return t&&Dd(e,"clear",void 0,void 0),n}function b7(e,t){return function(n,r){const o=this,i=o.__v_raw,a=Zn(i),l=t?$T:e?WT:nb;return!e&&Cl(a,0,B0),i.forEach((s,u)=>n.call(r,l(s),l(u),o))}}function A7(e,t,n){return function(...r){const o=this.__v_raw,i=Zn(o),a=k0(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,u=o[e](...r),c=n?$T:t?WT:nb;return!t&&Cl(i,0,s?HT:B0),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function $f(e){return function(...t){return e!=="delete"&&(e==="clear"?void 0:this)}}function DMe(){const e={get(o){return m7(this,o)},get size(){return y7(this)},has:g7,add:pee,set:hee,delete:vee,clear:mee,forEach:b7(!1,!1)},t={get(o){return m7(this,o,!1,!0)},get size(){return y7(this)},has:g7,add:pee,set:hee,delete:vee,clear:mee,forEach:b7(!1,!0)},n={get(o){return m7(this,o,!0)},get size(){return y7(this,!0)},has(o){return g7.call(this,o,!0)},add:$f("add"),set:$f("set"),delete:$f("delete"),clear:$f("clear"),forEach:b7(!0,!1)},r={get(o){return m7(this,o,!0,!0)},get size(){return y7(this,!0)},has(o){return g7.call(this,o,!0)},add:$f("add"),set:$f("set"),delete:$f("delete"),clear:$f("clear"),forEach:b7(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=A7(o,!1,!1),n[o]=A7(o,!0,!1),t[o]=A7(o,!1,!0),r[o]=A7(o,!0,!0)}),[e,n,t,r]}const[OMe,TMe,MMe,NMe]=DMe();function w7(e,t){const n=t?e?NMe:MMe:e?TMe:OMe;return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Tn(n,o)&&o in r?n:r,o,i)}const FMe={get:w7(!1,!1)},RMe={get:w7(!1,!0)},IMe={get:w7(!0,!1)},BMe={get:w7(!0,!0)},gee=new WeakMap,yee=new WeakMap,bee=new WeakMap,Aee=new WeakMap;Qn=function(e){return L0(e)?e:_7(e,!1,EMe,FMe,gee)};function x7(e){return _7(e,!1,SMe,RMe,yee)}xd=function(e){return _7(e,!0,CMe,IMe,bee)};function _7(e,t,n,r,o){if(!wn(e)||e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=o.get(e);if(i)return i;const a=(l=e).__v_skip||!Object.isExtensible(l)?0:function(u){switch(u){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(K3(l));var l;if(a===0)return e;const s=new Proxy(e,a===2?r:n);return o.set(e,s),s}function Od(e){return L0(e)?Od(e.__v_raw):!(!e||!e.__v_isReactive)}function L0(e){return!(!e||!e.__v_isReadonly)}function tb(e){return!(!e||!e.__v_isShallow)}function UT(e){return Od(e)||L0(e)}Zn=function(e){const t=e&&e.__v_raw;return t?Zn(t):e};function Fo(e){return Object.isExtensible(e)&&Q3(e,"__v_skip",!0),e}const nb=e=>wn(e)?Qn(e):e,WT=e=>wn(e)?xd(e):e;class wee{constructor(t,n,r,o){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Fm(()=>t(this._value),()=>Rm(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=Zn(this);return t._cacheable&&!t.effect.dirty||!Ws(t._value,t._value=t.effect.run())||Rm(t,4),GT(t),t.effect._dirtyLevel>=2&&Rm(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function xee(e,t,n=!1){let r,o;const i=Ut(e);return i?(r=e,o=fr):(r=e.get,o=e.set),new wee(r,o,i||!o,n)}function GT(e){var t;Hf&&F0&&(e=Zn(e),iee(F0,(t=e.dep)!=null?t:e.dep=lee(()=>e.dep=void 0,e instanceof wee?e:void 0)))}function Rm(e,t=4,n){const r=(e=Zn(e)).dep;r&&aee(r,t)}Jn=function(e){return!(!e||e.__v_isRef!==!0)},de=function(e){return _ee(e,!1)},Qo=function(e){return _ee(e,!0)};function _ee(e,t){return Jn(e)?e:new LMe(e,t)}class LMe{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Zn(t),this._value=n?t:nb(t)}get value(){return GT(this),this._value}set value(t){const n=this.__v_isShallow||tb(t)||L0(t);t=n?t:Zn(t),Ws(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:nb(t),Rm(this,4))}}M=function(e){return Jn(e)?e.value:e};const PMe={get:(e,t,n)=>M(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Jn(o)&&!Jn(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function qT(e){return Od(e)?e:new Proxy(e,PMe)}class jMe{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>GT(this),()=>Rm(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function KT(e){return new jMe(e)}di=function(e){const t=mt(e)?new Array(e.length):{};for(const n in e)t[n]=Eee(e,n);return t};class VMe{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return function(t,n){var r;return(r=h7.get(t))==null?void 0:r.get(n)}(Zn(this._object),this._key)}}class zMe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}dr=function(e,t,n){return Jn(e)?e:Ut(e)?new zMe(e):wn(e)&&arguments.length>1?Eee(e,t,n):de(e)};function Eee(e,t,n){const r=e[t];return Jn(r)?r:new VMe(e,t,n)}const HMe={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function Td(e,t,n,r){try{return r?e(...r):e()}catch(o){P0(o,t,n)}}function ls(e,t,n,r){if(Ut(e)){const i=Td(e,t,n,r);return i&&D0(i)&&i.catch(a=>{P0(a,t,n)}),i}const o=[];for(let i=0;i<e.length;i++)o.push(ls(e[i],t,n,r));return o}function P0(e,t,n,r=!0){if(t&&t.vnode,t){let o=t.parent;const i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const s=o.ec;if(s){for(let u=0;u<s.length;u++)if(s[u](e,i,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l)return void Td(l,null,10,[e,i,a])}(function(o){console.error(o)})(e,0,0,r)}let rb=!1,YT=!1;const Da=[];let Cc=0;const Im=[];let Uf=null,j0=0;const Cee=Promise.resolve();let XT=null;St=function(e){const t=XT||Cee;return e?t.then(this?e.bind(this):e):t};function E7(e){Da.length&&Da.includes(e,rb&&e.allowRecurse?Cc+1:Cc)||(e.id==null?Da.push(e):Da.splice(function(t){let n=Cc+1,r=Da.length;for(;n<r;){const o=n+r>>>1,i=Da[o],a=ob(i);a<t||a===t&&i.pre?n=o+1:r=o}return n}(e.id),0,e),See())}function See(){rb||YT||(YT=!0,XT=Cee.then(Dee))}function C7(e){mt(e)?Im.push(...e):Uf&&Uf.includes(e,e.allowRecurse?j0+1:j0)||Im.push(e),See()}function kee(e,t,n=rb?Cc+1:0){for(;n<Da.length;n++){const r=Da[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;Da.splice(n,1),n--,r()}}}function S7(e){if(Im.length){const t=[...new Set(Im)].sort((n,r)=>ob(n)-ob(r));if(Im.length=0,Uf)return void Uf.push(...t);for(Uf=t,j0=0;j0<Uf.length;j0++)Uf[j0]();Uf=null,j0=0}}const ob=e=>e.id==null?1/0:e.id,$Me=(e,t)=>{const n=ob(e)-ob(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Dee(e){YT=!1,rb=!0,Da.sort($Me);try{for(Cc=0;Cc<Da.length;Cc++){const t=Da[Cc];t&&t.active!==!1&&Td(t,null,14)}}finally{Cc=0,Da.length=0,S7(),rb=!1,XT=null,(Da.length||Im.length)&&Dee()}}let Bm,k7=[];function UMe(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Hr;let o=n;const i=t.startsWith("update:"),a=i&&t.slice(7);if(a&&a in r){const c=`${a==="modelValue"?"model":a}Modifiers`,{number:d,trim:f}=r[c]||Hr;f&&(o=n.map(p=>an(p)?p.trim():p)),d&&(o=n.map(Nm))}let l,s=r[l=Mm(t)]||r[l=Mm(qi(t))];!s&&i&&(s=r[l=Mm(Za(t))]),s&&ls(s,e,6,o);const u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,ls(u,e,6,o)}}function Oee(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let a={},l=!1;if(!Ut(e)){const s=u=>{const c=Oee(u,t,!0);c&&(l=!0,vo(a,c))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return i||l?(mt(i)?i.forEach(s=>a[s]=null):vo(a,i),wn(e)&&r.set(e,a),a):(wn(e)&&r.set(e,null),null)}function D7(e,t){return!(!e||!Tm(t))&&(t=t.slice(2).replace(/Once$/,""),Tn(e,t[0].toLowerCase()+t.slice(1))||Tn(e,Za(t))||Tn(e,t))}let pi=null,O7=null;function ib(e){const t=pi;return pi=e,O7=e&&e.type.__scopeId||null,t}xw=function(e){O7=e},_w=function(){O7=null},he=function(e,t=pi,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&_M(-1);const i=ib(t);let a;try{a=e(...o)}finally{ib(i),r._d&&_M(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r};function T7(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:i,propsOptions:[a],slots:l,attrs:s,emit:u,render:c,renderCache:d,data:f,setupState:p,ctx:m,inheritAttrs:v}=e;let g,b;const y=ib(e);try{if(4&n.shapeFlag){const x=o||r,_=x;g=ss(c.call(_,x,d,i,p,f,m)),b=s}else{const x=t;g=ss(x.length>1?x(i,{attrs:s,slots:l,emit:u}):x(i,null)),b=t.props?s:WMe(s)}}catch(x){zm.length=0,P0(x,e,1),g=ie(hi)}let w=g;if(b&&v!==!1){const x=Object.keys(b),{shapeFlag:_}=w;x.length&&7&_&&(a&&x.some(s7)&&(b=GMe(b,a)),w=Tu(w,b))}return n.dirs&&(w=Tu(w),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),g=w,ib(y),g}const WMe=e=>{let t;for(const n in e)(n==="class"||n==="style"||Tm(n))&&((t||(t={}))[n]=e[n]);return t},GMe=(e,t)=>{const n={};for(const r in e)s7(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function Tee(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const i=r[o];if(t[i]!==e[i]&&!D7(n,i))return!0}return!1}function QT({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r!==e)break;(e=t.vnode).el=n,t=t.parent}}const JT="components",qMe="directives";Qe=function(e,t){return ZT(JT,e,!0,t)||e};const Mee=Symbol.for("v-ndc");Hn=function(e){return an(e)?ZT(JT,e,!1)||e:e||Mee},gm=function(e){return ZT(qMe,e)};function ZT(e,t,n=!0,r=!1){const o=pi||Di;if(o){const i=o.type;if(e===JT){const l=OM(i,!1);if(l&&(l===t||l===qi(t)||l===M0(qi(t))))return i}const a=Nee(o[e]||i[e],t)||Nee(o.appContext[e],t);return!a&&r?i:a}}function Nee(e,t){return e&&(e[t]||e[qi(t)]||e[M0(qi(t))])}const Fee=e=>e.__isSuspense;let eM=0;const KMe={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,i,a,l,s,u){if(e==null)(function(c,d,f,p,m,v,g,b,y){const{p:w,o:{createElement:x}}=y,_=x("div"),E=c.suspense=tM(c,m,p,d,_,f,v,g,b,y);w(null,E.pendingBranch=c.ssContent,_,null,p,E,v,g),E.deps>0?(ab(c,"onPending"),ab(c,"onFallback"),w(null,c.ssFallback,d,f,p,null,v,g),Lm(E,c.ssFallback)):E.resolve(!1,!0)})(t,n,r,o,i,a,l,s,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);(function(c,d,f,p,m,v,g,b,{p:y,um:w,o:{createElement:x}}){const _=d.suspense=c.suspense;_.vnode=d,d.el=c.el;const E=d.ssContent,C=d.ssFallback,{activeBranch:T,pendingBranch:k,isInFallback:I,isHydrating:O}=_;if(k)_.pendingBranch=E,Ou(E,k)?(y(k,E,_.hiddenContainer,null,m,_,v,g,b),_.deps<=0?_.resolve():I&&(O||(y(T,C,f,p,m,null,v,g,b),Lm(_,C)))):(_.pendingId=eM++,O?(_.isHydrating=!1,_.activeBranch=k):w(k,m,_),_.deps=0,_.effects.length=0,_.hiddenContainer=x("div"),I?(y(null,E,_.hiddenContainer,null,m,_,v,g,b),_.deps<=0?_.resolve():(y(T,C,f,p,m,null,v,g,b),Lm(_,C))):T&&Ou(E,T)?(y(T,E,f,p,m,_,v,g,b),_.resolve(!0)):(y(null,E,_.hiddenContainer,null,m,_,v,g,b),_.deps<=0&&_.resolve()));else if(T&&Ou(E,T))y(T,E,f,p,m,_,v,g,b),Lm(_,E);else if(ab(d,"onPending"),_.pendingBranch=E,512&E.shapeFlag?_.pendingId=E.component.suspenseId:_.pendingId=eM++,y(null,E,_.hiddenContainer,null,m,_,v,g,b),_.deps<=0)_.resolve();else{const{timeout:F,pendingId:N}=_;F>0?setTimeout(()=>{_.pendingId===N&&_.fallback(C)},F):F===0&&_.fallback(C)}})(e,t,n,r,o,a,l,s,u)}},hydrate:function(e,t,n,r,o,i,a,l,s){const u=t.suspense=tM(t,r,n,e.parentNode,document.createElement("div"),null,o,i,a,l,!0),c=s(e,u.pendingBranch=t.ssContent,n,u,i,a);return u.deps===0&&u.resolve(!1,!0),c},create:tM,normalize:function(e){const{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=Ree(r?n.default:n),e.ssFallback=r?Ree(n.fallback):ie(hi)}},YMe=KMe;function ab(e,t){const n=e.props&&e.props[t];Ut(n)&&n()}function tM(e,t,n,r,o,i,a,l,s,u,c=!1){const{p:d,m:f,um:p,n:m,o:{parentNode:v,remove:g}}=u;let b;const y=function(E){var C;return((C=E.props)==null?void 0:C.suspensible)!=null&&E.props.suspensible!==!1}(e);y&&(t!=null&&t.pendingBranch)&&(b=t.pendingId,t.deps++);const w=e.props?J3(e.props.timeout):void 0,x=i,_={vnode:e,parent:t,parentComponent:n,namespace:a,container:r,hiddenContainer:o,deps:0,pendingId:eM++,timeout:typeof w=="number"?w:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(E=!1,C=!1){const{vnode:T,activeBranch:k,pendingBranch:I,pendingId:O,effects:F,parentComponent:N,container:B}=_;let L=!1;_.isHydrating?_.isHydrating=!1:E||(L=k&&I.transition&&I.transition.mode==="out-in",L&&(k.transition.afterLeave=()=>{O===_.pendingId&&(f(I,B,i===x?m(k):i,0),C7(F))}),k&&(v(k.el)!==_.hiddenContainer&&(i=m(k)),p(k,N,_,!0)),L||f(I,B,i,0)),Lm(_,I),_.pendingBranch=null,_.isInFallback=!1;let V=_.parent,P=!1;for(;V;){if(V.pendingBranch){V.effects.push(...F),P=!0;break}V=V.parent}P||L||C7(F),_.effects=[],y&&t&&t.pendingBranch&&b===t.pendingId&&(t.deps--,t.deps!==0||C||t.resolve()),ab(T,"onResolve")},fallback(E){if(!_.pendingBranch)return;const{vnode:C,activeBranch:T,parentComponent:k,container:I,namespace:O}=_;ab(C,"onFallback");const F=m(T),N=()=>{_.isInFallback&&(d(null,E,I,F,k,null,O,l,s),Lm(_,E))},B=E.transition&&E.transition.mode==="out-in";B&&(T.transition.afterLeave=N),_.isInFallback=!0,p(T,k,null,!0),B||N()},move(E,C,T){_.activeBranch&&f(_.activeBranch,E,C,T),_.container=E},next:()=>_.activeBranch&&m(_.activeBranch),registerDep(E,C){const T=!!_.pendingBranch;T&&_.deps++;const k=E.vnode.el;E.asyncDep.catch(I=>{P0(I,E,0)}).then(I=>{if(E.isUnmounted||_.isUnmounted||_.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:O}=E;DM(E,I,!1),k&&(O.el=k);const F=!k&&E.subTree.el;C(E,O,v(k||E.subTree.el),k?null:m(E.subTree),_,a,s),F&&g(F),QT(E,O.el),T&&--_.deps==0&&_.resolve()})},unmount(E,C){_.isUnmounted=!0,_.activeBranch&&p(_.activeBranch,n,E,C),_.pendingBranch&&p(_.pendingBranch,n,E,C)}};return _}function Ree(e){let t;if(Ut(e)){const n=U0&&e._c;n&&(e._d=!1,Y()),e=e(),n&&(e._d=!0,t=Sl,Ate())}return mt(e)&&(e=function(r){let o;for(let i=0;i<r.length;i++){const a=r[i];if(!oo(a))return;if(a.type!==hi||a.children==="v-if"){if(o)return;o=a}}return o}(e)),e=ss(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Iee(e,t){t&&t.pendingBranch?mt(e)?t.effects.push(...e):t.effects.push(e):C7(e)}function Lm(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let o=t.el;for(;!o&&t.component;)o=(t=t.component.subTree).el;n.el=o,r&&r.subTree===n&&(r.vnode.el=o,QT(r,o))}const Bee=Symbol.for("v-scx"),Lee=()=>Rt(Bee);yl=function(e,t){return lb(e,null,t)};function Pee(e,t){return lb(e,null,{flush:"post"})}function jee(e,t){return lb(e,null,{flush:"sync"})}const M7={};Je=function(e,t,n){return lb(e,t,n)};function lb(e,t,{immediate:n,deep:r,flush:o,once:i,onTrack:a,onTrigger:l}=Hr){if(t&&i){const E=t;t=(...C)=>{E(...C),_()}}const s=Di,u=E=>r===!0?E:V0(E,r===!1?1:void 0);let c,d,f=!1,p=!1;if(Jn(e)?(c=()=>e.value,f=tb(e)):Od(e)?(c=()=>u(e),f=!0):mt(e)?(p=!0,f=e.some(E=>Od(E)||tb(E)),c=()=>e.map(E=>Jn(E)?E.value:Od(E)?u(E):Ut(E)?Td(E,s,2):void 0)):c=Ut(e)?t?()=>Td(e,s,2):()=>(d&&d(),ls(e,s,3,[v])):fr,t&&r){const E=c;c=()=>V0(E())}let m,v=E=>{d=w.onStop=()=>{Td(E,s,4),d=w.onStop=void 0}};if(hb){if(v=fr,t?n&&ls(t,s,3,[c(),p?[]:void 0,v]):c(),o!=="sync")return fr;{const E=Lee();m=E.__watcherHandles||(E.__watcherHandles=[])}}let g=p?new Array(e.length).fill(M7):M7;const b=()=>{if(w.active&&w.dirty)if(t){const E=w.run();(r||f||(p?E.some((C,T)=>Ws(C,g[T])):Ws(E,g)))&&(d&&d(),ls(t,s,3,[E,g===M7?void 0:p&&g[0]===M7?[]:g,v]),g=E)}else w.run()};let y;b.allowRecurse=!!t,o==="sync"?y=b:o==="post"?y=()=>ha(b,s&&s.suspense):(b.pre=!0,s&&(b.id=s.uid),y=()=>E7(b));const w=new Fm(c,fr,y),x=Z3(),_=()=>{w.stop(),x&&u7(x.effects,w)};return t?n?b():g=w.run():o==="post"?ha(w.run.bind(w),s&&s.suspense):w.run(),m&&m.push(_),_}function XMe(e,t,n){const r=this.proxy,o=an(e)?e.includes(".")?Vee(r,e):()=>r[e]:e.bind(r,r);let i;Ut(t)?i=t:(i=t.handler,n=t);const a=W0(this),l=lb(o,i.bind(r),n);return a(),l}function Vee(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}function V0(e,t,n=0,r){if(!wn(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((r=r||new Set).has(e))return e;if(r.add(e),Jn(e))V0(e.value,t,n,r);else if(mt(e))for(let o=0;o<e.length;o++)V0(e[o],t,n,r);else if(Vf(e)||k0(e))e.forEach(o=>{V0(o,t,n,r)});else if(Y3(e))for(const o in e)V0(e[o],t,n,r);return e}nn=function(e,t){if(pi===null)return e;const n=U7(pi)||pi.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[i,a,l,s=Hr]=t[o];i&&(Ut(i)&&(i={mounted:i,updated:i}),i.deep&&V0(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:l,modifiers:s}))}return e};function Sc(e,t,n,r){const o=e.dirs,i=t&&t.dirs;for(let a=0;a<o.length;a++){const l=o[a];i&&(l.oldValue=i[a].value);let s=l.dir[r];s&&(R0(),ls(s,n,8,[e.el,l,e,t]),I0())}}const Wf=Symbol("_leaveCb"),N7=Symbol("_enterCb");function nM(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return yn(()=>{e.isMounted=!0}),xo(()=>{e.isUnmounting=!0}),e}const Gs=[Function,Array],rM={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gs,onEnter:Gs,onAfterEnter:Gs,onEnterCancelled:Gs,onBeforeLeave:Gs,onLeave:Gs,onAfterLeave:Gs,onLeaveCancelled:Gs,onBeforeAppear:Gs,onAppear:Gs,onAfterAppear:Gs,onAppearCancelled:Gs},QMe={name:"BaseTransition",props:rM,setup(e,{slots:t}){const n=dn(),r=nM();return()=>{const o=t.default&&F7(t.default(),!0);if(!o||!o.length)return;let i=o[0];if(o.length>1){for(const f of o)if(f.type!==hi){i=f;break}}const a=Zn(e),{mode:l}=a;if(r.isLeaving)return oM(i);const s=$ee(i);if(!s)return oM(i);const u=Pm(s,a,r,n);z0(s,u);const c=n.subTree,d=c&&$ee(c);if(d&&d.type!==hi&&!Ou(s,d)){const f=Pm(d,a,r,n);if(z0(d,f),l==="out-in")return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},oM(i);l==="in-out"&&s.type!==hi&&(f.delayLeave=(p,m,v)=>{Hee(r,d)[String(d.key)]=d,p[Wf]=()=>{m(),p[Wf]=void 0,delete u.delayedLeave},u.delayedLeave=v})}return i}}},zee=QMe;function Hee(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Pm(e,t,n,r){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:s,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:v,onAppear:g,onAfterAppear:b,onAppearCancelled:y}=t,w=String(e.key),x=Hee(n,e),_=(T,k)=>{T&&ls(T,r,9,k)},E=(T,k)=>{const I=k[1];_(T,k),mt(T)?T.every(O=>O.length<=1)&&I():T.length<=1&&I()},C={mode:i,persisted:a,beforeEnter(T){let k=l;if(!n.isMounted){if(!o)return;k=v||l}T[Wf]&&T[Wf](!0);const I=x[w];I&&Ou(e,I)&&I.el[Wf]&&I.el[Wf](),_(k,[T])},enter(T){let k=s,I=u,O=c;if(!n.isMounted){if(!o)return;k=g||s,I=b||u,O=y||c}let F=!1;const N=T[N7]=B=>{F||(F=!0,_(B?O:I,[T]),C.delayedLeave&&C.delayedLeave(),T[N7]=void 0)};k?E(k,[T,N]):N()},leave(T,k){const I=String(e.key);if(T[N7]&&T[N7](!0),n.isUnmounting)return k();_(d,[T]);let O=!1;const F=T[Wf]=N=>{O||(O=!0,k(),_(N?m:p,[T]),T[Wf]=void 0,x[I]===e&&delete x[I])};x[I]=e,f?E(f,[T,F]):F()},clone:T=>Pm(T,t,n,r)};return C}function oM(e){if(jm(e))return(e=Tu(e)).children=null,e}function $ee(e){return jm(e)?e.children?e.children[0]:void 0:e}function z0(e,t){6&e.shapeFlag&&e.component?z0(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function F7(e,t=!1,n){let r=[],o=0;for(let i=0;i<e.length;i++){let a=e[i];const l=n==null?a.key:String(n)+String(a.key!=null?a.key:i);a.type===bt?(128&a.patchFlag&&o++,r=r.concat(F7(a.children,t,l))):(t||a.type!==hi)&&r.push(l!=null?Tu(a,{key:l}):a)}if(o>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}Te=function(e,t){return Ut(e)?vo({name:e.name},t,{setup:e}):e};const H0=e=>!!e.type.__asyncLoader;function Uee(e){Ut(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:i,suspensible:a=!0,onError:l}=e;let s,u=null,c=0;const d=()=>{let f;return u||(f=u=t().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),l)return new Promise((m,v)=>{l(p,()=>m((c++,u=null,d())),()=>v(p),c+1)});throw p}).then(p=>f!==u&&u?u:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),s=p,p)))};return Te({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return s},setup(){const f=Di;if(s)return()=>iM(s,f);const p=b=>{u=null,P0(b,f,13,!r)};if(a&&f.suspense||hb)return d().then(b=>()=>iM(b,f)).catch(b=>(p(b),()=>r?ie(r,{error:b}):null));const m=de(!1),v=de(),g=de(!!o);return o&&setTimeout(()=>{g.value=!1},o),i!=null&&setTimeout(()=>{if(!m.value&&!v.value){const b=new Error(`Async component timed out after ${i}ms.`);p(b),v.value=b}},i),d().then(()=>{m.value=!0,f.parent&&jm(f.parent.vnode)&&(f.parent.effect.dirty=!0,E7(f.parent.update))}).catch(b=>{p(b),v.value=b}),()=>m.value&&s?iM(s,f):v.value&&r?ie(r,{error:v.value}):n&&!g.value?ie(n):void 0}})}function iM(e,t){const{ref:n,props:r,children:o,ce:i}=t.vnode,a=ie(e,r,o);return a.ref=n,a.ce=i,delete t.vnode.ce,a}let jm,Wee;jm=e=>e.type.__isKeepAlive,Wee={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=dn(),r=n.ctx;if(!r.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const o=new Map,i=new Set;let a=null;const l=n.suspense,{renderer:{p:s,m:u,um:c,o:{createElement:d}}}=r,f=d("div");function p(y){lM(y),c(y,n,l,!0)}function m(y){o.forEach((w,x)=>{const _=OM(w.type);!_||y&&y(_)||v(x)})}function v(y){const w=o.get(y);a&&Ou(w,a)?a&&lM(a):p(w),o.delete(y),i.delete(y)}r.activate=(y,w,x,_,E)=>{const C=y.component;u(y,w,x,0,l),s(C.vnode,y,w,x,C,l,_,y.slotScopeIds,E),ha(()=>{C.isDeactivated=!1,C.a&&N0(C.a);const T=y.props&&y.props.onVnodeMounted;T&&kl(T,C.parent,y)},l)},r.deactivate=y=>{const w=y.component;u(y,f,null,1,l),ha(()=>{w.da&&N0(w.da);const x=y.props&&y.props.onVnodeUnmounted;x&&kl(x,w.parent,y),w.isDeactivated=!0},l)},Je(()=>[e.include,e.exclude],([y,w])=>{y&&m(x=>sb(y,x)),w&&m(x=>!sb(w,x))},{flush:"post",deep:!0});let g=null;const b=()=>{g!=null&&o.set(g,sM(n.subTree))};return yn(b),zs(b),xo(()=>{o.forEach(y=>{const{subTree:w,suspense:x}=n,_=sM(w);if(y.type!==_.type||y.key!==_.key)p(y);else{lM(_);const E=_.component.da;E&&ha(E,x)}})}),()=>{if(g=null,!t.default)return null;const y=t.default(),w=y[0];if(y.length>1)return a=null,y;if(!(oo(w)&&(4&w.shapeFlag||128&w.shapeFlag)))return a=null,w;let x=sM(w);const _=x.type,E=OM(H0(x)?x.type.__asyncResolved||{}:_),{include:C,exclude:T,max:k}=e;if(C&&(!E||!sb(C,E))||T&&E&&sb(T,E))return a=x,w;const I=x.key==null?_:x.key,O=o.get(I);return x.el&&(x=Tu(x),128&w.shapeFlag&&(w.ssContent=x)),g=I,O?(x.el=O.el,x.component=O.component,x.transition&&z0(x,x.transition),x.shapeFlag|=512,i.delete(I),i.add(I)):(i.add(I),k&&i.size>parseInt(k,10)&&v(i.values().next().value)),x.shapeFlag|=256,a=x,Fee(w.type)?w:x}}},oJ=Wee;function sb(e,t){return mt(e)?e.some(n=>sb(n,t)):an(e)?e.split(",").includes(t):O0(e)==="[object RegExp]"&&e.test(t)}KO=function(e,t){Gee(e,"a",t)};function aM(e,t){Gee(e,"da",t)}function Gee(e,t,n=Di){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(R7(t,r,n),n){let o=n.parent;for(;o&&o.parent;)jm(o.parent.vnode)&&JMe(r,t,n,o),o=o.parent}}function JMe(e,t,n,r){const o=R7(t,e,r,!0);Vs(()=>{u7(r[t],o)},n)}function lM(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function sM(e){return 128&e.shapeFlag?e.ssContent:e}function R7(e,t,n=Di,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{if(n.isUnmounted)return;R0();const l=W0(n),s=ls(t,n,e,a);return l(),I0(),s});return r?o.unshift(i):o.push(i),i}}let kc,ub,uM,cM,dM;kc=e=>(t,n=Di)=>(!hb||e==="sp")&&R7(e,(...r)=>t(...r),n),g0=kc("bm"),yn=kc("m"),ub=kc("bu"),zs=kc("u"),xo=kc("bum"),Vs=kc("um"),uM=kc("sp"),cM=kc("rtg"),dM=kc("rtc");function qee(e,t=Di){R7("ec",e,t)}bn=function(e,t,n,r){let o;const i=n&&n[r];if(mt(e)||an(e)){o=new Array(e.length);for(let a=0,l=e.length;a<l;a++)o[a]=t(e[a],a,void 0,i&&i[a])}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,i&&i[a])}else if(wn(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,s=a.length;l<s;l++){const u=a[l];o[l]=t(e[u],u,l,i&&i[l])}}else o=[];return n&&(n[r]=o),o},Ff=function(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(mt(r))for(let o=0;o<r.length;o++)e[r[o].name]=r[o].fn;else r&&(e[r.name]=r.key?(...o)=>{const i=r.fn(...o);return i&&(i.key=r.key),i}:r.fn)}return e},ft=function(e,t,n={},r,o){if(pi.isCE||pi.parent&&H0(pi.parent)&&pi.parent.isCE)return t!=="default"&&(n.name=t),ie("slot",n,r&&r());let i=e[t];i&&i._c&&(i._d=!1),Y();const a=i&&Kee(i(n)),l=Pe(bt,{key:n.key||a&&a.key||`_${t}`},a||(r?r():[]),a&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l};function Kee(e){return e.some(t=>!oo(t)||t.type!==hi&&!(t.type===bt&&!Kee(t.children)))?e:null}function Yee(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Mm(r)]=e[r];return n}const fM=e=>e?Ete(e)?U7(e)||e.proxy:fM(e.parent):null,cb=vo(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>fM(e.parent),$root:e=>fM(e.root),$emit:e=>e.emit,$options:e=>mM(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,E7(e.update)}),$nextTick:e=>e.n||(e.n=St.bind(e.proxy)),$watch:e=>XMe.bind(e)}),pM=(e,t)=>e!==Hr&&!e.__isScriptSetup&&Tn(e,t),hM={get({_:e},t){const{ctx:n,setupState:r,data:o,props:i,accessCache:a,type:l,appContext:s}=e;let u;if(t[0]!=="$"){const p=a[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(pM(r,t))return a[t]=1,r[t];if(o!==Hr&&Tn(o,t))return a[t]=2,o[t];if((u=e.propsOptions[0])&&Tn(u,t))return a[t]=3,i[t];if(n!==Hr&&Tn(n,t))return a[t]=4,n[t];vM&&(a[t]=0)}}const c=cb[t];let d,f;return c?(t==="$attrs"&&Cl(e,0,t),c(e)):(d=l.__cssModules)&&(d=d[t])?d:n!==Hr&&Tn(n,t)?(a[t]=4,n[t]):(f=s.config.globalProperties,Tn(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return pM(o,t)?(o[t]=n,!0):r!==Hr&&Tn(r,t)?(r[t]=n,!0):!Tn(e.props,t)&&(t[0]!=="$"||!(t.slice(1)in e))&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i}},a){let l;return!!n[a]||e!==Hr&&Tn(e,a)||pM(t,a)||(l=i[0])&&Tn(l,a)||Tn(r,a)||Tn(cb,a)||Tn(o.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Tn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},ZMe=vo({},hM,{get(e,t){if(t!==Symbol.unscopables)return hM.get(e,t,e)},has:(e,t)=>t[0]!=="_"&&!vMe(t)});Ga=function(){return Xee().slots},yc=function(){return Xee().attrs};function Xee(){const e=dn();return e.setupContext||(e.setupContext=kte(e))}function db(e){return mt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let vM=!0;function eNe(e){const t=mM(e),n=e.proxy,r=e.ctx;vM=!1,t.beforeCreate&&Qee(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:a,watch:l,provide:s,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:v,deactivated:g,beforeDestroy:b,beforeUnmount:y,destroyed:w,unmounted:x,render:_,renderTracked:E,renderTriggered:C,errorCaptured:T,serverPrefetch:k,expose:I,inheritAttrs:O,components:F,directives:N,filters:B}=t;if(u&&function(V,P){mt(V)&&(V=gM(V));for(const H in V){const U=V[H];let G;G=wn(U)?"default"in U?Rt(U.from||H,U.default,!0):Rt(U.from||H):Rt(U),Jn(G)?Object.defineProperty(P,H,{enumerable:!0,configurable:!0,get:()=>G.value,set:z=>G.value=z}):P[H]=G}}(u,r,null),a)for(const V in a){const P=a[V];Ut(P)&&(r[V]=P.bind(n))}if(o){const V=o.call(n,n);wn(V)&&(e.data=Qn(V))}if(vM=!0,i)for(const V in i){const P=i[V],H=Ut(P)?P.bind(n,n):Ut(P.get)?P.get.bind(n,n):fr,U=!Ut(P)&&Ut(P.set)?P.set.bind(n):fr,G=ee({get:H,set:U});Object.defineProperty(r,V,{enumerable:!0,configurable:!0,get:()=>G.value,set:z=>G.value=z})}if(l)for(const V in l)Jee(l[V],r,n,V);if(s){const V=Ut(s)?s.call(n):s;Reflect.ownKeys(V).forEach(P=>{qn(P,V[P])})}function L(V,P){mt(P)?P.forEach(H=>V(H.bind(n))):P&&V(P.bind(n))}if(c&&Qee(c,e,"c"),L(g0,d),L(yn,f),L(ub,p),L(zs,m),L(KO,v),L(aM,g),L(qee,T),L(dM,E),L(cM,C),L(xo,y),L(Vs,x),L(uM,k),mt(I))if(I.length){const V=e.exposed||(e.exposed={});I.forEach(P=>{Object.defineProperty(V,P,{get:()=>n[P],set:H=>n[P]=H})})}else e.exposed||(e.exposed={});_&&e.render===fr&&(e.render=_),O!=null&&(e.inheritAttrs=O),F&&(e.components=F),N&&(e.directives=N)}function Qee(e,t,n){ls(mt(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Jee(e,t,n,r){const o=r.includes(".")?Vee(n,r):()=>n[r];if(an(e)){const i=t[e];Ut(i)&&Je(o,i)}else if(Ut(e))Je(o,e.bind(n));else if(wn(e))if(mt(e))e.forEach(i=>Jee(i,t,n,r));else{const i=Ut(e.handler)?e.handler.bind(n):t[e.handler];Ut(i)&&Je(o,i,e)}}function mM(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(t);let s;return l?s=l:o.length||n||r?(s={},o.length&&o.forEach(u=>I7(s,u,a,!0)),I7(s,t,a)):s=t,wn(t)&&i.set(t,s),s}function I7(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&I7(e,i,n,!0),o&&o.forEach(a=>I7(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const l=tNe[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const tNe={data:Zee,props:ete,emits:ete,methods:fb,computed:fb,beforeCreate:el,created:el,beforeMount:el,mounted:el,beforeUpdate:el,updated:el,beforeDestroy:el,beforeUnmount:el,destroyed:el,unmounted:el,activated:el,deactivated:el,errorCaptured:el,serverPrefetch:el,components:fb,directives:fb,watch:function(e,t){if(!e)return t;if(!t)return e;const n=vo(Object.create(null),e);for(const r in t)n[r]=el(e[r],t[r]);return n},provide:Zee,inject:function(e,t){return fb(gM(e),gM(t))}};function Zee(e,t){return t?e?function(){return vo(Ut(e)?e.call(this,this):e,Ut(t)?t.call(this,this):t)}:t:e}function gM(e){if(mt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function el(e,t){return e?[...new Set([].concat(e,t))]:t}function fb(e,t){return e?vo(Object.create(null),e,t):t}function ete(e,t){return e?mt(e)&&mt(t)?[...new Set([...e,...t])]:vo(Object.create(null),db(e),db(t??{})):t}function tte(){return{app:null,config:{isNativeTag:qZ,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let nNe=0;function rNe(e,t){return function(n,r=null){Ut(n)||(n=vo({},n)),r==null||wn(r)||(r=null);const o=tte(),i=new WeakSet;let a=!1;const l=o.app={_uid:nNe++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:TM,get config(){return o.config},set config(s){},use:(s,...u)=>(i.has(s)||(s&&Ut(s.install)?(i.add(s),s.install(l,...u)):Ut(s)&&(i.add(s),s(l,...u))),l),mixin:s=>(o.mixins.includes(s)||o.mixins.push(s),l),component:(s,u)=>u?(o.components[s]=u,l):o.components[s],directive:(s,u)=>u?(o.directives[s]=u,l):o.directives[s],mount(s,u,c){if(!a){const d=ie(n,r);return d.appContext=o,c===!0?c="svg":c===!1&&(c=void 0),u&&t?t(d,s):e(d,s,c),a=!0,l._container=s,s.__vue_app__=l,U7(d.component)||d.component.proxy}},unmount(){a&&(e(null,l._container),delete l._container.__vue_app__)},provide:(s,u)=>(o.provides[s]=u,l),runWithContext(s){const u=Vm;Vm=l;try{return s()}finally{Vm=u}}};return l}}let Vm=null;qn=function(e,t){if(Di){let n=Di.provides;const r=Di.parent&&Di.parent.provides;r===n&&(n=Di.provides=Object.create(r)),n[e]=t}},Rt=function(e,t,n=!1){const r=Di||pi;if(r||Vm){const o=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:Vm._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Ut(t)?t.call(r&&r.proxy):t}};function nte(){return!!(Di||pi||Vm)}function rte(e,t,n,r){const[o,i]=e.propsOptions;let a,l=!1;if(t)for(let s in t){if(T0(s))continue;const u=t[s];let c;o&&Tn(o,c=qi(s))?i&&i.includes(c)?(a||(a={}))[c]=u:n[c]=u:D7(e.emitsOptions,s)||s in r&&u===r[s]||(r[s]=u,l=!0)}if(i){const s=Zn(n),u=a||Hr;for(let c=0;c<i.length;c++){const d=i[c];n[d]=yM(o,s,d,u[d],e,!Tn(u,d))}}return l}function yM(e,t,n,r,o,i){const a=e[n];if(a!=null){const l=Tn(a,"default");if(l&&r===void 0){const s=a.default;if(a.type!==Function&&!a.skipFactory&&Ut(s)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=W0(o);r=u[n]=s.call(null,t),c()}}else r=s}a[0]&&(i&&!l?r=!1:!a[1]||r!==""&&r!==Za(n)||(r=!0))}return r}function ote(e,t,n=!1){const r=t.propsCache,o=r.get(e);if(o)return o;const i=e.props,a={},l=[];let s=!1;if(!Ut(e)){const c=d=>{s=!0;const[f,p]=ote(d,t,!0);vo(a,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!s)return wn(e)&&r.set(e,S0),S0;if(mt(i))for(let c=0;c<i.length;c++){const d=qi(i[c]);ite(d)&&(a[d]=Hr)}else if(i)for(const c in i){const d=qi(c);if(ite(d)){const f=i[c],p=a[d]=mt(f)||Ut(f)?{type:f}:vo({},f);if(p){const m=ste(Boolean,p.type),v=ste(String,p.type);p[0]=m>-1,p[1]=v<0||m<v,(m>-1||Tn(p,"default"))&&l.push(d)}}}const u=[a,l];return wn(e)&&r.set(e,u),u}function ite(e){return e[0]!=="$"&&!T0(e)}function ate(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function lte(e,t){return ate(e)===ate(t)}function ste(e,t){return mt(t)?t.findIndex(n=>lte(n,e)):Ut(t)&<e(t,e)?0:-1}const ute=e=>e[0]==="_"||e==="$stable",bM=e=>mt(e)?e.map(ss):[ss(e)],oNe=(e,t,n)=>{if(t._n)return t;const r=he((...o)=>bM(t(...o)),n);return r._c=!1,r},cte=(e,t,n)=>{const r=e._ctx;for(const o in e){if(ute(o))continue;const i=e[o];if(Ut(i))t[o]=oNe(0,i,r);else if(i!=null){const a=bM(i);t[o]=()=>a}}},dte=(e,t)=>{const n=bM(t);e.slots.default=()=>n},iNe=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Zn(t),Q3(t,"_",n)):cte(t,e.slots={})}else e.slots={},t&&dte(e,t);Q3(e.slots,V7,1)},aNe=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,a=Hr;if(32&r.shapeFlag){const l=t._;l?n&&l===1?i=!1:(vo(o,t),n||l!==1||delete o._):(i=!t.$stable,cte(t,o)),a=t}else t&&(dte(e,t),a={default:1});if(i)for(const l in o)ute(l)||a[l]!=null||delete o[l]};function B7(e,t,n,r,o=!1){if(mt(e))return void e.forEach((f,p)=>B7(f,t&&(mt(t)?t[p]:t),n,r,o));if(H0(r)&&!o)return;const i=4&r.shapeFlag?U7(r.component)||r.component.proxy:r.el,a=o?null:i,{i:l,r:s}=e,u=t&&t.r,c=l.refs===Hr?l.refs={}:l.refs,d=l.setupState;if(u!=null&&u!==s&&(an(u)?(c[u]=null,Tn(d,u)&&(d[u]=null)):Jn(u)&&(u.value=null)),Ut(s))Td(s,l,12,[a,c]);else{const f=an(s),p=Jn(s);if(f||p){const m=()=>{if(e.f){const v=f?Tn(d,s)?d[s]:c[s]:s.value;o?mt(v)&&u7(v,i):mt(v)?v.includes(i)||v.push(i):f?(c[s]=[i],Tn(d,s)&&(d[s]=c[s])):(s.value=[i],e.k&&(c[e.k]=s.value))}else f?(c[s]=a,Tn(d,s)&&(d[s]=a)):p&&(s.value=a,e.k&&(c[e.k]=a))};a?(m.id=-1,ha(m,n)):m()}}}let Gf=!1;const L7=e=>(t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject")(e)?"svg":(t=>t.namespaceURI.includes("MathML"))(e)?"mathml":void 0,P7=e=>e.nodeType===8;function lNe(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:i,parentNode:a,remove:l,insert:s,createComment:u}}=e,c=(y,w,x,_,E,C=!1)=>{const T=P7(y)&&y.data==="[",k=()=>m(y,w,x,_,E,T),{type:I,ref:O,shapeFlag:F,patchFlag:N}=w;let B=y.nodeType;w.el=y,N===-2&&(C=!1,w.dynamicChildren=null);let L=null;switch(I){case Dc:B!==3?w.children===""?(s(w.el=o(""),a(y),y),L=y):L=k():(y.data!==w.children&&(Gf=!0,y.data=w.children),L=i(y));break;case hi:b(y)?(L=i(y),g(w.el=y.content.firstChild,y,x)):L=B!==8||T?k():i(y);break;case qf:if(T&&(B=(y=i(y)).nodeType),B===1||B===3){L=y;const V=!w.children.length;for(let P=0;P<w.staticCount;P++)V&&(w.children+=L.nodeType===1?L.outerHTML:L.data),P===w.staticCount-1&&(w.anchor=L),L=i(L);return T?i(L):L}k();break;case bt:L=T?p(y,w,x,_,E,C):k();break;default:if(1&F)L=B===1&&w.type.toLowerCase()===y.tagName.toLowerCase()||b(y)?d(y,w,x,_,E,C):k();else if(6&F){w.slotScopeIds=E;const V=a(y);if(L=T?v(y):P7(y)&&y.data==="teleport start"?v(y,y.data,"teleport end"):i(y),t(w,V,null,x,_,L7(V),C),H0(w)){let P;T?(P=ie(bt),P.anchor=L?L.previousSibling:V.lastChild):P=y.nodeType===3?Dt(""):ie("div"),P.el=y,w.component.subTree=P}}else 64&F?L=B!==8?k():w.type.hydrate(y,w,x,_,E,C,e,f):128&F&&(L=w.type.hydrate(y,w,x,_,L7(a(y)),E,C,e,c))}return O!=null&&B7(O,null,_,w),L},d=(y,w,x,_,E,C)=>{C=C||!!w.dynamicChildren;const{type:T,props:k,patchFlag:I,shapeFlag:O,dirs:F,transition:N}=w,B=T==="input"||T==="option";if(B||I!==-1){F&&Sc(w,null,x,"created");let L,V=!1;if(b(y)){V=vte(_,N)&&x&&x.vnode.props&&x.vnode.props.appear;const P=y.content.firstChild;V&&N.beforeEnter(P),g(P,y,x),w.el=y=P}if(16&O&&(!k||!k.innerHTML&&!k.textContent)){let P=f(y.firstChild,w,y,x,_,E,C);for(;P;){Gf=!0;const H=P;P=P.nextSibling,l(H)}}else 8&O&&y.textContent!==w.children&&(Gf=!0,y.textContent=w.children);if(k)if(B||!C||48&I)for(const P in k)(B&&(P.endsWith("value")||P==="indeterminate")||Tm(P)&&!T0(P)||P[0]===".")&&r(y,P,null,k[P],void 0,void 0,x);else k.onClick&&r(y,"onClick",null,k.onClick,void 0,void 0,x);(L=k&&k.onVnodeBeforeMount)&&kl(L,x,w),F&&Sc(w,null,x,"beforeMount"),((L=k&&k.onVnodeMounted)||F||V)&&Iee(()=>{L&&kl(L,x,w),V&&N.enter(y),F&&Sc(w,null,x,"mounted")},_)}return y.nextSibling},f=(y,w,x,_,E,C,T)=>{T=T||!!w.dynamicChildren;const k=w.children,I=k.length;for(let O=0;O<I;O++){const F=T?k[O]:k[O]=ss(k[O]);if(y)y=c(y,F,_,E,C,T);else{if(F.type===Dc&&!F.children)continue;Gf=!0,n(null,F,x,null,_,E,L7(x),C)}}return y},p=(y,w,x,_,E,C)=>{const{slotScopeIds:T}=w;T&&(E=E?E.concat(T):T);const k=a(y),I=f(i(y),w,k,x,_,E,C);return I&&P7(I)&&I.data==="]"?i(w.anchor=I):(Gf=!0,s(w.anchor=u("]"),k,I),I)},m=(y,w,x,_,E,C)=>{if(Gf=!0,w.el=null,C){const I=v(y);for(;;){const O=i(y);if(!O||O===I)break;l(O)}}const T=i(y),k=a(y);return l(y),n(null,w,k,T,x,_,L7(k),E),T},v=(y,w="[",x="]")=>{let _=0;for(;y;)if((y=i(y))&&P7(y)&&(y.data===w&&_++,y.data===x)){if(_===0)return i(y);_--}return y},g=(y,w,x)=>{const _=w.parentNode;_&&_.replaceChild(y,w);let E=x;for(;E;)E.vnode.el===w&&(E.vnode.el=E.subTree.el=y),E=E.parent},b=y=>y.nodeType===1&&y.tagName.toLowerCase()==="template";return[(y,w)=>{if(!w.hasChildNodes())return n(null,y,w),S7(),void(w._vnode=y);Gf=!1,c(w.firstChild,y,null,null,null),S7(),w._vnode=y,Gf&&console.error("Hydration completed but contains mismatches.")},c]}const ha=Iee;function fte(e){return hte(e)}function pte(e){return hte(e,lNe)}function hte(e,t){JZ().__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:i,createText:a,createComment:l,setText:s,setElementText:u,parentNode:c,nextSibling:d,setScopeId:f=fr,insertStaticContent:p}=e,m=(J,Z,ye,be=null,ve=null,Ae=null,Ce=void 0,_e=null,ke=!!Z.dynamicChildren)=>{if(J===Z)return;J&&!Ou(J,Z)&&(be=K(J),U(J,ve,Ae,!0),J=null),Z.patchFlag===-2&&(ke=!1,Z.dynamicChildren=null);const{type:Be,ref:$e,shapeFlag:rt}=Z;switch(Be){case Dc:v(J,Z,ye,be);break;case hi:g(J,Z,ye,be);break;case qf:J==null&&b(Z,ye,be,Ce);break;case bt:k(J,Z,ye,be,ve,Ae,Ce,_e,ke);break;default:1&rt?y(J,Z,ye,be,ve,Ae,Ce,_e,ke):6&rt?I(J,Z,ye,be,ve,Ae,Ce,_e,ke):(64&rt||128&rt)&&Be.process(J,Z,ye,be,ve,Ae,Ce,_e,ke,ne)}$e!=null&&ve&&B7($e,J&&J.ref,Ae,Z||J,!Z)},v=(J,Z,ye,be)=>{if(J==null)n(Z.el=a(Z.children),ye,be);else{const ve=Z.el=J.el;Z.children!==J.children&&s(ve,Z.children)}},g=(J,Z,ye,be)=>{J==null?n(Z.el=l(Z.children||""),ye,be):Z.el=J.el},b=(J,Z,ye,be)=>{[J.el,J.anchor]=p(J.children,Z,ye,be,J.el,J.anchor)},y=(J,Z,ye,be,ve,Ae,Ce,_e,ke)=>{Z.type==="svg"?Ce="svg":Z.type==="math"&&(Ce="mathml"),J==null?w(Z,ye,be,ve,Ae,Ce,_e,ke):E(J,Z,ve,Ae,Ce,_e,ke)},w=(J,Z,ye,be,ve,Ae,Ce,_e)=>{let ke,Be;const{props:$e,shapeFlag:rt,transition:ge,dirs:We}=J;if(ke=J.el=i(J.type,Ae,$e&&$e.is,$e),8&rt?u(ke,J.children):16&rt&&_(J.children,ke,null,be,ve,AM(J,Ae),Ce,_e),We&&Sc(J,null,be,"created"),x(ke,J,J.scopeId,Ce,be),$e){for(const At in $e)At==="value"||T0(At)||o(ke,At,null,$e[At],Ae,J.children,be,ve,W);"value"in $e&&o(ke,"value",null,$e.value,Ae),(Be=$e.onVnodeBeforeMount)&&kl(Be,be,J)}We&&Sc(J,null,be,"beforeMount");const st=vte(ve,ge);st&&ge.beforeEnter(ke),n(ke,Z,ye),((Be=$e&&$e.onVnodeMounted)||st||We)&&ha(()=>{Be&&kl(Be,be,J),st&&ge.enter(ke),We&&Sc(J,null,be,"mounted")},ve)},x=(J,Z,ye,be,ve)=>{if(ye&&f(J,ye),be)for(let Ae=0;Ae<be.length;Ae++)f(J,be[Ae]);if(ve&&Z===ve.subTree){const Ae=ve.vnode;x(J,Ae,Ae.scopeId,Ae.slotScopeIds,ve.parent)}},_=(J,Z,ye,be,ve,Ae,Ce,_e,ke=0)=>{for(let Be=ke;Be<J.length;Be++){const $e=J[Be]=_e?Kf(J[Be]):ss(J[Be]);m(null,$e,Z,ye,be,ve,Ae,Ce,_e)}},E=(J,Z,ye,be,ve,Ae,Ce)=>{const _e=Z.el=J.el;let{patchFlag:ke,dynamicChildren:Be,dirs:$e}=Z;ke|=16&J.patchFlag;const rt=J.props||Hr,ge=Z.props||Hr;let We;if(ye&&$0(ye,!1),(We=ge.onVnodeBeforeUpdate)&&kl(We,ye,Z,J),$e&&Sc(Z,J,ye,"beforeUpdate"),ye&&$0(ye,!0),Be?C(J.dynamicChildren,Be,_e,ye,be,AM(Z,ve),Ae):Ce||L(J,Z,_e,null,ye,be,AM(Z,ve),Ae,!1),ke>0){if(16&ke)T(_e,Z,rt,ge,ye,be,ve);else if(2&ke&&rt.class!==ge.class&&o(_e,"class",null,ge.class,ve),4&ke&&o(_e,"style",rt.style,ge.style,ve),8&ke){const st=Z.dynamicProps;for(let At=0;At<st.length;At++){const Ve=st[At],it=rt[Ve],dt=ge[Ve];dt===it&&Ve!=="value"||o(_e,Ve,it,dt,ve,J.children,ye,be,W)}}1&ke&&J.children!==Z.children&&u(_e,Z.children)}else Ce||Be!=null||T(_e,Z,rt,ge,ye,be,ve);((We=ge.onVnodeUpdated)||$e)&&ha(()=>{We&&kl(We,ye,Z,J),$e&&Sc(Z,J,ye,"updated")},be)},C=(J,Z,ye,be,ve,Ae,Ce)=>{for(let _e=0;_e<Z.length;_e++){const ke=J[_e],Be=Z[_e],$e=ke.el&&(ke.type===bt||!Ou(ke,Be)||70&ke.shapeFlag)?c(ke.el):ye;m(ke,Be,$e,null,be,ve,Ae,Ce,!0)}},T=(J,Z,ye,be,ve,Ae,Ce)=>{if(ye!==be){if(ye!==Hr)for(const _e in ye)T0(_e)||_e in be||o(J,_e,ye[_e],null,Ce,Z.children,ve,Ae,W);for(const _e in be){if(T0(_e))continue;const ke=be[_e],Be=ye[_e];ke!==Be&&_e!=="value"&&o(J,_e,Be,ke,Ce,Z.children,ve,Ae,W)}"value"in be&&o(J,"value",ye.value,be.value,Ce)}},k=(J,Z,ye,be,ve,Ae,Ce,_e,ke)=>{const Be=Z.el=J?J.el:a(""),$e=Z.anchor=J?J.anchor:a("");let{patchFlag:rt,dynamicChildren:ge,slotScopeIds:We}=Z;We&&(_e=_e?_e.concat(We):We),J==null?(n(Be,ye,be),n($e,ye,be),_(Z.children||[],ye,$e,ve,Ae,Ce,_e,ke)):rt>0&&64&rt&&ge&&J.dynamicChildren?(C(J.dynamicChildren,ge,ye,ve,Ae,Ce,_e),(Z.key!=null||ve&&Z===ve.subTree)&&wM(J,Z,!0)):L(J,Z,ye,$e,ve,Ae,Ce,_e,ke)},I=(J,Z,ye,be,ve,Ae,Ce,_e,ke)=>{Z.slotScopeIds=_e,J==null?512&Z.shapeFlag?ve.ctx.activate(Z,ye,be,Ce,ke):O(Z,ye,be,ve,Ae,Ce,ke):F(J,Z,ke)},O=(J,Z,ye,be,ve,Ae,Ce)=>{const _e=J.component=_te(J,be,ve);if(jm(J)&&(_e.ctx.renderer=ne),Cte(_e),_e.asyncDep){if(ve&&ve.registerDep(_e,N),!J.el){const ke=_e.subTree=ie(hi);g(null,ke,Z,ye)}}else N(_e,J,Z,ye,ve,Ae,Ce)},F=(J,Z,ye)=>{const be=Z.component=J.component;if(function(ve,Ae,Ce){const{props:_e,children:ke,component:Be}=ve,{props:$e,children:rt,patchFlag:ge}=Ae,We=Be.emitsOptions;if(Ae.dirs||Ae.transition)return!0;if(!(Ce&&ge>=0))return!(!ke&&!rt||rt&&rt.$stable)||_e!==$e&&(_e?!$e||Tee(_e,$e,We):!!$e);if(1024&ge)return!0;if(16&ge)return _e?Tee(_e,$e,We):!!$e;if(8&ge){const st=Ae.dynamicProps;for(let At=0;At<st.length;At++){const Ve=st[At];if($e[Ve]!==_e[Ve]&&!D7(We,Ve))return!0}}return!1}(J,Z,ye)){if(be.asyncDep&&!be.asyncResolved)return void B(be,Z,ye);be.next=Z,function(ve){const Ae=Da.indexOf(ve);Ae>Cc&&Da.splice(Ae,1)}(be.update),be.effect.dirty=!0,be.update()}else Z.el=J.el,be.vnode=Z},N=(J,Z,ye,be,ve,Ae,Ce)=>{const _e=()=>{if(J.isMounted){let{next:$e,bu:rt,u:ge,parent:We,vnode:st}=J;{const ot=mte(J);if(ot)return $e&&($e.el=st.el,B(J,$e,Ce)),void ot.asyncDep.then(()=>{J.isUnmounted||_e()})}let At,Ve=$e;$0(J,!1),$e?($e.el=st.el,B(J,$e,Ce)):$e=st,rt&&N0(rt),(At=$e.props&&$e.props.onVnodeBeforeUpdate)&&kl(At,We,$e,st),$0(J,!0);const it=T7(J),dt=J.subTree;J.subTree=it,m(dt,it,c(dt.el),K(dt),J,ve,Ae),$e.el=it.el,Ve===null&&QT(J,it.el),ge&&ha(ge,ve),(At=$e.props&&$e.props.onVnodeUpdated)&&ha(()=>kl(At,We,$e,st),ve)}else{let $e;const{el:rt,props:ge}=Z,{bm:We,m:st,parent:At}=J,Ve=H0(Z);if($0(J,!1),We&&N0(We),!Ve&&($e=ge&&ge.onVnodeBeforeMount)&&kl($e,At,Z),$0(J,!0),rt&&le){const it=()=>{J.subTree=T7(J),le(rt,J.subTree,J,ve,null)};Ve?Z.type.__asyncLoader().then(()=>!J.isUnmounted&&it()):it()}else{const it=J.subTree=T7(J);m(null,it,ye,be,J,ve,Ae),Z.el=it.el}if(st&&ha(st,ve),!Ve&&($e=ge&&ge.onVnodeMounted)){const it=Z;ha(()=>kl($e,At,it),ve)}(256&Z.shapeFlag||At&&H0(At.vnode)&&256&At.vnode.shapeFlag)&&J.a&&ha(J.a,ve),J.isMounted=!0,Z=ye=be=null}},ke=J.effect=new Fm(_e,fr,()=>E7(Be),J.scope),Be=J.update=()=>{ke.dirty&&ke.run()};Be.id=J.uid,$0(J,!0),Be()},B=(J,Z,ye)=>{Z.component=J;const be=J.vnode.props;J.vnode=Z,J.next=null,function(ve,Ae,Ce,_e){const{props:ke,attrs:Be,vnode:{patchFlag:$e}}=ve,rt=Zn(ke),[ge]=ve.propsOptions;let We=!1;if(!(_e||$e>0)||16&$e){let st;rte(ve,Ae,ke,Be)&&(We=!0);for(const At in rt)Ae&&(Tn(Ae,At)||(st=Za(At))!==At&&Tn(Ae,st))||(ge?!Ce||Ce[At]===void 0&&Ce[st]===void 0||(ke[At]=yM(ge,rt,At,void 0,ve,!0)):delete ke[At]);if(Be!==rt)for(const At in Be)Ae&&Tn(Ae,At)||(delete Be[At],We=!0)}else if(8&$e){const st=ve.vnode.dynamicProps;for(let At=0;At<st.length;At++){let Ve=st[At];if(D7(ve.emitsOptions,Ve))continue;const it=Ae[Ve];if(ge)if(Tn(Be,Ve))it!==Be[Ve]&&(Be[Ve]=it,We=!0);else{const dt=qi(Ve);ke[dt]=yM(ge,rt,dt,it,ve,!1)}else it!==Be[Ve]&&(Be[Ve]=it,We=!0)}}We&&Dd(ve,"set","$attrs")}(J,Z.props,be,ye),aNe(J,Z.children,ye),R0(),kee(J),I0()},L=(J,Z,ye,be,ve,Ae,Ce,_e,ke=!1)=>{const Be=J&&J.children,$e=J?J.shapeFlag:0,rt=Z.children,{patchFlag:ge,shapeFlag:We}=Z;if(ge>0){if(128&ge)return void P(Be,rt,ye,be,ve,Ae,Ce,_e,ke);if(256&ge)return void V(Be,rt,ye,be,ve,Ae,Ce,_e,ke)}8&We?(16&$e&&W(Be,ve,Ae),rt!==Be&&u(ye,rt)):16&$e?16&We?P(Be,rt,ye,be,ve,Ae,Ce,_e,ke):W(Be,ve,Ae,!0):(8&$e&&u(ye,""),16&We&&_(rt,ye,be,ve,Ae,Ce,_e,ke))},V=(J,Z,ye,be,ve,Ae,Ce,_e,ke)=>{Z=Z||S0;const Be=(J=J||S0).length,$e=Z.length,rt=Math.min(Be,$e);let ge;for(ge=0;ge<rt;ge++){const We=Z[ge]=ke?Kf(Z[ge]):ss(Z[ge]);m(J[ge],We,ye,null,ve,Ae,Ce,_e,ke)}Be>$e?W(J,ve,Ae,!0,!1,rt):_(Z,ye,be,ve,Ae,Ce,_e,ke,rt)},P=(J,Z,ye,be,ve,Ae,Ce,_e,ke)=>{let Be=0;const $e=Z.length;let rt=J.length-1,ge=$e-1;for(;Be<=rt&&Be<=ge;){const We=J[Be],st=Z[Be]=ke?Kf(Z[Be]):ss(Z[Be]);if(!Ou(We,st))break;m(We,st,ye,null,ve,Ae,Ce,_e,ke),Be++}for(;Be<=rt&&Be<=ge;){const We=J[rt],st=Z[ge]=ke?Kf(Z[ge]):ss(Z[ge]);if(!Ou(We,st))break;m(We,st,ye,null,ve,Ae,Ce,_e,ke),rt--,ge--}if(Be>rt){if(Be<=ge){const We=ge+1,st=We<$e?Z[We].el:be;for(;Be<=ge;)m(null,Z[Be]=ke?Kf(Z[Be]):ss(Z[Be]),ye,st,ve,Ae,Ce,_e,ke),Be++}}else if(Be>ge)for(;Be<=rt;)U(J[Be],ve,Ae,!0),Be++;else{const We=Be,st=Be,At=new Map;for(Be=st;Be<=ge;Be++){const me=Z[Be]=ke?Kf(Z[Be]):ss(Z[Be]);me.key!=null&&At.set(me.key,Be)}let Ve,it=0;const dt=ge-st+1;let ot=!1,je=0;const we=new Array(dt);for(Be=0;Be<dt;Be++)we[Be]=0;for(Be=We;Be<=rt;Be++){const me=J[Be];if(it>=dt){U(me,ve,Ae,!0);continue}let Me;if(me.key!=null)Me=At.get(me.key);else for(Ve=st;Ve<=ge;Ve++)if(we[Ve-st]===0&&Ou(me,Z[Ve])){Me=Ve;break}Me===void 0?U(me,ve,Ae,!0):(we[Me-st]=Be+1,Me>=je?je=Me:ot=!0,m(me,Z[Me],ye,null,ve,Ae,Ce,_e,ke),it++)}const ze=ot?function(me){const Me=me.slice(),Ie=[0];let ht,gt,vt,qt,mn;const Zt=me.length;for(ht=0;ht<Zt;ht++){const rn=me[ht];if(rn!==0){if(gt=Ie[Ie.length-1],me[gt]<rn){Me[ht]=gt,Ie.push(ht);continue}for(vt=0,qt=Ie.length-1;vt<qt;)mn=vt+qt>>1,me[Ie[mn]]<rn?vt=mn+1:qt=mn;rn<me[Ie[vt]]&&(vt>0&&(Me[ht]=Ie[vt-1]),Ie[vt]=ht)}}for(vt=Ie.length,qt=Ie[vt-1];vt-- >0;)Ie[vt]=qt,qt=Me[qt];return Ie}(we):S0;for(Ve=ze.length-1,Be=dt-1;Be>=0;Be--){const me=st+Be,Me=Z[me],Ie=me+1<$e?Z[me+1].el:be;we[Be]===0?m(null,Me,ye,Ie,ve,Ae,Ce,_e,ke):ot&&(Ve<0||Be!==ze[Ve]?H(Me,ye,Ie,2):Ve--)}}},H=(J,Z,ye,be,ve=null)=>{const{el:Ae,type:Ce,transition:_e,children:ke,shapeFlag:Be}=J;if(6&Be)return void H(J.component.subTree,Z,ye,be);if(128&Be)return void J.suspense.move(Z,ye,be);if(64&Be)return void Ce.move(J,Z,ye,ne);if(Ce===bt){n(Ae,Z,ye);for(let $e=0;$e<ke.length;$e++)H(ke[$e],Z,ye,be);return void n(J.anchor,Z,ye)}if(Ce===qf)return void(({el:$e,anchor:rt},ge,We)=>{let st;for(;$e&&$e!==rt;)st=d($e),n($e,ge,We),$e=st;n(rt,ge,We)})(J,Z,ye);if(be!==2&&1&Be&&_e)if(be===0)_e.beforeEnter(Ae),n(Ae,Z,ye),ha(()=>_e.enter(Ae),ve);else{const{leave:$e,delayLeave:rt,afterLeave:ge}=_e,We=()=>n(Ae,Z,ye),st=()=>{$e(Ae,()=>{We(),ge&&ge()})};rt?rt(Ae,We,st):st()}else n(Ae,Z,ye)},U=(J,Z,ye,be=!1,ve=!1)=>{const{type:Ae,props:Ce,ref:_e,children:ke,dynamicChildren:Be,shapeFlag:$e,patchFlag:rt,dirs:ge}=J;if(_e!=null&&B7(_e,null,ye,J,!0),256&$e)return void Z.ctx.deactivate(J);const We=1&$e&&ge,st=!H0(J);let At;if(st&&(At=Ce&&Ce.onVnodeBeforeUnmount)&&kl(At,Z,J),6&$e)$(J.component,ye,be);else{if(128&$e)return void J.suspense.unmount(ye,be);We&&Sc(J,null,Z,"beforeUnmount"),64&$e?J.type.remove(J,Z,ye,ve,ne,be):Be&&(Ae!==bt||rt>0&&64&rt)?W(Be,Z,ye,!1,!0):(Ae===bt&&384&rt||!ve&&16&$e)&&W(ke,Z,ye),be&&G(J)}(st&&(At=Ce&&Ce.onVnodeUnmounted)||We)&&ha(()=>{At&&kl(At,Z,J),We&&Sc(J,null,Z,"unmounted")},ye)},G=J=>{const{type:Z,el:ye,anchor:be,transition:ve}=J;if(Z===bt)return void z(ye,be);if(Z===qf)return void(({el:Ce,anchor:_e})=>{let ke;for(;Ce&&Ce!==_e;)ke=d(Ce),r(Ce),Ce=ke;r(_e)})(J);const Ae=()=>{r(ye),ve&&!ve.persisted&&ve.afterLeave&&ve.afterLeave()};if(1&J.shapeFlag&&ve&&!ve.persisted){const{leave:Ce,delayLeave:_e}=ve,ke=()=>Ce(ye,Ae);_e?_e(J.el,Ae,ke):ke()}else Ae()},z=(J,Z)=>{let ye;for(;J!==Z;)ye=d(J),r(J),J=ye;r(Z)},$=(J,Z,ye)=>{const{bum:be,scope:ve,update:Ae,subTree:Ce,um:_e}=J;be&&N0(be),ve.stop(),Ae&&(Ae.active=!1,U(Ce,J,Z,ye)),_e&&ha(_e,Z),ha(()=>{J.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&J.asyncDep&&!J.asyncResolved&&J.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},W=(J,Z,ye,be=!1,ve=!1,Ae=0)=>{for(let Ce=Ae;Ce<J.length;Ce++)U(J[Ce],Z,ye,be,ve)},K=J=>6&J.shapeFlag?K(J.component.subTree):128&J.shapeFlag?J.suspense.next():d(J.anchor||J.el);let X=!1;const te=(J,Z,ye)=>{J==null?Z._vnode&&U(Z._vnode,null,null,!0):m(Z._vnode||null,J,Z,null,null,null,ye),X||(X=!0,kee(),S7(),X=!1),Z._vnode=J},ne={p:m,um:U,m:H,r:G,mt:O,mc:_,pc:L,pbc:C,n:K,o:e};let se,le;return t&&([se,le]=t(ne)),{render:te,hydrate:se,createApp:rNe(te,se)}}function AM({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function $0({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function vte(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wM(e,t,n=!1){const r=e.children,o=t.children;if(mt(r)&&mt(o))for(let i=0;i<r.length;i++){const a=r[i];let l=o[i];1&l.shapeFlag&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[i]=Kf(o[i]),l.el=a.el),n||wM(a,l)),l.type===Dc&&(l.el=a.el)}}function mte(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:mte(t)}const pb=e=>e&&(e.disabled||e.disabled===""),gte=e=>typeof SVGElement<"u"&&e instanceof SVGElement,yte=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,xM=(e,t)=>{const n=e&&e.to;return an(n)?t?t(n):null:n},sNe={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,a,l,s,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:v,createComment:g}}=u,b=pb(t.props);let{shapeFlag:y,children:w,dynamicChildren:x}=t;if(e==null){const _=t.el=v(""),E=t.anchor=v("");p(_,n,r),p(E,n,r);const C=t.target=xM(t.props,m),T=t.targetAnchor=v("");C&&(p(T,C),a==="svg"||gte(C)?a="svg":(a==="mathml"||yte(C))&&(a="mathml"));const k=(I,O)=>{16&y&&c(w,I,O,o,i,a,l,s)};b?k(n,E):C&&k(C,T)}else{t.el=e.el;const _=t.anchor=e.anchor,E=t.target=e.target,C=t.targetAnchor=e.targetAnchor,T=pb(e.props),k=T?n:E,I=T?_:C;if(a==="svg"||gte(E)?a="svg":(a==="mathml"||yte(E))&&(a="mathml"),x?(f(e.dynamicChildren,x,k,o,i,a,l),wM(e,t,!0)):s||d(e,t,k,I,o,i,a,l,!1),b)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):j7(t,n,_,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const O=t.target=xM(t.props,m);O&&j7(t,O,null,u,0)}else T&&j7(t,E,C,u,1)}bte(t)},remove(e,t,n,r,{um:o,o:{remove:i}},a){const{shapeFlag:l,children:s,anchor:u,targetAnchor:c,target:d,props:f}=e;if(d&&i(c),a&&i(u),16&l){const p=a||!pb(f);for(let m=0;m<s.length;m++){const v=s[m];o(v,t,n,p,!!v.dynamicChildren)}}},move:j7,hydrate:function(e,t,n,r,o,i,{o:{nextSibling:a,parentNode:l,querySelector:s}},u){const c=t.target=xM(t.props,s);if(c){const d=c._lpa||c.firstChild;if(16&t.shapeFlag)if(pb(t.props))t.anchor=u(a(e),t,l(e),n,r,o,i),t.targetAnchor=d;else{t.anchor=a(e);let f=d;for(;f;)if(f=a(f),f&&f.nodeType===8&&f.data==="teleport anchor"){t.targetAnchor=f,c._lpa=t.targetAnchor&&a(t.targetAnchor);break}u(d,t,c,n,r,o,i)}bte(t)}return t.anchor&&a(t.anchor)}};function j7(e,t,n,{o:{insert:r},m:o},i=2){i===0&&r(e.targetAnchor,t,n);const{el:a,anchor:l,shapeFlag:s,children:u,props:c}=e,d=i===2;if(d&&r(a,t,n),(!d||pb(c))&&16&s)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(l,t,n)}D3=sNe;function bte(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}let Dc,hi,qf,zm;bt=Symbol.for("v-fgt"),Dc=Symbol.for("v-txt"),hi=Symbol.for("v-cmt"),qf=Symbol.for("v-stc"),zm=[];let Sl=null;Y=function(e=!1){zm.push(Sl=e?null:[])};function Ate(){zm.pop(),Sl=zm[zm.length-1]||null}let U0=1;function _M(e){U0+=e}function wte(e){return e.dynamicChildren=U0>0?Sl||S0:null,Ate(),U0>0&&Sl&&Sl.push(e),e}fe=function(e,t,n,r,o,i){return wte(ce(e,t,n,r,o,i,!0))},Pe=function(e,t,n,r,o){return wte(ie(e,t,n,r,o,!0))},oo=function(e){return!!e&&e.__v_isVNode===!0};function Ou(e,t){return e.type===t.type&&e.key===t.key}const V7="__vInternal",xte=({key:e})=>e??null,z7=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?an(e)||Jn(e)||Ut(e)?{i:pi,r:e,k:t,f:!!n}:e:null);ce=function(e,t=null,n=null,r=0,o=null,i=e===bt?0:1,a=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&xte(t),ref:t&&z7(t),scopeId:O7,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:pi};return l?(EM(s,n),128&i&&e.normalize(s)):n&&(s.shapeFlag|=an(n)?8:16),U0>0&&!a&&Sl&&(s.patchFlag>0||6&i)&&s.patchFlag!==32&&Sl.push(s),s},ie=function(e,t=null,n=null,r=0,o=null,i=!1){if(e&&e!==Mee||(e=hi),oo(e)){const s=Tu(e,t,!0);return n&&EM(s,n),U0>0&&!i&&Sl&&(6&s.shapeFlag?Sl[Sl.indexOf(e)]=s:Sl.push(s)),s.patchFlag|=-2,s}a=e,Ut(a)&&"__vccOpts"in a&&(e=e.__vccOpts);var a;if(t){t=TO(t);let{class:s,style:u}=t;s&&!an(s)&&(t.class=oe(s)),wn(u)&&(UT(u)&&!mt(u)&&(u=vo({},u)),t.style=$t(u))}const l=an(e)?1:Fee(e)?128:(s=>s.__isTeleport)(e)?64:wn(e)?4:Ut(e)?2:0;return ce(e,t,n,r,o,l,i,!0)},TO=function(e){return e?UT(e)||V7 in e?vo({},e):e:null};function Tu(e,t,n=!1){const{props:r,ref:o,patchFlag:i,children:a}=e,l=t?Un(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&xte(l),ref:t&&t.ref?n&&o?mt(o)?o.concat(z7(t)):[o,z7(t)]:z7(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==bt?i===-1?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Tu(e.ssContent),ssFallback:e.ssFallback&&Tu(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}Dt=function(e=" ",t=0){return ie(Dc,null,e,t)},Fe=function(e="",t=!1){return t?(Y(),Pe(hi,null,e)):ie(hi,null,e)};function ss(e){return e==null||typeof e=="boolean"?ie(hi):mt(e)?ie(bt,null,e.slice()):typeof e=="object"?Kf(e):ie(Dc,null,String(e))}function Kf(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Tu(e)}function EM(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(mt(t))n=16;else if(typeof t=="object"){if(65&r){const o=t.default;return void(o&&(o._c&&(o._d=!1),EM(e,o()),o._c&&(o._d=!0)))}{n=32;const o=t._;o||V7 in t?o===3&&pi&&(pi.slots._===1?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=pi}}else Ut(t)?(t={default:t,_ctx:pi},n=32):(t=String(t),64&r?(n=16,t=[Dt(t)]):n=8);e.children=t,e.shapeFlag|=n}Un=function(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=oe([t.class,r.class]));else if(o==="style")t.style=$t([t.style,r.style]);else if(Tm(o)){const i=t[o],a=r[o];!a||i===a||mt(i)&&i.includes(a)||(t[o]=i?[].concat(i,a):a)}else o!==""&&(t[o]=r[o])}return t};function kl(e,t,n,r=null){ls(e,t,7,[n,r])}const uNe=tte();let cNe=0;function _te(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||uNe,i={uid:cNe++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new LT(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ote(r,o),emitsOptions:Oee(r,o),emit:null,emitted:null,propsDefaults:Hr,inheritAttrs:r.inheritAttrs,ctx:Hr,data:Hr,props:Hr,attrs:Hr,slots:Hr,refs:Hr,setupState:Hr,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=UMe.bind(null,i),e.ce&&e.ce(i),i}let Di=null;dn=()=>Di||pi;let H7,CM;{const e=JZ(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(a=>a(i)):o[0](i)}};H7=t("__VUE_INSTANCE_SETTERS__",n=>Di=n),CM=t("__VUE_SSR_SETTERS__",n=>hb=n)}const W0=e=>{const t=Di;return H7(e),e.scope.on(),()=>{e.scope.off(),H7(t)}},SM=()=>{Di&&Di.scope.off(),H7(null)};function Ete(e){return 4&e.vnode.shapeFlag}let $7,kM,hb=!1;function Cte(e,t=!1){t&&CM(t);const{props:n,children:r}=e.vnode,o=Ete(e);(function(a,l,s,u=!1){const c={},d={};Q3(d,V7,1),a.propsDefaults=Object.create(null),rte(a,l,c,d);for(const f in a.propsOptions[0])f in c||(c[f]=void 0);s?a.props=u?c:x7(c):a.type.props?a.props=c:a.props=d,a.attrs=d})(e,n,o,t),iNe(e,r);const i=o?function(a,l){const s=a.type;a.accessCache=Object.create(null),a.proxy=Fo(new Proxy(a.ctx,hM));const{setup:u}=s;if(u){const c=a.setupContext=u.length>1?kte(a):null,d=W0(a);R0();const f=Td(u,a,0,[a.props,c]);if(I0(),d(),D0(f)){if(f.then(SM,SM),l)return f.then(p=>{DM(a,p,l)}).catch(p=>{P0(p,a,0)});a.asyncDep=f}else DM(a,f,l)}else Ste(a,l)}(e,t):void 0;return t&&CM(!1),i}function DM(e,t,n){Ut(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:wn(t)&&(e.setupState=qT(t)),Ste(e,n)}function Ste(e,t,n){const r=e.type;if(!e.render){if(!t&&$7&&!r.render){const o=r.template||mM(e).template;if(o){const{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,u=vo(vo({isCustomElement:i,delimiters:l},a),s);r.render=$7(o,u)}}e.render=r.render||fr,kM&&kM(e)}{const o=W0(e);R0();try{eNe(e)}finally{I0(),o()}}}function kte(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return function(n){return n.attrsProxy||(n.attrsProxy=new Proxy(n.attrs,{get:(r,o)=>(Cl(n,0,"$attrs"),r[o])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function U7(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(qT(Fo(e.exposed)),{get:(t,n)=>n in t?t[n]:n in cb?cb[n](e):void 0,has:(t,n)=>n in t||n in cb}))}function OM(e,t=!0){return Ut(e)?e.displayName||e.name:e.name||t&&e.__name}ee=(e,t)=>xee(e,0,hb),pn=function(e,t,n){const r=arguments.length;return r===2?wn(t)&&!mt(t)?oo(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&oo(n)&&(n=[n]),ie(e,t,n))};function Dte(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Ws(n[r],t[r]))return!1;return U0>0&&Sl&&Sl.push(e),!0}let TM,MM,Ote,Tte,Mte,Nte,Md,NM,Fte,Nd,Hm,G0;TM="3.4.21",MM=fr,Ote=HMe,Tte=Bm,Mte=function e(t,n){var r,o;Bm=t,Bm?(Bm.enabled=!0,k7.forEach(({event:i,args:a})=>Bm.emit(i,...a)),k7=[]):typeof window<"u"&&window.HTMLElement&&!((o=(r=window.navigator)==null?void 0:r.userAgent)!=null&&o.includes("jsdom"))?((n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{e(i,n)}),setTimeout(()=>{Bm||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,k7=[])},3e3)):k7=[]},Nte={createComponentInstance:_te,setupComponent:Cte,renderComponentRoot:T7,setCurrentRenderingInstance:ib,isVNode:oo,normalizeVNode:ss},Md=typeof document<"u"?document:null,NM=Md&&Md.createElement("template"),Fte={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Md.createElementNS("http://www.w3.org/2000/svg",e):t==="mathml"?Md.createElementNS("http://www.w3.org/1998/Math/MathML",e):Md.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Md.createTextNode(e),createComment:e=>Md.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Md.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const a=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==i&&(o=o.nextSibling););else{NM.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const l=NM.content;if(r==="svg"||r==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Nd="transition",Hm="animation",G0=Symbol("_vtc"),ca=(e,{slots:t})=>pn(zee,Bte(e),t),ca.displayName="Transition";const Rte={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},dNe=ca.props=vo({},rM,Rte),q0=(e,t=[])=>{mt(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ite=e=>!!e&&(mt(e)?e.some(t=>t.length>1):e.length>1);function Bte(e){const t={};for(const F in e)F in Rte||(t[F]=e[F]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:s=i,appearActiveClass:u=a,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=function(F){if(F==null)return null;if(wn(F))return[FM(F.enter),FM(F.leave)];{const N=FM(F);return[N,N]}}(o),v=m&&m[0],g=m&&m[1],{onBeforeEnter:b,onEnter:y,onEnterCancelled:w,onLeave:x,onLeaveCancelled:_,onBeforeAppear:E=b,onAppear:C=y,onAppearCancelled:T=w}=t,k=(F,N,B)=>{Yf(F,N?c:l),Yf(F,N?u:a),B&&B()},I=(F,N)=>{F._isLeaving=!1,Yf(F,d),Yf(F,p),Yf(F,f),N&&N()},O=F=>(N,B)=>{const L=F?C:y,V=()=>k(N,F,B);q0(L,[N,V]),Lte(()=>{Yf(N,F?s:i),Fd(N,F?c:l),Ite(L)||Pte(N,r,v,V)})};return vo(t,{onBeforeEnter(F){q0(b,[F]),Fd(F,i),Fd(F,a)},onBeforeAppear(F){q0(E,[F]),Fd(F,s),Fd(F,u)},onEnter:O(!1),onAppear:O(!0),onLeave(F,N){F._isLeaving=!0;const B=()=>I(F,N);Fd(F,d),Hte(),Fd(F,f),Lte(()=>{F._isLeaving&&(Yf(F,d),Fd(F,p),Ite(x)||Pte(F,r,g,B))}),q0(x,[F,B])},onEnterCancelled(F){k(F,!1),q0(w,[F])},onAppearCancelled(F){k(F,!0),q0(T,[F])},onLeaveCancelled(F){I(F),q0(_,[F])}})}function FM(e){return J3(e)}function Fd(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[G0]||(e[G0]=new Set)).add(t)}function Yf(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[G0];n&&(n.delete(t),n.size||(e[G0]=void 0))}function Lte(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let fNe=0;function Pte(e,t,n,r){const o=e._endId=++fNe,i=()=>{o===e._endId&&r()};if(n)return setTimeout(i,n);const{type:a,timeout:l,propCount:s}=jte(e,t);if(!a)return r();const u=a+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=s&&d()};setTimeout(()=>{c<s&&d()},l+1),e.addEventListener(u,f)}function jte(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),o=r(`${Nd}Delay`),i=r(`${Nd}Duration`),a=Vte(o,i),l=r(`${Hm}Delay`),s=r(`${Hm}Duration`),u=Vte(l,s);let c=null,d=0,f=0;return t===Nd?a>0&&(c=Nd,d=a,f=i.length):t===Hm?u>0&&(c=Hm,d=u,f=s.length):(d=Math.max(a,u),c=d>0?a>u?Nd:Hm:null,f=c?c===Nd?i.length:s.length:0),{type:c,timeout:d,propCount:f,hasTransform:c===Nd&&/\b(transform|all)(,|$)/.test(r(`${Nd}Property`).toString())}}function Vte(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>zte(n)+zte(e[r])))}function zte(e){return e==="auto"?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Hte(){return document.body.offsetHeight}let vb,RM;vb=Symbol("_vod"),RM=Symbol("_vsh"),$n={beforeMount(e,{value:t},{transition:n}){e[vb]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):mb(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),mb(e,!0),r.enter(e)):r.leave(e,()=>{mb(e,!1)}):mb(e,t))},beforeUnmount(e,{value:t}){mb(e,t)}};function mb(e,t){e.style.display=t?e[vb]:"none",e[RM]=!t}const $te=Symbol("");function IM(e){const t=dn();if(!t)return;const n=t.ut=(o=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>LM(i,o))},r=()=>{const o=e(t.proxy);BM(t.subTree,o),n(o)};Pee(r),yn(()=>{const o=new MutationObserver(r);o.observe(t.subTree.el.parentNode,{childList:!0}),Vs(()=>o.disconnect())})}function BM(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{BM(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)LM(e.el,t);else if(e.type===bt)e.children.forEach(n=>BM(n,t));else if(e.type===qf){let{el:n,anchor:r}=e;for(;n&&(LM(n,t),n!==r);)n=n.nextSibling}}function LM(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const o in t)n.setProperty(`--${o}`,t[o]),r+=`--${o}: ${t[o]};`;n[$te]=r}}const pNe=/(^|;)\s*display\s*:/,Ute=/\s*!important$/;function W7(e,t,n){if(mt(n))n.forEach(r=>W7(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(o,i){const a=PM[i];if(a)return a;let l=qi(i);if(l!=="filter"&&l in o)return PM[i]=l;l=M0(l);for(let s=0;s<Wte.length;s++){const u=Wte[s]+l;if(u in o)return PM[i]=u}return i}(e,t);Ute.test(n)?e.setProperty(Za(r),n.replace(Ute,""),"important"):e[r]=n}}const Wte=["Webkit","Moz","ms"],PM={},Gte="http://www.w3.org/1999/xlink";function Rd(e,t,n,r){e.addEventListener(t,n,r)}const qte=Symbol("_vei");function hNe(e,t,n,r,o=null){const i=e[qte]||(e[qte]={}),a=i[t];if(r&&a)a.value=r;else{const[l,s]=function(u){let c;if(Kte.test(u)){let f;for(c={};f=u.match(Kte);)u=u.slice(0,u.length-f[0].length),c[f[0].toLowerCase()]=!0}return[u[2]===":"?u.slice(3):Za(u.slice(2)),c]}(t);if(r){const u=i[t]=function(c,d){const f=p=>{if(p._vts){if(p._vts<=f.attached)return}else p._vts=Date.now();ls(function(m,v){if(mt(v)){const g=m.stopImmediatePropagation;return m.stopImmediatePropagation=()=>{g.call(m),m._stopped=!0},v.map(b=>y=>!y._stopped&&b&&b(y))}return v}(p,f.value),d,5,[p])};return f.value=c,f.attached=mNe(),f}(r,o);Rd(e,l,u,s)}else a&&(function(u,c,d,f){u.removeEventListener(c,d,f)}(e,l,a,s),i[t]=void 0)}}const Kte=/(?:Once|Passive|Capture)$/;let jM=0;const vNe=Promise.resolve(),mNe=()=>jM||(vNe.then(()=>jM=0),jM=Date.now()),Yte=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;function Xte(e,t){const n=Te(e);class r extends G7{constructor(i){super(n,i,t)}}return r.def=n,r}const gNe=typeof HTMLElement<"u"?HTMLElement:class{};class G7 extends gNe{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),St(()=>{this._connected||(qs(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const o of r)this._setAttr(o.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,o=!1)=>{const{props:i,styles:a}=r;let l;if(i&&!mt(i))for(const s in i){const u=i[s];(u===Number||u&&u.type===Number)&&(s in this._props&&(this._props[s]=J3(this._props[s])),(l||(l=Object.create(null)))[qi(s)]=!0)}this._numberProps=l,o&&this._resolveProps(r),this._applyStyles(a),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=mt(n)?n:Object.keys(n||{});for(const o of Object.keys(this))o[0]!=="_"&&r.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of r.map(qi))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(i){this._setProp(o,i)}})}_setAttr(t){let n=this.getAttribute(t);const r=qi(t);this._numberProps&&this._numberProps[r]&&(n=J3(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,o=!0){n!==this._props[t]&&(this._props[t]=n,o&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(Za(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Za(t),n+""):n||this.removeAttribute(Za(t))))}_update(){qs(this._createVNode(),this.shadowRoot)}_createVNode(){const t=ie(this._def,vo({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(i,a)=>{this.dispatchEvent(new CustomEvent(i,{detail:a}))};n.emit=(i,...a)=>{r(i,a),Za(i)!==i&&r(Za(i),a)};let o=this;for(;o=o&&(o.parentNode||o.host);)if(o instanceof G7){n.parent=o._instance,n.provides=o._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}let VM,zM,gb,HM,Qte;VM=new WeakMap,zM=new WeakMap,gb=Symbol("_moveCb"),HM=Symbol("_enterCb"),Qte={name:"TransitionGroup",props:vo({},dNe,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=dn(),r=nM();let o,i;return zs(()=>{if(!o.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!function(s,u,c){const d=s.cloneNode(),f=s[G0];f&&f.forEach(v=>{v.split(/\s+/).forEach(g=>g&&d.classList.remove(g))}),c.split(/\s+/).forEach(v=>v&&d.classList.add(v)),d.style.display="none";const p=u.nodeType===1?u:u.parentNode;p.appendChild(d);const{hasTransform:m}=jte(d);return p.removeChild(d),m}(o[0].el,n.vnode.el,a))return;o.forEach(yNe),o.forEach(bNe);const l=o.filter(ANe);Hte(),l.forEach(s=>{const u=s.el,c=u.style;Fd(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[gb]=f=>{f&&f.target!==u||f&&!/transform$/.test(f.propertyName)||(u.removeEventListener("transitionend",d),u[gb]=null,Yf(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=Zn(e),l=Bte(a);let s=a.tag||bt;o=i,i=t.default?F7(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&z0(c,Pm(c,l,r,n))}if(o)for(let u=0;u<o.length;u++){const c=o[u];z0(c,Pm(c,l,r,n)),VM.set(c,c.el.getBoundingClientRect())}return ie(s,null,i)}}},S3=Qte;function yNe(e){const t=e.el;t[gb]&&t[gb](),t[HM]&&t[HM]()}function bNe(e){zM.set(e,e.el.getBoundingClientRect())}function ANe(e){const t=VM.get(e),n=zM.get(e),r=t.left-n.left,o=t.top-n.top;if(r||o){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${r}px,${o}px)`,i.transitionDuration="0s",e}}const Xf=e=>{const t=e.props["onUpdate:modelValue"]||!1;return mt(t)?n=>N0(t,n):t};function wNe(e){e.target.composing=!0}function Jte(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let us,Qf;us=Symbol("_assign"),f0={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[us]=Xf(o);const i=r||o.props&&o.props.type==="number";Rd(e,t?"change":"input",a=>{if(a.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Nm(l)),e[us](l)}),n&&Rd(e,"change",()=>{e.value=e.value.trim()}),t||(Rd(e,"compositionstart",wNe),Rd(e,"compositionend",Jte),Rd(e,"change",Jte))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},i){if(e[us]=Xf(i),e.composing)return;const a=t??"";if((o||e.type==="number"?Nm(e.value):e.value)!==a){if(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===a))return;e.value=a}}},Qf={deep:!0,created(e,t,n){e[us]=Xf(n),Rd(e,"change",()=>{const r=e._modelValue,o=$m(e),i=e.checked,a=e[us];if(mt(r)){const l=d7(r,o),s=l!==-1;if(i&&!s)a(r.concat(o));else if(!i&&s){const u=[...r];u.splice(l,1),a(u)}}else if(Vf(r)){const l=new Set(r);i?l.add(o):l.delete(o),a(l)}else a(nne(e,i))})},mounted:Zte,beforeUpdate(e,t,n){e[us]=Xf(n),Zte(e,t,n)}};function Zte(e,{value:t,oldValue:n},r){e._modelValue=t,mt(t)?e.checked=d7(t,r.props.value)>-1:Vf(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=zf(t,nne(e,!0)))}const yb={created(e,{value:t},n){e.checked=zf(t,n.props.value),e[us]=Xf(n),Rd(e,"change",()=>{e[us]($m(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[us]=Xf(r),t!==n&&(e.checked=zf(t,r.props.value))}},ene={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=Vf(t);Rd(e,"change",()=>{const i=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?Nm($m(a)):$m(a));e[us](e.multiple?o?new Set(i):i:i[0]),e._assigning=!0,St(()=>{e._assigning=!1})}),e[us]=Xf(r)},mounted(e,{value:t,modifiers:{number:n}}){tne(e,t,n)},beforeUpdate(e,t,n){e[us]=Xf(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||tne(e,t,n)}};function tne(e,t,n){const r=e.multiple,o=mt(t);if(!r||o||Vf(t)){for(let i=0,a=e.options.length;i<a;i++){const l=e.options[i],s=$m(l);if(r)if(o){const u=typeof s;l.selected=u==="string"||u==="number"?t.includes(n?Nm(s):s):d7(t,s)>-1}else l.selected=t.has(s);else if(zf($m(l),t))return void(e.selectedIndex!==i&&(e.selectedIndex=i))}r||e.selectedIndex===-1||(e.selectedIndex=-1)}}function $m(e){return"_value"in e?e._value:e.value}function nne(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const rne={created(e,t,n){q7(e,t,n,null,"created")},mounted(e,t,n){q7(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){q7(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){q7(e,t,n,r,"updated")}};function one(e,t){switch(e){case"SELECT":return ene;case"TEXTAREA":return f0;default:switch(t){case"checkbox":return Qf;case"radio":return yb;default:return f0}}}function q7(e,t,n,r,o){const i=one(e.tagName,n.props&&n.props.type)[o];i&&i(e,t,n,r)}let ine,ane,lne,$M;ine=["ctrl","shift","alt","meta"],ane={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ine.some(n=>e[`${n}Key`]&&!t.includes(n))},Gt=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let a=0;a<t.length;a++){const l=ane[t[a]];if(l&&l(o,t))return}return e(o,...i)})},lne={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rr=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=Za(o.key);return t.some(a=>a===i||lne[a]===i)?e(o):void 0})},$M=vo({patchProp:(e,t,n,r,o,i,a,l,s)=>{const u=o==="svg";t==="class"?function(c,d,f){const p=c[G0];p&&(d=(d?[d,...p]:[...p]).join(" ")),d==null?c.removeAttribute("class"):f?c.setAttribute("class",d):c.className=d}(e,r,u):t==="style"?function(c,d,f){const p=c.style,m=an(f);let v=!1;if(f&&!m){if(d)if(an(d))for(const g of d.split(";")){const b=g.slice(0,g.indexOf(":")).trim();f[b]==null&&W7(p,b,"")}else for(const g in d)f[g]==null&&W7(p,g,"");for(const g in f)g==="display"&&(v=!0),W7(p,g,f[g])}else if(m){if(d!==f){const g=p[$te];g&&(f+=";"+g),p.cssText=f,v=pNe.test(f)}}else d&&c.removeAttribute("style");vb in c&&(c[vb]=v?p.display:"",c[RM]&&(p.display="none"))}(e,n,r):Tm(t)?s7(t)||hNe(e,t,0,r,a):(t[0]==="."?(t=t.slice(1),1):t[0]==="^"?(t=t.slice(1),0):function(c,d,f,p){if(p)return d==="innerHTML"||d==="textContent"||!!(d in c&&Yte(d)&&Ut(f));if(d==="spellcheck"||d==="draggable"||d==="translate"||d==="form"||d==="list"&&c.tagName==="INPUT"||d==="type"&&c.tagName==="TEXTAREA")return!1;if(d==="width"||d==="height"){const m=c.tagName;if(m==="IMG"||m==="VIDEO"||m==="CANVAS"||m==="SOURCE")return!1}return Yte(d)&&an(f)?!1:d in c}(e,t,r,u))?function(c,d,f,p,m,v,g){if(d==="innerHTML"||d==="textContent")return p&&g(p,m,v),void(c[d]=f??"");const b=c.tagName;if(d==="value"&&b!=="PROGRESS"&&!b.includes("-")){const w=f??"";return(b==="OPTION"?c.getAttribute("value")||"":c.value)===w&&"_value"in c||(c.value=w),f==null&&c.removeAttribute(d),void(c._value=f)}let y=!1;if(f===""||f==null){const w=typeof c[d];w==="boolean"?f=ZZ(f):f==null&&w==="string"?(f="",y=!0):w==="number"&&(f=0,y=!0)}try{c[d]=f}catch{}y&&c.removeAttribute(d)}(e,t,r,i,a,l,s):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),function(c,d,f,p){if(p&&d.startsWith("xlink:"))f==null?c.removeAttributeNS(Gte,d.slice(6,d.length)):c.setAttributeNS(Gte,d,f);else{const m=AMe(d);f==null||m&&!ZZ(f)?c.removeAttribute(d):c.setAttribute(d,m?"":f)}}(e,t,r,u))}},Fte);let bb,sne=!1;function une(){return bb||(bb=fte($M))}function cne(){return bb=sne?bb:pte($M),sne=!0,bb}const qs=(...e)=>{une().render(...e)},dne=(...e)=>{cne().hydrate(...e)},K7=(...e)=>{const t=une().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=pne(r);if(!o)return;const i=t._component;Ut(i)||i.render||i.template||(i.template=o.innerHTML),o.innerHTML="";const a=n(o,!1,fne(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t};function fne(e){return e instanceof SVGElement?"svg":typeof MathMLElement=="function"&&e instanceof MathMLElement?"mathml":void 0}function pne(e){return an(e)?document.querySelector(e):e}let hne=!1;const xNe=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:zee,BaseTransitionPropsValidators:rM,Comment:hi,DeprecationTypes:null,EffectScope:LT,ErrorCodes:{SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},ErrorTypeStrings:Ote,Fragment:bt,KeepAlive:oJ,ReactiveEffect:Fm,Static:qf,Suspense:YMe,Teleport:D3,Text:Dc,TrackOpTypes:{GET:"get",HAS:"has",ITERATE:"iterate"},Transition:ca,TransitionGroup:S3,TriggerOpTypes:{SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},VueElement:G7,assertNumber:function(e,t){},callWithAsyncErrorHandling:ls,callWithErrorHandling:Td,camelize:qi,capitalize:M0,cloneVNode:Tu,compatUtils:null,compile:()=>{},computed:ee,createApp:K7,createBlock:Pe,createCommentVNode:Fe,createElementBlock:fe,createElementVNode:ce,createHydrationRenderer:pte,createPropsRestProxy:function(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n},createRenderer:fte,createSSRApp:(...e)=>{const t=cne().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=pne(r);if(o)return n(o,!0,fne(o))},t},createSlots:Ff,createStaticVNode:function(e,t){const n=ie(qf,null,e);return n.staticCount=t,n},createTextVNode:Dt,createVNode:ie,customRef:KT,defineAsyncComponent:Uee,defineComponent:Te,defineCustomElement:Xte,defineEmits:function(){return null},defineExpose:function(e){},defineModel:function(){},defineOptions:function(e){},defineProps:function(){return null},defineSSRCustomElement:e=>Xte(e,dne),defineSlots:function(){return null},devtools:Tte,effect:function(e,t){e.effect instanceof Fm&&(e=e.effect.fn);const n=new Fm(e,fr,()=>{n.dirty&&n.run()});t&&(vo(n,t),t.scope&&eee(n,t.scope)),t&&t.lazy||n.run();const r=n.run.bind(n);return r.effect=n,r},effectScope:p7,getCurrentInstance:dn,getCurrentScope:Z3,getTransitionRawChildren:F7,guardReactiveProps:TO,h:pn,handleError:P0,hasInjectionContext:nte,hydrate:dne,initCustomFormatter:function(){},initDirectivesForSSR:()=>{hne||(hne=!0,f0.getSSRProps=({value:e})=>({value:e}),yb.getSSRProps=({value:e},t)=>{if(t.props&&zf(t.props.value,e))return{checked:!0}},Qf.getSSRProps=({value:e},t)=>{if(mt(e)){if(t.props&&d7(e,t.props.value)>-1)return{checked:!0}}else if(Vf(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},rne.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=one(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},$n.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},inject:Rt,isMemoSame:Dte,isProxy:UT,isReactive:Od,isReadonly:L0,isRef:Jn,isRuntimeOnly:()=>!$7,isShallow:tb,isVNode:oo,markRaw:Fo,mergeDefaults:function(e,t){const n=db(e);for(const r in t){if(r.startsWith("__skip"))continue;let o=n[r];o?mt(o)||Ut(o)?o=n[r]={type:o,default:t[r]}:o.default=t[r]:o===null&&(o=n[r]={default:t[r]}),o&&t[`__skip_${r}`]&&(o.skipFactory=!0)}return n},mergeModels:function(e,t){return e&&t?mt(e)&&mt(t)?e.concat(t):vo({},db(e),db(t)):e||t},mergeProps:Un,nextTick:St,normalizeClass:oe,normalizeProps:iJ,normalizeStyle:$t,onActivated:KO,onBeforeMount:g0,onBeforeUnmount:xo,onBeforeUpdate:ub,onDeactivated:aM,onErrorCaptured:qee,onMounted:yn,onRenderTracked:dM,onRenderTriggered:cM,onScopeDispose:eb,onServerPrefetch:uM,onUnmounted:Vs,onUpdated:zs,openBlock:Y,popScopeId:_w,provide:qn,proxyRefs:qT,pushScopeId:xw,queuePostFlushCb:C7,reactive:Qn,readonly:xd,ref:de,registerRuntimeCompiler:function(e){$7=e,kM=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,ZMe))}},render:qs,renderList:bn,renderSlot:ft,resolveComponent:Qe,resolveDirective:gm,resolveDynamicComponent:Hn,resolveFilter:null,resolveTransitionHooks:Pm,setBlockTracking:_M,setDevtoolsHook:Mte,setTransitionHooks:z0,shallowReactive:x7,shallowReadonly:function(e){return _7(e,!0,kMe,BMe,Aee)},shallowRef:Qo,ssrContextKey:Bee,ssrUtils:Nte,stop:function(e){e.effect.stop()},toDisplayString:Ye,toHandlerKey:Mm,toHandlers:Yee,toRaw:Zn,toRef:dr,toRefs:di,toValue:function(e){return Ut(e)?e():M(e)},transformVNodeArgs:function(e){},triggerRef:function(e){Rm(e,4)},unref:M,useAttrs:yc,useCssModule:function(e="$style"){{const t=dn();if(!t)return Hr;const n=t.type.__cssModules;return n&&n[e]||Hr}},useCssVars:IM,useModel:function(e,t,n=Hr){const r=dn(),o=qi(t),i=Za(t),a=KT((s,u)=>{let c;return jee(()=>{const d=e[t];Ws(c,d)&&(c=d,u())}),{get:()=>(s(),n.get?n.get(c):c),set(d){const f=r.vnode.props;f&&(t in f||o in f||i in f)&&(`onUpdate:${t}`in f||`onUpdate:${o}`in f||`onUpdate:${i}`in f)||!Ws(d,c)||(c=d,u()),r.emit(`update:${t}`,n.set?n.set(d):d)}}}),l=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return a[Symbol.iterator]=()=>{let s=0;return{next:()=>s<2?{value:s++?e[l]||{}:a,done:!1}:{done:!0}}},a},useSSRContext:Lee,useSlots:Ga,useTransitionState:nM,vModelCheckbox:Qf,vModelDynamic:rne,vModelRadio:yb,vModelSelect:ene,vModelText:f0,vShow:$n,version:TM,warn:MM,watch:Je,watchEffect:yl,watchPostEffect:Pee,watchSyncEffect:jee,withAsyncContext:function(e){const t=dn();let n=e();return SM(),D0(n)&&(n=n.catch(r=>{throw W0(t),r})),[n,()=>W0(t)]},withCtx:he,withDefaults:function(e,t){return null},withDirectives:nn,withKeys:Rr,withMemo:function(e,t,n,r){const o=n[r];if(o&&Dte(o,e))return o;const i=t();return i.memo=e.slice(),n[r]=i},withModifiers:Gt,withScopeId:e=>he},Symbol.toStringTag,{value:"Module"}));var Xe=STe,Dn=hMe,or=B3(xNe);const vne="9.10.2",mne=Dn.CoreWarnCodes.__EXTEND_POINT__,Id=Xe.incrementer(mne),Eo={FALLBACK_TO_ROOT:mne,NOT_SUPPORTED_PRESERVE:Id(),NOT_SUPPORTED_FORMATTER:Id(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Id(),NOT_SUPPORTED_GET_CHOICE_INDEX:Id(),COMPONENT_NAME_LEGACY_COMPATIBLE:Id(),NOT_FOUND_PARENT_SCOPE:Id(),IGNORE_OBJ_FLATTEN:Id(),NOTICE_DROP_ALLOW_COMPOSITION:Id(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Id()},_Ne={[Eo.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Eo.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[Eo.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[Eo.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[Eo.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[Eo.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[Eo.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Eo.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Eo.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see \u{1F449} https://tinyurl.com/2p97mcze",[Eo.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Dl(e,...t){return Xe.format(_Ne[e],...t)}const gne=Dn.CoreErrorCodes.__EXTEND_POINT__,Ol=Xe.incrementer(gne),Fr={UNEXPECTED_RETURN_TYPE:gne,INVALID_ARGUMENT:Ol(),MUST_BE_CALL_SETUP_TOP:Ol(),NOT_INSTALLED:Ol(),NOT_AVAILABLE_IN_LEGACY_MODE:Ol(),REQUIRED_VALUE:Ol(),INVALID_VALUE:Ol(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Ol(),NOT_INSTALLED_WITH_PROVIDE:Ol(),UNEXPECTED_ERROR:Ol(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Ol(),BRIDGE_SUPPORT_VUE_2_ONLY:Ol(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Ol(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Ol(),__EXTEND_POINT__:Ol()};function Oi(e,...t){return Dn.createCompileError(e,null,{messages:ENe,args:t})}const ENe={[Fr.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Fr.INVALID_ARGUMENT]:"Invalid argument",[Fr.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Fr.NOT_INSTALLED]:"Need to install with `app.use` function",[Fr.UNEXPECTED_ERROR]:"Unexpected error",[Fr.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[Fr.REQUIRED_VALUE]:"Required in value: {0}",[Fr.INVALID_VALUE]:"Invalid value",[Fr.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Fr.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Fr.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Fr.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[Fr.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define \u2018i18n\u2019 option or custom block in Composition API with using local scope in Legacy API mode",[Fr.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},UM=Xe.makeSymbol("__translateVNode"),WM=Xe.makeSymbol("__datetimeParts"),GM=Xe.makeSymbol("__numberParts"),qM=Xe.makeSymbol("__enableEmitter"),KM=Xe.makeSymbol("__disableEmitter"),yne=Xe.makeSymbol("__setPluralRules");Xe.makeSymbol("__intlifyMeta");const bne=Xe.makeSymbol("__injectWithOption"),YM=Xe.makeSymbol("__dispose");function Ab(e){if(!Xe.isObject(e))return e;for(const t in e)if(Xe.hasOwn(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e,i=!1;for(let a=0;a<r;a++){if(n[a]in o||(o[n[a]]={}),!Xe.isObject(o[n[a]])){Xe.warn(Dl(Eo.IGNORE_OBJ_FLATTEN,{key:n[a]})),i=!0;break}o=o[n[a]]}i||(o[n[r]]=e[t],delete e[t]),Xe.isObject(o[n[r]])&&Ab(o[n[r]])}else Xe.isObject(e[t])&&Ab(e[t]);return e}function Y7(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:i}=t,a=Xe.isPlainObject(n)?n:Xe.isArray(r)?{}:{[e]:{}};if(Xe.isArray(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:s,resource:u}=l;s?(a[s]=a[s]||{},Xe.deepCopy(u,a[s])):Xe.deepCopy(u,a)}else Xe.isString(l)&&Xe.deepCopy(JSON.parse(l),a)}),o==null&&i)for(const l in a)Xe.hasOwn(a,l)&&Ab(a[l]);return a}function Ane(e){return e.type}function wne(e,t,n){let r=Xe.isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Y7(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);if(o.length&&o.forEach(i=>{e.mergeLocaleMessage(i,r[i])}),Xe.isObject(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(Xe.isObject(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}function xne(e){return or.createVNode(or.Text,null,e,0)}const _ne="__INTLIFY_META__",Ene=()=>[],CNe=()=>!1;let Cne=0;function Sne(e){return(t,n,r,o)=>e(n,r,or.getCurrentInstance()||void 0,o)}const SNe=()=>{const e=or.getCurrentInstance();let t=null;return e&&(t=Ane(e)[_ne])?{[_ne]:t}:null};function XM(e={},t){const{__root:n,__injectWithOption:r}=e,o=n===void 0,i=e.flatJson,a=Xe.inBrowser?or.ref:or.shallowRef,l=!!e.translateExistCompatible;l&&Xe.warnOnce(Dl(Eo.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let s=!Xe.isBoolean(e.inheritLocale)||e.inheritLocale;const u=a(n&&s?n.locale.value:Xe.isString(e.locale)?e.locale:Dn.DEFAULT_LOCALE),c=a(n&&s?n.fallbackLocale.value:Xe.isString(e.fallbackLocale)||Xe.isArray(e.fallbackLocale)||Xe.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=a(Y7(u.value,e)),f=a(Xe.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),p=a(Xe.isPlainObject(e.numberFormats)?e.numberFormats:{[u.value]:{}});let m=n?n.missingWarn:!Xe.isBoolean(e.missingWarn)&&!Xe.isRegExp(e.missingWarn)||e.missingWarn,v=n?n.fallbackWarn:!Xe.isBoolean(e.fallbackWarn)&&!Xe.isRegExp(e.fallbackWarn)||e.fallbackWarn,g=n?n.fallbackRoot:!Xe.isBoolean(e.fallbackRoot)||e.fallbackRoot,b=!!e.fallbackFormat,y=Xe.isFunction(e.missing)?e.missing:null,w=Xe.isFunction(e.missing)?Sne(e.missing):null,x=Xe.isFunction(e.postTranslation)?e.postTranslation:null,_=n?n.warnHtmlMessage:!Xe.isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter;const C=n?n.modifiers:Xe.isPlainObject(e.modifiers)?e.modifiers:{};let T,k=e.pluralRules||n&&n.pluralRules;T=(()=>{o&&Dn.setFallbackContext(null);const G={version:vne,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:C,pluralRules:k,missing:w===null?void 0:w,missingWarn:m,fallbackWarn:v,fallbackFormat:b,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:_,escapeParameter:E,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};G.datetimeFormats=f.value,G.numberFormats=p.value,G.__datetimeFormatters=Xe.isPlainObject(T)?T.__datetimeFormatters:void 0,G.__numberFormatters=Xe.isPlainObject(T)?T.__numberFormatters:void 0,G.__v_emitter=Xe.isPlainObject(T)?T.__v_emitter:void 0;const z=Dn.createCoreContext(G);return o&&Dn.setFallbackContext(z),z})(),Dn.updateFallbackLocale(T,u.value,c.value);const I=or.computed({get:()=>u.value,set:G=>{u.value=G,T.locale=u.value}}),O=or.computed({get:()=>c.value,set:G=>{c.value=G,T.fallbackLocale=c.value,Dn.updateFallbackLocale(T,u.value,G)}}),F=or.computed(()=>d.value),N=or.computed(()=>f.value),B=or.computed(()=>p.value),L=(G,z,$,W,K,X)=>{let te;u.value,c.value,d.value,f.value,p.value;try{Dn.setAdditionalMeta(SNe()),o||(T.fallbackContext=n?Dn.getFallbackContext():void 0),te=G(T)}finally{Dn.setAdditionalMeta(null),o||(T.fallbackContext=void 0)}if($!=="translate exists"&&Xe.isNumber(te)&&te===Dn.NOT_REOSLVED||$==="translate exists"&&!te){const[ne,se]=z();if(n&&Xe.isString(ne)&&function(le,J){return le!=="translate"||!J.resolvedMessage}($,se)){g&&(Dn.isTranslateFallbackWarn(v,ne)||Dn.isTranslateMissingWarn(m,ne))&&Xe.warn(Dl(Eo.FALLBACK_TO_ROOT,{key:ne,type:$}));{const{__v_emitter:le}=T;le&&g&&le.emit("fallback",{type:$,key:ne,to:"global",groupId:`${$}:${ne}`})}}return n&&g?W(n):K(ne)}if(X(te))return te;throw Oi(Fr.UNEXPECTED_RETURN_TYPE)};function V(...G){return L(z=>Reflect.apply(Dn.translate,null,[z,...G]),()=>Dn.parseTranslateArgs(...G),"translate",z=>Reflect.apply(z.t,z,[...G]),z=>z,z=>Xe.isString(z))}const P={normalize:function(G){return G.map(z=>Xe.isString(z)||Xe.isNumber(z)||Xe.isBoolean(z)?xne(String(z)):z)},interpolate:G=>G,type:"vnode"};function H(G){return d.value[G]||{}}Cne++,n&&Xe.inBrowser&&(or.watch(n.locale,G=>{s&&(u.value=G,T.locale=G,Dn.updateFallbackLocale(T,u.value,c.value))}),or.watch(n.fallbackLocale,G=>{s&&(c.value=G,T.fallbackLocale=G,Dn.updateFallbackLocale(T,u.value,c.value))}));const U={id:Cne,locale:I,fallbackLocale:O,get inheritLocale(){return s},set inheritLocale(G){s=G,G&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Dn.updateFallbackLocale(T,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:F,get modifiers(){return C},get pluralRules(){return k||{}},get isGlobal(){return o},get missingWarn(){return m},set missingWarn(G){m=G,T.missingWarn=m},get fallbackWarn(){return v},set fallbackWarn(G){v=G,T.fallbackWarn=v},get fallbackRoot(){return g},set fallbackRoot(G){g=G},get fallbackFormat(){return b},set fallbackFormat(G){b=G,T.fallbackFormat=b},get warnHtmlMessage(){return _},set warnHtmlMessage(G){_=G,T.warnHtmlMessage=G},get escapeParameter(){return E},set escapeParameter(G){E=G,T.escapeParameter=G},t:V,getLocaleMessage:H,setLocaleMessage:function(G,z){if(i){const $={[G]:z};for(const W in $)Xe.hasOwn($,W)&&Ab($[W]);z=$[G]}d.value[G]=z,T.messages=d.value},mergeLocaleMessage:function(G,z){d.value[G]=d.value[G]||{};const $={[G]:z};if(i)for(const W in $)Xe.hasOwn($,W)&&Ab($[W]);z=$[G],Xe.deepCopy(z,d.value[G]),T.messages=d.value},getPostTranslationHandler:function(){return Xe.isFunction(x)?x:null},setPostTranslationHandler:function(G){x=G,T.postTranslation=G},getMissingHandler:function(){return y},setMissingHandler:function(G){G!==null&&(w=Sne(G)),y=G,T.missing=w},[yne]:function(G){k=G,T.pluralRules=k}};return U.datetimeFormats=N,U.numberFormats=B,U.rt=function(...G){const[z,$,W]=G;if(W&&!Xe.isObject(W))throw Oi(Fr.INVALID_ARGUMENT);return V(z,$,Xe.assign({resolvedMessage:!0},W||{}))},U.te=function(G,z){return L(()=>{if(!G)return!1;const $=H(Xe.isString(z)?z:u.value),W=T.messageResolver($,G);return l?W!=null:Dn.isMessageAST(W)||Dn.isMessageFunction(W)||Xe.isString(W)},()=>[G],"translate exists",$=>Reflect.apply($.te,$,[G,z]),CNe,$=>Xe.isBoolean($))},U.tm=function(G){const z=function($){let W=null;const K=Dn.fallbackWithLocaleChain(T,c.value,u.value);for(let X=0;X<K.length;X++){const te=d.value[K[X]]||{},ne=T.messageResolver(te,$);if(ne!=null){W=ne;break}}return W}(G);return z??(n&&n.tm(G)||{})},U.d=function(...G){return L(z=>Reflect.apply(Dn.datetime,null,[z,...G]),()=>Dn.parseDateTimeArgs(...G),"datetime format",z=>Reflect.apply(z.d,z,[...G]),()=>Dn.MISSING_RESOLVE_VALUE,z=>Xe.isString(z))},U.n=function(...G){return L(z=>Reflect.apply(Dn.number,null,[z,...G]),()=>Dn.parseNumberArgs(...G),"number format",z=>Reflect.apply(z.n,z,[...G]),()=>Dn.MISSING_RESOLVE_VALUE,z=>Xe.isString(z))},U.getDateTimeFormat=function(G){return f.value[G]||{}},U.setDateTimeFormat=function(G,z){f.value[G]=z,T.datetimeFormats=f.value,Dn.clearDateTimeFormat(T,G,z)},U.mergeDateTimeFormat=function(G,z){f.value[G]=Xe.assign(f.value[G]||{},z),T.datetimeFormats=f.value,Dn.clearDateTimeFormat(T,G,z)},U.getNumberFormat=function(G){return p.value[G]||{}},U.setNumberFormat=function(G,z){p.value[G]=z,T.numberFormats=p.value,Dn.clearNumberFormat(T,G,z)},U.mergeNumberFormat=function(G,z){p.value[G]=Xe.assign(p.value[G]||{},z),T.numberFormats=p.value,Dn.clearNumberFormat(T,G,z)},U[bne]=r,U[UM]=function(...G){return L(z=>{let $;const W=z;try{W.processor=P,$=Reflect.apply(Dn.translate,null,[W,...G])}finally{W.processor=null}return $},()=>Dn.parseTranslateArgs(...G),"translate",z=>z[UM](...G),z=>[xne(z)],z=>Xe.isArray(z))},U[WM]=function(...G){return L(z=>Reflect.apply(Dn.datetime,null,[z,...G]),()=>Dn.parseDateTimeArgs(...G),"datetime format",z=>z[WM](...G),Ene,z=>Xe.isString(z)||Xe.isArray(z))},U[GM]=function(...G){return L(z=>Reflect.apply(Dn.number,null,[z,...G]),()=>Dn.parseNumberArgs(...G),"number format",z=>z[GM](...G),Ene,z=>Xe.isString(z)||Xe.isArray(z))},U[qM]=G=>{T.__v_emitter=G},U[KM]=()=>{T.__v_emitter=void 0},U}function QM(e={},t){{const n=XM(function(i){const a=Xe.isString(i.locale)?i.locale:Dn.DEFAULT_LOCALE,l=Xe.isString(i.fallbackLocale)||Xe.isArray(i.fallbackLocale)||Xe.isPlainObject(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:a,s=Xe.isFunction(i.missing)?i.missing:void 0,u=!Xe.isBoolean(i.silentTranslationWarn)&&!Xe.isRegExp(i.silentTranslationWarn)||!i.silentTranslationWarn,c=!Xe.isBoolean(i.silentFallbackWarn)&&!Xe.isRegExp(i.silentFallbackWarn)||!i.silentFallbackWarn,d=!Xe.isBoolean(i.fallbackRoot)||i.fallbackRoot,f=!!i.formatFallbackMessages,p=Xe.isPlainObject(i.modifiers)?i.modifiers:{},m=i.pluralizationRules,v=Xe.isFunction(i.postTranslation)?i.postTranslation:void 0,g=!Xe.isString(i.warnHtmlInMessage)||i.warnHtmlInMessage!=="off",b=!!i.escapeParameterHtml,y=!Xe.isBoolean(i.sync)||i.sync;i.formatter&&Xe.warn(Dl(Eo.NOT_SUPPORTED_FORMATTER)),i.preserveDirectiveContent&&Xe.warn(Dl(Eo.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let w=i.messages;if(Xe.isPlainObject(i.sharedMessages)){const O=i.sharedMessages;w=Object.keys(O).reduce((F,N)=>{const B=F[N]||(F[N]={});return Xe.assign(B,O[N]),F},w||{})}const{__i18n:x,__root:_,__injectWithOption:E}=i,C=i.datetimeFormats,T=i.numberFormats,k=i.flatJson,I=i.translateExistCompatible;return{locale:a,fallbackLocale:l,messages:w,flatJson:k,datetimeFormats:C,numberFormats:T,missing:s,missingWarn:u,fallbackWarn:c,fallbackRoot:d,fallbackFormat:f,modifiers:p,pluralRules:m,postTranslation:v,warnHtmlMessage:g,escapeParameter:b,messageResolver:i.messageResolver,inheritLocale:y,translateExistCompatible:I,__i18n:x,__root:_,__injectWithOption:E}}(e)),{__extender:r}=e,o={id:n.id,get locale(){return n.locale.value},set locale(i){n.locale.value=i},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(i){n.fallbackLocale.value=i},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return Xe.warn(Dl(Eo.NOT_SUPPORTED_FORMATTER)),{interpolate:()=>[]}},set formatter(i){Xe.warn(Dl(Eo.NOT_SUPPORTED_FORMATTER))},get missing(){return n.getMissingHandler()},set missing(i){n.setMissingHandler(i)},get silentTranslationWarn(){return Xe.isBoolean(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(i){n.missingWarn=Xe.isBoolean(i)?!i:i},get silentFallbackWarn(){return Xe.isBoolean(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(i){n.fallbackWarn=Xe.isBoolean(i)?!i:i},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(i){n.fallbackFormat=i},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(i){n.setPostTranslationHandler(i)},get sync(){return n.inheritLocale},set sync(i){n.inheritLocale=i},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){n.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(i){n.escapeParameter=i},get preserveDirectiveContent(){return Xe.warn(Dl(Eo.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(i){Xe.warn(Dl(Eo.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...i){const[a,l,s]=i,u={};let c=null,d=null;if(!Xe.isString(a))throw Oi(Fr.INVALID_ARGUMENT);const f=a;return Xe.isString(l)?u.locale=l:Xe.isArray(l)?c=l:Xe.isPlainObject(l)&&(d=l),Xe.isArray(s)?c=s:Xe.isPlainObject(s)&&(d=s),Reflect.apply(n.t,n,[f,c||d||{},u])},rt:(...i)=>Reflect.apply(n.rt,n,[...i]),tc(...i){const[a,l,s]=i,u={plural:1};let c=null,d=null;if(!Xe.isString(a))throw Oi(Fr.INVALID_ARGUMENT);const f=a;return Xe.isString(l)?u.locale=l:Xe.isNumber(l)?u.plural=l:Xe.isArray(l)?c=l:Xe.isPlainObject(l)&&(d=l),Xe.isString(s)?u.locale=s:Xe.isArray(s)?c=s:Xe.isPlainObject(s)&&(d=s),Reflect.apply(n.t,n,[f,c||d||{},u])},te:(i,a)=>n.te(i,a),tm:i=>n.tm(i),getLocaleMessage:i=>n.getLocaleMessage(i),setLocaleMessage(i,a){n.setLocaleMessage(i,a)},mergeLocaleMessage(i,a){n.mergeLocaleMessage(i,a)},d:(...i)=>Reflect.apply(n.d,n,[...i]),getDateTimeFormat:i=>n.getDateTimeFormat(i),setDateTimeFormat(i,a){n.setDateTimeFormat(i,a)},mergeDateTimeFormat(i,a){n.mergeDateTimeFormat(i,a)},n:(...i)=>Reflect.apply(n.n,n,[...i]),getNumberFormat:i=>n.getNumberFormat(i),setNumberFormat(i,a){n.setNumberFormat(i,a)},mergeNumberFormat(i,a){n.mergeNumberFormat(i,a)},getChoiceIndex:(i,a)=>(Xe.warn(Dl(Eo.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1)};return o.__extender=r,o.__enableEmitter=i=>{const a=n;a[qM]&&a[qM](i)},o.__disableEmitter=()=>{const i=n;i[KM]&&i[KM]()},o}}const JM={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function kne(e){return or.Fragment}const kNe=or.defineComponent({name:"i18n-t",props:Xe.assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Xe.isNumber(e)||!isNaN(e)}},JM),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||J7({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(d=>d!=="_"),a={};e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=Xe.isString(e.plural)?+e.plural:e.plural);const l=function({slots:d},f){return f.length===1&&f[0]==="default"?(d.default?d.default():[]).reduce((p,m)=>[...p,...m.type===or.Fragment?m.children:[m]],[]):f.reduce((p,m)=>{const v=d[m];return v&&(p[m]=v()),p},{})}(t,i),s=o[UM](e.keypath,l,a),u=Xe.assign({},r),c=Xe.isString(e.tag)||Xe.isObject(e.tag)?e.tag:kne();return or.h(c,u,s)}}}),wb=kNe,DNe=wb;function Dne(e,t,n,r){const{slots:o,attrs:i}=t;return()=>{const a={part:!0};let l={};e.locale&&(a.locale=e.locale),Xe.isString(e.format)?a.key=e.format:Xe.isObject(e.format)&&(Xe.isString(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((f,p)=>n.includes(p)?Xe.assign({},f,{[p]:e.format[p]}):f,{}));const s=r(e.value,a,l);let u=[a.key];Xe.isArray(s)?u=s.map((f,p)=>{const m=o[f.type],v=m?m({[f.type]:f.value,index:p,parts:s}):[f.value];var g;return g=v,Xe.isArray(g)&&!Xe.isString(g[0])&&(v[0].key=`${f.type}-${p}`),v}):Xe.isString(s)&&(u=[s]);const c=Xe.assign({},i),d=Xe.isString(e.tag)||Xe.isObject(e.tag)?e.tag:kne();return or.h(d,c,u)}}const ONe=or.defineComponent({name:"i18n-n",props:Xe.assign({value:{type:Number,required:!0},format:{type:[String,Object]}},JM),setup(e,t){const n=e.i18n||J7({useScope:"parent",__useComponent:!0});return Dne(e,t,Dn.NUMBER_FORMAT_OPTIONS_KEYS,(...r)=>n[GM](...r))}}),X7=ONe,TNe=X7,MNe=or.defineComponent({name:"i18n-d",props:Xe.assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},JM),setup(e,t){const n=e.i18n||J7({useScope:"parent",__useComponent:!0});return Dne(e,t,Dn.DATETIME_FORMAT_OPTIONS_KEYS,(...r)=>n[WM](...r))}}),Q7=MNe,NNe=Q7;function One(e){const t=n=>{const{instance:r,modifiers:o,value:i}=n;if(!r||!r.$)throw Oi(Fr.UNEXPECTED_ERROR);const a=function(s,u){const c=s;if(s.mode==="composition")return c.__getInstance(u)||s.global;{const d=c.__getInstance(u);return d!=null?d.__composer:s.global.__composer}}(e,r.$);o.preserve&&Xe.warn(Dl(Eo.NOT_SUPPORTED_PRESERVE));const l=Tne(i);return[Reflect.apply(a.t,a,[...Mne(l)]),a]};return{created:(n,r)=>{const[o,i]=t(r);Xe.inBrowser&&e.global===i&&(n.__i18nWatcher=or.watch(i.locale,()=>{r.instance&&r.instance.$forceUpdate()})),n.__composer=i,n.textContent=o},unmounted:n=>{Xe.inBrowser&&n.__i18nWatcher&&(n.__i18nWatcher(),n.__i18nWatcher=void 0,delete n.__i18nWatcher),n.__composer&&(n.__composer=void 0,delete n.__composer)},beforeUpdate:(n,{value:r})=>{if(n.__composer){const o=n.__composer,i=Tne(r);n.textContent=Reflect.apply(o.t,o,[...Mne(i)])}},getSSRProps:n=>{const[r]=t(n);return{textContent:r}}}}function Tne(e){if(Xe.isString(e))return{path:e};if(Xe.isPlainObject(e)){if(!("path"in e))throw Oi(Fr.REQUIRED_VALUE,"path");return e}throw Oi(Fr.INVALID_VALUE)}function Mne(e){const{path:t,locale:n,args:r,choice:o,plural:i}=e,a={},l=r||{};return Xe.isString(n)&&(a.locale=n),Xe.isNumber(o)&&(a.plural=o),Xe.isNumber(i)&&(a.plural=i),[t,l,a]}function Nne(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[yne](t.pluralizationRules||e.pluralizationRules);const n=Y7(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const Fne=Xe.makeSymbol("global-vue-i18n");function J7(e={}){const t=or.getCurrentInstance();if(t==null)throw Oi(Fr.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Oi(Fr.NOT_INSTALLED);const n=function(s){{const u=or.inject(s.isCE?Fne:s.appContext.app.__VUE_I18N_SYMBOL__);if(!u)throw Oi(s.isCE?Fr.NOT_INSTALLED_WITH_PROVIDE:Fr.UNEXPECTED_ERROR);return u}}(t),r=function(s){return s.mode==="composition"?s.global:s.global.__composer}(n),o=Ane(t),i=function(s,u){return Xe.isEmptyObject(s)?"__i18n"in u?"local":"global":s.useScope?s.useScope:"local"}(e,o);if(n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Oi(Fr.NOT_AVAILABLE_IN_LEGACY_MODE);return function(s,u,c,d={}){const f=u==="local",p=or.shallowRef(null);if(f&&s.proxy&&!s.proxy.$options.i18n&&!s.proxy.$options.__i18n)throw Oi(Fr.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const m=Xe.isBoolean(d.inheritLocale)?d.inheritLocale:!Xe.isString(d.locale),v=or.ref(!f||m?c.locale.value:Xe.isString(d.locale)?d.locale:Dn.DEFAULT_LOCALE),g=or.ref(!f||m?c.fallbackLocale.value:Xe.isString(d.fallbackLocale)||Xe.isArray(d.fallbackLocale)||Xe.isPlainObject(d.fallbackLocale)||d.fallbackLocale===!1?d.fallbackLocale:v.value),b=or.ref(Y7(v.value,d)),y=or.ref(Xe.isPlainObject(d.datetimeFormats)?d.datetimeFormats:{[v.value]:{}}),w=or.ref(Xe.isPlainObject(d.numberFormats)?d.numberFormats:{[v.value]:{}}),x=f?c.missingWarn:!Xe.isBoolean(d.missingWarn)&&!Xe.isRegExp(d.missingWarn)||d.missingWarn,_=f?c.fallbackWarn:!Xe.isBoolean(d.fallbackWarn)&&!Xe.isRegExp(d.fallbackWarn)||d.fallbackWarn,E=f?c.fallbackRoot:!Xe.isBoolean(d.fallbackRoot)||d.fallbackRoot,C=!!d.fallbackFormat,T=Xe.isFunction(d.missing)?d.missing:null,k=Xe.isFunction(d.postTranslation)?d.postTranslation:null,I=f?c.warnHtmlMessage:!Xe.isBoolean(d.warnHtmlMessage)||d.warnHtmlMessage,O=!!d.escapeParameter,F=f?c.modifiers:Xe.isPlainObject(d.modifiers)?d.modifiers:{},N=d.pluralRules||f&&c.pluralRules;function B(){return[v.value,g.value,b.value,y.value,w.value]}const L=or.computed({get:()=>p.value?p.value.locale.value:v.value,set:ge=>{p.value&&(p.value.locale.value=ge),v.value=ge}}),V=or.computed({get:()=>p.value?p.value.fallbackLocale.value:g.value,set:ge=>{p.value&&(p.value.fallbackLocale.value=ge),g.value=ge}}),P=or.computed(()=>p.value?p.value.messages.value:b.value),H=or.computed(()=>y.value),U=or.computed(()=>w.value);function G(){return p.value?p.value.getPostTranslationHandler():k}function z(ge){p.value&&p.value.setPostTranslationHandler(ge)}function $(){return p.value?p.value.getMissingHandler():T}function W(ge){p.value&&p.value.setMissingHandler(ge)}function K(ge){return B(),ge()}function X(...ge){return p.value?K(()=>Reflect.apply(p.value.t,null,[...ge])):K(()=>"")}function te(...ge){return p.value?Reflect.apply(p.value.rt,null,[...ge]):""}function ne(...ge){return p.value?K(()=>Reflect.apply(p.value.d,null,[...ge])):K(()=>"")}function se(...ge){return p.value?K(()=>Reflect.apply(p.value.n,null,[...ge])):K(()=>"")}function le(ge){return p.value?p.value.tm(ge):{}}function J(ge,We){return!!p.value&&p.value.te(ge,We)}function Z(ge){return p.value?p.value.getLocaleMessage(ge):{}}function ye(ge,We){p.value&&(p.value.setLocaleMessage(ge,We),b.value[ge]=We)}function be(ge,We){p.value&&p.value.mergeLocaleMessage(ge,We)}function ve(ge){return p.value?p.value.getDateTimeFormat(ge):{}}function Ae(ge,We){p.value&&(p.value.setDateTimeFormat(ge,We),y.value[ge]=We)}function Ce(ge,We){p.value&&p.value.mergeDateTimeFormat(ge,We)}function _e(ge){return p.value?p.value.getNumberFormat(ge):{}}function ke(ge,We){p.value&&(p.value.setNumberFormat(ge,We),w.value[ge]=We)}function Be(ge,We){p.value&&p.value.mergeNumberFormat(ge,We)}const $e={get id(){return p.value?p.value.id:-1},locale:L,fallbackLocale:V,messages:P,datetimeFormats:H,numberFormats:U,get inheritLocale(){return p.value?p.value.inheritLocale:m},set inheritLocale(ge){p.value&&(p.value.inheritLocale=ge)},get availableLocales(){return p.value?p.value.availableLocales:Object.keys(b.value)},get modifiers(){return p.value?p.value.modifiers:F},get pluralRules(){return p.value?p.value.pluralRules:N},get isGlobal(){return!!p.value&&p.value.isGlobal},get missingWarn(){return p.value?p.value.missingWarn:x},set missingWarn(ge){p.value&&(p.value.missingWarn=ge)},get fallbackWarn(){return p.value?p.value.fallbackWarn:_},set fallbackWarn(ge){p.value&&(p.value.missingWarn=ge)},get fallbackRoot(){return p.value?p.value.fallbackRoot:E},set fallbackRoot(ge){p.value&&(p.value.fallbackRoot=ge)},get fallbackFormat(){return p.value?p.value.fallbackFormat:C},set fallbackFormat(ge){p.value&&(p.value.fallbackFormat=ge)},get warnHtmlMessage(){return p.value?p.value.warnHtmlMessage:I},set warnHtmlMessage(ge){p.value&&(p.value.warnHtmlMessage=ge)},get escapeParameter(){return p.value?p.value.escapeParameter:O},set escapeParameter(ge){p.value&&(p.value.escapeParameter=ge)},t:X,getPostTranslationHandler:G,setPostTranslationHandler:z,getMissingHandler:$,setMissingHandler:W,rt:te,d:ne,n:se,tm:le,te:J,getLocaleMessage:Z,setLocaleMessage:ye,mergeLocaleMessage:be,getDateTimeFormat:ve,setDateTimeFormat:Ae,mergeDateTimeFormat:Ce,getNumberFormat:_e,setNumberFormat:ke,mergeNumberFormat:Be};function rt(ge){ge.locale.value=v.value,ge.fallbackLocale.value=g.value,Object.keys(b.value).forEach(We=>{ge.mergeLocaleMessage(We,b.value[We])}),Object.keys(y.value).forEach(We=>{ge.mergeDateTimeFormat(We,y.value[We])}),Object.keys(w.value).forEach(We=>{ge.mergeNumberFormat(We,w.value[We])}),ge.escapeParameter=O,ge.fallbackFormat=C,ge.fallbackRoot=E,ge.fallbackWarn=_,ge.missingWarn=x,ge.warnHtmlMessage=I}return or.onBeforeMount(()=>{if(s.proxy==null||s.proxy.$i18n==null)throw Oi(Fr.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const ge=p.value=s.proxy.$i18n.__composer;u==="global"?(v.value=ge.locale.value,g.value=ge.fallbackLocale.value,b.value=ge.messages.value,y.value=ge.datetimeFormats.value,w.value=ge.numberFormats.value):f&&rt(ge)}),$e}(t,i,r,e)}if(i==="global")return wne(r,e,o),r;if(i==="parent"){let s=function(u,c,d=!1){let f=null;const p=c.root;let m=function(v,g=!1){return v==null?null:g&&v.vnode.ctx||v.parent}(c,d);for(;m!=null;){const v=u;if(u.mode==="composition")f=v.__getInstance(m);else{const g=v.__getInstance(m);g!=null&&(f=g.__composer,d&&f&&!f[bne]&&(f=null))}if(f!=null||p===m)break;m=m.parent}return f}(n,t,e.__useComponent);return s==null&&(Xe.warn(Dl(Eo.NOT_FOUND_PARENT_SCOPE)),s=r),s}const a=n;let l=a.__getInstance(t);if(l==null){const s=Xe.assign({},e);"__i18n"in o&&(s.__i18n=o.__i18n),r&&(s.__root=r),l=XM(s),a.__composerExtend&&(l[YM]=a.__composerExtend(l)),function(u,c,d){or.onMounted(()=>{},c),or.onUnmounted(()=>{const f=d;u.__deleteInstance(c);const p=f[YM];p&&(p(),delete f[YM])},c)}(a,t,l),a.__setInstance(t,l)}return l}const FNe=["locale","fallbackLocale","availableLocales"],Rne=["t","rt","d","n","tm","te"];Dn.registerMessageCompiler(Dn.compile),Dn.registerMessageResolver(Dn.resolveValue),Dn.registerLocaleFallbacker(Dn.fallbackWithLocaleChain);{const e=Xe.getGlobalThis();e.__INTLIFY__=!0,Dn.setDevToolsHook(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}rs.DatetimeFormat=Q7,rs.I18nD=NNe,rs.I18nInjectionKey=Fne,rs.I18nN=TNe,rs.I18nT=DNe,rs.NumberFormat=X7,rs.Translation=wb,rs.VERSION=vne,rs.castToVueI18n=e=>{if(!("__VUE_I18N_BRIDGE__"in e))throw Oi(Fr.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},rs.createI18n=function(e={},t){const n=!Xe.isBoolean(e.legacy)||e.legacy,r=!Xe.isBoolean(e.globalInjection)||e.globalInjection,o=!n||!!e.allowComposition,i=new Map,[a,l]=function(u,c){const d=or.effectScope();{const f=c?d.run(()=>QM(u)):d.run(()=>XM(u));if(f==null)throw Oi(Fr.UNEXPECTED_ERROR);return[d,f]}}(e,n),s=Xe.makeSymbol("vue-i18n");n&&o&&Xe.warn(Dl(Eo.NOTICE_DROP_ALLOW_COMPOSITION));{const u={get mode(){return n?"legacy":"composition"},get allowComposition(){return o},async install(c,...d){if(c.__VUE_I18N_SYMBOL__=s,c.provide(c.__VUE_I18N_SYMBOL__,u),Xe.isPlainObject(d[0])){const m=d[0];u.__composerExtend=m.__composerExtend,u.__vueI18nExtend=m.__vueI18nExtend}let f=null;!n&&r&&(f=function(m,v){const g=Object.create(null);return FNe.forEach(y=>{const w=Object.getOwnPropertyDescriptor(v,y);if(!w)throw Oi(Fr.UNEXPECTED_ERROR);const x=or.isRef(w.value)?{get:()=>w.value.value,set(_){w.value.value=_}}:{get:()=>w.get&&w.get()};Object.defineProperty(g,y,x)}),m.config.globalProperties.$i18n=g,Rne.forEach(y=>{const w=Object.getOwnPropertyDescriptor(v,y);if(!w||!w.value)throw Oi(Fr.UNEXPECTED_ERROR);Object.defineProperty(m.config.globalProperties,`$${y}`,w)}),()=>{delete m.config.globalProperties.$i18n,Rne.forEach(y=>{delete m.config.globalProperties[`$${y}`]})}}(c,u.global)),function(m,v,...g){const b=Xe.isPlainObject(g[0])?g[0]:{},y=!!b.useI18nComponentName,w=!Xe.isBoolean(b.globalInstall)||b.globalInstall;w&&y&&Xe.warn(Dl(Eo.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:wb.name})),w&&([y?"i18n":wb.name,"I18nT"].forEach(x=>m.component(x,wb)),[X7.name,"I18nN"].forEach(x=>m.component(x,X7)),[Q7.name,"I18nD"].forEach(x=>m.component(x,Q7))),m.directive("t",One(v))}(c,u,...d),n&&c.mixin(function(m,v,g){return{beforeCreate(){const b=or.getCurrentInstance();if(!b)throw Oi(Fr.UNEXPECTED_ERROR);const y=this.$options;if(y.i18n){const w=y.i18n;if(y.__i18n&&(w.__i18n=y.__i18n),w.__root=v,this===this.$root)this.$i18n=Nne(m,w);else{w.__injectWithOption=!0,w.__extender=g.__vueI18nExtend,this.$i18n=QM(w);const x=this.$i18n;x.__extender&&(x.__disposer=x.__extender(this.$i18n))}}else if(y.__i18n)if(this===this.$root)this.$i18n=Nne(m,y);else{this.$i18n=QM({__i18n:y.__i18n,__injectWithOption:!0,__extender:g.__vueI18nExtend,__root:v});const w=this.$i18n;w.__extender&&(w.__disposer=w.__extender(this.$i18n))}else this.$i18n=m;y.__i18nGlobal&&wne(v,y,y),this.$t=(...w)=>this.$i18n.t(...w),this.$rt=(...w)=>this.$i18n.rt(...w),this.$tc=(...w)=>this.$i18n.tc(...w),this.$te=(w,x)=>this.$i18n.te(w,x),this.$d=(...w)=>this.$i18n.d(...w),this.$n=(...w)=>this.$i18n.n(...w),this.$tm=w=>this.$i18n.tm(w),g.__setInstance(b,this.$i18n)},mounted(){},unmounted(){const b=or.getCurrentInstance();if(!b)throw Oi(Fr.UNEXPECTED_ERROR);const y=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,y.__disposer&&(y.__disposer(),delete y.__disposer,delete y.__extender),g.__deleteInstance(b),delete this.$i18n}}}(l,l.__composer,u));const p=c.unmount;c.unmount=()=>{f&&f(),u.dispose(),p()}},get global(){return l},dispose(){a.stop()},__instances:i,__getInstance:function(c){return i.get(c)||null},__setInstance:function(c,d){i.set(c,d)},__deleteInstance:function(c){i.delete(c)}};return u}},rs.useI18n=J7,rs.vTDirective=One,NQ=rs;let Ine;const Z7=e=>Ine=e,Bne=Symbol();function ZM(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var xb,eN;(eN=xb||(xb={})).direct="direct",eN.patchObject="patch object",eN.patchFunction="patch function";const Lne=()=>{};function Pne(e,t,n,r=Lne){e.push(t);const o=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Z3()&&eb(o),o}function Um(e,...t){e.slice().forEach(n=>{n(...t)})}const RNe=e=>e(),jne=Symbol(),tN=Symbol();function nN(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];ZM(o)&&ZM(r)&&e.hasOwnProperty(n)&&!Jn(r)&&!Od(r)?e[n]=nN(o,r):e[n]=r}return e}const INe=Symbol(),{assign:Jf}=Object;function BNe(e){return!(!Jn(e)||!e.effect)}function Vne(e,t,n={},r,o,i){let a;const l=Jf({actions:{}},n),s={deep:!0};let u,c,d,f=[],p=[];const m=r.state.value[e];let v;function g(C){let T;u=c=!1,typeof C=="function"?(C(r.state.value[e]),T={type:xb.patchFunction,storeId:e,events:d}):(nN(r.state.value[e],C),T={type:xb.patchObject,payload:C,storeId:e,events:d});const k=v=Symbol();St().then(()=>{v===k&&(u=!0)}),c=!0,Um(f,T,r.state.value[e])}i||m||(r.state.value[e]={}),de({});const b=i?function(){const{state:C}=n,T=C?C():{};this.$patch(k=>{Jf(k,T)})}:Lne,y=(C,T="")=>{if(jne in C)return C[tN]=T,C;const k=function(){Z7(r);const I=Array.from(arguments),O=[],F=[];let N;Um(p,{args:I,name:k[tN],store:x,after:function(B){O.push(B)},onError:function(B){F.push(B)}});try{N=C.apply(this&&this.$id===e?this:x,I)}catch(B){throw Um(F,B),B}return N instanceof Promise?N.then(B=>(Um(O,B),B)).catch(B=>(Um(F,B),Promise.reject(B))):(Um(O,N),N)};return k[jne]=!0,k[tN]=T,k},w={_p:r,$id:e,$onAction:Pne.bind(null,p),$patch:g,$reset:b,$subscribe(C,T={}){const k=Pne(f,C,T.detached,()=>I()),I=a.run(()=>Je(()=>r.state.value[e],O=>{(T.flush==="sync"?c:u)&&C({storeId:e,type:xb.direct,events:d},O)},Jf({},s,T)));return k},$dispose:function(){a.stop(),f=[],p=[],r._s.delete(e)}},x=Qn(w);r._s.set(e,x);const _=(r._a&&r._a.runWithContext||RNe)(()=>r._e.run(()=>(a=p7()).run(()=>t({action:y}))));for(const C in _){const T=_[C];if(Jn(T)&&!BNe(T)||Od(T))i||(!m||ZM(E=T)&&E.hasOwnProperty(INe)||(Jn(T)?T.value=m[C]:nN(T,m[C])),r.state.value[e][C]=T);else if(typeof T=="function"){const k=y(T,C);_[C]=k,l.actions[C]=T}}var E;return Jf(x,_),Jf(Zn(x),_),Object.defineProperty(x,"$state",{get:()=>r.state.value[e],set:C=>{g(T=>{Jf(T,C)})}}),r._p.forEach(C=>{Jf(x,a.run(()=>C({store:x,app:r._a,pinia:r,options:l})))}),m&&i&&n.hydrate&&n.hydrate(x.$state,m),u=!0,c=!0,x}ym=function(e,t,n){let r,o;const i=typeof t=="function";function a(l,s){const u=nte();return(l=l||(u?Rt(Bne,null):null))&&Z7(l),(l=Ine)._s.has(r)||(i?Vne(r,t,o,l):function(c,d,f){const{state:p,actions:m,getters:v}=d,g=f.state.value[c];let b;b=Vne(c,function(){g||(f.state.value[c]=p?p():{});const y=di(f.state.value[c]);return Jf(y,m,Object.keys(v||{}).reduce((w,x)=>(w[x]=Fo(ee(()=>{Z7(f);const _=f._s.get(c);return v[x].call(_,_)})),w),{}))},d,f,0,!0)}(r,o,l)),l._s.get(r)}return typeof e=="string"?(r=e,o=i?n:t):(o=e,r=e.id),a.$id=r,a};function zne(e,t){return e=function(n){return typeof n=="object"&&n!==null}(e)?e:Object.create(null),new Proxy(e,{get:(n,r,o)=>r==="key"?Reflect.get(n,r,o):Reflect.get(n,r,o)||Reflect.get(t,r,o)})}function Hne(e,{storage:t,serializer:n,key:r,debug:o}){try{const i=t==null?void 0:t.getItem(r);i&&e.$patch(n==null?void 0:n.deserialize(i))}catch(i){o&&console.error("[pinia-plugin-persistedstate]",i)}}function $ne(e,{storage:t,serializer:n,key:r,paths:o,debug:i}){try{const a=Array.isArray(o)?function(l,s){return s.reduce((u,c)=>{const d=c.split(".");return function(f,p,m){return p.slice(0,-1).reduce((v,g)=>/^(__proto__)$/.test(g)?{}:v[g]=v[g]||{},f)[p[p.length-1]]=m,f}(u,d,function(f,p){return p.reduce((m,v)=>m==null?void 0:m[v],f)}(l,d))},{})}(e,o):e;t.setItem(r,n.serialize(a))}catch(a){i&&console.error("[pinia-plugin-persistedstate]",a)}}var LNe=function(e={}){return t=>{const{auto:n=!1}=e,{options:{persist:r=n},store:o,pinia:i}=t;if(!r)return;if(!(o.$id in i.state.value)){const l=i._s.get(o.$id.replace("__hot:",""));return void(l&&Promise.resolve().then(()=>l.$persist()))}const a=(Array.isArray(r)?r.map(l=>zne(l,e)):[zne(r,e)]).map(function(l,s){return u=>{var c;try{const{storage:d=localStorage,beforeRestore:f,afterRestore:p,serializer:m={serialize:JSON.stringify,deserialize:JSON.parse},key:v=s.$id,paths:g=null,debug:b=!1}=u;return{storage:d,beforeRestore:f,afterRestore:p,serializer:m,key:((c=l.key)!=null?c:y=>y)(typeof v=="string"?v:v(s.$id)),paths:g,debug:b}}catch(d){return u.debug&&console.error("[pinia-plugin-persistedstate]",d),null}}}(e,o)).filter(Boolean);o.$persist=()=>{a.forEach(l=>{$ne(o.$state,l)})},o.$hydrate=({runHooks:l=!0}={})=>{a.forEach(s=>{const{beforeRestore:u,afterRestore:c}=s;l&&(u==null||u(t)),Hne(o,s),l&&(c==null||c(t))})},a.forEach(l=>{const{beforeRestore:s,afterRestore:u}=l;s==null||s(t),Hne(o,l),u==null||u(t),o.$subscribe((c,d)=>{$ne(d,l)},{detached:!0})})}}();Nf=function(){const e=p7(!0),t=e.run(()=>de({}));let n=[],r=[];const o=Fo({install(i){Z7(o),o._a=i,i.provide(Bne,o),i.config.globalProperties.$pinia=o,r.forEach(a=>n.push(a)),r=[]},use(i){return this._a?n.push(i):r.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}(),Nf.use(LNe);var Une={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}},Wne={exports:{}};Wne.exports=function(){function e(g,b){for(var y in b)g[y]=b[y];return g}function t(g){var b=!1;if(g&&g.setItem){b=!0;var y="__"+Math.round(1e7*Math.random());try{g.setItem(y,y),g.removeItem(y)}catch{b=!1}}return b}function n(g){return typeof g=="string"&&window[g]instanceof Storage?window[g]:g}function r(g){return Object.prototype.toString.call(g)==="[object Date]"&&!isNaN(g.getTime())}function o(g,b){if(b=b||new Date,typeof g=="number"?g=g===1/0?d:new Date(b.getTime()+1e3*g):typeof g=="string"&&(g=new Date(g)),g&&!r(g))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return g}function i(g){var b=!1;if(g)if(g.code)switch(g.code){case 22:b=!0;break;case 1014:g.name==="NS_ERROR_DOM_QUOTA_REACHED"&&(b=!0)}else g.number===-2147024882&&(b=!0);return b}function a(g,b){this.c=new Date().getTime();var y=o(b=b||f);this.e=y.getTime(),this.v=g}function l(g){return typeof g=="object"&&!!(g&&"c"in g&&"e"in g&&"v"in g)}function s(g){return new Date().getTime()<g.e}function u(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function c(g){var b=e({storage:"localStorage",exp:1/0},g),y=b.exp;if(y&&typeof y!="number"&&!r(y))throw new Error("Constructor `exp` parameter cannot be converted to a valid Date instance");f=y;var w=n(b.storage),x=t(w);this.isSupported=function(){return x},x?(this.storage=w,this.quotaExceedHandler=function(_,E,C){if(console.warn("Quota exceeded!"),C&&C.force===!0){var T=this.deleteAllExpires();console.warn("delete all expires CacheItem : ["+T+"] and try execute `set` method again!");try{C.force=!1,this.set(_,E,C)}catch(k){console.warn(k)}}}):e(this,m)}var d=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),f=d,p={serialize:function(g){return JSON.stringify(g)},deserialize:function(g){return g&&JSON.parse(g)}},m={set:function(){},get:function(){},delete:function(){},deleteAllExpires:function(){},clear:function(){},add:function(){},replace:function(){},touch:function(){}},v={set:function(g,b,y){if(g=u(g),typeof y=="number"&&(y={exp:y}),y=e({force:!0},y),b===void 0)return this.delete(g);var w=p.serialize(b),x=new a(w,y.exp);try{this.storage.setItem(g,p.serialize(x))}catch(_){i(_)?this.quotaExceedHandler(g,w,y,_):console.error(_)}return b},get:function(g){g=u(g);var b=null;try{b=p.deserialize(this.storage.getItem(g))}catch{return null}if(l(b)){if(s(b)){var y=b.v;return p.deserialize(y)}this.delete(g)}return null},delete:function(g){return g=u(g),this.storage.removeItem(g),g},deleteAllExpires:function(){for(var g=this.storage.length,b=[],y=this,w=0;g>w;w++){var x=this.storage.key(w),_=null;try{_=p.deserialize(this.storage.getItem(x))}catch{}_!==null&&_.e!==void 0&&new Date().getTime()>=_.e&&b.push(x)}return b.forEach(function(E){y.delete(E)}),b},clear:function(){this.storage.clear()},add:function(g,b,y){g=u(g),typeof y=="number"&&(y={exp:y}),y=e({force:!0},y);try{var w=p.deserialize(this.storage.getItem(g));if(!l(w)||!s(w))return this.set(g,b,y),!0}catch{return this.set(g,b,y),!0}return!1},replace:function(g,b,y){g=u(g);var w=null;try{w=p.deserialize(this.storage.getItem(g))}catch{return!1}if(l(w)){if(s(w))return this.set(g,b,y),!0;this.delete(g)}return!1},touch:function(g,b){g=u(g);var y=null;try{y=p.deserialize(this.storage.getItem(g))}catch{return!1}if(l(y)){if(s(y))return this.set(g,this.get(g),{exp:b}),!0;this.delete(g)}return!1}};return c.prototype=v,c}();let Gne,e9,rN;Gne=_l(Wne.exports),Nr={ROLE_ROUTERS:"roleRouters",USER:"user",IS_DARK:"isDark",LANG:"lang",THEME:"theme",LAYOUT:"layout",DICT_CACHE:"dictCache",LoginForm:"loginForm",TenantId:"tenantId"},ku=(e="localStorage")=>({wsCache:new Gne({storage:e})}),DO=()=>{const{wsCache:e}=ku();e.delete(Nr.USER),e.delete(Nr.ROLE_ROUTERS)},{wsCache:e9}=ku(),rN={"zh-CN":{name:"zh-cn",el:{breadcrumb:{label:"\u9762\u5305\u5C51"},colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!"},upload:{deleteTip:"\u6309 delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tour:{next:"\u4E0B\u4E00\u6B65",previous:"\u4E0A\u4E00\u6B65",finish:"\u7ED3\u675F\u5BFC\u89C8"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"},carousel:{leftArrow:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",rightArrow:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247",indicator:"\u5E7B\u706F\u7247\u5207\u6362\u81F3\u7D22\u5F15 {index}"}}},en:Une},Fw=ym("locales",{state:()=>({currentLocale:{lang:e9.get(Nr.LANG)||"zh-CN",elLocale:rN[e9.get(Nr.LANG)||"zh-CN"]},localeMap:[{lang:"zh-CN",name:"\u7B80\u4F53\u4E2D\u6587"},{lang:"en",name:"English"}]}),getters:{getCurrentLocale(){return this.currentLocale},getLocaleMap(){return this.localeMap}},actions:{setCurrentLocale(e){this.currentLocale.lang=e==null?void 0:e.lang,this.currentLocale.elLocale=rN[e==null?void 0:e.lang],e9.set(Nr.LANG,e==null?void 0:e.lang)}}}),DQ=()=>Fw(Nf),OQ=e=>{var t;(t=document.querySelector("html"))==null||t.setAttribute("lang",e)};let qne,oN,Kne,iN,aN,_b;qne=async e=>{const t=await(async()=>{const n=DQ(),r=n.getCurrentLocale,o=n.getLocaleMap,i=(await kQ(Object.assign({"../../locales/en.ts":()=>qe(()=>import("./en-Dc3Fg5U0.js"),__vite__mapDeps([])),"../../locales/zh-CN.ts":()=>qe(()=>import("./zh-CN-CV_XEAPe.js"),__vite__mapDeps([]))}),`../../locales/${r.lang}.ts`)).default??{};return OQ(r.lang),n.setCurrentLocale({lang:r.lang}),{legacy:!1,locale:r.lang,fallbackLocale:r.lang,messages:{[r.lang]:i},availableLocales:o.map(a=>a.lang),sync:!0,silentTranslationWarn:!0,missingWarn:!1,silentFallbackWarn:!0}})();Nw=NQ.createI18n(t),e.use(Nw)},oN=e=>Array.from(e.querySelectorAll('a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])')).filter(t=>Kne(t)&&(n=>getComputedStyle(n).position!=="fixed"&&n.offsetParent!==null)(t)),Kne=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},IOe=function(e,t,...n){let r;r=t.includes("mouse")||t.includes("click")?"MouseEvents":t.includes("key")?"KeyboardEvent":"HTMLEvents";const o=document.createEvent(r);return o.initEvent(t,...n),e.dispatchEvent(o),e},iN=e=>!e.getAttribute("aria-owns"),aN=(e,t,n)=>{const{parentNode:r}=e;if(!r)return null;const o=r.querySelectorAll(n);return o[Array.prototype.indexOf.call(o,e)+t]||null},_b=e=>{e&&(e.focus(),!iN(e)&&e.click())},bc=(e,t,{checkForDefaultPrevented:n=!0}={})=>r=>{const o=e==null?void 0:e(r);if(n===!1||!o)return t==null?void 0:t(r)},iOe=e=>t=>t.pointerType==="mouse"?e(t):void 0;var Yne,PNe=Object.defineProperty,jNe=Object.defineProperties,VNe=Object.getOwnPropertyDescriptors,Xne=Object.getOwnPropertySymbols,zNe=Object.prototype.hasOwnProperty,HNe=Object.prototype.propertyIsEnumerable,Qne=(e,t,n)=>t in e?PNe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Jne(e,t){const n=Qo();return yl(()=>{n.value=e()},((r,o)=>jNe(r,VNe(o)))(((r,o)=>{for(var i in o||(o={}))zNe.call(o,i)&&Qne(r,i,o[i]);if(Xne)for(var i of Xne(o))HNe.call(o,i)&&Qne(r,i,o[i]);return r})({},t),{flush:"sync"})),xd(n)}let Zne,K0,ere;rr=typeof window<"u",Zne=e=>typeof e=="string",K0=()=>{},ere=rr&&((Yne=window==null?void 0:window.navigator)==null?void 0:Yne.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Zf(e){return typeof e=="function"?e():M(e)}function tre(e,t){return function(...n){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(o)})}}function Eb(e){return!!Z3()&&(eb(e),!0)}function $Ne(e,t=200,n={}){return tre(function(r,o={}){let i,a,l=K0;const s=u=>{clearTimeout(u),l(),l=K0};return u=>{const c=Zf(r),d=Zf(o.maxWait);return i&&s(i),c<=0||d!==void 0&&d<=0?(a&&(s(a),a=null),Promise.resolve(u())):new Promise((f,p)=>{l=o.rejectOnCancel?p:f,d&&!a&&(a=setTimeout(()=>{i&&s(i),a=null,f(u())},d)),i=setTimeout(()=>{a&&s(a),a=null,f(u())},c)})}}(t,n),e)}zOe=function(e,t=200,n=!1,r=!0,o=!1){return tre(function(i,a=!0,l=!0,s=!1){let u,c,d=0,f=!0,p=K0;const m=()=>{u&&(clearTimeout(u),u=void 0,p(),p=K0)};return v=>{const g=Zf(i),b=Date.now()-d,y=()=>c=v();return m(),g<=0?(d=Date.now(),y()):(b>g&&(l||!f)?(d=Date.now(),y()):a&&(c=new Promise((w,x)=>{p=s?x:w,u=setTimeout(()=>{d=Date.now(),f=!0,w(y()),m()},Math.max(0,g-b))})),l||u||(u=setTimeout(()=>f=!0,g)),f=!1,c)}}(t,n,r,o),e)},I3=function(e,t,n={}){const{immediate:r=!0}=n,o=de(!1);let i=null;function a(){i&&(clearTimeout(i),i=null)}function l(){o.value=!1,a()}function s(...u){a(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,e(...u)},Zf(t))}return r&&(o.value=!0,rr&&s()),Eb(l),{isPending:xd(o),start:s,stop:l}};function Oc(e){var t;const n=Zf(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Wm=rr?window:void 0,UNe=rr?window.document:void 0;Yo=function(...e){let t,n,r,o;if(Zne(e[0])||Array.isArray(e[0])?([n,r,o]=e,t=Wm):[t,n,r,o]=e,!t)return K0;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],a=()=>{i.forEach(u=>u()),i.length=0},l=Je(()=>[Oc(t),Zf(o)],([u,c])=>{a(),u&&i.push(...n.flatMap(d=>r.map(f=>((p,m,v,g)=>(p.addEventListener(m,v,g),()=>p.removeEventListener(m,v,g)))(u,d,f,c))))},{immediate:!0,flush:"post"}),s=()=>{l(),a()};return Eb(s),s};let nre=!1;function lN(e,t,n={}){const{window:r=Wm,ignore:o=[],capture:i=!0,detectIframe:a=!1}=n;if(!r)return;ere&&!nre&&(nre=!0,Array.from(r.document.body.children).forEach(c=>c.addEventListener("click",K0)));let l=!0;const s=c=>o.some(d=>{if(typeof d=="string")return Array.from(r.document.querySelectorAll(d)).some(f=>f===c.target||c.composedPath().includes(f));{const f=Oc(d);return f&&(c.target===f||c.composedPath().includes(f))}}),u=[Yo(r,"click",c=>{const d=Oc(e);d&&d!==c.target&&!c.composedPath().includes(d)&&(c.detail===0&&(l=!s(c)),l?t(c):l=!0)},{passive:!0,capture:i}),Yo(r,"pointerdown",c=>{const d=Oc(e);d&&(l=!c.composedPath().includes(d)&&!s(c))},{passive:!0}),a&&Yo(r,"blur",c=>{var d;const f=Oc(e);((d=r.document.activeElement)==null?void 0:d.tagName)!=="IFRAME"||f!=null&&f.contains(r.document.activeElement)||t(c)})].filter(Boolean);return()=>u.forEach(c=>c())}function rre(e,t=!1){const n=de(),r=()=>n.value=!!e();return r(),function(o,i=!0){dn()?yn(o):i?o():St(o)}(r,t),n}const ore=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ire="__vueuse_ssr_handlers__";ore[ire]=ore[ire]||{};var are=Object.getOwnPropertySymbols,WNe=Object.prototype.hasOwnProperty,GNe=Object.prototype.propertyIsEnumerable,qNe=(e,t)=>{var n={};for(var r in e)WNe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&are)for(var r of are(e))t.indexOf(r)<0&&GNe.call(e,r)&&(n[r]=e[r]);return n};fa=function(e,t,n={}){const r=n,{window:o=Wm}=r,i=qNe(r,["window"]);let a;const l=rre(()=>o&&"ResizeObserver"in o),s=()=>{a&&(a.disconnect(),a=void 0)},u=Je(()=>Oc(e),d=>{s(),l.value&&o&&d&&(a=new ResizeObserver(t),a.observe(d,i))},{immediate:!0,flush:"post"}),c=()=>{s(),u()};return Eb(c),{isSupported:l,stop:c}};var lre,Cb,sre=Object.getOwnPropertySymbols,KNe=Object.prototype.hasOwnProperty,YNe=Object.prototype.propertyIsEnumerable;function XNe(e,t,n={}){const r=n,{window:o=Wm}=r,i=((d,f)=>{var p={};for(var m in d)KNe.call(d,m)&&f.indexOf(m)<0&&(p[m]=d[m]);if(d!=null&&sre)for(var m of sre(d))f.indexOf(m)<0&&YNe.call(d,m)&&(p[m]=d[m]);return p})(r,["window"]);let a;const l=rre(()=>o&&"MutationObserver"in o),s=()=>{a&&(a.disconnect(),a=void 0)},u=Je(()=>Oc(e),d=>{s(),l.value&&o&&d&&(a=new MutationObserver(t),a.observe(d,i))},{immediate:!0}),c=()=>{s(),u()};return Eb(c),{isSupported:l,stop:c}}(Cb=lre||(lre={})).UP="UP",Cb.RIGHT="RIGHT",Cb.DOWN="DOWN",Cb.LEFT="LEFT",Cb.NONE="NONE";var QNe=Object.defineProperty,ure=Object.getOwnPropertySymbols,JNe=Object.prototype.hasOwnProperty,ZNe=Object.prototype.propertyIsEnumerable,cre=(e,t,n)=>t in e?QNe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function eFe(e,t,n,r={}){var o,i,a;const{clone:l=!1,passive:s=!1,eventName:u,deep:c=!1,defaultValue:d}=r,f=dn(),p=(f==null?void 0:f.emit)||((o=f==null?void 0:f.$emit)==null?void 0:o.bind(f))||((a=(i=f==null?void 0:f.proxy)==null?void 0:i.$emit)==null?void 0:a.bind(f==null?void 0:f.proxy));let m=u;m=u||m||`update:${t.toString()}`;const v=b=>{return l?(w=>typeof w=="function")(l)?l(b):(y=b,JSON.parse(JSON.stringify(y))):b;var y},g=()=>e[t]!==void 0?v(e[t]):d;if(s){const b=de(g());return Je(()=>e[t],y=>b.value=v(y)),Je(b,y=>{(y!==e[t]||c)&&p(m,y)},{deep:c}),b}return ee({get:()=>g(),set(b){p(m,b)}})}((e,t)=>{for(var n in t||(t={}))JNe.call(t,n)&&cre(e,n,t[n]);if(ure)for(var n of ure(t))ZNe.call(t,n)&&cre(e,n,t[n])})({linear:function(e){return e}},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});let t9;FQ=()=>rr&&/firefox/i.test(window.navigator.userAgent),VOe=(e,t)=>{if(!rr||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return r=t instanceof Element?t.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right},t9=e=>{let t,n;return e.type==="touchend"?(n=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(n=e.touches[0].clientY,t=e.touches[0].clientX):(n=e.clientY,t=e.clientX),{clientX:t,clientY:n}};var dre=typeof global=="object"&&global&&global.Object===Object&&global,tFe=typeof self=="object"&&self&&self.Object===Object&&self,Mu=dre||tFe||Function("return this")(),Ks=Mu.Symbol,fre=Object.prototype,nFe=fre.hasOwnProperty,rFe=fre.toString,Sb=Ks?Ks.toStringTag:void 0,oFe=Object.prototype.toString,iFe="[object Null]",aFe="[object Undefined]",pre=Ks?Ks.toStringTag:void 0;function Y0(e){return e==null?e===void 0?aFe:iFe:pre&&pre in Object(e)?function(t){var n=nFe.call(t,Sb),r=t[Sb];try{t[Sb]=void 0;var o=!0}catch{}var i=rFe.call(t);return o&&(n?t[Sb]=r:delete t[Sb]),i}(e):function(t){return oFe.call(t)}(e)}function Tc(e){return e!=null&&typeof e=="object"}var lFe="[object Symbol]";function n9(e){return typeof e=="symbol"||Tc(e)&&Y0(e)==lFe}function sN(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var tl=Array.isArray,sFe=1/0,hre=Ks?Ks.prototype:void 0,vre=hre?hre.toString:void 0;function mre(e){if(typeof e=="string")return e;if(tl(e))return sN(e,mre)+"";if(n9(e))return vre?vre.call(e):"";var t=e+"";return t=="0"&&1/e==-sFe?"-0":t}var uFe=/\s/,cFe=/^\s+/;function dFe(e){return e&&e.slice(0,function(t){for(var n=t.length;n--&&uFe.test(t.charAt(n)););return n}(e)+1).replace(cFe,"")}function nl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gre=NaN,fFe=/^[-+]0x[0-9a-f]+$/i,pFe=/^0b[01]+$/i,hFe=/^0o[0-7]+$/i,vFe=parseInt;function yre(e){if(typeof e=="number")return e;if(n9(e))return gre;if(nl(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nl(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dFe(e);var n=pFe.test(e);return n||hFe.test(e)?vFe(e.slice(2),n?2:8):fFe.test(e)?gre:+e}function uN(e){return e}var mFe="[object AsyncFunction]",gFe="[object Function]",yFe="[object GeneratorFunction]",bFe="[object Proxy]";function cN(e){if(!nl(e))return!1;var t=Y0(e);return t==gFe||t==yFe||t==mFe||t==bFe}var dN=Mu["__core-js_shared__"],bre=function(){var e=/[^.]+$/.exec(dN&&dN.keys&&dN.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),AFe=Function.prototype.toString;function X0(e){if(e!=null){try{return AFe.call(e)}catch{}try{return e+""}catch{}}return""}var wFe=/^\[object .+?Constructor\]$/,xFe=Function.prototype,_Fe=Object.prototype,EFe=xFe.toString,CFe=_Fe.hasOwnProperty,SFe=RegExp("^"+EFe.call(CFe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kFe(e){return!(!nl(e)||(t=e,bre&&bre in t))&&(cN(e)?SFe:wFe).test(X0(e));var t}function Q0(e,t){var n=function(r,o){return r==null?void 0:r[o]}(e,t);return kFe(n)?n:void 0}var fN=Q0(Mu,"WeakMap"),Are=Object.create,DFe=function(){function e(){}return function(t){if(!nl(t))return{};if(Are)return Are(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wre(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var OFe=Date.now,r9=function(){try{var e=Q0(Object,"defineProperty");return e({},"",{}),e}catch{}}(),TFe=r9?function(e,t){return r9(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:uN,xre=function(e){var t=0,n=0;return function(){var r=OFe(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(TFe);function _re(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function MFe(e){return e!=e}function NFe(e,t){return!!(e!=null&&e.length)&&function(n,r,o){return r==r?function(i,a,l){for(var s=l-1,u=i.length;++s<u;)if(i[s]===a)return s;return-1}(n,r,o):_re(n,MFe,o)}(e,t,0)>-1}var FFe=9007199254740991,RFe=/^(?:0|[1-9]\d*)$/;function o9(e,t){var n=typeof e;return!!(t=t??FFe)&&(n=="number"||n!="symbol"&&RFe.test(e))&&e>-1&&e%1==0&&e<t}function pN(e,t,n){t=="__proto__"&&r9?r9(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function kb(e,t){return e===t||e!=e&&t!=t}var IFe=Object.prototype.hasOwnProperty;function hN(e,t,n){var r=e[t];IFe.call(e,t)&&kb(r,n)&&(n!==void 0||t in e)||pN(e,t,n)}function Gm(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],s=void 0;s===void 0&&(s=e[l]),o?pN(n,l,s):hN(n,l,s)}return n}var Ere=Math.max;function Cre(e,t,n){return t=Ere(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Ere(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),function(s,u,c){switch(c.length){case 0:return s.call(u);case 1:return s.call(u,c[0]);case 2:return s.call(u,c[0],c[1]);case 3:return s.call(u,c[0],c[1],c[2])}return s.apply(u,c)}(e,this,l)}}function Sre(e,t){return xre(Cre(e,t,uN),e+"")}var BFe=9007199254740991;function vN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=BFe}function qm(e){return e!=null&&vN(e.length)&&!cN(e)}var LFe=Object.prototype;function mN(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||LFe)}function kre(e){return Tc(e)&&Y0(e)=="[object Arguments]"}var Dre=Object.prototype,PFe=Dre.hasOwnProperty,jFe=Dre.propertyIsEnumerable,Db=kre(function(){return arguments}())?kre:function(e){return Tc(e)&&PFe.call(e,"callee")&&!jFe.call(e,"callee")},Ore=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tre=Ore&&typeof module=="object"&&module&&!module.nodeType&&module,Mre=Tre&&Tre.exports===Ore?Mu.Buffer:void 0,Ob=(Mre?Mre.isBuffer:void 0)||function(){return!1},mo={};function gN(e){return function(t){return e(t)}}mo["[object Float32Array]"]=mo["[object Float64Array]"]=mo["[object Int8Array]"]=mo["[object Int16Array]"]=mo["[object Int32Array]"]=mo["[object Uint8Array]"]=mo["[object Uint8ClampedArray]"]=mo["[object Uint16Array]"]=mo["[object Uint32Array]"]=!0,mo["[object Arguments]"]=mo["[object Array]"]=mo["[object ArrayBuffer]"]=mo["[object Boolean]"]=mo["[object DataView]"]=mo["[object Date]"]=mo["[object Error]"]=mo["[object Function]"]=mo["[object Map]"]=mo["[object Number]"]=mo["[object Object]"]=mo["[object RegExp]"]=mo["[object Set]"]=mo["[object String]"]=mo["[object WeakMap]"]=!1;var Nre=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tb=Nre&&typeof module=="object"&&module&&!module.nodeType&&module,yN=Tb&&Tb.exports===Nre&&dre.process,Km=function(){try{var e=Tb&&Tb.require&&Tb.require("util").types;return e||yN&&yN.binding&&yN.binding("util")}catch{}}(),Fre=Km&&Km.isTypedArray,bN=Fre?gN(Fre):function(e){return Tc(e)&&vN(e.length)&&!!mo[Y0(e)]},VFe=Object.prototype.hasOwnProperty;function Rre(e,t){var n=tl(e),r=!n&&Db(e),o=!n&&!r&&Ob(e),i=!n&&!r&&!o&&bN(e),a=n||r||o||i,l=a?function(c,d){for(var f=-1,p=Array(c);++f<c;)p[f]=d(f);return p}(e.length,String):[],s=l.length;for(var u in e)!t&&!VFe.call(e,u)||a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||o9(u,s))||l.push(u);return l}function Ire(e,t){return function(n){return e(t(n))}}var zFe=Ire(Object.keys,Object),HFe=Object.prototype.hasOwnProperty;function Mb(e){return qm(e)?Rre(e):function(t){if(!mN(t))return zFe(t);var n=[];for(var r in Object(t))HFe.call(t,r)&&r!="constructor"&&n.push(r);return n}(e)}var $Fe=Object.prototype.hasOwnProperty;function UFe(e){if(!nl(e))return function(o){var i=[];if(o!=null)for(var a in Object(o))i.push(a);return i}(e);var t=mN(e),n=[];for(var r in e)(r!="constructor"||!t&&$Fe.call(e,r))&&n.push(r);return n}function Nb(e){return qm(e)?Rre(e,!0):UFe(e)}var WFe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GFe=/^\w*$/;function AN(e,t){if(tl(e))return!1;var n=typeof e;return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!n9(e))||GFe.test(e)||!WFe.test(e)||t!=null&&e in Object(t)}var Fb=Q0(Object,"create"),qFe=Object.prototype.hasOwnProperty,KFe=Object.prototype.hasOwnProperty;function J0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function i9(e,t){for(var n=e.length;n--;)if(kb(e[n][0],t))return n;return-1}J0.prototype.clear=function(){this.__data__=Fb?Fb(null):{},this.size=0},J0.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},J0.prototype.get=function(e){var t=this.__data__;if(Fb){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return qFe.call(t,e)?t[e]:void 0},J0.prototype.has=function(e){var t=this.__data__;return Fb?t[e]!==void 0:KFe.call(t,e)},J0.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Fb&&t===void 0?"__lodash_hash_undefined__":t,this};var YFe=Array.prototype.splice;function Bd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bd.prototype.clear=function(){this.__data__=[],this.size=0},Bd.prototype.delete=function(e){var t=this.__data__,n=i9(t,e);return!(n<0)&&(n==t.length-1?t.pop():YFe.call(t,n,1),--this.size,!0)},Bd.prototype.get=function(e){var t=this.__data__,n=i9(t,e);return n<0?void 0:t[n][1]},Bd.prototype.has=function(e){return i9(this.__data__,e)>-1},Bd.prototype.set=function(e,t){var n=this.__data__,r=i9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Rb=Q0(Mu,"Map");function a9(e,t){var n=e.__data__;return function(r){var o=typeof r;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?r!=="__proto__":r===null}(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ld(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ld.prototype.clear=function(){this.size=0,this.__data__={hash:new J0,map:new(Rb||Bd),string:new J0}},Ld.prototype.delete=function(e){var t=a9(this,e).delete(e);return this.size-=t?1:0,t},Ld.prototype.get=function(e){return a9(this,e).get(e)},Ld.prototype.has=function(e){return a9(this,e).has(e)},Ld.prototype.set=function(e,t){var n=a9(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var XFe="Expected a function";Lw=function(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XFe);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Lw.Cache||Ld),n},Lw.Cache=Ld;var QFe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JFe=/\\(\\)?/g,ZFe=function(e){var t=Lw(e,function(r){return n.size===500&&n.clear(),r}),n=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(QFe,function(n,r,o,i){t.push(o?i.replace(JFe,"$1"):r||n)}),t});function Ym(e,t){return tl(e)?e:AN(e,t)?[e]:ZFe(function(n){return n==null?"":mre(n)}(e))}var eRe=1/0;function Xm(e){if(typeof e=="string"||n9(e))return e;var t=e+"";return t=="0"&&1/e==-eRe?"-0":t}function l9(e,t){for(var n=0,r=(t=Ym(t,e)).length;e!=null&&n<r;)e=e[Xm(t[n++])];return n&&n==r?e:void 0}es=function(e,t,n){var r=e==null?void 0:l9(e,t);return r===void 0?n:r};function wN(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Bre=Ks?Ks.isConcatSpreadable:void 0;function tRe(e){return tl(e)||Db(e)||!!(Bre&&e&&e[Bre])}function Ib(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=tRe),o||(o=[]);++i<a;){var l=e[i];t>0&&n(l)?t>1?Ib(l,t-1,n,r,o):wN(o,l):r||(o[o.length]=l)}return o}function Lre(e){return e!=null&&e.length?Ib(e,1):[]}function Pre(e){return xre(Cre(e,void 0,Lre),e+"")}var xN=Ire(Object.getPrototypeOf,Object),nRe="[object Object]",rRe=Function.prototype,oRe=Object.prototype,jre=rRe.toString,iRe=oRe.hasOwnProperty,aRe=jre.call(Object);function Vre(e){if(!Tc(e)||Y0(e)!=nRe)return!1;var t=xN(e);if(t===null)return!0;var n=iRe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&jre.call(n)==aRe}Iw=function(){if(!arguments.length)return[];var e=arguments[0];return tl(e)?e:[e]};function Nu(e){var t=this.__data__=new Bd(e);this.size=t.size}Nu.prototype.clear=function(){this.__data__=new Bd,this.size=0},Nu.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Nu.prototype.get=function(e){return this.__data__.get(e)},Nu.prototype.has=function(e){return this.__data__.has(e)},Nu.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Bd){var r=n.__data__;if(!Rb||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ld(r)}return n.set(e,t),this.size=n.size,this};var zre=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hre=zre&&typeof module=="object"&&module&&!module.nodeType&&module,$re=Hre&&Hre.exports===zre?Mu.Buffer:void 0,Ure=$re?$re.allocUnsafe:void 0;function Wre(e,t){if(t)return e.slice();var n=e.length,r=Ure?Ure(n):new e.constructor(n);return e.copy(r),r}function Gre(){return[]}var lRe=Object.prototype.propertyIsEnumerable,qre=Object.getOwnPropertySymbols,_N=qre?function(e){return e==null?[]:(e=Object(e),function(t,n){for(var r=-1,o=t==null?0:t.length,i=0,a=[];++r<o;){var l=t[r];n(l,r,t)&&(a[i++]=l)}return a}(qre(e),function(t){return lRe.call(e,t)}))}:Gre,Kre=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)wN(t,_N(e)),e=xN(e);return t}:Gre;function Yre(e,t,n){var r=t(e);return tl(e)?r:wN(r,n(e))}function EN(e){return Yre(e,Mb,_N)}function Xre(e){return Yre(e,Nb,Kre)}var CN=Q0(Mu,"DataView"),SN=Q0(Mu,"Promise"),Qm=Q0(Mu,"Set"),Qre="[object Map]",Jre="[object Promise]",Zre="[object Set]",eoe="[object WeakMap]",toe="[object DataView]",sRe=X0(CN),uRe=X0(Rb),cRe=X0(SN),dRe=X0(Qm),fRe=X0(fN),Fu=Y0;(CN&&Fu(new CN(new ArrayBuffer(1)))!=toe||Rb&&Fu(new Rb)!=Qre||SN&&Fu(SN.resolve())!=Jre||Qm&&Fu(new Qm)!=Zre||fN&&Fu(new fN)!=eoe)&&(Fu=function(e){var t=Y0(e),n=t=="[object Object]"?e.constructor:void 0,r=n?X0(n):"";if(r)switch(r){case sRe:return toe;case uRe:return Qre;case cRe:return Jre;case dRe:return Zre;case fRe:return eoe}return t});var pRe=Object.prototype.hasOwnProperty,s9=Mu.Uint8Array;function kN(e){var t=new e.constructor(e.byteLength);return new s9(t).set(new s9(e)),t}var hRe=/\w*$/,noe=Ks?Ks.prototype:void 0,roe=noe?noe.valueOf:void 0;function ooe(e,t){var n=t?kN(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var vRe="[object Boolean]",mRe="[object Date]",gRe="[object Map]",yRe="[object Number]",bRe="[object RegExp]",ARe="[object Set]",wRe="[object String]",xRe="[object Symbol]",_Re="[object ArrayBuffer]",ERe="[object DataView]",CRe="[object Float32Array]",SRe="[object Float64Array]",kRe="[object Int8Array]",DRe="[object Int16Array]",ORe="[object Int32Array]",TRe="[object Uint8Array]",MRe="[object Uint8ClampedArray]",NRe="[object Uint16Array]",FRe="[object Uint32Array]";function RRe(e,t,n){var r,o,i,a=e.constructor;switch(t){case _Re:return kN(e);case vRe:case mRe:return new a(+e);case ERe:return function(l,s){var u=s?kN(l.buffer):l.buffer;return new l.constructor(u,l.byteOffset,l.byteLength)}(e,n);case CRe:case SRe:case kRe:case DRe:case ORe:case TRe:case MRe:case NRe:case FRe:return ooe(e,n);case gRe:return new a;case yRe:case wRe:return new a(e);case bRe:return(i=new(o=e).constructor(o.source,hRe.exec(o))).lastIndex=o.lastIndex,i;case ARe:return new a;case xRe:return r=e,roe?Object(roe.call(r)):{}}}function ioe(e){return typeof e.constructor!="function"||mN(e)?{}:DFe(xN(e))}var aoe=Km&&Km.isMap,IRe=aoe?gN(aoe):function(e){return Tc(e)&&Fu(e)=="[object Map]"},loe=Km&&Km.isSet,BRe=loe?gN(loe):function(e){return Tc(e)&&Fu(e)=="[object Set]"},LRe=1,PRe=2,jRe=4,soe="[object Arguments]",uoe="[object Function]",VRe="[object GeneratorFunction]",coe="[object Object]",lo={};function Jm(e,t,n,r,o,i){var a,l=t&LRe,s=t&PRe,u=t&jRe;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!nl(e))return e;var c=tl(e);if(c){if(a=function(v){var g=v.length,b=new v.constructor(g);return g&&typeof v[0]=="string"&&pRe.call(v,"index")&&(b.index=v.index,b.input=v.input),b}(e),!l)return wre(e,a)}else{var d=Fu(e),f=d==uoe||d==VRe;if(Ob(e))return Wre(e,l);if(d==coe||d==soe||f&&!o){if(a=s||f?{}:ioe(e),!l)return s?function(v,g){return Gm(v,Kre(v),g)}(e,function(v,g){return v&&Gm(g,Nb(g),v)}(a,e)):function(v,g){return Gm(v,_N(v),g)}(e,function(v,g){return v&&Gm(g,Mb(g),v)}(a,e))}else{if(!lo[d])return o?e:{};a=RRe(e,d,l)}}i||(i=new Nu);var p=i.get(e);if(p)return p;i.set(e,a),BRe(e)?e.forEach(function(v){a.add(Jm(v,t,n,v,e,i))}):IRe(e)&&e.forEach(function(v,g){a.set(g,Jm(v,t,n,g,e,i))});var m=c?void 0:(u?s?Xre:EN:s?Nb:Mb)(e);return function(v,g){for(var b=-1,y=v==null?0:v.length;++b<y&&g(v[b],b,v)!==!1;);}(m||e,function(v,g){m&&(v=e[g=v]),hN(a,g,Jm(v,t,n,g,e,i))}),a}lo[soe]=lo["[object Array]"]=lo["[object ArrayBuffer]"]=lo["[object DataView]"]=lo["[object Boolean]"]=lo["[object Date]"]=lo["[object Float32Array]"]=lo["[object Float64Array]"]=lo["[object Int8Array]"]=lo["[object Int16Array]"]=lo["[object Int32Array]"]=lo["[object Map]"]=lo["[object Number]"]=lo[coe]=lo["[object RegExp]"]=lo["[object Set]"]=lo["[object String]"]=lo["[object Symbol]"]=lo["[object Uint8Array]"]=lo["[object Uint8ClampedArray]"]=lo["[object Uint16Array]"]=lo["[object Uint32Array]"]=!0,lo["[object Error]"]=lo[uoe]=lo["[object WeakMap]"]=!1;function doe(e){return Jm(e,4)}Mf=function(e){return Jm(e,5)};function Bb(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ld;++t<n;)this.add(e[t])}function zRe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function foe(e,t){return e.has(t)}Bb.prototype.add=Bb.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Bb.prototype.has=function(e){return this.__data__.has(e)};var HRe=1,$Re=2;function poe(e,t,n,r,o,i){var a=n&HRe,l=e.length,s=t.length;if(l!=s&&!(a&&s>l))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&$Re?new Bb:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var m=e[d],v=t[d];if(r)var g=a?r(v,m,d,t,e,i):r(m,v,d,e,t,i);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!zRe(t,function(b,y){if(!foe(p,y)&&(m===b||o(m,b,n,r,i)))return p.push(y)})){f=!1;break}}else if(m!==v&&!o(m,v,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function URe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function DN(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var WRe=1,GRe=2,qRe="[object Boolean]",KRe="[object Date]",YRe="[object Error]",XRe="[object Map]",QRe="[object Number]",JRe="[object RegExp]",ZRe="[object Set]",eIe="[object String]",tIe="[object Symbol]",nIe="[object ArrayBuffer]",rIe="[object DataView]",hoe=Ks?Ks.prototype:void 0,ON=hoe?hoe.valueOf:void 0,oIe=1,iIe=Object.prototype.hasOwnProperty,aIe=1,voe="[object Arguments]",moe="[object Array]",u9="[object Object]",goe=Object.prototype.hasOwnProperty;function lIe(e,t,n,r,o,i){var a=tl(e),l=tl(t),s=a?moe:Fu(e),u=l?moe:Fu(t),c=(s=s==voe?u9:s)==u9,d=(u=u==voe?u9:u)==u9,f=s==u;if(f&&Ob(e)){if(!Ob(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new Nu),a||bN(e)?poe(e,t,n,r,o,i):function(b,y,w,x,_,E,C){switch(w){case rIe:if(b.byteLength!=y.byteLength||b.byteOffset!=y.byteOffset)return!1;b=b.buffer,y=y.buffer;case nIe:return!(b.byteLength!=y.byteLength||!E(new s9(b),new s9(y)));case qRe:case KRe:case QRe:return kb(+b,+y);case YRe:return b.name==y.name&&b.message==y.message;case JRe:case eIe:return b==y+"";case XRe:var T=URe;case ZRe:var k=x&WRe;if(T||(T=DN),b.size!=y.size&&!k)return!1;var I=C.get(b);if(I)return I==y;x|=GRe,C.set(b,y);var O=poe(T(b),T(y),x,_,E,C);return C.delete(b),O;case tIe:if(ON)return ON.call(b)==ON.call(y)}return!1}(e,t,s,n,r,o,i);if(!(n&aIe)){var p=c&&goe.call(e,"__wrapped__"),m=d&&goe.call(t,"__wrapped__");if(p||m){var v=p?e.value():e,g=m?t.value():t;return i||(i=new Nu),o(v,g,n,r,i)}}return!!f&&(i||(i=new Nu),function(b,y,w,x,_,E){var C=w&oIe,T=EN(b),k=T.length;if(k!=EN(y).length&&!C)return!1;for(var I=k;I--;){var O=T[I];if(!(C?O in y:iIe.call(y,O)))return!1}var F=E.get(b),N=E.get(y);if(F&&N)return F==y&&N==b;var B=!0;E.set(b,y),E.set(y,b);for(var L=C;++I<k;){var V=b[O=T[I]],P=y[O];if(x)var H=C?x(P,V,O,y,b,E):x(V,P,O,b,y,E);if(!(H===void 0?V===P||_(V,P,w,x,E):H)){B=!1;break}L||(L=O=="constructor")}if(B&&!L){var U=b.constructor,G=y.constructor;U==G||!("constructor"in b)||!("constructor"in y)||typeof U=="function"&&U instanceof U&&typeof G=="function"&&G instanceof G||(B=!1)}return E.delete(b),E.delete(y),B}(e,t,n,r,o,i))}function c9(e,t,n,r,o){return e===t||(e==null||t==null||!Tc(e)&&!Tc(t)?e!=e&&t!=t:lIe(e,t,n,r,c9,o))}var sIe=1,uIe=2;function yoe(e){return e==e&&!nl(e)}function boe(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function cIe(e){var t=function(n){for(var r=Mb(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,yoe(a)]}return r}(e);return t.length==1&&t[0][2]?boe(t[0][0],t[0][1]):function(n){return n===e||function(r,o,i,a){var l=i.length,s=l;if(r==null)return!s;for(r=Object(r);l--;){var u=i[l];if(u[2]?u[1]!==r[u[0]]:!(u[0]in r))return!1}for(;++l<s;){var c=(u=i[l])[0],d=r[c],f=u[1];if(u[2]){if(d===void 0&&!(c in r))return!1}else{var p=new Nu;if(!c9(f,d,sIe|uIe,a,p))return!1}}return!0}(n,0,t)}}function dIe(e,t){return e!=null&&t in Object(e)}function Aoe(e,t){return e!=null&&function(n,r,o){for(var i=-1,a=(r=Ym(r,n)).length,l=!1;++i<a;){var s=Xm(r[i]);if(!(l=n!=null&&o(n,s)))break;n=n[s]}return l||++i!=a?l:!!(a=n==null?0:n.length)&&vN(a)&&o9(s,a)&&(tl(n)||Db(n))}(e,t,dIe)}var fIe=1,pIe=2;function hIe(e){return AN(e)?(t=Xm(e),function(n){return n==null?void 0:n[t]}):function(n){return function(r){return l9(r,n)}}(e);var t}function woe(e){return typeof e=="function"?e:e==null?uN:typeof e=="object"?tl(e)?(t=e[0],n=e[1],AN(t)&&yoe(n)?boe(Xm(t),n):function(r){var o=es(r,t);return o===void 0&&o===n?Aoe(r,t):c9(n,o,fIe|pIe)}):cIe(e):hIe(e);var t,n}var xoe=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var l=i[++r];if(t(o[l],l,o)===!1)break}return e},_oe,vIe=(_oe=function(e,t){return e&&xoe(e,t,Mb)},function(e,t){if(e==null)return e;if(!qm(e))return _oe(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&t(o[r],r,o)!==!1;);return e}),TN=function(){return Mu.Date.now()},mIe="Expected a function",gIe=Math.max,yIe=Math.min;ts=function(e,t,n){var r,o,i,a,l,s,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(mIe);function p(y){var w=r,x=o;return r=o=void 0,u=y,a=e.apply(x,w)}function m(y){var w=y-s;return s===void 0||w>=t||w<0||d&&y-u>=i}function v(){var y=TN();if(m(y))return g(y);l=setTimeout(v,function(w){var x=t-(w-s);return d?yIe(x,i-(w-u)):x}(y))}function g(y){return l=void 0,f&&r?p(y):(r=o=void 0,a)}function b(){var y=TN(),w=m(y);if(r=arguments,o=this,s=y,w){if(l===void 0)return function(x){return u=x,l=setTimeout(v,t),c?p(x):a}(s);if(d)return clearTimeout(l),l=setTimeout(v,t),p(s)}return l===void 0&&(l=setTimeout(v,t)),a}return t=yre(t)||0,nl(n)&&(c=!!n.leading,i=(d="maxWait"in n)?gIe(yre(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),b.cancel=function(){l!==void 0&&clearTimeout(l),u=0,r=s=o=l=void 0},b.flush=function(){return l===void 0?a:g(TN())},b};function MN(e,t,n){(n!==void 0&&!kb(e[t],n)||n===void 0&&!(t in e))&&pN(e,t,n)}function Eoe(e){return Tc(e)&&qm(e)}function NN(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]}function bIe(e,t,n,r,o,i,a){var l=NN(e,n),s=NN(t,n),u=a.get(s);if(u)MN(e,n,u);else{var c,d=i?i(l,s,n+"",e,t,a):void 0,f=d===void 0;if(f){var p=tl(s),m=!p&&Ob(s),v=!p&&!m&&bN(s);d=s,p||m||v?tl(l)?d=l:Eoe(l)?d=wre(l):m?(f=!1,d=Wre(s,!0)):v?(f=!1,d=ooe(s,!0)):d=[]:Vre(s)||Db(s)?(d=l,Db(l)?d=Gm(c=l,Nb(c)):nl(l)&&!cN(l)||(d=ioe(s))):f=!1}f&&(a.set(s,d),o(d,s,r,i,a),a.delete(s)),MN(e,n,d)}}function Coe(e,t,n,r,o){e!==t&&xoe(t,function(i,a){if(o||(o=new Nu),nl(i))bIe(e,t,a,n,Coe,r,o);else{var l=r?r(NN(e,a),i,a+"",e,t,o):void 0;l===void 0&&(l=i),MN(e,a,l)}},Nb)}WQ=function(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=r-1;return _re(e,woe(t),o,!0)};function AIe(e,t){var n=-1,r=qm(e)?Array(e.length):[];return vIe(e,function(o,i,a){r[++n]=t(o,i,a)}),r}function wIe(e,t){return Ib(function(n,r){return(tl(n)?sN:AIe)(n,woe(r))}(e,t),1)}var xIe=1/0;function d9(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}function _Ie(e,t){return t.length<2?e:l9(e,function(n,r,o){var i=-1,a=n.length;r<0&&(r=-r>a?0:a+r),(o=o>a?a:o)<0&&(o+=a),a=r>o?0:o-r>>>0,r>>>=0;for(var l=Array(a);++i<a;)l[i]=n[i+r];return l}(t,0,-1))}ns=function(e,t){return c9(e,t)},pa=function(e){return e==null};function Soe(e){return e===void 0}let FN;XQ=(FN=function(e,t,n){Coe(e,t,n)},Sre(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=FN.length>3&&typeof o=="function"?(r--,o):void 0,i&&function(l,s,u){if(!nl(u))return!1;var c=typeof s;return!!(c=="number"?qm(u)&&o9(s,u.length):c=="string"&&s in u)&&kb(u[s],l)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&FN(e,a,n,o)}return e}));function EIe(e,t){return(e=_Ie(e,t=Ym(t,e)))==null||delete e[Xm((n=t,r=n==null?0:n.length,r?n[r-1]:void 0))];var n,r}function CIe(e){return Vre(e)?void 0:e}var SIe=Pre(function(e,t){var n={};if(e==null)return n;var r=!1;t=sN(t,function(i){return i=Ym(i,e),r||(r=i.length>1),i}),Gm(e,Xre(e),n),r&&(n=Jm(n,7,CIe));for(var o=t.length;o--;)EIe(n,t[o]);return n});function koe(e,t,n,r){if(!nl(e))return e;for(var o=-1,i=(t=Ym(t,e)).length,a=i-1,l=e;l!=null&&++o<i;){var s=Xm(t[o]),u=n;if(s==="__proto__"||s==="constructor"||s==="prototype")return e;if(o!=a){var c=l[s];(u=void 0)==void 0&&(u=nl(c)?c:o9(t[o+1])?[]:{})}hN(l,s,u),l=l[s]}return e}function kIe(e,t){return function(n,r,o){for(var i=-1,a=r.length,l={};++i<a;){var s=r[i],u=l9(n,s);o(u,s)&&koe(l,Ym(s,n),u)}return l}(e,t,function(n,r){return Aoe(e,r)})}HQ=Pre(function(e,t){return e==null?{}:kIe(e,t)}),VQ=function(e,t,n){return e==null?e:koe(e,t,n)};function RN(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError("Expected a function");return nl(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ts(e,t,{leading:r,maxWait:t,trailing:o})}var DIe=Qm&&1/DN(new Qm([,-0]))[1]==1/0?function(e){return new Qm(e)}:function(){},IN=Sre(function(e){return function(t,n,r){var o=-1,i=NFe,a=t.length,l=!0,s=[],u=s;if(a>=200){var c=DIe(t);if(c)return DN(c);l=!1,i=foe,u=new Bb}else u=s;e:for(;++o<a;){var d=t[o],f=d;if(d=d!==0?d:0,l&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;s.push(d)}else i(u,f,r)||(u!==s&&u.push(f),s.push(d))}return s}(Ib(e,1,Eoe,!0))});let Ki,cs,Z0,Ru,Lb,Pb;Wi=e=>e===void 0,Ki=e=>typeof e=="boolean",Kn=e=>typeof e=="number",cs=e=>!e&&e!==0||mt(e)&&e.length===0||wn(e)&&!Object.keys(e).length,$s=e=>typeof Element<"u"&&e instanceof Element,Z0=e=>pa(e),RQ=e=>rr?window.requestAnimationFrame(e):setTimeout(e,16),mOe=e=>rr?window.cancelAnimationFrame(e):clearTimeout(e),GQ=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Ru=e=>M0(e),Lb=e=>Object.keys(e),Pb=(e,t,n)=>({get value(){return es(e,t,n)},set value(r){VQ(e,t,r)}});class OIe extends Error{constructor(t){super(t),this.name="ElementPlusError"}}Ka=function(e,t){throw new OIe(`[${e}] ${t}`)},AOe=function(e,t){};let BN,Pd;BN=(e="")=>e.split(" ").filter(t=>!!t.trim()),Hs=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Ed=(e,t)=>{e&&t.trim()&&e.classList.add(...BN(t))},xl=(e,t)=>{e&&t.trim()&&e.classList.remove(...BN(t))},Pd=(e,t)=>{var n;if(!rr||!e||!t)return"";let r=qi(t);r==="float"&&(r="cssFloat");try{const o=e.style[r];if(o)return o;const i=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return i?i[r]:""}catch{return e.style[r]}},ka=function(e,t="px"){return e?Kn(e)||an(n=e)&&!Number.isNaN(Number(n))?`${e}${t}`:an(e)?e:void 0:"";var n};let Doe;Doe=(e,t)=>{if(!rr)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],r=Pd(e,n);return["scroll","auto","overlay"].some(o=>r.includes(o))},jOe=(e,t)=>{if(!rr)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Doe(n,t))return n;n=n.parentNode}return n};let f9;YQ=e=>{var t;if(!rr)return 0;if(f9!==void 0)return f9;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const r=n.offsetWidth;n.style.overflow="scroll";const o=document.createElement("div");o.style.width="100%",n.appendChild(o);const i=o.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),f9=r-i,f9};function Ooe(e,t){if(!rr)return;if(!t)return void(e.scrollTop=0);const n=[];let r=t.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)n.push(r),r=r.offsetParent;const o=t.offsetTop+n.reduce((s,u)=>s+u.offsetTop,0),i=o+t.offsetHeight,a=e.scrollTop,l=a+e.clientHeight;o<a?e.scrollTop=o:i>l&&(e.scrollTop=i-e.clientHeight)}let p9,Toe,Moe,jb,h9,LN,Noe,Foe,Roe,Ioe,PN,jd,Boe,jN,Loe,Poe,joe,Voe,zoe,Vb,Hoe,VN,$oe,v9,zN,Uoe;p0=Te({name:"ArrowDown",__name:"arrow-down",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}),m0=Te({name:"ArrowLeft",__name:"arrow-left",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}),Su=Te({name:"ArrowRight",__name:"arrow-right",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}),p9=Te({name:"ArrowUp",__name:"arrow-up",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}),Toe=Te({name:"Calendar",__name:"calendar",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}),Moe=Te({name:"CaretRight",__name:"caret-right",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}),ROe=Te({name:"CaretTop",__name:"caret-top",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}),jb=Te({name:"Check",__name:"check",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}),h9=Te({name:"CircleCheck",__name:"circle-check",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ce("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}),LN=Te({name:"CircleCloseFilled",__name:"circle-close-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}),h0=Te({name:"CircleClose",__name:"circle-close",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),ce("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}),qQ=Te({name:"Clock",__name:"clock",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ce("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),ce("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}),wc=Te({name:"Close",__name:"close",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}),wm=Te({name:"DArrowLeft",__name:"d-arrow-left",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}),xm=Te({name:"DArrowRight",__name:"d-arrow-right",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}),Noe=Te({name:"Delete",__name:"delete",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}),Foe=Te({name:"Document",__name:"document",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}),Roe=Te({name:"FullScreen",__name:"full-screen",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}),Ioe=Te({name:"Hide",__name:"hide",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),ce("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}),PN=Te({name:"InfoFilled",__name:"info-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}),jd=Te({name:"Loading",__name:"loading",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}),Boe=Te({name:"Minus",__name:"minus",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}),wOe=Te({name:"MoreFilled",__name:"more-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}),BOe=Te({name:"More",__name:"more",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}),UOe=Te({name:"PictureFilled",__name:"picture-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}),jN=Te({name:"Plus",__name:"plus",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}),Loe=Te({name:"QuestionFilled",__name:"question-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}),Poe=Te({name:"RefreshLeft",__name:"refresh-left",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}),joe=Te({name:"RefreshRight",__name:"refresh-right",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}),Voe=Te({name:"ScaleToOriginal",__name:"scale-to-original",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}),zoe=Te({name:"Search",__name:"search",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}),MOe=Te({name:"SortDown",__name:"sort-down",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}),TOe=Te({name:"SortUp",__name:"sort-up",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}),Vb=Te({name:"StarFilled",__name:"star-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}),Hoe=Te({name:"Star",__name:"star",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}),VN=Te({name:"SuccessFilled",__name:"success-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}),$oe=Te({name:"View",__name:"view",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}),v9=Te({name:"WarningFilled",__name:"warning-filled",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}),zN=Te({name:"ZoomIn",__name:"zoom-in",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}),Uoe=Te({name:"ZoomOut",__name:"zoom-out",setup:e=>(t,n)=>(Y(),fe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ce("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))});let HN,$N,m9,Vd,UN,Tl,WN;HN="__epPropKey",BDe=e=>e,M3=(e,t)=>{if(!wn(e)||wn(n=e)&&n[HN])return e;var n;const{values:r,required:o,default:i,type:a,validator:l}=e,s=r||l?c=>{let d=!1,f=[];if(r&&(f=Array.from(r),Tn(e,"default")&&f.push(i),d||(d=f.includes(c))),l&&(d||(d=l(c))),!d&&f.length>0){const p=[...new Set(f)].map(m=>JSON.stringify(m)).join(", ");MM(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${p}], got value ${JSON.stringify(c)}.`)}return d}:void 0,u={type:a,required:!!o,validator:s,[HN]:!0};return Tn(e,"default")&&(u.default=i),u},Lt=e=>d9(Object.entries(e).map(([t,n])=>[t,M3(n,t)])),fi=[String,Object,Function],$N={Close:wc},m9={Close:wc,SuccessFilled:VN,InfoFilled:PN,WarningFilled:v9,CircleCloseFilled:LN},Vd={success:VN,warning:v9,error:LN,info:PN},zO={validating:jd,success:h9,error:h0},Cr=(e,t)=>{if(e.install=n=>{for(const r of[e,...Object.values(t??{})])n.component(r.name,r)},t)for(const[n,r]of Object.entries(t))e[n]=r;return e},UN=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),Ya=e=>(e.install=fr,e),xQ=(...e)=>t=>{e.forEach(n=>{Ut(n)?n(t):n.value=t})},Xt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},xn="update:modelValue",Xo="change",Tl="input",bm=["","default","small","large"],WN=e=>["",...bm].includes(e),O3=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(O3||{}),CQ=function(e){return oo(e)&&e.type===bt},dOe=function(e){return oo(e)&&!CQ(e)&&!function(t){return oo(t)&&t.type===hi}(e)};let GN,Ml,g9,Woe,Goe,qN,qoe,Koe,KN,Zm,ep,YN,y9,XN,Yoe,Xoe,QN;xOe=e=>{if(!oo(e))return{};const t=e.props||{},n=(oo(e.type)?e.type.props:void 0)||{},r={};return Object.keys(n).forEach(o=>{Tn(n[o],"default")&&(r[o]=n[o].default)}),Object.keys(t).forEach(o=>{r[qi(o)]=t[o]}),r},R3=e=>{const t=mt(e)?e:[e],n=[];return t.forEach(r=>{var o;mt(r)?n.push(...R3(r)):oo(r)&&mt(r.children)?n.push(...R3(r.children)):(n.push(r),oo(r)&&((o=r.component)!=null&&o.subTree)&&n.push(...R3(r.component.subTree)))}),n},GN=e=>[...new Set(e)],Ml=e=>e||e===0?Array.isArray(e)?e:[e]:[],g9=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),bOe=e=>e,Woe=["class","style"],Goe=/^on[A-Z]/,GO=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,r=ee(()=>((n==null?void 0:n.value)||[]).concat(Woe)),o=dn();return ee(o?()=>{var i;return d9(Object.entries((i=o.proxy)==null?void 0:i.$attrs).filter(([a])=>!(r.value.includes(a)||t&&Goe.test(a))))}:()=>({}))},y0=({from:e,replacement:t,scope:n,version:r,ref:o,type:i="API"},a)=>{Je(()=>M(a),l=>{},{immediate:!0})},qN=(e,t,n,r)=>{let o={offsetX:0,offsetY:0};const i=l=>{const s=l.clientX,u=l.clientY,{offsetX:c,offsetY:d}=o,f=e.value.getBoundingClientRect(),p=f.left,m=f.top,v=f.width,g=f.height,b=document.documentElement.clientWidth,y=document.documentElement.clientHeight,w=-p+c,x=-m+d,_=b-p-v+c,E=y-m-g+d,C=k=>{let I=c+k.clientX-s,O=d+k.clientY-u;r!=null&&r.value||(I=Math.min(Math.max(I,w),_),O=Math.min(Math.max(O,x),E)),o={offsetX:I,offsetY:O},e.value&&(e.value.style.transform=`translate(${ka(I)}, ${ka(O)})`)},T=()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",T)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",T)},a=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",i)};yn(()=>{yl(()=>{n.value?t.value&&e.value&&t.value.addEventListener("mousedown",i):a()})}),xo(()=>{a()})},qoe=e=>(t,n)=>Koe(t,n,M(e)),Koe=(e,t,n)=>es(n,e,e).replace(/\{(\w+)\}/g,(r,o)=>{var i;return`${(i=t==null?void 0:t[o])!=null?i:`{${o}}`}`}),KN=Symbol("localeContextKey"),Gr=e=>{const t=e||Rt(KN,de());return(n=>({lang:ee(()=>M(n).name),locale:Jn(n)?n:de(n),t:qoe(n)}))(ee(()=>t.value||Une))},Zm="el",ep=(e,t,n,r,o)=>{let i=`${e}-${t}`;return n&&(i+=`-${n}`),r&&(i+=`__${r}`),o&&(i+=`--${o}`),i},YN=Symbol("namespaceContextKey"),y9=e=>{const t=e||(dn()?Rt(YN,de(Zm)):de(Zm));return ee(()=>M(t)||Zm)},_t=(e,t)=>{const n=y9(t);return{namespace:n,b:(r="")=>ep(n.value,e,r,"",""),e:r=>r?ep(n.value,e,"",r,""):"",m:r=>r?ep(n.value,e,"","",r):"",be:(r,o)=>r&&o?ep(n.value,e,r,o,""):"",em:(r,o)=>r&&o?ep(n.value,e,"",r,o):"",bm:(r,o)=>r&&o?ep(n.value,e,r,"",o):"",bem:(r,o,i)=>r&&o&&i?ep(n.value,e,r,o,i):"",is:(r,...o)=>{const i=!(o.length>=1)||o[0];return r&&i?`is-${r}`:""},cssVar:r=>{const o={};for(const i in r)r[i]&&(o[`--${n.value}-${i}`]=r[i]);return o},cssVarName:r=>`--${n.value}-${r}`,cssVarBlock:r=>{const o={};for(const i in r)r[i]&&(o[`--${n.value}-${e}-${i}`]=r[i]);return o},cssVarBlockName:r=>`--${n.value}-${e}-${r}`}},XN=(e,t={})=>{Jn(e)||Ka("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||_t("popup"),r=xee(()=>n.bm("parent","hidden"));if(!rr||Hs(document.body,r.value))return;let o=0,i=!1,a="0";const l=()=>{setTimeout(()=>{xl(document==null?void 0:document.body,r.value),i&&document&&(document.body.style.width=a)},200)};Je(e,s=>{if(!s)return void l();i=!Hs(document.body,r.value),i&&(a=document.body.style.width),o=YQ(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,c=Pd(document.body,"overflowY");o>0&&(u||c==="scroll")&&i&&(document.body.style.width=`calc(100% - ${o}px)`),Ed(document.body,r.value)}),eb(()=>l())},Yoe=M3({type:Boolean,default:null}),Xoe=M3({type:Function}),QN=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,r=[t];return{useModelToggle:({indicator:o,toggleReason:i,shouldHideWhenRouteChanges:a,shouldProceed:l,onShow:s,onHide:u})=>{const c=dn(),{emit:d}=c,f=c.props,p=ee(()=>Ut(f[n])),m=ee(()=>f[e]===null),v=x=>{o.value!==!0&&(o.value=!0,i&&(i.value=x),Ut(s)&&s(x))},g=x=>{o.value!==!1&&(o.value=!1,i&&(i.value=x),Ut(u)&&u(x))},b=x=>{if(f.disabled===!0||Ut(l)&&!l())return;const _=p.value&&rr;_&&d(t,!0),!m.value&&_||v(x)},y=x=>{if(f.disabled===!0||!rr)return;const _=p.value&&rr;_&&d(t,!1),!m.value&&_||g(x)},w=x=>{Ki(x)&&(f.disabled&&x?p.value&&d(t,!1):o.value!==x&&(x?v():g()))};return Je(()=>f[e],w),a&&c.appContext.config.globalProperties.$route!==void 0&&Je(()=>({...c.proxy.$route}),()=>{a.value&&o.value&&y()}),yn(()=>{w(f[e])}),{hide:y,show:b,toggle:()=>{o.value?y():b()},hasUpdateHandler:p}},useModelToggleProps:{[e]:Yoe,[n]:Xoe},useModelToggleEmits:r}},QN("modelValue");const Qoe=e=>{const t=dn();return ee(()=>{var n,r;return(r=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:r[e]})};let rl,ds,fs,ol,b9,eg,e1,tg,Joe,JN,ng,Zoe,ZN,eie;rl="top",ds="bottom",fs="right",ol="left",b9="auto",eg=[rl,ds,fs,ol],e1="start",tg="end",Joe="clippingParents",JN="viewport",ng="popper",Zoe="reference",ZN=eg.reduce(function(e,t){return e.concat([t+"-"+e1,t+"-"+tg])},[]),v0=[].concat(eg,[b9]).reduce(function(e,t){return e.concat([t,t+"-"+e1,t+"-"+tg])},[]),eie=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Mc(e){return e?(e.nodeName||"").toLowerCase():null}function Iu(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function rg(e){return e instanceof Iu(e).Element||e instanceof Element}function Ys(e){return e instanceof Iu(e).HTMLElement||e instanceof HTMLElement}function eF(e){return typeof ShadowRoot<"u"&&(e instanceof Iu(e).ShadowRoot||e instanceof ShadowRoot)}var tie={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Ys(i)||!Mc(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var l=o[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]).reduce(function(l,s){return l[s]="",l},{});!Ys(o)||!Mc(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}},requires:["computeStyles"]};function Nc(e){return e.split("-")[0]}var t1=Math.max,A9=Math.min,og=Math.round;function ig(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(Ys(e)&&t){var i=e.offsetHeight,a=e.offsetWidth;a>0&&(r=og(n.width)/a||1),i>0&&(o=og(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function tF(e){var t=ig(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function nie(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&eF(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zd(e){return Iu(e).getComputedStyle(e)}function TIe(e){return["table","td","th"].indexOf(Mc(e))>=0}function tp(e){return((rg(e)?e.ownerDocument:e.document)||window.document).documentElement}function w9(e){return Mc(e)==="html"?e:e.assignedSlot||e.parentNode||(eF(e)?e.host:null)||tp(e)}function rie(e){return Ys(e)&&zd(e).position!=="fixed"?e.offsetParent:null}function zb(e){for(var t=Iu(e),n=rie(e);n&&TIe(n)&&zd(n).position==="static";)n=rie(n);return n&&(Mc(n)==="html"||Mc(n)==="body"&&zd(n).position==="static")?t:n||function(r){var o=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;if(navigator.userAgent.indexOf("Trident")!==-1&&Ys(r)&&zd(r).position==="fixed")return null;var i=w9(r);for(eF(i)&&(i=i.host);Ys(i)&&["html","body"].indexOf(Mc(i))<0;){var a=zd(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||o&&a.willChange==="filter"||o&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}(e)||t}function nF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Hb(e,t,n){return t1(e,A9(t,n))}function oie(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function iie(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var MIe={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Nc(n.placement),s=nF(l),u=[ol,fs].indexOf(l)>=0?"height":"width";if(i&&a){var c=function(T,k){return oie(typeof(T=typeof T=="function"?T(Object.assign({},k.rects,{placement:k.placement})):T)!="number"?T:iie(T,eg))}(o.padding,n),d=tF(i),f=s==="y"?rl:ol,p=s==="y"?ds:fs,m=n.rects.reference[u]+n.rects.reference[s]-a[s]-n.rects.popper[u],v=a[s]-n.rects.reference[s],g=zb(i),b=g?s==="y"?g.clientHeight||0:g.clientWidth||0:0,y=m/2-v/2,w=c[f],x=b-d[u]-c[p],_=b/2-d[u]/2+y,E=Hb(w,_,x),C=s;n.modifiersData[r]=((t={})[C]=E,t.centerOffset=E-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=n===void 0?"[data-popper-arrow]":n;r!=null&&(typeof r=="string"&&!(r=t.elements.popper.querySelector(r))||!nie(t.elements.popper,r)||(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ag(e){return e.split("-")[1]}var NIe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aie(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,v=m===void 0?0:m,g=typeof c=="function"?c({x:p,y:v}):{x:p,y:v};p=g.x,v=g.y;var b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),w=ol,x=rl,_=window;if(u){var E=zb(n),C="clientHeight",T="clientWidth";E===Iu(n)&&zd(E=tp(n)).position!=="static"&&l==="absolute"&&(C="scrollHeight",T="scrollWidth"),(o===rl||(o===ol||o===fs)&&i===tg)&&(x=ds,v-=(d&&E===_&&_.visualViewport?_.visualViewport.height:E[C])-r.height,v*=s?1:-1),(o===ol||(o===rl||o===ds)&&i===tg)&&(w=fs,p-=(d&&E===_&&_.visualViewport?_.visualViewport.width:E[T])-r.width,p*=s?1:-1)}var k,I=Object.assign({position:l},u&&NIe),O=c===!0?function(F){var N=F.x,B=F.y,L=window.devicePixelRatio||1;return{x:og(N*L)/L||0,y:og(B*L)/L||0}}({x:p,y:v}):{x:p,y:v};return p=O.x,v=O.y,s?Object.assign({},I,((k={})[x]=y?"0":"",k[w]=b?"0":"",k.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",k)):Object.assign({},I,((t={})[x]=y?v+"px":"",t[w]=b?p+"px":"",t.transform="",t))}var lie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0||r,i=n.adaptive,a=i===void 0||i,l=n.roundOffsets,s=l===void 0||l,u={placement:Nc(t.placement),variation:ag(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,aie(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,aie(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},x9={passive:!0},sie={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0||o,a=r.resize,l=a===void 0||a,s=Iu(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,x9)}),l&&s.addEventListener("resize",n.update,x9),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,x9)}),l&&s.removeEventListener("resize",n.update,x9)}},data:{}},FIe={left:"right",right:"left",bottom:"top",top:"bottom"};function _9(e){return e.replace(/left|right|bottom|top/g,function(t){return FIe[t]})}var RIe={start:"end",end:"start"};function uie(e){return e.replace(/start|end/g,function(t){return RIe[t]})}function rF(e){var t=Iu(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function oF(e){return ig(tp(e)).left+rF(e).scrollLeft}function iF(e){var t=zd(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function cie(e){return["html","body","#document"].indexOf(Mc(e))>=0?e.ownerDocument.body:Ys(e)&&iF(e)?e:cie(w9(e))}function $b(e,t){var n;t===void 0&&(t=[]);var r=cie(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Iu(r),a=o?[i].concat(i.visualViewport||[],iF(r)?r:[]):r,l=t.concat(a);return o?l:l.concat($b(w9(a)))}function aF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function die(e,t){return t===JN?aF(function(n){var r=Iu(n),o=tp(n),i=r.visualViewport,a=o.clientWidth,l=o.clientHeight,s=0,u=0;return i&&(a=i.width,l=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,u=i.offsetTop)),{width:a,height:l,x:s+oF(n),y:u}}(e)):rg(t)?function(n){var r=ig(n);return r.top=r.top+n.clientTop,r.left=r.left+n.clientLeft,r.bottom=r.top+n.clientHeight,r.right=r.left+n.clientWidth,r.width=n.clientWidth,r.height=n.clientHeight,r.x=r.left,r.y=r.top,r}(t):aF(function(n){var r,o=tp(n),i=rF(n),a=(r=n.ownerDocument)==null?void 0:r.body,l=t1(o.scrollWidth,o.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=t1(o.scrollHeight,o.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),u=-i.scrollLeft+oF(n),c=-i.scrollTop;return zd(a||o).direction==="rtl"&&(u+=t1(o.clientWidth,a?a.clientWidth:0)-l),{width:l,height:s,x:u,y:c}}(tp(e)))}function IIe(e,t,n){var r=t==="clippingParents"?function(l){var s=$b(w9(l)),u=["absolute","fixed"].indexOf(zd(l).position)>=0&&Ys(l)?zb(l):l;return rg(u)?s.filter(function(c){return rg(c)&&nie(c,u)&&Mc(c)!=="body"}):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce(function(l,s){var u=die(e,s);return l.top=t1(u.top,l.top),l.right=A9(u.right,l.right),l.bottom=A9(u.bottom,l.bottom),l.left=t1(u.left,l.left),l},die(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function fie(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Nc(o):null,a=o?ag(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(i){case rl:t={x:l,y:n.y-r.height};break;case ds:t={x:l,y:n.y+n.height};break;case fs:t={x:n.x+n.width,y:s};break;case ol:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=i?nF(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(a){case e1:t[u]=t[u]-(n[c]/2-r[c]/2);break;case tg:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function Ub(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.boundary,a=i===void 0?Joe:i,l=n.rootBoundary,s=l===void 0?JN:l,u=n.elementContext,c=u===void 0?ng:u,d=n.altBoundary,f=d!==void 0&&d,p=n.padding,m=p===void 0?0:p,v=oie(typeof m!="number"?m:iie(m,eg)),g=c===ng?Zoe:ng,b=e.rects.popper,y=e.elements[f?g:c],w=IIe(rg(y)?y:y.contextElement||tp(e.elements.popper),a,s),x=ig(e.elements.reference),_=fie({reference:x,element:b,strategy:"absolute",placement:o}),E=aF(Object.assign({},b,_)),C=c===ng?E:x,T={top:w.top-C.top+v.top,bottom:C.bottom-w.bottom+v.bottom,left:w.left-C.left+v.left,right:C.right-w.right+v.right},k=e.modifiersData.offset;if(c===ng&&k){var I=k[o];Object.keys(T).forEach(function(O){var F=[fs,ds].indexOf(O)>=0?1:-1,N=[rl,ds].indexOf(O)>=0?"y":"x";T[O]+=I[N]*F})}return T}var BIe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0||o,a=n.altAxis,l=a===void 0||a,s=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,v=n.allowedAutoPlacements,g=t.options.placement,b=Nc(g),y=s||(b===g||!m?[_9(g)]:function(z){if(Nc(z)===b9)return[];var $=_9(z);return[uie(z),$,uie($)]}(g)),w=[g].concat(y).reduce(function(z,$){return z.concat(Nc($)===b9?function(W,K){K===void 0&&(K={});var X=K,te=X.placement,ne=X.boundary,se=X.rootBoundary,le=X.padding,J=X.flipVariations,Z=X.allowedAutoPlacements,ye=Z===void 0?v0:Z,be=ag(te),ve=be?J?ZN:ZN.filter(function(_e){return ag(_e)===be}):eg,Ae=ve.filter(function(_e){return ye.indexOf(_e)>=0});Ae.length===0&&(Ae=ve);var Ce=Ae.reduce(function(_e,ke){return _e[ke]=Ub(W,{placement:ke,boundary:ne,rootBoundary:se,padding:le})[Nc(ke)],_e},{});return Object.keys(Ce).sort(function(_e,ke){return Ce[_e]-Ce[ke]})}(t,{placement:$,boundary:c,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:v}):$)},[]),x=t.rects.reference,_=t.rects.popper,E=new Map,C=!0,T=w[0],k=0;k<w.length;k++){var I=w[k],O=Nc(I),F=ag(I)===e1,N=[rl,ds].indexOf(O)>=0,B=N?"width":"height",L=Ub(t,{placement:I,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),V=N?F?fs:ol:F?ds:rl;x[B]>_[B]&&(V=_9(V));var P=_9(V),H=[];if(i&&H.push(L[O]<=0),l&&H.push(L[V]<=0,L[P]<=0),H.every(function(z){return z})){T=I,C=!1;break}E.set(I,H)}if(C)for(var U=function(z){var $=w.find(function(W){var K=E.get(W);if(K)return K.slice(0,z).every(function(X){return X})});if($)return T=$,"break"},G=m?3:1;G>0&&U(G)!=="break";G--);t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function pie(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function hie(e){return[rl,fs,ds,ol].some(function(t){return e[t]>=0})}var LIe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ub(t,{elementContext:"reference"}),l=Ub(t,{altBoundary:!0}),s=pie(a,r),u=pie(l,o,i),c=hie(s),d=hie(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},PIe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=v0.reduce(function(c,d){return c[d]=function(f,p,m){var v=Nc(f),g=[ol,rl].indexOf(v)>=0?-1:1,b=typeof m=="function"?m(Object.assign({},p,{placement:f})):m,y=b[0],w=b[1];return y=y||0,w=(w||0)*g,[ol,fs].indexOf(v)>=0?{x:w,y}:{x:y,y:w}}(d,t.rects,i),c},{}),l=a[t.placement],s=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},vie={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=fie({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},jIe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0||o,a=n.altAxis,l=a!==void 0&&a,s=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,v=m===void 0?0:m,g=Ub(t,{boundary:s,rootBoundary:u,padding:d,altBoundary:c}),b=Nc(t.placement),y=ag(t.placement),w=!y,x=nF(b),_=function(dt){return dt==="x"?"y":"x"}(x),E=t.modifiersData.popperOffsets,C=t.rects.reference,T=t.rects.popper,k=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,I=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(E){if(i){var N,B=x==="y"?rl:ol,L=x==="y"?ds:fs,V=x==="y"?"height":"width",P=E[x],H=P+g[B],U=P-g[L],G=p?-T[V]/2:0,z=y===e1?C[V]:T[V],$=y===e1?-T[V]:-C[V],W=t.elements.arrow,K=p&&W?tF(W):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=X[B],ne=X[L],se=Hb(0,C[V],K[V]),le=w?C[V]/2-G-se-te-I.mainAxis:z-se-te-I.mainAxis,J=w?-C[V]/2+G+se+ne+I.mainAxis:$+se+ne+I.mainAxis,Z=t.elements.arrow&&zb(t.elements.arrow),ye=Z?x==="y"?Z.clientTop||0:Z.clientLeft||0:0,be=(N=O==null?void 0:O[x])!=null?N:0,ve=P+J-be,Ae=Hb(p?A9(H,P+le-be-ye):H,P,p?t1(U,ve):U);E[x]=Ae,F[x]=Ae-P}if(l){var Ce,_e=x==="x"?rl:ol,ke=x==="x"?ds:fs,Be=E[_],$e=_==="y"?"height":"width",rt=Be+g[_e],ge=Be-g[ke],We=[rl,ol].indexOf(b)!==-1,st=(Ce=O==null?void 0:O[_])!=null?Ce:0,At=We?rt:Be-C[$e]-T[$e]-st+I.altAxis,Ve=We?Be+C[$e]+T[$e]-st-I.altAxis:ge,it=p&&We?function(dt,ot,je){var we=Hb(dt,ot,je);return we>je?je:we}(At,Be,Ve):Hb(p?At:rt,Be,p?Ve:ge);E[_]=it,F[_]=it-Be}t.modifiersData[r]=F}},requiresIfExists:["offset"]};function VIe(e,t,n){n===void 0&&(n=!1);var r=Ys(t),o=Ys(t)&&function(u){var c=u.getBoundingClientRect(),d=og(c.width)/u.offsetWidth||1,f=og(c.height)/u.offsetHeight||1;return d!==1||f!==1}(t),i=tp(t),a=ig(e,o),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&((Mc(t)!=="body"||iF(i))&&(l=function(u){return u!==Iu(u)&&Ys(u)?function(c){return{scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}}(u):rF(u)}(t)),Ys(t)?((s=ig(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=oF(i))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function zIe(e){var t=new Map,n=new Set,r=[];function o(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),r.push(i)}return e.forEach(function(i){t.set(i.name,i)}),e.forEach(function(i){n.has(i.name)||o(i)}),r}function HIe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var mie={placement:"bottom",modifiers:[],strategy:"absolute"};function gie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function lF(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?mie:o;return function(a,l,s){s===void 0&&(s=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},mie,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},c=[],d=!1,f={state:u,setOptions:function(m){var v=typeof m=="function"?m(u.options):m;p(),u.options=Object.assign({},i,u.options,v),u.scrollParents={reference:rg(a)?$b(a):a.contextElement?$b(a.contextElement):[],popper:$b(l)};var g=function(b){var y=zIe(b);return eie.reduce(function(w,x){return w.concat(y.filter(function(_){return _.phase===x}))},[])}(function(b){var y=b.reduce(function(w,x){var _=w[x.name];return w[x.name]=_?Object.assign({},_,x,{options:Object.assign({},_.options,x.options),data:Object.assign({},_.data,x.data)}):x,w},{});return Object.keys(y).map(function(w){return y[w]})}([].concat(r,u.options.modifiers)));return u.orderedModifiers=g.filter(function(b){return b.enabled}),u.orderedModifiers.forEach(function(b){var y=b.name,w=b.options,x=w===void 0?{}:w,_=b.effect;if(typeof _=="function"){var E=_({state:u,name:y,instance:f,options:x}),C=function(){};c.push(E||C)}}),f.update()},forceUpdate:function(){if(!d){var m=u.elements,v=m.reference,g=m.popper;if(gie(v,g)){u.rects={reference:VIe(v,zb(g),u.options.strategy==="fixed"),popper:tF(g)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(C){return u.modifiersData[C.name]=Object.assign({},C.data)});for(var b=0;b<u.orderedModifiers.length;b++)if(u.reset!==!0){var y=u.orderedModifiers[b],w=y.fn,x=y.options,_=x===void 0?{}:x,E=y.name;typeof w=="function"&&(u=w({state:u,options:_,name:E,instance:f})||u)}else u.reset=!1,b=-1}}},update:HIe(function(){return new Promise(function(m){f.forceUpdate(),m(u)})}),destroy:function(){p(),d=!0}};if(!gie(a,l))return f;function p(){c.forEach(function(m){return m()}),c=[]}return f.setOptions(s).then(function(m){!d&&s.onFirstUpdate&&s.onFirstUpdate(m)}),f}}lF(),lF({defaultModifiers:[sie,vie,lie,tie]});var $Ie=lF({defaultModifiers:[sie,vie,lie,tie,PIe,BIe,jIe,MIe,LIe]});const UIe=(e,t,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:s})=>{const u=function(c){const d=Object.keys(c.elements),f=d9(d.map(m=>[m,c.styles[m]||{}])),p=d9(d.map(m=>[m,c.attributes[m]]));return{styles:f,attributes:p}}(s);Object.assign(a.value,u)},requires:["computeStyles"]},o=ee(()=>{const{onFirstUpdate:s,placement:u,strategy:c,modifiers:d}=M(n);return{onFirstUpdate:s,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],r,{name:"applyStyles",enabled:!1}]}}),i=Qo(),a=de({styles:{popper:{position:M(o).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{i.value&&(i.value.destroy(),i.value=void 0)};return Je(o,s=>{const u=M(i);u&&u.setOptions(s)},{deep:!0}),Je([e,t],([s,u])=>{l(),s&&u&&(i.value=$Ie(s,u,M(o)))}),xo(()=>{l()}),{state:ee(()=>{var s;return{...((s=M(i))==null?void 0:s.state)||{}}}),styles:ee(()=>M(a).styles),attributes:ee(()=>M(a).attributes),update:()=>{var s;return(s=M(i))==null?void 0:s.update()},forceUpdate:()=>{var s;return(s=M(i))==null?void 0:s.forceUpdate()},instanceRef:ee(()=>M(i))}},sF=e=>{if(!e)return{onClick:fr,onMousedown:fr,onMouseup:fr};let t=!1,n=!1;return{onClick:r=>{t&&n&&e(r),t=n=!1},onMousedown:r=>{t=r.target===r.currentTarget},onMouseup:r=>{n=r.target===r.currentTarget}}};function yie(){let e;const t=()=>window.clearTimeout(e);return Eb(()=>t()),{registerTimeout:(n,r)=>{t(),e=window.setTimeout(n,r)},cancelTimeout:t}}let uF,bie;uF={prefix:Math.floor(1e4*Math.random()),current:0},bie=Symbol("elIdInjection"),$O=()=>dn()?Rt(bie,uF):uF,Zl=e=>{const t=$O(),n=y9();return ee(()=>M(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let lg=[];const Aie=e=>{const t=e;t.key===Xt.esc&&lg.forEach(n=>n(t))};let wie;const xie=()=>{const e=y9(),t=$O(),n=ee(()=>`${e.value}-popper-container-${t.prefix}`),r=ee(()=>`#${n.value}`);return{id:n,selector:r}},WIe=()=>{const{id:e,selector:t}=xie();return g0(()=>{rr&&(wie||document.body.querySelector(t.value)||(wie=(n=>{const r=document.createElement("div");return r.id=n,document.body.appendChild(r),r})(e.value)))}),{id:e,selector:t}},GIe=Lt({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),_ie=Symbol("elForwardRef"),Eie={current:0},Cie=de(0),Sie=2e3,kie=Symbol("elZIndexContextKey"),Die=Symbol("zIndexContextKey"),E9=e=>{const t=dn()?Rt(kie,Eie):Eie,n=e||(dn()?Rt(Die,void 0):void 0),r=ee(()=>{const i=M(n);return Kn(i)?i:Sie}),o=ee(()=>r.value+Cie.value);return!rr&&Rt(kie),{initialZIndex:r,currentZIndex:o,nextZIndex:()=>(t.current++,Cie.value=t.current,o.value)}};let Oie,cF;Oie=(e,t)=>{const n={},r=Qo([]);return{children:r,addChild:o=>{n[o.uid]=o,r.value=((i,a,l)=>R3(i.subTree).filter(c=>{var d;return oo(c)&&((d=c.type)==null?void 0:d.name)===a&&!!c.component}).map(c=>c.component.uid).map(c=>l[c]).filter(c=>!!c))(e,t,n)},removeChild:o=>{delete n[o],r.value=r.value.filter(i=>i.uid!==o)}}},da=M3({type:String,values:bm,required:!1}),cF=Symbol("size"),Vw=function(e,{afterFocus:t,beforeBlur:n,afterBlur:r}={}){const o=dn(),{emit:i}=o,a=Qo(),l=de(!1);return Je(a,s=>{s&&s.setAttribute("tabindex","-1")}),Yo(a,"click",()=>{var s;(s=e.value)==null||s.focus()}),{wrapperRef:a,isFocused:l,handleFocus:s=>{l.value||(l.value=!0,i("focus",s),t==null||t())},handleBlur:s=>{var u;Ut(n)&&n(s)||s.relatedTarget&&((u=a.value)!=null&&u.contains(s.relatedTarget))||(l.value=!1,i("blur",s),r==null||r())}}};let Tie,dF,Wb;Tie=["",void 0,null],F3=Lt({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Ut(e)?!e():!e}}),jw=(e,t)=>{const n=Gb();n.value=n.value||{};const r=ee(()=>e.emptyValues||n.value.emptyValues||Tie),o=ee(()=>Ut(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Ut(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:void 0);return r.value.includes(o.value),{emptyValues:r,valueOnClear:o,isEmptyValue:i=>r.value.includes(i)}},dF=Symbol(),Wb=de();function Gb(e,t=void 0){const n=dn()?Rt(dF,Wb):Wb;return e?ee(()=>{var r,o;return(o=(r=n.value)==null?void 0:r[e])!=null?o:t}):n}function C9(e,t){const n=Gb(),r=_t(e,ee(()=>{var l;return((l=n.value)==null?void 0:l.namespace)||Zm})),o=Gr(ee(()=>{var l;return(l=n.value)==null?void 0:l.locale})),i=E9(ee(()=>{var l;return((l=n.value)==null?void 0:l.zIndex)||Sie})),a=ee(()=>{var l;return M(t)||((l=n.value)==null?void 0:l.size)||""});return Mie(ee(()=>M(n)||{})),{ns:r,locale:o,zIndex:i,size:a}}const Mie=(e,t,n=!1)=>{const r=!!dn(),o=r?Gb():void 0,i=r?qn:void 0;if(!i)return;const a=ee(()=>{const l=M(e);return o!=null&&o.value?qIe(o.value,l):l});return i(dF,a),i(KN,ee(()=>a.value.locale)),i(YN,ee(()=>a.value.namespace)),i(Die,ee(()=>a.value.zIndex)),i(cF,{size:ee(()=>a.value.size||"")}),!n&&Wb.value||(Wb.value=a.value),a},qIe=(e,t)=>{const n=[...new Set([...Lb(e),...Lb(t)])],r={};for(const o of n)r[o]=t[o]!==void 0?t[o]:e[o];return r},KIe=Lt({a11y:{type:Boolean,default:!0},locale:{type:Object},size:da,button:{type:Object},experimentalFeatures:{type:Object},keyboardNavigation:{type:Boolean,default:!0},message:{type:Object},zIndex:Number,namespace:{type:String,default:"el"},...F3}),fF={},YIe=Te({name:"ElConfigProvider",props:KIe,setup(e,{slots:t}){Je(()=>e.message,r=>{Object.assign(fF,r??{})},{immediate:!0,deep:!0});const n=Mie(e);return()=>ft(t,"default",{config:n==null?void 0:n.value})}}),XIe=Cr(YIe);Nt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const QIe=Lt({size:{type:[Number,String]},color:{type:String}}),JIe=Te({name:"ElIcon",inheritAttrs:!1}),ZIe=Te({...JIe,props:QIe,setup(e){const t=e,n=_t("icon"),r=ee(()=>{const{size:o,color:i}=t;return o||i?{fontSize:Wi(o)?void 0:ka(o),"--color":i}:{}});return(o,i)=>(Y(),fe("i",Un({class:M(n).b(),style:M(r)},o.$attrs),[ft(o.$slots,"default")],16))}});let Nie,Fie,Rie,Iie;Ft=Cr(Nt(ZIe,[["__file","icon.vue"]])),Nie=Lt({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:Lb(Vd),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:["light","dark"],default:"light"}}),Fie={close:e=>e instanceof MouseEvent},Rie=Te({name:"ElAlert"}),Iie=Te({...Rie,props:Nie,emits:Fie,setup(e,{emit:t}){const n=e,{Close:r}=m9,o=Ga(),i=_t("alert"),a=de(!0),l=ee(()=>Vd[n.type]),s=ee(()=>[i.e("icon"),{[i.is("big")]:!!n.description||!!o.default}]),u=ee(()=>({"with-description":n.description||o.default})),c=d=>{a.value=!1,t("close",d)};return(d,f)=>(Y(),Pe(ca,{name:M(i).b("fade"),persisted:""},{default:he(()=>[nn(ce("div",{class:oe([M(i).b(),M(i).m(d.type),M(i).is("center",d.center),M(i).is(d.effect)]),role:"alert"},[d.showIcon&&M(l)?(Y(),Pe(M(Ft),{key:0,class:oe(M(s))},{default:he(()=>[(Y(),Pe(Hn(M(l))))]),_:1},8,["class"])):Fe("v-if",!0),ce("div",{class:oe(M(i).e("content"))},[d.title||d.$slots.title?(Y(),fe("span",{key:0,class:oe([M(i).e("title"),M(u)])},[ft(d.$slots,"title",{},()=>[Dt(Ye(d.title),1)])],2)):Fe("v-if",!0),d.$slots.default||d.description?(Y(),fe("p",{key:1,class:oe(M(i).e("description"))},[ft(d.$slots,"default",{},()=>[Dt(Ye(d.description),1)])],2)):Fe("v-if",!0),d.closable?(Y(),fe(bt,{key:2},[d.closeText?(Y(),fe("div",{key:0,class:oe([M(i).e("close-btn"),M(i).is("customed")]),onClick:c},Ye(d.closeText),3)):(Y(),Pe(M(Ft),{key:1,class:oe(M(i).e("close-btn")),onClick:c},{default:he(()=>[ie(M(r))]),_:1},8,["class"]))],64)):Fe("v-if",!0)],2)],2),[[$n,a.value]])]),_:3},8,["name"]))}});let Bie,np,Fc,Lie,Pie,jie;Bie=Cr(Nt(Iie,[["__file","alert.vue"]])),np=Symbol("formContextKey"),Fc=Symbol("formItemContextKey"),$i=(e,t={})=>{const n=de(void 0),r=t.prop?n:Qoe("size"),o=t.global?n:(()=>{const l=Rt(cF,{});return ee(()=>M(l.size)||"")})(),i=t.form?{size:void 0}:Rt(np,void 0),a=t.formItem?{size:void 0}:Rt(Fc,void 0);return ee(()=>r.value||M(e)||(a==null?void 0:a.size)||(i==null?void 0:i.size)||o.value||"")},wl=e=>{const t=Qoe("disabled"),n=Rt(np,void 0);return ee(()=>t.value||M(e)||(n==null?void 0:n.disabled)||!1)},qa=()=>({form:Rt(np,void 0),formItem:Rt(Fc,void 0)}),Ac=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:r})=>{n||(n=de(!1)),r||(r=de(!1));const o=de();let i;const a=ee(()=>{var l;return!!(!e.label&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return yn(()=>{i=Je([dr(e,"id"),n],([l,s])=>{const u=l??(s?void 0:Zl().value);u!==o.value&&(t!=null&&t.removeInputId&&(o.value&&t.removeInputId(o.value),r!=null&&r.value||s||!u||t.addInputId(u)),o.value=u)},{immediate:!0})}),Vs(()=>{i&&i(),t!=null&&t.removeInputId&&o.value&&t.removeInputId(o.value)}),{isLabeledByFormItem:a,inputId:o}},Lie=Lt({size:{type:String,values:bm},disabled:Boolean}),Pie=Lt({...Lie,model:Object,rules:{type:Object},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),jie={validate:(e,t,n)=>(mt(e)||an(e))&&Ki(t)&&an(n)};function eBe(){const e=de([]),t=ee(()=>{if(!e.value.length)return"0";const r=Math.max(...e.value);return r?`${r}px`:""});function n(r){const o=e.value.indexOf(r);return o===-1&&t.value,o}return{autoLabelWidth:t,registerLabelWidth:function(r,o){if(r&&o){const i=n(o);e.value.splice(i,1,r)}else r&&e.value.push(r)},deregisterLabelWidth:function(r){const o=n(r);o>-1&&e.value.splice(o,1)}}}const S9=(e,t)=>{const n=Iw(t);return n.length>0?e.filter(r=>r.prop&&n.includes(r.prop)):e},tBe=Te({name:"ElForm"}),nBe=Te({...tBe,props:Pie,emits:jie,setup(e,{expose:t,emit:n}){const r=e,o=[],i=$i(),a=_t("form"),l=ee(()=>{const{labelPosition:v,inline:g}=r;return[a.b(),a.m(i.value||"default"),{[a.m(`label-${v}`)]:v,[a.m("inline")]:g}]}),s=(v=[])=>{r.model&&S9(o,v).forEach(g=>g.resetField())},u=(v=[])=>{S9(o,v).forEach(g=>g.clearValidate())},c=ee(()=>!!r.model),d=async v=>p(void 0,v),f=async(v=[])=>{if(!c.value)return!1;const g=(y=>{if(o.length===0)return[];const w=S9(o,y);return w.length?w:[]})(v);if(g.length===0)return!0;let b={};for(const y of g)try{await y.validate("")}catch(w){b={...b,...w}}return Object.keys(b).length===0||Promise.reject(b)},p=async(v=[],g)=>{const b=!Ut(g);try{const y=await f(v);return y===!0&&(g==null||g(y)),y}catch(y){if(y instanceof Error)throw y;const w=y;return r.scrollToError&&m(Object.keys(w)[0]),g==null||g(!1,w),b&&Promise.reject(w)}},m=v=>{var g;const b=S9(o,v)[0];b&&((g=b.$el)==null||g.scrollIntoView(r.scrollIntoViewOptions))};return Je(()=>r.rules,()=>{r.validateOnRuleChange&&d().catch(v=>{})},{deep:!0}),qn(np,Qn({...di(r),emit:n,resetFields:s,clearValidate:u,validateField:p,getField:v=>o.find(g=>g.prop===v),addField:v=>{o.push(v)},removeField:v=>{v.prop&&o.splice(o.indexOf(v),1)},...eBe()})),t({validate:d,validateField:p,resetFields:s,clearValidate:u,scrollToField:m}),(v,g)=>(Y(),fe("form",{class:oe(M(l))},[ft(v.$slots,"default")],2))}});var rBe=Nt(nBe,[["__file","form.vue"]]);function n1(){return n1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n1.apply(this,arguments)}function pF(e){return pF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pF(e)}function qb(e,t){return qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},qb(e,t)}function hF(e,t,n){return hF=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}()?Reflect.construct.bind():function(r,o,i){var a=[null];a.push.apply(a,o);var l=new(Function.bind.apply(r,a));return i&&qb(l,i.prototype),l},hF.apply(null,arguments)}function vF(e){var t=typeof Map=="function"?new Map:void 0;return vF=function(n){if(n===null||!function(o){return Function.toString.call(o).indexOf("[native code]")!==-1}(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return hF(n,arguments,pF(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),qb(r,n)},vF(e)}var oBe=/%[sdj%]/g,iBe=function(){};function mF(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function ps(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(oBe,function(l){if(l==="%%")return"%";if(o>=i)return l;switch(l){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return l}});return a}return e}function Ti(e,t){return e==null||!(t!=="array"||!Array.isArray(e)||e.length)||!(!function(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}(t)||typeof e!="string"||e)}function Vie(e,t,n){var r=0,o=e.length;(function i(a){if(a&&a.length)n(a);else{var l=r;r+=1,l<o?t(e[l],i):n([])}})([])}var zie=function(e){var t,n;function r(o,i){var a;return(a=e.call(this,"Async Validation Error")||this).errors=o,a.fields=i,a}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,qb(t,n),r}(vF(Error));function aBe(e,t,n,r,o){if(t.first){var i=new Promise(function(f,p){var m=function(v){var g=[];return Object.keys(v).forEach(function(b){g.push.apply(g,v[b]||[])}),g}(e);Vie(m,n,function(v){return r(v),v.length?p(new zie(v,mF(v))):f(o)})});return i.catch(function(f){return f}),i}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),s=l.length,u=0,c=[],d=new Promise(function(f,p){var m=function(v){if(c.push.apply(c,v),++u===s)return r(c),c.length?p(new zie(c,mF(c))):f(o)};l.length||(r(c),f(o)),l.forEach(function(v){var g=e[v];a.indexOf(v)!==-1?Vie(g,n,m):function(b,y,w){var x=[],_=0,E=b.length;function C(T){x.push.apply(x,T||[]),++_===E&&w(x)}b.forEach(function(T){y(T,C)})}(g,n,m)})});return d.catch(function(f){return f}),d}function Hie(e,t){return function(n){var r,o;return r=e.fullFields?function(i,a){for(var l=i,s=0;s<a.length;s++){if(l==null)return l;l=l[a[s]]}return l}(t,e.fullFields):t[n.field||e.fullField],(o=n)&&o.message!==void 0?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function $ie(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=n1({},e[n],r):e[n]=r}}return e}var gF,Uie=function(e,t,n,r,o,i){!e.required||n.hasOwnProperty(e.field)&&!Ti(t,i||e.type)||r.push(ps(o.messages.required,e.fullField))},lBe=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,sBe=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Kb={integer:function(e){return Kb.number(e)&&parseInt(e,10)===e},float:function(e){return Kb.number(e)&&!Kb.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&typeof e=="number"},object:function(e){return typeof e=="object"&&!Kb.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(lBe)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(function(){if(gF)return gF;var t="[a-fA-F\\d:]",n=function(f){return f&&f.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},r="(?: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}",o="[a-fA-F\\d]{1,4}",i=(` |
|
7 |
(?: |
|
8 |
(?:`+o+":){7}(?:"+o+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 |
|
9 |
(?:`+o+":){6}(?:"+r+"|:"+o+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 |
|
10 |
(?:`+o+":){5}(?::"+r+"|(?::"+o+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 |
|
11 |
(?:`+o+":){4}(?:(?::"+o+"){0,1}:"+r+"|(?::"+o+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 |
|
12 |
(?:`+o+":){3}(?:(?::"+o+"){0,2}:"+r+"|(?::"+o+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 |
|
13 |
(?:`+o+":){2}(?:(?::"+o+"){0,3}:"+r+"|(?::"+o+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 |
|
14 |
(?:`+o+":){1}(?:(?::"+o+"){0,4}:"+r+"|(?::"+o+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 |
|
15 |
(?::(?:(?::`+o+"){0,5}:"+r+"|(?::"+o+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 |
|
16 |
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 |
|
17 |
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+r+"$)|(?:^"+i+"$)"),l=new RegExp("^"+r+"$"),s=new RegExp("^"+i+"$"),u=function(f){return f&&f.exact?a:new RegExp("(?:"+n(f)+r+n(f)+")|(?:"+n(f)+i+n(f)+")","g")};u.v4=function(f){return f&&f.exact?l:new RegExp(""+n(f)+r+n(f),"g")},u.v6=function(f){return f&&f.exact?s:new RegExp(""+n(f)+i+n(f),"g")};var c=u.v4().source,d=u.v6().source;return gF=new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+c+"|"+d+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")}())},hex:function(e){return typeof e=="string"&&!!e.match(sBe)}},sg="enum",wr={required:Uie,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||t==="")&&r.push(ps(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&t===void 0)Uie(e,t,n,r,o);else{var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?Kb[i](t)||r.push(ps(o.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&r.push(ps(o.messages.types[i],e.fullField,e.type))}},range:function(e,t,n,r,o){var i=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",s=t,u=null,c=typeof t=="number",d=typeof t=="string",f=Array.isArray(t);if(c?u="number":d?u="string":f&&(u="array"),!u)return!1;f&&(s=t.length),d&&(s=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?s!==e.len&&r.push(ps(o.messages[u].len,e.fullField,e.len)):a&&!l&&s<e.min?r.push(ps(o.messages[u].min,e.fullField,e.min)):l&&!a&&s>e.max?r.push(ps(o.messages[u].max,e.fullField,e.max)):a&&l&&(s<e.min||s>e.max)&&r.push(ps(o.messages[u].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e[sg]=Array.isArray(e[sg])?e[sg]:[],e[sg].indexOf(t)===-1&&r.push(ps(o.messages[sg],e.fullField,e[sg].join(", ")))},pattern:function(e,t,n,r,o){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(ps(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||r.push(ps(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))}},yF=function(e,t,n,r,o){var i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t,i)&&!e.required)return n();wr.required(e,t,r,a,o,i),Ti(t,i)||wr.type(e,t,r,a,o)}n(a)},Yb={string:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t,"string")&&!e.required)return n();wr.required(e,t,r,i,o,"string"),Ti(t,"string")||(wr.type(e,t,r,i,o),wr.range(e,t,r,i,o),wr.pattern(e,t,r,i,o),e.whitespace===!0&&wr.whitespace(e,t,r,i,o))}n(i)},method:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),t!==void 0&&wr.type(e,t,r,i,o)}n(i)},number:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===""&&(t=void 0),Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),t!==void 0&&(wr.type(e,t,r,i,o),wr.range(e,t,r,i,o))}n(i)},boolean:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),t!==void 0&&wr.type(e,t,r,i,o)}n(i)},regexp:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),Ti(t)||wr.type(e,t,r,i,o)}n(i)},integer:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),t!==void 0&&(wr.type(e,t,r,i,o),wr.range(e,t,r,i,o))}n(i)},float:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),t!==void 0&&(wr.type(e,t,r,i,o),wr.range(e,t,r,i,o))}n(i)},array:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();wr.required(e,t,r,i,o,"array"),t!=null&&(wr.type(e,t,r,i,o),wr.range(e,t,r,i,o))}n(i)},object:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),t!==void 0&&wr.type(e,t,r,i,o)}n(i)},enum:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o),t!==void 0&&wr.enum(e,t,r,i,o)}n(i)},pattern:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t,"string")&&!e.required)return n();wr.required(e,t,r,i,o),Ti(t,"string")||wr.pattern(e,t,r,i,o)}n(i)},date:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t,"date")&&!e.required)return n();var a;wr.required(e,t,r,i,o),!Ti(t,"date")&&(a=t instanceof Date?t:new Date(t),wr.type(e,a,r,i,o),a&&wr.range(e,a.getTime(),r,i,o))}n(i)},url:yF,hex:yF,email:yF,required:function(e,t,n,r,o){var i=[],a=Array.isArray(t)?"array":typeof t;wr.required(e,t,r,i,o,a),n(i)},any:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ti(t)&&!e.required)return n();wr.required(e,t,r,i,o)}n(i)}};function bF(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var AF=bF(),Xb=function(){function e(n){this.rules=null,this._messages=AF,this.define(n)}var t=e.prototype;return t.define=function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(typeof n!="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i]})},t.messages=function(n){return n&&(this._messages=$ie(bF(),n)),this._messages},t.validate=function(n,r,o){var i=this;r===void 0&&(r={}),o===void 0&&(o=function(){});var a=n,l=r,s=o;if(typeof l=="function"&&(s=l,l={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);if(l.messages){var u=this.messages();u===AF&&(u=bF()),$ie(u,l.messages),l.messages=u}else l.messages=this.messages();var c={};(l.keys||Object.keys(this.rules)).forEach(function(f){var p=i.rules[f],m=a[f];p.forEach(function(v){var g=v;typeof g.transform=="function"&&(a===n&&(a=n1({},a)),m=a[f]=g.transform(m)),(g=typeof g=="function"?{validator:g}:n1({},g)).validator=i.getValidationMethod(g),g.validator&&(g.field=f,g.fullField=g.fullField||f,g.type=i.getType(g),c[f]=c[f]||[],c[f].push({rule:g,value:m,source:a,field:f}))})});var d={};return aBe(c,l,function(f,p){var m,v=f.rule,g=!(v.type!=="object"&&v.type!=="array"||typeof v.fields!="object"&&typeof v.defaultField!="object");function b(w,x){return n1({},x,{fullField:v.fullField+"."+w,fullFields:v.fullFields?[].concat(v.fullFields,[w]):[w]})}function y(w){w===void 0&&(w=[]);var x=Array.isArray(w)?w:[w];!l.suppressWarning&&x.length&&e.warning("async-validator:",x),x.length&&v.message!==void 0&&(x=[].concat(v.message));var _=x.map(Hie(v,a));if(l.first&&_.length)return d[v.field]=1,p(_);if(g){if(v.required&&!f.value)return v.message!==void 0?_=[].concat(v.message).map(Hie(v,a)):l.error&&(_=[l.error(v,ps(l.messages.required,v.field))]),p(_);var E={};v.defaultField&&Object.keys(f.value).map(function(k){E[k]=v.defaultField}),E=n1({},E,f.rule.fields);var C={};Object.keys(E).forEach(function(k){var I=E[k],O=Array.isArray(I)?I:[I];C[k]=O.map(b.bind(null,k))});var T=new e(C);T.messages(l.messages),f.rule.options&&(f.rule.options.messages=l.messages,f.rule.options.error=l.error),T.validate(f.value,f.rule.options||l,function(k){var I=[];_&&_.length&&I.push.apply(I,_),k&&k.length&&I.push.apply(I,k),p(I.length?I:null)})}else p(_)}if(g=g&&(v.required||!v.required&&f.value),v.field=f.field,v.asyncValidator)m=v.asyncValidator(v,f.value,y,f.source,l);else if(v.validator){try{m=v.validator(v,f.value,y,f.source,l)}catch(w){console.error==null||console.error(w),l.suppressValidatorError||setTimeout(function(){throw w},0),y(w.message)}m===!0?y():m===!1?y(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||(v.fullField||v.field)+" fails"):m instanceof Array?y(m):m instanceof Error&&y(m.message)}m&&m.then&&m.then(function(){return y()},function(w){return y(w)})},function(f){(function(p){var m=[],v={};function g(y){var w;Array.isArray(y)?m=(w=m).concat.apply(w,y):m.push(y)}for(var b=0;b<p.length;b++)g(p[b]);m.length?(v=mF(m),s(m,v)):s(null,a)})(f)},a)},t.getType=function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!Yb.hasOwnProperty(n.type))throw new Error(ps("Unknown rule type %s",n.type));return n.type||"string"},t.getValidationMethod=function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?Yb.required:Yb[this.getType(n)]||void 0},e}();Xb.register=function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");Yb[e]=t},Xb.warning=iBe,Xb.messages=AF,Xb.validators=Yb;const uBe=Lt({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:[String,Array]},required:{type:Boolean,default:void 0},rules:{type:[Object,Array]},error:String,validateStatus:{type:String,values:["","error","validating","success"]},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:bm}}),Wie="ElLabelWrap";var cBe=Te({name:Wie,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const n=Rt(np,void 0),r=Rt(Fc);r||Ka(Wie,"usage: <el-form-item><label-wrap /></el-form-item>");const o=_t("form"),i=de(),a=de(0),l=(u="update")=>{St(()=>{t.default&&e.isAutoWidth&&(u==="update"?a.value=(()=>{var c;if((c=i.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(i.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}return 0})():u==="remove"&&(n==null||n.deregisterLabelWidth(a.value)))})},s=()=>l("update");return yn(()=>{s()}),xo(()=>{l("remove")}),zs(()=>s()),Je(a,(u,c)=>{e.updateAll&&(n==null||n.registerLabelWidth(u,c))}),fa(ee(()=>{var u,c;return(c=(u=i.value)==null?void 0:u.firstElementChild)!=null?c:null}),s),()=>{var u,c;if(!t)return null;const{isAutoWidth:d}=e;if(d){const f=n==null?void 0:n.autoLabelWidth,p={};if(r!=null&&r.hasLabel&&f&&f!=="auto"){const m=Math.max(0,Number.parseInt(f,10)-a.value),v=n.labelPosition==="left"?"marginRight":"marginLeft";m&&(p[v]=`${m}px`)}return ie("div",{ref:i,class:[o.be("item","label-wrap")],style:p},[(u=t.default)==null?void 0:u.call(t)])}return ie(bt,{ref:i},[(c=t.default)==null?void 0:c.call(t)])}}});const dBe=["role","aria-labelledby"],fBe=Te({name:"ElFormItem"}),pBe=Te({...fBe,props:uBe,setup(e,{expose:t}){const n=e,r=Ga(),o=Rt(np,void 0),i=Rt(Fc,void 0),a=$i(void 0,{formItem:!1}),l=_t("form-item"),s=Zl().value,u=de([]),c=de(""),d=function($,W=200,K={}){const X=de($.value),te=$Ne(()=>{X.value=$.value},W,K);return Je($,()=>te()),X}(c,100),f=de(""),p=de();let m,v=!1;const g=ee(()=>{if((o==null?void 0:o.labelPosition)==="top")return{};const $=ka(n.labelWidth||(o==null?void 0:o.labelWidth)||"");return $?{width:$}:{}}),b=ee(()=>{if((o==null?void 0:o.labelPosition)==="top"||o!=null&&o.inline)return{};if(!n.label&&!n.labelWidth&&k)return{};const $=ka(n.labelWidth||(o==null?void 0:o.labelWidth)||"");return n.label||r.label?{}:{marginLeft:$}}),y=ee(()=>[l.b(),l.m(a.value),l.is("error",c.value==="error"),l.is("validating",c.value==="validating"),l.is("success",c.value==="success"),l.is("required",N.value||n.required),l.is("no-asterisk",o==null?void 0:o.hideRequiredAsterisk),(o==null?void 0:o.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:o==null?void 0:o.statusIcon}]),w=ee(()=>Ki(n.inlineMessage)?n.inlineMessage:(o==null?void 0:o.inlineMessage)||!1),x=ee(()=>[l.e("error"),{[l.em("error","inline")]:w.value}]),_=ee(()=>n.prop?an(n.prop)?n.prop:n.prop.join("."):""),E=ee(()=>!(!n.label&&!r.label)),C=ee(()=>n.for||(u.value.length===1?u.value[0]:void 0)),T=ee(()=>!C.value&&E.value),k=!!i,I=ee(()=>{const $=o==null?void 0:o.model;if($&&n.prop)return Pb($,n.prop).value}),O=ee(()=>{const{required:$}=n,W=[];n.rules&&W.push(...Iw(n.rules));const K=o==null?void 0:o.rules;if(K&&n.prop){const X=Pb(K,n.prop).value;X&&W.push(...Iw(X))}if($!==void 0){const X=W.map((te,ne)=>[te,ne]).filter(([te])=>Object.keys(te).includes("required"));if(X.length>0)for(const[te,ne]of X)te.required!==$&&(W[ne]={...te,required:$});else W.push({required:$})}return W}),F=ee(()=>O.value.length>0),N=ee(()=>O.value.some($=>$.required)),B=ee(()=>{var $;return d.value==="error"&&n.showMessage&&(($=o==null?void 0:o.showMessage)==null||$)}),L=ee(()=>`${n.label||""}${(o==null?void 0:o.labelSuffix)||""}`),V=$=>{c.value=$},P=async $=>{const W=_.value;return new Xb({[W]:$}).validate({[W]:I.value},{firstFields:!0}).then(()=>(V("success"),o==null||o.emit("validate",n.prop,!0,""),!0)).catch(K=>((X=>{var te,ne;const{errors:se,fields:le}=X;se&&le||console.error(X),V("error"),f.value=se?(ne=(te=se==null?void 0:se[0])==null?void 0:te.message)!=null?ne:`${n.prop} is required`:"",o==null||o.emit("validate",n.prop,!1,f.value)})(K),Promise.reject(K)))},H=async($,W)=>{if(v||!n.prop)return!1;const K=Ut(W);if(!F.value)return W==null||W(!1),!1;const X=(te=>O.value.filter(ne=>!ne.trigger||!te||(Array.isArray(ne.trigger)?ne.trigger.includes(te):ne.trigger===te)).map(({trigger:ne,...se})=>se))($);return X.length===0?(W==null||W(!0),!0):(V("validating"),P(X).then(()=>(W==null||W(!0),!0)).catch(te=>{const{fields:ne}=te;return W==null||W(!1,ne),!K&&Promise.reject(ne)}))},U=()=>{V(""),f.value="",v=!1},G=async()=>{const $=o==null?void 0:o.model;if(!$||!n.prop)return;const W=Pb($,n.prop);v=!0,W.value=doe(m),await St(),U(),v=!1};Je(()=>n.error,$=>{f.value=$||"",V($?"error":"")},{immediate:!0}),Je(()=>n.validateStatus,$=>V($||""));const z=Qn({...di(n),$el:p,size:a,validateState:c,labelId:s,inputIds:u,isGroup:T,hasLabel:E,fieldValue:I,addInputId:$=>{u.value.includes($)||u.value.push($)},removeInputId:$=>{u.value=u.value.filter(W=>W!==$)},resetField:G,clearValidate:U,validate:H});return qn(Fc,z),yn(()=>{n.prop&&(o==null||o.addField(z),m=doe(I.value))}),xo(()=>{o==null||o.removeField(z)}),t({size:a,validateMessage:f,validateState:c,validate:H,clearValidate:U,resetField:G}),($,W)=>{var K;return Y(),fe("div",{ref_key:"formItemRef",ref:p,class:oe(M(y)),role:M(T)?"group":void 0,"aria-labelledby":M(T)?M(s):void 0},[ie(M(cBe),{"is-auto-width":M(g).width==="auto","update-all":((K=M(o))==null?void 0:K.labelWidth)==="auto"},{default:he(()=>[M(E)?(Y(),Pe(Hn(M(C)?"label":"div"),{key:0,id:M(s),for:M(C),class:oe(M(l).e("label")),style:$t(M(g))},{default:he(()=>[ft($.$slots,"label",{label:M(L)},()=>[Dt(Ye(M(L)),1)])]),_:3},8,["id","for","class","style"])):Fe("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),ce("div",{class:oe(M(l).e("content")),style:$t(M(b))},[ft($.$slots,"default"),ie(S3,{name:`${M(l).namespace.value}-zoom-in-top`},{default:he(()=>[M(B)?ft($.$slots,"error",{key:0,error:f.value},()=>[ce("div",{class:oe(M(x))},Ye(f.value),3)]):Fe("v-if",!0)]),_:3},8,["name"])],6)],10,dBe)}}});var Gie=Nt(pBe,[["__file","form-item.vue"]]);_O=Cr(rBe,{FormItem:Gie}),IDe=Ya(Gie);let Bu;const hBe=` |
|
18 |
height:0 !important; |
|
19 |
visibility:hidden !important; |
|
20 |
${FQ()?"":"overflow:hidden !important;"} |
|
21 |
position:absolute !important; |
|
22 |
z-index:-1000 !important; |
|
23 |
top:0 !important; |
|
24 |
right:0 !important; |
|
25 |
`,vBe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function qie(e,t=1,n){var r;Bu||(Bu=document.createElement("textarea"),document.body.appendChild(Bu));const{paddingSize:o,borderSize:i,boxSizing:a,contextStyle:l}=function(d){const f=window.getComputedStyle(d),p=f.getPropertyValue("box-sizing"),m=Number.parseFloat(f.getPropertyValue("padding-bottom"))+Number.parseFloat(f.getPropertyValue("padding-top")),v=Number.parseFloat(f.getPropertyValue("border-bottom-width"))+Number.parseFloat(f.getPropertyValue("border-top-width"));return{contextStyle:vBe.map(b=>`${b}:${f.getPropertyValue(b)}`).join(";"),paddingSize:m,borderSize:v,boxSizing:p}}(e);Bu.setAttribute("style",`${l};${hBe}`),Bu.value=e.value||e.placeholder||"";let s=Bu.scrollHeight;const u={};a==="border-box"?s+=i:a==="content-box"&&(s-=o),Bu.value="";const c=Bu.scrollHeight-o;if(Kn(t)){let d=c*t;a==="border-box"&&(d=d+o+i),s=Math.max(d,s),u.minHeight=`${d}px`}if(Kn(n)){let d=c*n;a==="border-box"&&(d=d+o+i),s=Math.min(d,s)}return u.height=`${s}px`,(r=Bu.parentNode)==null||r.removeChild(Bu),Bu=void 0,u}const mBe=Lt({id:{type:String,default:void 0},size:da,disabled:Boolean,modelValue:{type:[String,Number,Object],default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:fi},prefixIcon:{type:fi},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Object,Array,String],default:()=>({})},autofocus:{type:Boolean,default:!1}}),gBe={[xn]:e=>an(e),input:e=>an(e),change:e=>an(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},yBe=["role"],bBe=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],ABe=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],wBe=Te({name:"ElInput",inheritAttrs:!1}),xBe=Te({...wBe,props:mBe,emits:gBe,setup(e,{expose:t,emit:n}){const r=e,o=yc(),i=Ga(),a=ee(()=>{const ge={};return r.containerRole==="combobox"&&(ge["aria-haspopup"]=o["aria-haspopup"],ge["aria-owns"]=o["aria-owns"],ge["aria-expanded"]=o["aria-expanded"]),ge}),l=ee(()=>[r.type==="textarea"?g.b():v.b(),v.m(p.value),v.is("disabled",m.value),v.is("exceed",K.value),{[v.b("group")]:i.prepend||i.append,[v.bm("group","append")]:i.append,[v.bm("group","prepend")]:i.prepend,[v.m("prefix")]:i.prefix||r.prefixIcon,[v.m("suffix")]:i.suffix||r.suffixIcon||r.clearable||r.showPassword,[v.bm("suffix","password-clear")]:G.value&&z.value,[v.b("hidden")]:r.type==="hidden"},o.class]),s=ee(()=>[v.e("wrapper"),v.is("focus",I.value)]),u=GO({excludeKeys:ee(()=>Object.keys(a.value))}),{form:c,formItem:d}=qa(),{inputId:f}=Ac(r,{formItemContext:d}),p=$i(),m=wl(),v=_t("input"),g=_t("textarea"),b=Qo(),y=Qo(),w=de(!1),x=de(!1),_=de(!1),E=de(),C=Qo(r.inputStyle),T=ee(()=>b.value||y.value),{wrapperRef:k,isFocused:I,handleFocus:O,handleBlur:F}=Vw(T,{afterBlur(){var ge;r.validateEvent&&((ge=d==null?void 0:d.validate)==null||ge.call(d,"blur").catch(We=>{}))}}),N=ee(()=>{var ge;return(ge=c==null?void 0:c.statusIcon)!=null&&ge}),B=ee(()=>(d==null?void 0:d.validateState)||""),L=ee(()=>B.value&&zO[B.value]),V=ee(()=>_.value?$oe:Ioe),P=ee(()=>[o.style]),H=ee(()=>[r.inputStyle,C.value,{resize:r.resize}]),U=ee(()=>pa(r.modelValue)?"":String(r.modelValue)),G=ee(()=>r.clearable&&!m.value&&!r.readonly&&!!U.value&&(I.value||w.value)),z=ee(()=>r.showPassword&&!m.value&&!r.readonly&&!!U.value&&(!!U.value||I.value)),$=ee(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!m.value&&!r.readonly&&!r.showPassword),W=ee(()=>U.value.length),K=ee(()=>!!$.value&&W.value>Number(r.maxlength)),X=ee(()=>!!i.suffix||!!r.suffixIcon||G.value||r.showPassword||$.value||!!B.value&&N.value),[te,ne]=function(ge){const We=de();return[function(){if(ge.value==null)return;const{selectionStart:st,selectionEnd:At,value:Ve}=ge.value;if(st==null||At==null)return;const it=Ve.slice(0,Math.max(0,st)),dt=Ve.slice(Math.max(0,At));We.value={selectionStart:st,selectionEnd:At,value:Ve,beforeTxt:it,afterTxt:dt}},function(){if(ge.value==null||We.value==null)return;const{value:st}=ge.value,{beforeTxt:At,afterTxt:Ve,selectionStart:it}=We.value;if(At==null||Ve==null||it==null)return;let dt=st.length;if(st.endsWith(Ve))dt=st.length-Ve.length;else if(st.startsWith(At))dt=At.length;else{const ot=At[it-1],je=st.indexOf(ot,it-1);je!==-1&&(dt=je+1)}ge.value.setSelectionRange(dt,dt)}]}(b);fa(y,ge=>{if(le(),!$.value||r.resize!=="both")return;const We=ge[0],{width:st}=We.contentRect;E.value={right:`calc(100% - ${st+15+6}px)`}});const se=()=>{const{type:ge,autosize:We}=r;if(rr&&ge==="textarea"&&y.value)if(We){const st=wn(We)?We.minRows:void 0,At=wn(We)?We.maxRows:void 0,Ve=qie(y.value,st,At);C.value={overflowY:"hidden",...Ve},St(()=>{y.value.offsetHeight,C.value=Ve})}else C.value={minHeight:qie(y.value).minHeight}},le=(ge=>{let We=!1;return()=>{var st;We||!r.autosize||((st=y.value)==null?void 0:st.offsetParent)===null||(ge(),We=!0)}})(se),J=()=>{const ge=T.value,We=r.formatter?r.formatter(U.value):U.value;ge&&ge.value!==We&&(ge.value=We)},Z=async ge=>{te();let{value:We}=ge.target;r.formatter&&(We=r.parser?r.parser(We):We),x.value||(We!==U.value?(n(xn,We),n("input",We),await St(),J(),ne()):J())},ye=ge=>{n("change",ge.target.value)},be=ge=>{n("compositionstart",ge),x.value=!0},ve=ge=>{var We;n("compositionupdate",ge);const st=(We=ge.target)==null?void 0:We.value,At=st[st.length-1]||"";x.value=!g9(At)},Ae=ge=>{n("compositionend",ge),x.value&&(x.value=!1,Z(ge))},Ce=()=>{_.value=!_.value,_e()},_e=async()=>{var ge;await St(),(ge=T.value)==null||ge.focus()},ke=ge=>{w.value=!1,n("mouseleave",ge)},Be=ge=>{w.value=!0,n("mouseenter",ge)},$e=ge=>{n("keydown",ge)},rt=()=>{n(xn,""),n("change",""),n("clear"),n("input","")};return Je(()=>r.modelValue,()=>{var ge;St(()=>se()),r.validateEvent&&((ge=d==null?void 0:d.validate)==null||ge.call(d,"change").catch(We=>{}))}),Je(U,()=>J()),Je(()=>r.type,async()=>{await St(),J(),se()}),yn(()=>{!r.formatter&&r.parser,J(),St(se)}),t({input:b,textarea:y,ref:T,textareaStyle:H,autosize:dr(r,"autosize"),focus:_e,blur:()=>{var ge;return(ge=T.value)==null?void 0:ge.blur()},select:()=>{var ge;(ge=T.value)==null||ge.select()},clear:rt,resizeTextarea:se}),(ge,We)=>(Y(),fe("div",Un(M(a),{class:M(l),style:M(P),role:ge.containerRole,onMouseenter:Be,onMouseleave:ke}),[Fe(" input "),ge.type!=="textarea"?(Y(),fe(bt,{key:0},[Fe(" prepend slot "),ge.$slots.prepend?(Y(),fe("div",{key:0,class:oe(M(v).be("group","prepend"))},[ft(ge.$slots,"prepend")],2)):Fe("v-if",!0),ce("div",{ref_key:"wrapperRef",ref:k,class:oe(M(s))},[Fe(" prefix slot "),ge.$slots.prefix||ge.prefixIcon?(Y(),fe("span",{key:0,class:oe(M(v).e("prefix"))},[ce("span",{class:oe(M(v).e("prefix-inner"))},[ft(ge.$slots,"prefix"),ge.prefixIcon?(Y(),Pe(M(Ft),{key:0,class:oe(M(v).e("icon"))},{default:he(()=>[(Y(),Pe(Hn(ge.prefixIcon)))]),_:1},8,["class"])):Fe("v-if",!0)],2)],2)):Fe("v-if",!0),ce("input",Un({id:M(f),ref_key:"input",ref:b,class:M(v).e("inner")},M(u),{minlength:ge.minlength,maxlength:ge.maxlength,type:ge.showPassword?_.value?"text":"password":ge.type,disabled:M(m),readonly:ge.readonly,autocomplete:ge.autocomplete,tabindex:ge.tabindex,"aria-label":ge.label,placeholder:ge.placeholder,style:ge.inputStyle,form:ge.form,autofocus:ge.autofocus,onCompositionstart:be,onCompositionupdate:ve,onCompositionend:Ae,onInput:Z,onFocus:We[0]||(We[0]=(...st)=>M(O)&&M(O)(...st)),onBlur:We[1]||(We[1]=(...st)=>M(F)&&M(F)(...st)),onChange:ye,onKeydown:$e}),null,16,bBe),Fe(" suffix slot "),M(X)?(Y(),fe("span",{key:1,class:oe(M(v).e("suffix"))},[ce("span",{class:oe(M(v).e("suffix-inner"))},[M(G)&&M(z)&&M($)?Fe("v-if",!0):(Y(),fe(bt,{key:0},[ft(ge.$slots,"suffix"),ge.suffixIcon?(Y(),Pe(M(Ft),{key:0,class:oe(M(v).e("icon"))},{default:he(()=>[(Y(),Pe(Hn(ge.suffixIcon)))]),_:1},8,["class"])):Fe("v-if",!0)],64)),M(G)?(Y(),Pe(M(Ft),{key:1,class:oe([M(v).e("icon"),M(v).e("clear")]),onMousedown:Gt(M(fr),["prevent"]),onClick:rt},{default:he(()=>[ie(M(h0))]),_:1},8,["class","onMousedown"])):Fe("v-if",!0),M(z)?(Y(),Pe(M(Ft),{key:2,class:oe([M(v).e("icon"),M(v).e("password")]),onClick:Ce},{default:he(()=>[(Y(),Pe(Hn(M(V))))]),_:1},8,["class"])):Fe("v-if",!0),M($)?(Y(),fe("span",{key:3,class:oe(M(v).e("count"))},[ce("span",{class:oe(M(v).e("count-inner"))},Ye(M(W))+" / "+Ye(ge.maxlength),3)],2)):Fe("v-if",!0),M(B)&&M(L)&&M(N)?(Y(),Pe(M(Ft),{key:4,class:oe([M(v).e("icon"),M(v).e("validateIcon"),M(v).is("loading",M(B)==="validating")])},{default:he(()=>[(Y(),Pe(Hn(M(L))))]),_:1},8,["class"])):Fe("v-if",!0)],2)],2)):Fe("v-if",!0)],2),Fe(" append slot "),ge.$slots.append?(Y(),fe("div",{key:1,class:oe(M(v).be("group","append"))},[ft(ge.$slots,"append")],2)):Fe("v-if",!0)],64)):(Y(),fe(bt,{key:1},[Fe(" textarea "),ce("textarea",Un({id:M(f),ref_key:"textarea",ref:y,class:M(g).e("inner")},M(u),{minlength:ge.minlength,maxlength:ge.maxlength,tabindex:ge.tabindex,disabled:M(m),readonly:ge.readonly,autocomplete:ge.autocomplete,style:M(H),"aria-label":ge.label,placeholder:ge.placeholder,form:ge.form,autofocus:ge.autofocus,onCompositionstart:be,onCompositionupdate:ve,onCompositionend:Ae,onInput:Z,onFocus:We[2]||(We[2]=(...st)=>M(O)&&M(O)(...st)),onBlur:We[3]||(We[3]=(...st)=>M(F)&&M(F)(...st)),onChange:ye,onKeydown:$e}),null,16,ABe),M($)?(Y(),fe("span",{key:0,style:$t(E.value),class:oe(M(v).e("count"))},Ye(M(W))+" / "+Ye(ge.maxlength),7)):Fe("v-if",!0)],64))],16,yBe))}});let k9,Kie,Yie;ua=Cr(Nt(xBe,[["__file","input.vue"]])),zQ={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},k9=Symbol("scrollbarContextKey"),Kie=Lt({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Yie=Te({__name:"thumb",props:Kie,setup(e){const t=e,n=Rt(k9),r=_t("scrollbar");n||Ka("Thumb","can not inject scrollbar context");const o=de(),i=de(),a=de({}),l=de(!1);let s=!1,u=!1,c=rr?document.onselectstart:null;const d=ee(()=>zQ[t.vertical?"vertical":"horizontal"]),f=ee(()=>(({move:x,size:_,bar:E})=>({[E.size]:_,transform:`translate${E.axis}(${x}%)`}))({size:t.size,move:t.move,bar:d.value})),p=ee(()=>o.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/t.ratio/i.value[d.value.offset]),m=x=>{var _;if(x.stopPropagation(),x.ctrlKey||[1,2].includes(x.button))return;(_=window.getSelection())==null||_.removeAllRanges(),g(x);const E=x.currentTarget;E&&(a.value[d.value.axis]=E[d.value.offset]-(x[d.value.client]-E.getBoundingClientRect()[d.value.direction]))},v=x=>{if(!i.value||!o.value||!n.wrapElement)return;const _=100*(Math.abs(x.target.getBoundingClientRect()[d.value.direction]-x[d.value.client])-i.value[d.value.offset]/2)*p.value/o.value[d.value.offset];n.wrapElement[d.value.scroll]=_*n.wrapElement[d.value.scrollSize]/100},g=x=>{x.stopImmediatePropagation(),s=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",y),c=document.onselectstart,document.onselectstart=()=>!1},b=x=>{if(!o.value||!i.value||s===!1)return;const _=a.value[d.value.axis];if(!_)return;const E=100*(-1*(o.value.getBoundingClientRect()[d.value.direction]-x[d.value.client])-(i.value[d.value.offset]-_))*p.value/o.value[d.value.offset];n.wrapElement[d.value.scroll]=E*n.wrapElement[d.value.scrollSize]/100},y=()=>{s=!1,a.value[d.value.axis]=0,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",y),w(),u&&(l.value=!1)};xo(()=>{w(),document.removeEventListener("mouseup",y)});const w=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return Yo(dr(n,"scrollbarElement"),"mousemove",()=>{u=!1,l.value=!!t.size}),Yo(dr(n,"scrollbarElement"),"mouseleave",()=>{u=!0,l.value=s}),(x,_)=>(Y(),Pe(ca,{name:M(r).b("fade"),persisted:""},{default:he(()=>[nn(ce("div",{ref_key:"instance",ref:o,class:oe([M(r).e("bar"),M(r).is(M(d).key)]),onMousedown:v},[ce("div",{ref_key:"thumb",ref:i,class:oe(M(r).e("thumb")),style:$t(M(f)),onMousedown:m},null,38)],34),[[$n,x.always||l.value]])]),_:1},8,["name"]))}});var Xie=Nt(Yie,[["__file","thumb.vue"]]),_Be=Nt(Te({__name:"bar",props:Lt({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),setup(e,{expose:t}){const n=e,r=Rt(k9),o=de(0),i=de(0),a=de(""),l=de(""),s=de(1),u=de(1);return t({handleScroll:c=>{if(c){const d=c.offsetHeight-4,f=c.offsetWidth-4;i.value=100*c.scrollTop/d*s.value,o.value=100*c.scrollLeft/f*u.value}},update:()=>{const c=r==null?void 0:r.wrapElement;if(!c)return;const d=c.offsetHeight-4,f=c.offsetWidth-4,p=d**2/c.scrollHeight,m=f**2/c.scrollWidth,v=Math.max(p,n.minSize),g=Math.max(m,n.minSize);s.value=p/(d-p)/(v/(d-v)),u.value=m/(f-m)/(g/(f-g)),l.value=v+4<d?`${v}px`:"",a.value=g+4<f?`${g}px`:""}}),(c,d)=>(Y(),fe(bt,null,[ie(Xie,{move:o.value,ratio:u.value,size:a.value,always:c.always},null,8,["move","ratio","size","always"]),ie(Xie,{move:i.value,ratio:s.value,size:l.value,vertical:"",always:c.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const EBe=Lt({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:[String,Object,Array],default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical"]}}),CBe={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Kn)},SBe=Te({name:"ElScrollbar"}),kBe=Te({...SBe,props:EBe,emits:CBe,setup(e,{expose:t,emit:n}){const r=e,o=_t("scrollbar");let i,a;const l=de(),s=de(),u=de(),c=de(),d=ee(()=>{const g={};return r.height&&(g.height=ka(r.height)),r.maxHeight&&(g.maxHeight=ka(r.maxHeight)),[r.wrapStyle,g]}),f=ee(()=>[r.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!r.native}]),p=ee(()=>[o.e("view"),r.viewClass]),m=()=>{var g;s.value&&((g=c.value)==null||g.handleScroll(s.value),n("scroll",{scrollTop:s.value.scrollTop,scrollLeft:s.value.scrollLeft}))},v=()=>{var g;(g=c.value)==null||g.update()};return Je(()=>r.noresize,g=>{g?(i==null||i(),a==null||a()):({stop:i}=fa(u,v),a=Yo("resize",v))},{immediate:!0}),Je(()=>[r.maxHeight,r.height],()=>{r.native||St(()=>{var g;v(),s.value&&((g=c.value)==null||g.handleScroll(s.value))})}),qn(k9,Qn({scrollbarElement:l,wrapElement:s})),yn(()=>{r.native||St(()=>{v()})}),zs(()=>v()),t({wrapRef:s,update:v,scrollTo:function(g,b){wn(g)?s.value.scrollTo(g):Kn(g)&&Kn(b)&&s.value.scrollTo(g,b)},setScrollTop:g=>{Kn(g)&&(s.value.scrollTop=g)},setScrollLeft:g=>{Kn(g)&&(s.value.scrollLeft=g)},handleScroll:m}),(g,b)=>(Y(),fe("div",{ref_key:"scrollbarRef",ref:l,class:oe(M(o).b())},[ce("div",{ref_key:"wrapRef",ref:s,class:oe(M(f)),style:$t(M(d)),onScroll:m},[(Y(),Pe(Hn(g.tag),{id:g.id,ref_key:"resizeRef",ref:u,class:oe(M(p)),style:$t(g.viewStyle),role:g.role,"aria-label":g.ariaLabel,"aria-orientation":g.ariaOrientation},{default:he(()=>[ft(g.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),g.native?Fe("v-if",!0):(Y(),Pe(_Be,{key:0,ref_key:"barRef",ref:c,always:g.always,"min-size":g.minSize},null,8,["always","min-size"]))],2))}});let D9,wF,xF,Qie;wd=Cr(Nt(kBe,[["__file","scrollbar.vue"]])),D9=Symbol("popper"),wF=Symbol("popperContent"),xF=Lt({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),Qie=Te({name:"ElPopper",inheritAttrs:!1});var DBe=Nt(Te({...Qie,props:xF,setup(e,{expose:t}){const n=e,r={triggerRef:de(),popperInstanceRef:de(),contentRef:de(),referenceRef:de(),role:ee(()=>n.role)};return t(r),qn(D9,r),(o,i)=>ft(o.$slots,"default")}}),[["__file","popper.vue"]]);const Jie=Lt({arrowOffset:{type:Number,default:5}}),OBe=Te({name:"ElPopperArrow",inheritAttrs:!1}),TBe=Te({...OBe,props:Jie,setup(e,{expose:t}){const n=e,r=_t("popper"),{arrowOffset:o,arrowRef:i,arrowStyle:a}=Rt(wF,void 0);return Je(()=>n.arrowOffset,l=>{o.value=l}),xo(()=>{i.value=void 0}),t({arrowRef:i}),(l,s)=>(Y(),fe("span",{ref_key:"arrowRef",ref:i,class:oe(M(r).e("arrow")),style:$t(M(a)),"data-popper-arrow":""},null,6))}});var MBe=Nt(TBe,[["__file","arrow.vue"]]);MQ=Te({name:"ElOnlyChild",setup(e,{slots:t,attrs:n}){var r;const o=Rt(_ie),i=(a=(r=o==null?void 0:o.setForwardRef)!=null?r:fr,{mounted(l){a(l)},updated(l){a(l)},unmounted(){a(null)}});var a;return()=>{var l;const s=(l=t.default)==null?void 0:l.call(t,n);if(!s||s.length>1)return null;const u=Zie(s);return u?nn(Tu(u,n),[[i]]):null}}});function Zie(e){if(!e)return null;const t=e;for(const n of t){if(wn(n))switch(n.type){case hi:continue;case Dc:case"svg":return eae(n);case bt:return Zie(n.children);default:return n}return eae(n)}return null}function eae(e){const t=_t("only-child");return ie("span",{class:t.e("content")},[e])}const tae=Lt({virtualRef:{type:Object},virtualTriggering:Boolean,onMouseenter:{type:Function},onMouseleave:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onContextmenu:{type:Function},id:String,open:Boolean}),NBe=Te({name:"ElPopperTrigger",inheritAttrs:!1}),FBe=Te({...NBe,props:tae,setup(e,{expose:t}){const n=e,{role:r,triggerRef:o}=Rt(D9,void 0);var i;i=o,qn(_ie,{setForwardRef:d=>{i.value=d}});const a=ee(()=>s.value?n.id:void 0),l=ee(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),s=ee(()=>{if(r&&r.value!=="tooltip")return r.value}),u=ee(()=>s.value?`${n.open}`:void 0);let c;return yn(()=>{Je(()=>n.virtualRef,d=>{d&&(o.value=Oc(d))},{immediate:!0}),Je(o,(d,f)=>{c==null||c(),c=void 0,$s(d)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(p=>{var m;const v=n[p];v&&(d.addEventListener(p.slice(2).toLowerCase(),v),(m=f==null?void 0:f.removeEventListener)==null||m.call(f,p.slice(2).toLowerCase(),v))}),c=Je([a,l,s,u],p=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((m,v)=>{pa(p[v])?d.removeAttribute(m):d.setAttribute(m,p[v])})},{immediate:!0})),$s(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(p=>f.removeAttribute(p))},{immediate:!0})}),xo(()=>{c==null||c(),c=void 0}),t({triggerRef:o}),(d,f)=>d.virtualTriggering?Fe("v-if",!0):(Y(),Pe(M(MQ),Un({key:0},d.$attrs,{"aria-controls":M(a),"aria-describedby":M(l),"aria-expanded":M(u),"aria-haspopup":M(s)}),{default:he(()=>[ft(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var RBe=Nt(FBe,[["__file","trigger.vue"]]);let O9,T9,_F,nae,EF,CF,M9,Qb,N9;O9="focus-trap.focus-after-trapped",T9="focus-trap.focus-after-released",_F={cancelable:!0,bubbles:!1},nae={cancelable:!0,bubbles:!1},EF="focusAfterTrapped",CF="focusAfterReleased",OO=Symbol("elFocusTrap"),M9=de(),Qb=de(0),N9=de(0);let F9=0;const rae=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},oae=(e,t)=>{for(const n of e)if(!IBe(n,t))return n},IBe=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},rp=(e,t)=>{if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),N9.value=window.performance.now(),e!==n&&(r=>r instanceof HTMLInputElement&&"select"in r)(e)&&t&&e.select()}};function iae(e,t){const n=[...e],r=e.indexOf(t);return r!==-1&&n.splice(r,1),n}const aae=(()=>{let e=[];return{push:t=>{const n=e[0];n&&t!==n&&n.pause(),e=iae(e,t),e.unshift(t)},remove:t=>{var n,r;e=iae(e,t),(r=(n=e[0])==null?void 0:n.resume)==null||r.call(n)}}})(),R9=()=>{M9.value="pointer",Qb.value=window.performance.now()},lae=()=>{M9.value="keyboard",Qb.value=window.performance.now()},BBe=()=>(yn(()=>{F9===0&&(document.addEventListener("mousedown",R9),document.addEventListener("touchstart",R9),document.addEventListener("keydown",lae)),F9++}),xo(()=>{F9--,F9<=0&&(document.removeEventListener("mousedown",R9),document.removeEventListener("touchstart",R9),document.removeEventListener("keydown",lae))}),{focusReason:M9,lastUserFocusTimestamp:Qb,lastAutomatedFocusTimestamp:N9}),I9=e=>new CustomEvent("focus-trap.focusout-prevented",{...nae,detail:e}),LBe=Te({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[EF,CF,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=de();let r,o;const{focusReason:i}=BBe();var a;a=v=>{e.trapped&&!l.paused&&t("release-requested",v)},yn(()=>{lg.length===0&&document.addEventListener("keydown",Aie),rr&&lg.push(a)}),xo(()=>{lg=lg.filter(v=>v!==a),lg.length===0&&rr&&document.removeEventListener("keydown",Aie)});const l={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=v=>{if(!e.loop&&!e.trapped||l.paused)return;const{key:g,altKey:b,ctrlKey:y,metaKey:w,currentTarget:x,shiftKey:_}=v,{loop:E}=e,C=g===Xt.tab&&!b&&!y&&!w,T=document.activeElement;if(C&&T){const k=x,[I,O]=(F=>{const N=rae(F);return[oae(N,F),oae(N.reverse(),F)]})(k);if(I&&O)if(_||T!==O){if(_&&[I,k].includes(T)){const F=I9({focusReason:i.value});t("focusout-prevented",F),F.defaultPrevented||(v.preventDefault(),E&&rp(O,!0))}}else{const F=I9({focusReason:i.value});t("focusout-prevented",F),F.defaultPrevented||(v.preventDefault(),E&&rp(I,!0))}else if(T===k){const F=I9({focusReason:i.value});t("focusout-prevented",F),F.defaultPrevented||v.preventDefault()}}};qn(OO,{focusTrapRef:n,onKeydown:s}),Je(()=>e.focusTrapEl,v=>{v&&(n.value=v)},{immediate:!0}),Je([n],([v],[g])=>{v&&(v.addEventListener("keydown",s),v.addEventListener("focusin",d),v.addEventListener("focusout",f)),g&&(g.removeEventListener("keydown",s),g.removeEventListener("focusin",d),g.removeEventListener("focusout",f))});const u=v=>{t(EF,v)},c=v=>t(CF,v),d=v=>{const g=M(n);if(!g)return;const b=v.target,y=v.relatedTarget,w=b&&g.contains(b);e.trapped||y&&g.contains(y)||(r=y),w&&t("focusin",v),l.paused||e.trapped&&(w?o=b:rp(o,!0))},f=v=>{const g=M(n);if(!l.paused&&g)if(e.trapped){const b=v.relatedTarget;pa(b)||g.contains(b)||setTimeout(()=>{if(!l.paused&&e.trapped){const y=I9({focusReason:i.value});t("focusout-prevented",y),y.defaultPrevented||rp(o,!0)}},0)}else{const b=v.target;b&&g.contains(b)||t("focusout",v)}};async function p(){await St();const v=M(n);if(v){aae.push(l);const g=v.contains(document.activeElement)?r:document.activeElement;if(r=g,!v.contains(g)){const b=new Event(O9,_F);v.addEventListener(O9,u),v.dispatchEvent(b),b.defaultPrevented||St(()=>{let y=e.focusStartEl;an(y)||(rp(y),document.activeElement!==y&&(y="first")),y==="first"&&((w,x=!1)=>{const _=document.activeElement;for(const E of w)if(rp(E,x),document.activeElement!==_)return})(rae(v),!0),document.activeElement!==g&&y!=="container"||rp(v)})}}}function m(){const v=M(n);if(v){v.removeEventListener(O9,u);const g=new CustomEvent(T9,{..._F,detail:{focusReason:i.value}});v.addEventListener(T9,c),v.dispatchEvent(g),g.defaultPrevented||i.value!="keyboard"&&Qb.value>N9.value&&!v.contains(document.activeElement)||rp(r??document.body),v.removeEventListener(T9,c),aae.remove(l)}}return yn(()=>{e.trapped&&p(),Je(()=>e.trapped,v=>{v?p():m()})}),xo(()=>{e.trapped&&m()}),{onKeydown:s}}});$w=Nt(LBe,[["render",function(e,t,n,r,o,i){return ft(e.$slots,"default",{handleKeydown:e.onKeydown})}],["__file","focus-trap.vue"]]);const PBe=Lt({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Array,default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:v0,default:"bottom"},popperOptions:{type:Object,default:()=>({})},strategy:{type:String,values:["fixed","absolute"],default:"absolute"}}),sae=Lt({...PBe,id:String,style:{type:[String,Array,Object]},className:{type:[String,Array,Object]},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:[String,Array,Object]},popperStyle:{type:[String,Array,Object]},referenceEl:{type:Object},triggerTargetEl:{type:Object},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),jBe={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},VBe=(e,t=[])=>{const{placement:n,strategy:r,popperOptions:o}=e,i={placement:n,strategy:r,...o,modifiers:[...zBe(e),...t]};return function(a,l){l&&(a.modifiers=[...a.modifiers,...l??[]])}(i,o==null?void 0:o.modifiers),i};function zBe(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:r}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}const HBe=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:r,role:o}=Rt(D9,void 0),i=de(),a=de(),l=ee(()=>({name:"eventListeners",enabled:!!e.visible})),s=ee(()=>{var b;const y=M(i),w=(b=M(a))!=null?b:0;return{name:"arrow",enabled:!Soe(y),options:{element:y,padding:w}}}),u=ee(()=>({onFirstUpdate:()=>{m()},...VBe(e,[M(s),M(l)])})),c=ee(()=>(b=>{if(rr)return Oc(b)})(e.referenceEl)||M(r)),{attributes:d,state:f,styles:p,update:m,forceUpdate:v,instanceRef:g}=UIe(c,n,u);return Je(g,b=>t.value=b),yn(()=>{Je(()=>{var b;return(b=M(c))==null?void 0:b.getBoundingClientRect()},()=>{m()})}),{attributes:d,arrowRef:i,contentRef:n,instanceRef:g,state:f,styles:p,role:o,forceUpdate:v,update:m}},$Be=Te({name:"ElPopperContent"}),UBe=Te({...$Be,props:sae,emits:jBe,setup(e,{expose:t,emit:n}){const r=e,{focusStartRef:o,trapped:i,onFocusAfterReleased:a,onFocusAfterTrapped:l,onFocusInTrap:s,onFocusoutPrevented:u,onReleaseRequested:c}=((N,B)=>{const L=de(!1),V=de();return{focusStartRef:V,trapped:L,onFocusAfterReleased:P=>{var H;((H=P.detail)==null?void 0:H.focusReason)!=="pointer"&&(V.value="first",B("blur"))},onFocusAfterTrapped:()=>{B("focus")},onFocusInTrap:P=>{N.visible&&!L.value&&(P.target&&(V.value=P.target),L.value=!0)},onFocusoutPrevented:P=>{N.trapping||(P.detail.focusReason==="pointer"&&P.preventDefault(),L.value=!1)},onReleaseRequested:()=>{L.value=!1,B("close")}}})(r,n),{attributes:d,arrowRef:f,contentRef:p,styles:m,instanceRef:v,role:g,update:b}=HBe(r),{ariaModal:y,arrowStyle:w,contentAttrs:x,contentClass:_,contentStyle:E,updateZIndex:C}=((N,{attributes:B,styles:L,role:V})=>{const{nextZIndex:P}=E9(),H=_t("popper"),U=ee(()=>M(B).popper),G=de(Kn(N.zIndex)?N.zIndex:P()),z=ee(()=>[H.b(),H.is("pure",N.pure),H.is(N.effect),N.popperClass]),$=ee(()=>[{zIndex:M(G)},M(L).popper,N.popperStyle||{}]);return{ariaModal:ee(()=>V.value==="dialog"?"false":void 0),arrowStyle:ee(()=>M(L).arrow||{}),contentAttrs:U,contentClass:z,contentStyle:$,contentZIndex:G,updateZIndex:()=>{G.value=Kn(N.zIndex)?N.zIndex:P()}}})(r,{styles:m,attributes:d,role:g}),T=Rt(Fc,void 0),k=de();let I;qn(wF,{arrowStyle:w,arrowRef:f,arrowOffset:k}),T&&(T.addInputId||T.removeInputId)&&qn(Fc,{...T,addInputId:fr,removeInputId:fr});const O=(N=!0)=>{b(),N&&C()},F=()=>{O(!1),r.visible&&r.focusOnShow?i.value=!0:r.visible===!1&&(i.value=!1)};return yn(()=>{Je(()=>r.triggerTargetEl,(N,B)=>{I==null||I(),I=void 0;const L=M(N||p.value),V=M(B||p.value);$s(L)&&(I=Je([g,()=>r.ariaLabel,y,()=>r.id],P=>{["role","aria-label","aria-modal","id"].forEach((H,U)=>{pa(P[U])?L.removeAttribute(H):L.setAttribute(H,P[U])})},{immediate:!0})),V!==L&&$s(V)&&["role","aria-label","aria-modal","id"].forEach(P=>{V.removeAttribute(P)})},{immediate:!0}),Je(()=>r.visible,F,{immediate:!0})}),xo(()=>{I==null||I(),I=void 0}),t({popperContentRef:p,popperInstanceRef:v,updatePopper:O,contentStyle:E}),(N,B)=>(Y(),fe("div",Un({ref_key:"contentRef",ref:p},M(x),{style:M(E),class:M(_),tabindex:"-1",onMouseenter:B[0]||(B[0]=L=>N.$emit("mouseenter",L)),onMouseleave:B[1]||(B[1]=L=>N.$emit("mouseleave",L))}),[ie(M($w),{trapped:M(i),"trap-on-focus-in":!0,"focus-trap-el":M(p),"focus-start-el":M(o),onFocusAfterTrapped:M(l),onFocusAfterReleased:M(a),onFocusin:M(s),onFocusoutPrevented:M(u),onReleaseRequested:M(c)},{default:he(()=>[ft(N.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var WBe=Nt(UBe,[["__file","content.vue"]]);let uae,Jb,ug,cae,dae,fae,pae,hae,r1,vae,mae;uae=Cr(DBe),Jb=Symbol("elTooltip"),Ui=Lt({...GIe,...sae,appendTo:{type:[String,Object]},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Boolean,default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),ug=Lt({...tae,disabled:Boolean,trigger:{type:[String,Array],default:"hover"},triggerKeys:{type:Array,default:()=>[Xt.enter,Xt.space]}}),{useModelToggleProps:cae,useModelToggleEmits:dae,useModelToggle:fae}=QN("visible"),pae=Lt({...xF,...cae,...Ui,...ug,...Jie,showArrow:{type:Boolean,default:!0}}),hae=[...dae,"before-show","before-hide","show","hide","open","close"],r1=(e,t,n)=>r=>{((o,i)=>mt(o)?o.includes(i):o===i)(M(e),t)&&n(r)},vae=Te({name:"ElTooltipTrigger"}),mae=Te({...vae,props:ug,setup(e,{expose:t}){const n=e,r=_t("tooltip"),{controlled:o,id:i,open:a,onOpen:l,onClose:s,onToggle:u}=Rt(Jb,void 0),c=de(null),d=()=>{if(M(o)||n.disabled)return!0},f=dr(n,"trigger"),p=bc(d,r1(f,"hover",l)),m=bc(d,r1(f,"hover",s)),v=bc(d,r1(f,"click",x=>{x.button===0&&u(x)})),g=bc(d,r1(f,"focus",l)),b=bc(d,r1(f,"focus",s)),y=bc(d,r1(f,"contextmenu",x=>{x.preventDefault(),u(x)})),w=bc(d,x=>{const{code:_}=x;n.triggerKeys.includes(_)&&(x.preventDefault(),u(x))});return t({triggerRef:c}),(x,_)=>(Y(),Pe(M(RBe),{id:M(i),"virtual-ref":x.virtualRef,open:M(a),"virtual-triggering":x.virtualTriggering,class:oe(M(r).e("trigger")),onBlur:M(b),onClick:M(v),onContextmenu:M(y),onFocus:M(g),onMouseenter:M(p),onMouseleave:M(m),onKeydown:M(w)},{default:he(()=>[ft(x.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var GBe=Nt(mae,[["__file","trigger.vue"]]);const qBe=Te({name:"ElTooltipContent",inheritAttrs:!1}),KBe=Te({...qBe,props:Ui,setup(e,{expose:t}){const n=e,{selector:r}=xie(),o=_t("tooltip"),i=de(null),a=de(!1),{controlled:l,id:s,open:u,trigger:c,onClose:d,onOpen:f,onShow:p,onHide:m,onBeforeShow:v,onBeforeHide:g}=Rt(Jb,void 0),b=ee(()=>n.transition||`${o.namespace.value}-fade-in-linear`),y=ee(()=>n.persistent);xo(()=>{a.value=!0});const w=ee(()=>!!M(y)||M(u)),x=ee(()=>!n.disabled&&M(u)),_=ee(()=>n.appendTo||r.value),E=ee(()=>{var P;return(P=n.style)!=null?P:{}}),C=ee(()=>!M(u)),T=()=>{m()},k=()=>{if(M(l))return!0},I=bc(k,()=>{n.enterable&&M(c)==="hover"&&f()}),O=bc(k,()=>{M(c)==="hover"&&d()}),F=()=>{var P,H;(H=(P=i.value)==null?void 0:P.updatePopper)==null||H.call(P),v==null||v()},N=()=>{g==null||g()},B=()=>{p(),V=lN(ee(()=>{var P;return(P=i.value)==null?void 0:P.popperContentRef}),()=>{M(l)||M(c)!=="hover"&&d()})},L=()=>{n.virtualTriggering||d()};let V;return Je(()=>M(u),P=>{P||V==null||V()},{flush:"post"}),Je(()=>n.content,()=>{var P,H;(H=(P=i.value)==null?void 0:P.updatePopper)==null||H.call(P)}),t({contentRef:i}),(P,H)=>(Y(),Pe(D3,{disabled:!P.teleported,to:M(_)},[ie(ca,{name:M(b),onAfterLeave:T,onBeforeEnter:F,onAfterEnter:B,onBeforeLeave:N},{default:he(()=>[M(w)?nn((Y(),Pe(M(WBe),Un({key:0,id:M(s),ref_key:"contentRef",ref:i},P.$attrs,{"aria-label":P.ariaLabel,"aria-hidden":M(C),"boundaries-padding":P.boundariesPadding,"fallback-placements":P.fallbackPlacements,"gpu-acceleration":P.gpuAcceleration,offset:P.offset,placement:P.placement,"popper-options":P.popperOptions,strategy:P.strategy,effect:P.effect,enterable:P.enterable,pure:P.pure,"popper-class":P.popperClass,"popper-style":[P.popperStyle,M(E)],"reference-el":P.referenceEl,"trigger-target-el":P.triggerTargetEl,visible:M(x),"z-index":P.zIndex,onMouseenter:M(I),onMouseleave:M(O),onBlur:L,onClose:M(d)}),{default:he(()=>[a.value?Fe("v-if",!0):ft(P.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[$n,M(x)]]):Fe("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var YBe=Nt(KBe,[["__file","content.vue"]]);const XBe=["innerHTML"],QBe={key:1},JBe=Te({name:"ElTooltip"}),ZBe=Te({...JBe,props:pae,emits:hae,setup(e,{expose:t,emit:n}){const r=e;WIe();const o=Zl(),i=de(),a=de(),l=()=>{var g;const b=M(i);b&&((g=b.popperInstanceRef)==null||g.update())},s=de(!1),u=de(),{show:c,hide:d,hasUpdateHandler:f}=fae({indicator:s,toggleReason:u}),{onOpen:p,onClose:m}=(({showAfter:g,hideAfter:b,autoClose:y,open:w,close:x})=>{const{registerTimeout:_}=yie(),{registerTimeout:E,cancelTimeout:C}=yie();return{onOpen:T=>{_(()=>{w(T);const k=M(y);Kn(k)&&k>0&&E(()=>{x(T)},k)},M(g))},onClose:T=>{C(),_(()=>{x(T)},M(b))}}})({showAfter:dr(r,"showAfter"),hideAfter:dr(r,"hideAfter"),autoClose:dr(r,"autoClose"),open:c,close:d}),v=ee(()=>Ki(r.visible)&&!f.value);return qn(Jb,{controlled:v,id:o,open:xd(s),trigger:dr(r,"trigger"),onOpen:g=>{p(g)},onClose:g=>{m(g)},onToggle:g=>{M(s)?m(g):p(g)},onShow:()=>{n("show",u.value)},onHide:()=>{n("hide",u.value)},onBeforeShow:()=>{n("before-show",u.value)},onBeforeHide:()=>{n("before-hide",u.value)},updatePopper:l}),Je(()=>r.disabled,g=>{g&&s.value&&(s.value=!1)}),aM(()=>s.value&&d()),t({popperRef:i,contentRef:a,isFocusInsideContent:g=>{var b,y;const w=(y=(b=a.value)==null?void 0:b.contentRef)==null?void 0:y.popperContentRef,x=(g==null?void 0:g.relatedTarget)||document.activeElement;return w&&w.contains(x)},updatePopper:l,onOpen:p,onClose:m,hide:d}),(g,b)=>(Y(),Pe(M(uae),{ref_key:"popperRef",ref:i,role:g.role},{default:he(()=>[ie(GBe,{disabled:g.disabled,trigger:g.trigger,"trigger-keys":g.triggerKeys,"virtual-ref":g.virtualRef,"virtual-triggering":g.virtualTriggering},{default:he(()=>[g.$slots.default?ft(g.$slots,"default",{key:0}):Fe("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),ie(YBe,{ref_key:"contentRef",ref:a,"aria-label":g.ariaLabel,"boundaries-padding":g.boundariesPadding,content:g.content,disabled:g.disabled,effect:g.effect,enterable:g.enterable,"fallback-placements":g.fallbackPlacements,"hide-after":g.hideAfter,"gpu-acceleration":g.gpuAcceleration,offset:g.offset,persistent:g.persistent,"popper-class":g.popperClass,"popper-style":g.popperStyle,placement:g.placement,"popper-options":g.popperOptions,pure:g.pure,"raw-content":g.rawContent,"reference-el":g.referenceEl,"trigger-target-el":g.triggerTargetEl,"show-after":g.showAfter,strategy:g.strategy,teleported:g.teleported,transition:g.transition,"virtual-triggering":g.virtualTriggering,"z-index":g.zIndex,"append-to":g.appendTo},{default:he(()=>[ft(g.$slots,"content",{},()=>[g.rawContent?(Y(),fe("span",{key:0,innerHTML:g.content},null,8,XBe)):(Y(),fe("span",QBe,Ye(g.content),1))]),g.showArrow?(Y(),Pe(M(MBe),{key:0,"arrow-offset":g.arrowOffset},null,8,["arrow-offset"])):Fe("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});let gae,yae,bae,Aae,wae,SF,xae,_ae;Al=Cr(Nt(ZBe,[["__file","tooltip.vue"]])),gae=Lt({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:String,values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:[Function,Array],default:fr},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},label:{type:String},teleported:Ui.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String}),yae={[xn]:e=>an(e),[Tl]:e=>an(e),[Xo]:e=>an(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>wn(e)},bae=["aria-expanded","aria-owns"],Aae={key:0},wae=["id","aria-selected","onClick"],SF="ElAutocomplete",xae=Te({name:SF,inheritAttrs:!1}),_ae=Te({...xae,props:gae,emits:yae,setup(e,{expose:t,emit:n}){const r=e,o=GO(),i=yc(),a=wl(),l=_t("autocomplete"),s=de(),u=de(),c=de(),d=de();let f=!1,p=!1;const m=de([]),v=de(-1),g=de(""),b=de(!1),y=de(!1),w=de(!1),x=Zl(),_=ee(()=>i.style),E=ee(()=>(m.value.length>0||w.value)&&b.value),C=ee(()=>!r.hideLoading&&w.value),T=ee(()=>s.value?Array.from(s.value.$el.querySelectorAll("input")):[]),k=()=>{E.value&&(g.value=`${s.value.$el.offsetWidth}px`)},I=()=>{v.value=-1},O=ts(async W=>{if(y.value)return;const K=X=>{w.value=!1,y.value||(mt(X)?(m.value=X,v.value=r.highlightFirstItem?0:-1):Ka(SF,"autocomplete suggestions must be an array"))};if(w.value=!0,mt(r.fetchSuggestions))K(r.fetchSuggestions);else{const X=await r.fetchSuggestions(W,K);mt(X)&&K(X)}},r.debounce),F=W=>{const K=!!W;if(n(Tl,W),n(xn,W),y.value=!1,b.value||(b.value=K),!r.triggerOnFocus&&!W)return y.value=!0,void(m.value=[]);O(W)},N=W=>{var K;a.value||(((K=W.target)==null?void 0:K.tagName)!=="INPUT"||T.value.includes(document.activeElement))&&(b.value=!0)},B=W=>{n(Xo,W)},L=W=>{p?p=!1:(b.value=!0,n("focus",W),r.triggerOnFocus&&!f&&O(String(r.modelValue)))},V=W=>{setTimeout(()=>{var K;(K=c.value)!=null&&K.isFocusInsideContent()?p=!0:(b.value&&G(),n("blur",W))})},P=()=>{b.value=!1,n(xn,""),n("clear")},H=async()=>{E.value&&v.value>=0&&v.value<m.value.length?z(m.value[v.value]):r.selectWhenUnmatched&&(n("select",{value:r.modelValue}),m.value=[],v.value=-1)},U=W=>{E.value&&(W.preventDefault(),W.stopPropagation(),G())},G=()=>{b.value=!1},z=async W=>{n(Tl,W[r.valueKey]),n(xn,W[r.valueKey]),n("select",W),m.value=[],v.value=-1},$=W=>{if(!E.value||w.value)return;if(W<0)return void(v.value=-1);W>=m.value.length&&(W=m.value.length-1);const K=u.value.querySelector(`.${l.be("suggestion","wrap")}`),X=K.querySelectorAll(`.${l.be("suggestion","list")} li`)[W],te=K.scrollTop,{offsetTop:ne,scrollHeight:se}=X;ne+se>te+K.clientHeight&&(K.scrollTop+=se),ne<te&&(K.scrollTop-=se),v.value=W,s.value.ref.setAttribute("aria-activedescendant",`${x.value}-item-${v.value}`)};return lN(d,()=>{E.value&&G()}),yn(()=>{s.value.ref.setAttribute("role","textbox"),s.value.ref.setAttribute("aria-autocomplete","list"),s.value.ref.setAttribute("aria-controls","id"),s.value.ref.setAttribute("aria-activedescendant",`${x.value}-item-${v.value}`),f=s.value.ref.hasAttribute("readonly")}),t({highlightedIndex:v,activated:b,loading:w,inputRef:s,popperRef:c,suggestions:m,handleSelect:z,handleKeyEnter:H,focus:()=>{var W;(W=s.value)==null||W.focus()},blur:()=>{var W;(W=s.value)==null||W.blur()},close:G,highlight:$}),(W,K)=>(Y(),Pe(M(Al),{ref_key:"popperRef",ref:c,visible:M(E),placement:W.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[M(l).e("popper"),W.popperClass],teleported:W.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${M(l).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:k,onHide:I},{content:he(()=>[ce("div",{ref_key:"regionRef",ref:u,class:oe([M(l).b("suggestion"),M(l).is("loading",M(C))]),style:$t({[W.fitInputWidth?"width":"minWidth"]:g.value,outline:"none"}),role:"region"},[ie(M(wd),{id:M(x),tag:"ul","wrap-class":M(l).be("suggestion","wrap"),"view-class":M(l).be("suggestion","list"),role:"listbox"},{default:he(()=>[M(C)?(Y(),fe("li",Aae,[ft(W.$slots,"loading",{},()=>[ie(M(Ft),{class:oe(M(l).is("loading"))},{default:he(()=>[ie(M(jd))]),_:1},8,["class"])])])):(Y(!0),fe(bt,{key:1},bn(m.value,(X,te)=>(Y(),fe("li",{id:`${M(x)}-item-${te}`,key:te,class:oe({highlighted:v.value===te}),role:"option","aria-selected":v.value===te,onClick:ne=>z(X)},[ft(W.$slots,"default",{item:X},()=>[Dt(Ye(X[W.valueKey]),1)])],10,wae))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:he(()=>[ce("div",{ref_key:"listboxRef",ref:d,class:oe([M(l).b(),W.$attrs.class]),style:$t(M(_)),role:"combobox","aria-haspopup":"listbox","aria-expanded":M(E),"aria-owns":M(x)},[ie(M(ua),Un({ref_key:"inputRef",ref:s},M(o),{clearable:W.clearable,disabled:M(a),name:W.name,"model-value":W.modelValue,onInput:F,onChange:B,onFocus:L,onBlur:V,onClear:P,onKeydown:[K[0]||(K[0]=Rr(Gt(X=>$(v.value-1),["prevent"]),["up"])),K[1]||(K[1]=Rr(Gt(X=>$(v.value+1),["prevent"]),["down"])),Rr(H,["enter"]),Rr(G,["tab"]),Rr(U,["esc"])],onMousedown:N}),Ff({_:2},[W.$slots.prepend?{name:"prepend",fn:he(()=>[ft(W.$slots,"prepend")])}:void 0,W.$slots.append?{name:"append",fn:he(()=>[ft(W.$slots,"append")])}:void 0,W.$slots.prefix?{name:"prefix",fn:he(()=>[ft(W.$slots,"prefix")])}:void 0,W.$slots.suffix?{name:"suffix",fn:he(()=>[ft(W.$slots,"suffix")])}:void 0]),1040,["clearable","disabled","name","model-value","onKeydown"])],14,bae)]),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});let Eae,Cae,Sae,kae;NO=Cr(Nt(_ae,[["__file","autocomplete.vue"]])),Eae=Lt({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,dotStyle:{type:[String,Object,Array]},offset:{type:Array,default:[0,0]},dotClass:{type:String}}),Cae=["textContent"],Sae=Te({name:"ElBadge"}),kae=Te({...Sae,props:Eae,setup(e,{expose:t}){const n=e,r=_t("badge"),o=ee(()=>n.isDot?"":Kn(n.value)&&Kn(n.max)?n.max<n.value?`${n.max}+`:n.value!==0||n.showZero?`${n.value}`:"":`${n.value}`),i=ee(()=>{var a,l,s,u,c;return[{backgroundColor:n.color,marginRight:ka(-((l=(a=n.offset)==null?void 0:a[0])!=null?l:0)),marginTop:ka((u=(s=n.offset)==null?void 0:s[1])!=null?u:0)},(c=n.dotStyle)!=null?c:{}]});return t({content:o}),(a,l)=>(Y(),fe("div",{class:oe(M(r).b())},[ft(a.$slots,"default"),ie(ca,{name:`${M(r).namespace.value}-zoom-in-center`,persisted:""},{default:he(()=>[nn(ce("sup",{class:oe([M(r).e("content"),M(r).em("content",a.type),M(r).is("fixed",!!a.$slots.default),M(r).is("dot",a.isDot),a.dotClass]),style:$t(M(i)),textContent:Ye(M(o))},null,14,Cae),[[$n,!a.hidden&&(M(o)||a.isDot)]])]),_:1},8,["name"])],2))}});let kF,B9,L9,Dae;bQ=Cr(Nt(kae,[["__file","badge.vue"]])),kF=Symbol("buttonGroupContextKey"),B9=["default","primary","success","warning","info","danger","text",""],L9=Lt({size:da,disabled:Boolean,type:{type:String,values:B9,default:""},icon:{type:fi},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:fi,default:()=>jd},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:[String,Object],default:"button"}}),Dae={click:e=>e instanceof MouseEvent};function va(e,t){(function(r){return typeof r=="string"&&r.indexOf(".")!==-1&&parseFloat(r)===1})(e)&&(e="100%");var n=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=t===360?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function P9(e){return Math.min(1,Math.max(0,e))}function Oae(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function j9(e){return e<=1?"".concat(100*Number(e),"%"):e}function o1(e){return e.length===1?"0"+e:String(e)}function Tae(e,t,n){e=va(e,255),t=va(t,255),n=va(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=0,l=(r+o)/2;if(r===o)a=0,i=0;else{var s=r-o;switch(a=l>.5?s/(2-r-o):s/(r+o),r){case e:i=(t-n)/s+(t<n?6:0);break;case t:i=(n-e)/s+2;break;case n:i=(e-t)/s+4}i/=6}return{h:i,s:a,l}}function DF(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+6*n*(t-e):n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function Mae(e,t,n){e=va(e,255),t=va(t,255),n=va(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=r,l=r-o,s=r===0?0:l/r;if(r===o)i=0;else{switch(r){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i/=6}return{h:i,s,v:a}}function Nae(e,t,n,r){var o=[o1(Math.round(e).toString(16)),o1(Math.round(t).toString(16)),o1(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function eLe(e){return Math.round(255*parseFloat(e)).toString(16)}function Fae(e){return hs(e)/255}function hs(e){return parseInt(e,16)}var OF={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tLe(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=function(s){if(s=s.trim().toLowerCase(),s.length===0)return!1;var u=!1;if(OF[s])s=OF[s],u=!0;else if(s==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var c=Lu.rgb.exec(s);return c?{r:c[1],g:c[2],b:c[3]}:(c=Lu.rgba.exec(s),c?{r:c[1],g:c[2],b:c[3],a:c[4]}:(c=Lu.hsl.exec(s),c?{h:c[1],s:c[2],l:c[3]}:(c=Lu.hsla.exec(s),c?{h:c[1],s:c[2],l:c[3],a:c[4]}:(c=Lu.hsv.exec(s),c?{h:c[1],s:c[2],v:c[3]}:(c=Lu.hsva.exec(s),c?{h:c[1],s:c[2],v:c[3],a:c[4]}:(c=Lu.hex8.exec(s),c?{r:hs(c[1]),g:hs(c[2]),b:hs(c[3]),a:Fae(c[4]),format:u?"name":"hex8"}:(c=Lu.hex6.exec(s),c?{r:hs(c[1]),g:hs(c[2]),b:hs(c[3]),format:u?"name":"hex"}:(c=Lu.hex4.exec(s),c?{r:hs(c[1]+c[1]),g:hs(c[2]+c[2]),b:hs(c[3]+c[3]),a:Fae(c[4]+c[4]),format:u?"name":"hex8"}:(c=Lu.hex3.exec(s),c?{r:hs(c[1]+c[1]),g:hs(c[2]+c[2]),b:hs(c[3]+c[3]),format:u?"name":"hex"}:!1)))))))))}(e)),typeof e=="object"&&(Hd(e.r)&&Hd(e.g)&&Hd(e.b)?(t=function(s,u,c){return{r:255*va(s,255),g:255*va(u,255),b:255*va(c,255)}}(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Hd(e.h)&&Hd(e.s)&&Hd(e.v)?(r=j9(e.s),o=j9(e.v),t=function(s,u,c){s=6*va(s,360),u=va(u,100),c=va(c,100);var d=Math.floor(s),f=s-d,p=c*(1-u),m=c*(1-f*u),v=c*(1-(1-f)*u),g=d%6;return{r:255*[c,m,p,p,v,c][g],g:255*[v,c,c,m,p,p][g],b:255*[p,p,v,c,c,m][g]}}(e.h,r,o),a=!0,l="hsv"):Hd(e.h)&&Hd(e.s)&&Hd(e.l)&&(r=j9(e.s),i=j9(e.l),t=function(s,u,c){var d,f,p;if(s=va(s,360),u=va(u,100),c=va(c,100),u===0)f=c,p=c,d=c;else{var m=c<.5?c*(1+u):c+u-c*u,v=2*c-m;d=DF(v,m,s+.3333333333333333),f=DF(v,m,s),p=DF(v,m,s-.3333333333333333)}return{r:255*d,g:255*f,b:255*p}}(e.h,r,i),a=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Oae(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var op="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),TF="[\\s|\\(]+(".concat(op,")[,|\\s]+(").concat(op,")[,|\\s]+(").concat(op,")\\s*\\)?"),MF="[\\s|\\(]+(".concat(op,")[,|\\s]+(").concat(op,")[,|\\s]+(").concat(op,")[,|\\s]+(").concat(op,")\\s*\\)?"),Lu={CSS_UNIT:new RegExp(op),rgb:new RegExp("rgb"+TF),rgba:new RegExp("rgba"+MF),hsl:new RegExp("hsl"+TF),hsla:new RegExp("hsla"+MF),hsv:new RegExp("hsv"+TF),hsva:new RegExp("hsva"+MF),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Hd(e){return!!Lu.CSS_UNIT.exec(String(e))}JQ=function(){function e(t,n){var r;if(t===void 0&&(t=""),n===void 0&&(n={}),t instanceof e)return t;typeof t=="number"&&(t=function(i){return{r:i>>16,g:(65280&i)>>8,b:255&i}}(t)),this.originalInput=t;var o=tLe(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n=t.r/255,r=t.g/255,o=t.b/255;return .2126*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Oae(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return this.toHsl().s===0},e.prototype.toHsv=function(){var t=Mae(this.r,this.g,this.b);return{h:360*t.h,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Mae(this.r,this.g,this.b),n=Math.round(360*t.h),r=Math.round(100*t.s),o=Math.round(100*t.v);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Tae(this.r,this.g,this.b);return{h:360*t.h,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Tae(this.r,this.g,this.b),n=Math.round(360*t.h),r=Math.round(100*t.s),o=Math.round(100*t.l);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Nae(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),function(n,r,o,i,a){var l=[o1(Math.round(n).toString(16)),o1(Math.round(r).toString(16)),o1(Math.round(o).toString(16)),o1(eLe(i))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(100*va(n,255)),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(100*va(n,255))};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Nae(this.r,this.g,this.b,!1),n=0,r=Object.entries(OF);n<r.length;n++){var o=r[n],i=o[0];if(t===o[1])return i}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,o=this.a<1&&this.a>=0;return n||!o||!t.startsWith("hex")&&t!=="name"?(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),t!=="hex"&&t!=="hex6"||(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString()):t==="name"&&this.a===0?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=P9(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=P9(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=P9(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=P9(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(new e({h:r,s:o,v:i})),i=(i+l)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],i=360/t,a=1;a<t;a++)o.push(new e({h:(r+a*i)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function ip(e,t=20){return e.mix("#141414",t).toString()}const nLe=Te({name:"ElButton"}),rLe=Te({...nLe,props:L9,emits:Dae,setup(e,{expose:t,emit:n}){const r=e,o=function(m){const v=wl(),g=_t("button");return ee(()=>{let b={};const y=m.color;if(y){const w=new JQ(y),x=m.dark?w.tint(20).toString():ip(w,20);if(m.plain)b=g.cssVarBlock({"bg-color":m.dark?ip(w,90):w.tint(90).toString(),"text-color":y,"border-color":m.dark?ip(w,50):w.tint(50).toString(),"hover-text-color":`var(${g.cssVarName("color-white")})`,"hover-bg-color":y,"hover-border-color":y,"active-bg-color":x,"active-text-color":`var(${g.cssVarName("color-white")})`,"active-border-color":x}),v.value&&(b[g.cssVarBlockName("disabled-bg-color")]=m.dark?ip(w,90):w.tint(90).toString(),b[g.cssVarBlockName("disabled-text-color")]=m.dark?ip(w,50):w.tint(50).toString(),b[g.cssVarBlockName("disabled-border-color")]=m.dark?ip(w,80):w.tint(80).toString());else{const _=m.dark?ip(w,30):w.tint(30).toString(),E=w.isDark()?`var(${g.cssVarName("color-white")})`:`var(${g.cssVarName("color-black")})`;if(b=g.cssVarBlock({"bg-color":y,"text-color":E,"border-color":y,"hover-bg-color":_,"hover-text-color":E,"hover-border-color":_,"active-bg-color":x,"active-border-color":x}),v.value){const C=m.dark?ip(w,50):w.tint(50).toString();b[g.cssVarBlockName("disabled-bg-color")]=C,b[g.cssVarBlockName("disabled-text-color")]=m.dark?"rgba(255, 255, 255, 0.5)":`var(${g.cssVarName("color-white")})`,b[g.cssVarBlockName("disabled-border-color")]=C}}}return b})}(r),i=_t("button"),{_ref:a,_size:l,_type:s,_disabled:u,_props:c,shouldAddSpace:d,handleClick:f}=((m,v)=>{y0({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},ee(()=>m.type==="text"));const g=Rt(kF,void 0),b=Gb("button"),{form:y}=qa(),w=$i(ee(()=>g==null?void 0:g.size)),x=wl(),_=de(),E=Ga(),C=ee(()=>m.type||(g==null?void 0:g.type)||""),T=ee(()=>{var O,F,N;return(N=(F=m.autoInsertSpace)!=null?F:(O=b.value)==null?void 0:O.autoInsertSpace)!=null&&N}),k=ee(()=>m.tag==="button"?{ariaDisabled:x.value||m.loading,disabled:x.value||m.loading,autofocus:m.autofocus,type:m.nativeType}:{}),I=ee(()=>{var O;const F=(O=E.default)==null?void 0:O.call(E);if(T.value&&(F==null?void 0:F.length)===1){const N=F[0];if((N==null?void 0:N.type)===Dc){const B=N.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(B.trim())}}return!1});return{_disabled:x,_size:w,_type:C,_ref:_,_props:k,shouldAddSpace:I,handleClick:O=>{m.nativeType==="reset"&&(y==null||y.resetFields()),v("click",O)}}})(r,n),p=ee(()=>[i.b(),i.m(s.value),i.m(l.value),i.is("disabled",u.value),i.is("loading",r.loading),i.is("plain",r.plain),i.is("round",r.round),i.is("circle",r.circle),i.is("text",r.text),i.is("link",r.link),i.is("has-bg",r.bg)]);return t({ref:a,size:l,type:s,disabled:u,shouldAddSpace:d}),(m,v)=>(Y(),Pe(Hn(m.tag),Un({ref_key:"_ref",ref:a},M(c),{class:M(p),style:M(o),onClick:M(f)}),{default:he(()=>[m.loading?(Y(),fe(bt,{key:0},[m.$slots.loading?ft(m.$slots,"loading",{key:0}):(Y(),Pe(M(Ft),{key:1,class:oe(M(i).is("loading"))},{default:he(()=>[(Y(),Pe(Hn(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(Y(),Pe(M(Ft),{key:1},{default:he(()=>[m.icon?(Y(),Pe(Hn(m.icon),{key:0})):ft(m.$slots,"icon",{key:1})]),_:3})):Fe("v-if",!0),m.$slots.default?(Y(),fe("span",{key:2,class:oe({[M(i).em("text","expand")]:M(d)})},[ft(m.$slots,"default")],2)):Fe("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var oLe=Nt(rLe,[["__file","button.vue"]]);const iLe={size:L9.size,type:L9.type},aLe=Te({name:"ElButtonGroup"}),lLe=Te({...aLe,props:iLe,setup(e){const t=e;qn(kF,Qn({size:dr(t,"size"),type:dr(t,"type")}));const n=_t("button");return(r,o)=>(Y(),fe("div",{class:oe(`${M(n).b("group")}`)},[ft(r.$slots,"default")],2))}});var Rae=Nt(lLe,[["__file","button-group.vue"]]);Sa=Cr(oLe,{ButtonGroup:Rae}),POe=Ya(Rae);var Iae={exports:{}};Iae.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",l="day",s="week",u="month",c="quarter",d="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var N=["th","st","nd","rd"],B=F%100;return"["+F+(N[(B-20)%10]||N[B]||N[0])+"]"}},b=function(F,N,B){var L=String(F);return!L||L.length>=N?F:""+Array(N+1-L.length).join(B)+F},y={s:b,z:function(F){var N=-F.utcOffset(),B=Math.abs(N),L=Math.floor(B/60),V=B%60;return(N<=0?"+":"-")+b(L,2,"0")+":"+b(V,2,"0")},m:function F(N,B){if(N.date()<B.date())return-F(B,N);var L=12*(B.year()-N.year())+(B.month()-N.month()),V=N.clone().add(L,u),P=B-V<0,H=N.clone().add(L+(P?-1:1),u);return+(-(L+(B-V)/(P?V-H:H-V))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:u,y:d,w:s,d:l,D:f,h:a,m:i,s:o,ms:r,Q:c}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},w="en",x={};x[w]=g;var _="$isDayjsObject",E=function(F){return F instanceof I||!(!F||!F[_])},C=function F(N,B,L){var V;if(!N)return w;if(typeof N=="string"){var P=N.toLowerCase();x[P]&&(V=P),B&&(x[P]=B,V=P);var H=N.split("-");if(!V&&H.length>1)return F(H[0])}else{var U=N.name;x[U]=N,V=U}return!L&&V&&(w=V),V||!L&&w},T=function(F,N){if(E(F))return F.clone();var B=typeof N=="object"?N:{};return B.date=F,B.args=arguments,new I(B)},k=y;k.l=C,k.i=E,k.w=function(F,N){return T(F,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var I=function(){function F(B){this.$L=C(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[_]=!0}var N=F.prototype;return N.parse=function(B){this.$d=function(L){var V=L.date,P=L.utc;if(V===null)return new Date(NaN);if(k.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var H=V.match(m);if(H){var U=H[2]-1||0,G=(H[7]||"0").substring(0,3);return P?new Date(Date.UTC(H[1],U,H[3]||1,H[4]||0,H[5]||0,H[6]||0,G)):new Date(H[1],U,H[3]||1,H[4]||0,H[5]||0,H[6]||0,G)}}return new Date(V)}(B),this.init()},N.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},N.$utils=function(){return k},N.isValid=function(){return this.$d.toString()!==p},N.isSame=function(B,L){var V=T(B);return this.startOf(L)<=V&&V<=this.endOf(L)},N.isAfter=function(B,L){return T(B)<this.startOf(L)},N.isBefore=function(B,L){return this.endOf(L)<T(B)},N.$g=function(B,L,V){return k.u(B)?this[L]:this.set(V,B)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(B,L){var V=this,P=!!k.u(L)||L,H=k.p(B),U=function(ne,se){var le=k.w(V.$u?Date.UTC(V.$y,se,ne):new Date(V.$y,se,ne),V);return P?le:le.endOf(l)},G=function(ne,se){return k.w(V.toDate()[ne].apply(V.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(se)),V)},z=this.$W,$=this.$M,W=this.$D,K="set"+(this.$u?"UTC":"");switch(H){case d:return P?U(1,0):U(31,11);case u:return P?U(1,$):U(0,$+1);case s:var X=this.$locale().weekStart||0,te=(z<X?z+7:z)-X;return U(P?W-te:W+(6-te),$);case l:case f:return G(K+"Hours",0);case a:return G(K+"Minutes",1);case i:return G(K+"Seconds",2);case o:return G(K+"Milliseconds",3);default:return this.clone()}},N.endOf=function(B){return this.startOf(B,!1)},N.$set=function(B,L){var V,P=k.p(B),H="set"+(this.$u?"UTC":""),U=(V={},V[l]=H+"Date",V[f]=H+"Date",V[u]=H+"Month",V[d]=H+"FullYear",V[a]=H+"Hours",V[i]=H+"Minutes",V[o]=H+"Seconds",V[r]=H+"Milliseconds",V)[P],G=P===l?this.$D+(L-this.$W):L;if(P===u||P===d){var z=this.clone().set(f,1);z.$d[U](G),z.init(),this.$d=z.set(f,Math.min(this.$D,z.daysInMonth())).$d}else U&&this.$d[U](G);return this.init(),this},N.set=function(B,L){return this.clone().$set(B,L)},N.get=function(B){return this[k.p(B)]()},N.add=function(B,L){var V,P=this;B=Number(B);var H=k.p(L),U=function($){var W=T(P);return k.w(W.date(W.date()+Math.round($*B)),P)};if(H===u)return this.set(u,this.$M+B);if(H===d)return this.set(d,this.$y+B);if(H===l)return U(1);if(H===s)return U(7);var G=(V={},V[i]=t,V[a]=n,V[o]=e,V)[H]||1,z=this.$d.getTime()+B*G;return k.w(z,this)},N.subtract=function(B,L){return this.add(-1*B,L)},N.format=function(B){var L=this,V=this.$locale();if(!this.isValid())return V.invalidDate||p;var P=B||"YYYY-MM-DDTHH:mm:ssZ",H=k.z(this),U=this.$H,G=this.$m,z=this.$M,$=V.weekdays,W=V.months,K=V.meridiem,X=function(se,le,J,Z){return se&&(se[le]||se(L,P))||J[le].slice(0,Z)},te=function(se){return k.s(U%12||12,se,"0")},ne=K||function(se,le,J){var Z=se<12?"AM":"PM";return J?Z.toLowerCase():Z};return P.replace(v,function(se,le){return le||function(J){switch(J){case"YY":return String(L.$y).slice(-2);case"YYYY":return k.s(L.$y,4,"0");case"M":return z+1;case"MM":return k.s(z+1,2,"0");case"MMM":return X(V.monthsShort,z,W,3);case"MMMM":return X(W,z);case"D":return L.$D;case"DD":return k.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return X(V.weekdaysMin,L.$W,$,2);case"ddd":return X(V.weekdaysShort,L.$W,$,3);case"dddd":return $[L.$W];case"H":return String(U);case"HH":return k.s(U,2,"0");case"h":return te(1);case"hh":return te(2);case"a":return ne(U,G,!0);case"A":return ne(U,G,!1);case"m":return String(G);case"mm":return k.s(G,2,"0");case"s":return String(L.$s);case"ss":return k.s(L.$s,2,"0");case"SSS":return k.s(L.$ms,3,"0");case"Z":return H}return null}(se)||H.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(B,L,V){var P,H=this,U=k.p(L),G=T(B),z=(G.utcOffset()-this.utcOffset())*t,$=this-G,W=function(){return k.m(H,G)};switch(U){case d:P=W()/12;break;case u:P=W();break;case c:P=W()/3;break;case s:P=($-z)/6048e5;break;case l:P=($-z)/864e5;break;case a:P=$/n;break;case i:P=$/t;break;case o:P=$/e;break;default:P=$}return V?P:k.a(P)},N.daysInMonth=function(){return this.endOf(u).$D},N.$locale=function(){return x[this.$L]},N.locale=function(B,L){if(!B)return this.$L;var V=this.clone(),P=C(B,L,!0);return P&&(V.$L=P),V},N.clone=function(){return k.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},F}(),O=I.prototype;return T.prototype=O,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",l],["$M",u],["$y",d],["$D",f]].forEach(function(F){O[F[1]]=function(N){return this.$g(N,F[0],F[1])}}),T.extend=function(F,N){return F.$i||(F(N,I,T),F.$i=!0),T},T.locale=C,T.isDayjs=E,T.unix=function(F){return T(1e3*F)},T.en=x[w],T.Ls=x,T.p={},T}(),vn=_l(Iae.exports);var Bae={exports:{}};Bae.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},l=function(m){return(m=+m)+(m>68?1900:2e3)},s=function(m){return function(v){this[m]=+v}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var g=v.match(/([+-]|\d\d)/g),b=60*g[1]+(+g[2]||0);return b===0?0:g[0]==="+"?-b:b}(m)}],c=function(m){var v=a[m];return v&&(v.indexOf?v:v.s.concat(v.f))},d=function(m,v){var g,b=a.meridiem;if(b){for(var y=1;y<=24;y+=1)if(m.indexOf(b(y,0,v))>-1){g=y>12;break}}else g=m===(v?"pm":"PM");return g},f={A:[i,function(m){this.afternoon=d(m,!1)}],a:[i,function(m){this.afternoon=d(m,!0)}],Q:[n,function(m){this.month=3*(m-1)+1}],S:[n,function(m){this.milliseconds=100*+m}],SS:[r,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[o,s("seconds")],ss:[o,s("seconds")],m:[o,s("minutes")],mm:[o,s("minutes")],H:[o,s("hours")],h:[o,s("hours")],HH:[o,s("hours")],hh:[o,s("hours")],D:[o,s("day")],DD:[r,s("day")],Do:[i,function(m){var v=a.ordinal,g=m.match(/\d+/);if(this.day=g[0],v)for(var b=1;b<=31;b+=1)v(b).replace(/\[|\]/g,"")===m&&(this.day=b)}],w:[o,s("week")],ww:[r,s("week")],M:[o,s("month")],MM:[r,s("month")],MMM:[i,function(m){var v=c("months"),g=(c("monthsShort")||v.map(function(b){return b.slice(0,3)})).indexOf(m)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[i,function(m){var v=c("months").indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,s("year")],YY:[r,function(m){this.year=l(m)}],YYYY:[/\d{4}/,s("year")],Z:u,ZZ:u};function p(m){var v,g;v=m,g=a&&a.formats;for(var b=(m=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,k,I){var O=I&&I.toUpperCase();return k||g[I]||e[I]||g[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,N,B){return N||B.slice(1)})})).match(t),y=b.length,w=0;w<y;w+=1){var x=b[w],_=f[x],E=_&&_[0],C=_&&_[1];b[w]=C?{regex:E,parser:C}:x.replace(/^\[|\]$/g,"")}return function(T){for(var k={},I=0,O=0;I<y;I+=1){var F=b[I];if(typeof F=="string")O+=F.length;else{var N=F.regex,B=F.parser,L=T.slice(O),V=N.exec(L)[0];B.call(k,V),T=T.replace(V,"")}}return function(P){var H=P.afternoon;if(H!==void 0){var U=P.hours;H?U<12&&(P.hours+=12):U===12&&(P.hours=0),delete P.afternoon}}(k),k}}return function(m,v,g){g.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(l=m.parseTwoDigitYear);var b=v.prototype,y=b.parse;b.parse=function(w){var x=w.date,_=w.utc,E=w.args;this.$u=_;var C=E[1];if(typeof C=="string"){var T=E[2]===!0,k=E[3]===!0,I=T||k,O=E[2];k&&(O=E[2]),a=this.$locale(),!T&&O&&(a=g.Ls[O]),this.$d=function(L,V,P,H){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*L);var U=p(V)(L),G=U.year,z=U.month,$=U.day,W=U.hours,K=U.minutes,X=U.seconds,te=U.milliseconds,ne=U.zone,se=U.week,le=new Date,J=$||(G||z?1:le.getDate()),Z=G||le.getFullYear(),ye=0;G&&!z||(ye=z>0?z-1:le.getMonth());var be,ve=W||0,Ae=K||0,Ce=X||0,_e=te||0;return ne?new Date(Date.UTC(Z,ye,J,ve,Ae,Ce,_e+60*ne.offset*1e3)):P?new Date(Date.UTC(Z,ye,J,ve,Ae,Ce,_e)):(be=new Date(Z,ye,J,ve,Ae,Ce,_e),se&&(be=H(be).week(se).toDate()),be)}catch{return new Date("")}}(x,C,_,g),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),I&&x!=this.format(C)&&(this.$d=new Date("")),a={}}else if(C instanceof Array)for(var F=C.length,N=1;N<=F;N+=1){E[1]=C[N-1];var B=g.apply(this,E);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}N===F&&(this.$d=new Date(""))}else y.call(this,w)}}}();let NF,V9,i1,Lae,z9,FF,RF,IF,BF,LF,PF,jF,H9,VF,zF,$9,Pae,jae,Vae,zae;MO=_l(Bae.exports),NF=["hours","minutes","seconds"],V9="HH:mm:ss",i1="YYYY-MM-DD",Lae={date:i1,dates:i1,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",datetime:`${i1} ${V9}`,monthrange:"YYYY-MM",daterange:i1,datetimerange:`${i1} ${V9}`},z9=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],FF=e=>Array.from(Array.from({length:e}).keys()),RF=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),IF=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),BF=function(e,t){const n=q3(e),r=q3(t);return n&&r?e.getTime()===t.getTime():!n&&!r&&e===t},LF=function(e,t){const n=mt(e),r=mt(t);return n&&r?e.length===t.length&&e.every((o,i)=>BF(o,t[i])):!n&&!r&&BF(e,t)},PF=function(e,t,n){const r=cs(t)||t==="x"?vn(e).locale(n):vn(e,t).locale(n);return r.isValid()?r:void 0},jF=function(e,t,n){return cs(t)?e:t==="x"?+e:vn(e).locale(n).format(t)},H9=(e,t)=>{var n;const r=[],o=t==null?void 0:t();for(let i=0;i<e;i++)r.push((n=o==null?void 0:o.includes(i))!=null&&n);return r},VF=Lt({disabledHours:{type:Function},disabledMinutes:{type:Function},disabledSeconds:{type:Function}}),zF=Lt({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),$9=Lt({id:{type:[Array,String]},name:{type:[Array,String],default:""},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:[String,Object],default:h0},editable:{type:Boolean,default:!0},prefixIcon:{type:[String,Object],default:""},size:da,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},modelValue:{type:[Date,Array,String,Number],default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:[Date,Array]},defaultTime:{type:[Date,Array]},isRange:Boolean,...VF,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,...F3}),Pae=["id","name","placeholder","value","disabled","readonly"],jae=["id","name","placeholder","value","disabled","readonly"],Vae=Te({name:"Picker"}),zae=Te({...Vae,props:$9,emits:["update:modelValue","change","focus","blur","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:n}){const r=e,o=yc(),{lang:i}=Gr(),a=_t("date"),l=_t("input"),s=_t("range"),{form:u,formItem:c}=qa(),d=Rt("ElPopperOptions",{}),{valueOnClear:f}=jw(r,null),p=de(),m=de(),v=de(!1),g=de(!1),b=de(null);let y=!1,w=!1;const x=ee(()=>[a.b("editor"),a.bm("editor",r.type),l.e("wrapper"),a.is("disabled",U.value),a.is("active",v.value),s.b("editor"),Ae?s.bm("editor",Ae.value):"",o.class]),_=ee(()=>[l.e("icon"),s.e("close-icon"),ne.value?"":s.e("close-icon--hidden")]);Je(v,me=>{me?St(()=>{me&&(b.value=r.modelValue)}):(ke.value=null,St(()=>{E(r.modelValue)}))});const E=(me,Me)=>{!Me&&LF(me,b.value)||(n("change",me),r.validateEvent&&(c==null||c.validate("change").catch(Ie=>{})))},C=me=>{if(!LF(r.modelValue,me)){let Me;mt(me)?Me=me.map(Ie=>jF(Ie,r.valueFormat,i.value)):me&&(Me=jF(me,r.valueFormat,i.value)),n("update:modelValue",me&&Me,i.value)}},T=ee(()=>{if(m.value){const me=ve.value?m.value:m.value.$el;return Array.from(me.querySelectorAll("input"))}return[]}),k=(me,Me,Ie)=>{const ht=T.value;ht.length&&(Ie&&Ie!=="min"?Ie==="max"&&(ht[1].setSelectionRange(me,Me),ht[1].focus()):(ht[0].setSelectionRange(me,Me),ht[0].focus()))},I=(me="",Me=!1)=>{let Ie;Me||(w=!0),v.value=Me,Ie=mt(me)?me.map(ht=>ht.toDate()):me&&me.toDate(),ke.value=null,C(Ie)},O=()=>{g.value=!0},F=()=>{n("visible-change",!0)},N=me=>{(me==null?void 0:me.key)===Xt.esc&&L(!0,!0)},B=()=>{g.value=!1,v.value=!1,w=!1,n("visible-change",!1)},L=(me=!0,Me=!1)=>{w=Me;const[Ie,ht]=M(T);let gt=Ie;!me&&ve.value&&(gt=ht),gt&>.focus()},V=me=>{r.readonly||U.value||v.value||w||(v.value=!0,n("focus",me))};let P;const H=me=>{const Me=async()=>{setTimeout(()=>{var Ie;P===Me&&((Ie=p.value)!=null&&Ie.isFocusInsideContent()&&!y||T.value.filter(ht=>ht.contains(document.activeElement)).length!==0||(Be(),v.value=!1,n("blur",me),r.validateEvent&&(c==null||c.validate("blur").catch(ht=>{}))),y=!1)},0)};P=Me,Me()},U=ee(()=>r.disabled||(u==null?void 0:u.disabled)),G=ee(()=>{let me;if(le.value?ot.value.getDefaultValue&&(me=ot.value.getDefaultValue()):me=mt(r.modelValue)?r.modelValue.map(Me=>PF(Me,r.valueFormat,i.value)):PF(r.modelValue,r.valueFormat,i.value),ot.value.getRangeAvailableTime){const Me=ot.value.getRangeAvailableTime(me);ns(Me,me)||(me=Me,C(mt(me)?me.map(Ie=>Ie.toDate()):me.toDate()))}return mt(me)&&me.some(Me=>!Me)&&(me=[]),me}),z=ee(()=>{if(!ot.value.panelReady)return"";const me=rt(G.value);return mt(ke.value)?[ke.value[0]||me&&me[0]||"",ke.value[1]||me&&me[1]||""]:ke.value!==null?ke.value:!W.value&&le.value||!v.value&&le.value?"":me?K.value||X.value?me.join(", "):me:""}),$=ee(()=>r.type.includes("time")),W=ee(()=>r.type.startsWith("time")),K=ee(()=>r.type==="dates"),X=ee(()=>r.type==="years"),te=ee(()=>r.prefixIcon||($.value?qQ:Toe)),ne=de(!1),se=me=>{r.readonly||U.value||ne.value&&(me.stopPropagation(),L(!0,!0),St(()=>{w=!1}),C(f.value),E(f.value,!0),ne.value=!1,v.value=!1,ot.value.handleClear&&ot.value.handleClear())},le=ee(()=>{const{modelValue:me}=r;return!me||mt(me)&&!me.filter(Boolean).length}),J=async me=>{var Me;r.readonly||U.value||(((Me=me.target)==null?void 0:Me.tagName)!=="INPUT"||T.value.includes(document.activeElement))&&(v.value=!0)},Z=()=>{r.readonly||U.value||!le.value&&r.clearable&&(ne.value=!0)},ye=()=>{ne.value=!1},be=me=>{var Me;r.readonly||U.value||(((Me=me.touches[0].target)==null?void 0:Me.tagName)!=="INPUT"||T.value.includes(document.activeElement))&&(v.value=!0)},ve=ee(()=>r.type.includes("range")),Ae=$i(),Ce=ee(()=>{var me,Me;return(Me=(me=M(p))==null?void 0:me.popperRef)==null?void 0:Me.contentRef}),_e=ee(()=>{var me;return M(ve)?M(m):(me=M(m))==null?void 0:me.$el});lN(_e,me=>{const Me=M(Ce),Ie=M(_e);Me&&(me.target===Me||me.composedPath().includes(Me))||me.target===Ie||me.composedPath().includes(Ie)||(v.value=!1)});const ke=de(null),Be=()=>{if(ke.value){const me=$e(z.value);me&&ge(me)&&(C(mt(me)?me.map(Me=>Me.toDate()):me.toDate()),ke.value=null)}ke.value===""&&(C(f.value),E(f.value),ke.value=null)},$e=me=>me?ot.value.parseUserInput(me):null,rt=me=>me?ot.value.formatToString(me):null,ge=me=>ot.value.isValidValue(me),We=async me=>{if(r.readonly||U.value)return;const{code:Me}=me;if((Ie=>{n("keydown",Ie)})(me),Me!==Xt.esc)if(Me===Xt.down&&(ot.value.handleFocusPicker&&(me.preventDefault(),me.stopPropagation()),v.value===!1&&(v.value=!0,await St()),ot.value.handleFocusPicker))ot.value.handleFocusPicker();else{if(Me!==Xt.tab)return Me===Xt.enter||Me===Xt.numpadEnter?((ke.value===null||ke.value===""||ge($e(z.value)))&&(Be(),v.value=!1),void me.stopPropagation()):void(ke.value?me.stopPropagation():ot.value.handleKeydownInput&&ot.value.handleKeydownInput(me));y=!0}else v.value===!0&&(v.value=!1,me.preventDefault(),me.stopPropagation())},st=me=>{ke.value=me,v.value||(v.value=!0)},At=me=>{const Me=me.target;ke.value?ke.value=[Me.value,ke.value[1]]:ke.value=[Me.value,null]},Ve=me=>{const Me=me.target;ke.value?ke.value=[ke.value[0],Me.value]:ke.value=[null,Me.value]},it=()=>{var me;const Me=ke.value,Ie=$e(Me&&Me[0]),ht=M(G);if(Ie&&Ie.isValid()){ke.value=[rt(Ie),((me=z.value)==null?void 0:me[1])||null];const gt=[Ie,ht&&(ht[1]||null)];ge(gt)&&(C(gt),ke.value=null)}},dt=()=>{var me;const Me=M(ke),Ie=$e(Me&&Me[1]),ht=M(G);if(Ie&&Ie.isValid()){ke.value=[((me=M(z))==null?void 0:me[0])||null,rt(Ie)];const gt=[ht&&ht[0],Ie];ge(gt)&&(C(gt),ke.value=null)}},ot=de({}),je=me=>{ot.value[me[0]]=me[1],ot.value.panelReady=!0},we=me=>{n("calendar-change",me)},ze=(me,Me,Ie)=>{n("panel-change",me,Me,Ie)};return qn("EP_PICKER_BASE",{props:r}),t({focus:L,handleFocusInput:V,handleBlurInput:H,handleOpen:()=>{v.value=!0},handleClose:()=>{v.value=!1},onPick:I}),(me,Me)=>(Y(),Pe(M(Al),Un({ref_key:"refPopper",ref:p,visible:v.value,effect:"light",pure:"",trigger:"click"},me.$attrs,{role:"dialog",teleported:"",transition:`${M(a).namespace.value}-zoom-in-top`,"popper-class":[`${M(a).namespace.value}-picker__popper`,me.popperClass],"popper-options":M(d),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:O,onShow:F,onHide:B}),{default:he(()=>[M(ve)?(Y(),fe("div",{key:1,ref_key:"inputRef",ref:m,class:oe(M(x)),style:$t(me.$attrs.style),onClick:V,onMouseenter:Z,onMouseleave:ye,onTouchstart:be,onKeydown:We},[M(te)?(Y(),Pe(M(Ft),{key:0,class:oe([M(l).e("icon"),M(s).e("icon")]),onMousedown:Gt(J,["prevent"]),onTouchstart:be},{default:he(()=>[(Y(),Pe(Hn(M(te))))]),_:1},8,["class","onMousedown"])):Fe("v-if",!0),ce("input",{id:me.id&&me.id[0],autocomplete:"off",name:me.name&&me.name[0],placeholder:me.startPlaceholder,value:M(z)&&M(z)[0],disabled:M(U),readonly:!me.editable||me.readonly,class:oe(M(s).b("input")),onMousedown:J,onInput:At,onChange:it,onFocus:V,onBlur:H},null,42,Pae),ft(me.$slots,"range-separator",{},()=>[ce("span",{class:oe(M(s).b("separator"))},Ye(me.rangeSeparator),3)]),ce("input",{id:me.id&&me.id[1],autocomplete:"off",name:me.name&&me.name[1],placeholder:me.endPlaceholder,value:M(z)&&M(z)[1],disabled:M(U),readonly:!me.editable||me.readonly,class:oe(M(s).b("input")),onMousedown:J,onFocus:V,onBlur:H,onInput:Ve,onChange:dt},null,42,jae),me.clearIcon?(Y(),Pe(M(Ft),{key:1,class:oe(M(_)),onClick:se},{default:he(()=>[(Y(),Pe(Hn(me.clearIcon)))]),_:1},8,["class"])):Fe("v-if",!0)],38)):(Y(),Pe(M(ua),{key:0,id:me.id,ref_key:"inputRef",ref:m,"container-role":"combobox","model-value":M(z),name:me.name,size:M(Ae),disabled:M(U),placeholder:me.placeholder,class:oe([M(a).b("editor"),M(a).bm("editor",me.type),me.$attrs.class]),style:$t(me.$attrs.style),readonly:!me.editable||me.readonly||M(K)||M(X)||me.type==="week",label:me.label,tabindex:me.tabindex,"validate-event":!1,onInput:st,onFocus:V,onBlur:H,onKeydown:We,onChange:Be,onMousedown:J,onMouseenter:Z,onMouseleave:ye,onTouchstart:be,onClick:Me[0]||(Me[0]=Gt(()=>{},["stop"]))},{prefix:he(()=>[M(te)?(Y(),Pe(M(Ft),{key:0,class:oe(M(l).e("icon")),onMousedown:Gt(J,["prevent"]),onTouchstart:be},{default:he(()=>[(Y(),Pe(Hn(M(te))))]),_:1},8,["class","onMousedown"])):Fe("v-if",!0)]),suffix:he(()=>[ne.value&&me.clearIcon?(Y(),Pe(M(Ft),{key:0,class:oe(`${M(l).e("icon")} clear-icon`),onClick:Gt(se,["stop"])},{default:he(()=>[(Y(),Pe(Hn(me.clearIcon)))]),_:1},8,["class","onClick"])):Fe("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","label","tabindex","onKeydown"]))]),content:he(()=>[ft(me.$slots,"default",{visible:v.value,actualVisible:g.value,parsedValue:M(G),format:me.format,dateFormat:me.dateFormat,timeFormat:me.timeFormat,unlinkPanels:me.unlinkPanels,type:me.type,defaultValue:me.defaultValue,onPick:I,onSelectRange:k,onSetPickerOption:je,onCalendarChange:we,onPanelChange:ze,onKeydown:N,onMousedown:Me[1]||(Me[1]=Gt(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-options"]))}});var Hae=Nt(zae,[["__file","picker.vue"]]);const sLe=Lt({...zF,datetimeRole:String,parsedValue:{type:Object}}),$ae=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:n})=>{const r={};return{timePickerOptions:r,getAvailableTime:(o,i,a,l)=>{const s={hour:e,minute:t,second:n};let u=o;return["hour","minute","second"].forEach(c=>{if(s[c]){let d;const f=s[c];switch(c){case"minute":d=f(u.hour(),i,l);break;case"second":d=f(u.hour(),u.minute(),i,l);break;default:d=f(i,l)}if(d!=null&&d.length&&!d.includes(u[c]())){const p=a?0:d.length-1;u=u[c](d[p])}}}),u},onSetOption:([o,i])=>{r[o]=i}}},HF=e=>e.map((t,n)=>t||n).filter(t=>t!==!0),Uae=(e,t,n)=>({getHoursList:(r,o)=>H9(24,e&&(()=>e==null?void 0:e(r,o))),getMinutesList:(r,o,i)=>H9(60,t&&(()=>t==null?void 0:t(r,o,i))),getSecondsList:(r,o,i,a)=>H9(60,n&&(()=>n==null?void 0:n(r,o,i,a)))}),Wae=(e,t,n)=>{const{getHoursList:r,getMinutesList:o,getSecondsList:i}=Uae(e,t,n);return{getAvailableHours:(a,l)=>HF(r(a,l)),getAvailableMinutes:(a,l,s)=>HF(o(a,l,s)),getAvailableSeconds:(a,l,s,u)=>HF(i(a,l,s,u))}},Gae=e=>{const t=de(e.parsedValue);return Je(()=>e.visible,n=>{n||(t.value=e.parsedValue)}),t},ap=new Map;let qae;function Kae(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:$s(t.arg)&&n.push(t.arg),function(r,o){const i=t.instance.popperRef,a=r.target,l=o==null?void 0:o.target,s=!t||!t.instance,u=!a||!l,c=e.contains(a)||e.contains(l),d=e===a,f=n.length&&n.some(m=>m==null?void 0:m.contains(a))||n.length&&n.includes(l),p=i&&(i.contains(a)||i.contains(l));s||u||c||d||f||p||t.value(r,o)}}rr&&(document.addEventListener("mousedown",e=>qae=e),document.addEventListener("mouseup",e=>{for(const t of ap.values())for(const{documentHandler:n}of t)n(e,qae)}));let Yae,Xae,Zb,U9,lp,$F,Qae;Rf={beforeMount(e,t){ap.has(e)||ap.set(e,[]),ap.get(e).push({documentHandler:Kae(e,t),bindingFn:t.value})},updated(e,t){ap.has(e)||ap.set(e,[]);const n=ap.get(e),r=n.findIndex(i=>i.bindingFn===t.oldValue),o={documentHandler:Kae(e,t),bindingFn:t.value};r>=0?n.splice(r,1,o):n.push(o)},unmounted(e){ap.delete(e)}},Yae=100,Xae=600,Zb={beforeMount(e,t){const n=t.value,{interval:r=Yae,delay:o=Xae}=Ut(n)?{}:n;let i,a;const l=()=>Ut(n)?n():n.handler(),s=()=>{a&&(clearTimeout(a),a=void 0),i&&(clearInterval(i),i=void 0)};e.addEventListener("mousedown",u=>{u.button===0&&(s(),l(),document.addEventListener("mouseup",()=>s(),{once:!0}),a=setTimeout(()=>{i=setInterval(()=>{l()},r)},o))})}},U9="_trap-focus-children",lp=[],$F=e=>{if(lp.length===0)return;const t=lp[lp.length-1][U9];if(t.length>0&&e.code===Xt.tab){if(t.length===1)return e.preventDefault(),void(document.activeElement!==t[0]&&t[0].focus());const n=e.shiftKey,r=e.target===t[0],o=e.target===t[t.length-1];r&&n&&(e.preventDefault(),t[t.length-1].focus()),o&&!n&&(e.preventDefault(),t[0].focus())}},Qae={beforeMount(e){e[U9]=oN(e),lp.push(e),lp.length<=1&&document.addEventListener("keydown",$F)},updated(e){St(()=>{e[U9]=oN(e)})},unmounted(){lp.shift(),lp.length===0&&document.removeEventListener("keydown",$F)}};var cg,UF,WF,GF,W9,Jae,G9,qF,KF,YF,Zae,XF,QF,ele,tle,nle=!1;function Nl(){if(!nle){nle=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(XF=/\b(iPhone|iP[ao]d)/.exec(e),QF=/\b(iP[ao]d)/.exec(e),YF=/Android/i.exec(e),ele=/FBAN\/\w+;/i.exec(e),tle=/Mobile/i.exec(e),Zae=!!/Win64/.exec(e),t){(cg=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(cg=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Jae=r?parseFloat(r[1])+4:cg,UF=t[2]?parseFloat(t[2]):NaN,WF=t[3]?parseFloat(t[3]):NaN,(GF=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),W9=t&&t[1]?parseFloat(t[1]):NaN):W9=NaN}else cg=UF=WF=W9=GF=NaN;if(n){if(n[1]){var o=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);G9=!o||parseFloat(o[1].replace("_","."))}else G9=!1;qF=!!n[2],KF=!!n[3]}else G9=qF=KF=!1}}var rle,JF={ie:function(){return Nl()||cg},ieCompatibilityMode:function(){return Nl()||Jae>cg},ie64:function(){return JF.ie()&&Zae},firefox:function(){return Nl()||UF},opera:function(){return Nl()||WF},webkit:function(){return Nl()||GF},safari:function(){return JF.webkit()},chrome:function(){return Nl()||W9},windows:function(){return Nl()||qF},osx:function(){return Nl()||G9},linux:function(){return Nl()||KF},iphone:function(){return Nl()||XF},mobile:function(){return Nl()||XF||QF||YF||tle},nativeApp:function(){return Nl()||ele},android:function(){return Nl()||YF},ipad:function(){return Nl()||QF}},uLe=JF,q9=!!(typeof window<"u"&&window.document&&window.document.createElement),ole={canUseDOM:q9,canUseWorkers:typeof Worker<"u",canUseEventListeners:q9&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:q9&&!!window.screen,isInWorker:!q9};ole.canUseDOM&&(rle=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);var cLe=function(e,t){if(!ole.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var o=document.createElement("div");o.setAttribute(n,"return;"),r=typeof o[n]=="function"}return!r&&rle&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r};function ile(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(e.deltaMode==1?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}ile.getEventType=function(){return uLe.firefox()?"DOMMouseScroll":cLe("wheel")?"wheel":"mousewheel"};var dLe=ile;const fLe={beforeMount(e,t){(function(n,r){if(n&&n.addEventListener){const o=function(i){const a=dLe(i);r&&Reflect.apply(r,this,[i,a])};n.addEventListener("wheel",o,{passive:!0})}})(e,t.value)}},pLe=Lt({role:{type:String,required:!0},spinnerDate:{type:Object,required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:String,default:""},...VF}),hLe=["onClick"],vLe=["onMouseenter"],mLe=Te({__name:"basic-time-spinner",props:pLe,emits:["change","select-range","set-option"],setup(e,{emit:t}){const n=e,r=_t("time"),{getHoursList:o,getMinutesList:i,getSecondsList:a}=Uae(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let l=!1;const s=de(),u={hours:de(),minutes:de(),seconds:de()},c=ee(()=>n.showSeconds?NF:NF.slice(0,2)),d=ee(()=>{const{spinnerDate:N}=n;return{hours:N.hour(),minutes:N.minute(),seconds:N.second()}}),f=ee(()=>{const{hours:N,minutes:B}=M(d);return{hours:o(n.role),minutes:i(N,n.role),seconds:a(N,B,n.role)}}),p=ee(()=>{const{hours:N,minutes:B,seconds:L}=M(d);return{hours:z9(N,23),minutes:z9(B,59),seconds:z9(L,59)}}),m=ts(N=>{l=!1,b(N)},200),v=N=>{if(!n.amPmMode)return"";let B=N<12?" am":" pm";return n.amPmMode==="A"&&(B=B.toUpperCase()),B},g=N=>{let B;switch(N){case"hours":B=[0,2];break;case"minutes":B=[3,5];break;case"seconds":B=[6,8]}const[L,V]=B;t("select-range",L,V),s.value=N},b=N=>{x(N,M(d)[N])},y=()=>{b("hours"),b("minutes"),b("seconds")},w=N=>N.querySelector(`.${r.namespace.value}-scrollbar__wrap`),x=(N,B)=>{if(n.arrowControl)return;const L=M(u[N]);L&&L.$el&&(w(L.$el).scrollTop=Math.max(0,B*_(N)))},_=N=>{const B=M(u[N]),L=B==null?void 0:B.$el.querySelector("li");return L&&Number.parseFloat(Pd(L,"height"))||0},E=()=>{T(1)},C=()=>{T(-1)},T=N=>{s.value||g("hours");const B=s.value,L=M(d)[B],V=s.value==="hours"?24:60,P=k(B,L,N,V);I(B,P),x(B,P),St(()=>g(B))},k=(N,B,L,V)=>{let P=(B+L+V)%V;const H=M(f)[N];for(;H[P]&&P!==B;)P=(P+L+V)%V;return P},I=(N,B)=>{if(M(f)[N][B])return;const{hours:L,minutes:V,seconds:P}=M(d);let H;switch(N){case"hours":H=n.spinnerDate.hour(B).minute(V).second(P);break;case"minutes":H=n.spinnerDate.hour(L).minute(B).second(P);break;case"seconds":H=n.spinnerDate.hour(L).minute(V).second(B)}t("change",H)},O=N=>M(u[N]).$el.offsetHeight,F=()=>{const N=B=>{const L=M(u[B]);L&&L.$el&&(w(L.$el).onscroll=()=>{(V=>{l=!0,m(V);const P=Math.min(Math.round((w(M(u[V]).$el).scrollTop-(.5*O(V)-10)/_(V)+3)/_(V)),V==="hours"?23:59);I(V,P)})(B)})};N("hours"),N("minutes"),N("seconds")};return yn(()=>{St(()=>{!n.arrowControl&&F(),y(),n.role==="start"&&g("hours")})}),t("set-option",[`${n.role}_scrollDown`,T]),t("set-option",[`${n.role}_emitSelectRange`,g]),Je(()=>n.spinnerDate,()=>{l||y()}),(N,B)=>(Y(),fe("div",{class:oe([M(r).b("spinner"),{"has-seconds":N.showSeconds}])},[N.arrowControl?Fe("v-if",!0):(Y(!0),fe(bt,{key:0},bn(M(c),L=>(Y(),Pe(M(wd),{key:L,ref_for:!0,ref:V=>((P,H)=>{u[H].value=P})(V,L),class:oe(M(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":M(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:V=>g(L),onMousemove:V=>b(L)},{default:he(()=>[(Y(!0),fe(bt,null,bn(M(f)[L],(V,P)=>(Y(),fe("li",{key:P,class:oe([M(r).be("spinner","item"),M(r).is("active",P===M(d)[L]),M(r).is("disabled",V)]),onClick:H=>((U,{value:G,disabled:z})=>{z||(I(U,G),g(U),x(U,G))})(L,{value:P,disabled:V})},[L==="hours"?(Y(),fe(bt,{key:0},[Dt(Ye(("0"+(N.amPmMode?P%12||12:P)).slice(-2))+Ye(v(P)),1)],64)):(Y(),fe(bt,{key:1},[Dt(Ye(("0"+P).slice(-2)),1)],64))],10,hLe))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),N.arrowControl?(Y(!0),fe(bt,{key:1},bn(M(c),L=>(Y(),fe("div",{key:L,class:oe([M(r).be("spinner","wrapper"),M(r).is("arrow")]),onMouseenter:V=>g(L)},[nn((Y(),Pe(M(Ft),{class:oe(["arrow-up",M(r).be("spinner","arrow")])},{default:he(()=>[ie(M(p9))]),_:1},8,["class"])),[[M(Zb),C]]),nn((Y(),Pe(M(Ft),{class:oe(["arrow-down",M(r).be("spinner","arrow")])},{default:he(()=>[ie(M(p0))]),_:1},8,["class"])),[[M(Zb),E]]),ce("ul",{class:oe(M(r).be("spinner","list"))},[(Y(!0),fe(bt,null,bn(M(p)[L],(V,P)=>(Y(),fe("li",{key:P,class:oe([M(r).be("spinner","item"),M(r).is("active",V===M(d)[L]),M(r).is("disabled",M(f)[L][V])])},[typeof V=="number"?(Y(),fe(bt,{key:0},[L==="hours"?(Y(),fe(bt,{key:0},[Dt(Ye(("0"+(N.amPmMode?V%12||12:V)).slice(-2))+Ye(v(V)),1)],64)):(Y(),fe(bt,{key:1},[Dt(Ye(("0"+V).slice(-2)),1)],64))],64)):Fe("v-if",!0)],2))),128))],2)],42,vLe))),128)):Fe("v-if",!0)],2))}});var ZF=Nt(mLe,[["__file","basic-time-spinner.vue"]]);const gLe=Te({__name:"panel-time-pick",props:sLe,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,r=Rt("EP_PICKER_BASE"),{arrowControl:o,disabledHours:i,disabledMinutes:a,disabledSeconds:l,defaultValue:s}=r.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=Wae(i,a,l),f=_t("time"),{t:p,lang:m}=Gr(),v=de([0,2]),g=Gae(n),b=ee(()=>Wi(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),y=ee(()=>n.format.includes("ss")),w=ee(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),x=()=>{t("pick",g.value,!1)},_=O=>{if(!n.visible)return;const F=I(O).millisecond(0);t("pick",F,!0)},E=(O,F)=>{t("select-range",O,F),v.value=[O,F]},{timePickerOptions:C,onSetOption:T,getAvailableTime:k}=$ae({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),I=O=>k(O,n.datetimeRole||"",!0);return t("set-picker-option",["isValidValue",O=>{const F=vn(O).locale(m.value),N=I(F);return F.isSame(N)}]),t("set-picker-option",["formatToString",O=>O?O.format(n.format):null]),t("set-picker-option",["parseUserInput",O=>O?vn(O,n.format).locale(m.value):null]),t("set-picker-option",["handleKeydownInput",O=>{const F=O.code,{left:N,right:B,up:L,down:V}=Xt;if([N,B].includes(F))return(P=>{const H=[0,3].concat(y.value?[6]:[]),U=["hours","minutes"].concat(y.value?["seconds"]:[]),G=(H.indexOf(v.value[0])+P+H.length)%H.length;C.start_emitSelectRange(U[G])})(F===N?-1:1),void O.preventDefault();if([L,V].includes(F)){const P=F===L?-1:1;return C.start_scrollDown(P),void O.preventDefault()}}]),t("set-picker-option",["getRangeAvailableTime",I]),t("set-picker-option",["getDefaultValue",()=>vn(s).locale(m.value)]),(O,F)=>(Y(),Pe(ca,{name:M(b)},{default:he(()=>[O.actualVisible||O.visible?(Y(),fe("div",{key:0,class:oe(M(f).b("panel"))},[ce("div",{class:oe([M(f).be("panel","content"),{"has-seconds":M(y)}])},[ie(ZF,{ref:"spinner",role:O.datetimeRole||"start","arrow-control":M(o),"show-seconds":M(y),"am-pm-mode":M(w),"spinner-date":O.parsedValue,"disabled-hours":M(i),"disabled-minutes":M(a),"disabled-seconds":M(l),onChange:_,onSetOption:M(T),onSelectRange:E},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),ce("div",{class:oe(M(f).be("panel","footer"))},[ce("button",{type:"button",class:oe([M(f).be("panel","btn"),"cancel"]),onClick:x},Ye(M(p)("el.datepicker.cancel")),3),ce("button",{type:"button",class:oe([M(f).be("panel","btn"),"confirm"]),onClick:F[0]||(F[0]=N=>((B=!1,L=!1)=>{L||t("pick",n.parsedValue,B)})())},Ye(M(p)("el.datepicker.confirm")),3)],2)],2)):Fe("v-if",!0)]),_:1},8,["name"]))}});var K9=Nt(gLe,[["__file","panel-time-pick.vue"]]);const yLe=Lt({...zF,parsedValue:{type:Array}}),bLe=["disabled"],ALe=Te({__name:"panel-time-range",props:yLe,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,r=(W,K)=>{const X=[];for(let te=W;te<=K;te++)X.push(te);return X},{t:o,lang:i}=Gr(),a=_t("time"),l=_t("picker"),s=Rt("EP_PICKER_BASE"),{arrowControl:u,disabledHours:c,disabledMinutes:d,disabledSeconds:f,defaultValue:p}=s.props,m=ee(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),w.value?"has-seconds":""]),v=ee(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),w.value?"has-seconds":""]),g=ee(()=>n.parsedValue[0]),b=ee(()=>n.parsedValue[1]),y=Gae(n),w=ee(()=>n.format.includes("ss")),x=ee(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),_=W=>{C(W.millisecond(0),b.value)},E=W=>{C(g.value,W.millisecond(0))},C=(W,K)=>{t("pick",[W,K],!0)},T=ee(()=>g.value>b.value),k=de([0,2]),I=(W,K)=>{t("select-range",W,K,"min"),k.value=[W,K]},O=ee(()=>w.value?11:8),F=(W,K)=>{t("select-range",W,K,"max");const X=M(O);k.value=[W+X,K+X]},N=(W,K)=>{const X=c?c(W):[],te=W==="start",ne=(K||(te?b.value:g.value)).hour(),se=te?r(ne+1,23):r(0,ne-1);return IN(X,se)},B=(W,K,X)=>{const te=d?d(W,K):[],ne=K==="start",se=X||(ne?b.value:g.value);if(W!==se.hour())return te;const le=se.minute(),J=ne?r(le+1,59):r(0,le-1);return IN(te,J)},L=(W,K,X,te)=>{const ne=f?f(W,K,X):[],se=X==="start",le=te||(se?b.value:g.value),J=le.hour(),Z=le.minute();if(W!==J||K!==Z)return ne;const ye=le.second(),be=se?r(ye+1,59):r(0,ye-1);return IN(ne,be)},V=([W,K])=>[z(W,"start",!0,K),z(K,"end",!1,W)],{getAvailableHours:P,getAvailableMinutes:H,getAvailableSeconds:U}=Wae(N,B,L),{timePickerOptions:G,getAvailableTime:z,onSetOption:$}=$ae({getAvailableHours:P,getAvailableMinutes:H,getAvailableSeconds:U});return t("set-picker-option",["formatToString",W=>W?mt(W)?W.map(K=>K.format(n.format)):W.format(n.format):null]),t("set-picker-option",["parseUserInput",W=>W?mt(W)?W.map(K=>vn(K,n.format).locale(i.value)):vn(W,n.format).locale(i.value):null]),t("set-picker-option",["isValidValue",W=>{const K=W.map(te=>vn(te).locale(i.value)),X=V(K);return K[0].isSame(X[0])&&K[1].isSame(X[1])}]),t("set-picker-option",["handleKeydownInput",W=>{const K=W.code,{left:X,right:te,up:ne,down:se}=Xt;if([X,te].includes(K))return(le=>{const J=w.value?[0,3,6,11,14,17]:[0,3,8,11],Z=["hours","minutes"].concat(w.value?["seconds"]:[]),ye=(J.indexOf(k.value[0])+le+J.length)%J.length,be=J.length/2;ye<be?G.start_emitSelectRange(Z[ye]):G.end_emitSelectRange(Z[ye-be])})(K===X?-1:1),void W.preventDefault();if([ne,se].includes(K)){const le=K===ne?-1:1,J=k.value[0]<O.value?"start":"end";return G[`${J}_scrollDown`](le),void W.preventDefault()}}]),t("set-picker-option",["getDefaultValue",()=>{if(mt(p))return p.map(K=>vn(K).locale(i.value));const W=vn(p).locale(i.value);return[W,W.add(60,"m")]}]),t("set-picker-option",["getRangeAvailableTime",V]),(W,K)=>W.actualVisible?(Y(),fe("div",{key:0,class:oe([M(a).b("range-picker"),M(l).b("panel")])},[ce("div",{class:oe(M(a).be("range-picker","content"))},[ce("div",{class:oe(M(a).be("range-picker","cell"))},[ce("div",{class:oe(M(a).be("range-picker","header"))},Ye(M(o)("el.datepicker.startTime")),3),ce("div",{class:oe(M(m))},[ie(ZF,{ref:"minSpinner",role:"start","show-seconds":M(w),"am-pm-mode":M(x),"arrow-control":M(u),"spinner-date":M(g),"disabled-hours":N,"disabled-minutes":B,"disabled-seconds":L,onChange:_,onSetOption:M($),onSelectRange:I},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),ce("div",{class:oe(M(a).be("range-picker","cell"))},[ce("div",{class:oe(M(a).be("range-picker","header"))},Ye(M(o)("el.datepicker.endTime")),3),ce("div",{class:oe(M(v))},[ie(ZF,{ref:"maxSpinner",role:"end","show-seconds":M(w),"am-pm-mode":M(x),"arrow-control":M(u),"spinner-date":M(b),"disabled-hours":N,"disabled-minutes":B,"disabled-seconds":L,onChange:E,onSetOption:M($),onSelectRange:F},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),ce("div",{class:oe(M(a).be("panel","footer"))},[ce("button",{type:"button",class:oe([M(a).be("panel","btn"),"cancel"]),onClick:K[0]||(K[0]=X=>{t("pick",y.value,!1)})},Ye(M(o)("el.datepicker.cancel")),3),ce("button",{type:"button",class:oe([M(a).be("panel","btn"),"confirm"]),disabled:M(T),onClick:K[1]||(K[1]=X=>((te=!1)=>{t("pick",[g.value,b.value],te)})())},Ye(M(o)("el.datepicker.confirm")),11,bLe)],2)],2)):Fe("v-if",!0)}});var wLe=Nt(ALe,[["__file","panel-time-range.vue"]]);vn.extend(MO);var xLe=Te({name:"ElTimePicker",install:null,props:{...$9,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,t){const n=de(),[r,o]=e.isRange?["timerange",wLe]:["time",K9],i=a=>t.emit("update:modelValue",a);return qn("ElPopperOptions",e.popperOptions),t.expose({focus:a=>{var l;(l=n.value)==null||l.handleFocusInput(a)},blur:a=>{var l;(l=n.value)==null||l.handleBlurInput(a)},handleOpen:()=>{var a;(a=n.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=n.value)==null||a.handleClose()}}),()=>{var a;const l=(a=e.format)!=null?a:V9;return ie(Hae,Un(e,{ref:n,type:r,format:l,"onUpdate:modelValue":i}),{default:s=>ie(o,s,null)})}}});const Y9=xLe;Y9.install=e=>{e.component(Y9.name,Y9)},BO=Y9;var ale={exports:{}};ale.exports=function(e,t,n){var r=t.prototype,o=function(u){return u&&(u.indexOf?u:u.s)},i=function(u,c,d,f,p){var m=u.name?u:u.$locale(),v=o(m[c]),g=o(m[d]),b=v||g.map(function(w){return w.slice(0,f)});if(!p)return b;var y=m.weekStart;return b.map(function(w,x){return b[(x+(y||0))%7]})},a=function(){return n.Ls[n.locale()]},l=function(u,c){return u.formats[c]||function(d){return d.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,p,m){return p||m.slice(1)})}(u.formats[c.toUpperCase()])},s=function(){var u=this;return{months:function(c){return c?c.format("MMMM"):i(u,"months")},monthsShort:function(c){return c?c.format("MMM"):i(u,"monthsShort","months",3)},firstDayOfWeek:function(){return u.$locale().weekStart||0},weekdays:function(c){return c?c.format("dddd"):i(u,"weekdays")},weekdaysMin:function(c){return c?c.format("dd"):i(u,"weekdaysMin","weekdays",2)},weekdaysShort:function(c){return c?c.format("ddd"):i(u,"weekdaysShort","weekdays",3)},longDateFormat:function(c){return l(u.$locale(),c)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},n.localeData=function(){var u=a();return{firstDayOfWeek:function(){return u.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(c){return l(u,c)},meridiem:u.meridiem,ordinal:u.ordinal}},n.months=function(){return i(a(),"months")},n.monthsShort=function(){return i(a(),"monthsShort","months",3)},n.weekdays=function(u){return i(a(),"weekdays",null,null,u)},n.weekdaysShort=function(u){return i(a(),"weekdaysShort","weekdays",3,u)},n.weekdaysMin=function(u){return i(a(),"weekdaysMin","weekdays",2,u)}};const _Le=_l(ale.exports),lle={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:da,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},sle={[xn]:e=>an(e)||Kn(e)||Ki(e),change:e=>an(e)||Kn(e)||Ki(e)},dg=Symbol("checkboxGroupContextKey"),ELe=(e,{model:t,isLimitExceeded:n,hasOwnLabel:r,isDisabled:o,isLabeledByFormItem:i})=>{const a=Rt(dg,void 0),{formItem:l}=qa(),{emit:s}=dn();function u(d){var f,p,m,v;return[!0,e.trueValue,e.trueLabel].includes(d)?(p=(f=e.trueValue)!=null?f:e.trueLabel)==null||p:(v=(m=e.falseValue)!=null?m:e.falseLabel)!=null&&v}const c=ee(()=>(a==null?void 0:a.validateEvent)||e.validateEvent);return Je(()=>e.modelValue,()=>{c.value&&(l==null||l.validate("change").catch(d=>{}))}),{handleChange:function(d){if(n.value)return;const f=d.target;s("change",u(f.checked),d)},onClickRoot:async function(d){!n.value&&!r.value&&!o.value&&i.value&&(d.composedPath().some(f=>f.tagName==="LABEL")||(t.value=u([!1,e.falseValue,e.falseLabel].includes(t.value)),await St(),function(f,p){s("change",u(f),p)}(t.value,d)))}}},ule=(e,t)=>{const{formItem:n}=qa(),{model:r,isGroup:o,isLimitExceeded:i}=(b=>{const y=de(!1),{emit:w}=dn(),x=Rt(dg,void 0),_=ee(()=>Wi(x)===!1),E=de(!1),C=ee({get(){var T,k;return _.value?(T=x==null?void 0:x.modelValue)==null?void 0:T.value:(k=b.modelValue)!=null?k:y.value},set(T){var k,I;_.value&&mt(T)?(E.value=((k=x==null?void 0:x.max)==null?void 0:k.value)!==void 0&&T.length>(x==null?void 0:x.max.value)&&T.length>C.value.length,E.value===!1&&((I=x==null?void 0:x.changeEvent)==null||I.call(x,T))):(w(xn,T),y.value=T)}});return{model:C,isGroup:_,isLimitExceeded:E}})(e),{isFocused:a,isChecked:l,checkboxButtonSize:s,checkboxSize:u,hasOwnLabel:c,actualValue:d}=((b,y,{model:w})=>{const x=Rt(dg,void 0),_=de(!1),E=ee(()=>Z0(b.value)?b.label:b.value),C=ee(()=>{const I=w.value;return Ki(I)?I:mt(I)?wn(E.value)?I.map(Zn).some(O=>ns(O,E.value)):I.map(Zn).includes(E.value):I!=null?I===b.trueValue||I===b.trueLabel:!!I}),T=$i(ee(()=>{var I;return(I=x==null?void 0:x.size)==null?void 0:I.value}),{prop:!0}),k=$i(ee(()=>{var I;return(I=x==null?void 0:x.size)==null?void 0:I.value}));return{checkboxButtonSize:T,isChecked:C,isFocused:_,checkboxSize:k,hasOwnLabel:ee(()=>!!y.default||!Z0(E.value)),actualValue:E}})(e,t,{model:r}),{isDisabled:f}=(({model:b,isChecked:y})=>{const w=Rt(dg,void 0),x=ee(()=>{var _,E;const C=(_=w==null?void 0:w.max)==null?void 0:_.value,T=(E=w==null?void 0:w.min)==null?void 0:E.value;return!Wi(C)&&b.value.length>=C&&!y.value||!Wi(T)&&b.value.length<=T&&y.value});return{isDisabled:wl(ee(()=>(w==null?void 0:w.disabled.value)||x.value)),isLimitDisabled:x}})({model:r,isChecked:l}),{inputId:p,isLabeledByFormItem:m}=Ac(e,{formItemContext:n,disableIdGeneration:c,disableIdManagement:o}),{handleChange:v,onClickRoot:g}=ELe(e,{model:r,isLimitExceeded:i,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:m});return e.checked&&function(){var b,y;mt(r.value)&&!r.value.includes(d.value)?r.value.push(d.value):r.value=(y=(b=e.trueValue)!=null?b:e.trueLabel)==null||y}(),y0({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},ee(()=>o.value&&Z0(e.value))),y0({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},ee(()=>!!e.trueLabel)),y0({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},ee(()=>!!e.falseLabel)),{inputId:p,isLabeledByFormItem:m,isChecked:l,isDisabled:f,isFocused:a,checkboxButtonSize:s,checkboxSize:u,hasOwnLabel:c,model:r,actualValue:d,handleChange:v,onClickRoot:g}},CLe=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],SLe=["id","indeterminate","disabled","value","name","tabindex"],kLe=Te({name:"ElCheckbox"}),DLe=Te({...kLe,props:lle,emits:sle,setup(e){const t=e,n=Ga(),{inputId:r,isLabeledByFormItem:o,isChecked:i,isDisabled:a,isFocused:l,checkboxSize:s,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:p}=ule(t,n),m=_t("checkbox"),v=ee(()=>[m.b(),m.m(s.value),m.is("disabled",a.value),m.is("bordered",t.border),m.is("checked",i.value)]),g=ee(()=>[m.e("input"),m.is("disabled",a.value),m.is("checked",i.value),m.is("indeterminate",t.indeterminate),m.is("focus",l.value)]);return(b,y)=>(Y(),Pe(Hn(!M(u)&&M(o)?"span":"label"),{class:oe(M(v)),"aria-controls":b.indeterminate?b.controls:null,onClick:M(p)},{default:he(()=>{var w,x;return[ce("span",{class:oe(M(g))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?nn((Y(),fe("input",{key:0,id:M(r),"onUpdate:modelValue":y[0]||(y[0]=_=>Jn(c)?c.value=_:null),class:oe(M(m).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:M(a),"true-value":(w=b.trueValue)!=null?w:b.trueLabel,"false-value":(x=b.falseValue)!=null?x:b.falseLabel,onChange:y[1]||(y[1]=(..._)=>M(f)&&M(f)(..._)),onFocus:y[2]||(y[2]=_=>l.value=!0),onBlur:y[3]||(y[3]=_=>l.value=!1),onClick:y[4]||(y[4]=Gt(()=>{},["stop"]))},null,42,CLe)),[[Qf,M(c)]]):nn((Y(),fe("input",{key:1,id:M(r),"onUpdate:modelValue":y[5]||(y[5]=_=>Jn(c)?c.value=_:null),class:oe(M(m).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:M(a),value:M(d),name:b.name,tabindex:b.tabindex,onChange:y[6]||(y[6]=(..._)=>M(f)&&M(f)(..._)),onFocus:y[7]||(y[7]=_=>l.value=!0),onBlur:y[8]||(y[8]=_=>l.value=!1),onClick:y[9]||(y[9]=Gt(()=>{},["stop"]))},null,42,SLe)),[[Qf,M(c)]]),ce("span",{class:oe(M(m).e("inner"))},null,2)],2),M(u)?(Y(),fe("span",{key:0,class:oe(M(m).e("label"))},[ft(b.$slots,"default"),b.$slots.default?Fe("v-if",!0):(Y(),fe(bt,{key:0},[Dt(Ye(b.label),1)],64))],2)):Fe("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var OLe=Nt(DLe,[["__file","checkbox.vue"]]);const TLe=["name","tabindex","disabled","true-value","false-value"],MLe=["name","tabindex","disabled","value"],NLe=Te({name:"ElCheckboxButton"}),FLe=Te({...NLe,props:lle,emits:sle,setup(e){const t=e,n=Ga(),{isFocused:r,isChecked:o,isDisabled:i,checkboxButtonSize:a,model:l,actualValue:s,handleChange:u}=ule(t,n),c=Rt(dg,void 0),d=_t("checkbox"),f=ee(()=>{var m,v,g,b;const y=(v=(m=c==null?void 0:c.fill)==null?void 0:m.value)!=null?v:"";return{backgroundColor:y,borderColor:y,color:(b=(g=c==null?void 0:c.textColor)==null?void 0:g.value)!=null?b:"",boxShadow:y?`-1px 0 0 0 ${y}`:void 0}}),p=ee(()=>[d.b("button"),d.bm("button",a.value),d.is("disabled",i.value),d.is("checked",o.value),d.is("focus",r.value)]);return(m,v)=>{var g,b;return Y(),fe("label",{class:oe(M(p))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?nn((Y(),fe("input",{key:0,"onUpdate:modelValue":v[0]||(v[0]=y=>Jn(l)?l.value=y:null),class:oe(M(d).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:M(i),"true-value":(g=m.trueValue)!=null?g:m.trueLabel,"false-value":(b=m.falseValue)!=null?b:m.falseLabel,onChange:v[1]||(v[1]=(...y)=>M(u)&&M(u)(...y)),onFocus:v[2]||(v[2]=y=>r.value=!0),onBlur:v[3]||(v[3]=y=>r.value=!1),onClick:v[4]||(v[4]=Gt(()=>{},["stop"]))},null,42,TLe)),[[Qf,M(l)]]):nn((Y(),fe("input",{key:1,"onUpdate:modelValue":v[5]||(v[5]=y=>Jn(l)?l.value=y:null),class:oe(M(d).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:M(i),value:M(s),onChange:v[6]||(v[6]=(...y)=>M(u)&&M(u)(...y)),onFocus:v[7]||(v[7]=y=>r.value=!0),onBlur:v[8]||(v[8]=y=>r.value=!1),onClick:v[9]||(v[9]=Gt(()=>{},["stop"]))},null,42,MLe)),[[Qf,M(l)]]),m.$slots.default||m.label?(Y(),fe("span",{key:2,class:oe(M(d).be("button","inner")),style:$t(M(o)?M(f):void 0)},[ft(m.$slots,"default",{},()=>[Dt(Ye(m.label),1)])],6)):Fe("v-if",!0)],2)}}});var cle=Nt(FLe,[["__file","checkbox-button.vue"]]);const RLe=Lt({modelValue:{type:Array,default:()=>[]},disabled:Boolean,min:Number,max:Number,size:da,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),ILe={[xn]:e=>mt(e),change:e=>mt(e)},BLe=Te({name:"ElCheckboxGroup"}),LLe=Te({...BLe,props:RLe,emits:ILe,setup(e,{emit:t}){const n=e,r=_t("checkbox"),{formItem:o}=qa(),{inputId:i,isLabeledByFormItem:a}=Ac(n,{formItemContext:o}),l=async u=>{t(xn,u),await St(),t("change",u)},s=ee({get:()=>n.modelValue,set(u){l(u)}});return qn(dg,{...HQ(di(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:s,changeEvent:l}),Je(()=>n.modelValue,()=>{n.validateEvent&&(o==null||o.validate("change").catch(u=>{}))}),(u,c)=>{var d;return Y(),Pe(Hn(u.tag),{id:M(i),class:oe(M(r).b("group")),role:"group","aria-label":M(a)?void 0:u.label||"checkbox-group","aria-labelledby":M(a)?(d=M(o))==null?void 0:d.labelId:void 0},{default:he(()=>[ft(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var dle=Nt(LLe,[["__file","checkbox-group.vue"]]);let eR,fle,tR,nR,rR,ple,hle,vle;bl=Cr(OLe,{CheckboxButton:cle,CheckboxGroup:dle}),VO=Ya(cle),C3=Ya(dle),eR=Lt({modelValue:{type:[String,Number,Boolean],default:void 0},size:da,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),fle=Lt({...eR,border:Boolean}),tR={[xn]:e=>an(e)||Kn(e)||Ki(e),[Xo]:e=>an(e)||Kn(e)||Ki(e)},nR=Symbol("radioGroupKey"),rR=(e,t)=>{const n=de(),r=Rt(nR,void 0),o=ee(()=>!!r),i=ee(()=>Z0(e.value)?e.label:e.value),a=ee({get:()=>o.value?r.modelValue:e.modelValue,set(d){o.value?r.changeEvent(d):t&&t(xn,d),n.value.checked=e.modelValue===i.value}}),l=$i(ee(()=>r==null?void 0:r.size)),s=wl(ee(()=>r==null?void 0:r.disabled)),u=de(!1),c=ee(()=>s.value||o.value&&a.value!==i.value?-1:0);return y0({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},ee(()=>o.value&&Z0(e.value))),{radioRef:n,isGroup:o,radioGroup:r,focus:u,size:l,disabled:s,tabIndex:c,modelValue:a,actualValue:i}},ple=["value","name","disabled"],hle=Te({name:"ElRadio"}),vle=Te({...hle,props:fle,emits:tR,setup(e,{emit:t}){const n=e,r=_t("radio"),{radioRef:o,radioGroup:i,focus:a,size:l,disabled:s,modelValue:u,actualValue:c}=rR(n,t);function d(){St(()=>t("change",u.value))}return(f,p)=>{var m;return Y(),fe("label",{class:oe([M(r).b(),M(r).is("disabled",M(s)),M(r).is("focus",M(a)),M(r).is("bordered",f.border),M(r).is("checked",M(u)===M(c)),M(r).m(M(l))])},[ce("span",{class:oe([M(r).e("input"),M(r).is("disabled",M(s)),M(r).is("checked",M(u)===M(c))])},[nn(ce("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":p[0]||(p[0]=v=>Jn(u)?u.value=v:null),class:oe(M(r).e("original")),value:M(c),name:f.name||((m=M(i))==null?void 0:m.name),disabled:M(s),type:"radio",onFocus:p[1]||(p[1]=v=>a.value=!0),onBlur:p[2]||(p[2]=v=>a.value=!1),onChange:d,onClick:p[3]||(p[3]=Gt(()=>{},["stop"]))},null,42,ple),[[yb,M(u)]]),ce("span",{class:oe(M(r).e("inner"))},null,2)],2),ce("span",{class:oe(M(r).e("label")),onKeydown:p[4]||(p[4]=Gt(()=>{},["stop"]))},[ft(f.$slots,"default",{},()=>[Dt(Ye(f.label),1)])],34)],2)}}});var PLe=Nt(vle,[["__file","radio.vue"]]);const jLe=Lt({...eR}),VLe=["value","name","disabled"],zLe=Te({name:"ElRadioButton"}),HLe=Te({...zLe,props:jLe,setup(e){const t=e,n=_t("radio"),{radioRef:r,focus:o,size:i,disabled:a,modelValue:l,radioGroup:s,actualValue:u}=rR(t),c=ee(()=>({backgroundColor:(s==null?void 0:s.fill)||"",borderColor:(s==null?void 0:s.fill)||"",boxShadow:s!=null&&s.fill?`-1px 0 0 0 ${s.fill}`:"",color:(s==null?void 0:s.textColor)||""}));return(d,f)=>{var p;return Y(),fe("label",{class:oe([M(n).b("button"),M(n).is("active",M(l)===M(u)),M(n).is("disabled",M(a)),M(n).is("focus",M(o)),M(n).bm("button",M(i))])},[nn(ce("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":f[0]||(f[0]=m=>Jn(l)?l.value=m:null),class:oe(M(n).be("button","original-radio")),value:M(u),type:"radio",name:d.name||((p=M(s))==null?void 0:p.name),disabled:M(a),onFocus:f[1]||(f[1]=m=>o.value=!0),onBlur:f[2]||(f[2]=m=>o.value=!1),onClick:f[3]||(f[3]=Gt(()=>{},["stop"]))},null,42,VLe),[[yb,M(l)]]),ce("span",{class:oe(M(n).be("button","inner")),style:$t(M(l)===M(u)?M(c):{}),onKeydown:f[4]||(f[4]=Gt(()=>{},["stop"]))},[ft(d.$slots,"default",{},()=>[Dt(Ye(d.label),1)])],38)],2)}}});var mle=Nt(HLe,[["__file","radio-button.vue"]]);const $Le=Lt({id:{type:String,default:void 0},size:da,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),ULe=tR,WLe=["id","aria-label","aria-labelledby"],GLe=Te({name:"ElRadioGroup"}),qLe=Te({...GLe,props:$Le,emits:ULe,setup(e,{emit:t}){const n=e,r=_t("radio"),o=Zl(),i=de(),{formItem:a}=qa(),{inputId:l,isLabeledByFormItem:s}=Ac(n,{formItemContext:a});yn(()=>{const c=i.value.querySelectorAll("[type=radio]"),d=c[0];!Array.from(c).some(f=>f.checked)&&d&&(d.tabIndex=0)});const u=ee(()=>n.name||o.value);return qn(nR,Qn({...di(n),changeEvent:c=>{t(xn,c),St(()=>t("change",c))},name:u})),Je(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(c=>{}))}),(c,d)=>(Y(),fe("div",{id:M(l),ref_key:"radioGroupRef",ref:i,class:oe(M(r).b("group")),role:"radiogroup","aria-label":M(s)?void 0:c.label||"radio-group","aria-labelledby":M(s)?M(a).labelId:void 0},[ft(c.$slots,"default")],10,WLe))}});var gle=Nt(qLe,[["__file","radio-group.vue"]]);k3=Cr(PLe,{RadioButton:mle,RadioGroup:gle}),Ow=Ya(gle),jO=Ya(mle);var KLe=Te({name:"NodeContent",setup:()=>({ns:_t("cascader-node")}),render(){const{ns:e}=this,{node:t,panel:n}=this.$parent,{data:r,label:o}=t,{renderLabelFn:i}=n;return pn("span",{class:e.e("label")},i?i({node:t,data:r}):o)}});const oR=Symbol(),YLe=Te({name:"ElCascaderNode",components:{ElCheckbox:bl,ElRadio:k3,NodeContent:KLe,ElIcon:Ft,Check:jb,Loading:jd,ArrowRight:Su},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const n=Rt(oR),r=_t("cascader-node"),o=ee(()=>n.isHoverMenu),i=ee(()=>n.config.multiple),a=ee(()=>n.config.checkStrictly),l=ee(()=>{var w;return(w=n.checkedNodes[0])==null?void 0:w.uid}),s=ee(()=>e.node.isDisabled),u=ee(()=>e.node.isLeaf),c=ee(()=>a.value&&!u.value||!s.value),d=ee(()=>p(n.expandingNode)),f=ee(()=>a.value&&n.checkedNodes.some(p)),p=w=>{var x;const{level:_,uid:E}=e.node;return((x=w==null?void 0:w.pathNodes[_-1])==null?void 0:x.uid)===E},m=()=>{d.value||n.expandNode(e.node)},v=w=>{const{node:x}=e;w!==x.checked&&n.handleCheckChange(x,w)},g=()=>{n.lazyLoad(e.node,()=>{u.value||m()})},b=()=>{const{node:w}=e;c.value&&!w.loading&&(w.loaded?m():g())},y=w=>{e.node.loaded?(v(w),!a.value&&m()):g()};return{panel:n,isHoverMenu:o,multiple:i,checkStrictly:a,checkedNodeId:l,isDisabled:s,isLeaf:u,expandable:c,inExpandingPath:d,inCheckedPath:f,ns:r,handleHoverExpand:w=>{o.value&&(b(),!u.value&&t("expand",w))},handleExpand:b,handleClick:()=>{o.value&&!u.value||(!u.value||s.value||a.value||i.value?b():y(!0))},handleCheck:y,handleSelectCheck:w=>{a.value?(v(w),e.node.loaded&&m()):y(w)}}}}),XLe=["id","aria-haspopup","aria-owns","aria-expanded","tabindex"],QLe=ce("span",null,null,-1),JLe=Te({name:"ElCascaderMenu",components:{Loading:jd,ElIcon:Ft,ElScrollbar:wd,ElCascaderNode:Nt(YLe,[["render",function(e,t,n,r,o,i){const a=Qe("el-checkbox"),l=Qe("el-radio"),s=Qe("check"),u=Qe("el-icon"),c=Qe("node-content"),d=Qe("loading"),f=Qe("arrow-right");return Y(),fe("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!e.isLeaf,"aria-owns":e.isLeaf?null:e.menuId,"aria-expanded":e.inExpandingPath,tabindex:e.expandable?-1:void 0,class:oe([e.ns.b(),e.ns.is("selectable",e.checkStrictly),e.ns.is("active",e.node.checked),e.ns.is("disabled",!e.expandable),e.inExpandingPath&&"in-active-path",e.inCheckedPath&&"in-checked-path"]),onMouseenter:t[2]||(t[2]=(...p)=>e.handleHoverExpand&&e.handleHoverExpand(...p)),onFocus:t[3]||(t[3]=(...p)=>e.handleHoverExpand&&e.handleHoverExpand(...p)),onClick:t[4]||(t[4]=(...p)=>e.handleClick&&e.handleClick(...p))},[Fe(" prefix "),e.multiple?(Y(),Pe(a,{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:e.isDisabled,onClick:t[0]||(t[0]=Gt(()=>{},["stop"])),"onUpdate:modelValue":e.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onUpdate:modelValue"])):e.checkStrictly?(Y(),Pe(l,{key:1,"model-value":e.checkedNodeId,label:e.node.uid,disabled:e.isDisabled,"onUpdate:modelValue":e.handleSelectCheck,onClick:t[1]||(t[1]=Gt(()=>{},["stop"]))},{default:he(()=>[Fe(` |
|
26 |
Add an empty element to avoid render label, |
|
27 |
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 |
|
28 |
`),QLe]),_:1},8,["model-value","label","disabled","onUpdate:modelValue"])):e.isLeaf&&e.node.checked?(Y(),Pe(u,{key:2,class:oe(e.ns.e("prefix"))},{default:he(()=>[ie(s)]),_:1},8,["class"])):Fe("v-if",!0),Fe(" content "),ie(c),Fe(" postfix "),e.isLeaf?Fe("v-if",!0):(Y(),fe(bt,{key:3},[e.node.loading?(Y(),Pe(u,{key:0,class:oe([e.ns.is("loading"),e.ns.e("postfix")])},{default:he(()=>[ie(d)]),_:1},8,["class"])):(Y(),Pe(u,{key:1,class:oe(["arrow-right",e.ns.e("postfix")])},{default:he(()=>[ie(f)]),_:1},8,["class"]))],64))],42,XLe)}],["__file","node.vue"]])},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=dn(),n=_t("cascader-menu"),{t:r}=Gr(),o=Zl();let i=null,a=null;const l=Rt(oR),s=de(null),u=ee(()=>!e.nodes.length),c=ee(()=>!l.initialLoaded),d=ee(()=>`${o.value}-${e.index}`),f=()=>{a&&(clearTimeout(a),a=null)},p=()=>{s.value&&(s.value.innerHTML="",f())};return{ns:n,panel:l,hoverZone:s,isEmpty:u,isLoading:c,menuId:d,t:r,handleExpand:m=>{i=m.target},handleMouseMove:m=>{if(l.isHoverMenu&&i&&s.value)if(i.contains(m.target)){f();const v=t.vnode.el,{left:g}=v.getBoundingClientRect(),{offsetWidth:b,offsetHeight:y}=v,w=m.clientX-g,x=i.offsetTop,_=x+i.offsetHeight;s.value.innerHTML=` |
|
29 |
<path style="pointer-events: auto;" fill="transparent" d="M${w} ${x} L${b} 0 V${x} Z" /> |
|
30 |
<path style="pointer-events: auto;" fill="transparent" d="M${w} ${_} L${b} ${y} V${_} Z" /> |
|
31 |
`}else a||(a=window.setTimeout(p,l.config.hoverThreshold))},clearHoverZone:p}}});var ZLe=Nt(JLe,[["render",function(e,t,n,r,o,i){const a=Qe("el-cascader-node"),l=Qe("loading"),s=Qe("el-icon"),u=Qe("el-scrollbar");return Y(),Pe(u,{key:e.menuId,tag:"ul",role:"menu",class:oe(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:he(()=>{var c;return[(Y(!0),fe(bt,null,bn(e.nodes,d=>(Y(),Pe(a,{key:d.uid,node:d,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),e.isLoading?(Y(),fe("div",{key:0,class:oe(e.ns.e("empty-text"))},[ie(s,{size:"14",class:oe(e.ns.is("loading"))},{default:he(()=>[ie(l)]),_:1},8,["class"]),Dt(" "+Ye(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(Y(),fe("div",{key:1,class:oe(e.ns.e("empty-text"))},Ye(e.t("el.cascader.noData")),3)):(c=e.panel)!=null&&c.isHoverMenu?(Y(),fe("svg",{key:2,ref:"hoverZone",class:oe(e.ns.e("hover-zone"))},null,2)):Fe("v-if",!0)]}),_:1},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}],["__file","menu.vue"]]);let ePe=0,iR=class sJ{constructor(t,n,r,o=!1){this.data=t,this.config=n,this.parent=r,this.root=o,this.uid=ePe++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:i,label:a,children:l}=n,s=t[l],u=(c=>{const d=[c];let{parent:f}=c;for(;f;)d.unshift(f),f=f.parent;return d})(this);this.level=o?0:r?r.level+1:1,this.value=t[i],this.label=t[a],this.pathNodes=u,this.pathValues=u.map(c=>c.value),this.pathLabels=u.map(c=>c.label),this.childrenData=s,this.children=(s||[]).map(c=>new sJ(c,n,this)),this.loaded=!n.lazy||this.isLeaf||!cs(s)}get isDisabled(){const{data:t,parent:n,config:r}=this,{disabled:o,checkStrictly:i}=r;return(Ut(o)?o(t,this):!!t[o])||!i&&(n==null?void 0:n.isDisabled)}get isLeaf(){const{data:t,config:n,childrenData:r,loaded:o}=this,{lazy:i,leaf:a}=n,l=Ut(a)?a(t,this):t[a];return Wi(l)?!(i&&!o)&&!(Array.isArray(r)&&r.length):!!l}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:n,children:r}=this,o=new sJ(t,this.config,this);return Array.isArray(n)?n.push(t):this.childrenData=[t],r.push(o),o}calcText(t,n){const r=t?this.pathLabels.join(n):this.label;return this.text=r,r}broadcast(t,...n){const r=`onParent${Ru(t)}`;this.children.forEach(o=>{o&&(o.broadcast(t,...n),o[r]&&o[r](...n))})}emit(t,...n){const{parent:r}=this,o=`onChild${Ru(t)}`;r&&(r[o]&&r[o](...n),r.emit(t,...n))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(o=>!o.isDisabled),r=!!n.length&&n.every(o=>o.checked);this.setCheckState(r)}setCheckState(t){const n=this.children.length,r=this.children.reduce((o,i)=>o+(i.checked?1:i.indeterminate?.5:0),0);this.checked=this.loaded&&this.children.filter(o=>!o.isDisabled).every(o=>o.loaded&&o.checked)&&t,this.indeterminate=this.loaded&&r!==n&&r>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:n,multiple:r}=this.config;n||!r?this.checked=t:(this.broadcast("check",t),this.setCheckState(t),this.emit("check"))}};const aR=(e,t)=>e.reduce((n,r)=>(r.isLeaf?n.push(r):(!t&&n.push(r),n=n.concat(aR(r.children,t))),n),[]);class yle{constructor(t,n){this.config=n;const r=(t||[]).map(o=>new iR(o,this.config));this.nodes=r,this.allNodes=aR(r,!1),this.leafNodes=aR(r,!0)}getNodes(){return this.nodes}getFlattedNodes(t){return t?this.leafNodes:this.allNodes}appendNode(t,n){const r=n?n.appendChild(t):new iR(t,this.config);n||this.nodes.push(r),this.allNodes.push(r),r.isLeaf&&this.leafNodes.push(r)}appendNodes(t,n){t.forEach(r=>this.appendNode(r,n))}getNodeByValue(t,n=!1){return!t&&t!==0?null:this.getFlattedNodes(n).find(r=>ns(r.value,t)||ns(r.pathValues,t))||null}getSameNode(t){return t&&this.getFlattedNodes(!1).find(({value:n,level:r})=>ns(t.value,n)&&t.level===r)||null}}const ble=Lt({modelValue:{type:[Number,String,Array]},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({})}}),tPe={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:fr,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},Ale=e=>{if(!e)return 0;const t=e.id.split("-");return Number(t[t.length-2])},nPe=Te({name:"ElCascaderPanel",components:{ElCascaderMenu:ZLe},props:{...ble,border:{type:Boolean,default:!0},renderLabel:Function},emits:[xn,Xo,"close","expand-change"],setup(e,{emit:t,slots:n}){let r=!1;const o=_t("cascader"),i=(k=>ee(()=>({...tPe,...k.props})))(e);let a=null;const l=de(!0),s=de([]),u=de(null),c=de([]),d=de(null),f=de([]),p=ee(()=>i.value.expandTrigger==="hover"),m=ee(()=>e.renderLabel||n.default),v=(k,I)=>{const O=i.value;(k=k||new iR({},O,void 0,!0)).loading=!0,O.lazyLoad(k,F=>{const N=k,B=N.root?null:N;F&&(a==null||a.appendNodes(F,B)),N.loading=!1,N.loaded=!0,N.childrenData=N.childrenData||[],I&&I(F)})},g=(k,I)=>{var O;const{level:F}=k,N=c.value.slice(0,F);let B;k.isLeaf?B=k.pathNodes[F-2]:(B=k,N.push(k.children)),((O=d.value)==null?void 0:O.uid)!==(B==null?void 0:B.uid)&&(d.value=k,c.value=N,!I&&t("expand-change",(k==null?void 0:k.pathValues)||[]))},b=(k,I,O=!0)=>{const{checkStrictly:F,multiple:N}=i.value,B=f.value[0];r=!0,!N&&(B==null||B.doCheck(!1)),k.doCheck(I),_(),O&&!N&&!F&&t("close"),!O&&!N&&!F&&y(k)},y=k=>{k&&(k=k.parent,y(k),k&&g(k))},w=k=>a==null?void 0:a.getFlattedNodes(k),x=k=>{var I;return(I=w(k))==null?void 0:I.filter(O=>O.checked!==!1)},_=()=>{var k;const{checkStrictly:I,multiple:O}=i.value,F=((B,L)=>{const V=L.slice(0),P=V.map(U=>U.uid),H=B.reduce((U,G)=>{const z=P.indexOf(G.uid);return z>-1&&(U.push(G),V.splice(z,1),P.splice(z,1)),U},[]);return H.push(...V),H})(f.value,x(!I)),N=F.map(B=>B.valueByOption);f.value=F,u.value=O?N:(k=N[0])!=null?k:null},E=(k=!1,I=!1)=>{const{modelValue:O}=e,{lazy:F,multiple:N,checkStrictly:B}=i.value,L=!B;var V;if(l.value&&!r&&(I||!ns(O,u.value)))if(F&&!k){const P=GN((V=Ml(O))!=null&&V.length?Ib(V,xIe):[]).map(H=>a==null?void 0:a.getNodeByValue(H)).filter(H=>!!H&&!H.loaded&&!H.loading);P.length?P.forEach(H=>{v(H,()=>E(!1,I))}):E(!0,I)}else{const P=N?Ml(O):[O],H=GN(P.map(U=>a==null?void 0:a.getNodeByValue(U,L)));C(H,I),u.value=Mf(O)}},C=(k,I=!0)=>{const{checkStrictly:O}=i.value,F=f.value,N=k.filter(V=>!!V&&(O||V.isLeaf)),B=a==null?void 0:a.getSameNode(d.value),L=I&&B||N[0];L?L.pathNodes.forEach(V=>g(V,!0)):d.value=null,F.forEach(V=>V.doCheck(!1)),Qn(N).forEach(V=>V.doCheck(!0)),f.value=N,St(T)},T=()=>{rr&&s.value.forEach(k=>{const I=k==null?void 0:k.$el;I&&Ooe(I.querySelector(`.${o.namespace.value}-scrollbar__wrap`),I.querySelector(`.${o.b("node")}.${o.is("active")}`)||I.querySelector(`.${o.b("node")}.in-active-path`))})};return qn(oR,Qn({config:i,expandingNode:d,checkedNodes:f,isHoverMenu:p,initialLoaded:l,renderLabelFn:m,lazyLoad:v,expandNode:g,handleCheckChange:b})),Je([i,()=>e.options],()=>{const{options:k}=e,I=i.value;r=!1,a=new yle(k,I),c.value=[a.getNodes()],I.lazy&&cs(e.options)?(l.value=!1,v(void 0,O=>{O&&(a=new yle(O,I),c.value=[a.getNodes()]),l.value=!0,E(!1,!0)})):E(!1,!0)},{deep:!0,immediate:!0}),Je(()=>e.modelValue,()=>{r=!1,E()},{deep:!0}),Je(()=>u.value,k=>{ns(k,e.modelValue)||(t(xn,k),t(Xo,k))}),ub(()=>s.value=[]),yn(()=>!cs(e.modelValue)&&E()),{ns:o,menuList:s,menus:c,checkedNodes:f,handleKeyDown:k=>{const I=k.target,{code:O}=k;switch(O){case Xt.up:case Xt.down:{k.preventDefault();const F=O===Xt.up?-1:1;_b(aN(I,F,`.${o.b("node")}[tabindex="-1"]`));break}case Xt.left:{k.preventDefault();const F=s.value[Ale(I)-1],N=F==null?void 0:F.$el.querySelector(`.${o.b("node")}[aria-expanded="true"]`);_b(N);break}case Xt.right:{k.preventDefault();const F=s.value[Ale(I)+1],N=F==null?void 0:F.$el.querySelector(`.${o.b("node")}[tabindex="-1"]`);_b(N);break}case Xt.enter:(F=>{if(!F)return;const N=F.querySelector("input");N?N.click():iN(F)&&F.click()})(I)}},handleCheckChange:b,getFlattedNodes:w,getCheckedNodes:x,clearCheckedNodes:()=>{f.value.forEach(k=>k.doCheck(!1)),_(),c.value=c.value.slice(0,1),d.value=null,t("expand-change",[])},calculateCheckedValue:_,scrollToExpandingNode:T}}});var X9=Nt(nPe,[["render",function(e,t,n,r,o,i){const a=Qe("el-cascader-menu");return Y(),fe("div",{class:oe([e.ns.b("panel"),e.ns.is("bordered",e.border)]),onKeydown:t[0]||(t[0]=(...l)=>e.handleKeyDown&&e.handleKeyDown(...l))},[(Y(!0),fe(bt,null,bn(e.menus,(l,s)=>(Y(),Pe(a,{key:s,ref_for:!0,ref:u=>e.menuList[s]=u,index:s,nodes:[...l]},null,8,["index","nodes"]))),128))],34)}],["__file","index.vue"]]);X9.install=e=>{e.component(X9.name,X9)};let wle,xle,_le,Ele;wle=X9,Pw=Lt({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:bm},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),xle={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},_le=Te({name:"ElTag"}),Ele=Te({..._le,props:Pw,emits:xle,setup(e,{emit:t}){const n=e,r=$i(),o=_t("tag"),i=ee(()=>{const{type:s,hit:u,effect:c,closable:d,round:f}=n;return[o.b(),o.is("closable",d),o.m(s||"primary"),o.m(r.value),o.m(c),o.is("hit",u),o.is("round",f)]}),a=s=>{t("close",s)},l=s=>{t("click",s)};return(s,u)=>s.disableTransitions?(Y(),fe("span",{key:0,class:oe(M(i)),style:$t({backgroundColor:s.color}),onClick:l},[ce("span",{class:oe(M(o).e("content"))},[ft(s.$slots,"default")],2),s.closable?(Y(),Pe(M(Ft),{key:0,class:oe(M(o).e("close")),onClick:Gt(a,["stop"])},{default:he(()=>[ie(M(wc))]),_:1},8,["class","onClick"])):Fe("v-if",!0)],6)):(Y(),Pe(ca,{key:1,name:`${M(o).namespace.value}-zoom-in-center`,appear:""},{default:he(()=>[ce("span",{class:oe(M(i)),style:$t({backgroundColor:s.color}),onClick:l},[ce("span",{class:oe(M(o).e("content"))},[ft(s.$slots,"default")],2),s.closable?(Y(),Pe(M(Ft),{key:0,class:oe(M(o).e("close")),onClick:Gt(a,["stop"])},{default:he(()=>[ie(M(wc))]),_:1},8,["class","onClick"])):Fe("v-if",!0)],6)]),_:3},8,["name"]))}});let Cle,Sle,kle,Dle,Ole,Tle,Mle;kw=Cr(Nt(Ele,[["__file","tag.vue"]])),Cle=Lt({...ble,size:da,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:Function,default:(e,t)=>e.text.includes(t)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:Function,default:()=>!0},popperClass:{type:String,default:""},teleported:Ui.teleported,tagType:{...Pw.type,default:"info"},validateEvent:{type:Boolean,default:!0},...F3}),Sle={[xn]:e=>!0,[Xo]:e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,visibleChange:e=>Ki(e),expandChange:e=>!!e,removeTag:e=>!!e},kle={key:0},Dle=["placeholder","onKeydown"],Ole=["onClick"],Tle=Te({name:"ElCascader"}),Mle=Te({...Tle,props:Cle,emits:Sle,setup(e,{expose:t,emit:n}){const r=e,o={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:we})=>{const{modifiersData:ze,placement:me}=we;["right","left","bottom","top"].includes(me)||(ze.arrow.x=35)},requires:["arrow"]}]},i=yc();let a=0,l=0;const s=_t("cascader"),u=_t("input"),{t:c}=Gr(),{form:d,formItem:f}=qa(),{valueOnClear:p}=jw(r),m=de(null),v=de(null),g=de(null),b=de(null),y=de(null),w=de(!1),x=de(!1),_=de(!1),E=de(!1),C=de(""),T=de(""),k=de([]),I=de([]),O=de([]),F=de(!1),N=ee(()=>i.style),B=ee(()=>r.disabled||(d==null?void 0:d.disabled)),L=ee(()=>r.placeholder||c("el.cascader.placeholder")),V=ee(()=>T.value||k.value.length>0||F.value?"":L.value),P=$i(),H=ee(()=>["small"].includes(P.value)?"small":"default"),U=ee(()=>!!r.props.multiple),G=ee(()=>!r.filterable||U.value),z=ee(()=>U.value?T.value:C.value),$=ee(()=>{var we;return((we=b.value)==null?void 0:we.checkedNodes)||[]}),W=ee(()=>!(!r.clearable||B.value||_.value||!x.value)&&!!$.value.length),K=ee(()=>{const{showAllLevels:we,separator:ze}=r,me=$.value;return me.length?U.value?"":me[0].calcText(we,ze):""}),X=ee(()=>(f==null?void 0:f.validateState)||""),te=ee({get:()=>Mf(r.modelValue),set(we){const ze=we||p.value;n(xn,ze),n(Xo,ze),r.validateEvent&&(f==null||f.validate("change").catch(me=>{}))}}),ne=ee(()=>[s.b(),s.m(P.value),s.is("disabled",B.value),i.class]),se=ee(()=>[u.e("icon"),"icon-arrow-down",s.is("reverse",w.value)]),le=ee(()=>s.is("focus",w.value||E.value)),J=ee(()=>{var we,ze;return(ze=(we=m.value)==null?void 0:we.popperRef)==null?void 0:ze.contentRef}),Z=we=>{var ze,me,Me;B.value||(we=we??!w.value)!==w.value&&(w.value=we,(me=(ze=v.value)==null?void 0:ze.input)==null||me.setAttribute("aria-expanded",`${we}`),we?(ye(),St((Me=b.value)==null?void 0:Me.scrollToExpandingNode)):r.filterable&&We(),n("visibleChange",we))},ye=()=>{St(()=>{var we;(we=m.value)==null||we.updatePopper()})},be=()=>{_.value=!1},ve=we=>{const{showAllLevels:ze,separator:me}=r;return{node:we,key:we.uid,text:we.calcText(ze,me),hitState:!1,closable:!B.value&&!we.isDisabled,isCollapseTag:!1}},Ae=we=>{var ze;const me=we.node;me.doCheck(!1),(ze=b.value)==null||ze.calculateCheckedValue(),n("removeTag",me.valueByOption)},Ce=()=>{var we,ze;const{filterMethod:me,showAllLevels:Me,separator:Ie}=r,ht=(ze=(we=b.value)==null?void 0:we.getFlattedNodes(!r.props.checkStrictly))==null?void 0:ze.filter(gt=>!gt.isDisabled&&(gt.calcText(Me,Ie),me(gt,z.value)));U.value&&(k.value.forEach(gt=>{gt.hitState=!1}),I.value.forEach(gt=>{gt.hitState=!1})),_.value=!0,O.value=ht,ye()},_e=()=>{var we;let ze;ze=_.value&&y.value?y.value.$el.querySelector(`.${s.e("suggestion-item")}`):(we=b.value)==null?void 0:we.$el.querySelector(`.${s.b("node")}[tabindex="-1"]`),ze&&(ze.focus(),!_.value&&ze.click())},ke=()=>{var we,ze;const me=(we=v.value)==null?void 0:we.input,Me=g.value,Ie=(ze=y.value)==null?void 0:ze.$el;if(rr&&me&&(Ie&&(Ie.querySelector(`.${s.e("suggestion-list")}`).style.minWidth=`${me.offsetWidth}px`),Me)){const{offsetHeight:ht}=Me,gt=k.value.length>0?`${Math.max(ht+6,a)}px`:`${a}px`;me.style.height=gt,ye()}},Be=we=>{ye(),n("expandChange",we)},$e=we=>{var ze;const me=(ze=we.target)==null?void 0:ze.value;if(we.type==="compositionend")F.value=!1,St(()=>ot(me));else{const Me=me[me.length-1]||"";F.value=!g9(Me)}},rt=we=>{if(!F.value)switch(we.code){case Xt.enter:Z();break;case Xt.down:Z(!0),St(_e),we.preventDefault();break;case Xt.esc:w.value===!0&&(we.preventDefault(),we.stopPropagation(),Z(!1));break;case Xt.tab:Z(!1)}},ge=()=>{var we;(we=b.value)==null||we.clearCheckedNodes(),!w.value&&r.filterable&&We(),Z(!1)},We=()=>{const{value:we}=K;C.value=we,T.value=we},st=we=>{const ze=we.target,{code:me}=we;switch(me){case Xt.up:case Xt.down:{const Me=me===Xt.up?-1:1;_b(aN(ze,Me,`.${s.e("suggestion-item")}[tabindex="-1"]`));break}case Xt.enter:ze.click()}},At=()=>{const we=k.value,ze=we[we.length-1];l=T.value?0:l+1,!ze||!l||r.collapseTags&&we.length>1||(ze.hitState?Ae(ze):ze.hitState=!0)},Ve=we=>{const ze=we.target,me=s.e("search-input");ze.className===me&&(E.value=!0),n("focus",we)},it=we=>{E.value=!1,n("blur",we)},dt=ts(()=>{const{value:we}=z;if(!we)return;const ze=r.beforeFilter(we);D0(ze)?ze.then(Ce).catch(()=>{}):ze!==!1?Ce():be()},r.debounce),ot=(we,ze)=>{!w.value&&Z(!0),ze!=null&&ze.isComposing||(we?dt():be())},je=we=>Number.parseFloat(function(ze,me,{window:Me=Wm,initialValue:Ie=""}={}){const ht=de(Ie),gt=ee(()=>{var vt;return Oc(me)||((vt=Me==null?void 0:Me.document)==null?void 0:vt.documentElement)});return Je([gt,()=>Zf(ze)],([vt,qt])=>{var mn;if(vt&&Me){const Zt=(mn=Me.getComputedStyle(vt).getPropertyValue(qt))==null?void 0:mn.trim();ht.value=Zt||Ie}},{immediate:!0}),Je(ht,vt=>{var qt;(qt=gt.value)!=null&&qt.style&>.value.style.setProperty(Zf(ze),vt)}),ht}(u.cssVarName("input-height"),we).value)-2;return Je(_,ye),Je([$,B],()=>{if(!U.value)return;const we=$.value,ze=[],me=[];if(we.forEach(Me=>me.push(ve(Me))),I.value=me,we.length){we.slice(0,r.maxCollapseTags).forEach(ht=>ze.push(ve(ht)));const Me=we.slice(r.maxCollapseTags),Ie=Me.length;Ie&&(r.collapseTags?ze.push({key:-1,text:`+ ${Ie}`,closable:!1,isCollapseTag:!0}):Me.forEach(ht=>ze.push(ve(ht))))}k.value=ze}),Je(k,()=>{St(()=>ke())}),Je(P,async()=>{await St();const we=v.value.input;a=je(we)||a,ke()}),Je(K,We,{immediate:!0}),yn(()=>{const we=v.value.input,ze=je(we);a=we.offsetHeight||ze,fa(we,ke)}),t({getCheckedNodes:we=>{var ze;return(ze=b.value)==null?void 0:ze.getCheckedNodes(we)},cascaderPanelRef:b,togglePopperVisible:Z,contentRef:J}),(we,ze)=>(Y(),Pe(M(Al),{ref_key:"tooltipRef",ref:m,visible:w.value,teleported:we.teleported,"popper-class":[M(s).e("dropdown"),we.popperClass],"popper-options":o,"fallback-placements":["bottom-start","bottom","top-start","top","right","left"],"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:"bottom-start",transition:`${M(s).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:"",onHide:be},{default:he(()=>[nn((Y(),fe("div",{class:oe(M(ne)),style:$t(M(N)),onClick:ze[5]||(ze[5]=()=>Z(!M(G)||void 0)),onKeydown:rt,onMouseenter:ze[6]||(ze[6]=me=>x.value=!0),onMouseleave:ze[7]||(ze[7]=me=>x.value=!1)},[ie(M(ua),{ref_key:"input",ref:v,modelValue:C.value,"onUpdate:modelValue":ze[1]||(ze[1]=me=>C.value=me),placeholder:M(V),readonly:M(G),disabled:M(B),"validate-event":!1,size:M(P),class:oe(M(le)),tabindex:M(U)&&we.filterable&&!M(B)?-1:void 0,onCompositionstart:$e,onCompositionupdate:$e,onCompositionend:$e,onFocus:Ve,onBlur:it,onInput:ot},{suffix:he(()=>[M(W)?(Y(),Pe(M(Ft),{key:"clear",class:oe([M(u).e("icon"),"icon-circle-close"]),onClick:Gt(ge,["stop"])},{default:he(()=>[ie(M(h0))]),_:1},8,["class","onClick"])):(Y(),Pe(M(Ft),{key:"arrow-down",class:oe(M(se)),onClick:ze[0]||(ze[0]=Gt(me=>Z(),["stop"]))},{default:he(()=>[ie(M(p0))]),_:1},8,["class"]))]),_:1},8,["modelValue","placeholder","readonly","disabled","size","class","tabindex"]),M(U)?(Y(),fe("div",{key:0,ref_key:"tagWrapper",ref:g,class:oe([M(s).e("tags"),M(s).is("validate",!!M(X))])},[(Y(!0),fe(bt,null,bn(k.value,me=>(Y(),Pe(M(kw),{key:me.key,type:we.tagType,size:M(H),hit:me.hitState,closable:me.closable,"disable-transitions":"",onClose:Me=>Ae(me)},{default:he(()=>[me.isCollapseTag===!1?(Y(),fe("span",kle,Ye(me.text),1)):(Y(),Pe(M(Al),{key:1,disabled:w.value||!we.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:he(()=>[ce("span",null,Ye(me.text),1)]),content:he(()=>[ce("div",{class:oe(M(s).e("collapse-tags"))},[(Y(!0),fe(bt,null,bn(I.value.slice(we.maxCollapseTags),(Me,Ie)=>(Y(),fe("div",{key:Ie,class:oe(M(s).e("collapse-tag"))},[(Y(),Pe(M(kw),{key:Me.key,class:"in-tooltip",type:we.tagType,size:M(H),hit:Me.hitState,closable:Me.closable,"disable-transitions":"",onClose:ht=>Ae(Me)},{default:he(()=>[ce("span",null,Ye(Me.text),1)]),_:2},1032,["type","size","hit","closable","onClose"]))],2))),128))],2)]),_:2},1032,["disabled"]))]),_:2},1032,["type","size","hit","closable","onClose"]))),128)),we.filterable&&!M(B)?nn((Y(),fe("input",{key:0,"onUpdate:modelValue":ze[2]||(ze[2]=me=>T.value=me),type:"text",class:oe(M(s).e("search-input")),placeholder:M(K)?"":M(L),onInput:ze[3]||(ze[3]=me=>ot(T.value,me)),onClick:ze[4]||(ze[4]=Gt(me=>Z(!0),["stop"])),onKeydown:Rr(At,["delete"]),onCompositionstart:$e,onCompositionupdate:$e,onCompositionend:$e,onFocus:Ve,onBlur:it},null,42,Dle)),[[f0,T.value]]):Fe("v-if",!0)],2)):Fe("v-if",!0)],38)),[[M(Rf),()=>Z(!1),M(J)]])]),content:he(()=>[nn(ie(M(wle),{ref_key:"cascaderPanelRef",ref:b,modelValue:M(te),"onUpdate:modelValue":ze[8]||(ze[8]=me=>Jn(te)?te.value=me:null),options:we.options,props:r.props,border:!1,"render-label":we.$slots.default,onExpandChange:Be,onClose:ze[9]||(ze[9]=me=>we.$nextTick(()=>Z(!1)))},null,8,["modelValue","options","props","render-label"]),[[$n,!_.value]]),we.filterable?nn((Y(),Pe(M(wd),{key:0,ref_key:"suggestionPanel",ref:y,tag:"ul",class:oe(M(s).e("suggestion-panel")),"view-class":M(s).e("suggestion-list"),onKeydown:st},{default:he(()=>[O.value.length?(Y(!0),fe(bt,{key:0},bn(O.value,me=>(Y(),fe("li",{key:me.uid,class:oe([M(s).e("suggestion-item"),M(s).is("checked",me.checked)]),tabindex:-1,onClick:Me=>(Ie=>{var ht,gt;const{checked:vt}=Ie;U.value?(ht=b.value)==null||ht.handleCheckChange(Ie,!vt,!1):(!vt&&((gt=b.value)==null||gt.handleCheckChange(Ie,!0,!1)),Z(!1))})(me)},[ce("span",null,Ye(me.text),1),me.checked?(Y(),Pe(M(Ft),{key:0},{default:he(()=>[ie(M(jb))]),_:1})):Fe("v-if",!0)],10,Ole))),128)):ft(we.$slots,"empty",{key:1},()=>[ce("li",{class:oe(M(s).e("empty-text"))},Ye(M(c)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[$n,_.value]]):Fe("v-if",!0)]),_:3},8,["visible","teleported","popper-class","transition"]))}});var Q9=Nt(Mle,[["__file","cascader.vue"]]);Q9.install=e=>{e.component(Q9.name,Q9)};let lR,Nle,Fle,Rle;FO=Q9,lR=Symbol("rowContextKey"),Nle=Lt({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),Fle=Te({name:"ElRow"}),Rle=Te({...Fle,props:Nle,setup(e){const t=e,n=_t("row"),r=ee(()=>t.gutter);qn(lR,{gutter:r});const o=ee(()=>{const a={};return t.gutter&&(a.marginRight=a.marginLeft=`-${t.gutter/2}px`),a}),i=ee(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(a,l)=>(Y(),Pe(Hn(a.tag),{class:oe(M(i)),style:$t(M(o))},{default:he(()=>[ft(a.$slots,"default")]),_:3},8,["class","style"]))}});let Ile,Ble,Lle;SO=Cr(Nt(Rle,[["__file","row.vue"]])),Ile=Lt({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:[Number,Object],default:()=>({})},sm:{type:[Number,Object],default:()=>({})},md:{type:[Number,Object],default:()=>({})},lg:{type:[Number,Object],default:()=>({})},xl:{type:[Number,Object],default:()=>({})}}),Ble=Te({name:"ElCol"}),Lle=Te({...Ble,props:Ile,setup(e){const t=e,{gutter:n}=Rt(lR,{gutter:ee(()=>0)}),r=_t("col"),o=ee(()=>{const a={};return n.value&&(a.paddingLeft=a.paddingRight=n.value/2+"px"),a}),i=ee(()=>{const a=[];return["span","offset","pull","push"].forEach(l=>{const s=t[l];Kn(s)&&(l==="span"?a.push(r.b(`${t[l]}`)):s>0&&a.push(r.b(`${l}-${t[l]}`)))}),["xs","sm","md","lg","xl"].forEach(l=>{Kn(t[l])?a.push(r.b(`${l}-${t[l]}`)):wn(t[l])&&Object.entries(t[l]).forEach(([s,u])=>{a.push(s!=="span"?r.b(`${l}-${s}-${u}`):r.b(`${l}-${u}`))})}),n.value&&a.push(r.is("guttered")),[r.b(),a]});return(a,l)=>(Y(),Pe(Hn(a.tag),{class:oe(M(i)),style:$t(M(o))},{default:he(()=>[ft(a.$slots,"default")]),_:3},8,["class","style"]))}});let Ple,jle;CO=Cr(Nt(Lle,[["__file","col.vue"]])),Ple=Te({name:"ElCollapseTransition"}),jle=Te({...Ple,setup(e){const t=_t("collapse-transition"),n=o=>{o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom},r={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.height&&(o.dataset.elExistsHeight=o.style.height),o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){requestAnimationFrame(()=>{o.dataset.oldOverflow=o.style.overflow,o.dataset.elExistsHeight?o.style.maxHeight=o.dataset.elExistsHeight:o.scrollHeight!==0?o.style.maxHeight=`${o.scrollHeight}px`:o.style.maxHeight=0,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom,o.style.overflow="hidden"})},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},enterCancelled(o){n(o)},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.maxHeight=`${o.scrollHeight}px`,o.style.overflow="hidden"},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){n(o)},leaveCancelled(o){n(o)}};return(o,i)=>(Y(),Pe(ca,Un({name:M(t).b()},Yee(r)),{default:he(()=>[ft(o.$slots,"default")]),_:3},16,["name"]))}});var J9=Nt(jle,[["__file","collapse-transition.vue"]]);J9.install=e=>{e.component(J9.name,J9)};let Vle;UO=J9,NOe=UO,Vle=Lt({color:{type:Object,required:!0},vertical:{type:Boolean,default:!1}});let sR=!1;function e4(e,t){if(!rr)return;const n=function(i){var a;(a=t.drag)==null||a.call(t,i)},r=function(i){var a;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",r),document.onselectstart=null,document.ondragstart=null,sR=!1,(a=t.end)==null||a.call(t,i)},o=function(i){var a;sR||(i.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",r),document.addEventListener("touchmove",n),document.addEventListener("touchend",r),sR=!0,(a=t.start)==null||a.call(t,i))};e.addEventListener("mousedown",o),e.addEventListener("touchstart",o)}const rPe=(e,{bar:t,thumb:n,handleDrag:r})=>{const o=dn(),i=_t("color-alpha-slider"),a=de(0),l=de(0),s=de();function u(){a.value=function(){if(!n.value||e.vertical)return 0;const p=o.vnode.el,m=e.color.get("alpha");return p?Math.round(m*(p.offsetWidth-n.value.offsetWidth/2)/100):0}(),l.value=function(){if(!n.value)return 0;const p=o.vnode.el;if(!e.vertical)return 0;const m=e.color.get("alpha");return p?Math.round(m*(p.offsetHeight-n.value.offsetHeight/2)/100):0}(),s.value=function(){if(e.color&&e.color.value){const{r:p,g:m,b:v}=e.color.toRgb();return`linear-gradient(to right, rgba(${p}, ${m}, ${v}, 0) 0%, rgba(${p}, ${m}, ${v}, 1) 100%)`}return""}()}yn(()=>{if(!t.value||!n.value)return;const p={drag:m=>{r(m)},end:m=>{r(m)}};e4(t.value,p),e4(n.value,p),u()}),Je(()=>e.color.get("alpha"),()=>u()),Je(()=>e.color.value,()=>u());const c=ee(()=>[i.b(),i.is("vertical",e.vertical)]),d=ee(()=>i.e("bar")),f=ee(()=>i.e("thumb"));return{rootKls:c,barKls:d,barStyle:ee(()=>({background:s.value})),thumbKls:f,thumbStyle:ee(()=>({left:ka(a.value),top:ka(l.value)})),update:u}},oPe=Te({name:"ElColorAlphaSlider"}),iPe=Te({...oPe,props:Vle,setup(e,{expose:t}){const n=e,{bar:r,thumb:o,handleDrag:i,handleClick:a}=(p=>{const m=dn(),v=Qo(),g=Qo();function b(y){if(!g.value||!v.value)return;const w=m.vnode.el.getBoundingClientRect(),{clientX:x,clientY:_}=t9(y);if(p.vertical){let E=_-w.top;E=Math.max(v.value.offsetHeight/2,E),E=Math.min(E,w.height-v.value.offsetHeight/2),p.color.set("alpha",Math.round((E-v.value.offsetHeight/2)/(w.height-v.value.offsetHeight)*100))}else{let E=x-w.left;E=Math.max(v.value.offsetWidth/2,E),E=Math.min(E,w.width-v.value.offsetWidth/2),p.color.set("alpha",Math.round((E-v.value.offsetWidth/2)/(w.width-v.value.offsetWidth)*100))}}return{thumb:v,bar:g,handleDrag:b,handleClick:function(y){y.target!==v.value&&b(y)}}})(n),{rootKls:l,barKls:s,barStyle:u,thumbKls:c,thumbStyle:d,update:f}=rPe(n,{bar:r,thumb:o,handleDrag:i});return t({update:f,bar:r,thumb:o}),(p,m)=>(Y(),fe("div",{class:oe(M(l))},[ce("div",{ref_key:"bar",ref:r,class:oe(M(s)),style:$t(M(u)),onClick:m[0]||(m[0]=(...v)=>M(a)&&M(a)(...v))},null,6),ce("div",{ref_key:"thumb",ref:o,class:oe(M(c)),style:$t(M(d))},null,6)],2))}});var aPe=Nt(iPe,[["__file","alpha-slider.vue"]]);const lPe=Te({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=_t("color-hue-slider"),n=dn(),r=de(),o=de(),i=de(0),a=de(0),l=ee(()=>e.color.get("hue"));function s(c){if(!o.value||!r.value)return;const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:p}=t9(c);let m;if(e.vertical){let v=p-d.top;v=Math.min(v,d.height-r.value.offsetHeight/2),v=Math.max(r.value.offsetHeight/2,v),m=Math.round((v-r.value.offsetHeight/2)/(d.height-r.value.offsetHeight)*360)}else{let v=f-d.left;v=Math.min(v,d.width-r.value.offsetWidth/2),v=Math.max(r.value.offsetWidth/2,v),m=Math.round((v-r.value.offsetWidth/2)/(d.width-r.value.offsetWidth)*360)}e.color.set("hue",m)}function u(){i.value=function(){if(!r.value)return 0;const c=n.vnode.el;if(e.vertical)return 0;const d=e.color.get("hue");return c?Math.round(d*(c.offsetWidth-r.value.offsetWidth/2)/360):0}(),a.value=function(){if(!r.value)return 0;const c=n.vnode.el;if(!e.vertical)return 0;const d=e.color.get("hue");return c?Math.round(d*(c.offsetHeight-r.value.offsetHeight/2)/360):0}()}return Je(()=>l.value,()=>{u()}),yn(()=>{if(!o.value||!r.value)return;const c={drag:d=>{s(d)},end:d=>{s(d)}};e4(o.value,c),e4(r.value,c),u()}),{bar:o,thumb:r,thumbLeft:i,thumbTop:a,hueValue:l,handleClick:function(c){c.target!==r.value&&s(c)},update:u,ns:t}}});var sPe=Nt(lPe,[["render",function(e,t,n,r,o,i){return Y(),fe("div",{class:oe([e.ns.b(),e.ns.is("vertical",e.vertical)])},[ce("div",{ref:"bar",class:oe(e.ns.e("bar")),onClick:t[0]||(t[0]=(...a)=>e.handleClick&&e.handleClick(...a))},null,2),ce("div",{ref:"thumb",class:oe(e.ns.e("thumb")),style:$t({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}],["__file","hue-slider.vue"]]);const uPe=Lt({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:da,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:Array},validateEvent:{type:Boolean,default:!0}}),cPe={[xn]:e=>an(e)||pa(e),[Xo]:e=>an(e)||pa(e),activeChange:e=>an(e)||pa(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},zle=Symbol("colorPickerContextKey"),Hle=function(e,t,n){return[e,t*n/((e=(2-t)*n)<1?e:2-e)||0,e/2]},fg=function(e,t){(function(r){return typeof r=="string"&&r.includes(".")&&Number.parseFloat(r)===1})(e)&&(e="100%");const n=function(r){return typeof r=="string"&&r.includes("%")}(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),n&&(e=Number.parseInt(""+e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},$le={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Z9=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),n=e%16;return`${$le[t]||t}${$le[n]||n}`},Ule=function({r:e,g:t,b:n}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+n)?"":`#${Z9(e)}${Z9(t)}${Z9(n)}`},uR={A:10,B:11,C:12,D:13,E:14,F:15},a1=function(e){return e.length===2?16*(uR[e[0].toUpperCase()]||+e[0])+(uR[e[1].toUpperCase()]||+e[1]):uR[e[1].toUpperCase()]||+e[1]},Wle=(e,t,n)=>{e=fg(e,255),t=fg(t,255),n=fg(n,255);const r=Math.max(e,t,n),o=Math.min(e,t,n);let i;const a=r,l=r-o,s=r===0?0:l/r;if(r===o)i=0;else{switch(r){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i/=6}return{h:360*i,s:100*s,v:100*a}},t4=function(e,t,n){e=6*fg(e,360),t=fg(t,100),n=fg(n,100);const r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),s=r%6,u=[n,a,i,i,l,n][s],c=[l,n,n,a,i,i][s],d=[i,i,l,n,n,a][s];return{r:Math.round(255*u),g:Math.round(255*c),b:Math.round(255*d)}};class n4{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in t)Tn(t,n)&&(this[n]=t[n]);t.value?this.fromString(t.value):this.doOnChange()}set(t,n){if(arguments.length!==1||typeof t!="object")this[`_${t}`]=n,this.doOnChange();else for(const r in t)Tn(t,r)&&this.set(r,t[r])}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return t4(this._hue,this._saturation,this._value)}fromString(t){if(!t)return this._hue=0,this._saturation=100,this._value=100,void this.doOnChange();const n=(r,o,i)=>{this._hue=Math.max(0,Math.min(360,r)),this._saturation=Math.max(0,Math.min(100,o)),this._value=Math.max(0,Math.min(100,i)),this.doOnChange()};if(t.includes("hsl")){const r=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(o=>o!=="").map((o,i)=>i>2?Number.parseFloat(o):Number.parseInt(o,10));if(r.length===4?this._alpha=100*Number.parseFloat(r[3]):r.length===3&&(this._alpha=100),r.length>=3){const{h:o,s:i,v:a}=function(l,s,u){u/=100;let c=s/=100;const d=Math.max(u,.01);return s*=(u*=2)<=1?u:2-u,c*=d<=1?d:2-d,{h:l,s:100*(u===0?2*c/(d+c):2*s/(u+s)),v:(u+s)/2*100}}(r[0],r[1],r[2]);n(o,i,a)}}else if(t.includes("hsv")){const r=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(o=>o!=="").map((o,i)=>i>2?Number.parseFloat(o):Number.parseInt(o,10));r.length===4?this._alpha=100*Number.parseFloat(r[3]):r.length===3&&(this._alpha=100),r.length>=3&&n(r[0],r[1],r[2])}else if(t.includes("rgb")){const r=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(o=>o!=="").map((o,i)=>i>2?Number.parseFloat(o):Number.parseInt(o,10));if(r.length===4?this._alpha=100*Number.parseFloat(r[3]):r.length===3&&(this._alpha=100),r.length>=3){const{h:o,s:i,v:a}=Wle(r[0],r[1],r[2]);n(o,i,a)}}else if(t.includes("#")){const r=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))return;let o,i,a;r.length===3?(o=a1(r[0]+r[0]),i=a1(r[1]+r[1]),a=a1(r[2]+r[2])):r.length!==6&&r.length!==8||(o=a1(r.slice(0,2)),i=a1(r.slice(2,4)),a=a1(r.slice(4,6))),r.length===8?this._alpha=a1(r.slice(6))/255*100:r.length!==3&&r.length!==6||(this._alpha=100);const{h:l,s,v:u}=Wle(o,i,a);n(l,s,u)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:n,_value:r,_alpha:o,format:i}=this;if(this.enableAlpha)switch(i){case"hsl":{const a=Hle(t,n/100,r/100);this.value=`hsla(${t}, ${Math.round(100*a[1])}%, ${Math.round(100*a[2])}%, ${this.get("alpha")/100})`;break}case"hsv":this.value=`hsva(${t}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha")/100})`;break;case"hex":this.value=`${Ule(t4(t,n,r))}${Z9(255*o/100)}`;break;default:{const{r:a,g:l,b:s}=t4(t,n,r);this.value=`rgba(${a}, ${l}, ${s}, ${this.get("alpha")/100})`}}else switch(i){case"hsl":{const a=Hle(t,n/100,r/100);this.value=`hsl(${t}, ${Math.round(100*a[1])}%, ${Math.round(100*a[2])}%)`;break}case"hsv":this.value=`hsv(${t}, ${Math.round(n)}%, ${Math.round(r)}%)`;break;case"rgb":{const{r:a,g:l,b:s}=t4(t,n,r);this.value=`rgb(${a}, ${l}, ${s})`;break}default:this.value=Ule(t4(t,n,r))}}}const dPe=Te({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=_t("color-predefine"),{currentColor:n}=Rt(zle),r=de(o(e.colors,e.color));function o(i,a){return i.map(l=>{const s=new n4;return s.enableAlpha=!0,s.format="rgba",s.fromString(l),s.selected=s.value===a.value,s})}return Je(()=>n.value,i=>{const a=new n4;a.fromString(i),r.value.forEach(l=>{l.selected=a.compare(l)})}),yl(()=>{r.value=o(e.colors,e.color)}),{rgbaColors:r,handleSelect:function(i){e.color.fromString(e.colors[i])},ns:t}}}),fPe=["onClick"];var pPe=Nt(dPe,[["render",function(e,t,n,r,o,i){return Y(),fe("div",{class:oe(e.ns.b())},[ce("div",{class:oe(e.ns.e("colors"))},[(Y(!0),fe(bt,null,bn(e.rgbaColors,(a,l)=>(Y(),fe("div",{key:e.colors[l],class:oe([e.ns.e("color-selector"),e.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:s=>e.handleSelect(l)},[ce("div",{style:$t({backgroundColor:a.value})},null,4)],10,fPe))),128))],2)],2)}],["__file","predefine.vue"]]);const hPe=Te({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=_t("color-svpanel"),n=dn(),r=de(0),o=de(0),i=de("hsl(0, 100%, 50%)"),a=ee(()=>({hue:e.color.get("hue"),value:e.color.get("value")}));function l(){const u=e.color.get("saturation"),c=e.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:p}=d;o.value=u*f/100,r.value=(100-c)*p/100,i.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function s(u){const c=n.vnode.el.getBoundingClientRect(),{clientX:d,clientY:f}=t9(u);let p=d-c.left,m=f-c.top;p=Math.max(0,p),p=Math.min(p,c.width),m=Math.max(0,m),m=Math.min(m,c.height),o.value=p,r.value=m,e.color.set({saturation:p/c.width*100,value:100-m/c.height*100})}return Je(()=>a.value,()=>{l()}),yn(()=>{e4(n.vnode.el,{drag:u=>{s(u)},end:u=>{s(u)}}),l()}),{cursorTop:r,cursorLeft:o,background:i,colorValue:a,handleDrag:s,update:l,ns:t}}}),vPe=[ce("div",null,null,-1)];var mPe=Nt(hPe,[["render",function(e,t,n,r,o,i){return Y(),fe("div",{class:oe(e.ns.b()),style:$t({backgroundColor:e.background})},[ce("div",{class:oe(e.ns.e("white"))},null,2),ce("div",{class:oe(e.ns.e("black"))},null,2),ce("div",{class:oe(e.ns.e("cursor")),style:$t({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},vPe,6)],6)}],["__file","sv-panel.vue"]]);const gPe=["onKeydown"],yPe=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],bPe=Te({name:"ElColorPicker"}),APe=Te({...bPe,props:uPe,emits:cPe,setup(e,{expose:t,emit:n}){const r=e,{t:o}=Gr(),i=_t("color"),{formItem:a}=qa(),l=$i(),s=wl(),{inputId:u,isLabeledByFormItem:c}=Ac(r,{formItemContext:a}),d=de(),f=de(),p=de(),m=de(),v=de(),g=de(),{isFocused:b,handleFocus:y,handleBlur:w}=Vw(v,{beforeBlur(se){var le;return(le=m.value)==null?void 0:le.isFocusInsideContent(se)},afterBlur(){L(!1),U()}}),x=se=>{if(s.value)return ne();y(se)};let _=!0;const E=Qn(new n4({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue})),C=de(!1),T=de(!1),k=de(""),I=ee(()=>r.modelValue||T.value?function(se,le){if(!(se instanceof n4))throw new TypeError("color should be instance of _color Class");const{r:J,g:Z,b:ye}=se.toRgb();return le?`rgba(${J}, ${Z}, ${ye}, ${se.get("alpha")/100})`:`rgb(${J}, ${Z}, ${ye})`}(E,r.showAlpha):"transparent"),O=ee(()=>r.modelValue||T.value?E.value:""),F=ee(()=>c.value?void 0:r.label||o("el.colorpicker.defaultLabel")),N=ee(()=>c.value?a==null?void 0:a.labelId:void 0),B=ee(()=>[i.b("picker"),i.is("disabled",s.value),i.bm("picker",l.value),i.is("focused",b.value)]);function L(se){C.value=se}const V=ts(L,100,{leading:!0});function P(){s.value||L(!0)}function H(){V(!1),U()}function U(){St(()=>{r.modelValue?E.fromString(r.modelValue):(E.value="",St(()=>{T.value=!1}))})}function G(){s.value||V(!C.value)}function z(){E.fromString(k.value)}function $(){const se=E.value;n(xn,se),n("change",se),r.validateEvent&&(a==null||a.validate("change").catch(le=>{})),V(!1),St(()=>{const le=new n4({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue});E.compare(le)||U()})}function W(){V(!1),n(xn,null),n("change",null),r.modelValue!==null&&r.validateEvent&&(a==null||a.validate("change").catch(se=>{})),U()}function K(se){if(C.value&&(H(),b.value)){const le=new FocusEvent("focus",se);w(le)}}function X(se){se.preventDefault(),se.stopPropagation(),L(!1),U()}function te(se){switch(se.code){case Xt.enter:case Xt.space:se.preventDefault(),se.stopPropagation(),P(),g.value.focus();break;case Xt.esc:X(se)}}function ne(){v.value.blur()}return yn(()=>{r.modelValue&&(k.value=O.value)}),Je(()=>r.modelValue,se=>{se?se&&se!==E.value&&(_=!1,E.fromString(se)):T.value=!1}),Je(()=>O.value,se=>{k.value=se,_&&n("activeChange",se),_=!0}),Je(()=>E.value,()=>{r.modelValue||T.value||(T.value=!0)}),Je(()=>C.value,()=>{St(()=>{var se,le,J;(se=d.value)==null||se.update(),(le=f.value)==null||le.update(),(J=p.value)==null||J.update()})}),qn(zle,{currentColor:O}),t({color:E,show:P,hide:H,focus:function(){v.value.focus()},blur:ne}),(se,le)=>(Y(),Pe(M(Al),{ref_key:"popper",ref:m,visible:C.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[M(i).be("picker","panel"),M(i).b("dropdown"),se.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${M(i).namespace.value}-zoom-in-top`,persistent:"",onHide:le[2]||(le[2]=J=>L(!1))},{content:he(()=>[nn((Y(),fe("div",{onKeydown:Rr(X,["esc"])},[ce("div",{class:oe(M(i).be("dropdown","main-wrapper"))},[ie(sPe,{ref_key:"hue",ref:d,class:"hue-slider",color:M(E),vertical:""},null,8,["color"]),ie(mPe,{ref_key:"sv",ref:f,color:M(E)},null,8,["color"])],2),se.showAlpha?(Y(),Pe(aPe,{key:0,ref_key:"alpha",ref:p,color:M(E)},null,8,["color"])):Fe("v-if",!0),se.predefine?(Y(),Pe(pPe,{key:1,ref:"predefine",color:M(E),colors:se.predefine},null,8,["color","colors"])):Fe("v-if",!0),ce("div",{class:oe(M(i).be("dropdown","btns"))},[ce("span",{class:oe(M(i).be("dropdown","value"))},[ie(M(ua),{ref_key:"inputRef",ref:g,modelValue:k.value,"onUpdate:modelValue":le[0]||(le[0]=J=>k.value=J),"validate-event":!1,size:"small",onKeyup:Rr(z,["enter"]),onBlur:z},null,8,["modelValue","onKeyup"])],2),ie(M(Sa),{class:oe(M(i).be("dropdown","link-btn")),text:"",size:"small",onClick:W},{default:he(()=>[Dt(Ye(M(o)("el.colorpicker.clear")),1)]),_:1},8,["class"]),ie(M(Sa),{plain:"",size:"small",class:oe(M(i).be("dropdown","btn")),onClick:$},{default:he(()=>[Dt(Ye(M(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,gPe)),[[M(Rf),K]])]),default:he(()=>[ce("div",{id:M(u),ref_key:"triggerRef",ref:v,class:oe(M(B)),role:"button","aria-label":M(F),"aria-labelledby":M(N),"aria-description":M(o)("el.colorpicker.description",{color:se.modelValue||""}),"aria-disabled":M(s),tabindex:M(s)?-1:se.tabindex,onKeydown:te,onFocus:x,onBlur:le[1]||(le[1]=(...J)=>M(w)&&M(w)(...J))},[M(s)?(Y(),fe("div",{key:0,class:oe(M(i).be("picker","mask"))},null,2)):Fe("v-if",!0),ce("div",{class:oe(M(i).be("picker","trigger")),onClick:G},[ce("span",{class:oe([M(i).be("picker","color"),M(i).is("alpha",se.showAlpha)])},[ce("span",{class:oe(M(i).be("picker","color-inner")),style:$t({backgroundColor:M(I)})},[nn(ie(M(Ft),{class:oe([M(i).be("picker","icon"),M(i).is("icon-arrow-down")])},{default:he(()=>[ie(M(p0))]),_:1},8,["class"]),[[$n,se.modelValue||T.value]]),nn(ie(M(Ft),{class:oe([M(i).be("picker","empty"),M(i).is("icon-close")])},{default:he(()=>[ie(M(wc))]),_:1},8,["class"]),[[$n,!se.modelValue&&!T.value]])],6)],2)],2)],42,yPe)]),_:1},8,["visible","popper-class","transition"]))}});let Gle,qle;PO=Cr(Nt(APe,[["__file","color-picker.vue"]])),Gle=Te({name:"ElContainer"}),qle=Te({...Gle,props:{direction:{type:String}},setup(e){const t=e,n=Ga(),r=_t("container"),o=ee(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:n&&n.default?n.default().some(i=>{const a=i.type.name;return a==="ElHeader"||a==="ElFooter"}):!1);return(i,a)=>(Y(),fe("section",{class:oe([M(r).b(),M(r).is("vertical",M(o))])},[ft(i.$slots,"default")],2))}});var wPe=Nt(qle,[["__file","container.vue"]]);const xPe=Te({name:"ElAside"}),_Pe=Te({...xPe,props:{width:{type:String,default:null}},setup(e){const t=e,n=_t("aside"),r=ee(()=>t.width?n.cssVarBlock({width:t.width}):{});return(o,i)=>(Y(),fe("aside",{class:oe(M(n).b()),style:$t(M(r))},[ft(o.$slots,"default")],6))}});var Kle=Nt(_Pe,[["__file","aside.vue"]]);const EPe=Te({name:"ElFooter"}),CPe=Te({...EPe,props:{height:{type:String,default:null}},setup(e){const t=e,n=_t("footer"),r=ee(()=>t.height?n.cssVarBlock({height:t.height}):{});return(o,i)=>(Y(),fe("footer",{class:oe(M(n).b()),style:$t(M(r))},[ft(o.$slots,"default")],6))}});var Yle=Nt(CPe,[["__file","footer.vue"]]);const SPe=Te({name:"ElHeader"}),kPe=Te({...SPe,props:{height:{type:String,default:null}},setup(e){const t=e,n=_t("header"),r=ee(()=>t.height?n.cssVarBlock({height:t.height}):{});return(o,i)=>(Y(),fe("header",{class:oe(M(n).b()),style:$t(M(r))},[ft(o.$slots,"default")],6))}});var Xle=Nt(kPe,[["__file","header.vue"]]);const DPe=Te({name:"ElMain"}),OPe=Te({...DPe,setup(e){const t=_t("main");return(n,r)=>(Y(),fe("main",{class:oe(M(t).b())},[ft(n.$slots,"default")],2))}});var Qle=Nt(OPe,[["__file","main.vue"]]);const TPe=Cr(wPe,{Aside:Kle,Footer:Yle,Header:Xle,Main:Qle}),MPe=Ya(Kle);Ya(Yle);const NPe=Ya(Xle),FPe=Ya(Qle);var Jle={exports:{}};Jle.exports=function(e,t){var n=t.prototype,r=n.format;n.format=function(o){var i=this,a=this.$locale();if(!this.isValid())return r.bind(this)(o);var l=this.$utils(),s=(o||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(u){switch(u){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return a.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return a.ordinal(i.week(),"W");case"w":case"ww":return l.s(i.week(),u==="w"?1:2,"0");case"W":case"WW":return l.s(i.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return l.s(String(i.$H===0?24:i.$H),u==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return u}});return r.bind(this)(s)}};const RPe=_l(Jle.exports);var Zle={exports:{}};Zle.exports=function(){var e="week",t="year";return function(n,r,o){var i=r.prototype;i.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var l=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var s=o(this).startOf(t).add(1,t).date(l),u=o(this).endOf(e);if(s.isBefore(u))return 1}var c=o(this).startOf(t).date(l).startOf(e).subtract(1,"millisecond"),d=this.diff(c,e,!0);return d<0?o(this).startOf("week").week():Math.ceil(d)},i.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}();const IPe=_l(Zle.exports);var ese={exports:{}};ese.exports=function(e,t){t.prototype.weekYear=function(){var n=this.month(),r=this.week(),o=this.year();return r===1&&n===11?o+1:n===0&&r>=52?o-1:o}};const BPe=_l(ese.exports);var tse={exports:{}};tse.exports=function(e,t,n){t.prototype.dayOfYear=function(r){var o=Math.round((n(this).startOf("day")-n(this).startOf("year"))/864e5)+1;return r==null?o:this.add(r-o,"day")}};const LPe=_l(tse.exports);var nse={exports:{}};nse.exports=function(e,t){t.prototype.isSameOrAfter=function(n,r){return this.isSame(n,r)||this.isAfter(n,r)}};const PPe=_l(nse.exports);var rse={exports:{}};rse.exports=function(e,t){t.prototype.isSameOrBefore=function(n,r){return this.isSame(n,r)||this.isBefore(n,r)}};const jPe=_l(rse.exports),cR=Symbol(),VPe=Lt({...$9,type:{type:String,default:"date"}}),zPe=["date","dates","year","years","month","week","range"],dR=Lt({disabledDate:{type:Function},date:{type:Object,required:!0},minDate:{type:Object},maxDate:{type:Object},parsedValue:{type:[Object,Array]},rangeState:{type:Object,default:()=>({endDate:null,selecting:!1})}}),ose=Lt({type:{type:String,required:!0,values:["year","years","month","date","dates","week","datetime","datetimerange","daterange","monthrange"]},dateFormat:String,timeFormat:String}),ise=Lt({unlinkPanels:Boolean,parsedValue:{type:Array}}),fR=e=>({type:String,values:zPe,default:e}),HPe=Lt({...ose,parsedValue:{type:[Object,Array]},visible:{type:Boolean},format:{type:String,default:""}}),$Pe=Lt({...dR,cellClassName:{type:Function},showWeekNumber:Boolean,selectionMode:fR("date")}),pR=e=>{if(!mt(e))return!1;const[t,n]=e;return vn.isDayjs(t)&&vn.isDayjs(n)&&t.isSameOrBefore(n)},ase=(e,{lang:t,unit:n,unlinkPanels:r})=>{let o;if(mt(e)){let[i,a]=e.map(l=>vn(l).locale(t));return r||(a=i.add(1,n)),[i,a]}return o=e?vn(e):vn(),o=o.locale(t),[o,o.add(1,n)]},hR=(e="")=>["normal","today"].includes(e),UPe=(e,t)=>{const{lang:n}=Gr(),r=de(),o=de(),i=de(),a=de(),l=de([[],[],[],[],[],[]]);let s=!1;const u=e.date.$locale().weekStart||7,c=e.date.locale("en").localeData().weekdaysShort().map(I=>I.toLowerCase()),d=ee(()=>u>3?7-u:-u),f=ee(()=>{const I=e.date.startOf("month");return I.subtract(I.day()||7,"day")}),p=ee(()=>c.concat(c).slice(u,u+7)),m=ee(()=>Lre(M(w)).some(I=>I.isCurrent)),v=ee(()=>{const I=e.date.startOf("month");return{startOfMonthDay:I.day()||7,dateCountOfMonth:I.daysInMonth(),dateCountOfLastMonth:I.subtract(1,"month").daysInMonth()}}),g=ee(()=>e.selectionMode==="dates"?Ml(e.parsedValue):[]),b=(I,{columnIndex:O,rowIndex:F},N)=>{const{disabledDate:B,cellClassName:L}=e,V=M(g),P=((U,{count:G,rowIndex:z,columnIndex:$})=>{const{startOfMonthDay:W,dateCountOfMonth:K,dateCountOfLastMonth:X}=M(v),te=M(d);if(!(z>=0&&z<=1))return G<=K?U.text=G:(U.text=G-K,U.type="next-month"),!0;{const ne=W+te<0?7+W+te:W+te;if($+7*z>=ne)return U.text=G,!0;U.text=X-(ne-$%7)+1+7*z,U.type="prev-month"}return!1})(I,{count:N,rowIndex:F,columnIndex:O}),H=I.dayjs.toDate();return I.selected=V.find(U=>U.isSame(I.dayjs,"day")),I.isSelected=!!I.selected,I.isCurrent=_(I),I.disabled=B==null?void 0:B(H),I.customClass=L==null?void 0:L(H),P},y=I=>{if(e.selectionMode==="week"){const[O,F]=e.showWeekNumber?[1,7]:[0,6],N=k(I[O+1]);I[O].inRange=N,I[O].start=N,I[F].inRange=N,I[F].end=N}},w=ee(()=>{const{minDate:I,maxDate:O,rangeState:F,showWeekNumber:N}=e,B=M(d),L=M(l),V="day";let P=1;if(N)for(let H=0;H<6;H++)L[H][0]||(L[H][0]={type:"week",text:M(f).add(7*H+1,V).week()});return((H,U,{columnIndexOffset:G,startDate:z,nextEndDate:$,now:W,unit:K,relativeDateGetter:X,setCellMetadata:te,setRowMetadata:ne})=>{for(let se=0;se<H.row;se++){const le=U[se];for(let J=0;J<H.column;J++){let Z=le[J+G];Z||(Z={row:se,column:J,type:"normal",inRange:!1,start:!1,end:!1});const ye=X(se*H.column+J);Z.dayjs=ye,Z.date=ye.toDate(),Z.timestamp=ye.valueOf(),Z.type="normal",Z.inRange=!!(z&&ye.isSameOrAfter(z,K)&&$&&ye.isSameOrBefore($,K))||!!(z&&ye.isSameOrBefore(z,K)&&$&&ye.isSameOrAfter($,K)),z!=null&&z.isSameOrAfter($)?(Z.start=!!$&&ye.isSame($,K),Z.end=z&&ye.isSame(z,K)):(Z.start=!!z&&ye.isSame(z,K),Z.end=!!$&&ye.isSame($,K)),ye.isSame(W,K)&&(Z.type="today"),te==null||te(Z,{rowIndex:se,columnIndex:J}),le[J+G]=Z}ne==null||ne(le)}})({row:6,column:7},L,{startDate:I,columnIndexOffset:N?1:0,nextEndDate:F.endDate||O||F.selecting&&I||null,now:vn().locale(M(n)).startOf(V),unit:V,relativeDateGetter:H=>M(f).add(H-B,V),setCellMetadata:(...H)=>{b(...H,P)&&(P+=1)},setRowMetadata:y}),L});Je(()=>e.date,async()=>{var I;(I=M(r))!=null&&I.contains(document.activeElement)&&(await St(),await x())});const x=async()=>{var I;return(I=M(o))==null?void 0:I.focus()},_=I=>e.selectionMode==="date"&&hR(I.type)&&E(I,e.parsedValue),E=(I,O)=>!!O&&vn(O).locale(M(n)).isSame(e.date.date(Number(I.text)),"day"),C=(I,O)=>{const F=7*I+(O-(e.showWeekNumber?1:0))-M(d);return M(f).add(F,"day")},T=(I,O=!1)=>{const F=I.target.closest("td");if(!F)return;const N=F.parentNode.rowIndex-1,B=F.cellIndex,L=M(w)[N][B];if(L.disabled||L.type==="week")return;const V=C(N,B);switch(e.selectionMode){case"range":(P=>{e.rangeState.selecting&&e.minDate?(P>=e.minDate?t("pick",{minDate:e.minDate,maxDate:P}):t("pick",{minDate:P,maxDate:e.minDate}),t("select",!1)):(t("pick",{minDate:P,maxDate:null}),t("select",!0))})(V);break;case"date":t("pick",V,O);break;case"week":(P=>{const H=P.week(),U=`${P.year()}w${H}`;t("pick",{year:P.year(),week:H,value:U,date:P.startOf("week")})})(V);break;case"dates":((P,H)=>{const U=H?Ml(e.parsedValue).filter(G=>(G==null?void 0:G.valueOf())!==P.valueOf()):Ml(e.parsedValue).concat([P]);t("pick",U)})(V,!!L.selected)}},k=I=>{if(e.selectionMode!=="week")return!1;let O=e.date.startOf("day");if(I.type==="prev-month"&&(O=O.subtract(1,"month")),I.type==="next-month"&&(O=O.add(1,"month")),O=O.date(Number.parseInt(I.text,10)),e.parsedValue&&!Array.isArray(e.parsedValue)){const F=(e.parsedValue.day()-u+7)%7-1;return e.parsedValue.subtract(F,"day").isSame(O,"day")}return!1};return{WEEKS:p,rows:w,tbodyRef:r,currentCellRef:o,focus:x,isCurrent:_,isWeekActive:k,isSelectedCell:I=>!M(m)&&(I==null?void 0:I.text)===1&&I.type==="normal"||I.isCurrent,handlePickDate:T,handleMouseUp:I=>{I.target.closest("td")&&(s=!1)},handleMouseDown:I=>{I.target.closest("td")&&(s=!0)},handleMouseMove:I=>{var O;if(!e.rangeState.selecting)return;let F=I.target;if(F.tagName==="SPAN"&&(F=(O=F.parentNode)==null?void 0:O.parentNode),F.tagName==="DIV"&&(F=F.parentNode),F.tagName!=="TD")return;const N=F.parentNode.rowIndex-1,B=F.cellIndex;M(w)[N][B].disabled||N===M(i)&&B===M(a)||(i.value=N,a.value=B,t("changerange",{selecting:!0,endDate:C(N,B)}))},handleFocus:I=>{s||M(m)||e.selectionMode!=="date"||T(I,!0)}}};var WPe=Te({name:"ElDatePickerCell",props:Lt({cell:{type:Object}}),setup(e){const t=_t("date-table-cell"),{slots:n}=Rt(cR);return()=>{const{cell:r}=e;return ft(n,"default",{...r},()=>[ie("div",{class:t.b()},[ie("span",{class:t.e("text")},[r==null?void 0:r.text])])])}}});const GPe=["aria-label"],qPe={key:0,scope:"col"},KPe=["aria-label"],YPe=["aria-current","aria-selected","tabindex"],XPe=Te({__name:"basic-date-table",props:$Pe,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const r=e,{WEEKS:o,rows:i,tbodyRef:a,currentCellRef:l,focus:s,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:f,handleMouseUp:p,handleMouseDown:m,handleMouseMove:v,handleFocus:g}=UPe(r,n),{tableLabel:b,tableKls:y,weekLabel:w,getCellClasses:x,getRowKls:_,t:E}=((C,{isCurrent:T,isWeekActive:k})=>{const I=_t("date-table"),{t:O}=Gr();return{tableKls:ee(()=>[I.b(),{"is-week-mode":C.selectionMode==="week"}]),tableLabel:ee(()=>O("el.datepicker.dateTablePrompt")),weekLabel:ee(()=>O("el.datepicker.week")),getCellClasses:F=>{const N=[];return hR(F.type)&&!F.disabled?(N.push("available"),F.type==="today"&&N.push("today")):N.push(F.type),T(F)&&N.push("current"),F.inRange&&(hR(F.type)||C.selectionMode==="week")&&(N.push("in-range"),F.start&&N.push("start-date"),F.end&&N.push("end-date")),F.disabled&&N.push("disabled"),F.selected&&N.push("selected"),F.customClass&&N.push(F.customClass),N.join(" ")},getRowKls:F=>[I.e("row"),{current:k(F)}],t:O}})(r,{isCurrent:u,isWeekActive:c});return t({focus:s}),(C,T)=>(Y(),fe("table",{"aria-label":M(b),class:oe(M(y)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:T[1]||(T[1]=(...k)=>M(f)&&M(f)(...k)),onMousemove:T[2]||(T[2]=(...k)=>M(v)&&M(v)(...k)),onMousedown:T[3]||(T[3]=Gt((...k)=>M(m)&&M(m)(...k),["prevent"])),onMouseup:T[4]||(T[4]=(...k)=>M(p)&&M(p)(...k))},[ce("tbody",{ref_key:"tbodyRef",ref:a},[ce("tr",null,[C.showWeekNumber?(Y(),fe("th",qPe,Ye(M(w)),1)):Fe("v-if",!0),(Y(!0),fe(bt,null,bn(M(o),(k,I)=>(Y(),fe("th",{key:I,"aria-label":M(E)("el.datepicker.weeksFull."+k),scope:"col"},Ye(M(E)("el.datepicker.weeks."+k)),9,KPe))),128))]),(Y(!0),fe(bt,null,bn(M(i),(k,I)=>(Y(),fe("tr",{key:I,class:oe(M(_)(k[1]))},[(Y(!0),fe(bt,null,bn(k,(O,F)=>(Y(),fe("td",{key:`${I}.${F}`,ref_for:!0,ref:N=>M(d)(O)&&(l.value=N),class:oe(M(x)(O)),"aria-current":O.isCurrent?"date":void 0,"aria-selected":O.isCurrent,tabindex:M(d)(O)?0:-1,onFocus:T[0]||(T[0]=(...N)=>M(g)&&M(g)(...N))},[ie(M(WPe),{cell:O},null,8,["cell"])],42,YPe))),128))],2))),128))],512)],42,GPe))}});var vR=Nt(XPe,[["__file","basic-date-table.vue"]]);const QPe=Lt({...dR,selectionMode:fR("month")}),JPe=["aria-label"],ZPe=["aria-selected","aria-label","tabindex","onKeydown"],eje={class:"cell"},tje=Te({__name:"basic-month-table",props:QPe,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const r=e,o=_t("month-table"),{t:i,lang:a}=Gr(),l=de(),s=de(),u=de(r.date.locale("en").localeData().monthsShort().map(y=>y.toLowerCase())),c=de([[],[],[]]),d=de(),f=de(),p=ee(()=>{var y,w;const x=c.value,_=vn().locale(a.value).startOf("month");for(let E=0;E<3;E++){const C=x[E];for(let T=0;T<4;T++){const k=C[T]||(C[T]={row:E,column:T,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});k.type="normal";const I=4*E+T,O=r.date.startOf("year").month(I),F=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;k.inRange=!!(r.minDate&&O.isSameOrAfter(r.minDate,"month")&&F&&O.isSameOrBefore(F,"month"))||!!(r.minDate&&O.isSameOrBefore(r.minDate,"month")&&F&&O.isSameOrAfter(F,"month")),(y=r.minDate)!=null&&y.isSameOrAfter(F)?(k.start=!(!F||!O.isSame(F,"month")),k.end=r.minDate&&O.isSame(r.minDate,"month")):(k.start=!(!r.minDate||!O.isSame(r.minDate,"month")),k.end=!(!F||!O.isSame(F,"month"))),_.isSame(O)&&(k.type="today"),k.text=I,k.disabled=((w=r.disabledDate)==null?void 0:w.call(r,O.toDate()))||!1}}return x}),m=y=>{const w={},x=r.date.year(),_=new Date,E=y.text;return w.disabled=!!r.disabledDate&&((C,T,k)=>{const I=vn().locale(k).startOf("month").month(T).year(C),O=I.daysInMonth();return FF(O).map(F=>I.add(F,"day").toDate())})(x,E,a.value).every(r.disabledDate),w.current=Ml(r.parsedValue).findIndex(C=>vn.isDayjs(C)&&C.year()===x&&C.month()===E)>=0,w.today=_.getFullYear()===x&&_.getMonth()===E,y.inRange&&(w["in-range"]=!0,y.start&&(w["start-date"]=!0),y.end&&(w["end-date"]=!0)),w},v=y=>{const w=r.date.year(),x=y.text;return Ml(r.date).findIndex(_=>_.year()===w&&_.month()===x)>=0},g=y=>{var w;if(!r.rangeState.selecting)return;let x=y.target;if(x.tagName==="SPAN"&&(x=(w=x.parentNode)==null?void 0:w.parentNode),x.tagName==="DIV"&&(x=x.parentNode),x.tagName!=="TD")return;const _=x.parentNode.rowIndex,E=x.cellIndex;p.value[_][E].disabled||_===d.value&&E===f.value||(d.value=_,f.value=E,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(4*_+E)}))},b=y=>{var w;const x=(w=y.target)==null?void 0:w.closest("td");if((x==null?void 0:x.tagName)!=="TD"||Hs(x,"disabled"))return;const _=x.cellIndex,E=4*x.parentNode.rowIndex+_,C=r.date.startOf("year").month(E);r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&C>=r.minDate?n("pick",{minDate:r.minDate,maxDate:C}):n("pick",{minDate:C,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:C,maxDate:null}),n("select",!0)):n("pick",E)};return Je(()=>r.date,async()=>{var y,w;(y=l.value)!=null&&y.contains(document.activeElement)&&(await St(),(w=s.value)==null||w.focus())}),t({focus:()=>{var y;(y=s.value)==null||y.focus()}}),(y,w)=>(Y(),fe("table",{role:"grid","aria-label":M(i)("el.datepicker.monthTablePrompt"),class:oe(M(o).b()),onClick:b,onMousemove:g},[ce("tbody",{ref_key:"tbodyRef",ref:l},[(Y(!0),fe(bt,null,bn(M(p),(x,_)=>(Y(),fe("tr",{key:_},[(Y(!0),fe(bt,null,bn(x,(E,C)=>(Y(),fe("td",{key:C,ref_for:!0,ref:T=>v(E)&&(s.value=T),class:oe(m(E)),"aria-selected":`${v(E)}`,"aria-label":M(i)("el.datepicker.month"+(+E.text+1)),tabindex:v(E)?0:-1,onKeydown:[Rr(Gt(b,["prevent","stop"]),["space"]),Rr(Gt(b,["prevent","stop"]),["enter"])]},[ce("div",null,[ce("span",eje,Ye(M(i)("el.datepicker.months."+u.value[E.text])),1)])],42,ZPe))),128))]))),128))],512)],42,JPe))}});var mR=Nt(tje,[["__file","basic-month-table.vue"]]);const{date:nje,disabledDate:rje,parsedValue:oje}=dR,ije=Lt({date:nje,disabledDate:rje,parsedValue:oje,selectionMode:fR("year")}),aje=["aria-label"],lje=["aria-selected","tabindex","onKeydown"],sje={class:"cell"},uje={key:1},cje=Te({__name:"basic-year-table",props:ije,emits:["pick"],setup(e,{expose:t,emit:n}){const r=e,o=_t("year-table"),{t:i,lang:a}=Gr(),l=de(),s=de(),u=ee(()=>10*Math.floor(r.date.year()/10)),c=p=>{const m={},v=vn().locale(a.value);return m.disabled=!!r.disabledDate&&((g,b)=>{const y=vn(String(g)).locale(b).startOf("year"),w=y.endOf("year").dayOfYear();return FF(w).map(x=>y.add(x,"day").toDate())})(p,a.value).every(r.disabledDate),m.current=Ml(r.parsedValue).findIndex(g=>g.year()===p)>=0,m.today=v.year()===p,m},d=p=>p===u.value&&r.date.year()<u.value&&r.date.year()>u.value+9||Ml(r.date).findIndex(m=>m.year()===p)>=0||Ml(r.parsedValue).findIndex(m=>(m==null?void 0:m.year())===p)>=0,f=p=>{const m=p.target.closest("td");if(m&&m.textContent){if(Hs(m,"disabled"))return;const v=m.textContent||m.innerText;if(r.selectionMode==="years"){if(p.type==="keydown")return void n("pick",Ml(r.parsedValue),!1);const g=Hs(m,"current")?Ml(r.parsedValue).filter(b=>(b==null?void 0:b.year())!==Number(v)):Ml(r.parsedValue).concat([vn(v)]);n("pick",g)}else n("pick",Number(v))}};return Je(()=>r.date,async()=>{var p,m;(p=l.value)!=null&&p.contains(document.activeElement)&&(await St(),(m=s.value)==null||m.focus())}),t({focus:()=>{var p;(p=s.value)==null||p.focus()}}),(p,m)=>(Y(),fe("table",{role:"grid","aria-label":M(i)("el.datepicker.yearTablePrompt"),class:oe(M(o).b()),onClick:f},[ce("tbody",{ref_key:"tbodyRef",ref:l},[(Y(),fe(bt,null,bn(3,(v,g)=>ce("tr",{key:g},[(Y(),fe(bt,null,bn(4,(b,y)=>(Y(),fe(bt,{key:g+"_"+y},[4*g+y<10?(Y(),fe("td",{key:0,ref_for:!0,ref:w=>d(M(u)+4*g+y)&&(s.value=w),class:oe(["available",c(M(u)+4*g+y)]),"aria-selected":`${d(M(u)+4*g+y)}`,tabindex:d(M(u)+4*g+y)?0:-1,onKeydown:[Rr(Gt(f,["prevent","stop"]),["space"]),Rr(Gt(f,["prevent","stop"]),["enter"])]},[ce("div",null,[ce("span",sje,Ye(M(u)+4*g+y),1)])],42,lje)):(Y(),fe("td",uje))],64))),64))])),64))],512)],10,aje))}});var dje=Nt(cje,[["__file","basic-year-table.vue"]]);const fje=["onClick"],pje=["aria-label"],hje=["aria-label"],vje=["aria-label"],mje=["aria-label"],gje=Te({__name:"panel-date-pick",props:HPe,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const n=e,r=_t("picker-panel"),o=_t("date-picker"),i=yc(),a=Ga(),{t:l,lang:s}=Gr(),u=Rt("EP_PICKER_BASE"),c=Rt(Jb),{shortcuts:d,disabledDate:f,cellClassName:p,defaultTime:m}=u.props,v=dr(u.props,"defaultValue"),g=de(),b=de(vn().locale(s.value)),y=de(!1);let w=!1;const x=ee(()=>vn(m).locale(s.value)),_=ee(()=>b.value.month()),E=ee(()=>b.value.year()),C=de([]),T=de(null),k=de(null),I=Ve=>!(C.value.length>0)||(C.value,n.format,!0),O=Ve=>!m||ye.value||y.value||w?K.value?Ve.millisecond(0):Ve.startOf("day"):x.value.year(Ve.year()).month(Ve.month()).date(Ve.date()),F=(Ve,...it)=>{if(Ve)if(mt(Ve)){const dt=Ve.map(O);t("pick",dt,...it)}else t("pick",O(Ve),...it);else t("pick",Ve,...it);T.value=null,k.value=null,y.value=!1,w=!1},N=async(Ve,it)=>{if(H.value==="date"){let dt=n.parsedValue?n.parsedValue.year(Ve.year()).month(Ve.month()).date(Ve.date()):Ve;I()||(dt=C.value[0][0].year(Ve.year()).month(Ve.month()).date(Ve.date())),b.value=dt,F(dt,K.value||it),n.type==="datetime"&&(await St(),ge())}else H.value==="week"?F(Ve.date):H.value==="dates"&&F(Ve,!0)},B=Ve=>{const it=Ve?"add":"subtract";b.value=b.value[it](1,"month"),At("month")},L=Ve=>{const it=b.value,dt=Ve?"add":"subtract";b.value=V.value==="year"?it[dt](10,"year"):it[dt](1,"year"),At("year")},V=de("date"),P=ee(()=>{const Ve=l("el.datepicker.year");if(V.value==="year"){const it=10*Math.floor(E.value/10);return Ve?`${it} ${Ve} - ${it+9} ${Ve}`:`${it} - ${it+9}`}return`${E.value} ${Ve}`}),H=ee(()=>{const{type:Ve}=n;return["week","month","year","years","dates"].includes(Ve)?Ve:"date"}),U=ee(()=>H.value==="date"?V.value:H.value),G=ee(()=>!!d.length),z=async Ve=>{b.value=b.value.startOf("month").month(Ve),H.value==="month"?F(b.value,!1):(V.value="date",["month","year","date","week"].includes(H.value)&&(F(b.value,!0),await St(),ge())),At("month")},$=async(Ve,it)=>{H.value==="year"?(b.value=b.value.startOf("year").year(Ve),F(b.value,!1)):H.value==="years"?F(Ve,it==null||it):(b.value=b.value.year(Ve),V.value="month",["month","year","date","week"].includes(H.value)&&(F(b.value,!0),await St(),ge())),At("year")},W=async Ve=>{V.value=Ve,await St(),ge()},K=ee(()=>n.type==="datetime"||n.type==="datetimerange"),X=ee(()=>{const Ve=K.value||H.value==="dates",it=H.value==="years",dt=V.value==="date",ot=V.value==="year";return Ve&&dt||it&&ot}),te=ee(()=>!!f&&(!n.parsedValue||(mt(n.parsedValue)?f(n.parsedValue[0].toDate()):f(n.parsedValue.toDate())))),ne=()=>{if(H.value==="dates"||H.value==="years")F(n.parsedValue);else{let Ve=n.parsedValue;if(!Ve){const it=vn(m).locale(s.value),dt=rt();Ve=it.year(dt.year()).month(dt.month()).date(dt.date())}b.value=Ve,F(Ve)}},se=ee(()=>!!f&&f(vn().locale(s.value).toDate())),le=()=>{const Ve=vn().locale(s.value).toDate();y.value=!0,f&&f(Ve)||!I()||(b.value=vn().locale(s.value),F(b.value))},J=ee(()=>n.timeFormat||IF(n.format)),Z=ee(()=>n.dateFormat||RF(n.format)),ye=ee(()=>k.value?k.value:n.parsedValue||v.value?(n.parsedValue||b.value).format(J.value):void 0),be=ee(()=>T.value?T.value:n.parsedValue||v.value?(n.parsedValue||b.value).format(Z.value):void 0),ve=de(!1),Ae=()=>{ve.value=!0},Ce=()=>{ve.value=!1},_e=Ve=>({hour:Ve.hour(),minute:Ve.minute(),second:Ve.second(),year:Ve.year(),month:Ve.month(),date:Ve.date()}),ke=(Ve,it,dt)=>{const{hour:ot,minute:je,second:we}=_e(Ve),ze=n.parsedValue?n.parsedValue.hour(ot).minute(je).second(we):Ve;b.value=ze,F(b.value,!0),dt||(ve.value=it)},Be=Ve=>{const it=vn(Ve,J.value).locale(s.value);if(it.isValid()&&I()){const{year:dt,month:ot,date:je}=_e(b.value);b.value=it.year(dt).month(ot).date(je),k.value=null,ve.value=!1,F(b.value,!0)}},$e=Ve=>{const it=vn(Ve,Z.value).locale(s.value);if(it.isValid()){if(f&&f(it.toDate()))return;const{hour:dt,minute:ot,second:je}=_e(b.value);b.value=it.hour(dt).minute(ot).second(je),T.value=null,F(b.value,!0)}},rt=()=>{const Ve=vn(v.value).locale(s.value);if(!v.value){const it=x.value;return vn().hour(it.hour()).minute(it.minute()).second(it.second()).locale(s.value)}return Ve},ge=async()=>{var Ve;["week","month","year","date"].includes(H.value)&&((Ve=g.value)==null||Ve.focus(),H.value==="week"&&st(Xt.down))},We=Ve=>{const{code:it}=Ve;[Xt.up,Xt.down,Xt.left,Xt.right,Xt.home,Xt.end,Xt.pageUp,Xt.pageDown].includes(it)&&(st(it),Ve.stopPropagation(),Ve.preventDefault()),[Xt.enter,Xt.space,Xt.numpadEnter].includes(it)&&T.value===null&&k.value===null&&(Ve.preventDefault(),F(b.value,!1))},st=Ve=>{var it;const{up:dt,down:ot,left:je,right:we,home:ze,end:me,pageUp:Me,pageDown:Ie}=Xt,ht={year:{[dt]:-4,[ot]:4,[je]:-1,[we]:1,offset:(vt,qt)=>vt.setFullYear(vt.getFullYear()+qt)},month:{[dt]:-4,[ot]:4,[je]:-1,[we]:1,offset:(vt,qt)=>vt.setMonth(vt.getMonth()+qt)},week:{[dt]:-1,[ot]:1,[je]:-1,[we]:1,offset:(vt,qt)=>vt.setDate(vt.getDate()+7*qt)},date:{[dt]:-7,[ot]:7,[je]:-1,[we]:1,[ze]:vt=>-vt.getDay(),[me]:vt=>6-vt.getDay(),[Me]:vt=>-new Date(vt.getFullYear(),vt.getMonth(),0).getDate(),[Ie]:vt=>new Date(vt.getFullYear(),vt.getMonth()+1,0).getDate(),offset:(vt,qt)=>vt.setDate(vt.getDate()+qt)}},gt=b.value.toDate();for(;Math.abs(b.value.diff(gt,"year",!0))<1;){const vt=ht[U.value];if(!vt)return;if(vt.offset(gt,Ut(vt[Ve])?vt[Ve](gt):(it=vt[Ve])!=null?it:0),f&&f(gt))break;const qt=vn(gt).locale(s.value);b.value=qt,t("pick",qt,!0);break}},At=Ve=>{t("panel-change",b.value.toDate(),Ve,V.value)};return Je(()=>H.value,Ve=>{["month","year"].includes(Ve)?V.value=Ve:V.value=Ve!=="years"?"date":"year"},{immediate:!0}),Je(()=>V.value,()=>{c==null||c.updatePopper()}),Je(()=>v.value,Ve=>{Ve&&(b.value=rt())},{immediate:!0}),Je(()=>n.parsedValue,Ve=>{if(Ve){if(H.value==="dates"||H.value==="years"||Array.isArray(Ve))return;b.value=Ve}else b.value=rt()},{immediate:!0}),t("set-picker-option",["isValidValue",Ve=>vn.isDayjs(Ve)&&Ve.isValid()&&(!f||!f(Ve.toDate()))]),t("set-picker-option",["formatToString",Ve=>mt(Ve)?Ve.map(it=>it.format(n.format)):Ve.format(n.format)]),t("set-picker-option",["parseUserInput",Ve=>vn(Ve,n.format).locale(s.value)]),t("set-picker-option",["handleFocusPicker",ge]),(Ve,it)=>(Y(),fe("div",{class:oe([M(r).b(),M(o).b(),{"has-sidebar":Ve.$slots.sidebar||M(G),"has-time":M(K)}])},[ce("div",{class:oe(M(r).e("body-wrapper"))},[ft(Ve.$slots,"sidebar",{class:oe(M(r).e("sidebar"))}),M(G)?(Y(),fe("div",{key:0,class:oe(M(r).e("sidebar"))},[(Y(!0),fe(bt,null,bn(M(d),(dt,ot)=>(Y(),fe("button",{key:ot,type:"button",class:oe(M(r).e("shortcut")),onClick:je=>(we=>{const ze=Ut(we.value)?we.value():we.value;if(ze)return w=!0,void F(vn(ze).locale(s.value));we.onClick&&we.onClick({attrs:i,slots:a,emit:t})})(dt)},Ye(dt.text),11,fje))),128))],2)):Fe("v-if",!0),ce("div",{class:oe(M(r).e("body"))},[M(K)?(Y(),fe("div",{key:0,class:oe(M(o).e("time-header"))},[ce("span",{class:oe(M(o).e("editor-wrap"))},[ie(M(ua),{placeholder:M(l)("el.datepicker.selectDate"),"model-value":M(be),size:"small","validate-event":!1,onInput:it[0]||(it[0]=dt=>T.value=dt),onChange:$e},null,8,["placeholder","model-value"])],2),nn((Y(),fe("span",{class:oe(M(o).e("editor-wrap"))},[ie(M(ua),{placeholder:M(l)("el.datepicker.selectTime"),"model-value":M(ye),size:"small","validate-event":!1,onFocus:Ae,onInput:it[1]||(it[1]=dt=>k.value=dt),onChange:Be},null,8,["placeholder","model-value"]),ie(M(K9),{visible:ve.value,format:M(J),"parsed-value":b.value,onPick:ke},null,8,["visible","format","parsed-value"])],2)),[[M(Rf),Ce]])],2)):Fe("v-if",!0),nn(ce("div",{class:oe([M(o).e("header"),(V.value==="year"||V.value==="month")&&M(o).e("header--bordered")])},[ce("span",{class:oe(M(o).e("prev-btn"))},[ce("button",{type:"button","aria-label":M(l)("el.datepicker.prevYear"),class:oe(["d-arrow-left",M(r).e("icon-btn")]),onClick:it[2]||(it[2]=dt=>L(!1))},[ie(M(Ft),null,{default:he(()=>[ie(M(wm))]),_:1})],10,pje),nn(ce("button",{type:"button","aria-label":M(l)("el.datepicker.prevMonth"),class:oe([M(r).e("icon-btn"),"arrow-left"]),onClick:it[3]||(it[3]=dt=>B(!1))},[ie(M(Ft),null,{default:he(()=>[ie(M(m0))]),_:1})],10,hje),[[$n,V.value==="date"]])],2),ce("span",{role:"button",class:oe(M(o).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:it[4]||(it[4]=Rr(dt=>W("year"),["enter"])),onClick:it[5]||(it[5]=dt=>W("year"))},Ye(M(P)),35),nn(ce("span",{role:"button","aria-live":"polite",tabindex:"0",class:oe([M(o).e("header-label"),{active:V.value==="month"}]),onKeydown:it[6]||(it[6]=Rr(dt=>W("month"),["enter"])),onClick:it[7]||(it[7]=dt=>W("month"))},Ye(M(l)(`el.datepicker.month${M(_)+1}`)),35),[[$n,V.value==="date"]]),ce("span",{class:oe(M(o).e("next-btn"))},[nn(ce("button",{type:"button","aria-label":M(l)("el.datepicker.nextMonth"),class:oe([M(r).e("icon-btn"),"arrow-right"]),onClick:it[8]||(it[8]=dt=>B(!0))},[ie(M(Ft),null,{default:he(()=>[ie(M(Su))]),_:1})],10,vje),[[$n,V.value==="date"]]),ce("button",{type:"button","aria-label":M(l)("el.datepicker.nextYear"),class:oe([M(r).e("icon-btn"),"d-arrow-right"]),onClick:it[9]||(it[9]=dt=>L(!0))},[ie(M(Ft),null,{default:he(()=>[ie(M(xm))]),_:1})],10,mje)],2)],2),[[$n,V.value!=="time"]]),ce("div",{class:oe(M(r).e("content")),onKeydown:We},[V.value==="date"?(Y(),Pe(vR,{key:0,ref_key:"currentViewRef",ref:g,"selection-mode":M(H),date:b.value,"parsed-value":Ve.parsedValue,"disabled-date":M(f),"cell-class-name":M(p),onPick:N},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):Fe("v-if",!0),V.value==="year"?(Y(),Pe(dje,{key:1,ref_key:"currentViewRef",ref:g,"selection-mode":M(H),date:b.value,"disabled-date":M(f),"parsed-value":Ve.parsedValue,onPick:$},null,8,["selection-mode","date","disabled-date","parsed-value"])):Fe("v-if",!0),V.value==="month"?(Y(),Pe(mR,{key:2,ref_key:"currentViewRef",ref:g,date:b.value,"parsed-value":Ve.parsedValue,"disabled-date":M(f),onPick:z},null,8,["date","parsed-value","disabled-date"])):Fe("v-if",!0)],34)],2)],2),nn(ce("div",{class:oe(M(r).e("footer"))},[nn(ie(M(Sa),{text:"",size:"small",class:oe(M(r).e("link-btn")),disabled:M(se),onClick:le},{default:he(()=>[Dt(Ye(M(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[$n,M(H)!=="dates"&&M(H)!=="years"]]),ie(M(Sa),{plain:"",size:"small",class:oe(M(r).e("link-btn")),disabled:M(te),onClick:ne},{default:he(()=>[Dt(Ye(M(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[$n,M(X)]])],2))}});var yje=Nt(gje,[["__file","panel-date-pick.vue"]]);const bje=Lt({...ose,...ise}),lse=(e,{defaultValue:t,leftDate:n,rightDate:r,unit:o,onParsedValueChanged:i})=>{const{emit:a}=dn(),{pickerNs:l}=Rt(cR),s=_t("date-range-picker"),{t:u,lang:c}=Gr(),d=(g=>{const{emit:b}=dn(),y=yc(),w=Ga();return x=>{const _=Ut(x.value)?x.value():x.value;_?b("pick",[vn(_[0]).locale(g.value),vn(_[1]).locale(g.value)]):x.onClick&&x.onClick({attrs:y,slots:w,emit:b})}})(c),f=de(),p=de(),m=de({endDate:null,selecting:!1}),v=()=>{const[g,b]=ase(M(t),{lang:M(c),unit:o,unlinkPanels:e.unlinkPanels});f.value=void 0,p.value=void 0,n.value=g,r.value=b};return Je(t,g=>{g&&v()},{immediate:!0}),Je(()=>e.parsedValue,g=>{if(mt(g)&&g.length===2){const[b,y]=g;f.value=b,n.value=b,p.value=y,i(M(f),M(p))}else v()},{immediate:!0}),{minDate:f,maxDate:p,rangeState:m,lang:c,ppNs:l,drpNs:s,handleChangeRange:g=>{m.value=g},handleRangeConfirm:(g=!1)=>{const b=M(f),y=M(p);pR([b,y])&&a("pick",[b,y],g)},handleShortcutClick:d,onSelect:g=>{m.value.selecting=g,g||(m.value.endDate=null)},t:u}},Aje=["onClick"],wje=["aria-label"],xje=["aria-label"],_je=["disabled","aria-label"],Eje=["disabled","aria-label"],Cje=["disabled","aria-label"],Sje=["disabled","aria-label"],kje=["aria-label"],Dje=["aria-label"],ex="month",Oje=Te({__name:"panel-date-range",props:bje,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const n=e,r=Rt("EP_PICKER_BASE"),{disabledDate:o,cellClassName:i,format:a,defaultTime:l,clearable:s}=r.props,u=dr(r.props,"shortcuts"),c=dr(r.props,"defaultValue"),{lang:d}=Gr(),f=de(vn().locale(d.value)),p=de(vn().locale(d.value).add(1,ex)),{minDate:m,maxDate:v,rangeState:g,ppNs:b,drpNs:y,handleChangeRange:w,handleRangeConfirm:x,handleShortcutClick:_,onSelect:E,t:C}=lse(n,{defaultValue:c,leftDate:f,rightDate:p,unit:ex,onParsedValueChanged:function(ot,je){if(n.unlinkPanels&&je){const we=(ot==null?void 0:ot.year())||0,ze=(ot==null?void 0:ot.month())||0,me=je.year(),Me=je.month();p.value=we===me&&ze===Me?je.add(1,ex):je}else p.value=f.value.add(1,ex),je&&(p.value=p.value.hour(je.hour()).minute(je.minute()).second(je.second()))}}),T=de({min:null,max:null}),k=de({min:null,max:null}),I=ee(()=>`${f.value.year()} ${C("el.datepicker.year")} ${C(`el.datepicker.month${f.value.month()+1}`)}`),O=ee(()=>`${p.value.year()} ${C("el.datepicker.year")} ${C(`el.datepicker.month${p.value.month()+1}`)}`),F=ee(()=>f.value.year()),N=ee(()=>f.value.month()),B=ee(()=>p.value.year()),L=ee(()=>p.value.month()),V=ee(()=>!!u.value.length),P=ee(()=>T.value.min!==null?T.value.min:m.value?m.value.format($.value):""),H=ee(()=>T.value.max!==null?T.value.max:v.value||m.value?(v.value||m.value).format($.value):""),U=ee(()=>k.value.min!==null?k.value.min:m.value?m.value.format(z.value):""),G=ee(()=>k.value.max!==null?k.value.max:v.value||m.value?(v.value||m.value).format(z.value):""),z=ee(()=>n.timeFormat||IF(a)),$=ee(()=>n.dateFormat||RF(a)),W=()=>{f.value=f.value.subtract(1,"year"),n.unlinkPanels||(p.value=f.value.add(1,"month")),Z("year")},K=()=>{f.value=f.value.subtract(1,"month"),n.unlinkPanels||(p.value=f.value.add(1,"month")),Z("month")},X=()=>{n.unlinkPanels?p.value=p.value.add(1,"year"):(f.value=f.value.add(1,"year"),p.value=f.value.add(1,"month")),Z("year")},te=()=>{n.unlinkPanels?p.value=p.value.add(1,"month"):(f.value=f.value.add(1,"month"),p.value=f.value.add(1,"month")),Z("month")},ne=()=>{f.value=f.value.add(1,"year"),Z("year")},se=()=>{f.value=f.value.add(1,"month"),Z("month")},le=()=>{p.value=p.value.subtract(1,"year"),Z("year")},J=()=>{p.value=p.value.subtract(1,"month"),Z("month")},Z=ot=>{t("panel-change",[f.value.toDate(),p.value.toDate()],ot)},ye=ee(()=>{const ot=(N.value+1)%12,je=N.value+1>=12?1:0;return n.unlinkPanels&&new Date(F.value+je,ot)<new Date(B.value,L.value)}),be=ee(()=>n.unlinkPanels&&12*B.value+L.value-(12*F.value+N.value+1)>=12),ve=ee(()=>!(m.value&&v.value&&!g.value.selecting&&pR([m.value,v.value]))),Ae=ee(()=>n.type==="datetime"||n.type==="datetimerange"),Ce=(ot,je)=>{if(ot)return l?vn(l[je]||l).locale(d.value).year(ot.year()).month(ot.month()).date(ot.date()):ot},_e=(ot,je=!0)=>{const we=ot.minDate,ze=ot.maxDate,me=Ce(we,0),Me=Ce(ze,1);v.value===Me&&m.value===me||(t("calendar-change",[we.toDate(),ze&&ze.toDate()]),v.value=Me,m.value=me,je&&!Ae.value&&x())},ke=de(!1),Be=de(!1),$e=()=>{ke.value=!1},rt=()=>{Be.value=!1},ge=(ot,je)=>{T.value[je]=ot;const we=vn(ot,$.value).locale(d.value);if(we.isValid()){if(o&&o(we.toDate()))return;je==="min"?(f.value=we,m.value=(m.value||f.value).year(we.year()).month(we.month()).date(we.date()),n.unlinkPanels||v.value&&!v.value.isBefore(m.value)||(p.value=we.add(1,"month"),v.value=m.value.add(1,"month"))):(p.value=we,v.value=(v.value||p.value).year(we.year()).month(we.month()).date(we.date()),n.unlinkPanels||m.value&&!m.value.isAfter(v.value)||(f.value=we.subtract(1,"month"),m.value=v.value.subtract(1,"month")))}},We=(ot,je)=>{T.value[je]=null},st=(ot,je)=>{k.value[je]=ot;const we=vn(ot,z.value).locale(d.value);we.isValid()&&(je==="min"?(ke.value=!0,m.value=(m.value||f.value).hour(we.hour()).minute(we.minute()).second(we.second()),v.value&&!v.value.isBefore(m.value)||(v.value=m.value)):(Be.value=!0,v.value=(v.value||p.value).hour(we.hour()).minute(we.minute()).second(we.second()),p.value=v.value,v.value&&v.value.isBefore(m.value)&&(m.value=v.value)))},At=(ot,je)=>{k.value[je]=null,je==="min"?(f.value=m.value,ke.value=!1):(p.value=v.value,Be.value=!1)},Ve=(ot,je,we)=>{k.value.min||(ot&&(f.value=ot,m.value=(m.value||f.value).hour(ot.hour()).minute(ot.minute()).second(ot.second())),we||(ke.value=je),v.value&&!v.value.isBefore(m.value)||(v.value=m.value,p.value=ot))},it=(ot,je,we)=>{k.value.max||(ot&&(p.value=ot,v.value=(v.value||p.value).hour(ot.hour()).minute(ot.minute()).second(ot.second())),we||(Be.value=je),v.value&&v.value.isBefore(m.value)&&(m.value=v.value))},dt=()=>{f.value=ase(M(c),{lang:M(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],p.value=f.value.add(1,"month"),v.value=void 0,m.value=void 0,t("pick",null)};return t("set-picker-option",["isValidValue",ot=>pR(ot)&&(!o||!o(ot[0].toDate())&&!o(ot[1].toDate()))]),t("set-picker-option",["parseUserInput",ot=>mt(ot)?ot.map(je=>vn(je,a).locale(d.value)):vn(ot,a).locale(d.value)]),t("set-picker-option",["formatToString",ot=>mt(ot)?ot.map(je=>je.format(a)):ot.format(a)]),t("set-picker-option",["handleClear",dt]),(ot,je)=>(Y(),fe("div",{class:oe([M(b).b(),M(y).b(),{"has-sidebar":ot.$slots.sidebar||M(V),"has-time":M(Ae)}])},[ce("div",{class:oe(M(b).e("body-wrapper"))},[ft(ot.$slots,"sidebar",{class:oe(M(b).e("sidebar"))}),M(V)?(Y(),fe("div",{key:0,class:oe(M(b).e("sidebar"))},[(Y(!0),fe(bt,null,bn(M(u),(we,ze)=>(Y(),fe("button",{key:ze,type:"button",class:oe(M(b).e("shortcut")),onClick:me=>M(_)(we)},Ye(we.text),11,Aje))),128))],2)):Fe("v-if",!0),ce("div",{class:oe(M(b).e("body"))},[M(Ae)?(Y(),fe("div",{key:0,class:oe(M(y).e("time-header"))},[ce("span",{class:oe(M(y).e("editors-wrap"))},[ce("span",{class:oe(M(y).e("time-picker-wrap"))},[ie(M(ua),{size:"small",disabled:M(g).selecting,placeholder:M(C)("el.datepicker.startDate"),class:oe(M(y).e("editor")),"model-value":M(P),"validate-event":!1,onInput:je[0]||(je[0]=we=>ge(we,"min")),onChange:je[1]||(je[1]=we=>We(0,"min"))},null,8,["disabled","placeholder","class","model-value"])],2),nn((Y(),fe("span",{class:oe(M(y).e("time-picker-wrap"))},[ie(M(ua),{size:"small",class:oe(M(y).e("editor")),disabled:M(g).selecting,placeholder:M(C)("el.datepicker.startTime"),"model-value":M(U),"validate-event":!1,onFocus:je[2]||(je[2]=we=>ke.value=!0),onInput:je[3]||(je[3]=we=>st(we,"min")),onChange:je[4]||(je[4]=we=>At(0,"min"))},null,8,["class","disabled","placeholder","model-value"]),ie(M(K9),{visible:ke.value,format:M(z),"datetime-role":"start","parsed-value":f.value,onPick:Ve},null,8,["visible","format","parsed-value"])],2)),[[M(Rf),$e]])],2),ce("span",null,[ie(M(Ft),null,{default:he(()=>[ie(M(Su))]),_:1})]),ce("span",{class:oe([M(y).e("editors-wrap"),"is-right"])},[ce("span",{class:oe(M(y).e("time-picker-wrap"))},[ie(M(ua),{size:"small",class:oe(M(y).e("editor")),disabled:M(g).selecting,placeholder:M(C)("el.datepicker.endDate"),"model-value":M(H),readonly:!M(m),"validate-event":!1,onInput:je[5]||(je[5]=we=>ge(we,"max")),onChange:je[6]||(je[6]=we=>We(0,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),nn((Y(),fe("span",{class:oe(M(y).e("time-picker-wrap"))},[ie(M(ua),{size:"small",class:oe(M(y).e("editor")),disabled:M(g).selecting,placeholder:M(C)("el.datepicker.endTime"),"model-value":M(G),readonly:!M(m),"validate-event":!1,onFocus:je[7]||(je[7]=we=>M(m)&&(Be.value=!0)),onInput:je[8]||(je[8]=we=>st(we,"max")),onChange:je[9]||(je[9]=we=>At(0,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),ie(M(K9),{"datetime-role":"end",visible:Be.value,format:M(z),"parsed-value":p.value,onPick:it},null,8,["visible","format","parsed-value"])],2)),[[M(Rf),rt]])],2)],2)):Fe("v-if",!0),ce("div",{class:oe([[M(b).e("content"),M(y).e("content")],"is-left"])},[ce("div",{class:oe(M(y).e("header"))},[ce("button",{type:"button",class:oe([M(b).e("icon-btn"),"d-arrow-left"]),"aria-label":M(C)("el.datepicker.prevYear"),onClick:W},[ie(M(Ft),null,{default:he(()=>[ie(M(wm))]),_:1})],10,wje),ce("button",{type:"button",class:oe([M(b).e("icon-btn"),"arrow-left"]),"aria-label":M(C)("el.datepicker.prevMonth"),onClick:K},[ie(M(Ft),null,{default:he(()=>[ie(M(m0))]),_:1})],10,xje),ot.unlinkPanels?(Y(),fe("button",{key:0,type:"button",disabled:!M(be),class:oe([[M(b).e("icon-btn"),{"is-disabled":!M(be)}],"d-arrow-right"]),"aria-label":M(C)("el.datepicker.nextYear"),onClick:ne},[ie(M(Ft),null,{default:he(()=>[ie(M(xm))]),_:1})],10,_je)):Fe("v-if",!0),ot.unlinkPanels?(Y(),fe("button",{key:1,type:"button",disabled:!M(ye),class:oe([[M(b).e("icon-btn"),{"is-disabled":!M(ye)}],"arrow-right"]),"aria-label":M(C)("el.datepicker.nextMonth"),onClick:se},[ie(M(Ft),null,{default:he(()=>[ie(M(Su))]),_:1})],10,Eje)):Fe("v-if",!0),ce("div",null,Ye(M(I)),1)],2),ie(vR,{"selection-mode":"range",date:f.value,"min-date":M(m),"max-date":M(v),"range-state":M(g),"disabled-date":M(o),"cell-class-name":M(i),onChangerange:M(w),onPick:_e,onSelect:M(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),ce("div",{class:oe([[M(b).e("content"),M(y).e("content")],"is-right"])},[ce("div",{class:oe(M(y).e("header"))},[ot.unlinkPanels?(Y(),fe("button",{key:0,type:"button",disabled:!M(be),class:oe([[M(b).e("icon-btn"),{"is-disabled":!M(be)}],"d-arrow-left"]),"aria-label":M(C)("el.datepicker.prevYear"),onClick:le},[ie(M(Ft),null,{default:he(()=>[ie(M(wm))]),_:1})],10,Cje)):Fe("v-if",!0),ot.unlinkPanels?(Y(),fe("button",{key:1,type:"button",disabled:!M(ye),class:oe([[M(b).e("icon-btn"),{"is-disabled":!M(ye)}],"arrow-left"]),"aria-label":M(C)("el.datepicker.prevMonth"),onClick:J},[ie(M(Ft),null,{default:he(()=>[ie(M(m0))]),_:1})],10,Sje)):Fe("v-if",!0),ce("button",{type:"button","aria-label":M(C)("el.datepicker.nextYear"),class:oe([M(b).e("icon-btn"),"d-arrow-right"]),onClick:X},[ie(M(Ft),null,{default:he(()=>[ie(M(xm))]),_:1})],10,kje),ce("button",{type:"button",class:oe([M(b).e("icon-btn"),"arrow-right"]),"aria-label":M(C)("el.datepicker.nextMonth"),onClick:te},[ie(M(Ft),null,{default:he(()=>[ie(M(Su))]),_:1})],10,Dje),ce("div",null,Ye(M(O)),1)],2),ie(vR,{"selection-mode":"range",date:p.value,"min-date":M(m),"max-date":M(v),"range-state":M(g),"disabled-date":M(o),"cell-class-name":M(i),onChangerange:M(w),onPick:_e,onSelect:M(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),M(Ae)?(Y(),fe("div",{key:0,class:oe(M(b).e("footer"))},[M(s)?(Y(),Pe(M(Sa),{key:0,text:"",size:"small",class:oe(M(b).e("link-btn")),onClick:dt},{default:he(()=>[Dt(Ye(M(C)("el.datepicker.clear")),1)]),_:1},8,["class"])):Fe("v-if",!0),ie(M(Sa),{plain:"",size:"small",class:oe(M(b).e("link-btn")),disabled:M(ve),onClick:je[10]||(je[10]=we=>M(x)(!1))},{default:he(()=>[Dt(Ye(M(C)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2)):Fe("v-if",!0)],2))}});var Tje=Nt(Oje,[["__file","panel-date-range.vue"]]);const Mje=Lt({...ise}),Nje=["onClick"],Fje=["disabled"],Rje=["disabled"],tx="year",Ije=Te({name:"DatePickerMonthRange"}),Bje=Te({...Ije,props:Mje,emits:["pick","set-picker-option","calendar-change"],setup(e,{emit:t}){const n=e,{lang:r}=Gr(),o=Rt("EP_PICKER_BASE"),{shortcuts:i,disabledDate:a,format:l}=o.props,s=dr(o.props,"defaultValue"),u=de(vn().locale(r.value)),c=de(vn().locale(r.value).add(1,tx)),{minDate:d,maxDate:f,rangeState:p,ppNs:m,drpNs:v,handleChangeRange:g,handleRangeConfirm:b,handleShortcutClick:y,onSelect:w}=lse(n,{defaultValue:s,leftDate:u,rightDate:c,unit:tx,onParsedValueChanged:function(L,V){if(n.unlinkPanels&&V){const P=(L==null?void 0:L.year())||0,H=V.year();c.value=P===H?V.add(1,tx):V}else c.value=u.value.add(1,tx)}}),x=ee(()=>!!i.length),{leftPrevYear:_,rightNextYear:E,leftNextYear:C,rightPrevYear:T,leftLabel:k,rightLabel:I,leftYear:O,rightYear:F}=(({unlinkPanels:L,leftDate:V,rightDate:P})=>{const{t:H}=Gr();return{leftPrevYear:()=>{V.value=V.value.subtract(1,"year"),L.value||(P.value=P.value.subtract(1,"year"))},rightNextYear:()=>{L.value||(V.value=V.value.add(1,"year")),P.value=P.value.add(1,"year")},leftNextYear:()=>{V.value=V.value.add(1,"year")},rightPrevYear:()=>{P.value=P.value.subtract(1,"year")},leftLabel:ee(()=>`${V.value.year()} ${H("el.datepicker.year")}`),rightLabel:ee(()=>`${P.value.year()} ${H("el.datepicker.year")}`),leftYear:ee(()=>V.value.year()),rightYear:ee(()=>P.value.year()===V.value.year()?V.value.year()+1:P.value.year())}})({unlinkPanels:dr(n,"unlinkPanels"),leftDate:u,rightDate:c}),N=ee(()=>n.unlinkPanels&&F.value>O.value+1),B=(L,V=!0)=>{const P=L.minDate,H=L.maxDate;f.value===H&&d.value===P||(t("calendar-change",[P.toDate(),H&&H.toDate()]),f.value=H,d.value=P,V&&b())};return t("set-picker-option",["formatToString",L=>L.map(V=>V.format(l))]),(L,V)=>(Y(),fe("div",{class:oe([M(m).b(),M(v).b(),{"has-sidebar":!!L.$slots.sidebar||M(x)}])},[ce("div",{class:oe(M(m).e("body-wrapper"))},[ft(L.$slots,"sidebar",{class:oe(M(m).e("sidebar"))}),M(x)?(Y(),fe("div",{key:0,class:oe(M(m).e("sidebar"))},[(Y(!0),fe(bt,null,bn(M(i),(P,H)=>(Y(),fe("button",{key:H,type:"button",class:oe(M(m).e("shortcut")),onClick:U=>M(y)(P)},Ye(P.text),11,Nje))),128))],2)):Fe("v-if",!0),ce("div",{class:oe(M(m).e("body"))},[ce("div",{class:oe([[M(m).e("content"),M(v).e("content")],"is-left"])},[ce("div",{class:oe(M(v).e("header"))},[ce("button",{type:"button",class:oe([M(m).e("icon-btn"),"d-arrow-left"]),onClick:V[0]||(V[0]=(...P)=>M(_)&&M(_)(...P))},[ie(M(Ft),null,{default:he(()=>[ie(M(wm))]),_:1})],2),L.unlinkPanels?(Y(),fe("button",{key:0,type:"button",disabled:!M(N),class:oe([[M(m).e("icon-btn"),{[M(m).is("disabled")]:!M(N)}],"d-arrow-right"]),onClick:V[1]||(V[1]=(...P)=>M(C)&&M(C)(...P))},[ie(M(Ft),null,{default:he(()=>[ie(M(xm))]),_:1})],10,Fje)):Fe("v-if",!0),ce("div",null,Ye(M(k)),1)],2),ie(mR,{"selection-mode":"range",date:u.value,"min-date":M(d),"max-date":M(f),"range-state":M(p),"disabled-date":M(a),onChangerange:M(g),onPick:B,onSelect:M(w)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),ce("div",{class:oe([[M(m).e("content"),M(v).e("content")],"is-right"])},[ce("div",{class:oe(M(v).e("header"))},[L.unlinkPanels?(Y(),fe("button",{key:0,type:"button",disabled:!M(N),class:oe([[M(m).e("icon-btn"),{"is-disabled":!M(N)}],"d-arrow-left"]),onClick:V[2]||(V[2]=(...P)=>M(T)&&M(T)(...P))},[ie(M(Ft),null,{default:he(()=>[ie(M(wm))]),_:1})],10,Rje)):Fe("v-if",!0),ce("button",{type:"button",class:oe([M(m).e("icon-btn"),"d-arrow-right"]),onClick:V[3]||(V[3]=(...P)=>M(E)&&M(E)(...P))},[ie(M(Ft),null,{default:he(()=>[ie(M(xm))]),_:1})],2),ce("div",null,Ye(M(I)),1)],2),ie(mR,{"selection-mode":"range",date:c.value,"min-date":M(d),"max-date":M(f),"range-state":M(p),"disabled-date":M(a),onChangerange:M(g),onPick:B,onSelect:M(w)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var Lje=Nt(Bje,[["__file","panel-month-range.vue"]]);vn.extend(_Le),vn.extend(RPe),vn.extend(MO),vn.extend(IPe),vn.extend(BPe),vn.extend(LPe),vn.extend(PPe),vn.extend(jPe);var Pje=Te({name:"ElDatePicker",install:null,props:VPe,emits:["update:modelValue"],setup(e,{expose:t,emit:n,slots:r}){const o=_t("picker-panel");qn("ElPopperOptions",Qn(dr(e,"popperOptions"))),qn(cR,{slots:r,pickerNs:o});const i=de();t({focus:(s=!0)=>{var u;(u=i.value)==null||u.focus(s)},handleOpen:()=>{var s;(s=i.value)==null||s.handleOpen()},handleClose:()=>{var s;(s=i.value)==null||s.handleClose()}});const l=s=>{n("update:modelValue",s)};return()=>{var s;const u=(s=e.format)!=null?s:Lae[e.type]||i1,c=function(d){switch(d){case"daterange":case"datetimerange":return Tje;case"monthrange":return Lje;default:return yje}}(e.type);return ie(Hae,Un(e,{format:u,type:e.type,ref:i,"onUpdate:modelValue":l}),{default:d=>ie(c,d,null),"range-separator":r["range-separator"]})}}});const nx=Pje;nx.install=e=>{e.component(nx.name,nx)};let sse;xO=nx,sse=Lt({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:[String,Array,Object]},zIndex:{type:[String,Number]}});var jje=Te({name:"ElOverlay",props:sse,emits:{click:e=>e instanceof MouseEvent},setup(e,{slots:t,emit:n}){const r=_t("overlay"),{onClick:o,onMousedown:i,onMouseup:a}=sF(e.customMaskEvent?void 0:l=>{n("click",l)});return()=>e.mask?ie("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:o,onMousedown:i,onMouseup:a},[ft(t,"default")],O3.STYLE|O3.CLASS|O3.PROPS,["onClick","onMouseup","onMousedown"]):pn("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ft(t,"default")])}});let gR,yR,use,cse,dse,fse,pse;WO=jje,gR=Symbol("dialogInjectionKey"),yR=Lt({center:Boolean,alignCenter:Boolean,closeIcon:{type:fi},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),use=["aria-level"],cse=["aria-label"],dse=["id"],fse=Te({name:"ElDialogContent"}),pse=Te({...fse,props:yR,emits:{close:()=>!0},setup(e){const t=e,{t:n}=Gr(),{Close:r}=$N,{dialogRef:o,headerRef:i,bodyId:a,ns:l,style:s}=Rt(gR),{focusTrapRef:u}=Rt(OO),c=ee(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),d=xQ(u,o),f=ee(()=>t.draggable),p=ee(()=>t.overflow);return qN(o,i,f,p),(m,v)=>(Y(),fe("div",{ref:M(d),class:oe(M(c)),style:$t(M(s)),tabindex:"-1"},[ce("header",{ref_key:"headerRef",ref:i,class:oe([M(l).e("header"),{"show-close":m.showClose}])},[ft(m.$slots,"header",{},()=>[ce("span",{role:"heading","aria-level":m.ariaLevel,class:oe(M(l).e("title"))},Ye(m.title),11,use)]),m.showClose?(Y(),fe("button",{key:0,"aria-label":M(n)("el.dialog.close"),class:oe(M(l).e("headerbtn")),type:"button",onClick:v[0]||(v[0]=g=>m.$emit("close"))},[ie(M(Ft),{class:oe(M(l).e("close"))},{default:he(()=>[(Y(),Pe(Hn(m.closeIcon||M(r))))]),_:1},8,["class"])],10,cse)):Fe("v-if",!0)],2),ce("div",{id:M(a),class:oe(M(l).e("body"))},[ft(m.$slots,"default")],10,dse),m.$slots.footer?(Y(),fe("footer",{key:0,class:oe(M(l).e("footer"))},[ft(m.$slots,"footer")],2)):Fe("v-if",!0)],6))}});var Vje=Nt(pse,[["__file","dialog-content.vue"]]);let hse,vse,mse;eJ=Lt({...yR,appendToBody:Boolean,appendTo:{type:String,default:"body"},beforeClose:{type:Function},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),tJ={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[xn]:e=>Ki(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},nJ=(e,t)=>{var n;const r=dn().emit,{nextZIndex:o}=E9();let i="";const a=Zl(),l=Zl(),s=de(!1),u=de(!1),c=de(!1),d=de((n=e.zIndex)!=null?n:o());let f,p;const m=Gb("namespace",Zm),v=ee(()=>{const E={},C=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(E[`${C}-margin-top`]=e.top),e.width&&(E[`${C}-width`]=ka(e.width))),E}),g=ee(()=>e.alignCenter?{display:"flex"}:{});function b(){p==null||p(),f==null||f(),e.openDelay&&e.openDelay>0?{stop:f}=I3(()=>x(),e.openDelay):x()}function y(){f==null||f(),p==null||p(),e.closeDelay&&e.closeDelay>0?{stop:p}=I3(()=>_(),e.closeDelay):_()}function w(){e.beforeClose?e.beforeClose(function(E){E||(u.value=!0,s.value=!1)}):y()}function x(){rr&&(s.value=!0)}function _(){s.value=!1}return e.lockScroll&&XN(s),Je(()=>e.modelValue,E=>{E?(u.value=!1,b(),c.value=!0,d.value=Soe(e.zIndex)?o():d.value++,St(()=>{r("open"),t.value&&(t.value.scrollTop=0)})):s.value&&y()}),Je(()=>e.fullscreen,E=>{t.value&&(E?(i=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=i)}),yn(()=>{e.modelValue&&(s.value=!0,c.value=!0,b())}),{afterEnter:function(){r("opened")},afterLeave:function(){r("closed"),r(xn,!1),e.destroyOnClose&&(c.value=!1)},beforeLeave:function(){r("close")},handleClose:w,onModalClick:function(){e.closeOnClickModal&&w()},close:y,doClose:_,onOpenAutoFocus:function(){r("openAutoFocus")},onCloseAutoFocus:function(){r("closeAutoFocus")},onCloseRequested:function(){e.closeOnPressEscape&&w()},onFocusoutPrevented:function(E){var C;((C=E.detail)==null?void 0:C.focusReason)==="pointer"&&E.preventDefault()},titleId:a,bodyId:l,closed:u,style:v,overlayDialogStyle:g,rendered:c,visible:s,zIndex:d}},hse=["aria-label","aria-labelledby","aria-describedby"],vse=Te({name:"ElDialog",inheritAttrs:!1}),mse=Te({...vse,props:eJ,emits:tJ,setup(e,{expose:t}){const n=e,r=Ga();y0({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},ee(()=>!!r.title));const o=_t("dialog"),i=de(),a=de(),l=de(),{visible:s,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:p,zIndex:m,afterEnter:v,afterLeave:g,beforeLeave:b,handleClose:y,onModalClick:w,onOpenAutoFocus:x,onCloseAutoFocus:_,onCloseRequested:E,onFocusoutPrevented:C}=nJ(n,i);qn(gR,{dialogRef:i,headerRef:a,bodyId:c,ns:o,rendered:p,style:d});const T=sF(w),k=ee(()=>n.draggable&&!n.fullscreen);return t({visible:s,dialogContentRef:l}),(I,O)=>(Y(),Pe(D3,{to:I.appendTo,disabled:I.appendTo==="body"&&!I.appendToBody},[ie(ca,{name:"dialog-fade",onAfterEnter:M(v),onAfterLeave:M(g),onBeforeLeave:M(b),persisted:""},{default:he(()=>[nn(ie(M(WO),{"custom-mask-event":"",mask:I.modal,"overlay-class":I.modalClass,"z-index":M(m)},{default:he(()=>[ce("div",{role:"dialog","aria-modal":"true","aria-label":I.title||void 0,"aria-labelledby":I.title?void 0:M(u),"aria-describedby":M(c),class:oe(`${M(o).namespace.value}-overlay-dialog`),style:$t(M(f)),onClick:O[0]||(O[0]=(...F)=>M(T).onClick&&M(T).onClick(...F)),onMousedown:O[1]||(O[1]=(...F)=>M(T).onMousedown&&M(T).onMousedown(...F)),onMouseup:O[2]||(O[2]=(...F)=>M(T).onMouseup&&M(T).onMouseup(...F))},[ie(M($w),{loop:"",trapped:M(s),"focus-start-el":"container",onFocusAfterTrapped:M(x),onFocusAfterReleased:M(_),onFocusoutPrevented:M(C),onReleaseRequested:M(E)},{default:he(()=>[M(p)?(Y(),Pe(Vje,Un({key:0,ref_key:"dialogContentRef",ref:l},I.$attrs,{center:I.center,"align-center":I.alignCenter,"close-icon":I.closeIcon,draggable:M(k),overflow:I.overflow,fullscreen:I.fullscreen,"show-close":I.showClose,title:I.title,"aria-level":I.headerAriaLevel,onClose:M(y)}),Ff({header:he(()=>[I.$slots.title?ft(I.$slots,"title",{key:1}):ft(I.$slots,"header",{key:0,close:M(y),titleId:M(u),titleClass:M(o).e("title")})]),default:he(()=>[ft(I.$slots,"default")]),_:2},[I.$slots.footer?{name:"footer",fn:he(()=>[ft(I.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):Fe("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,hse)]),_:3},8,["mask","overlay-class","z-index"]),[[$n,M(s)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});let gse,yse,bse;Mw=Cr(Nt(mse,[["__file","dialog.vue"]])),gse=Lt({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:String,default:"solid"}}),yse=Te({name:"ElDivider"}),bse=Te({...yse,props:gse,setup(e){const t=e,n=_t("divider"),r=ee(()=>n.cssVar({"border-style":t.borderStyle}));return(o,i)=>(Y(),fe("div",{class:oe([M(n).b(),M(n).m(o.direction)]),style:$t(M(r)),role:"separator"},[o.$slots.default&&o.direction!=="vertical"?(Y(),fe("div",{key:0,class:oe([M(n).e("text"),M(n).is(o.contentPosition)])},[ft(o.$slots,"default")],2)):Fe("v-if",!0)],6))}}),vQ=Cr(Nt(bse,[["__file","divider.vue"]]));var zje=Nt(Te({inheritAttrs:!1}),[["render",function(e,t,n,r,o,i){return ft(e.$slots,"default")}],["__file","collection.vue"]]),Hje=Nt(Te({name:"ElCollectionItem",inheritAttrs:!1}),[["render",function(e,t,n,r,o,i){return ft(e.$slots,"default")}],["__file","collection-item.vue"]]);let Ase,wse,xse,_se,Ese,Cse;wQ="data-el-collection-item",TQ=e=>{const t=`El${e}Collection`,n=`${t}Item`,r=Symbol(t),o=Symbol(n),i={...zje,name:t,setup(){const l=de(null),s=new Map;qn(r,{itemMap:s,getItems:()=>{const u=M(l);if(!u)return[];const c=Array.from(u.querySelectorAll(`[${wQ}]`));return[...s.values()].sort((d,f)=>c.indexOf(d.ref)-c.indexOf(f.ref))},collectionRef:l})}},a={...Hje,name:n,setup(l,{attrs:s}){const u=de(null),c=Rt(r,void 0);qn(o,{collectionItemRef:u}),yn(()=>{const d=M(u);d&&c.itemMap.set(d,{ref:d,...s})}),xo(()=>{const d=M(u);c.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:o,ElCollection:i,ElCollectionItem:a}},Rw=Lt({trigger:ug.trigger,effect:{...Ui.effect,default:"light"},type:{type:String},placement:{type:String,default:"bottom"},popperOptions:{type:Object,default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:[Number,String],default:0},maxHeight:{type:[Number,String],default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Object},teleported:Ui.teleported}),nOe=Lt({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:fi}}),aOe=Lt({onKeydown:{type:Function}}),Ase=[Xt.down,Xt.pageDown,Xt.home],_Q=[Xt.up,Xt.pageUp,Xt.end],sOe=[...Ase,..._Q],{ElCollection:hOe,ElCollectionItem:oOe,COLLECTION_INJECTION_KEY:lOe,COLLECTION_ITEM_INJECTION_KEY:rOe}=TQ("Dropdown"),wse=Lt({urlList:{type:Array,default:()=>[]},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:String}}),xse={close:()=>!0,switch:e=>Kn(e),rotate:e=>Kn(e)},_se=["src","crossorigin"],Ese=Te({name:"ElImageViewer"}),Cse=Te({...Ese,props:wse,emits:xse,setup(e,{expose:t,emit:n}){var r;const o=e,i={CONTAIN:{name:"contain",icon:Fo(Roe)},ORIGINAL:{name:"original",icon:Fo(Voe)}},{t:a}=Gr(),l=_t("image-viewer"),{nextZIndex:s}=E9(),u=de(),c=de([]),d=p7(),f=de(!0),p=de(o.initialIndex),m=Qo(i.CONTAIN),v=de({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),g=de((r=o.zIndex)!=null?r:s()),b=ee(()=>{const{urlList:H}=o;return H.length<=1}),y=ee(()=>p.value===0),w=ee(()=>p.value===o.urlList.length-1),x=ee(()=>o.urlList[p.value]),_=ee(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!o.infinite&&y.value)]),E=ee(()=>[l.e("btn"),l.e("next"),l.is("disabled",!o.infinite&&w.value)]),C=ee(()=>{const{scale:H,deg:U,offsetX:G,offsetY:z,enableTransition:$}=v.value;let W=G/H,K=z/H;switch(U%360){case 90:case-270:[W,K]=[K,-W];break;case 180:case-180:[W,K]=[-W,-K];break;case 270:case-90:[W,K]=[-K,W]}const X={transform:`scale(${H}) rotate(${U}deg) translate(${W}px, ${K}px)`,transition:$?"transform .3s":""};return m.value.name===i.CONTAIN.name&&(X.maxWidth=X.maxHeight="100%"),X});function T(){d.stop(),n("close")}function k(){f.value=!1}function I(H){f.value=!1,H.target.alt=a("el.image.error")}function O(H){if(f.value||H.button!==0||!u.value)return;v.value.enableTransition=!1;const{offsetX:U,offsetY:G}=v.value,z=H.pageX,$=H.pageY,W=RN(X=>{v.value={...v.value,offsetX:U+X.pageX-z,offsetY:G+X.pageY-$}}),K=Yo(document,"mousemove",W);Yo(document,"mouseup",()=>{K()}),H.preventDefault()}function F(){v.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function N(){if(f.value)return;const H=Lb(i),U=Object.values(i),G=m.value.name,z=U.findIndex(W=>W.name===G),$=(z+1)%H.length;m.value=i[H[$]],F()}function B(H){const U=o.urlList.length;p.value=(H+U)%U}function L(){y.value&&!o.infinite||B(p.value-1)}function V(){w.value&&!o.infinite||B(p.value+1)}function P(H,U={}){if(f.value)return;const{minScale:G,maxScale:z}=o,{zoomRate:$,rotateDeg:W,enableTransition:K}={zoomRate:o.zoomRate,rotateDeg:90,enableTransition:!0,...U};switch(H){case"zoomOut":v.value.scale>G&&(v.value.scale=Number.parseFloat((v.value.scale/$).toFixed(3)));break;case"zoomIn":v.value.scale<z&&(v.value.scale=Number.parseFloat((v.value.scale*$).toFixed(3)));break;case"clockwise":v.value.deg+=W,n("rotate",v.value.deg);break;case"anticlockwise":v.value.deg-=W,n("rotate",v.value.deg)}v.value.enableTransition=K}return Je(x,()=>{St(()=>{const H=c.value[0];H!=null&&H.complete||(f.value=!0)})}),Je(p,H=>{F(),n("switch",H)}),yn(()=>{var H,U;(function(){const G=RN($=>{switch($.code){case Xt.esc:o.closeOnPressEscape&&T();break;case Xt.space:N();break;case Xt.left:L();break;case Xt.up:P("zoomIn");break;case Xt.right:V();break;case Xt.down:P("zoomOut")}}),z=RN($=>{P(($.deltaY||$.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:o.zoomRate,enableTransition:!1})});d.run(()=>{Yo(document,"keydown",G),Yo(document,"wheel",z)})})(),(U=(H=u.value)==null?void 0:H.focus)==null||U.call(H)}),t({setActiveItem:B}),(H,U)=>(Y(),Pe(D3,{to:"body",disabled:!H.teleported},[ie(ca,{name:"viewer-fade",appear:""},{default:he(()=>[ce("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:oe(M(l).e("wrapper")),style:$t({zIndex:g.value})},[ce("div",{class:oe(M(l).e("mask")),onClick:U[0]||(U[0]=Gt(G=>H.hideOnClickModal&&T(),["self"]))},null,2),Fe(" CLOSE "),ce("span",{class:oe([M(l).e("btn"),M(l).e("close")]),onClick:T},[ie(M(Ft),null,{default:he(()=>[ie(M(wc))]),_:1})],2),Fe(" ARROW "),M(b)?Fe("v-if",!0):(Y(),fe(bt,{key:0},[ce("span",{class:oe(M(_)),onClick:L},[ie(M(Ft),null,{default:he(()=>[ie(M(m0))]),_:1})],2),ce("span",{class:oe(M(E)),onClick:V},[ie(M(Ft),null,{default:he(()=>[ie(M(Su))]),_:1})],2)],64)),Fe(" ACTIONS "),ce("div",{class:oe([M(l).e("btn"),M(l).e("actions")])},[ce("div",{class:oe(M(l).e("actions__inner"))},[ie(M(Ft),{onClick:U[1]||(U[1]=G=>P("zoomOut"))},{default:he(()=>[ie(M(Uoe))]),_:1}),ie(M(Ft),{onClick:U[2]||(U[2]=G=>P("zoomIn"))},{default:he(()=>[ie(M(zN))]),_:1}),ce("i",{class:oe(M(l).e("actions__divider"))},null,2),ie(M(Ft),{onClick:N},{default:he(()=>[(Y(),Pe(Hn(M(m).icon)))]),_:1}),ce("i",{class:oe(M(l).e("actions__divider"))},null,2),ie(M(Ft),{onClick:U[3]||(U[3]=G=>P("anticlockwise"))},{default:he(()=>[ie(M(Poe))]),_:1}),ie(M(Ft),{onClick:U[4]||(U[4]=G=>P("clockwise"))},{default:he(()=>[ie(M(joe))]),_:1})],2)],2),Fe(" CANVAS "),ce("div",{class:oe(M(l).e("canvas"))},[(Y(!0),fe(bt,null,bn(H.urlList,(G,z)=>nn((Y(),fe("img",{ref_for:!0,ref:$=>c.value[z]=$,key:G,src:G,style:$t(M(C)),class:oe(M(l).e("img")),crossorigin:H.crossorigin,onLoad:k,onError:I,onMousedown:O},null,46,_se)),[[$n,z===p.value]])),128))],2),ft(H.$slots,"default")],6)]),_:3})],8,["disabled"]))}});let Sse,kse,Dse,Ose,Tse,Mse;qO=Cr(Nt(Cse,[["__file","image-viewer.vue"]])),Sse=Lt({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:da,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||Kn(e)||["min","max"].includes(e),default:null},name:String,label:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0}}),kse={[Xo]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[Tl]:e=>Kn(e)||pa(e),[xn]:e=>Kn(e)||pa(e)},Dse=["aria-label","onKeydown"],Ose=["aria-label","onKeydown"],Tse=Te({name:"ElInputNumber"}),Mse=Te({...Tse,props:Sse,emits:kse,setup(e,{expose:t,emit:n}){const r=e,{t:o}=Gr(),i=_t("input-number"),a=de(),l=Qn({currentValue:r.modelValue,userInput:null}),{formItem:s}=qa(),u=ee(()=>Kn(r.modelValue)&&r.modelValue<=r.min),c=ee(()=>Kn(r.modelValue)&&r.modelValue>=r.max),d=ee(()=>{const N=b(r.step);return Wi(r.precision)?Math.max(b(r.modelValue),N):(r.precision,r.precision)}),f=ee(()=>r.controls&&r.controlsPosition==="right"),p=$i(),m=wl(),v=ee(()=>{if(l.userInput!==null)return l.userInput;let N=l.currentValue;if(pa(N))return"";if(Kn(N)){if(Number.isNaN(N))return"";Wi(r.precision)||(N=N.toFixed(r.precision))}return N}),g=(N,B)=>{if(Wi(B)&&(B=d.value),B===0)return Math.round(N);let L=String(N);const V=L.indexOf(".");if(V===-1||!L.replace(".","").split("")[V+B])return N;const P=L.length;return L.charAt(P-1)==="5"&&(L=`${L.slice(0,Math.max(0,P-1))}6`),Number.parseFloat(Number(L).toFixed(B))},b=N=>{if(pa(N))return 0;const B=N.toString(),L=B.indexOf(".");let V=0;return L!==-1&&(V=B.length-L-1),V},y=(N,B=1)=>Kn(N)?g(N+r.step*B):l.currentValue,w=()=>{if(r.readonly||m.value||c.value)return;const N=Number(v.value)||0,B=y(N);E(B),n(Tl,l.currentValue),O()},x=()=>{if(r.readonly||m.value||u.value)return;const N=Number(v.value)||0,B=y(N,-1);E(B),n(Tl,l.currentValue),O()},_=(N,B)=>{const{max:L,min:V,step:P,precision:H,stepStrictly:U,valueOnClear:G}=r;L<V&&Ka("InputNumber","min should not be greater than max.");let z=Number(N);if(pa(N)||Number.isNaN(z))return null;if(N===""){if(G===null)return null;z=an(G)?{min:V,max:L}[G]:G}return U&&(z=g(Math.round(z/P)*P,H)),Wi(H)||(z=g(z,H)),(z>L||z<V)&&(z=z>L?L:V,B&&n(xn,z)),z},E=(N,B=!0)=>{var L;const V=l.currentValue,P=_(N);B?V===P&&N||(l.userInput=null,n(xn,P),V!==P&&n(Xo,P,V),r.validateEvent&&((L=s==null?void 0:s.validate)==null||L.call(s,"change").catch(H=>{})),l.currentValue=P):n(xn,P)},C=N=>{l.userInput=N;const B=N===""?null:Number(N);n(Tl,B),E(B,!1)},T=N=>{const B=N!==""?Number(N):"";(Kn(B)&&!Number.isNaN(B)||N==="")&&E(B),O(),l.userInput=null},k=N=>{n("focus",N)},I=N=>{var B;l.userInput=null,n("blur",N),r.validateEvent&&((B=s==null?void 0:s.validate)==null||B.call(s,"blur").catch(L=>{}))},O=()=>{l.currentValue!==r.modelValue&&(l.currentValue=r.modelValue)},F=N=>{document.activeElement===N.target&&N.preventDefault()};return Je(()=>r.modelValue,(N,B)=>{const L=_(N,!0);l.userInput===null&&L!==B&&(l.currentValue=L)},{immediate:!0}),yn(()=>{var N;const{min:B,max:L,modelValue:V}=r,P=(N=a.value)==null?void 0:N.input;if(P.setAttribute("role","spinbutton"),Number.isFinite(L)?P.setAttribute("aria-valuemax",String(L)):P.removeAttribute("aria-valuemax"),Number.isFinite(B)?P.setAttribute("aria-valuemin",String(B)):P.removeAttribute("aria-valuemin"),P.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),P.setAttribute("aria-disabled",String(m.value)),!Kn(V)&&V!=null){let H=Number(V);Number.isNaN(H)&&(H=null),n(xn,H)}}),zs(()=>{var N,B;const L=(N=a.value)==null?void 0:N.input;L==null||L.setAttribute("aria-valuenow",`${(B=l.currentValue)!=null?B:""}`)}),t({focus:()=>{var N,B;(B=(N=a.value)==null?void 0:N.focus)==null||B.call(N)},blur:()=>{var N,B;(B=(N=a.value)==null?void 0:N.blur)==null||B.call(N)}}),(N,B)=>(Y(),fe("div",{class:oe([M(i).b(),M(i).m(M(p)),M(i).is("disabled",M(m)),M(i).is("without-controls",!N.controls),M(i).is("controls-right",M(f))]),onDragstart:B[0]||(B[0]=Gt(()=>{},["prevent"]))},[N.controls?nn((Y(),fe("span",{key:0,role:"button","aria-label":M(o)("el.inputNumber.decrease"),class:oe([M(i).e("decrease"),M(i).is("disabled",M(u))]),onKeydown:Rr(x,["enter"])},[ft(N.$slots,"decrease-icon",{},()=>[ie(M(Ft),null,{default:he(()=>[M(f)?(Y(),Pe(M(p0),{key:0})):(Y(),Pe(M(Boe),{key:1}))]),_:1})])],42,Dse)),[[M(Zb),x]]):Fe("v-if",!0),N.controls?nn((Y(),fe("span",{key:1,role:"button","aria-label":M(o)("el.inputNumber.increase"),class:oe([M(i).e("increase"),M(i).is("disabled",M(c))]),onKeydown:Rr(w,["enter"])},[ft(N.$slots,"increase-icon",{},()=>[ie(M(Ft),null,{default:he(()=>[M(f)?(Y(),Pe(M(p9),{key:0})):(Y(),Pe(M(jN),{key:1}))]),_:1})])],42,Ose)),[[M(Zb),w]]):Fe("v-if",!0),ie(M(ua),{id:N.id,ref_key:"input",ref:a,type:"number",step:N.step,"model-value":M(v),placeholder:N.placeholder,readonly:N.readonly,disabled:M(m),size:M(p),max:N.max,min:N.min,name:N.name,label:N.label,"validate-event":!1,onWheel:F,onKeydown:[Rr(Gt(w,["prevent"]),["up"]),Rr(Gt(x,["prevent"]),["down"])],onBlur:I,onFocus:k,onInput:C,onChange:T},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","label","onKeydown"])],34))}});let Nse,Fse,Rse,Ise,Bse;Bw=Cr(Nt(Mse,[["__file","input-number.vue"]])),Nse=Lt({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:fi}}),Fse={click:e=>e instanceof MouseEvent},Rse=["href","target"],Ise=Te({name:"ElLink"}),Bse=Te({...Ise,props:Nse,emits:Fse,setup(e,{emit:t}){const n=e,r=_t("link"),o=ee(()=>[r.b(),r.m(n.type),r.is("disabled",n.disabled),r.is("underline",n.underline&&!n.disabled)]);function i(a){n.disabled||t("click",a)}return(a,l)=>(Y(),fe("a",{class:oe(M(o)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:i},[a.icon?(Y(),Pe(M(Ft),{key:0},{default:he(()=>[(Y(),Pe(Hn(a.icon)))]),_:1})):Fe("v-if",!0),a.$slots.default?(Y(),fe("span",{key:1,class:oe(M(r).e("inner"))},[ft(a.$slots,"default")],2)):Fe("v-if",!0),a.$slots.icon?ft(a.$slots,"icon",{key:2}):Fe("v-if",!0)],10,Rse))}});let bR;yQ=Cr(Nt(Bse,[["__file","link.vue"]])),bR=Symbol("ElSelectGroup"),N3=Symbol("ElSelect");const $je=Te({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=_t("select"),n=Zl(),r=ee(()=>[t.be("dropdown","item"),t.is("disabled",M(l)),t.is("selected",M(a)),t.is("hovering",M(f))]),o=Qn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:i,itemSelected:a,isDisabled:l,select:s,hoverItem:u,updateOption:c}=function(m,v){const g=Rt(N3),b=Rt(bR,{disabled:!1}),y=ee(()=>g.props.multiple?T(g.props.modelValue,m.value):T([g.props.modelValue],m.value)),w=ee(()=>{if(g.props.multiple){const k=g.props.modelValue||[];return!y.value&&k.length>=g.props.multipleLimit&&g.props.multipleLimit>0}return!1}),x=ee(()=>m.label||(wn(m.value)?"":m.value)),_=ee(()=>m.value||m.label||""),E=ee(()=>m.disabled||v.groupDisabled||w.value),C=dn(),T=(k=[],I)=>{if(wn(m.value)){const O=g.props.valueKey;return k&&k.some(F=>Zn(es(F,O))===es(I,O))}return k&&k.includes(I)};return Je(()=>x.value,()=>{m.created||g.props.remote||g.setSelected()}),Je(()=>m.value,(k,I)=>{const{remote:O,valueKey:F}=g.props;if(ns(k,I)||(g.onOptionDestroy(I,C.proxy),g.onOptionCreate(C.proxy)),!m.created&&!O){if(F&&wn(k)&&wn(I)&&k[F]===I[F])return;g.setSelected()}}),Je(()=>b.disabled,()=>{v.groupDisabled=b.disabled},{immediate:!0}),{select:g,currentLabel:x,currentValue:_,itemSelected:y,isDisabled:E,hoverItem:()=>{m.disabled||b.disabled||(g.states.hoveringIndex=g.optionsArray.indexOf(C.proxy))},updateOption:k=>{const I=new RegExp(GQ(k),"i");v.visible=I.test(x.value)||m.created}}}(e,o),{visible:d,hover:f}=di(o),p=dn().proxy;return s.onOptionCreate(p),xo(()=>{const m=p.value,{selected:v}=s.states,g=(s.props.multiple?v:[v]).some(b=>b.value===p.value);St(()=>{s.states.cachedOptions.get(m)!==p||g||s.states.cachedOptions.delete(m)}),s.onOptionDestroy(m,p)}),{ns:t,id:n,containerKls:r,currentLabel:i,itemSelected:a,isDisabled:l,select:s,hoverItem:u,updateOption:c,visible:d,hover:f,selectOptionClick:function(){e.disabled!==!0&&o.groupDisabled!==!0&&s.handleOptionSelect(p)},states:o}}}),Uje=["id","aria-disabled","aria-selected"];var AR=Nt($je,[["render",function(e,t,n,r,o,i){return nn((Y(),fe("li",{id:e.id,class:oe(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...a)=>e.hoverItem&&e.hoverItem(...a)),onClick:t[1]||(t[1]=Gt((...a)=>e.selectOptionClick&&e.selectOptionClick(...a),["stop"]))},[ft(e.$slots,"default",{},()=>[ce("span",null,Ye(e.currentLabel),1)])],42,Uje)),[[$n,e.visible]])}],["__file","option.vue"]]);const Wje=Te({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=Rt(N3),t=_t("select"),n=ee(()=>e.props.popperClass),r=ee(()=>e.props.multiple),o=ee(()=>e.props.fitInputWidth),i=de("");function a(){var l;i.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return yn(()=>{a(),fa(e.selectRef,a)}),{ns:t,minWidth:i,popperClass:n,isMultiple:r,isFitInputWidth:o}}});var Gje=Nt(Wje,[["render",function(e,t,n,r,o,i){return Y(),fe("div",{class:oe([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:$t({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(Y(),fe("div",{key:0,class:oe(e.ns.be("dropdown","header"))},[ft(e.$slots,"header")],2)):Fe("v-if",!0),ft(e.$slots,"default"),e.$slots.footer?(Y(),fe("div",{key:1,class:oe(e.ns.be("dropdown","footer"))},[ft(e.$slots,"footer")],2)):Fe("v-if",!0)],6)}],["__file","select-dropdown.vue"]]);UQ=function(e){const t=de(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:n=>{const r=n.target.value,o=r[r.length-1]||"";t.value=!g9(o)},handleCompositionEnd:n=>{t.value&&(t.value=!1,Ut(e)&&e(n))}}};const qje=(e,t)=>{const{t:n}=Gr(),r=Zl(),o=_t("select"),i=_t("input"),a=Qn({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=de(null),s=de(null),u=de(null),c=de(null),d=de(null),f=de(null),p=de(null),m=de(null),v=de(null),g=de(null),b=de(null),y=de(null),{wrapperRef:w,isFocused:x,handleFocus:_,handleBlur:E}=Vw(d,{afterFocus(){e.automaticDropdown&&!C.value&&(C.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(tt){var kt,An;return((kt=u.value)==null?void 0:kt.isFocusInsideContent(tt))||((An=c.value)==null?void 0:An.isFocusInsideContent(tt))},afterBlur(){C.value=!1,a.menuVisibleOnFocus=!1}}),C=de(!1),T=de(),{form:k,formItem:I}=qa(),{inputId:O}=Ac(e,{formItemContext:I}),{valueOnClear:F,isEmptyValue:N}=jw(e),B=ee(()=>e.disabled||(k==null?void 0:k.disabled)),L=ee(()=>e.multiple?mt(e.modelValue)&&e.modelValue.length>0:!N(e.modelValue)),V=ee(()=>e.clearable&&!B.value&&a.inputHovering&&L.value),P=ee(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),H=ee(()=>o.is("reverse",P.value&&C.value)),U=ee(()=>(I==null?void 0:I.validateState)||""),G=ee(()=>zO[U.value]),z=ee(()=>e.remote?300:0),$=ee(()=>e.loading?e.loadingText||n("el.select.loading"):!(e.remote&&!a.inputValue&&a.options.size===0)&&(e.filterable&&a.inputValue&&a.options.size>0&&W.value===0?e.noMatchText||n("el.select.noMatch"):a.options.size===0?e.noDataText||n("el.select.noData"):null)),W=ee(()=>K.value.filter(tt=>tt.visible).length),K=ee(()=>{const tt=Array.from(a.options.values()),kt=[];return a.optionValues.forEach(An=>{const _n=tt.findIndex(po=>po.value===An);_n>-1&&kt.push(tt[_n])}),kt.length>=tt.length?kt:tt}),X=ee(()=>Array.from(a.cachedOptions.values())),te=ee(()=>{const tt=K.value.filter(kt=>!kt.created).some(kt=>kt.currentLabel===a.inputValue);return e.filterable&&e.allowCreate&&a.inputValue!==""&&!tt}),ne=()=>{e.filterable&&Ut(e.filterMethod)||e.filterable&&e.remote&&Ut(e.remoteMethod)||K.value.forEach(tt=>{var kt;(kt=tt.updateOption)==null||kt.call(tt,a.inputValue)})},se=$i(),le=ee(()=>["small"].includes(se.value)?"small":"default"),J=ee({get:()=>C.value&&$.value!==!1,set(tt){C.value=tt}}),Z=ee(()=>mt(e.modelValue)?e.modelValue.length===0&&!a.inputValue:!e.filterable||!a.inputValue),ye=ee(()=>{var tt;const kt=(tt=e.placeholder)!=null?tt:n("el.select.placeholder");return e.multiple||!L.value?kt:a.selectedLabel});Je(()=>e.modelValue,(tt,kt)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(a.inputValue="",be("")),Ae(),!ns(tt,kt)&&e.validateEvent&&(I==null||I.validate("change").catch(An=>{}))},{flush:"post",deep:!0}),Je(()=>C.value,tt=>{tt?be(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),t("visible-change",tt)}),Je(()=>a.options.entries(),()=>{var tt;if(!rr)return;const kt=((tt=l.value)==null?void 0:tt.querySelectorAll("input"))||[];(e.filterable||e.defaultFirstOption||Wi(e.modelValue))&&Array.from(kt).includes(document.activeElement)||Ae(),e.defaultFirstOption&&(e.filterable||e.remote)&&W.value&&ve()},{flush:"post"}),Je(()=>a.hoveringIndex,tt=>{Kn(tt)&&tt>-1?T.value=K.value[tt]||{}:T.value={},K.value.forEach(kt=>{kt.hover=T.value===kt})}),yl(()=>{a.isBeforeHide||ne()});const be=tt=>{a.previousQuery!==tt&&(a.previousQuery=tt,e.filterable&&Ut(e.filterMethod)?e.filterMethod(tt):e.filterable&&e.remote&&Ut(e.remoteMethod)&&e.remoteMethod(tt),e.defaultFirstOption&&(e.filterable||e.remote)&&W.value?St(ve):St(_e))},ve=()=>{const tt=K.value.filter(_n=>_n.visible&&!_n.disabled&&!_n.states.groupDisabled),kt=tt.find(_n=>_n.created),An=tt[0];a.hoveringIndex=it(K.value,kt||An)},Ae=()=>{if(!e.multiple){const kt=Ce(e.modelValue);return a.selectedLabel=kt.currentLabel,void(a.selected=kt)}a.selectedLabel="";const tt=[];mt(e.modelValue)&&e.modelValue.forEach(kt=>{tt.push(Ce(kt))}),a.selected=tt},Ce=tt=>{let kt;const An=K3(tt).toLowerCase()==="object",_n=K3(tt).toLowerCase()==="null",po=K3(tt).toLowerCase()==="undefined";for(let Qr=a.cachedOptions.size-1;Qr>=0;Qr--){const Ar=X.value[Qr];if(An?es(Ar.value,e.valueKey)===es(tt,e.valueKey):Ar.value===tt){kt={value:tt,currentLabel:Ar.currentLabel,isDisabled:Ar.isDisabled};break}}return kt||{value:tt,currentLabel:An?tt.label:_n||po?"":tt}},_e=()=>{e.multiple?a.hoveringIndex=K.value.findIndex(tt=>a.selected.some(kt=>ht(kt)===ht(tt))):a.hoveringIndex=K.value.findIndex(tt=>ht(tt)===ht(a.selected))},ke=()=>{a.calculatorWidth=f.value.getBoundingClientRect().width},Be=()=>{var tt,kt;(kt=(tt=u.value)==null?void 0:tt.updatePopper)==null||kt.call(tt)},$e=()=>{var tt,kt;(kt=(tt=c.value)==null?void 0:tt.updatePopper)==null||kt.call(tt)},rt=()=>{a.inputValue.length>0&&!C.value&&(C.value=!0),be(a.inputValue)},ge=tt=>{if(a.inputValue=tt.target.value,!e.remote)return rt();We()},We=ts(()=>{rt()},z.value),st=tt=>{ns(e.modelValue,tt)||t(Xo,tt)},At=tt=>{tt.stopPropagation();const kt=e.multiple?[]:F.value;if(e.multiple)for(const An of a.selected)An.isDisabled&&kt.push(An.value);t(xn,kt),st(kt),a.hoveringIndex=-1,C.value=!1,t("clear"),me()},Ve=tt=>{if(e.multiple){const kt=(e.modelValue||[]).slice(),An=it(kt,tt.value);An>-1?kt.splice(An,1):(e.multipleLimit<=0||kt.length<e.multipleLimit)&&kt.push(tt.value),t(xn,kt),st(kt),tt.created&&be(""),e.filterable&&!e.reserveKeyword&&(a.inputValue="")}else t(xn,tt.value),st(tt.value),C.value=!1;me(),C.value||St(()=>{dt(tt)})},it=(tt=[],kt)=>{if(!wn(kt))return tt.indexOf(kt);const An=e.valueKey;let _n=-1;return tt.some((po,Qr)=>Zn(es(po,An))===es(kt,An)&&(_n=Qr,!0)),_n},dt=tt=>{var kt,An,_n,po,Qr;const Ar=mt(tt)?tt[0]:tt;let Jr=null;if(Ar!=null&&Ar.value){const Ao=K.value.filter(pl=>pl.value===Ar.value);Ao.length>0&&(Jr=Ao[0].$el)}if(u.value&&Jr){const Ao=(po=(_n=(An=(kt=u.value)==null?void 0:kt.popperRef)==null?void 0:An.contentRef)==null?void 0:_n.querySelector)==null?void 0:po.call(_n,`.${o.be("dropdown","wrap")}`);Ao&&Ooe(Ao,Jr)}(Qr=y.value)==null||Qr.handleScroll()},{handleCompositionStart:ot,handleCompositionUpdate:je,handleCompositionEnd:we}=UQ(tt=>ge(tt)),ze=ee(()=>{var tt,kt;return(kt=(tt=u.value)==null?void 0:tt.popperRef)==null?void 0:kt.contentRef}),me=()=>{var tt;(tt=d.value)==null||tt.focus()},Me=tt=>{if(C.value=!1,x.value){const kt=new FocusEvent("focus",tt);St(()=>E(kt))}},Ie=()=>{B.value||(a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:C.value=!C.value)},ht=tt=>wn(tt.value)?es(tt.value,e.valueKey):tt.value,gt=ee(()=>K.value.filter(tt=>tt.visible).every(tt=>tt.disabled)),vt=ee(()=>e.multiple?e.collapseTags?a.selected.slice(0,e.maxCollapseTags):a.selected:[]),qt=ee(()=>e.multiple&&e.collapseTags?a.selected.slice(e.maxCollapseTags):[]),mn=tt=>{if(C.value){if(a.options.size!==0&&W.value!==0&&!gt.value){tt==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):tt==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const kt=K.value[a.hoveringIndex];kt.disabled!==!0&&kt.states.groupDisabled!==!0&&kt.visible||mn(tt),St(()=>dt(T.value))}}else C.value=!0},Zt=ee(()=>{const tt=(()=>{if(!s.value)return 0;const kt=window.getComputedStyle(s.value);return Number.parseFloat(kt.gap||"6px")})();return{maxWidth:`${b.value&&e.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-tt:a.selectionWidth}px`}}),rn=ee(()=>({maxWidth:`${a.selectionWidth}px`})),zn=ee(()=>({width:`${Math.max(a.calculatorWidth,11)}px`}));return e.multiple&&!mt(e.modelValue)&&t(xn,[]),!e.multiple&&mt(e.modelValue)&&t(xn,""),fa(s,()=>{a.selectionWidth=s.value.getBoundingClientRect().width}),fa(f,ke),fa(v,Be),fa(w,Be),fa(g,$e),fa(b,()=>{a.collapseItemWidth=b.value.getBoundingClientRect().width}),yn(()=>{Ae()}),{inputId:O,contentId:r,nsSelect:o,nsInput:i,states:a,isFocused:x,expanded:C,optionsArray:K,hoverOption:T,selectSize:se,filteredOptionsCount:W,resetCalculatorWidth:ke,updateTooltip:Be,updateTagTooltip:$e,debouncedOnInputChange:We,onInput:ge,deletePrevTag:tt=>{if(e.multiple&&tt.code!==Xt.delete&&tt.target.value.length<=0){const kt=e.modelValue.slice(),An=(_n=>WQ(_n,po=>!a.disabledOptions.has(po)))(kt);if(An<0)return;kt.splice(An,1),t(xn,kt),st(kt)}},deleteTag:(tt,kt)=>{const An=a.selected.indexOf(kt);if(An>-1&&!B.value){const _n=e.modelValue.slice();_n.splice(An,1),t(xn,_n),st(_n),t("remove-tag",kt.value)}tt.stopPropagation(),me()},deleteSelected:At,handleOptionSelect:Ve,scrollToOption:dt,hasModelValue:L,shouldShowPlaceholder:Z,currentPlaceholder:ye,showClose:V,iconComponent:P,iconReverse:H,validateState:U,validateIcon:G,showNewOption:te,updateOptions:ne,collapseTagSize:le,setSelected:Ae,selectDisabled:B,emptyText:$,handleCompositionStart:ot,handleCompositionUpdate:je,handleCompositionEnd:we,onOptionCreate:tt=>{a.options.set(tt.value,tt),a.cachedOptions.set(tt.value,tt),tt.disabled&&a.disabledOptions.set(tt.value,tt)},onOptionDestroy:(tt,kt)=>{a.options.get(tt)===kt&&a.options.delete(tt)},handleMenuEnter:()=>{a.isBeforeHide=!1,St(()=>dt(a.selected))},handleFocus:_,focus:me,blur:()=>{Me()},handleBlur:E,handleClearClick:tt=>{At(tt)},handleClickOutside:Me,handleEsc:()=>{a.inputValue.length>0?a.inputValue="":C.value=!1},toggleMenu:Ie,selectOption:()=>{C.value?K.value[a.hoveringIndex]&&Ve(K.value[a.hoveringIndex]):Ie()},getValueKey:ht,navigateOptions:mn,dropdownMenuVisible:J,showTagList:vt,collapseTagList:qt,tagStyle:Zt,collapseTagStyle:rn,inputStyle:zn,popperRef:ze,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:f,prefixRef:p,suffixRef:m,selectRef:l,wrapperRef:w,selectionRef:s,scrollbarRef:y,menuRef:v,tagMenuRef:g,collapseItemRef:b}};var Kje=Te({name:"ElOptions",setup(e,{slots:t}){const n=Rt(N3);let r=[];return()=>{var o,i;const a=(o=t.default)==null?void 0:o.call(t),l=[];return a.length&&function s(u){mt(u)&&u.forEach(c=>{var d,f,p,m;const v=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;v==="ElOptionGroup"?s(an(c.children)||mt(c.children)||!Ut((f=c.children)==null?void 0:f.default)?c.children:(p=c.children)==null?void 0:p.default()):v==="ElOption"?l.push((m=c.props)==null?void 0:m.value):mt(c.children)&&s(c.children)})}((i=a[0])==null?void 0:i.children),ns(l,r)||(r=l,n&&(n.states.optionValues=l)),a}}});const Yje=Lt({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:da,effect:{type:String,default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:Ui.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:fi,default:h0},fitInputWidth:Boolean,suffixIcon:{type:fi,default:p0},tagType:{...Pw.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:String,values:v0,default:"bottom-start"},fallbackPlacements:{type:Array,default:["bottom-start","top-start","right","left"]},ariaLabel:{type:String,default:void 0},...F3}),Lse="ElSelect",Xje=Te({name:Lse,componentName:Lse,components:{ElInput:ua,ElSelectMenu:Gje,ElOption:AR,ElOptions:Kje,ElTag:kw,ElScrollbar:wd,ElTooltip:Al,ElIcon:Ft},directives:{ClickOutside:Rf},props:Yje,emits:[xn,Xo,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const n=qje(e,t);return qn(N3,Qn({props:e,states:n.states,optionsArray:n.optionsArray,handleOptionSelect:n.handleOptionSelect,onOptionCreate:n.onOptionCreate,onOptionDestroy:n.onOptionDestroy,selectRef:n.selectRef,setSelected:n.setSelected})),{...n}}}),Qje=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Jje=["textContent"];var Zje=Nt(Xje,[["render",function(e,t,n,r,o,i){const a=Qe("el-tag"),l=Qe("el-tooltip"),s=Qe("el-icon"),u=Qe("el-option"),c=Qe("el-options"),d=Qe("el-scrollbar"),f=Qe("el-select-menu"),p=gm("click-outside");return nn((Y(),fe("div",{ref:"selectRef",class:oe([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[16]||(t[16]=m=>e.states.inputHovering=!0),onMouseleave:t[17]||(t[17]=m=>e.states.inputHovering=!1),onClick:t[18]||(t[18]=Gt((...m)=>e.toggleMenu&&e.toggleMenu(...m),["prevent","stop"]))},[ie(l,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[15]||(t[15]=m=>e.states.isBeforeHide=!1)},{default:he(()=>{var m;return[ce("div",{ref:"wrapperRef",class:oe([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(Y(),fe("div",{key:0,ref:"prefixRef",class:oe(e.nsSelect.e("prefix"))},[ft(e.$slots,"prefix")],2)):Fe("v-if",!0),ce("div",{ref:"selectionRef",class:oe([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?ft(e.$slots,"tag",{key:0},()=>[(Y(!0),fe(bt,null,bn(e.showTagList,v=>(Y(),fe("div",{key:e.getValueKey(v),class:oe(e.nsSelect.e("selected-item"))},[ie(a,{closable:!e.selectDisabled&&!v.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:$t(e.tagStyle),onClose:g=>e.deleteTag(g,v)},{default:he(()=>[ce("span",{class:oe(e.nsSelect.e("tags-text"))},Ye(v.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(Y(),Pe(l,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:he(()=>[ce("div",{ref:"collapseItemRef",class:oe(e.nsSelect.e("selected-item"))},[ie(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:$t(e.collapseTagStyle)},{default:he(()=>[ce("span",{class:oe(e.nsSelect.e("tags-text"))}," + "+Ye(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:he(()=>[ce("div",{ref:"tagMenuRef",class:oe(e.nsSelect.e("selection"))},[(Y(!0),fe(bt,null,bn(e.collapseTagList,v=>(Y(),fe("div",{key:e.getValueKey(v),class:oe(e.nsSelect.e("selected-item"))},[ie(a,{class:"in-tooltip",closable:!e.selectDisabled&&!v.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:g=>e.deleteTag(g,v)},{default:he(()=>[ce("span",{class:oe(e.nsSelect.e("tags-text"))},Ye(v.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):Fe("v-if",!0)]):Fe("v-if",!0),e.selectDisabled?Fe("v-if",!0):(Y(),fe("div",{key:1,class:oe([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[nn(ce("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=v=>e.states.inputValue=v),type:"text",class:oe([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:$t(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((m=e.hoverOption)==null?void 0:m.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...v)=>e.handleFocus&&e.handleFocus(...v)),onBlur:t[2]||(t[2]=(...v)=>e.handleBlur&&e.handleBlur(...v)),onKeydown:[t[3]||(t[3]=Rr(Gt(v=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=Rr(Gt(v=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=Rr(Gt((...v)=>e.handleEsc&&e.handleEsc(...v),["stop","prevent"]),["esc"])),t[6]||(t[6]=Rr(Gt((...v)=>e.selectOption&&e.selectOption(...v),["stop","prevent"]),["enter"])),t[7]||(t[7]=Rr(Gt((...v)=>e.deletePrevTag&&e.deletePrevTag(...v),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...v)=>e.handleCompositionStart&&e.handleCompositionStart(...v)),onCompositionupdate:t[9]||(t[9]=(...v)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...v)),onCompositionend:t[10]||(t[10]=(...v)=>e.handleCompositionEnd&&e.handleCompositionEnd(...v)),onInput:t[11]||(t[11]=(...v)=>e.onInput&&e.onInput(...v)),onClick:t[12]||(t[12]=Gt((...v)=>e.toggleMenu&&e.toggleMenu(...v),["stop"]))},null,46,Qje),[[f0,e.states.inputValue]]),e.filterable?(Y(),fe("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:oe(e.nsSelect.e("input-calculator")),textContent:Ye(e.states.inputValue)},null,10,Jje)):Fe("v-if",!0)],2)),e.shouldShowPlaceholder?(Y(),fe("div",{key:2,class:oe([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[ce("span",null,Ye(e.currentPlaceholder),1)],2)):Fe("v-if",!0)],2),ce("div",{ref:"suffixRef",class:oe(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(Y(),Pe(s,{key:0,class:oe([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:he(()=>[(Y(),Pe(Hn(e.iconComponent)))]),_:1},8,["class"])):Fe("v-if",!0),e.showClose&&e.clearIcon?(Y(),Pe(s,{key:1,class:oe([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:he(()=>[(Y(),Pe(Hn(e.clearIcon)))]),_:1},8,["class","onClick"])):Fe("v-if",!0),e.validateState&&e.validateIcon?(Y(),Pe(s,{key:2,class:oe([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:he(()=>[(Y(),Pe(Hn(e.validateIcon)))]),_:1},8,["class"])):Fe("v-if",!0)],2)],2)]}),content:he(()=>[ie(f,{ref:"menuRef"},{default:he(()=>[e.$slots.header?(Y(),fe("div",{key:0,class:oe(e.nsSelect.be("dropdown","header")),onClick:t[13]||(t[13]=Gt(()=>{},["stop"]))},[ft(e.$slots,"header")],2)):Fe("v-if",!0),nn(ie(d,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:oe([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:he(()=>[e.showNewOption?(Y(),Pe(u,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):Fe("v-if",!0),ie(c,null,{default:he(()=>[ft(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[$n,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(Y(),fe("div",{key:1,class:oe(e.nsSelect.be("dropdown","loading"))},[ft(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(Y(),fe("div",{key:2,class:oe(e.nsSelect.be("dropdown","empty"))},[ft(e.$slots,"empty",{},()=>[ce("span",null,Ye(e.emptyText),1)])],2)):Fe("v-if",!0),e.$slots.footer?(Y(),fe("div",{key:3,class:oe(e.nsSelect.be("dropdown","footer")),onClick:t[14]||(t[14]=Gt(()=>{},["stop"]))},[ft(e.$slots,"footer")],2)):Fe("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow"])],34)),[[p,e.handleClickOutside,e.popperRef]])}],["__file","select.vue"]]);const eVe=Te({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=_t("select"),n=de(null),r=dn(),o=de([]);qn(bR,Qn({...di(e)}));const i=ee(()=>o.value.some(s=>s.visible===!0)),a=s=>{const u=[];return mt(s.children)&&s.children.forEach(c=>{var d,f;c.type&&c.type.name==="ElOption"&&c.component&&c.component.proxy?u.push(c.component.proxy):(d=c.children)!=null&&d.length?u.push(...a(c)):(f=c.component)!=null&&f.subTree&&u.push(...a(c.component.subTree))}),u},l=()=>{o.value=a(r.subTree)};return yn(()=>{l()}),XNe(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:i,ns:t}}});var Pse=Nt(eVe,[["render",function(e,t,n,r,o,i){return nn((Y(),fe("ul",{ref:"groupRef",class:oe(e.ns.be("group","wrap"))},[ce("li",{class:oe(e.ns.be("group","title"))},Ye(e.label),3),ce("li",null,[ce("ul",{class:oe(e.ns.b("group"))},[ft(e.$slots,"default")],2)])],2)),[[$n,e.visible]])}],["__file","option-group.vue"]]);let jse,Vse,zse,Hse;w3=Cr(Zje,{Option:AR,OptionGroup:Pse}),wO=Ya(AR),yOe=Ya(Pse),jse=Lt({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:B9,default:"primary"},cancelButtonType:{type:String,values:B9,default:"text"},icon:{type:fi,default:()=>Loe},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:Ui.teleported,persistent:Ui.persistent,width:{type:[String,Number],default:150}}),Vse={confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent},zse=Te({name:"ElPopconfirm"}),Hse=Te({...zse,props:jse,emits:Vse,setup(e,{emit:t}){const n=e,{t:r}=Gr(),o=_t("popconfirm"),i=de(),a=()=>{var f,p;(p=(f=i.value)==null?void 0:f.onClose)==null||p.call(f)},l=ee(()=>({width:ka(n.width)})),s=f=>{t("confirm",f),a()},u=f=>{t("cancel",f),a()},c=ee(()=>n.confirmButtonText||r("el.popconfirm.confirmButtonText")),d=ee(()=>n.cancelButtonText||r("el.popconfirm.cancelButtonText"));return(f,p)=>(Y(),Pe(M(Al),Un({ref_key:"tooltipRef",ref:i,trigger:"click",effect:"light"},f.$attrs,{"popper-class":`${M(o).namespace.value}-popover`,"popper-style":M(l),teleported:f.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":f.hideAfter,persistent:f.persistent}),{content:he(()=>[ce("div",{class:oe(M(o).b())},[ce("div",{class:oe(M(o).e("main"))},[!f.hideIcon&&f.icon?(Y(),Pe(M(Ft),{key:0,class:oe(M(o).e("icon")),style:$t({color:f.iconColor})},{default:he(()=>[(Y(),Pe(Hn(f.icon)))]),_:1},8,["class","style"])):Fe("v-if",!0),Dt(" "+Ye(f.title),1)],2),ce("div",{class:oe(M(o).e("action"))},[ie(M(Sa),{size:"small",type:f.cancelButtonType==="text"?"":f.cancelButtonType,text:f.cancelButtonType==="text",onClick:u},{default:he(()=>[Dt(Ye(M(d)),1)]),_:1},8,["type","text"]),ie(M(Sa),{size:"small",type:f.confirmButtonType==="text"?"":f.confirmButtonType,text:f.confirmButtonType==="text",onClick:s},{default:he(()=>[Dt(Ye(M(c)),1)]),_:1},8,["type","text"])],2)],2)]),default:he(()=>[f.$slots.reference?ft(f.$slots,"reference",{key:0}):Fe("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});const tVe=Cr(Nt(Hse,[["__file","popconfirm.vue"]])),nVe=Lt({trigger:ug.trigger,placement:Rw.placement,disabled:ug.disabled,visible:Ui.visible,transition:Ui.transition,popperOptions:Rw.popperOptions,tabindex:Rw.tabindex,content:Ui.content,popperStyle:Ui.popperStyle,popperClass:Ui.popperClass,enterable:{...Ui.enterable,default:!0},effect:{...Ui.effect,default:"light"},teleported:Ui.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),rVe={"update:visible":e=>Ki(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},oVe=Te({name:"ElPopover"}),iVe=Te({...oVe,props:nVe,emits:rVe,setup(e,{expose:t,emit:n}){const r=e,o=ee(()=>r["onUpdate:visible"]),i=_t("popover"),a=de(),l=ee(()=>{var v;return(v=M(a))==null?void 0:v.popperRef}),s=ee(()=>[{width:ka(r.width)},r.popperStyle]),u=ee(()=>[i.b(),r.popperClass,{[i.m("plain")]:!!r.content}]),c=ee(()=>r.transition===`${i.namespace.value}-fade-in-linear`),d=()=>{n("before-enter")},f=()=>{n("before-leave")},p=()=>{n("after-enter")},m=()=>{n("update:visible",!1),n("after-leave")};return t({popperRef:l,hide:()=>{var v;(v=a.value)==null||v.hide()}}),(v,g)=>(Y(),Pe(M(Al),Un({ref_key:"tooltipRef",ref:a},v.$attrs,{trigger:v.trigger,placement:v.placement,disabled:v.disabled,visible:v.visible,transition:v.transition,"popper-options":v.popperOptions,tabindex:v.tabindex,content:v.content,offset:v.offset,"show-after":v.showAfter,"hide-after":v.hideAfter,"auto-close":v.autoClose,"show-arrow":v.showArrow,"aria-label":v.title,effect:v.effect,enterable:v.enterable,"popper-class":M(u),"popper-style":M(s),teleported:v.teleported,persistent:v.persistent,"gpu-acceleration":M(c),"onUpdate:visible":M(o),onBeforeShow:d,onBeforeHide:f,onShow:p,onHide:m}),{content:he(()=>[v.title?(Y(),fe("div",{key:0,class:oe(M(i).e("title")),role:"title"},Ye(v.title),3)):Fe("v-if",!0),ft(v.$slots,"default",{},()=>[Dt(Ye(v.content),1)])]),default:he(()=>[v.$slots.reference?ft(v.$slots,"reference",{key:0}):Fe("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var aVe=Nt(iVe,[["__file","popover.vue"]]);const $se=(e,t)=>{const n=t.arg||t.value,r=n==null?void 0:n.popperRef;r&&(r.triggerRef=e)};var lVe={mounted(e,t){$se(e,t)},updated(e,t){$se(e,t)}};let Use,Wse,Gse,qse,Kse,Yse,Xse,Qse,Jse;Use=((e,t)=>(e.install=n=>{n.directive(t,e)},e))(lVe,"popover"),kO=Cr(aVe,{directive:Use}),Wse=Lt({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:String,default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:[String,Array,Function],default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Function,default:e=>`${e}%`}}),Gse=["aria-valuenow"],qse={viewBox:"0 0 100 100"},Kse=["d","stroke","stroke-linecap","stroke-width"],Yse=["d","stroke","opacity","stroke-linecap","stroke-width"],Xse={key:0},Qse=Te({name:"ElProgress"}),Jse=Te({...Qse,props:Wse,setup(e){const t=e,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=_t("progress"),o=ee(()=>({width:`${t.percentage}%`,animationDuration:`${t.duration}s`,backgroundColor:b(t.percentage)})),i=ee(()=>(t.strokeWidth/t.width*100).toFixed(1)),a=ee(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(""+(50-Number.parseFloat(i.value)/2),10):0),l=ee(()=>{const y=a.value,w=t.type==="dashboard";return` |
|
32 |
M 50 50 |
|
33 |
m 0 ${w?"":"-"}${y} |
|
34 |
a ${y} ${y} 0 1 1 0 ${w?"-":""}${2*y} |
|
35 |
a ${y} ${y} 0 1 1 0 ${w?"":"-"}${2*y} |
|
36 |
`}),s=ee(()=>2*Math.PI*a.value),u=ee(()=>t.type==="dashboard"?.75:1),c=ee(()=>`${-1*s.value*(1-u.value)/2}px`),d=ee(()=>({strokeDasharray:`${s.value*u.value}px, ${s.value}px`,strokeDashoffset:c.value})),f=ee(()=>({strokeDasharray:`${s.value*u.value*(t.percentage/100)}px, ${s.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),p=ee(()=>{let y;return y=t.color?b(t.percentage):n[t.status]||n.default,y}),m=ee(()=>t.status==="warning"?v9:t.type==="line"?t.status==="success"?h9:h0:t.status==="success"?jb:wc),v=ee(()=>t.type==="line"?12+.4*t.strokeWidth:.111111*t.width+2),g=ee(()=>t.format(t.percentage)),b=y=>{var w;const{color:x}=t;if(Ut(x))return x(y);if(an(x))return x;{const _=function(E){const C=100/E.length;return E.map((T,k)=>an(T)?{color:T,percentage:(k+1)*C}:T).sort((T,k)=>T.percentage-k.percentage)}(x);for(const E of _)if(E.percentage>y)return E.color;return(w=_[_.length-1])==null?void 0:w.color}};return(y,w)=>(Y(),fe("div",{class:oe([M(r).b(),M(r).m(y.type),M(r).is(y.status),{[M(r).m("without-text")]:!y.showText,[M(r).m("text-inside")]:y.textInside}]),role:"progressbar","aria-valuenow":y.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[y.type==="line"?(Y(),fe("div",{key:0,class:oe(M(r).b("bar"))},[ce("div",{class:oe(M(r).be("bar","outer")),style:$t({height:`${y.strokeWidth}px`})},[ce("div",{class:oe([M(r).be("bar","inner"),{[M(r).bem("bar","inner","indeterminate")]:y.indeterminate},{[M(r).bem("bar","inner","striped")]:y.striped},{[M(r).bem("bar","inner","striped-flow")]:y.stripedFlow}]),style:$t(M(o))},[(y.showText||y.$slots.default)&&y.textInside?(Y(),fe("div",{key:0,class:oe(M(r).be("bar","innerText"))},[ft(y.$slots,"default",{percentage:y.percentage},()=>[ce("span",null,Ye(M(g)),1)])],2)):Fe("v-if",!0)],6)],6)],2)):(Y(),fe("div",{key:1,class:oe(M(r).b("circle")),style:$t({height:`${y.width}px`,width:`${y.width}px`})},[(Y(),fe("svg",qse,[ce("path",{class:oe(M(r).be("circle","track")),d:M(l),stroke:`var(${M(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":y.strokeLinecap,"stroke-width":M(i),fill:"none",style:$t(M(d))},null,14,Kse),ce("path",{class:oe(M(r).be("circle","path")),d:M(l),stroke:M(p),fill:"none",opacity:y.percentage?1:0,"stroke-linecap":y.strokeLinecap,"stroke-width":M(i),style:$t(M(f))},null,14,Yse)]))],6)),!y.showText&&!y.$slots.default||y.textInside?Fe("v-if",!0):(Y(),fe("div",{key:2,class:oe(M(r).e("text")),style:$t({fontSize:`${M(v)}px`})},[ft(y.$slots,"default",{percentage:y.percentage},()=>[y.status?(Y(),Pe(M(Ft),{key:1},{default:he(()=>[(Y(),Pe(Hn(M(m))))]),_:1})):(Y(),fe("span",Xse,Ye(M(g)),1))])],6))],10,Gse))}});const wR=Cr(Nt(Jse,[["__file","progress.vue"]])),sVe=Lt({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:[Array,Object],default:()=>["","",""]},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:[Array,Object],default:()=>[Vb,Vb,Vb]},voidIcon:{type:fi,default:()=>Hoe},disabledVoidIcon:{type:fi,default:()=>Vb},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:Array,default:()=>["Extremely bad","Disappointed","Fair","Satisfied","Surprise"]},scoreTemplate:{type:String,default:"{value}"},size:da,label:{type:String,default:void 0},clearable:{type:Boolean,default:!1}}),uVe={[Xo]:e=>Kn(e),[xn]:e=>Kn(e)},cVe=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"],dVe=["onMousemove","onClick"],fVe=Te({name:"ElRate"}),pVe=Te({...fVe,props:sVe,emits:uVe,setup(e,{expose:t,emit:n}){const r=e;function o(L,V){const P=G=>wn(G),H=Object.keys(V).map(G=>+G).filter(G=>{const z=V[G];return P(z)&&z.excluded?L<G:L<=G}).sort((G,z)=>G-z),U=V[H[0]];return P(U)&&U.value||U}const i=Rt(np,void 0),a=Rt(Fc,void 0),l=$i(),s=_t("rate"),{inputId:u,isLabeledByFormItem:c}=Ac(r,{formItemContext:a}),d=de(r.modelValue),f=de(-1),p=de(!0),m=ee(()=>[s.b(),s.m(l.value)]),v=ee(()=>r.disabled||(i==null?void 0:i.disabled)),g=ee(()=>s.cssVarBlock({"void-color":r.voidColor,"disabled-void-color":r.disabledVoidColor,"fill-color":x.value})),b=ee(()=>{let L="";return r.showScore?L=r.scoreTemplate.replace(/\{\s*value\s*\}/,v.value?`${r.modelValue}`:`${d.value}`):r.showText&&(L=r.texts[Math.ceil(d.value)-1]),L}),y=ee(()=>100*r.modelValue-100*Math.floor(r.modelValue)),w=ee(()=>mt(r.colors)?{[r.lowThreshold]:r.colors[0],[r.highThreshold]:{value:r.colors[1],excluded:!0},[r.max]:r.colors[2]}:r.colors),x=ee(()=>{const L=o(d.value,w.value);return wn(L)?"":L}),_=ee(()=>{let L="";return v.value?L=`${y.value}%`:r.allowHalf&&(L="50%"),{color:x.value,width:L}}),E=ee(()=>{let L=mt(r.icons)?[...r.icons]:{...r.icons};return L=Fo(L),mt(L)?{[r.lowThreshold]:L[0],[r.highThreshold]:{value:L[1],excluded:!0},[r.max]:L[2]}:L}),C=ee(()=>o(r.modelValue,E.value)),T=ee(()=>v.value?an(r.disabledVoidIcon)?r.disabledVoidIcon:Fo(r.disabledVoidIcon):an(r.voidIcon)?r.voidIcon:Fo(r.voidIcon)),k=ee(()=>o(d.value,E.value));function I(L){const V=v.value&&y.value>0&&L-1<r.modelValue&&L>r.modelValue,P=r.allowHalf&&p.value&&L-.5<=d.value&&L>d.value;return V||P}function O(L){r.clearable&&L===r.modelValue&&(L=0),n(xn,L),r.modelValue!==L&&n("change",L)}function F(L){if(v.value)return;let V=d.value;const P=L.code;return P===Xt.up||P===Xt.right?(r.allowHalf?V+=.5:V+=1,L.stopPropagation(),L.preventDefault()):P!==Xt.left&&P!==Xt.down||(r.allowHalf?V-=.5:V-=1,L.stopPropagation(),L.preventDefault()),V=V<0?0:V,V=V>r.max?r.max:V,n(xn,V),n("change",V),V}function N(L,V){if(!v.value){if(r.allowHalf&&V){let P=V.target;Hs(P,s.e("item"))&&(P=P.querySelector(`.${s.e("icon")}`)),(P.clientWidth===0||Hs(P,s.e("decimal")))&&(P=P.parentNode),p.value=2*V.offsetX<=P.clientWidth,d.value=p.value?L-.5:L}else d.value=L;f.value=L}}function B(){v.value||(r.allowHalf&&(p.value=r.modelValue!==Math.floor(r.modelValue)),d.value=r.modelValue,f.value=-1)}return Je(()=>r.modelValue,L=>{d.value=L,p.value=r.modelValue!==Math.floor(r.modelValue)}),r.modelValue||n(xn,0),t({setCurrentValue:N,resetCurrentValue:B}),(L,V)=>{var P;return Y(),fe("div",{id:M(u),class:oe([M(m),M(s).is("disabled",M(v))]),role:"slider","aria-label":M(c)?void 0:L.label||"rating","aria-labelledby":M(c)?(P=M(a))==null?void 0:P.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":M(b)||void 0,"aria-valuemin":"0","aria-valuemax":L.max,tabindex:"0",style:$t(M(g)),onKeydown:F},[(Y(!0),fe(bt,null,bn(L.max,(H,U)=>(Y(),fe("span",{key:U,class:oe(M(s).e("item")),onMousemove:G=>N(H,G),onMouseleave:B,onClick:G=>{return z=H,void(v.value||(r.allowHalf&&p.value?O(d.value):O(z)));var z}},[ie(M(Ft),{class:oe([M(s).e("icon"),{hover:f.value===H},M(s).is("active",H<=d.value)])},{default:he(()=>[I(H)?Fe("v-if",!0):(Y(),fe(bt,{key:0},[nn((Y(),Pe(Hn(M(k)),null,null,512)),[[$n,H<=d.value]]),nn((Y(),Pe(Hn(M(T)),null,null,512)),[[$n,!(H<=d.value)]])],64)),I(H)?(Y(),fe(bt,{key:1},[(Y(),Pe(Hn(M(T)),{class:oe([M(s).em("decimal","box")])},null,8,["class"])),ie(M(Ft),{style:$t(M(_)),class:oe([M(s).e("icon"),M(s).e("decimal")])},{default:he(()=>[(Y(),Pe(Hn(M(C))))]),_:1},8,["style","class"])],64)):Fe("v-if",!0)]),_:2},1032,["class"])],42,dVe))),128)),L.showText||L.showScore?(Y(),fe("span",{key:0,class:oe(M(s).e("text")),style:$t({color:L.textColor})},Ye(M(b)),7)):Fe("v-if",!0)],46,cVe)}}});let xR,Zse,rx,eue,tue,nue,rue,oue,iue,aue,lue,sue,uue,cue,due,fue,pue,hue,vue;LO=Cr(Nt(pVe,[["__file","rate.vue"]])),xR=Symbol("sliderContextKey"),Zse=Lt({modelValue:{type:[Number,Array],default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:da,inputSize:da,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Function,default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},label:{type:String,default:void 0},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Function,default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:v0,default:"top"},marks:{type:Object},validateEvent:{type:Boolean,default:!0}}),rx=e=>Kn(e)||mt(e)&&e.every(Kn),eue={[xn]:rx,[Tl]:rx,[Xo]:rx},tue=(e,t,n)=>{const{form:r,formItem:o}=qa(),i=Qo(),a=de(),l=de(),s={firstButton:a,secondButton:l},u=ee(()=>e.disabled||(r==null?void 0:r.disabled)||!1),c=ee(()=>Math.min(t.firstValue,t.secondValue)),d=ee(()=>Math.max(t.firstValue,t.secondValue)),f=ee(()=>e.range?100*(d.value-c.value)/(e.max-e.min)+"%":100*(t.firstValue-e.min)/(e.max-e.min)+"%"),p=ee(()=>e.range?100*(c.value-e.min)/(e.max-e.min)+"%":"0%"),m=ee(()=>e.vertical?{height:e.height}:{}),v=ee(()=>e.vertical?{height:f.value,bottom:p.value}:{width:f.value,left:p.value}),g=()=>{i.value&&(t.sliderSize=i.value["client"+(e.vertical?"Height":"Width")])},b=_=>{const E=(C=>{const T=e.min+C*(e.max-e.min)/100;if(!e.range)return a;let k;return k=Math.abs(c.value-T)<Math.abs(d.value-T)?t.firstValue<t.secondValue?"firstButton":"secondButton":t.firstValue>t.secondValue?"firstButton":"secondButton",s[k]})(_);return E.value.setPosition(_),E},y=_=>{n(xn,_),n(Tl,_)},w=async()=>{await St(),n(Xo,e.range?[c.value,d.value]:e.modelValue)},x=_=>{var E,C,T,k,I,O;if(u.value||t.dragging)return;g();let F=0;if(e.vertical){const N=(T=(C=(E=_.touches)==null?void 0:E.item(0))==null?void 0:C.clientY)!=null?T:_.clientY;F=(i.value.getBoundingClientRect().bottom-N)/t.sliderSize*100}else F=(((O=(I=(k=_.touches)==null?void 0:k.item(0))==null?void 0:I.clientX)!=null?O:_.clientX)-i.value.getBoundingClientRect().left)/t.sliderSize*100;return F<0||F>100?void 0:b(F)};return{elFormItem:o,slider:i,firstButton:a,secondButton:l,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:m,barStyle:v,resetSize:g,setPosition:b,emitChange:w,onSliderWrapperPrevent:_=>{var E,C;((E=s.firstButton.value)!=null&&E.dragging||(C=s.secondButton.value)!=null&&C.dragging)&&_.preventDefault()},onSliderClick:_=>{x(_)&&w()},onSliderDown:async _=>{const E=x(_);E&&(await St(),E.value.onButtonDown(_))},setFirstValue:_=>{t.firstValue=_,y(e.range?[c.value,d.value]:_)},setSecondValue:_=>{t.secondValue=_,e.range&&y([c.value,d.value])}}},{left:nue,down:rue,right:oue,up:iue,home:aue,end:lue,pageUp:sue,pageDown:uue}=Xt,cue=(e,t,n)=>{const{disabled:r,min:o,max:i,step:a,showTooltip:l,precision:s,sliderSize:u,formatTooltip:c,emitChange:d,resetSize:f,updateDragging:p}=Rt(xR),{tooltip:m,tooltipVisible:v,formatValue:g,displayTooltip:b,hideTooltip:y}=((F,N,B)=>{const L=de(),V=de(!1),P=ee(()=>N.value instanceof Function),H=ee(()=>P.value&&N.value(F.modelValue)||F.modelValue),U=ts(()=>{B.value&&(V.value=!0)},50),G=ts(()=>{B.value&&(V.value=!1)},50);return{tooltip:L,tooltipVisible:V,formatValue:H,displayTooltip:U,hideTooltip:G}})(e,c,l),w=de(),x=ee(()=>(e.modelValue-o.value)/(i.value-o.value)*100+"%"),_=ee(()=>e.vertical?{bottom:x.value}:{left:x.value}),E=F=>{r.value||(t.newPosition=Number.parseFloat(x.value)+F/(i.value-o.value)*100,O(t.newPosition),d())},C=F=>{let N,B;return F.type.startsWith("touch")?(B=F.touches[0].clientY,N=F.touches[0].clientX):(B=F.clientY,N=F.clientX),{clientX:N,clientY:B}},T=F=>{t.dragging=!0,t.isClick=!0;const{clientX:N,clientY:B}=C(F);e.vertical?t.startY=B:t.startX=N,t.startPosition=Number.parseFloat(x.value),t.newPosition=t.startPosition},k=F=>{if(t.dragging){let N;t.isClick=!1,b(),f();const{clientX:B,clientY:L}=C(F);e.vertical?(t.currentY=L,N=(t.startY-t.currentY)/u.value*100):(t.currentX=B,N=(t.currentX-t.startX)/u.value*100),t.newPosition=t.startPosition+N,O(t.newPosition)}},I=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||y(),t.isClick||O(t.newPosition),d()},0),window.removeEventListener("mousemove",k),window.removeEventListener("touchmove",k),window.removeEventListener("mouseup",I),window.removeEventListener("touchend",I),window.removeEventListener("contextmenu",I))},O=async F=>{if(F===null||Number.isNaN(+F))return;F<0?F=0:F>100&&(F=100);const N=100/((i.value-o.value)/a.value);let B=Math.round(F/N)*N*(i.value-o.value)*.01+o.value;B=Number.parseFloat(B.toFixed(s.value)),B!==e.modelValue&&n(xn,B),t.dragging||e.modelValue===t.oldValue||(t.oldValue=e.modelValue),await St(),t.dragging&&b(),m.value.updatePopper()};return Je(()=>t.dragging,F=>{p(F)}),{disabled:r,button:w,tooltip:m,tooltipVisible:v,showTooltip:l,wrapperStyle:_,formatValue:g,handleMouseEnter:()=>{t.hovering=!0,b()},handleMouseLeave:()=>{t.hovering=!1,t.dragging||y()},onButtonDown:F=>{r.value||(F.preventDefault(),T(F),window.addEventListener("mousemove",k),window.addEventListener("touchmove",k),window.addEventListener("mouseup",I),window.addEventListener("touchend",I),window.addEventListener("contextmenu",I),w.value.focus())},onKeyDown:F=>{let N=!0;[nue,rue].includes(F.key)?E(-a.value):[oue,iue].includes(F.key)?E(a.value):F.key===aue?r.value||(O(0),d()):F.key===lue?r.value||(O(100),d()):F.key===uue?E(4*-a.value):F.key===sue?E(4*a.value):N=!1,N&&F.preventDefault()},setPosition:O}},due=Lt({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:v0,default:"top"}}),fue={[xn]:e=>Kn(e)},pue=["tabindex"],hue=Te({name:"ElSliderButton"}),vue=Te({...hue,props:due,emits:fue,setup(e,{expose:t,emit:n}){const r=e,o=_t("slider"),i=Qn({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:r.modelValue}),{disabled:a,button:l,tooltip:s,showTooltip:u,tooltipVisible:c,wrapperStyle:d,formatValue:f,handleMouseEnter:p,handleMouseLeave:m,onButtonDown:v,onKeyDown:g,setPosition:b}=cue(r,i,n),{hovering:y,dragging:w}=di(i);return t({onButtonDown:v,onKeyDown:g,setPosition:b,hovering:y,dragging:w}),(x,_)=>(Y(),fe("div",{ref_key:"button",ref:l,class:oe([M(o).e("button-wrapper"),{hover:M(y),dragging:M(w)}]),style:$t(M(d)),tabindex:M(a)?-1:0,onMouseenter:_[0]||(_[0]=(...E)=>M(p)&&M(p)(...E)),onMouseleave:_[1]||(_[1]=(...E)=>M(m)&&M(m)(...E)),onMousedown:_[2]||(_[2]=(...E)=>M(v)&&M(v)(...E)),onTouchstart:_[3]||(_[3]=(...E)=>M(v)&&M(v)(...E)),onFocus:_[4]||(_[4]=(...E)=>M(p)&&M(p)(...E)),onBlur:_[5]||(_[5]=(...E)=>M(m)&&M(m)(...E)),onKeydown:_[6]||(_[6]=(...E)=>M(g)&&M(g)(...E))},[ie(M(Al),{ref_key:"tooltip",ref:s,visible:M(c),placement:x.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":x.tooltipClass,disabled:!M(u),persistent:""},{content:he(()=>[ce("span",null,Ye(M(f)),1)]),default:he(()=>[ce("div",{class:oe([M(o).e("button"),{hover:M(y),dragging:M(w)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,pue))}});var mue=Nt(vue,[["__file","button.vue"]]),hVe=Te({name:"ElSliderMarker",props:Lt({mark:{type:[String,Object],default:void 0}}),setup(e){const t=_t("slider"),n=ee(()=>an(e.mark)?e.mark:e.mark.label),r=ee(()=>an(e.mark)?void 0:e.mark.style);return()=>pn("div",{class:t.e("marks-text"),style:r.value},n.value)}});const vVe=["id","role","aria-label","aria-labelledby"],mVe={key:1},gVe=Te({name:"ElSlider"}),yVe=Te({...gVe,props:Zse,emits:eue,setup(e,{expose:t,emit:n}){const r=e,o=_t("slider"),{t:i}=Gr(),a=Qn({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:l,slider:s,firstButton:u,secondButton:c,sliderDisabled:d,minValue:f,maxValue:p,runwayStyle:m,barStyle:v,resetSize:g,emitChange:b,onSliderWrapperPrevent:y,onSliderClick:w,onSliderDown:x,setFirstValue:_,setSecondValue:E}=tue(r,a,n),{stops:C,getStopStyle:T}=((X,te,ne,se)=>({stops:ee(()=>{if(!X.showStops||X.min>X.max)return[];if(X.step===0)return[];const le=(X.max-X.min)/X.step,J=100*X.step/(X.max-X.min),Z=Array.from({length:le-1}).map((ye,be)=>(be+1)*J);return X.range?Z.filter(ye=>ye<100*(ne.value-X.min)/(X.max-X.min)||ye>100*(se.value-X.min)/(X.max-X.min)):Z.filter(ye=>ye>100*(te.firstValue-X.min)/(X.max-X.min))}),getStopStyle:le=>X.vertical?{bottom:`${le}%`}:{left:`${le}%`}}))(r,a,f,p),{inputId:k,isLabeledByFormItem:I}=Ac(r,{formItemContext:l}),O=$i(),F=ee(()=>r.inputSize||O.value),N=ee(()=>r.label||i("el.slider.defaultLabel",{min:r.min,max:r.max})),B=ee(()=>r.range?r.rangeStartLabel||i("el.slider.defaultRangeStartLabel"):N.value),L=ee(()=>r.formatValueText?r.formatValueText($.value):`${$.value}`),V=ee(()=>r.rangeEndLabel||i("el.slider.defaultRangeEndLabel")),P=ee(()=>r.formatValueText?r.formatValueText(W.value):`${W.value}`),H=ee(()=>[o.b(),o.m(O.value),o.is("vertical",r.vertical),{[o.m("with-input")]:r.showInput}]),U=(X=>ee(()=>X.marks?Object.keys(X.marks).map(Number.parseFloat).sort((te,ne)=>te-ne).filter(te=>te<=X.max&&te>=X.min).map(te=>({point:te,position:100*(te-X.min)/(X.max-X.min),mark:X.marks[te]})):[]))(r);((X,te,ne,se,le,J)=>{const Z=ve=>{le(xn,ve),le(Tl,ve)},ye=()=>X.range?![ne.value,se.value].every((ve,Ae)=>ve===te.oldValue[Ae]):X.modelValue!==te.oldValue,be=()=>{var ve,Ae;X.min>X.max&&Ka("Slider","min should not be greater than max.");const Ce=X.modelValue;X.range&&Array.isArray(Ce)?Ce[1]<X.min?Z([X.min,X.min]):Ce[0]>X.max?Z([X.max,X.max]):Ce[0]<X.min?Z([X.min,Ce[1]]):Ce[1]>X.max?Z([Ce[0],X.max]):(te.firstValue=Ce[0],te.secondValue=Ce[1],ye()&&(X.validateEvent&&((ve=J==null?void 0:J.validate)==null||ve.call(J,"change").catch(_e=>{})),te.oldValue=Ce.slice())):X.range||typeof Ce!="number"||Number.isNaN(Ce)||(Ce<X.min?Z(X.min):Ce>X.max?Z(X.max):(te.firstValue=Ce,ye()&&(X.validateEvent&&((Ae=J==null?void 0:J.validate)==null||Ae.call(J,"change").catch(_e=>{})),te.oldValue=Ce)))};be(),Je(()=>te.dragging,ve=>{ve||be()}),Je(()=>X.modelValue,(ve,Ae)=>{te.dragging||Array.isArray(ve)&&Array.isArray(Ae)&&ve.every((Ce,_e)=>Ce===Ae[_e])&&te.firstValue===ve[0]&&te.secondValue===ve[1]||be()},{deep:!0}),Je(()=>[X.min,X.max],()=>{be()})})(r,a,f,p,n,l);const G=ee(()=>{const X=[r.min,r.max,r.step].map(te=>{const ne=`${te}`.split(".")[1];return ne?ne.length:0});return Math.max.apply(null,X)}),{sliderWrapper:z}=((X,te,ne)=>{const se=de();return yn(async()=>{X.range?(Array.isArray(X.modelValue)?(te.firstValue=Math.max(X.min,X.modelValue[0]),te.secondValue=Math.min(X.max,X.modelValue[1])):(te.firstValue=X.min,te.secondValue=X.max),te.oldValue=[te.firstValue,te.secondValue]):(typeof X.modelValue!="number"||Number.isNaN(X.modelValue)?te.firstValue=X.min:te.firstValue=Math.min(X.max,Math.max(X.min,X.modelValue)),te.oldValue=te.firstValue),Yo(window,"resize",ne),await St(),ne()}),{sliderWrapper:se}})(r,a,g),{firstValue:$,secondValue:W,sliderSize:K}=di(a);return qn(xR,{...di(r),sliderSize:K,disabled:d,precision:G,emitChange:b,resetSize:g,updateDragging:X=>{a.dragging=X}}),t({onSliderClick:w}),(X,te)=>{var ne,se;return Y(),fe("div",{id:X.range?M(k):void 0,ref_key:"sliderWrapper",ref:z,class:oe(M(H)),role:X.range?"group":void 0,"aria-label":X.range&&!M(I)?M(N):void 0,"aria-labelledby":X.range&&M(I)?(ne=M(l))==null?void 0:ne.labelId:void 0,onTouchstart:te[2]||(te[2]=(...le)=>M(y)&&M(y)(...le)),onTouchmove:te[3]||(te[3]=(...le)=>M(y)&&M(y)(...le))},[ce("div",{ref_key:"slider",ref:s,class:oe([M(o).e("runway"),{"show-input":X.showInput&&!X.range},M(o).is("disabled",M(d))]),style:$t(M(m)),onMousedown:te[0]||(te[0]=(...le)=>M(x)&&M(x)(...le)),onTouchstart:te[1]||(te[1]=(...le)=>M(x)&&M(x)(...le))},[ce("div",{class:oe(M(o).e("bar")),style:$t(M(v))},null,6),ie(mue,{id:X.range?void 0:M(k),ref_key:"firstButton",ref:u,"model-value":M($),vertical:X.vertical,"tooltip-class":X.tooltipClass,placement:X.placement,role:"slider","aria-label":X.range||!M(I)?M(B):void 0,"aria-labelledby":!X.range&&M(I)?(se=M(l))==null?void 0:se.labelId:void 0,"aria-valuemin":X.min,"aria-valuemax":X.range?M(W):X.max,"aria-valuenow":M($),"aria-valuetext":M(L),"aria-orientation":X.vertical?"vertical":"horizontal","aria-disabled":M(d),"onUpdate:modelValue":M(_)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),X.range?(Y(),Pe(mue,{key:0,ref_key:"secondButton",ref:c,"model-value":M(W),vertical:X.vertical,"tooltip-class":X.tooltipClass,placement:X.placement,role:"slider","aria-label":M(V),"aria-valuemin":M($),"aria-valuemax":X.max,"aria-valuenow":M(W),"aria-valuetext":M(P),"aria-orientation":X.vertical?"vertical":"horizontal","aria-disabled":M(d),"onUpdate:modelValue":M(E)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):Fe("v-if",!0),X.showStops?(Y(),fe("div",mVe,[(Y(!0),fe(bt,null,bn(M(C),(le,J)=>(Y(),fe("div",{key:J,class:oe(M(o).e("stop")),style:$t(M(T)(le))},null,6))),128))])):Fe("v-if",!0),M(U).length>0?(Y(),fe(bt,{key:2},[ce("div",null,[(Y(!0),fe(bt,null,bn(M(U),(le,J)=>(Y(),fe("div",{key:J,style:$t(M(T)(le.position)),class:oe([M(o).e("stop"),M(o).e("marks-stop")])},null,6))),128))]),ce("div",{class:oe(M(o).e("marks"))},[(Y(!0),fe(bt,null,bn(M(U),(le,J)=>(Y(),Pe(M(hVe),{key:J,mark:le.mark,style:$t(M(T)(le.position))},null,8,["mark","style"]))),128))],2)],64)):Fe("v-if",!0)],38),X.showInput&&!X.range?(Y(),Pe(M(Bw),{key:0,ref:"input","model-value":M($),class:oe(M(o).e("input")),step:X.step,disabled:M(d),controls:X.showInputControls,min:X.min,max:X.max,debounce:X.debounce,size:M(F),"onUpdate:modelValue":M(_),onChange:M(b)},null,8,["model-value","class","step","disabled","controls","min","max","debounce","size","onUpdate:modelValue","onChange"])):Fe("v-if",!0)],42,vVe)}}});let gue,yue,bue,Aue,wue,xue,_ue,_R,Eue,Cue;IO=Cr(Nt(yVe,[["__file","slider.vue"]])),gue=Lt({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:WN},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},inactiveActionIcon:{type:fi},activeActionIcon:{type:fi},activeIcon:{type:fi},inactiveIcon:{type:fi},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:Function},id:String,tabindex:{type:[String,Number]},label:{type:String,default:void 0}}),yue={[xn]:e=>Ki(e)||an(e)||Kn(e),[Xo]:e=>Ki(e)||an(e)||Kn(e),[Tl]:e=>Ki(e)||an(e)||Kn(e)},bue=["onClick"],Aue=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"],wue=["aria-hidden"],xue=["aria-hidden"],_ue=["aria-hidden"],_R="ElSwitch",Eue=Te({name:_R}),Cue=Te({...Eue,props:gue,emits:yue,setup(e,{expose:t,emit:n}){const r=e,{formItem:o}=qa(),i=$i(),a=_t("switch"),{inputId:l}=Ac(r,{formItemContext:o}),s=wl(ee(()=>r.loading)),u=de(r.modelValue!==!1),c=de(),d=de(),f=ee(()=>[a.b(),a.m(i.value),a.is("disabled",s.value),a.is("checked",b.value)]),p=ee(()=>[a.e("label"),a.em("label","left"),a.is("active",!b.value)]),m=ee(()=>[a.e("label"),a.em("label","right"),a.is("active",b.value)]),v=ee(()=>({width:ka(r.width)}));Je(()=>r.modelValue,()=>{u.value=!0});const g=ee(()=>!!u.value&&r.modelValue),b=ee(()=>g.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(g.value)||(n(xn,r.inactiveValue),n(Xo,r.inactiveValue),n(Tl,r.inactiveValue)),Je(b,x=>{var _;c.value.checked=x,r.validateEvent&&((_=o==null?void 0:o.validate)==null||_.call(o,"change").catch(E=>{}))});const y=()=>{const x=b.value?r.inactiveValue:r.activeValue;n(xn,x),n(Xo,x),n(Tl,x),St(()=>{c.value.checked=b.value})},w=()=>{if(s.value)return;const{beforeChange:x}=r;if(!x)return void y();const _=x();[D0(_),Ki(_)].includes(!0)||Ka(_R,"beforeChange must return type `Promise<boolean>` or `boolean`"),D0(_)?_.then(E=>{E&&y()}).catch(E=>{}):_&&y()};return yn(()=>{c.value.checked=b.value}),t({focus:()=>{var x,_;(_=(x=c.value)==null?void 0:x.focus)==null||_.call(x)},checked:b}),(x,_)=>(Y(),fe("div",{class:oe(M(f)),onClick:Gt(w,["prevent"])},[ce("input",{id:M(l),ref_key:"input",ref:c,class:oe(M(a).e("input")),type:"checkbox",role:"switch","aria-checked":M(b),"aria-disabled":M(s),"aria-label":x.label,name:x.name,"true-value":x.activeValue,"false-value":x.inactiveValue,disabled:M(s),tabindex:x.tabindex,onChange:y,onKeydown:Rr(w,["enter"])},null,42,Aue),x.inlinePrompt||!x.inactiveIcon&&!x.inactiveText?Fe("v-if",!0):(Y(),fe("span",{key:0,class:oe(M(p))},[x.inactiveIcon?(Y(),Pe(M(Ft),{key:0},{default:he(()=>[(Y(),Pe(Hn(x.inactiveIcon)))]),_:1})):Fe("v-if",!0),!x.inactiveIcon&&x.inactiveText?(Y(),fe("span",{key:1,"aria-hidden":M(b)},Ye(x.inactiveText),9,wue)):Fe("v-if",!0)],2)),ce("span",{ref_key:"core",ref:d,class:oe(M(a).e("core")),style:$t(M(v))},[x.inlinePrompt?(Y(),fe("div",{key:0,class:oe(M(a).e("inner"))},[x.activeIcon||x.inactiveIcon?(Y(),Pe(M(Ft),{key:0,class:oe(M(a).is("icon"))},{default:he(()=>[(Y(),Pe(Hn(M(b)?x.activeIcon:x.inactiveIcon)))]),_:1},8,["class"])):x.activeText||x.inactiveText?(Y(),fe("span",{key:1,class:oe(M(a).is("text")),"aria-hidden":!M(b)},Ye(M(b)?x.activeText:x.inactiveText),11,xue)):Fe("v-if",!0)],2)):Fe("v-if",!0),ce("div",{class:oe(M(a).e("action"))},[x.loading?(Y(),Pe(M(Ft),{key:0,class:oe(M(a).is("loading"))},{default:he(()=>[ie(M(jd))]),_:1},8,["class"])):M(b)?ft(x.$slots,"active-action",{key:1},()=>[x.activeActionIcon?(Y(),Pe(M(Ft),{key:0},{default:he(()=>[(Y(),Pe(Hn(x.activeActionIcon)))]),_:1})):Fe("v-if",!0)]):M(b)?Fe("v-if",!0):ft(x.$slots,"inactive-action",{key:2},()=>[x.inactiveActionIcon?(Y(),Pe(M(Ft),{key:0},{default:he(()=>[(Y(),Pe(Hn(x.inactiveActionIcon)))]),_:1})):Fe("v-if",!0)])],2)],6),x.inlinePrompt||!x.activeIcon&&!x.activeText?Fe("v-if",!0):(Y(),fe("span",{key:1,class:oe(M(m))},[x.activeIcon?(Y(),Pe(M(Ft),{key:0},{default:he(()=>[(Y(),Pe(Hn(x.activeIcon)))]),_:1})):Fe("v-if",!0),!x.activeIcon&&x.activeText?(Y(),fe("span",{key:1,"aria-hidden":!M(b)},Ye(x.activeText),9,_ue)):Fe("v-if",!0)],2))],10,bue))}});let ox,Sue,ER,kue,CR,Yi,sp;RO=Cr(Nt(Cue,[["__file","switch.vue"]])),ox=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},Sue=function(e,t,n,r,o){if(!t&&!r&&(!o||Array.isArray(o)&&!o.length))return e;n=typeof n=="string"?n==="descending"?-1:1:n&&n<0?-1:1;const i=r?null:function(a,l){return o?(Array.isArray(o)||(o=[o]),o.map(s=>typeof s=="string"?es(a,s):s(a,l,e))):(t!=="$key"&&wn(a)&&"$value"in a&&(a=a.$value),[wn(a)?es(a,t):a])};return e.map((a,l)=>({value:a,index:l,key:i?i(a,l):null})).sort((a,l)=>{let s=function(u,c){if(r)return r(u.value,c.value);for(let d=0,f=u.key.length;d<f;d++){if(u.key[d]<c.key[d])return-1;if(u.key[d]>c.key[d])return 1}return 0}(a,l);return s||(s=a.index-l.index),s*+n}).map(a=>a.value)},ER=function(e,t){let n=null;return e.columns.forEach(r=>{r.id===t&&(n=r)}),n},kue=function(e,t){let n=null;for(let r=0;r<e.columns.length;r++){const o=e.columns[r];if(o.columnKey===t){n=o;break}}return n||Ka("ElTable",`No column matching with column-key: ${t}`),n},CR=function(e,t,n){const r=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return r?ER(e,r[0]):null},Yi=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let r=e;for(const o of n)r=r[o];return`${r}`}if(typeof t=="function")return t.call(null,e)},sp=function(e,t){const n={};return(e||[]).forEach((r,o)=>{n[Yi(r,t)]={row:r,index:o}}),n};function SR(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function Due(e){return e===""||e!==void 0&&(e=SR(e),Number.isNaN(e)&&(e=80)),e}function r4(e,t,n){let r=!1;const o=e.indexOf(t),i=o!==-1,a=l=>{l==="add"?e.push(t):e.splice(o,1),r=!0,mt(t.children)&&t.children.forEach(s=>{r4(e,s,n??!i)})};return Ki(n)?n&&!i?a("add"):!n&&i&&a("remove"):a(i?"remove":"add"),r}function bVe(e,t,n="children",r="hasChildren"){const o=a=>!(Array.isArray(a)&&a.length);function i(a,l,s){t(a,l,s),l.forEach(u=>{if(u[r])return void t(u,null,s+1);const c=u[n];o(c)||i(u,c,s+1)})}e.forEach(a=>{if(a[r])return void t(a,null,0);const l=a[n];o(l)||i(a,l,0)})}let Xs=null;function Oue(e){return e.children?wIe(e.children,Oue):[e]}function Tue(e,t){return e+t.colSpan}const Mue=(e,t,n,r)=>{let o=0,i=e;const a=n.states.columns.value;if(r){const s=Oue(r[e]);o=a.slice(0,a.indexOf(s[0])).reduce(Tue,0),i=o+s.reduce(Tue,0)-1}else o=e;let l;switch(t){case"left":i<n.states.fixedLeafColumnsLength.value&&(l="left");break;case"right":o>=a.length-n.states.rightFixedLeafColumnsLength.value&&(l="right");break;default:i<n.states.fixedLeafColumnsLength.value?l="left":o>=a.length-n.states.rightFixedLeafColumnsLength.value&&(l="right")}return l?{direction:l,start:o,after:i}:{}},kR=(e,t,n,r,o,i=0)=>{const a=[],{direction:l,start:s,after:u}=Mue(t,n,r,o);if(l){const c=l==="left";a.push(`${e}-fixed-column--${l}`),c&&u+i===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):c||s-i!=r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value||a.push("is-first-column")}return a};function Nue(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const DR=(e,t,n,r)=>{const{direction:o,start:i=0,after:a=0}=Mue(e,t,n,r);if(!o)return;const l={},s=o==="left",u=n.states.columns.value;return s?l.left=u.slice(0,i).reduce(Nue,0):l.right=u.slice(a+1).reverse().reduce(Nue,0),l},pg=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))},AVe=(e,t)=>{const n=t.sortingColumn;return n&&typeof n.sortable!="string"?Sue(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy):e},ix=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,ix(n.children)):t.push(n)}),t};function wVe(){var e;const t=dn(),{size:n}=di((e=t.proxy)==null?void 0:e.$props),r=de(null),o=de([]),i=de([]),a=de(!1),l=de([]),s=de([]),u=de([]),c=de([]),d=de([]),f=de([]),p=de([]),m=de([]),v=de(0),g=de(0),b=de(0),y=de(!1),w=de([]),x=de(!1),_=de(!1),E=de(null),C=de({}),T=de(null),k=de(null),I=de(null),O=de(null),F=de(null);Je(o,()=>t.state&&L(!1),{deep:!0});const N=ve=>{var Ae;(Ae=ve.children)==null||Ae.forEach(Ce=>{Ce.fixed=ve.fixed,N(Ce)})},B=()=>{l.value.forEach(ke=>{N(ke)}),c.value=l.value.filter(ke=>ke.fixed===!0||ke.fixed==="left"),d.value=l.value.filter(ke=>ke.fixed==="right"),c.value.length>0&&l.value[0]&&l.value[0].type==="selection"&&!l.value[0].fixed&&(l.value[0].fixed=!0,c.value.unshift(l.value[0]));const ve=l.value.filter(ke=>!ke.fixed);s.value=[].concat(c.value).concat(ve).concat(d.value);const Ae=ix(ve),Ce=ix(c.value),_e=ix(d.value);v.value=Ae.length,g.value=Ce.length,b.value=_e.length,u.value=[].concat(Ce).concat(Ae).concat(_e),a.value=c.value.length>0||d.value.length>0},L=(ve,Ae=!1)=>{ve&&B(),Ae?t.state.doLayout():t.state.debouncedUpdateLayout()},V=ve=>{var Ae;if(!t||!t.store)return 0;const{treeData:Ce}=t.store.states;let _e=0;const ke=(Ae=Ce.value[ve])==null?void 0:Ae.children;return ke&&(_e+=ke.length,ke.forEach(Be=>{_e+=V(Be)})),_e},P=(ve,Ae,Ce)=>{k.value&&k.value!==ve&&(k.value.order=null),k.value=ve,I.value=Ae,O.value=Ce},H=()=>{let ve=M(i);Object.keys(C.value).forEach(Ae=>{const Ce=C.value[Ae];if(!Ce||Ce.length===0)return;const _e=ER({columns:u.value},Ae);_e&&_e.filterMethod&&(ve=ve.filter(ke=>Ce.some(Be=>_e.filterMethod.call(null,Be,ke,_e))))}),T.value=ve},U=()=>{o.value=AVe(T.value,{sortingColumn:k.value,sortProp:I.value,sortOrder:O.value})},{setExpandRowKeys:G,toggleRowExpansion:z,updateExpandRows:$,states:W,isRowExpanded:K}=function(ve){const Ae=dn(),Ce=de(!1),_e=de([]);return{updateExpandRows:()=>{const ke=ve.data.value||[],Be=ve.rowKey.value;if(Ce.value)_e.value=ke.slice();else if(Be){const $e=sp(_e.value,Be);_e.value=ke.reduce((rt,ge)=>{const We=Yi(ge,Be);return $e[We]&&rt.push(ge),rt},[])}else _e.value=[]},toggleRowExpansion:(ke,Be)=>{r4(_e.value,ke,Be)&&Ae.emit("expand-change",ke,_e.value.slice())},setExpandRowKeys:ke=>{Ae.store.assertRowKey();const Be=ve.data.value||[],$e=ve.rowKey.value,rt=sp(Be,$e);_e.value=ke.reduce((ge,We)=>{const st=rt[We];return st&&ge.push(st.row),ge},[])},isRowExpanded:ke=>{const Be=ve.rowKey.value;return Be?!!sp(_e.value,Be)[Yi(ke,Be)]:_e.value.includes(ke)},states:{expandRows:_e,defaultExpandAll:Ce}}}({data:o,rowKey:r}),{updateTreeExpandKeys:X,toggleTreeExpansion:te,updateTreeData:ne,loadOrToggle:se,states:le}=function(ve){const Ae=de([]),Ce=de({}),_e=de(16),ke=de(!1),Be=de({}),$e=de("hasChildren"),rt=de("children"),ge=dn(),We=ee(()=>{if(!ve.rowKey.value)return{};const ot=ve.data.value||[];return At(ot)}),st=ee(()=>{const ot=ve.rowKey.value,je=Object.keys(Be.value),we={};return je.length&&je.forEach(ze=>{if(Be.value[ze].length){const me={children:[]};Be.value[ze].forEach(Me=>{const Ie=Yi(Me,ot);me.children.push(Ie),Me[$e.value]&&!we[Ie]&&(we[Ie]={children:[]})}),we[ze]=me}}),we}),At=ot=>{const je=ve.rowKey.value,we={};return bVe(ot,(ze,me,Me)=>{const Ie=Yi(ze,je);Array.isArray(me)?we[Ie]={children:me.map(ht=>Yi(ht,je)),level:Me}:ke.value&&(we[Ie]={children:[],lazy:!0,level:Me})},rt.value,$e.value),we},Ve=(ot=!1,je=(we=>(we=ge.store)==null?void 0:we.states.defaultExpandAll.value)())=>{var we;const ze=We.value,me=st.value,Me=Object.keys(ze),Ie={};if(Me.length){const ht=M(Ce),gt=[],vt=(mn,Zt)=>{if(ot)return Ae.value?je||Ae.value.includes(Zt):!(!je&&!(mn!=null&&mn.expanded));{const rn=je||Ae.value&&Ae.value.includes(Zt);return!(!(mn!=null&&mn.expanded)&&!rn)}};Me.forEach(mn=>{const Zt=ht[mn],rn={...ze[mn]};if(rn.expanded=vt(Zt,mn),rn.lazy){const{loaded:zn=!1,loading:tt=!1}=Zt||{};rn.loaded=!!zn,rn.loading=!!tt,gt.push(mn)}Ie[mn]=rn});const qt=Object.keys(me);ke.value&&qt.length&>.length&&qt.forEach(mn=>{const Zt=ht[mn],rn=me[mn].children;if(gt.includes(mn)){if(Ie[mn].children.length!==0)throw new Error("[ElTable]children must be an empty array.");Ie[mn].children=rn}else{const{loaded:zn=!1,loading:tt=!1}=Zt||{};Ie[mn]={lazy:!0,loaded:!!zn,loading:!!tt,expanded:vt(Zt,mn),children:rn,level:""}}})}Ce.value=Ie,(we=ge.store)==null||we.updateTableScrollY()};Je(()=>Ae.value,()=>{Ve(!0)}),Je(()=>We.value,()=>{Ve()}),Je(()=>st.value,()=>{Ve()});const it=(ot,je)=>{ge.store.assertRowKey();const we=ve.rowKey.value,ze=Yi(ot,we),me=ze&&Ce.value[ze];if(ze&&me&&"expanded"in me){const Me=me.expanded;je=je===void 0?!me.expanded:je,Ce.value[ze].expanded=je,Me!==je&&ge.emit("expand-change",ot,je),ge.store.updateTableScrollY()}},dt=(ot,je,we)=>{const{load:ze}=ge.props;ze&&!Ce.value[je].loaded&&(Ce.value[je].loading=!0,ze(ot,we,me=>{if(!Array.isArray(me))throw new TypeError("[ElTable] data must be an array");Ce.value[je].loading=!1,Ce.value[je].loaded=!0,Ce.value[je].expanded=!0,me.length&&(Be.value[je]=me),ge.emit("expand-change",ot,!0)}))};return{loadData:dt,loadOrToggle:ot=>{ge.store.assertRowKey();const je=ve.rowKey.value,we=Yi(ot,je),ze=Ce.value[we];ke.value&&ze&&"loaded"in ze&&!ze.loaded?dt(ot,we,ze):it(ot,void 0)},toggleTreeExpansion:it,updateTreeExpandKeys:ot=>{Ae.value=ot,Ve()},updateTreeData:Ve,normalize:At,states:{expandRowKeys:Ae,treeData:Ce,indent:_e,lazy:ke,lazyTreeNodeMap:Be,lazyColumnIdentifier:$e,childrenColumnName:rt}}}({data:o,rowKey:r}),{updateCurrentRowData:J,updateCurrentRow:Z,setCurrentRowKey:ye,states:be}=function(ve){const Ae=dn(),Ce=de(null),_e=de(null),ke=()=>{Ce.value=null},Be=$e=>{const{data:rt,rowKey:ge}=ve;let We=null;ge.value&&(We=(M(rt)||[]).find(st=>Yi(st,ge.value)===$e)),_e.value=We,Ae.emit("current-change",_e.value,null)};return{setCurrentRowKey:$e=>{Ae.store.assertRowKey(),Ce.value=$e,Be($e)},restoreCurrentRowKey:ke,setCurrentRowByKey:Be,updateCurrentRow:$e=>{const rt=_e.value;if($e&&$e!==rt)return _e.value=$e,void Ae.emit("current-change",_e.value,rt);!$e&&rt&&(_e.value=null,Ae.emit("current-change",null,rt))},updateCurrentRowData:()=>{const $e=ve.rowKey.value,rt=ve.data.value||[],ge=_e.value;if(!rt.includes(ge)&&ge){if($e){const We=Yi(ge,$e);Be(We)}else _e.value=null;_e.value===null&&Ae.emit("current-change",null,ge)}else Ce.value&&(Be(Ce.value),ke())},states:{_currentRowKey:Ce,currentRow:_e}}}({data:o,rowKey:r});return{assertRowKey:()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},updateColumns:B,scheduleLayout:L,isSelected:ve=>w.value.includes(ve),clearSelection:()=>{y.value=!1,w.value.length&&(w.value=[],t.emit("selection-change",[]))},cleanSelection:()=>{let ve;if(r.value){ve=[];const Ae=sp(w.value,r.value),Ce=sp(o.value,r.value);for(const _e in Ae)Tn(Ae,_e)&&!Ce[_e]&&ve.push(Ae[_e].row)}else ve=w.value.filter(Ae=>!o.value.includes(Ae));if(ve.length){const Ae=w.value.filter(Ce=>!ve.includes(Ce));w.value=Ae,t.emit("selection-change",Ae.slice())}},getSelectionRows:()=>(w.value||[]).slice(),toggleRowSelection:(ve,Ae=void 0,Ce=!0)=>{if(r4(w.value,ve,Ae)){const _e=(w.value||[]).slice();Ce&&t.emit("select",_e,ve),t.emit("selection-change",_e)}},_toggleAllSelection:()=>{var ve,Ae;const Ce=_.value?!y.value:!(y.value||w.value.length);y.value=Ce;let _e=!1,ke=0;const Be=(Ae=(ve=t==null?void 0:t.store)==null?void 0:ve.states)==null?void 0:Ae.rowKey.value;o.value.forEach(($e,rt)=>{const ge=rt+ke;E.value?E.value.call(null,$e,ge)&&r4(w.value,$e,Ce)&&(_e=!0):r4(w.value,$e,Ce)&&(_e=!0),ke+=V(Yi($e,Be))}),_e&&t.emit("selection-change",w.value?w.value.slice():[]),t.emit("select-all",w.value)},toggleAllSelection:null,updateSelectionByRowKey:()=>{const ve=sp(w.value,r.value);o.value.forEach(Ae=>{const Ce=Yi(Ae,r.value),_e=ve[Ce];_e&&(w.value[_e.index]=Ae)})},updateAllSelected:()=>{var ve,Ae,Ce;if(((ve=o.value)==null?void 0:ve.length)===0)return void(y.value=!1);let _e;r.value&&(_e=sp(w.value,r.value));const ke=function(ge){return _e?!!_e[Yi(ge,r.value)]:w.value.includes(ge)};let Be=!0,$e=0,rt=0;for(let ge=0,We=(o.value||[]).length;ge<We;ge++){const st=(Ce=(Ae=t==null?void 0:t.store)==null?void 0:Ae.states)==null?void 0:Ce.rowKey.value,At=ge+rt,Ve=o.value[ge],it=E.value&&E.value.call(null,Ve,At);if(ke(Ve))$e++;else if(!E.value||it){Be=!1;break}rt+=V(Yi(Ve,st))}$e===0&&(Be=!1),y.value=Be},updateFilters:(ve,Ae)=>{Array.isArray(ve)||(ve=[ve]);const Ce={};return ve.forEach(_e=>{C.value[_e.id]=Ae,Ce[_e.columnKey||_e.id]=Ae}),Ce},updateCurrentRow:Z,updateSort:P,execFilter:H,execSort:U,execQuery:(ve=void 0)=>{ve&&ve.filter||H(),U()},clearFilter:ve=>{const{tableHeaderRef:Ae}=t.refs;if(!Ae)return;const Ce=Object.assign({},Ae.filterPanels),_e=Object.keys(Ce);if(_e.length)if(typeof ve=="string"&&(ve=[ve]),Array.isArray(ve)){const ke=ve.map(Be=>kue({columns:u.value},Be));_e.forEach(Be=>{const $e=ke.find(rt=>rt.id===Be);$e&&($e.filteredValue=[])}),t.store.commit("filterChange",{column:ke,values:[],silent:!0,multi:!0})}else _e.forEach(ke=>{const Be=u.value.find($e=>$e.id===ke);Be&&(Be.filteredValue=[])}),C.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},clearSort:()=>{k.value&&(P(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},toggleRowExpansion:z,setExpandRowKeysAdapter:ve=>{G(ve),X(ve)},setCurrentRowKey:ye,toggleRowExpansionAdapter:(ve,Ae)=>{u.value.some(({type:_e})=>_e==="expand")?z(ve,Ae):te(ve,Ae)},isRowExpanded:K,updateExpandRows:$,updateCurrentRowData:J,loadOrToggle:se,updateTreeData:ne,states:{tableSize:n,rowKey:r,data:o,_data:i,isComplex:a,_columns:l,originColumns:s,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:p,rightFixedLeafColumns:m,updateOrderFns:[],leafColumnsLength:v,fixedLeafColumnsLength:g,rightFixedLeafColumnsLength:b,isAllSelected:y,selection:w,reserveSelection:x,selectOnIndeterminate:_,selectable:E,filters:C,filteredData:T,sortingColumn:k,sortProp:I,sortOrder:O,hoverRow:F,...W,...le,...be}}}function OR(e,t){return e.map(n=>{var r;return n.id===t.id?t:((r=n.children)!=null&&r.length&&(n.children=OR(n.children,t)),n)})}function TR(e){e.forEach(t=>{var n,r;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(r=t.children)!=null&&r.length&&TR(t.children)}),e.sort((t,n)=>t.no-n.no)}const o4={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"}};function xVe(e,t){if(!e)throw new Error("Table is required.");const n=function(){const r=dn(),o=wVe();return{ns:_t("table"),...o,mutations:{setData(l,s){const u=M(l._data)!==s;l.data.value=s,l._data.value=s,r.store.execQuery(),r.store.updateCurrentRowData(),r.store.updateExpandRows(),r.store.updateTreeData(r.store.states.defaultExpandAll.value),M(l.reserveSelection)?(r.store.assertRowKey(),r.store.updateSelectionByRowKey()):u?r.store.clearSelection():r.store.cleanSelection(),r.store.updateAllSelected(),r.$ready&&r.store.scheduleLayout()},insertColumn(l,s,u,c){const d=M(l._columns);let f=[];u?(u&&!u.children&&(u.children=[]),u.children.push(s),f=OR(d,u)):(d.push(s),f=d),TR(f),l._columns.value=f,l.updateOrderFns.push(c),s.type==="selection"&&(l.selectable.value=s.selectable,l.reserveSelection.value=s.reserveSelection),r.$ready&&(r.store.updateColumns(),r.store.scheduleLayout())},updateColumnOrder(l,s){var u;((u=s.getColumnIndex)==null?void 0:u.call(s))!==s.no&&(TR(l._columns.value),r.$ready&&r.store.updateColumns())},removeColumn(l,s,u,c){const d=M(l._columns)||[];if(u)u.children.splice(u.children.findIndex(p=>p.id===s.id),1),St(()=>{var p;((p=u.children)==null?void 0:p.length)===0&&delete u.children}),l._columns.value=OR(d,u);else{const p=d.indexOf(s);p>-1&&(d.splice(p,1),l._columns.value=d)}const f=l.updateOrderFns.indexOf(c);f>-1&&l.updateOrderFns.splice(f,1),r.$ready&&(r.store.updateColumns(),r.store.scheduleLayout())},sort(l,s){const{prop:u,order:c,init:d}=s;if(u){const f=M(l.columns).find(p=>p.property===u);f&&(f.order=c,r.store.updateSort(f,u,c),r.store.commit("changeSortCondition",{init:d}))}},changeSortCondition(l,s){const{sortingColumn:u,sortProp:c,sortOrder:d}=l,f=M(u),p=M(c),m=M(d);m===null&&(l.sortingColumn.value=null,l.sortProp.value=null),r.store.execQuery({filter:!0}),s&&(s.silent||s.init)||r.emit("sort-change",{column:f,prop:p,order:m}),r.store.updateTableScrollY()},filterChange(l,s){const{column:u,values:c,silent:d}=s,f=r.store.updateFilters(u,c);r.store.execQuery(),d||r.emit("filter-change",f),r.store.updateTableScrollY()},toggleAllSelection(){r.store.toggleAllSelection()},rowSelectedChanged(l,s){r.store.toggleRowSelection(s),r.store.updateAllSelected()},setHoverRow(l,s){l.hoverRow.value=s},setCurrentRow(l,s){r.store.updateCurrentRow(s)}},commit:function(l,...s){const u=r.store.mutations;if(!u[l])throw new Error(`Action not found: ${l}`);u[l].apply(r,[r.store.states].concat(s))},updateTableScrollY:function(){St(()=>r.layout.updateScrollY.apply(r.layout))}}}();return n.toggleAllSelection=ts(n._toggleAllSelection,10),Object.keys(o4).forEach(r=>{Fue(Rue(t,r),r,n)}),function(r,o){Object.keys(o4).forEach(i=>{Je(()=>Rue(o,i),a=>{Fue(a,i,r)})})}(n,t),n}function Fue(e,t,n){let r=e,o=o4[t];typeof o4[t]=="object"&&(o=o.key,r=r||o4[t].default),n.states[o].value=r}function Rue(e,t){if(t.includes(".")){const n=t.split(".");let r=e;return n.forEach(o=>{r=r[o]}),r}return e[t]}class _Ve{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=de(null),this.scrollX=de(!1),this.scrollY=de(!1),this.bodyWidth=de(null),this.fixedWidth=de(null),this.rightFixedWidth=de(null),this.gutterWidth=0;for(const n in t)Tn(t,n)&&(Jn(this[n])?this[n].value=t[n]:this[n]=t[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const t=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(t!=null&&t.wrapRef)){let n=!0;const r=this.scrollY.value;return n=t.wrapRef.scrollHeight>t.wrapRef.clientHeight,this.scrollY.value=n,r!==n}return!1}setHeight(t,n="height"){if(!rr)return;const r=this.table.vnode.el;var o;if(t=typeof(o=t)=="number"?o:typeof o=="string"?/^\d+(?:px)?$/.test(o)?Number.parseInt(o,10):o:null,this.height.value=Number(t),!r&&(t||t===0))return St(()=>this.setHeight(t,n));typeof t=="number"?(r.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(r.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(n=>{n.isColumnGroup?t.push.apply(t,n.columns):t.push(n)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!rr)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let r=0;const o=this.getFlattenColumns(),i=o.filter(s=>typeof s.width!="number");if(o.forEach(s=>{typeof s.width=="number"&&s.realWidth&&(s.realWidth=null)}),i.length>0&&t){if(o.forEach(s=>{r+=Number(s.width||s.minWidth||80)}),r<=n){this.scrollX.value=!1;const s=n-r;if(i.length===1)i[0].realWidth=Number(i[0].minWidth||80)+s;else{const u=s/i.reduce((d,f)=>d+Number(f.minWidth||80),0);let c=0;i.forEach((d,f)=>{if(f===0)return;const p=Math.floor(Number(d.minWidth||80)*u);c+=p,d.realWidth=Number(d.minWidth||80)+p}),i[0].realWidth=Number(i[0].minWidth||80)+s-c}}else this.scrollX.value=!0,i.forEach(s=>{s.realWidth=Number(s.minWidth)});this.bodyWidth.value=Math.max(r,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else o.forEach(s=>{s.width||s.minWidth?s.realWidth=Number(s.width||s.minWidth):s.realWidth=80,r+=s.realWidth}),this.scrollX.value=r>n,this.bodyWidth.value=r;const a=this.store.states.fixedColumns.value;if(a.length>0){let s=0;a.forEach(u=>{s+=Number(u.realWidth||u.width)}),this.fixedWidth.value=s}const l=this.store.states.rightFixedColumns.value;if(l.length>0){let s=0;l.forEach(u=>{s+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=s}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(n=>{var r,o;switch(t){case"columns":(r=n.state)==null||r.onColumnsChange(this);break;case"scrollable":(o=n.state)==null||o.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:EVe}=bl,CVe=Te({name:"ElTableFilterPanel",components:{ElCheckbox:bl,ElCheckboxGroup:EVe,ElScrollbar:wd,ElTooltip:Al,ElIcon:Ft,ArrowDown:p0,ArrowUp:p9},directives:{ClickOutside:Rf},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=dn(),{t:n}=Gr(),r=_t("table-filter"),o=t==null?void 0:t.parent;o.filterPanels.value[e.column.id]||(o.filterPanels.value[e.column.id]=t);const i=de(!1),a=de(null),l=ee(()=>e.column&&e.column.filters),s=ee(()=>e.column.filterClassName?`${r.b()} ${e.column.filterClassName}`:r.b()),u=ee({get:()=>{var v;return(((v=e.column)==null?void 0:v.filteredValue)||[])[0]},set:v=>{c.value&&(v!=null?c.value.splice(0,1,v):c.value.splice(0,1))}}),c=ee({get:()=>e.column&&e.column.filteredValue||[],set(v){e.column&&e.upDataColumn("filteredValue",v)}}),d=ee(()=>!e.column||e.column.filterMultiple),f=()=>{i.value=!1},p=v=>{e.store.commit("filterChange",{column:e.column,values:v}),e.store.updateAllSelected()};Je(i,v=>{e.column&&e.upDataColumn("filterOpened",v)},{immediate:!0});const m=ee(()=>{var v,g;return(g=(v=a.value)==null?void 0:v.popperRef)==null?void 0:g.contentRef});return{tooltipVisible:i,multiple:d,filterClassName:s,filteredValue:c,filterValue:u,filters:l,handleConfirm:()=>{p(c.value),f()},handleReset:()=>{c.value=[],p(c.value),f()},handleSelect:v=>{u.value=v,p(v!=null?c.value:[]),f()},isActive:v=>v.value===u.value,t:n,ns:r,showFilterPanel:v=>{v.stopPropagation(),i.value=!i.value},hideFilterPanel:()=>{i.value=!1},popperPaneRef:m,tooltip:a}}}),SVe={key:0},kVe=["disabled"],DVe=["label","onClick"];var OVe=Nt(CVe,[["render",function(e,t,n,r,o,i){const a=Qe("el-checkbox"),l=Qe("el-checkbox-group"),s=Qe("el-scrollbar"),u=Qe("arrow-up"),c=Qe("arrow-down"),d=Qe("el-icon"),f=Qe("el-tooltip"),p=gm("click-outside");return Y(),Pe(f,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:""},{content:he(()=>[e.multiple?(Y(),fe("div",SVe,[ce("div",{class:oe(e.ns.e("content"))},[ie(s,{"wrap-class":e.ns.e("wrap")},{default:he(()=>[ie(l,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=m=>e.filteredValue=m),class:oe(e.ns.e("checkbox-group"))},{default:he(()=>[(Y(!0),fe(bt,null,bn(e.filters,m=>(Y(),Pe(a,{key:m.value,value:m.value},{default:he(()=>[Dt(Ye(m.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),ce("div",{class:oe(e.ns.e("bottom"))},[ce("button",{class:oe({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...m)=>e.handleConfirm&&e.handleConfirm(...m))},Ye(e.t("el.table.confirmFilter")),11,kVe),ce("button",{type:"button",onClick:t[2]||(t[2]=(...m)=>e.handleReset&&e.handleReset(...m))},Ye(e.t("el.table.resetFilter")),1)],2)])):(Y(),fe("ul",{key:1,class:oe(e.ns.e("list"))},[ce("li",{class:oe([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=m=>e.handleSelect(null))},Ye(e.t("el.table.clearFilter")),3),(Y(!0),fe(bt,null,bn(e.filters,m=>(Y(),fe("li",{key:m.value,class:oe([e.ns.e("list-item"),e.ns.is("active",e.isActive(m))]),label:m.value,onClick:v=>e.handleSelect(m.value)},Ye(m.text),11,DVe))),128))],2))]),default:he(()=>[nn((Y(),fe("span",{class:oe([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...m)=>e.showFilterPanel&&e.showFilterPanel(...m))},[ie(d,null,{default:he(()=>[e.column.filterOpened?(Y(),Pe(u,{key:0})):(Y(),Pe(c,{key:1}))]),_:1})],2)),[[p,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}],["__file","filter-panel.vue"]]);function Iue(e){const t=dn();g0(()=>{n.value.addObserver(t)}),yn(()=>{r(n.value),o(n.value)}),zs(()=>{r(n.value),o(n.value)}),Vs(()=>{n.value.removeObserver(t)});const n=ee(()=>{const i=e.layout;if(!i)throw new Error("Can not find table layout.");return i}),r=i=>{var a;const l=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!l.length)return;const s=i.getFlattenColumns(),u={};s.forEach(c=>{u[c.id]=c});for(let c=0,d=l.length;c<d;c++){const f=l[c],p=f.getAttribute("name"),m=u[p];m&&f.setAttribute("width",m.realWidth||m.width)}},o=i=>{var a,l;const s=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=s.length;c<d;c++)s[c].setAttribute("width",i.scrollY.value?i.gutterWidth:"0");const u=((l=e.vnode.el)==null?void 0:l.querySelectorAll("th.gutter"))||[];for(let c=0,d=u.length;c<d;c++){const f=u[c];f.style.width=i.scrollY.value?`${i.gutterWidth}px`:"0",f.style.display=i.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:r,onScrollableChange:o}}const Rc=Symbol("ElTable"),Bue=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,Bue(n.children))):t.push(n)}),t};function TVe(e){const t=Rt(Rc),n=ee(()=>(r=>{let o=1;const i=(l,s)=>{if(s&&(l.level=s.level+1,o<l.level&&(o=l.level)),l.children){let u=0;l.children.forEach(c=>{i(c,l),u+=c.colSpan}),l.colSpan=u}else l.colSpan=1};r.forEach(l=>{l.level=1,i(l,void 0)});const a=[];for(let l=0;l<o;l++)a.push([]);return Bue(r).forEach(l=>{l.children?(l.rowSpan=1,l.children.forEach(s=>s.isSubColumn=!0)):l.rowSpan=o-l.level+1,a[l.level-1].push(l)}),a})(e.store.states.originColumns.value));return{isGroup:ee(()=>{const r=n.value.length>1;return r&&t&&(t.state.isGroup.value=!0),r}),toggleAllSelection:r=>{r.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var MVe=Te({name:"ElTableHeader",components:{ElCheckbox:bl},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=dn(),r=Rt(Rc),o=_t("table"),i=de({}),{onColumnsChange:a,onScrollableChange:l}=Iue(r);yn(async()=>{await St(),await St();const{prop:E,order:C}=e.defaultSort;r==null||r.store.commit("sort",{prop:E,order:C,init:!0})});const{handleHeaderClick:s,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:m}=function(E,C){const T=dn(),k=Rt(Rc),I=L=>{L.stopPropagation()},O=de(null),F=de(!1),N=de({}),B=(L,V,P)=>{var H;L.stopPropagation();const U=V.order===P?null:P||(({order:X,sortOrders:te})=>{if(X==="")return te[0];const ne=te.indexOf(X||null);return te[ne>te.length-2?0:ne+1]})(V),G=(H=L.target)==null?void 0:H.closest("th");if(G&&Hs(G,"noclick"))return void xl(G,"noclick");if(!V.sortable)return;const z=E.store.states;let $,W=z.sortProp.value;const K=z.sortingColumn.value;(K!==V||K===V&&K.order===null)&&(K&&(K.order=null),z.sortingColumn.value=V,W=V.property),$=V.order=U||null,z.sortProp.value=W,z.sortOrder.value=$,k==null||k.store.commit("changeSortCondition")};return{handleHeaderClick:(L,V)=>{!V.filters&&V.sortable?B(L,V,!1):V.filterable&&!V.sortable&&I(L),k==null||k.emit("header-click",V,L)},handleHeaderContextMenu:(L,V)=>{k==null||k.emit("header-contextmenu",V,L)},handleMouseDown:(L,V)=>{if(rr&&!(V.children&&V.children.length>0)&&O.value&&E.border){F.value=!0;const P=k;C("set-drag-visible",!0);const H=(P==null?void 0:P.vnode.el).getBoundingClientRect().left,U=T.vnode.el.querySelector(`th.${V.id}`),G=U.getBoundingClientRect(),z=G.left-H+30;Ed(U,"noclick"),N.value={startMouseLeft:L.clientX,startLeft:G.right-H,startColumnLeft:G.left-H,tableLeft:H};const $=P==null?void 0:P.refs.resizeProxy;$.style.left=`${N.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const W=X=>{const te=X.clientX-N.value.startMouseLeft,ne=N.value.startLeft+te;$.style.left=`${Math.max(z,ne)}px`},K=()=>{if(F.value){const{startColumnLeft:X,startLeft:te}=N.value,ne=Number.parseInt($.style.left,10)-X;V.width=V.realWidth=ne,P==null||P.emit("header-dragend",V.width,te-X,V,L),requestAnimationFrame(()=>{E.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",F.value=!1,O.value=null,N.value={},C("set-drag-visible",!1)}document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",K),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{xl(U,"noclick")},0)};document.addEventListener("mousemove",W),document.addEventListener("mouseup",K)}},handleMouseMove:(L,V)=>{if(V.children&&V.children.length>0)return;const P=L.target;if(!$s(P))return;const H=P==null?void 0:P.closest("th");if(V&&V.resizable&&!F.value&&E.border){const U=H.getBoundingClientRect(),G=document.body.style;U.width>12&&U.right-L.pageX<8?(G.cursor="col-resize",Hs(H,"is-sortable")&&(H.style.cursor="col-resize"),O.value=V):F.value||(G.cursor="",Hs(H,"is-sortable")&&(H.style.cursor="pointer"),O.value=null)}},handleMouseOut:()=>{rr&&(document.body.style.cursor="")},handleSortClick:B,handleFilterClick:I}}(e,t),{getHeaderRowStyle:v,getHeaderRowClass:g,getHeaderCellStyle:b,getHeaderCellClass:y}=function(E){const C=Rt(Rc),T=_t("table");return{getHeaderRowStyle:k=>{const I=C==null?void 0:C.props.headerRowStyle;return typeof I=="function"?I.call(null,{rowIndex:k}):I},getHeaderRowClass:k=>{const I=[],O=C==null?void 0:C.props.headerRowClassName;return typeof O=="string"?I.push(O):typeof O=="function"&&I.push(O.call(null,{rowIndex:k})),I.join(" ")},getHeaderCellStyle:(k,I,O,F)=>{var N;let B=(N=C==null?void 0:C.props.headerCellStyle)!=null?N:{};typeof B=="function"&&(B=B.call(null,{rowIndex:k,columnIndex:I,row:O,column:F}));const L=DR(I,F.fixed,E.store,O);return pg(L,"left"),pg(L,"right"),Object.assign({},B,L)},getHeaderCellClass:(k,I,O,F)=>{const N=kR(T.b(),I,F.fixed,E.store,O),B=[F.id,F.order,F.headerAlign,F.className,F.labelClassName,...N];F.children||B.push("is-leaf"),F.sortable&&B.push("is-sortable");const L=C==null?void 0:C.props.headerCellClassName;return typeof L=="string"?B.push(L):typeof L=="function"&&B.push(L.call(null,{rowIndex:k,columnIndex:I,row:O,column:F})),B.push(T.e("cell")),B.filter(V=>!!V).join(" ")}}}(e),{isGroup:w,toggleAllSelection:x,columnRows:_}=TVe(e);return n.state={onColumnsChange:a,onScrollableChange:l},n.filterPanels=i,{ns:o,filterPanels:i,onColumnsChange:a,onScrollableChange:l,columnRows:_,getHeaderRowClass:g,getHeaderRowStyle:v,getHeaderCellClass:y,getHeaderCellStyle:b,handleHeaderClick:s,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:m,isGroup:w,toggleAllSelection:x}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:r,getHeaderCellClass:o,getHeaderRowClass:i,getHeaderRowStyle:a,handleHeaderClick:l,handleHeaderContextMenu:s,handleMouseDown:u,handleMouseMove:c,handleSortClick:d,handleMouseOut:f,store:p,$parent:m}=this;let v=1;return pn("thead",{class:{[e.is("group")]:t}},n.map((g,b)=>pn("tr",{class:i(b),key:b,style:a(b)},g.map((y,w)=>(y.rowSpan>v&&(v=y.rowSpan),pn("th",{class:o(b,w,g,y),colspan:y.colSpan,key:`${y.id}-thead`,rowspan:y.rowSpan,style:r(b,w,g,y),onClick:x=>l(x,y),onContextmenu:x=>s(x,y),onMousedown:x=>u(x,y),onMousemove:x=>c(x,y),onMouseout:f},[pn("div",{class:["cell",y.filteredValue&&y.filteredValue.length>0?"highlight":""]},[y.renderHeader?y.renderHeader({column:y,$index:w,store:p,_self:m}):y.label,y.sortable&&pn("span",{onClick:x=>d(x,y),class:"caret-wrapper"},[pn("i",{onClick:x=>d(x,y,"ascending"),class:"sort-caret ascending"}),pn("i",{onClick:x=>d(x,y,"descending"),class:"sort-caret descending"})]),y.filterable&&pn(OVe,{store:p,placement:y.filterPlacement||"bottom-start",column:y,upDataColumn:(x,_)=>{y[x]=_}})])]))))))}});function NVe(e){const t=Rt(Rc),n=de(""),r=de(pn("div")),o=(s,u,c)=>{var d;const f=t,p=ox(s);let m;const v=(d=f==null?void 0:f.vnode.el)==null?void 0:d.dataset.prefix;p&&(m=CR({columns:e.store.states.columns.value},p,v),m&&(f==null||f.emit(`cell-${c}`,u,m,p,s))),f==null||f.emit(`row-${c}`,u,m,s)},i=ts(s=>{e.store.commit("setHoverRow",s)},30),a=ts(()=>{e.store.commit("setHoverRow",null)},30),l=(s,u,c)=>{let d=u.target.parentNode;for(;s>1&&(d=d==null?void 0:d.nextSibling,d&&d.nodeName==="TR");)c(d,"hover-row hover-fixed-row"),s--};return{handleDoubleClick:(s,u)=>{o(s,u,"dblclick")},handleClick:(s,u)=>{e.store.commit("setCurrentRow",u),o(s,u,"click")},handleContextMenu:(s,u)=>{o(s,u,"contextmenu")},handleMouseEnter:i,handleMouseLeave:a,handleCellMouseEnter:(s,u,c)=>{var d;const f=t,p=ox(s),m=(d=f==null?void 0:f.vnode.el)==null?void 0:d.dataset.prefix;if(p){const T=CR({columns:e.store.states.columns.value},p,m);p.rowSpan>1&&l(p.rowSpan,s,Ed);const k=f.hoverState={cell:p,column:T,row:u};f==null||f.emit("cell-mouse-enter",k.row,k.column,k.cell,s)}if(!c)return;const v=s.target.querySelector(".cell");if(!Hs(v,`${m}-tooltip`)||!v.childNodes.length)return;const g=document.createRange();g.setStart(v,0),g.setEnd(v,v.childNodes.length);let b=g.getBoundingClientRect().width,y=g.getBoundingClientRect().height;b-Math.floor(b)<.001&&(b=Math.floor(b)),y-Math.floor(y)<.001&&(y=Math.floor(y));const{top:w,left:x,right:_,bottom:E}=(T=>{const k=window.getComputedStyle(T,null);return{left:Number.parseInt(k.paddingLeft,10)||0,right:Number.parseInt(k.paddingRight,10)||0,top:Number.parseInt(k.paddingTop,10)||0,bottom:Number.parseInt(k.paddingBottom,10)||0}})(v),C=w+E;(b+(x+_)>v.offsetWidth||y+C>v.offsetHeight||v.scrollWidth>v.offsetWidth)&&function(T,k,I,O){if((Xs==null?void 0:Xs.trigger)===I)return;Xs==null||Xs();const F=O==null?void 0:O.refs.tableWrapper,N=F==null?void 0:F.dataset.prefix,B={strategy:"fixed",...T.popperOptions},L=ie(Al,{content:k,virtualTriggering:!0,virtualRef:I,appendTo:F,placement:"top",transition:"none",offset:0,hideAfter:0,...T,popperOptions:B,onHide:()=>{Xs==null||Xs()}});L.appContext={...O.appContext,...O};const V=document.createElement("div");qs(L,V),L.component.exposed.onOpen();const P=F==null?void 0:F.querySelector(`.${N}-scrollbar__wrap`);Xs=()=>{qs(null,V),P==null||P.removeEventListener("scroll",Xs),Xs=null},Xs.trigger=I,P==null||P.addEventListener("scroll",Xs)}(c,p.innerText||p.textContent,p,f)},handleCellMouseLeave:s=>{const u=ox(s);if(!u)return;u.rowSpan>1&&l(u.rowSpan,s,xl);const c=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",c==null?void 0:c.row,c==null?void 0:c.column,c==null?void 0:c.cell,s)},tooltipContent:n,tooltipTrigger:r}}function FVe(e){const t=Rt(Rc),n=_t("table"),{handleDoubleClick:r,handleClick:o,handleContextMenu:i,handleMouseEnter:a,handleMouseLeave:l,handleCellMouseEnter:s,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=NVe(e),{getRowStyle:f,getRowClass:p,getCellStyle:m,getCellClass:v,getSpan:g,getColspanRealWidth:b}=function(E){const C=Rt(Rc),T=_t("table");return{getRowStyle:(k,I)=>{const O=C==null?void 0:C.props.rowStyle;return typeof O=="function"?O.call(null,{row:k,rowIndex:I}):O||null},getRowClass:(k,I)=>{const O=[T.e("row")];C!=null&&C.props.highlightCurrentRow&&k===E.store.states.currentRow.value&&O.push("current-row"),E.stripe&&I%2==1&&O.push(T.em("row","striped"));const F=C==null?void 0:C.props.rowClassName;return typeof F=="string"?O.push(F):typeof F=="function"&&O.push(F.call(null,{row:k,rowIndex:I})),O},getCellStyle:(k,I,O,F)=>{const N=C==null?void 0:C.props.cellStyle;let B=N??{};typeof N=="function"&&(B=N.call(null,{rowIndex:k,columnIndex:I,row:O,column:F}));const L=DR(I,E==null?void 0:E.fixed,E.store);return pg(L,"left"),pg(L,"right"),Object.assign({},B,L)},getCellClass:(k,I,O,F,N)=>{const B=kR(T.b(),I,E==null?void 0:E.fixed,E.store,void 0,N),L=[F.id,F.align,F.className,...B],V=C==null?void 0:C.props.cellClassName;return typeof V=="string"?L.push(V):typeof V=="function"&&L.push(V.call(null,{rowIndex:k,columnIndex:I,row:O,column:F})),L.push(T.e("cell")),L.filter(P=>!!P).join(" ")},getSpan:(k,I,O,F)=>{let N=1,B=1;const L=C==null?void 0:C.props.spanMethod;if(typeof L=="function"){const V=L({row:k,column:I,rowIndex:O,columnIndex:F});Array.isArray(V)?(N=V[0],B=V[1]):typeof V=="object"&&(N=V.rowspan,B=V.colspan)}return{rowspan:N,colspan:B}},getColspanRealWidth:(k,I,O)=>{if(I<1)return k[O].realWidth;const F=k.map(({realWidth:N,width:B})=>N||B).slice(O,O+I);return Number(F.reduce((N,B)=>Number(N)+Number(B),-1))}}}(e),y=ee(()=>e.store.states.columns.value.findIndex(({type:E})=>E==="default")),w=(E,C)=>{const T=t.props.rowKey;return T?Yi(E,T):C},x=(E,C,T,k=!1)=>{const{tooltipEffect:I,tooltipOptions:O,store:F}=e,{indent:N,columns:B}=F.states,L=p(E,C);let V=!0;return T&&(L.push(n.em("row",`level-${T.level}`)),V=T.display),pn("tr",{style:[V?null:{display:"none"},f(E,C)],class:L,key:w(E,C),onDblclick:P=>r(P,E),onClick:P=>o(P,E),onContextmenu:P=>i(P,E),onMouseenter:()=>a(C),onMouseleave:l},B.value.map((P,H)=>{const{rowspan:U,colspan:G}=g(E,P,C,H);if(!U||!G)return null;const z=Object.assign({},P);z.realWidth=b(B.value,G,H);const $={store:e.store,_self:e.context||t,column:z,row:E,$index:C,cellIndex:H,expanded:k};H===y.value&&T&&($.treeNode={indent:T.level*N.value,level:T.level},typeof T.expanded=="boolean"&&($.treeNode.expanded=T.expanded,"loading"in T&&($.treeNode.loading=T.loading),"noLazyChildren"in T&&($.treeNode.noLazyChildren=T.noLazyChildren)));const W=`${C},${H}`,K=z.columnKey||z.rawColumnKey||"",X=_(H,P,$),te=P.showOverflowTooltip&&XQ({effect:I},O,P.showOverflowTooltip);return pn("td",{style:m(C,H,E,P),class:v(C,H,E,P,G-1),key:`${K}${W}`,rowspan:U,colspan:G,onMouseenter:ne=>s(ne,E,te),onMouseleave:u},[X])}))},_=(E,C,T)=>C.renderCell(T);return{wrappedRowRender:(E,C)=>{const T=e.store,{isRowExpanded:k,assertRowKey:I}=T,{treeData:O,lazyTreeNodeMap:F,childrenColumnName:N,rowKey:B}=T.states,L=T.states.columns.value;if(L.some(({type:P})=>P==="expand")){const P=k(E),H=x(E,C,void 0,P),U=t.renderExpanded;return P?U?[[H,pn("tr",{key:`expanded-row__${H.key}`},[pn("td",{colspan:L.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[U({row:E,$index:C,store:T,expanded:P})])])]]:(console.error("[Element Error]renderExpanded is required."),H):[[H]]}if(Object.keys(O.value).length){I();const P=Yi(E,B.value);let H=O.value[P],U=null;H&&(U={expanded:H.expanded,level:H.level,display:!0},typeof H.lazy=="boolean"&&(typeof H.loaded=="boolean"&&H.loaded&&(U.noLazyChildren=!(H.children&&H.children.length)),U.loading=H.loading));const G=[x(E,C,U)];if(H){let z=0;const $=(K,X)=>{K&&K.length&&X&&K.forEach(te=>{const ne={display:X.display&&X.expanded,level:X.level+1,expanded:!1,noLazyChildren:!1,loading:!1},se=Yi(te,B.value);if(se==null)throw new Error("For nested data item, row-key is required.");if(H={...O.value[se]},H&&(ne.expanded=H.expanded,H.level=H.level||ne.level,H.display=!(!H.expanded||!ne.display),typeof H.lazy=="boolean"&&(typeof H.loaded=="boolean"&&H.loaded&&(ne.noLazyChildren=!(H.children&&H.children.length)),ne.loading=H.loading)),z++,G.push(x(te,C+z,ne)),H){const le=F.value[se]||te[N.value];$(le,H)}})};H.display=!0;const W=F.value[P]||E[N.value];$(W,H)}return G}return x(E,C,void 0)},tooltipContent:c,tooltipTrigger:d}}var RVe=Te({name:"ElTableBody",props:{store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean},setup(e){const t=dn(),n=Rt(Rc),r=_t("table"),{wrappedRowRender:o,tooltipContent:i,tooltipTrigger:a}=FVe(e),{onColumnsChange:l,onScrollableChange:s}=Iue(n),u=[];return Je(e.store.states.hoverRow,(c,d)=>{var f;const p=t==null?void 0:t.vnode.el,m=Array.from((p==null?void 0:p.children)||[]).filter(b=>b==null?void 0:b.classList.contains(`${r.e("row")}`));let v=c;const g=(f=m[v])==null?void 0:f.childNodes;if(g!=null&&g.length){let b=0;Array.from(g).reduce((w,x,_)=>{var E,C;return((E=g[_])==null?void 0:E.colSpan)>1&&(b=(C=g[_])==null?void 0:C.colSpan),x.nodeName!=="TD"&&b===0&&w.push(_),b>0&&b--,w},[]).forEach(w=>{for(var x;v>0;){const _=(x=m[v-1])==null?void 0:x.childNodes;if(_[w]&&_[w].nodeName==="TD"&&_[w].rowSpan>1){Ed(_[w],"hover-cell"),u.push(_[w]);break}v--}})}else u.forEach(b=>xl(b,"hover-cell")),u.length=0;e.store.states.isComplex.value&&rr&&RQ(()=>{const b=m[d],y=m[c];b&&!b.classList.contains("hover-fixed-row")&&xl(b,"hover-row"),y&&Ed(y,"hover-row")})}),Vs(()=>{var c;(c=Xs)==null||c()}),{ns:r,onColumnsChange:l,onScrollableChange:s,wrappedRowRender:o,tooltipContent:i,tooltipTrigger:a}},render(){const{wrappedRowRender:e,store:t}=this;return pn("tbody",{tabIndex:-1},[(t.states.data.value||[]).reduce((n,r)=>n.concat(e(r,n.length)),[])])}});function IVe(e){const{columns:t}=function(){const r=Rt(Rc),o=r==null?void 0:r.store;return{leftFixedLeafCount:ee(()=>o.states.fixedLeafColumnsLength.value),rightFixedLeafCount:ee(()=>o.states.rightFixedColumns.value.length),columnsCount:ee(()=>o.states.columns.value.length),leftFixedCount:ee(()=>o.states.fixedColumns.value.length),rightFixedCount:ee(()=>o.states.rightFixedColumns.value.length),columns:o.states.columns}}(),n=_t("table");return{getCellClasses:(r,o)=>{const i=r[o],a=[n.e("cell"),i.id,i.align,i.labelClassName,...kR(n.b(),o,i.fixed,e.store)];return i.className&&a.push(i.className),i.children||a.push(n.is("leaf")),a},getCellStyles:(r,o)=>{const i=DR(o,r.fixed,e.store);return pg(i,"left"),pg(i,"right"),i},columns:t}}var BVe=Te({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:n,columns:r}=IVe(e);return{ns:_t("table"),getCellClasses:t,getCellStyles:n,columns:r}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:r,sumText:o}=this,i=this.store.states.data.value;let a=[];return r?a=r({columns:e,data:i}):e.forEach((l,s)=>{if(s===0)return void(a[s]=o);const u=i.map(p=>Number(p[l.property])),c=[];let d=!0;u.forEach(p=>{if(!Number.isNaN(+p)){d=!1;const m=`${p}`.split(".")[1];c.push(m?m.length:0)}});const f=Math.max.apply(null,c);a[s]=d?"":u.reduce((p,m)=>{const v=Number(m);return Number.isNaN(+v)?p:Number.parseFloat((p+m).toFixed(Math.min(f,20)))},0)}),pn(pn("tfoot",[pn("tr",{},[...e.map((l,s)=>pn("td",{key:s,colspan:l.colSpan,rowspan:l.rowSpan,class:n(e,s),style:t(l,s)},[pn("div",{class:["cell",l.labelClassName]},[a[s]])]))])]))}});function LVe(e,t,n,r){const o=de(!1),i=de(null),a=de(!1),l=de({width:null,height:null,headerHeight:null}),s=de(!1),u=de(),c=de(0),d=de(0),f=de(0),p=de(0),m=de(0);yl(()=>{t.setHeight(e.height)}),yl(()=>{t.setMaxHeight(e.maxHeight)}),Je(()=>[e.currentRowKey,n.states.rowKey],([F,N])=>{M(N)&&M(F)&&n.setCurrentRowKey(`${F}`)},{immediate:!0}),Je(()=>e.data,F=>{r.store.commit("setData",F)},{immediate:!0,deep:!0}),yl(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const v=ee(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),g=ee(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),b=()=>{v.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(w)};yn(async()=>{await St(),n.updateColumns(),x(),requestAnimationFrame(b);const F=r.vnode.el,N=r.refs.headerWrapper;e.flexible&&F&&F.parentElement&&(F.parentElement.style.minWidth="0"),l.value={width:u.value=F.offsetWidth,height:F.offsetHeight,headerHeight:e.showHeader&&N?N.offsetHeight:null},n.states.columns.value.forEach(B=>{B.filteredValue&&B.filteredValue.length&&r.store.commit("filterChange",{column:B,values:B.filteredValue,silent:!0})}),r.$ready=!0});const y=F=>{const{tableWrapper:N}=r.refs;((B,L)=>{if(!B)return;const V=Array.from(B.classList).filter(P=>!P.startsWith("is-scrolling-"));V.push(t.scrollX.value?L:"is-scrolling-none"),B.className=V.join(" ")})(N,F)},w=function(){if(!r.refs.scrollBarRef)return;if(!t.scrollX.value){const H="is-scrolling-none";return void((U=>{const{tableWrapper:G}=r.refs;return!(!G||!G.classList.contains(U))})(H)||y(H))}const F=r.refs.scrollBarRef.wrapRef;if(!F)return;const{scrollLeft:N,offsetWidth:B,scrollWidth:L}=F,{headerWrapper:V,footerWrapper:P}=r.refs;V&&(V.scrollLeft=N),P&&(P.scrollLeft=N),y(N>=L-B-1?"is-scrolling-right":N===0?"is-scrolling-left":"is-scrolling-middle")},x=()=>{r.refs.scrollBarRef&&(r.refs.scrollBarRef.wrapRef&&Yo(r.refs.scrollBarRef.wrapRef,"scroll",w,{passive:!0}),e.fit?fa(r.vnode.el,_):Yo(window,"resize",_),fa(r.refs.bodyWrapper,()=>{var F,N;_(),(N=(F=r.refs)==null?void 0:F.scrollBarRef)==null||N.update()}))},_=()=>{var F,N,B,L;const V=r.vnode.el;if(!r.$ready||!V)return;let P=!1;const{width:H,height:U,headerHeight:G}=l.value,z=u.value=V.offsetWidth;H!==z&&(P=!0);const $=V.offsetHeight;(e.height||v.value)&&U!==$&&(P=!0);const W=e.tableLayout==="fixed"?r.refs.headerWrapper:(F=r.refs.tableHeaderRef)==null?void 0:F.$el;e.showHeader&&(W==null?void 0:W.offsetHeight)!==G&&(P=!0),c.value=((N=r.refs.tableWrapper)==null?void 0:N.scrollHeight)||0,f.value=(W==null?void 0:W.scrollHeight)||0,p.value=((B=r.refs.footerWrapper)==null?void 0:B.offsetHeight)||0,m.value=((L=r.refs.appendWrapper)==null?void 0:L.offsetHeight)||0,d.value=c.value-f.value-p.value-m.value,P&&(l.value={width:z,height:$,headerHeight:e.showHeader&&(W==null?void 0:W.offsetHeight)||0},b())},E=$i(),C=ee(()=>{const{bodyWidth:F,scrollY:N,gutterWidth:B}=t;return F.value?F.value-(N.value?B:0)+"px":""}),T=ee(()=>e.maxHeight?"fixed":e.tableLayout),k=ee(()=>{if(e.data&&e.data.length)return null;let F="100%";e.height&&d.value&&(F=`${d.value}px`);const N=u.value;return{width:N?`${N}px`:"",height:F}}),I=ee(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),O=ee(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${f.value+p.value}px)`}:{maxHeight:e.maxHeight-f.value-p.value+"px"}:{});return{isHidden:o,renderExpanded:i,setDragVisible:F=>{a.value=F},isGroup:s,handleMouseLeave:()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},handleHeaderFooterMousewheel:(F,N)=>{const{pixelX:B,pixelY:L}=N;Math.abs(B)>=Math.abs(L)&&(r.refs.bodyWrapper.scrollLeft+=N.pixelX/5)},tableSize:E,emptyBlockStyle:k,handleFixedMousewheel:(F,N)=>{const B=r.refs.bodyWrapper;if(Math.abs(N.spinY)>0){const L=B.scrollTop;N.pixelY<0&&L!==0&&F.preventDefault(),N.pixelY>0&&B.scrollHeight-B.clientHeight>L&&F.preventDefault(),B.scrollTop+=Math.ceil(N.pixelY/5)}else B.scrollLeft+=Math.ceil(N.pixelX/5)},resizeProxyVisible:a,bodyWidth:C,resizeState:l,doLayout:b,tableBodyStyles:g,tableLayout:T,scrollbarViewStyle:{display:"inline-block",verticalAlign:"middle"},tableInnerStyle:I,scrollbarStyle:O}}function PVe(e){const t=de();yn(()=>{(()=>{const n=e.vnode.el.querySelector(".hidden-columns"),r=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{r.forEach(o=>o())}),t.value.observe(n,{childList:!0,subtree:!0})})()}),Vs(()=>{var n;(n=t.value)==null||n.disconnect()})}var jVe={data:{type:Array,default:()=>[]},size:da,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object]};function Lue(e){const t=e.tableLayout==="auto";let n=e.columns||[];return t&&n.every(r=>r.width===void 0)&&(n=[]),pn("colgroup",{},n.map(r=>pn("col",(o=>{const i={key:`${e.tableLayout}_${o.id}`,style:{},name:void 0};return t?i.style={width:`${o.width}px`}:i.name=o.id,i})(r))))}Lue.props=["columns","tableLayout"];let VVe=1;const zVe=Te({name:"ElTable",directives:{Mousewheel:fLe},components:{TableHeader:MVe,TableBody:RVe,TableFooter:BVe,ElScrollbar:wd,hColgroup:Lue},props:jVe,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Gr(),n=_t("table"),r=dn();qn(Rc,r);const o=xVe(r,e);r.store=o;const i=new _Ve({store:r.store,table:r,fit:e.fit,showHeader:e.showHeader});r.layout=i;const a=ee(()=>(o.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:s,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,sort:v}=function(te){return{setCurrentRow:ne=>{te.commit("setCurrentRow",ne)},getSelectionRows:()=>te.getSelectionRows(),toggleRowSelection:(ne,se)=>{te.toggleRowSelection(ne,se,!1),te.updateAllSelected()},clearSelection:()=>{te.clearSelection()},clearFilter:ne=>{te.clearFilter(ne)},toggleAllSelection:()=>{te.commit("toggleAllSelection")},toggleRowExpansion:(ne,se)=>{te.toggleRowExpansionAdapter(ne,se)},clearSort:()=>{te.clearSort()},sort:(ne,se)=>{te.commit("sort",{prop:ne,order:se})}}}(o),{isHidden:g,renderExpanded:b,setDragVisible:y,isGroup:w,handleMouseLeave:x,handleHeaderFooterMousewheel:_,tableSize:E,emptyBlockStyle:C,handleFixedMousewheel:T,resizeProxyVisible:k,bodyWidth:I,resizeState:O,doLayout:F,tableBodyStyles:N,tableLayout:B,scrollbarViewStyle:L,tableInnerStyle:V,scrollbarStyle:P}=LVe(e,i,o,r),{scrollBarRef:H,scrollTo:U,setScrollLeft:G,setScrollTop:z}=(()=>{const te=de(),ne=(se,le)=>{const J=te.value;J&&Kn(le)&&["Top","Left"].includes(se)&&J[`setScroll${se}`](le)};return{scrollBarRef:te,scrollTo:(se,le)=>{const J=te.value;J&&J.scrollTo(se,le)},setScrollTop:se=>ne("Top",se),setScrollLeft:se=>ne("Left",se)}})(),$=ts(F,50),W=`${n.namespace.value}-table_${VVe++}`;r.tableId=W,r.state={isGroup:w,resizeState:O,doLayout:F,debouncedUpdateLayout:$};const K=ee(()=>e.sumText||t("el.table.sumText")),X=ee(()=>e.emptyText||t("el.table.emptyText"));return PVe(r),{ns:n,layout:i,store:o,handleHeaderFooterMousewheel:_,handleMouseLeave:x,tableId:W,tableSize:E,isHidden:g,isEmpty:a,renderExpanded:b,resizeProxyVisible:k,resizeState:O,isGroup:w,bodyWidth:I,tableBodyStyles:N,emptyBlockStyle:C,debouncedUpdateLayout:$,handleFixedMousewheel:T,setCurrentRow:l,getSelectionRows:s,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,doLayout:F,sort:v,t,setDragVisible:y,context:r,computedSumText:K,computedEmptyText:X,tableLayout:B,scrollbarViewStyle:L,tableInnerStyle:V,scrollbarStyle:P,scrollBarRef:H,scrollTo:U,setScrollLeft:G,setScrollTop:z}}}),HVe=["data-prefix"],$Ve={ref:"hiddenColumns",class:"hidden-columns"};var UVe=Nt(zVe,[["render",function(e,t,n,r,o,i){const a=Qe("hColgroup"),l=Qe("table-header"),s=Qe("table-body"),u=Qe("table-footer"),c=Qe("el-scrollbar"),d=gm("mousewheel");return Y(),fe("div",{ref:"tableWrapper",class:oe([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:$t(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...f)=>e.handleMouseLeave&&e.handleMouseLeave(...f))},[ce("div",{class:oe(e.ns.e("inner-wrapper")),style:$t(e.tableInnerStyle)},[ce("div",$Ve,[ft(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?nn((Y(),fe("div",{key:0,ref:"headerWrapper",class:oe(e.ns.e("header-wrapper"))},[ce("table",{ref:"tableHeader",class:oe(e.ns.e("header")),style:$t(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[ie(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),ie(l,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[d,e.handleHeaderFooterMousewheel]]):Fe("v-if",!0),ce("div",{ref:"bodyWrapper",class:oe(e.ns.e("body-wrapper"))},[ie(c,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:he(()=>[ce("table",{ref:"tableBody",class:oe(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:$t({width:e.bodyWidth,tableLayout:e.tableLayout})},[ie(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(Y(),Pe(l,{key:0,ref:"tableHeaderRef",class:oe(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):Fe("v-if",!0),ie(s,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(Y(),Pe(u,{key:1,class:oe(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):Fe("v-if",!0)],6),e.isEmpty?(Y(),fe("div",{key:0,ref:"emptyBlock",style:$t(e.emptyBlockStyle),class:oe(e.ns.e("empty-block"))},[ce("span",{class:oe(e.ns.e("empty-text"))},[ft(e.$slots,"empty",{},()=>[Dt(Ye(e.computedEmptyText),1)])],2)],6)):Fe("v-if",!0),e.$slots.append?(Y(),fe("div",{key:1,ref:"appendWrapper",class:oe(e.ns.e("append-wrapper"))},[ft(e.$slots,"append")],2)):Fe("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary&&e.tableLayout==="fixed"?nn((Y(),fe("div",{key:1,ref:"footerWrapper",class:oe(e.ns.e("footer-wrapper"))},[ce("table",{class:oe(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:$t(e.tableBodyStyles)},[ie(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),ie(u,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[$n,!e.isEmpty],[d,e.handleHeaderFooterMousewheel]]):Fe("v-if",!0),e.border||e.isGroup?(Y(),fe("div",{key:2,class:oe(e.ns.e("border-left-patch"))},null,2)):Fe("v-if",!0)],6),nn(ce("div",{ref:"resizeProxy",class:oe(e.ns.e("column-resize-proxy"))},null,2),[[$n,e.resizeProxyVisible]])],46,HVe)}],["__file","table.vue"]]);const WVe={selection:"table-column--selection",expand:"table__expand-column"},GVe={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},qVe={selection:{renderHeader:({store:e,column:t})=>pn(bl,{disabled:e.states.data.value&&e.states.data.value.length===0,size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label}),renderCell:({row:e,column:t,store:n,$index:r})=>pn(bl,{disabled:!!t.selectable&&!t.selectable.call(null,e,r),size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:o=>o.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:t.label}),sortable:!1,resizable:!1},index:{renderHeader:({column:e})=>e.label||"#",renderCell({column:e,$index:t}){let n=t+1;const r=e.index;return typeof r=="number"?n=t+r:typeof r=="function"&&(n=r(t)),pn("div",{},[n])},sortable:!1},expand:{renderHeader:({column:e})=>e.label||"",renderCell({row:e,store:t,expanded:n}){const{ns:r}=t,o=[r.e("expand-icon")];return n&&o.push(r.em("expand-icon","expanded")),pn("div",{class:o,onClick:function(i){i.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[pn(Ft,null,{default:()=>[pn(Su)]})]})},sortable:!1,resizable:!1}};function KVe({row:e,column:t,$index:n}){var r;const o=t.property,i=o&&Pb(e,o).value;return t&&t.formatter?t.formatter(e,t,i,n):((r=i==null?void 0:i.toString)==null?void 0:r.call(i))||""}function Pue(e,t){return e.reduce((n,r)=>(n[r]=r,n),t)}function YVe(e,t,n){const r=dn(),o=de(""),i=de(!1),a=de(),l=de(),s=_t("table");yl(()=>{a.value=e.align?`is-${e.align}`:null,a.value}),yl(()=>{l.value=e.headerAlign?`is-${e.headerAlign}`:a.value,l.value});const u=ee(()=>{let p=r.vnode.vParent||r.parent;for(;p&&!p.tableId&&!p.columnId;)p=p.vnode.vParent||p.parent;return p}),c=ee(()=>{const{store:p}=r.parent;if(!p)return!1;const{treeData:m}=p.states,v=m.value;return v&&Object.keys(v).length>0}),d=de(SR(e.width)),f=de(Due(e.minWidth));return{columnId:o,realAlign:a,isSubColumn:i,realHeaderAlign:l,columnOrTableParent:u,setColumnWidth:p=>(d.value&&(p.width=d.value),f.value&&(p.minWidth=f.value),!d.value&&f.value&&(p.width=void 0),p.minWidth||(p.minWidth=80),p.realWidth=Number(p.width===void 0?p.minWidth:p.width),p),setColumnForcedProps:p=>{const m=p.type,v=qVe[m]||{};Object.keys(v).forEach(b=>{const y=v[b];b!=="className"&&y!==void 0&&(p[b]=y)});const g=(b=>WVe[b]||"")(m);if(g){const b=`${M(s.namespace)}-${g}`;p.className=p.className?`${p.className} ${b}`:b}return p},setColumnRenders:p=>{e.renderHeader||p.type!=="selection"&&(p.renderHeader=v=>(r.columnConfig.value.label,ft(t,"header",v,()=>[p.label])));let m=p.renderCell;return p.type==="expand"?(p.renderCell=v=>pn("div",{class:"cell"},[m(v)]),n.value.renderExpanded=v=>t.default?t.default(v):t.default):(m=m||KVe,p.renderCell=v=>{let g=null;if(t.default){const _=t.default(v);g=_.some(E=>E.type!==hi)?_:m(v)}else g=m(v);const{columns:b}=n.value.store.states,y=b.value.findIndex(_=>_.type==="default"),w=function({row:_,treeNode:E,store:C},T=!1){const{ns:k}=C;if(!E)return T?[pn("span",{class:k.e("placeholder")})]:null;const I=[],O=function(F){F.stopPropagation(),E.loading||C.loadOrToggle(_)};if(E.indent&&I.push(pn("span",{class:k.e("indent"),style:{"padding-left":`${E.indent}px`}})),typeof E.expanded!="boolean"||E.noLazyChildren)I.push(pn("span",{class:k.e("placeholder")}));else{const F=[k.e("expand-icon"),E.expanded?k.em("expand-icon","expanded"):""];let N=Su;E.loading&&(N=jd),I.push(pn("div",{class:F,onClick:O},{default:()=>[pn(Ft,{class:{[k.is("loading")]:E.loading}},{default:()=>[pn(N)]})]}))}return I}(v,c.value&&v.cellIndex===y),x={class:"cell",style:{}};return p.showOverflowTooltip&&(x.class=`${x.class} ${M(s.namespace)}-tooltip`,x.style={width:(v.column.realWidth||Number(v.column.width))-1+"px"}),(_=>{function E(C){var T;((T=C==null?void 0:C.type)==null?void 0:T.name)==="ElTableColumn"&&(C.vParent=r)}Array.isArray(_)?_.forEach(C=>E(C)):E(_)})(g),pn("div",x,[w,g])}),p},getPropsData:(...p)=>p.reduce((m,v)=>(Array.isArray(v)&&v.forEach(g=>{m[g]=e[g]}),m),{}),getColumnElIndex:(p,m)=>Array.prototype.indexOf.call(p,m),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var XVe={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let QVe=1;var jue=Te({name:"ElTableColumn",components:{ElCheckbox:bl},props:XVe,setup(e,{slots:t}){const n=dn(),r=de({}),o=ee(()=>{let w=n.parent;for(;w&&!w.tableId;)w=w.parent;return w}),{registerNormalWatchers:i,registerComplexWatchers:a}=function(w,x){const _=dn();return{registerComplexWatchers:()=>{const E={realWidth:"width",realMinWidth:"minWidth"},C=Pue(["fixed"],E);Object.keys(C).forEach(T=>{const k=E[T];Tn(x,k)&&Je(()=>x[k],I=>{let O=I;k==="width"&&T==="realWidth"&&(O=SR(I)),k==="minWidth"&&T==="realMinWidth"&&(O=Due(I)),_.columnConfig.value[k]=O,_.columnConfig.value[T]=O;const F=k==="fixed";w.value.store.scheduleLayout(F)})})},registerNormalWatchers:()=>{const E={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},C=Pue(["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],E);Object.keys(C).forEach(T=>{const k=E[T];Tn(x,k)&&Je(()=>x[k],I=>{_.columnConfig.value[T]=I})})}}}(o,e),{columnId:l,isSubColumn:s,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:p,getPropsData:m,getColumnElIndex:v,realAlign:g,updateColumnOrder:b}=YVe(e,t,o),y=c.value;l.value=`${y.tableId||y.columnId}_column_${QVe++}`,g0(()=>{s.value=o.value!==y;const w=e.type||"default",x=e.sortable===""||e.sortable,_=Wi(e.showOverflowTooltip)?y.props.showOverflowTooltip:e.showOverflowTooltip,E={...GVe[w],id:l.value,type:w,property:e.prop||e.property,align:g,headerAlign:u,showOverflowTooltip:_,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:x,index:e.index,rawColumnKey:n.vnode.key};let C=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);C=function(k,I){const O={};let F;for(F in k)O[F]=k[F];for(F in I)if(Tn(I,F)){const N=I[F];N!==void 0&&(O[F]=N)}return O}(E,C),C=function(...k){return k.length===0?I=>I:k.length===1?k[0]:k.reduce((I,O)=>(...F)=>I(O(...F)))}(p,d,f)(C),r.value=C,i(),a()}),yn(()=>{var w;const x=c.value,_=s.value?x.vnode.el.children:(w=x.refs.hiddenColumns)==null?void 0:w.children,E=()=>v(_||[],n.vnode.el);r.value.getColumnIndex=E,E()>-1&&o.value.store.commit("insertColumn",r.value,s.value?x.columnConfig.value:null,b)}),xo(()=>{o.value.store.commit("removeColumn",r.value,s.value?y.columnConfig.value:null,b)}),n.columnId=l.value,n.columnConfig=r},render(){var e,t,n;try{const r=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),o=[];if(Array.isArray(r))for(const i of r)((n=i.type)==null?void 0:n.name)==="ElTableColumn"||2&i.shapeFlag?o.push(i):i.type===bt&&Array.isArray(i.children)&&i.children.forEach(a=>{(a==null?void 0:a.patchFlag)===1024||an(a==null?void 0:a.children)||o.push(a)});return pn("div",o)}catch{return pn("div",[])}}});let i4,Vue,MR,zue,Hue;fQ=Cr(UVe,{TableColumn:jue}),dQ=Ya(jue),i4=Symbol("tabsRootContextKey"),Vue=Lt({tabs:{type:Array,default:()=>[]}}),MR="ElTabBar",zue=Te({name:MR}),Hue=Te({...zue,props:Vue,setup(e,{expose:t}){const n=e,r=dn(),o=Rt(i4);o||Ka(MR,"<el-tabs><el-tab-bar /></el-tabs>");const i=_t("tabs"),a=de(),l=de(),s=()=>l.value=(()=>{let u=0,c=0;const d=["top","bottom"].includes(o.props.tabPosition)?"width":"height",f=d==="width"?"x":"y",p=f==="x"?"left":"top";return n.tabs.every(m=>{var v,g;const b=(g=(v=r.parent)==null?void 0:v.refs)==null?void 0:g[`tab-${m.uid}`];if(!b)return!1;if(!m.active)return!0;u=b[`offset${Ru(p)}`],c=b[`client${Ru(d)}`];const y=window.getComputedStyle(b);return d==="width"&&(n.tabs.length>1&&(c-=Number.parseFloat(y.paddingLeft)+Number.parseFloat(y.paddingRight)),u+=Number.parseFloat(y.paddingLeft)),!1}),{[d]:`${c}px`,transform:`translate${Ru(f)}(${u}px)`}})();return Je(()=>n.tabs,async()=>{await St(),s()},{immediate:!0}),fa(a,()=>s()),t({ref:a,update:s}),(u,c)=>(Y(),fe("div",{ref_key:"barRef",ref:a,class:oe([M(i).e("active-bar"),M(i).is(M(o).props.tabPosition)]),style:$t(l.value)},null,6))}});var JVe=Nt(Hue,[["__file","tab-bar.vue"]]);const ZVe=Lt({panes:{type:Array,default:()=>[]},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),eze={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},$ue="ElTabNav",tze=Te({name:$ue,props:ZVe,emits:eze,setup(e,{expose:t,emit:n}){const r=dn(),o=Rt(i4);o||Ka($ue,"<el-tabs><tab-nav /></el-tabs>");const i=_t("tabs"),a=function({document:k=UNe}={}){if(!k)return de("visible");const I=de(k.visibilityState);return Yo(k,"visibilitychange",()=>{I.value=k.visibilityState}),I}(),l=function({window:k=Wm}={}){if(!k)return de(!1);const I=de(k.document.hasFocus());return Yo(k,"blur",()=>{I.value=!1}),Yo(k,"focus",()=>{I.value=!0}),I}(),s=de(),u=de(),c=de(),d=de(),f=de(!1),p=de(0),m=de(!1),v=de(!0),g=ee(()=>["top","bottom"].includes(o.props.tabPosition)?"width":"height"),b=ee(()=>({transform:`translate${g.value==="width"?"X":"Y"}(-${p.value}px)`})),y=()=>{if(!s.value)return;const k=s.value[`offset${Ru(g.value)}`],I=p.value;if(!I)return;const O=I>k?I-k:0;p.value=O},w=()=>{if(!s.value||!u.value)return;const k=u.value[`offset${Ru(g.value)}`],I=s.value[`offset${Ru(g.value)}`],O=p.value;if(k-O<=I)return;const F=k-O>2*I?O+I:k-I;p.value=F},x=async()=>{const k=u.value;if(!(f.value&&c.value&&s.value&&k))return;await St();const I=c.value.querySelector(".is-active");if(!I)return;const O=s.value,F=["top","bottom"].includes(o.props.tabPosition),N=I.getBoundingClientRect(),B=O.getBoundingClientRect(),L=F?k.offsetWidth-B.width:k.offsetHeight-B.height,V=p.value;let P=V;F?(N.left<B.left&&(P=V-(B.left-N.left)),N.right>B.right&&(P=V+N.right-B.right)):(N.top<B.top&&(P=V-(B.top-N.top)),N.bottom>B.bottom&&(P=V+(N.bottom-B.bottom))),P=Math.max(P,0),p.value=Math.min(P,L)},_=()=>{var k;if(!u.value||!s.value)return;e.stretch&&((k=d.value)==null||k.update());const I=u.value[`offset${Ru(g.value)}`],O=s.value[`offset${Ru(g.value)}`],F=p.value;O<I?(f.value=f.value||{},f.value.prev=F,f.value.next=F+O<I,I-F<O&&(p.value=I-O)):(f.value=!1,F>0&&(p.value=0))},E=k=>{const I=k.code,{up:O,down:F,left:N,right:B}=Xt;if(![O,F,N,B].includes(I))return;const L=Array.from(k.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),V=L.indexOf(k.target);let P;P=I===N||I===O?V===0?L.length-1:V-1:V<L.length-1?V+1:0,L[P].focus({preventScroll:!0}),L[P].click(),C()},C=()=>{v.value&&(m.value=!0)},T=()=>m.value=!1;return Je(a,k=>{k==="hidden"?v.value=!1:k==="visible"&&setTimeout(()=>v.value=!0,50)}),Je(l,k=>{k?setTimeout(()=>v.value=!0,50):v.value=!1}),fa(c,_),yn(()=>setTimeout(()=>x(),0)),zs(()=>_()),t({scrollToActiveTab:x,removeFocus:T}),Je(()=>e.panes,()=>r.update(),{flush:"post",deep:!0}),()=>{const k=f.value?[ie("span",{class:[i.e("nav-prev"),i.is("disabled",!f.value.prev)],onClick:y},[ie(Ft,null,{default:()=>[ie(m0,null,null)]})]),ie("span",{class:[i.e("nav-next"),i.is("disabled",!f.value.next)],onClick:w},[ie(Ft,null,{default:()=>[ie(Su,null,null)]})])]:null,I=e.panes.map((O,F)=>{var N,B,L,V;const P=O.uid,H=O.props.disabled,U=(B=(N=O.props.name)!=null?N:O.index)!=null?B:`${F}`,G=!H&&(O.isClosable||e.editable);O.index=`${F}`;const z=G?ie(Ft,{class:"is-icon-close",onClick:K=>n("tabRemove",O,K)},{default:()=>[ie(wc,null,null)]}):null,$=((V=(L=O.slots).label)==null?void 0:V.call(L))||O.props.label,W=!H&&O.active?0:-1;return ie("div",{ref:`tab-${P}`,class:[i.e("item"),i.is(o.props.tabPosition),i.is("active",O.active),i.is("disabled",H),i.is("closable",G),i.is("focus",m.value)],id:`tab-${U}`,key:`tab-${P}`,"aria-controls":`pane-${U}`,role:"tab","aria-selected":O.active,tabindex:W,onFocus:()=>C(),onBlur:()=>T(),onClick:K=>{T(),n("tabClick",O,U,K)},onKeydown:K=>{!G||K.code!==Xt.delete&&K.code!==Xt.backspace||n("tabRemove",O,K)}},[$,z])});return ie("div",{ref:c,class:[i.e("nav-wrap"),i.is("scrollable",!!f.value),i.is(o.props.tabPosition)]},[k,ie("div",{class:i.e("nav-scroll"),ref:s},[ie("div",{class:[i.e("nav"),i.is(o.props.tabPosition),i.is("stretch",e.stretch&&["top","bottom"].includes(o.props.tabPosition))],ref:u,style:b.value,role:"tablist",onKeydown:E},[e.type?null:ie(JVe,{ref:d,tabs:[...e.panes]},null),I])])])}}}),nze=Lt({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Function,default:()=>!0},stretch:Boolean}),NR=e=>an(e)||Kn(e),rze={[xn]:e=>NR(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>NR(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>NR(e),tabAdd:()=>!0},oze=Te({name:"ElTabs",props:nze,emits:rze,setup(e,{emit:t,slots:n,expose:r}){var o;const i=_t("tabs"),{children:a,addChild:l,removeChild:s}=Oie(dn(),"ElTabPane"),u=de(),c=de((o=e.modelValue)!=null?o:"0"),d=async(v,g=!1)=>{var b,y,w;if(c.value!==v&&!Wi(v))try{await((b=e.beforeLeave)==null?void 0:b.call(e,v,c.value))!==!1&&(c.value=v,g&&(t(xn,v),t("tabChange",v)),(w=(y=u.value)==null?void 0:y.removeFocus)==null||w.call(y))}catch{}},f=(v,g,b)=>{v.props.disabled||(d(g,!0),t("tabClick",v,b))},p=(v,g)=>{v.props.disabled||Wi(v.props.name)||(g.stopPropagation(),t("edit",v.props.name,"remove"),t("tabRemove",v.props.name))},m=()=>{t("edit",void 0,"add"),t("tabAdd")};return Je(()=>e.modelValue,v=>d(v)),Je(c,async()=>{var v;await St(),(v=u.value)==null||v.scrollToActiveTab()}),qn(i4,{props:e,currentName:c,registerPane:l,unregisterPane:s}),r({currentName:c}),()=>{const v=n["add-icon"],g=e.editable||e.addable?ie("span",{class:i.e("new-tab"),tabindex:"0",onClick:m,onKeydown:w=>{w.code===Xt.enter&&m()}},[v?ft(n,"add-icon"):ie(Ft,{class:i.is("icon-plus")},{default:()=>[ie(jN,null,null)]})]):null,b=ie("div",{class:[i.e("header"),i.is(e.tabPosition)]},[g,ie(tze,{ref:u,currentName:c.value,editable:e.editable,type:e.type,panes:a.value,stretch:e.stretch,onTabClick:f,onTabRemove:p},null)]),y=ie("div",{class:i.e("content")},[ft(n,"default")]);return ie("div",{class:[i.b(),i.m(e.tabPosition),{[i.m("card")]:e.type==="card",[i.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[b,y]:[y,b]])}}}),ize=Lt({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),aze=["id","aria-hidden","aria-labelledby"],Uue="ElTabPane",lze=Te({name:Uue}),sze=Te({...lze,props:ize,setup(e){const t=e,n=dn(),r=Ga(),o=Rt(i4);o||Ka(Uue,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const i=_t("tab-pane"),a=de(),l=ee(()=>t.closable||o.props.closable),s=Jne(()=>{var p;return o.currentName.value===((p=t.name)!=null?p:a.value)}),u=de(s.value),c=ee(()=>{var p;return(p=t.name)!=null?p:a.value}),d=Jne(()=>!t.lazy||u.value||s.value);Je(s,p=>{p&&(u.value=!0)});const f=Qn({uid:n.uid,slots:r,props:t,paneName:c,active:s,index:a,isClosable:l});return yn(()=>{o.registerPane(f)}),Vs(()=>{o.unregisterPane(f.uid)}),(p,m)=>M(d)?nn((Y(),fe("div",{key:0,id:`pane-${M(c)}`,class:oe(M(i).b()),role:"tabpanel","aria-hidden":!M(s),"aria-labelledby":`tab-${M(c)}`},[ft(p.$slots,"default")],10,aze)),[[$n,M(s)]]):Fe("v-if",!0)}});var Wue=Nt(sze,[["__file","tab-pane.vue"]]);let FR,RR,l1,ax,Gue,lx,que,Kue,hg,Yue,Xue;sQ=Cr(oze,{TabPane:Wue}),lQ=Ya(Wue),FR="left-check-change",RR="right-check-change",l1=Lt({data:{type:Array,default:()=>[]},titles:{type:Array,default:()=>[]},buttonTexts:{type:Array,default:()=>[]},filterPlaceholder:String,filterMethod:{type:Function},leftDefaultChecked:{type:Array,default:()=>[]},rightDefaultChecked:{type:Array,default:()=>[]},renderContent:{type:Function},modelValue:{type:Array,default:()=>[]},format:{type:Object,default:()=>({})},filterable:Boolean,props:{type:Object,default:()=>({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),ax=(e,t)=>[e,t].every(mt)||mt(e)&&pa(t),Gue={[Xo]:(e,t,n)=>[e,n].every(mt)&&["left","right"].includes(t),[xn]:e=>mt(e),[FR]:ax,[RR]:ax},lx="checked-change",que=Lt({data:l1.data,optionRender:{type:Function},placeholder:String,title:String,filterable:Boolean,format:l1.format,filterMethod:l1.filterMethod,defaultChecked:l1.leftDefaultChecked,props:l1.props}),Kue={[lx]:ax},hg=e=>{const t={label:"label",key:"key",disabled:"disabled"};return ee(()=>({...t,...e.props}))},Yue=Te({name:"ElTransferPanel"}),Xue=Te({...Yue,props:que,emits:Kue,setup(e,{expose:t,emit:n}){const r=e,o=Ga(),i=({option:w})=>w,{t:a}=Gr(),l=_t("transfer"),s=Qn({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),u=hg(r),{filteredData:c,checkedSummary:d,isIndeterminate:f,handleAllCheckedChange:p}=((w,x,_)=>{const E=hg(w),C=ee(()=>w.data.filter(F=>Ut(w.filterMethod)?w.filterMethod(x.query,F):String(F[E.value.label]||F[E.value.key]).toLowerCase().includes(x.query.toLowerCase()))),T=ee(()=>C.value.filter(F=>!F[E.value.disabled])),k=ee(()=>{const F=x.checked.length,N=w.data.length,{noChecked:B,hasChecked:L}=w.format;return B&&L?F>0?L.replace(/\${checked}/g,F.toString()).replace(/\${total}/g,N.toString()):B.replace(/\${total}/g,N.toString()):`${F}/${N}`}),I=ee(()=>{const F=x.checked.length;return F>0&&F<T.value.length}),O=()=>{const F=T.value.map(N=>N[E.value.key]);x.allChecked=F.length>0&&F.every(N=>x.checked.includes(N))};return Je(()=>x.checked,(F,N)=>{if(O(),x.checkChangeByUser){const B=F.concat(N).filter(L=>!F.includes(L)||!N.includes(L));_(lx,F,B)}else _(lx,F),x.checkChangeByUser=!0}),Je(T,()=>{O()}),Je(()=>w.data,()=>{const F=[],N=C.value.map(B=>B[E.value.key]);x.checked.forEach(B=>{N.includes(B)&&F.push(B)}),x.checkChangeByUser=!1,x.checked=F}),Je(()=>w.defaultChecked,(F,N)=>{if(N&&F.length===N.length&&F.every(V=>N.includes(V)))return;const B=[],L=T.value.map(V=>V[E.value.key]);F.forEach(V=>{L.includes(V)&&B.push(V)}),x.checkChangeByUser=!1,x.checked=B},{immediate:!0}),{filteredData:C,checkableData:T,checkedSummary:k,isIndeterminate:I,updateAllChecked:O,handleAllCheckedChange:F=>{x.checked=F?T.value.map(N=>N[E.value.key]):[]}}})(r,s,n),m=ee(()=>!cs(s.query)&&cs(c.value)),v=ee(()=>!cs(o.default()[0].children)),{checked:g,allChecked:b,query:y}=di(s);return t({query:y}),(w,x)=>(Y(),fe("div",{class:oe(M(l).b("panel"))},[ce("p",{class:oe(M(l).be("panel","header"))},[ie(M(bl),{modelValue:M(b),"onUpdate:modelValue":x[0]||(x[0]=_=>Jn(b)?b.value=_:null),indeterminate:M(f),"validate-event":!1,onChange:M(p)},{default:he(()=>[Dt(Ye(w.title)+" ",1),ce("span",null,Ye(M(d)),1)]),_:1},8,["modelValue","indeterminate","onChange"])],2),ce("div",{class:oe([M(l).be("panel","body"),M(l).is("with-footer",M(v))])},[w.filterable?(Y(),Pe(M(ua),{key:0,modelValue:M(y),"onUpdate:modelValue":x[1]||(x[1]=_=>Jn(y)?y.value=_:null),class:oe(M(l).be("panel","filter")),size:"default",placeholder:w.placeholder,"prefix-icon":M(zoe),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):Fe("v-if",!0),nn(ie(M(C3),{modelValue:M(g),"onUpdate:modelValue":x[2]||(x[2]=_=>Jn(g)?g.value=_:null),"validate-event":!1,class:oe([M(l).is("filterable",w.filterable),M(l).be("panel","list")])},{default:he(()=>[(Y(!0),fe(bt,null,bn(M(c),_=>(Y(),Pe(M(bl),{key:_[M(u).key],class:oe(M(l).be("panel","item")),value:_[M(u).key],disabled:_[M(u).disabled],"validate-event":!1},{default:he(()=>{var E;return[ie(i,{option:(E=w.optionRender)==null?void 0:E.call(w,_)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[$n,!M(m)&&!M(cs)(w.data)]]),nn(ce("p",{class:oe(M(l).be("panel","empty"))},Ye(M(m)?M(a)("el.transfer.noMatch"):M(a)("el.transfer.noData")),3),[[$n,M(m)||M(cs)(w.data)]])],2),M(v)?(Y(),fe("p",{key:0,class:oe(M(l).be("panel","footer"))},[ft(w.$slots,"default")],2)):Fe("v-if",!0)],2))}});var Que=Nt(Xue,[["__file","transfer-panel.vue"]]);const uze={key:0},cze={key:0},dze=Te({name:"ElTransfer"}),fze=Te({...dze,props:l1,emits:Gue,setup(e,{expose:t,emit:n}){const r=e,o=Ga(),{t:i}=Gr(),a=_t("transfer"),{formItem:l}=qa(),s=Qn({leftChecked:[],rightChecked:[]}),u=hg(r),{sourceData:c,targetData:d}=(C=>{const T=hg(C),k=ee(()=>C.data.reduce((I,O)=>(I[O[T.value.key]]=O)&&I,{}));return{sourceData:ee(()=>C.data.filter(I=>!C.modelValue.includes(I[T.value.key]))),targetData:ee(()=>C.targetOrder==="original"?C.data.filter(I=>C.modelValue.includes(I[T.value.key])):C.modelValue.reduce((I,O)=>{const F=k.value[O];return F&&I.push(F),I},[]))}})(r),{onSourceCheckedChange:f,onTargetCheckedChange:p}=((C,T)=>({onSourceCheckedChange:(k,I)=>{C.leftChecked=k,I&&T(FR,k,I)},onTargetCheckedChange:(k,I)=>{C.rightChecked=k,I&&T(RR,k,I)}}))(s,n),{addToLeft:m,addToRight:v}=((C,T,k)=>{const I=hg(C),O=(F,N,B)=>{k(xn,F),k(Xo,F,N,B)};return{addToLeft:()=>{const F=C.modelValue.slice();T.rightChecked.forEach(N=>{const B=F.indexOf(N);B>-1&&F.splice(B,1)}),O(F,"left",T.rightChecked)},addToRight:()=>{let F=C.modelValue.slice();const N=C.data.filter(B=>{const L=B[I.value.key];return T.leftChecked.includes(L)&&!C.modelValue.includes(L)}).map(B=>B[I.value.key]);F=C.targetOrder==="unshift"?N.concat(F):F.concat(N),C.targetOrder==="original"&&(F=C.data.filter(B=>F.includes(B[I.value.key])).map(B=>B[I.value.key])),O(F,"right",T.leftChecked)}}})(r,s,n),g=de(),b=de(),y=ee(()=>r.buttonTexts.length===2),w=ee(()=>r.titles[0]||i("el.transfer.titles.0")),x=ee(()=>r.titles[1]||i("el.transfer.titles.1")),_=ee(()=>r.filterPlaceholder||i("el.transfer.filterPlaceholder"));Je(()=>r.modelValue,()=>{var C;r.validateEvent&&((C=l==null?void 0:l.validate)==null||C.call(l,"change").catch(T=>{}))});const E=ee(()=>C=>r.renderContent?r.renderContent(pn,C):o.default?o.default({option:C}):pn("span",C[u.value.label]||C[u.value.key]));return t({clearQuery:C=>{switch(C){case"left":g.value.query="";break;case"right":b.value.query=""}},leftPanel:g,rightPanel:b}),(C,T)=>(Y(),fe("div",{class:oe(M(a).b())},[ie(Que,{ref_key:"leftPanel",ref:g,data:M(c),"option-render":M(E),placeholder:M(_),title:M(w),filterable:C.filterable,format:C.format,"filter-method":C.filterMethod,"default-checked":C.leftDefaultChecked,props:r.props,onCheckedChange:M(f)},{default:he(()=>[ft(C.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),ce("div",{class:oe(M(a).e("buttons"))},[ie(M(Sa),{type:"primary",class:oe([M(a).e("button"),M(a).is("with-texts",M(y))]),disabled:M(cs)(s.rightChecked),onClick:M(m)},{default:he(()=>[ie(M(Ft),null,{default:he(()=>[ie(M(m0))]),_:1}),M(Wi)(C.buttonTexts[0])?Fe("v-if",!0):(Y(),fe("span",uze,Ye(C.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),ie(M(Sa),{type:"primary",class:oe([M(a).e("button"),M(a).is("with-texts",M(y))]),disabled:M(cs)(s.leftChecked),onClick:M(v)},{default:he(()=>[M(Wi)(C.buttonTexts[1])?Fe("v-if",!0):(Y(),fe("span",cze,Ye(C.buttonTexts[1]),1)),ie(M(Ft),null,{default:he(()=>[ie(M(Su))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),ie(Que,{ref_key:"rightPanel",ref:b,data:M(d),"option-render":M(E),placeholder:M(_),filterable:C.filterable,format:C.format,"filter-method":C.filterMethod,title:M(x),"default-checked":C.rightDefaultChecked,props:r.props,onCheckedChange:M(p)},{default:he(()=>[ft(C.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});let s1,IR,sx,ux,cx,vg,a4;IQ=Cr(Nt(fze,[["__file","transfer.vue"]])),s1="$treeNodeId",IR=function(e,t){t&&!t[s1]&&Object.defineProperty(t,s1,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},sx=function(e,t){return e?t[e]:t[s1]},ux=(e,t,n)=>{const r=e.value.currentNode;n();const o=e.value.currentNode;r!==o&&t("current-change",o?o.data:null,o)},cx=e=>{let t=!0,n=!0,r=!0;for(let o=0,i=e.length;o<i;o++){const a=e[o];(a.checked!==!0||a.indeterminate)&&(t=!1,a.disabled||(r=!1)),(a.checked!==!1||a.indeterminate)&&(n=!1)}return{all:t,none:n,allWithoutDisable:r,half:!t&&!n}},vg=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:n,half:r}=cx(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):r?(e.checked=!1,e.indeterminate=!0):n&&(e.checked=!1,e.indeterminate=!1);const o=e.parent;o&&o.level!==0&&(e.store.checkStrictly||vg(o))},a4=function(e,t){const n=e.store.props,r=e.data||{},o=n[t];if(typeof o=="function")return o(r,e);if(typeof o=="string")return r[o];if(o===void 0){const i=r[t];return i===void 0?"":i}};let pze=0,BR=class QO{constructor(t){this.id=pze++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)Tn(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const n=t.props;if(n&&n.isLeaf!==void 0){const i=a4(this,"isLeaf");typeof i=="boolean"&&(this.isLeafByUser=i)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||IR(this,this.data),!this.data)return;const r=t.defaultExpandedKeys,o=t.key;o&&r&&r.includes(this.key)&&this.expand(null,t.autoExpandParent),o&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),!this.parent||this.level!==1&&this.parent.expanded!==!0||(this.canFocus=!0)}setData(t){let n;Array.isArray(t)||IR(this,t),this.data=t,this.childNodes=[],n=this.level===0&&Array.isArray(this.data)?this.data:a4(this,"children")||[];for(let r=0,o=n.length;r<o;r++)this.insertChild({data:n[r]})}get label(){return a4(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return a4(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(r=>r===t||n&&r.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,r){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof QO)){if(!r){const o=this.getChildren(!0);o.includes(t.data)||(n===void 0||n<0?o.push(t.data):o.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),(t=Qn(new QO(t)))instanceof QO&&t.initialize()}t.level=this.level+1,n===void 0||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let r;n&&(r=this.childNodes.indexOf(n)),this.insertChild(t,r)}insertAfter(t,n){let r;n&&(r=this.childNodes.indexOf(n),r!==-1&&(r+=1)),this.insertChild(t,r)}removeChild(t){const n=this.getChildren()||[],r=n.indexOf(t.data);r>-1&&n.splice(r,1);const o=this.childNodes.indexOf(t);o>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(o,1)),this.updateLeafState()}removeChildByData(t){let n=null;for(let r=0;r<this.childNodes.length;r++)if(this.childNodes[r].data===t){n=this.childNodes[r];break}n&&this.removeChild(n)}expand(t,n){const r=()=>{if(n){let o=this.parent;for(;o.level>0;)o.expanded=!0,o=o.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(o=>{o.canFocus=!0})};this.shouldLoadData()?this.loadData(o=>{Array.isArray(o)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||vg(this),r())}):r()}doCreateChildren(t,n={}){t.forEach(r=>{this.insertChild(Object.assign({data:r},n),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&this.isLeafByUser!==void 0)return void(this.isLeaf=this.isLeafByUser);const t=this.childNodes;!this.store.lazy||this.store.lazy===!0&&this.loaded===!0?this.isLeaf=!t||t.length===0:this.isLeaf=!1}setChecked(t,n,r,o){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!this.shouldLoadData()||this.store.checkDescendants){const{all:a,allWithoutDisable:l}=cx(this.childNodes);this.isLeaf||a||!l||(this.checked=!1,t=!1);const s=()=>{if(n){const u=this.childNodes;for(let f=0,p=u.length;f<p;f++){const m=u[f];o=o||t!==!1;const v=m.disabled?m.checked:o;m.setChecked(v,n,!0,o)}const{half:c,all:d}=cx(u);d||(this.checked=d,this.indeterminate=c)}};if(this.shouldLoadData())return void this.loadData(()=>{s(),vg(this)},{checked:t!==!1});s()}const i=this.parent;i&&i.level!==0&&(r||vg(i))}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const r=this.store.props;let o="children";return r&&(o=r.children||"children"),n[o]===void 0&&(n[o]=null),t&&!n[o]&&(n[o]=[]),n[o]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(i=>i.data),r={},o=[];t.forEach((i,a)=>{const l=i[s1];l&&n.findIndex(s=>s[s1]===l)>=0?r[l]={index:a,data:i}:o.push({index:a,data:i})}),this.store.lazy||n.forEach(i=>{r[i[s1]]||this.removeChildByData(i)}),o.forEach(({index:i,data:a})=>{this.insertChild({data:a},i)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy!==!0||!this.store.load||this.loaded||this.loading&&!Object.keys(n).length)t&&t.call(this);else{this.loading=!0;const r=i=>{this.childNodes=[],this.doCreateChildren(i,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,i)},o=()=>{this.loading=!1};this.store.load(this,r,o)}}eachNode(t){const n=[this];for(;n.length;){const r=n.shift();n.unshift(...r.childNodes),t(r)}}reInitChecked(){this.store.checkStrictly||vg(this)}};class hze{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const n in t)Tn(t,n)&&(this[n]=t[n]);this.nodesMap={}}initialize(){this.root=new BR({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load?(0,this.load)(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()}):this._initDefaultCheckedNodes()}filter(t){const n=this.filterNodeMethod,r=this.lazy,o=function(i){const a=i.root?i.root.childNodes:i.childNodes;if(a.forEach(l=>{l.visible=n.call(l,t,l.data,l),o(l)}),!i.visible&&a.length){let l=!0;l=!a.some(s=>s.visible),i.root?i.root.visible=l===!1:i.visible=l===!1}t&&i.visible&&!i.isLeaf&&(r&&!i.loaded||i.expand())};o(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof BR)return t;const n=wn(t)?sx(this.key,t):t;return this.nodesMap[n]||null}insertBefore(t,n){const r=this.getNode(n);r.parent.insertBefore({data:t},r)}insertAfter(t,n){const r=this.getNode(n);r.parent.insertAfter({data:t},r)}remove(t){const n=this.getNode(t);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(t,n){const r=Z0(n)?this.root:this.getNode(n);r&&r.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(r=>{const o=n[r];o&&o.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const n=this.key;t&&t.data&&(n?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){this.key&&t&&t.data&&(t.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,n=!1){const r=[],o=function(i){(i.root?i.root.childNodes:i.childNodes).forEach(a=>{(a.checked||n&&a.indeterminate)&&(!t||t&&a.isLeaf)&&r.push(a.data),o(a)})};return o(this),r}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const t=[],n=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(o=>{o.indeterminate&&t.push(o.data),n(o)})};return n(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],n=this.nodesMap;for(const r in n)Tn(n,r)&&t.push(n[r]);return t}updateChildren(t,n){const r=this.nodesMap[t];if(!r)return;const o=r.childNodes;for(let i=o.length-1;i>=0;i--){const a=o[i];this.remove(a.data)}for(let i=0,a=n.length;i<a;i++){const l=n[i];this.append(l,r.data)}}_setCheckedKeys(t,n=!1,r){const o=this._getAllNodes().sort((s,u)=>s.level-u.level),i=Object.create(null),a=Object.keys(r);o.forEach(s=>s.setChecked(!1,!1));const l=s=>{s.childNodes.forEach(u=>{var c;i[u.data[t]]=!0,(c=u.childNodes)!=null&&c.length&&l(u)})};for(let s=0,u=o.length;s<u;s++){const c=o[s],d=c.data[t].toString();if(a.includes(d)){if(c.childNodes.length&&l(c),c.isLeaf||this.checkStrictly)c.setChecked(!0,!1);else if(c.setChecked(!0,!0),n){c.setChecked(!1,!1);const f=function(p){p.childNodes.forEach(m=>{m.isLeaf||m.setChecked(!1,!1),f(m)})};f(c)}}else c.checked&&!i[d]&&c.setChecked(!1,!1)}}setCheckedNodes(t,n=!1){const r=this.key,o={};t.forEach(i=>{o[(i||{})[r]]=!0}),this._setCheckedKeys(r,n,o)}setCheckedKeys(t,n=!1){this.defaultCheckedKeys=t;const r=this.key,o={};t.forEach(i=>{o[i]=!0}),this._setCheckedKeys(r,n,o)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(n=>{const r=this.getNode(n);r&&r.expand(null,this.autoExpandParent)})}setChecked(t,n,r){const o=this.getNode(t);o&&o.setChecked(!!n,r)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,n=!0){const r=t[this.key],o=this.nodesMap[r];this.setCurrentNode(o),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,n=!0){if(t==null)return this.currentNode&&(this.currentNode.isCurrent=!1),void(this.currentNode=null);const r=this.getNode(t);r&&(this.setCurrentNode(r),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const vze=Te({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=_t("tree"),n=Rt("NodeInstance"),r=Rt("RootTree");return()=>{const o=e.node,{data:i,store:a}=o;return e.renderContent?e.renderContent(pn,{_self:n,node:o,data:i,store:a}):ft(r.ctx.slots,"default",{node:o,data:i},()=>[pn("span",{class:t.be("node","label")},[o.label])])}}});var mze=Nt(vze,[["__file","tree-node-content.vue"]]);function Jue(e){const t=Rt("TreeNodeMap",null),n={treeNodeExpand:r=>{e.node!==r&&e.node.collapse()},children:[]};return t&&t.children.push(n),qn("TreeNodeMap",n),{broadcastExpanded:r=>{if(e.accordion)for(const o of n.children)o.treeNodeExpand(r)}}}const Zue=Symbol("dragEvents"),gze=Te({name:"ElTreeNode",components:{ElCollapseTransition:UO,ElCheckbox:bl,NodeContent:mze,ElIcon:Ft,Loading:jd},props:{node:{type:BR,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const n=_t("tree"),{broadcastExpanded:r}=Jue(e),o=Rt("RootTree"),i=de(!1),a=de(!1),l=de(null),s=de(null),u=de(null),c=Rt(Zue),d=dn();qn("NodeInstance",d),e.node.expanded&&(i.value=!0,a.value=!0);const f=o.props.props.children||"children";Je(()=>{const g=e.node.data[f];return g&&[...g]},()=>{e.node.updateChildren()}),Je(()=>e.node.indeterminate,g=>{p(e.node.checked,g)}),Je(()=>e.node.checked,g=>{p(g,e.node.indeterminate)}),Je(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),Je(()=>e.node.expanded,g=>{St(()=>i.value=g),g&&(a.value=!0)});const p=(g,b)=>{l.value===g&&s.value===b||o.ctx.emit("check-change",e.node.data,g,b),l.value=g,s.value=b},m=()=>{e.node.isLeaf||(i.value?(o.ctx.emit("node-collapse",e.node.data,e.node,d),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,d)))},v=(g,b)=>{e.node.setChecked(b.target.checked,!o.props.checkStrictly),St(()=>{const y=o.store.value;o.ctx.emit("check",e.node.data,{checkedNodes:y.getCheckedNodes(),checkedKeys:y.getCheckedKeys(),halfCheckedNodes:y.getHalfCheckedNodes(),halfCheckedKeys:y.getHalfCheckedKeys()})})};return{ns:n,node$:u,tree:o,expanded:i,childNodeRendered:a,oldChecked:l,oldIndeterminate:s,getNodeKey:g=>sx(o.props.nodeKey,g.data),getNodeClass:g=>{const b=e.props.class;if(!b)return{};let y;if(Ut(b)){const{data:w}=g;y=b(w,g)}else y=b;return an(y)?{[y]:!0}:y},handleSelectChange:p,handleClick:g=>{ux(o.store,o.ctx.emit,()=>o.store.value.setCurrentNode(e.node)),o.currentNode.value=e.node,o.props.expandOnClickNode&&m(),o.props.checkOnClickNode&&!e.node.disabled&&v(null,{target:{checked:!e.node.checked}}),o.ctx.emit("node-click",e.node.data,e.node,d,g)},handleContextMenu:g=>{o.instance.vnode.props.onNodeContextmenu&&(g.stopPropagation(),g.preventDefault()),o.ctx.emit("node-contextmenu",g,e.node.data,e.node,d)},handleExpandIconClick:m,handleCheckChange:v,handleChildNodeExpand:(g,b,y)=>{r(b),o.ctx.emit("node-expand",g,b,y)},handleDragStart:g=>{o.props.draggable&&c.treeNodeDragStart({event:g,treeNode:e})},handleDragOver:g=>{g.preventDefault(),o.props.draggable&&c.treeNodeDragOver({event:g,treeNode:{$el:u.value,node:e.node}})},handleDrop:g=>{g.preventDefault()},handleDragEnd:g=>{o.props.draggable&&c.treeNodeDragEnd(g)},CaretRight:Moe}}}),yze=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],bze=["aria-expanded"],Aze=Te({name:"ElTree",components:{ElTreeNode:Nt(gze,[["render",function(e,t,n,r,o,i){const a=Qe("el-icon"),l=Qe("el-checkbox"),s=Qe("loading"),u=Qe("node-content"),c=Qe("el-tree-node"),d=Qe("el-collapse-transition");return nn((Y(),fe("div",{ref:"node$",class:oe([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=Gt((...f)=>e.handleClick&&e.handleClick(...f),["stop"])),onContextmenu:t[2]||(t[2]=(...f)=>e.handleContextMenu&&e.handleContextMenu(...f)),onDragstart:t[3]||(t[3]=Gt((...f)=>e.handleDragStart&&e.handleDragStart(...f),["stop"])),onDragover:t[4]||(t[4]=Gt((...f)=>e.handleDragOver&&e.handleDragOver(...f),["stop"])),onDragend:t[5]||(t[5]=Gt((...f)=>e.handleDragEnd&&e.handleDragEnd(...f),["stop"])),onDrop:t[6]||(t[6]=Gt((...f)=>e.handleDrop&&e.handleDrop(...f),["stop"]))},[ce("div",{class:oe(e.ns.be("node","content")),style:$t({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(Y(),Pe(a,{key:0,class:oe([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Gt(e.handleExpandIconClick,["stop"])},{default:he(()=>[(Y(),Pe(Hn(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):Fe("v-if",!0),e.showCheckbox?(Y(),Pe(l,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Gt(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):Fe("v-if",!0),e.node.loading?(Y(),Pe(a,{key:2,class:oe([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:he(()=>[ie(s)]),_:1},8,["class"])):Fe("v-if",!0),ie(u,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),ie(d,null,{default:he(()=>[!e.renderAfterExpand||e.childNodeRendered?nn((Y(),fe("div",{key:0,class:oe(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(Y(!0),fe(bt,null,bn(e.node.childNodes,f=>(Y(),Pe(c,{key:e.getNodeKey(f),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:f,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,bze)),[[$n,e.expanded]]):Fe("v-if",!0)]),_:1})],42,yze)),[[$n,e.node.visible]])}],["__file","tree-node.vue"]])},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:fi}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:n}=Gr(),r=_t("tree"),o=de(new hze({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));o.value.initialize();const i=de(o.value.root),a=de(null),l=de(null),s=de(null),{broadcastExpanded:u}=Jue(e),{dragState:c}=function({props:p,ctx:m,el$:v,dropIndicator$:g,store:b}){const y=_t("tree"),w=de({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return qn(Zue,{treeNodeDragStart:({event:x,treeNode:_})=>{if(typeof p.allowDrag=="function"&&!p.allowDrag(_.node))return x.preventDefault(),!1;x.dataTransfer.effectAllowed="move";try{x.dataTransfer.setData("text/plain","")}catch{}w.value.draggingNode=_,m.emit("node-drag-start",_.node,x)},treeNodeDragOver:({event:x,treeNode:_})=>{const E=_,C=w.value.dropNode;C&&C.node.id!==E.node.id&&xl(C.$el,y.is("drop-inner"));const T=w.value.draggingNode;if(!T||!E)return;let k=!0,I=!0,O=!0,F=!0;typeof p.allowDrop=="function"&&(k=p.allowDrop(T.node,E.node,"prev"),F=I=p.allowDrop(T.node,E.node,"inner"),O=p.allowDrop(T.node,E.node,"next")),x.dataTransfer.dropEffect=I||k||O?"move":"none",(k||I||O)&&(C==null?void 0:C.node.id)!==E.node.id&&(C&&m.emit("node-drag-leave",T.node,C.node,x),m.emit("node-drag-enter",T.node,E.node,x)),w.value.dropNode=k||I||O?E:null,E.node.nextSibling===T.node&&(O=!1),E.node.previousSibling===T.node&&(k=!1),E.node.contains(T.node,!1)&&(I=!1),(T.node===E.node||T.node.contains(E.node))&&(k=!1,I=!1,O=!1);const N=E.$el.querySelector(`.${y.be("node","content")}`).getBoundingClientRect(),B=v.value.getBoundingClientRect();let L;const V=k?I?.25:O?.45:1:-1,P=O?I?.75:k?.55:0:1;let H=-9999;const U=x.clientY-N.top;L=U<N.height*V?"before":U>N.height*P?"after":I?"inner":"none";const G=E.$el.querySelector(`.${y.be("node","expand-icon")}`).getBoundingClientRect(),z=g.value;L==="before"?H=G.top-B.top:L==="after"&&(H=G.bottom-B.top),z.style.top=`${H}px`,z.style.left=G.right-B.left+"px",L==="inner"?Ed(E.$el,y.is("drop-inner")):xl(E.$el,y.is("drop-inner")),w.value.showDropIndicator=L==="before"||L==="after",w.value.allowDrop=w.value.showDropIndicator||F,w.value.dropType=L,m.emit("node-drag-over",T.node,E.node,x)},treeNodeDragEnd:x=>{const{draggingNode:_,dropType:E,dropNode:C}=w.value;if(x.preventDefault(),x.dataTransfer.dropEffect="move",_&&C){const T={data:_.node.data};E!=="none"&&_.node.remove(),E==="before"?C.node.parent.insertBefore(T,C.node):E==="after"?C.node.parent.insertAfter(T,C.node):E==="inner"&&C.node.insertChild(T),E!=="none"&&(b.value.registerNode(T),b.value.key&&_.node.eachNode(k=>{var I;(I=b.value.nodesMap[k.data[b.value.key]])==null||I.setChecked(k.checked,!b.value.checkStrictly)})),xl(C.$el,y.is("drop-inner")),m.emit("node-drag-end",_.node,C.node,E,x),E!=="none"&&m.emit("node-drop",_.node,C.node,E,x)}_&&!C&&m.emit("node-drag-end",_.node,null,E,x),w.value.showDropIndicator=!1,w.value.draggingNode=null,w.value.dropNode=null,w.value.allowDrop=!0}}),{dragState:w}}({props:e,ctx:t,el$:l,dropIndicator$:s,store:o});(function({el$:p},m){const v=_t("tree"),g=Qo([]),b=Qo([]);yn(()=>{y()}),zs(()=>{g.value=Array.from(p.value.querySelectorAll("[role=treeitem]")),b.value=Array.from(p.value.querySelectorAll("input[type=checkbox]"))}),Je(b,w=>{w.forEach(x=>{x.setAttribute("tabindex","-1")})}),Yo(p,"keydown",w=>{const x=w.target;if(!x.className.includes(v.b("node")))return;const _=w.code;g.value=Array.from(p.value.querySelectorAll(`.${v.is("focusable")}[role=treeitem]`));const E=g.value.indexOf(x);let C;if([Xt.up,Xt.down].includes(_)){if(w.preventDefault(),_===Xt.up){C=E===-1?0:E!==0?E-1:g.value.length-1;const k=C;for(;!m.value.getNode(g.value[C].dataset.key).canFocus;){if(C--,C===k){C=-1;break}C<0&&(C=g.value.length-1)}}else{C=E===-1?0:E<g.value.length-1?E+1:0;const k=C;for(;!m.value.getNode(g.value[C].dataset.key).canFocus;){if(C++,C===k){C=-1;break}C>=g.value.length&&(C=0)}}C!==-1&&g.value[C].focus()}[Xt.left,Xt.right].includes(_)&&(w.preventDefault(),x.click());const T=x.querySelector('[type="checkbox"]');[Xt.enter,Xt.space].includes(_)&&T&&(w.preventDefault(),T.click())});const y=()=>{var w;g.value=Array.from(p.value.querySelectorAll(`.${v.is("focusable")}[role=treeitem]`)),b.value=Array.from(p.value.querySelectorAll("input[type=checkbox]"));const x=p.value.querySelectorAll(`.${v.is("checked")}[role=treeitem]`);x.length?x[0].setAttribute("tabindex","0"):(w=g.value[0])==null||w.setAttribute("tabindex","0")}})({el$:l},o);const d=ee(()=>{const{childNodes:p}=i.value;return!p||p.length===0||p.every(({visible:m})=>!m)});Je(()=>e.currentNodeKey,p=>{o.value.setCurrentNodeKey(p)}),Je(()=>e.defaultCheckedKeys,p=>{o.value.setDefaultCheckedKey(p)}),Je(()=>e.defaultExpandedKeys,p=>{o.value.setDefaultExpandedKeys(p)}),Je(()=>e.data,p=>{o.value.setData(p)},{deep:!0}),Je(()=>e.checkStrictly,p=>{o.value.checkStrictly=p});const f=()=>{const p=o.value.getCurrentNode();return p?p.data:null};return qn("RootTree",{ctx:t,props:e,store:o,root:i,currentNode:a,instance:dn()}),qn(Fc,void 0),{ns:r,store:o,root:i,currentNode:a,dragState:c,el$:l,dropIndicator$:s,isEmpty:d,filter:p=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");o.value.filter(p)},getNodeKey:p=>sx(e.nodeKey,p.data),getNodePath:p=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const m=o.value.getNode(p);if(!m)return[];const v=[m.data];let g=m.parent;for(;g&&g!==i.value;)v.push(g.data),g=g.parent;return v.reverse()},getCheckedNodes:(p,m)=>o.value.getCheckedNodes(p,m),getCheckedKeys:p=>o.value.getCheckedKeys(p),getCurrentNode:f,getCurrentKey:()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const p=f();return p?p[e.nodeKey]:null},setCheckedNodes:(p,m)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");o.value.setCheckedNodes(p,m)},setCheckedKeys:(p,m)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");o.value.setCheckedKeys(p,m)},setChecked:(p,m,v)=>{o.value.setChecked(p,m,v)},getHalfCheckedNodes:()=>o.value.getHalfCheckedNodes(),getHalfCheckedKeys:()=>o.value.getHalfCheckedKeys(),setCurrentNode:(p,m=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");ux(o,t.emit,()=>o.value.setUserCurrentNode(p,m))},setCurrentKey:(p,m=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");ux(o,t.emit,()=>o.value.setCurrentNodeKey(p,m))},t:n,getNode:p=>o.value.getNode(p),remove:p=>{o.value.remove(p)},append:(p,m)=>{o.value.append(p,m)},insertBefore:(p,m)=>{o.value.insertBefore(p,m)},insertAfter:(p,m)=>{o.value.insertAfter(p,m)},handleNodeExpand:(p,m,v)=>{u(m),t.emit("node-expand",p,m,v)},updateKeyChildren:(p,m)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");o.value.updateChildren(p,m)}}}});var dx=Nt(Aze,[["render",function(e,t,n,r,o,i){const a=Qe("el-tree-node");return Y(),fe("div",{ref:"el$",class:oe([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(Y(!0),fe(bt,null,bn(e.root.childNodes,l=>(Y(),Pe(a,{key:e.getNodeKey(l),node:l,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(Y(),fe("div",{key:0,class:oe(e.ns.e("empty-block"))},[ft(e.$slots,"empty",{},()=>{var l;return[ce("span",{class:oe(e.ns.e("empty-text"))},Ye((l=e.emptyText)!=null?l:e.t("el.tree.emptyText")),3)]})],2)):Fe("v-if",!0),nn(ce("div",{ref:"dropIndicator$",class:oe(e.ns.e("drop-indicator"))},null,2),[[$n,e.dragState.showDropIndicator]])],2)}],["__file","tree.vue"]]);dx.install=e=>{e.component(dx.name,dx)};let LR;$Q=dx,HO=$Q,LR=Symbol("uploadContextKey");class wze extends Error{constructor(t,n,r,o){super(t),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=o}}function ece(e,t,n){let r;return r=n.response?`${n.response.error||n.response}`:n.responseText?`${n.responseText}`:`fail to ${t.method} ${e} ${n.status}`,new wze(r,n.status,t.method,e)}const tce=["text","picture","picture-card"];let xze=1;const PR=()=>Date.now()+xze++,nce=Lt({action:{type:String,default:"#"},headers:{type:Object},method:{type:String,default:"post"},data:{type:[Object,Function,Promise],default:()=>({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Array,default:()=>[]},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:tce,default:"text"},httpRequest:{type:Function,default:e=>{typeof XMLHttpRequest>"u"&&Ka("ElUpload","XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",i=>{const a=i;a.percent=i.total>0?i.loaded/i.total*100:0,e.onProgress(a)});const r=new FormData;if(e.data)for(const[i,a]of Object.entries(e.data))mt(a)&&a.length?r.append(i,...a):r.append(i,a);r.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(ece(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(ece(n,e,t));e.onSuccess(function(i){const a=i.responseText||i.response;if(!a)return a;try{return JSON.parse(a)}catch{return a}}(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};if(o instanceof Headers)o.forEach((i,a)=>t.setRequestHeader(a,i));else for(const[i,a]of Object.entries(o))pa(a)||t.setRequestHeader(i,String(a));return t.send(r),t}},disabled:Boolean,limit:Number}),_ze=Lt({...nce,beforeUpload:{type:Function,default:fr},beforeRemove:{type:Function},onRemove:{type:Function,default:fr},onChange:{type:Function,default:fr},onPreview:{type:Function,default:fr},onSuccess:{type:Function,default:fr},onProgress:{type:Function,default:fr},onError:{type:Function,default:fr},onExceed:{type:Function,default:fr},crossorigin:{type:String}}),Eze=Lt({files:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},handlePreview:{type:Function,default:fr},listType:{type:String,values:tce,default:"text"},crossorigin:{type:String}}),Cze=["onKeydown"],Sze=["src","crossorigin"],kze=["onClick"],Dze=["title"],Oze=["onClick"],Tze=["onClick"],Mze=Te({name:"ElUploadList"}),Nze=Te({...Mze,props:Eze,emits:{remove:e=>!!e},setup(e,{emit:t}){const n=e,{t:r}=Gr(),o=_t("upload"),i=_t("icon"),a=_t("list"),l=wl(),s=de(!1),u=ee(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",n.disabled)]),c=d=>{t("remove",d)};return(d,f)=>(Y(),Pe(S3,{tag:"ul",class:oe(M(u)),name:M(a).b()},{default:he(()=>[(Y(!0),fe(bt,null,bn(d.files,p=>(Y(),fe("li",{key:p.uid||p.name,class:oe([M(o).be("list","item"),M(o).is(p.status),{focusing:s.value}]),tabindex:"0",onKeydown:Rr(m=>!M(l)&&c(p),["delete"]),onFocus:f[0]||(f[0]=m=>s.value=!0),onBlur:f[1]||(f[1]=m=>s.value=!1),onClick:f[2]||(f[2]=m=>s.value=!1)},[ft(d.$slots,"default",{file:p},()=>[d.listType==="picture"||p.status!=="uploading"&&d.listType==="picture-card"?(Y(),fe("img",{key:0,class:oe(M(o).be("list","item-thumbnail")),src:p.url,crossorigin:d.crossorigin,alt:""},null,10,Sze)):Fe("v-if",!0),p.status==="uploading"||d.listType!=="picture-card"?(Y(),fe("div",{key:1,class:oe(M(o).be("list","item-info"))},[ce("a",{class:oe(M(o).be("list","item-name")),onClick:Gt(m=>d.handlePreview(p),["prevent"])},[ie(M(Ft),{class:oe(M(i).m("document"))},{default:he(()=>[ie(M(Foe))]),_:1},8,["class"]),ce("span",{class:oe(M(o).be("list","item-file-name")),title:p.name},Ye(p.name),11,Dze)],10,kze),p.status==="uploading"?(Y(),Pe(M(wR),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:$t(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Fe("v-if",!0)],2)):Fe("v-if",!0),ce("label",{class:oe(M(o).be("list","item-status-label"))},[d.listType==="text"?(Y(),Pe(M(Ft),{key:0,class:oe([M(i).m("upload-success"),M(i).m("circle-check")])},{default:he(()=>[ie(M(h9))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(Y(),Pe(M(Ft),{key:1,class:oe([M(i).m("upload-success"),M(i).m("check")])},{default:he(()=>[ie(M(jb))]),_:1},8,["class"])):Fe("v-if",!0)],2),M(l)?Fe("v-if",!0):(Y(),Pe(M(Ft),{key:2,class:oe(M(i).m("close")),onClick:m=>c(p)},{default:he(()=>[ie(M(wc))]),_:2},1032,["class","onClick"])),Fe(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Fe(" This is a bug which needs to be fixed "),Fe(" TODO: Fix the incorrect navigation interaction "),M(l)?Fe("v-if",!0):(Y(),fe("i",{key:3,class:oe(M(i).m("close-tip"))},Ye(M(r)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(Y(),fe("span",{key:4,class:oe(M(o).be("list","item-actions"))},[ce("span",{class:oe(M(o).be("list","item-preview")),onClick:m=>d.handlePreview(p)},[ie(M(Ft),{class:oe(M(i).m("zoom-in"))},{default:he(()=>[ie(M(zN))]),_:1},8,["class"])],10,Oze),M(l)?Fe("v-if",!0):(Y(),fe("span",{key:0,class:oe(M(o).be("list","item-delete")),onClick:m=>c(p)},[ie(M(Ft),{class:oe(M(i).m("delete"))},{default:he(()=>[ie(M(Noe))]),_:1},8,["class"])],10,Tze))],2)):Fe("v-if",!0)])],42,Cze))),128)),ft(d.$slots,"append")]),_:3},8,["class","name"]))}});var rce=Nt(Nze,[["__file","upload-list.vue"]]);const Fze=Lt({disabled:{type:Boolean,default:!1}}),Rze={file:e=>mt(e)},Ize=["onDrop","onDragover"],oce="ElUploadDrag",Bze=Te({name:oce}),Lze=Te({...Bze,props:Fze,emits:Rze,setup(e,{emit:t}){Rt(LR)||Ka(oce,"usage: <el-upload><el-upload-dragger /></el-upload>");const n=_t("upload"),r=de(!1),o=wl(),i=l=>{if(o.value)return;r.value=!1,l.stopPropagation();const s=Array.from(l.dataTransfer.files);t("file",s)},a=()=>{o.value||(r.value=!0)};return(l,s)=>(Y(),fe("div",{class:oe([M(n).b("dragger"),M(n).is("dragover",r.value)]),onDrop:Gt(i,["prevent"]),onDragover:Gt(a,["prevent"]),onDragleave:s[0]||(s[0]=Gt(u=>r.value=!1,["prevent"]))},[ft(l.$slots,"default")],42,Ize))}});var Pze=Nt(Lze,[["__file","upload-dragger.vue"]]);const jze=Lt({...nce,beforeUpload:{type:Function,default:fr},onRemove:{type:Function,default:fr},onStart:{type:Function,default:fr},onSuccess:{type:Function,default:fr},onProgress:{type:Function,default:fr},onError:{type:Function,default:fr},onExceed:{type:Function,default:fr}}),Vze=["onKeydown"],zze=["name","multiple","accept"],Hze=Te({name:"ElUploadContent",inheritAttrs:!1}),$ze=Te({...Hze,props:jze,setup(e,{expose:t}){const n=e,r=_t("upload"),o=wl(),i=Qo({}),a=Qo(),l=p=>{if(p.length===0)return;const{autoUpload:m,limit:v,fileList:g,multiple:b,onStart:y,onExceed:w}=n;if(v&&g.length+p.length>v)w(p,g);else{b||(p=p.slice(0,1));for(const x of p){const _=x;_.uid=PR(),y(_),m&&s(_)}}},s=async p=>{if(a.value.value="",!n.beforeUpload)return u(p);let m,v={};try{const b=n.data,y=n.beforeUpload(p);v=Y3(n.data)?Mf(n.data):n.data,m=await y,Y3(n.data)&&ns(b,v)&&(v=Mf(n.data))}catch{m=!1}if(m===!1)return void n.onRemove(p);let g=p;m instanceof Blob&&(g=m instanceof File?m:new File([m],p.name,{type:p.type})),u(Object.assign(g,{uid:p.uid}),v)},u=async(p,m)=>{const{headers:v,data:g,method:b,withCredentials:y,name:w,action:x,onProgress:_,onSuccess:E,onError:C,httpRequest:T}=n;try{m=await(async(F,N)=>Ut(F)?F(N):F)(m??g,p)}catch{return void n.onRemove(p)}const{uid:k}=p,I={headers:v||{},withCredentials:y,file:p,data:m,method:b,filename:w,action:x,onProgress:F=>{_(F,p)},onSuccess:F=>{E(F,p),delete i.value[k]},onError:F=>{C(F,p),delete i.value[k]}},O=T(I);i.value[k]=O,O instanceof Promise&&O.then(I.onSuccess,I.onError)},c=p=>{const m=p.target.files;m&&l(Array.from(m))},d=()=>{o.value||(a.value.value="",a.value.click())},f=()=>{d()};return t({abort:p=>{const m=(v=i.value,Object.entries(v)).filter(p?([g])=>String(p.uid)===g:()=>!0);var v;m.forEach(([g,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete i.value[g]})},upload:s}),(p,m)=>(Y(),fe("div",{class:oe([M(r).b(),M(r).m(p.listType),M(r).is("drag",p.drag)]),tabindex:"0",onClick:d,onKeydown:Rr(Gt(f,["self"]),["enter","space"])},[p.drag?(Y(),Pe(Pze,{key:0,disabled:M(o),onFile:l},{default:he(()=>[ft(p.$slots,"default")]),_:3},8,["disabled"])):ft(p.$slots,"default",{key:1}),ce("input",{ref_key:"inputRef",ref:a,class:oe(M(r).e("input")),name:p.name,multiple:p.multiple,accept:p.accept,type:"file",onChange:c,onClick:m[0]||(m[0]=Gt(()=>{},["stop"]))},null,42,zze)],42,Vze))}});var ice=Nt($ze,[["__file","upload-content.vue"]]);const Uze="ElUpload",ace=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},Wze=(e,t)=>{const n=eFe(e,"fileList",0,{passive:!0}),r=i=>n.value.find(a=>a.uid===i.uid);function o(i){var a;(a=t.value)==null||a.abort(i)}return Je(()=>e.listType,i=>{i!=="picture-card"&&i!=="picture"||(n.value=n.value.map(a=>{const{raw:l,url:s}=a;if(!s&&l)try{a.url=URL.createObjectURL(l)}catch(u){e.onError(u,a,n.value)}return a}))}),Je(n,i=>{for(const a of i)a.uid||(a.uid=PR()),a.status||(a.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:o,clearFiles:function(i=["ready","uploading","success","fail"]){n.value=n.value.filter(a=>!i.includes(a.status))},handleError:(i,a)=>{const l=r(a);l&&(console.error(i),l.status="fail",n.value.splice(n.value.indexOf(l),1),e.onError(i,l,n.value),e.onChange(l,n.value))},handleProgress:(i,a)=>{const l=r(a);l&&(e.onProgress(i,l,n.value),l.status="uploading",l.percentage=Math.round(i.percent))},handleStart:i=>{pa(i.uid)&&(i.uid=PR());const a={name:i.name,percentage:0,status:"ready",size:i.size,raw:i,uid:i.uid};if(e.listType==="picture-card"||e.listType==="picture")try{a.url=URL.createObjectURL(i)}catch(l){l.message,e.onError(l,a,n.value)}n.value=[...n.value,a],e.onChange(a,n.value)},handleSuccess:(i,a)=>{const l=r(a);l&&(l.status="success",l.response=i,e.onSuccess(i,l,n.value),e.onChange(l,n.value))},handleRemove:async i=>{const a=i instanceof File?r(i):i;a||Ka(Uze,"file to be removed not found");const l=s=>{o(s);const u=n.value;u.splice(u.indexOf(s),1),e.onRemove(s,u),ace(s)};e.beforeRemove?await e.beforeRemove(a,n.value)!==!1&&l(a):l(a)},submit:function(){n.value.filter(({status:i})=>i==="ready").forEach(({raw:i})=>{var a;return i&&((a=t.value)==null?void 0:a.upload(i))})},revokeFileObjectURL:ace}},Gze=Te({name:"ElUpload"}),qze=Te({...Gze,props:_ze,setup(e,{expose:t}){const n=e,r=wl(),o=Qo(),{abort:i,submit:a,clearFiles:l,uploadFiles:s,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:p,revokeFileObjectURL:m}=Wze(n,o),v=ee(()=>n.listType==="picture-card"),g=ee(()=>({...n,fileList:s.value,onStart:u,onProgress:p,onSuccess:f,onError:c,onRemove:d}));return xo(()=>{s.value.forEach(m)}),qn(LR,{accept:dr(n,"accept")}),t({abort:i,submit:a,clearFiles:l,handleStart:u,handleRemove:d}),(b,y)=>(Y(),fe("div",null,[M(v)&&b.showFileList?(Y(),Pe(rce,{key:0,disabled:M(r),"list-type":b.listType,files:M(s),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:M(d)},Ff({append:he(()=>[ie(ice,Un({ref_key:"uploadRef",ref:o},M(g)),{default:he(()=>[b.$slots.trigger?ft(b.$slots,"trigger",{key:0}):Fe("v-if",!0),!b.$slots.trigger&&b.$slots.default?ft(b.$slots,"default",{key:1}):Fe("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:he(({file:w})=>[ft(b.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Fe("v-if",!0),!M(v)||M(v)&&!b.showFileList?(Y(),Pe(ice,Un({key:1,ref_key:"uploadRef",ref:o},M(g)),{default:he(()=>[b.$slots.trigger?ft(b.$slots,"trigger",{key:0}):Fe("v-if",!0),!b.$slots.trigger&&b.$slots.default?ft(b.$slots,"default",{key:1}):Fe("v-if",!0)]),_:3},16)):Fe("v-if",!0),b.$slots.trigger?ft(b.$slots,"default",{key:2}):Fe("v-if",!0),ft(b.$slots,"tip"),!M(v)&&b.showFileList?(Y(),Pe(rce,{key:3,disabled:M(r),"list-type":b.listType,files:M(s),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:M(d)},Ff({_:2},[b.$slots.file?{name:"default",fn:he(({file:w})=>[ft(b.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Fe("v-if",!0)]))}});Am=Cr(Nt(qze,[["__file","upload.vue"]]));function Kze(e){let t;const n=de(!1),r=Qn({...e,originalPosition:"",originalOverflow:"",visible:!1});function o(){var u,c;(c=(u=s.$el)==null?void 0:u.parentNode)==null||c.removeChild(s.$el)}function i(){if(!n.value)return;const u=r.parent;n.value=!1,u.vLoadingAddClassList=void 0,function(){const c=r.parent,d=s.ns;if(!c.vLoadingAddClassList){let f=c.getAttribute("loading-number");f=Number.parseInt(f)-1,f?c.setAttribute("loading-number",f.toString()):(xl(c,d.bm("parent","relative")),c.removeAttribute("loading-number")),xl(c,d.bm("parent","hidden"))}o(),l.unmount()}()}const a=Te({name:"ElLoading",setup(u,{expose:c}){const{ns:d,zIndex:f}=C9("loading");return c({ns:d,zIndex:f}),()=>{const p=r.spinner||r.svg,m=pn("svg",{class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50",...p?{innerHTML:p}:{}},[pn("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),v=r.text?pn("p",{class:d.b("text")},[r.text]):void 0;return pn(ca,{name:d.b("fade"),onAfterLeave:i},{default:he(()=>[nn(ie("div",{style:{backgroundColor:r.background||""},class:[d.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[pn("div",{class:d.b("spinner")},[m,v])]),[[$n,r.visible]])])})}}}),l=K7(a),s=l.mount(document.createElement("div"));return{...di(r),setText:function(u){r.text=u},removeElLoadingChild:o,close:function(){var u;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=window.setTimeout(i,400),r.visible=!1,(u=e.closed)==null||u.call(e))},handleAfterLeave:i,vm:s,get $el(){return s.$el}}}let fx,px,lce,sce,jR,l4,VR,zR,ma,uce,Qs,cce,dce,fce,pce,hce;px=function(e={}){if(!rr)return;const t=lce(e);if(t.fullscreen&&fx)return fx;const n=Kze({...t,closed:()=>{var o;(o=t.closed)==null||o.call(t),t.fullscreen&&(fx=void 0)}});sce(t,t.parent,n),jR(t,t.parent,n),t.parent.vLoadingAddClassList=()=>jR(t,t.parent,n);let r=t.parent.getAttribute("loading-number");return r=r?`${Number.parseInt(r)+1}`:"1",t.parent.setAttribute("loading-number",r),t.parent.appendChild(n.$el),St(()=>n.visible.value=t.visible),t.fullscreen&&(fx=n),n},lce=e=>{var t,n,r,o;let i;return i=an(e.target)?(t=document.querySelector(e.target))!=null?t:document.body:e.target||document.body,{parent:i===document.body||e.body?document.body:i,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:i===document.body&&((n=e.fullscreen)==null||n),lock:(r=e.lock)!=null&&r,customClass:e.customClass||"",visible:(o=e.visible)==null||o,target:i}},sce=async(e,t,n)=>{const{nextZIndex:r}=n.vm.zIndex||n.vm._.exposed.zIndex,o={};if(e.fullscreen)n.originalPosition.value=Pd(document.body,"position"),n.originalOverflow.value=Pd(document.body,"overflow"),o.zIndex=r();else if(e.parent===document.body){n.originalPosition.value=Pd(document.body,"position"),await St();for(const i of["top","left"]){const a=i==="top"?"scrollTop":"scrollLeft";o[i]=e.target.getBoundingClientRect()[i]+document.body[a]+document.documentElement[a]-Number.parseInt(Pd(document.body,`margin-${i}`),10)+"px"}for(const i of["height","width"])o[i]=`${e.target.getBoundingClientRect()[i]}px`}else n.originalPosition.value=Pd(t,"position");for(const[i,a]of Object.entries(o))n.$el.style[i]=a},jR=(e,t,n)=>{const r=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?xl(t,r.bm("parent","relative")):Ed(t,r.bm("parent","relative")),e.fullscreen&&e.lock?Ed(t,r.bm("parent","hidden")):xl(t,r.bm("parent","hidden"))},l4=Symbol("ElLoading"),VR=(e,t)=>{var n,r,o,i;const a=t.instance,l=d=>wn(t.value)?t.value[d]:void 0,s=d=>(f=>{const p=an(f)&&(a==null?void 0:a[f])||f;return p&&de(p)})(l(d)||e.getAttribute(`element-loading-${Za(d)}`)),u=(n=l("fullscreen"))!=null?n:t.modifiers.fullscreen,c={text:s("text"),svg:s("svg"),svgViewBox:s("svgViewBox"),spinner:s("spinner"),background:s("background"),customClass:s("customClass"),fullscreen:u,target:(r=l("target"))!=null?r:u?void 0:e,body:(o=l("body"))!=null?o:t.modifiers.body,lock:(i=l("lock"))!=null?i:t.modifiers.lock};e[l4]={options:c,instance:px(c)}},EO={mounted(e,t){t.value&&VR(e,t)},updated(e,t){const n=e[l4];t.oldValue!==t.value&&(t.value&&!t.oldValue?VR(e,t):t.value&&t.oldValue?wn(t.value)&&((r,o)=>{for(const i of Object.keys(o))Jn(o[i])&&(o[i].value=r[i])})(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[l4])==null||t.instance.close(),e[l4]=null}},gQ={install(e){e.directive("loading",EO),e.config.globalProperties.$loading=px},directive:EO,service:px},zR=["success","info","warning","error"],ma={customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:rr?document.body:void 0},uce=Lt({customClass:{type:String,default:ma.customClass},center:{type:Boolean,default:ma.center},dangerouslyUseHTMLString:{type:Boolean,default:ma.dangerouslyUseHTMLString},duration:{type:Number,default:ma.duration},icon:{type:fi,default:ma.icon},id:{type:String,default:ma.id},message:{type:[String,Object,Function],default:ma.message},onClose:{type:Function,default:ma.onClose},showClose:{type:Boolean,default:ma.showClose},type:{type:String,values:zR,default:ma.type},plain:{type:Boolean,default:ma.plain},offset:{type:Number,default:ma.offset},zIndex:{type:Number,default:ma.zIndex},grouping:{type:Boolean,default:ma.grouping},repeatNum:{type:Number,default:ma.repeatNum}}),Qs=x7([]),cce=e=>{const{prev:t}=(n=>{const r=Qs.findIndex(a=>a.id===n),o=Qs[r];let i;return r>0&&(i=Qs[r-1]),{current:o,prev:i}})(e);return t?t.vm.exposed.bottom.value:0},dce=["id"],fce=["innerHTML"],pce=Te({name:"ElMessage"}),hce=Te({...pce,props:uce,emits:{destroy:()=>!0},setup(e,{expose:t}){const n=e,{Close:r}=m9,{ns:o,zIndex:i}=C9("message"),{currentZIndex:a,nextZIndex:l}=i,s=de(),u=de(!1),c=de(0);let d;const f=ee(()=>n.type?n.type==="error"?"danger":n.type:"info"),p=ee(()=>{const E=n.type;return{[o.bm("icon",E)]:E&&Vd[E]}}),m=ee(()=>n.icon||Vd[n.type]||""),v=ee(()=>cce(n.id)),g=ee(()=>((E,C)=>Qs.findIndex(k=>k.id===E)>0?16:C)(n.id,n.offset)+v.value),b=ee(()=>c.value+g.value),y=ee(()=>({top:`${g.value}px`,zIndex:a.value}));function w(){n.duration!==0&&({stop:d}=I3(()=>{_()},n.duration))}function x(){d==null||d()}function _(){u.value=!1}return yn(()=>{w(),l(),u.value=!0}),Je(()=>n.repeatNum,()=>{x(),w()}),Yo(document,"keydown",function({code:E}){E===Xt.esc&&_()}),fa(s,()=>{c.value=s.value.getBoundingClientRect().height}),t({visible:u,bottom:b,close:_}),(E,C)=>(Y(),Pe(ca,{name:M(o).b("fade"),onBeforeLeave:E.onClose,onAfterLeave:C[0]||(C[0]=T=>E.$emit("destroy")),persisted:""},{default:he(()=>[nn(ce("div",{id:E.id,ref_key:"messageRef",ref:s,class:oe([M(o).b(),{[M(o).m(E.type)]:E.type},M(o).is("center",E.center),M(o).is("closable",E.showClose),M(o).is("plain",E.plain),E.customClass]),style:$t(M(y)),role:"alert",onMouseenter:x,onMouseleave:w},[E.repeatNum>1?(Y(),Pe(M(bQ),{key:0,value:E.repeatNum,type:M(f),class:oe(M(o).e("badge"))},null,8,["value","type","class"])):Fe("v-if",!0),M(m)?(Y(),Pe(M(Ft),{key:1,class:oe([M(o).e("icon"),M(p)])},{default:he(()=>[(Y(),Pe(Hn(M(m))))]),_:1},8,["class"])):Fe("v-if",!0),ft(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(Y(),fe(bt,{key:1},[Fe(" Caution here, message could've been compromised, never use user's input as message "),ce("p",{class:oe(M(o).e("content")),innerHTML:E.message},null,10,fce)],2112)):(Y(),fe("p",{key:0,class:oe(M(o).e("content"))},Ye(E.message),3))]),E.showClose?(Y(),Pe(M(Ft),{key:2,class:oe(M(o).e("closeBtn")),onClick:Gt(_,["stop"])},{default:he(()=>[ie(M(r))]),_:1},8,["class","onClick"])):Fe("v-if",!0)],46,dce),[[$n,u.value]])]),_:3},8,["name","onBeforeLeave"]))}});var Yze=Nt(hce,[["__file","message.vue"]]);let Xze=1;const vce=e=>{const t=!e||an(e)||oo(e)||Ut(e)?{message:e}:e,n={...ma,...t};if(n.appendTo){if(an(n.appendTo)){let r=document.querySelector(n.appendTo);$s(r)||(r=document.body),n.appendTo=r}}else n.appendTo=document.body;return n},Qze=({appendTo:e,...t},n)=>{const r="message_"+Xze++,o=t.onClose,i=document.createElement("div"),a={...t,id:r,onClose:()=>{o==null||o(),(d=>{const f=Qs.indexOf(d);if(f===-1)return;Qs.splice(f,1);const{handler:p}=d;p.close()})(c)},onDestroy:()=>{qs(null,i)}},l=ie(Yze,a,Ut(a.message)||oo(a.message)?{default:Ut(a.message)?a.message:()=>a.message}:null);l.appContext=n||mg._context,qs(l,i),e.appendChild(i.firstElementChild);const s=l.component,u={close:()=>{s.exposed.visible.value=!1}},c={id:r,vnode:l,vm:s,handler:u,props:l.component.props};return c},mg=(e={},t)=>{if(!rr)return{close:()=>{}};if(Kn(fF.max)&&Qs.length>=fF.max)return{close:()=>{}};const n=vce(e);if(n.grouping&&Qs.length){const o=Qs.find(({vnode:i})=>{var a;return((a=i.props)==null?void 0:a.message)===n.message});if(o)return o.props.repeatNum+=1,o.props.type=n.type,o.handler}const r=Qze(n,t);return Qs.push(r),r.handler};zR.forEach(e=>{mg[e]=(t={},n)=>{const r=vce(t);return mg({...r,type:e},n)}}),mg.closeAll=function(e){for(const t of Qs)e&&e!==t.props.type||t.handler.close()},mg._context=null;let mce,gce,yce,bce;El=UN(mg,"$message"),mce=Te({name:"ElMessageBox",directives:{TrapFocus:Qae},components:{ElButton:Sa,ElFocusTrap:$w,ElInput:ua,ElOverlay:WO,ElIcon:Ft,...m9},inheritAttrs:!1,props:{buttonSize:{type:String,validator:WN},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:r,ns:o,size:i}=C9("message-box",ee(()=>e.buttonSize)),{t:a}=n,{nextZIndex:l}=r,s=de(!1),u=Qn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:l()}),c=ee(()=>{const B=u.type;return{[o.bm("icon",B)]:B&&Vd[B]}}),d=Zl(),f=Zl(),p=ee(()=>u.icon||Vd[u.type]||""),m=ee(()=>!!u.message),v=de(),g=de(),b=de(),y=de(),w=de(),x=ee(()=>u.confirmButtonClass);Je(()=>u.inputValue,async B=>{await St(),e.boxType==="prompt"&&B!==null&&O()},{immediate:!0}),Je(()=>s.value,B=>{var L,V;B&&(e.boxType!=="prompt"&&(u.autofocus?b.value=(V=(L=w.value)==null?void 0:L.$el)!=null?V:v.value:b.value=v.value),u.zIndex=l()),e.boxType==="prompt"&&(B?St().then(()=>{var P;y.value&&y.value.$el&&(u.autofocus?b.value=(P=F())!=null?P:v.value:b.value=v.value)}):(u.editorErrorMessage="",u.validateError=!1))});const _=ee(()=>e.draggable),E=ee(()=>e.overflow);function C(){s.value&&(s.value=!1,St(()=>{u.action&&t("action",u.action)}))}qN(v,g,_,E),yn(async()=>{await St(),e.closeOnHashChange&&window.addEventListener("hashchange",C)}),xo(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",C)});const T=()=>{e.closeOnClickModal&&I(u.distinguishCancelAndClose?"close":"cancel")},k=sF(T),I=B=>{var L;(e.boxType!=="prompt"||B!=="confirm"||O())&&(u.action=B,u.beforeClose?(L=u.beforeClose)==null||L.call(u,B,u,C):C())},O=()=>{if(e.boxType==="prompt"){const B=u.inputPattern;if(B&&!B.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const L=u.inputValidator;if(typeof L=="function"){const V=L(u.inputValue);if(V===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(typeof V=="string")return u.editorErrorMessage=V,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},F=()=>{const B=y.value.$refs;return B.input||B.textarea},N=()=>{I("close")};return e.lockScroll&&XN(s),{...di(u),ns:o,overlayEvent:k,visible:s,hasMessage:m,typeClass:c,contentId:d,inputId:f,btnSize:i,iconComponent:p,confirmButtonClasses:x,rootRef:v,focusStartRef:b,headerRef:g,inputRef:y,confirmRef:w,doClose:C,handleClose:N,onCloseRequested:()=>{e.closeOnPressEscape&&N()},handleWrapperClick:T,handleInputEnter:B=>{if(u.inputType!=="textarea")return B.preventDefault(),I("confirm")},handleAction:I,t:a}}}),gce=["aria-label","aria-describedby"],yce=["aria-label"],bce=["id"];var Jze=Nt(mce,[["render",function(e,t,n,r,o,i){const a=Qe("el-icon"),l=Qe("close"),s=Qe("el-input"),u=Qe("el-button"),c=Qe("el-focus-trap"),d=Qe("el-overlay");return Y(),Pe(ca,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:he(()=>[nn(ie(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:he(()=>[ce("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:oe(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[ie(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:he(()=>[ce("div",{ref:"rootRef",class:oe([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:$t(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Gt(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(Y(),fe("div",{key:0,ref:"headerRef",class:oe([e.ns.e("header"),{"show-close":e.showClose}])},[ce("div",{class:oe(e.ns.e("title"))},[e.iconComponent&&e.center?(Y(),Pe(a,{key:0,class:oe([e.ns.e("status"),e.typeClass])},{default:he(()=>[(Y(),Pe(Hn(e.iconComponent)))]),_:1},8,["class"])):Fe("v-if",!0),ce("span",null,Ye(e.title),1)],2),e.showClose?(Y(),fe("button",{key:0,type:"button",class:oe(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Rr(Gt(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[ie(a,{class:oe(e.ns.e("close"))},{default:he(()=>[ie(l)]),_:1},8,["class"])],42,yce)):Fe("v-if",!0)],2)):Fe("v-if",!0),ce("div",{id:e.contentId,class:oe(e.ns.e("content"))},[ce("div",{class:oe(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(Y(),Pe(a,{key:0,class:oe([e.ns.e("status"),e.typeClass])},{default:he(()=>[(Y(),Pe(Hn(e.iconComponent)))]),_:1},8,["class"])):Fe("v-if",!0),e.hasMessage?(Y(),fe("div",{key:1,class:oe(e.ns.e("message"))},[ft(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(Y(),Pe(Hn(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(Y(),Pe(Hn(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:he(()=>[Dt(Ye(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):Fe("v-if",!0)],2),nn(ce("div",{class:oe(e.ns.e("input"))},[ie(s,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:oe({invalid:e.validateError}),onKeydown:Rr(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),ce("div",{class:oe(e.ns.e("errormsg")),style:$t({visibility:e.editorErrorMessage?"visible":"hidden"})},Ye(e.editorErrorMessage),7)],2),[[$n,e.showInput]])],10,bce),ce("div",{class:oe(e.ns.e("btns"))},[e.showCancelButton?(Y(),Pe(u,{key:0,loading:e.cancelButtonLoading,class:oe([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Rr(Gt(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:he(()=>[Dt(Ye(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):Fe("v-if",!0),nn(ie(u,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:oe([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Rr(Gt(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:he(()=>[Dt(Ye(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[$n,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,gce)]),_:3},8,["z-index","overlay-class","mask"]),[[$n,e.visible]])]),_:3})}],["__file","index.vue"]]);const s4=new Map,Zze=(e,t,n=null)=>{const r=ie(Jze,e,Ut(e.message)||oo(e.message)?{default:Ut(e.message)?e.message:()=>e.message}:null);return r.appContext=n,qs(r,t),(o=>{let i=document.body;return o.appendTo&&(an(o.appendTo)&&(i=document.querySelector(o.appendTo)),$s(o.appendTo)&&(i=o.appendTo),$s(i)||(i=document.body)),i})(e).appendChild(t.firstElementChild),r.component},eHe=(e,t)=>{const n=document.createElement("div");e.onVanish=()=>{qs(null,n),s4.delete(o)},e.onAction=i=>{const a=s4.get(o);let l;l=e.showInput?{value:o.inputValue,action:i}:i,e.callback?e.callback(l,r.proxy):i==="cancel"||i==="close"?e.distinguishCancelAndClose&&i!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(l)};const r=Zze(e,n,t),o=r.proxy;for(const i in e)Tn(e,i)&&!Tn(o.$props,i)&&(o[i]=e[i]);return o.visible=!0,o};function gg(e,t=null){if(!rr)return Promise.reject();let n;return an(e)||oo(e)?e={message:e}:n=e.callback,new Promise((r,o)=>{const i=eHe(e,t??gg._context);s4.set(i,{options:e,callback:n,resolve:r,reject:o})})}const tHe={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};["alert","confirm","prompt"].forEach(e=>{gg[e]=function(t){return(n,r,o,i)=>{let a="";return wn(r)?(o=r,a=""):a=Wi(r)?"":r,gg(Object.assign({title:a,message:n,type:"",...tHe[t]},o,{boxType:t}),i)}}(e)}),gg.close=()=>{s4.forEach((e,t)=>{t.doClose()}),s4.clear()},gg._context=null;const up=gg;up.install=e=>{up._context=e._context,e.config.globalProperties.$msgbox=up,e.config.globalProperties.$messageBox=up,e.config.globalProperties.$alert=up.alert,e.config.globalProperties.$confirm=up.confirm,e.config.globalProperties.$prompt=up.prompt};let HR,Ace,wce,xce,_ce,Ece,Cce,Sce;gc=up,HR=["success","info","warning","error"],Ace=Lt({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:fi},id:{type:String,default:""},message:{type:[String,Object],default:""},offset:{type:Number,default:0},onClick:{type:Function,default:()=>{}},onClose:{type:Function,required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...HR,""],default:""},zIndex:Number}),wce=["id"],xce=["textContent"],_ce={key:0},Ece=["innerHTML"],Cce=Te({name:"ElNotification"}),Sce=Te({...Cce,props:Ace,emits:{destroy:()=>!0},setup(e,{expose:t}){const n=e,{ns:r,zIndex:o}=C9("notification"),{nextZIndex:i,currentZIndex:a}=o,{Close:l}=$N,s=de(!1);let u;const c=ee(()=>{const y=n.type;return y&&Vd[n.type]?r.m(y):""}),d=ee(()=>n.type&&Vd[n.type]||n.icon),f=ee(()=>n.position.endsWith("right")?"right":"left"),p=ee(()=>n.position.startsWith("top")?"top":"bottom"),m=ee(()=>{var y;return{[p.value]:`${n.offset}px`,zIndex:(y=n.zIndex)!=null?y:a.value}});function v(){n.duration>0&&({stop:u}=I3(()=>{s.value&&b()},n.duration))}function g(){u==null||u()}function b(){s.value=!1}return yn(()=>{v(),i(),s.value=!0}),Yo(document,"keydown",function({code:y}){y===Xt.delete||y===Xt.backspace?g():y===Xt.esc?s.value&&b():v()}),t({visible:s,close:b}),(y,w)=>(Y(),Pe(ca,{name:M(r).b("fade"),onBeforeLeave:y.onClose,onAfterLeave:w[1]||(w[1]=x=>y.$emit("destroy")),persisted:""},{default:he(()=>[nn(ce("div",{id:y.id,class:oe([M(r).b(),y.customClass,M(f)]),style:$t(M(m)),role:"alert",onMouseenter:g,onMouseleave:v,onClick:w[0]||(w[0]=(...x)=>y.onClick&&y.onClick(...x))},[M(d)?(Y(),Pe(M(Ft),{key:0,class:oe([M(r).e("icon"),M(c)])},{default:he(()=>[(Y(),Pe(Hn(M(d))))]),_:1},8,["class"])):Fe("v-if",!0),ce("div",{class:oe(M(r).e("group"))},[ce("h2",{class:oe(M(r).e("title")),textContent:Ye(y.title)},null,10,xce),nn(ce("div",{class:oe(M(r).e("content")),style:$t(y.title?void 0:{margin:0})},[ft(y.$slots,"default",{},()=>[y.dangerouslyUseHTMLString?(Y(),fe(bt,{key:1},[Fe(" Caution here, message could've been compromised, never use user's input as message "),ce("p",{innerHTML:y.message},null,8,Ece)],2112)):(Y(),fe("p",_ce,Ye(y.message),1))])],6),[[$n,y.message]]),y.showClose?(Y(),Pe(M(Ft),{key:0,class:oe(M(r).e("closeBtn")),onClick:Gt(b,["stop"])},{default:he(()=>[ie(M(l))]),_:1},8,["class","onClick"])):Fe("v-if",!0)],2)],46,wce),[[$n,s.value]])]),_:3},8,["name","onBeforeLeave"]))}});var nHe=Nt(Sce,[["__file","notification.vue"]]);const hx={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let rHe=1;const yg=function(e={},t=null){if(!rr)return{close:()=>{}};(typeof e=="string"||oo(e))&&(e={message:e});const n=e.position||"top-right";let r=e.offset||0;hx[n].forEach(({vm:c})=>{var d;r+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+16}),r+=16;const o="notification_"+rHe++,i=e.onClose,a={...e,offset:r,id:o,onClose:()=>{(function(c,d,f){const p=hx[d],m=p.findIndex(({vm:w})=>{var x;return((x=w.component)==null?void 0:x.props.id)===c});if(m===-1)return;const{vm:v}=p[m];if(!v)return;f==null||f(v);const g=v.el.offsetHeight,b=d.split("-")[0];p.splice(m,1);const y=p.length;if(!(y<1))for(let w=m;w<y;w++){const{el:x,component:_}=p[w].vm,E=Number.parseInt(x.style[b],10)-g-16;_.props.offset=E}})(o,n,i)}};let l=document.body;$s(e.appendTo)?l=e.appendTo:an(e.appendTo)&&(l=document.querySelector(e.appendTo)),$s(l)||(l=document.body);const s=document.createElement("div"),u=ie(nHe,a,oo(a.message)?{default:()=>a.message}:null);return u.appContext=t??yg._context,u.props.onDestroy=()=>{qs(null,s)},qs(u,s),hx[n].push({vm:u}),l.appendChild(s.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};HR.forEach(e=>{yg[e]=(t={})=>((typeof t=="string"||oo(t))&&(t={message:t}),yg({...t,type:e}))}),yg.closeAll=function(){for(const e of Object.values(hx))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})},yg._context=null;const $d=UN(yg,"$notify");function kce(e){return Object.prototype.toString.call(e)==="[object Object]"}function u4(){return u4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u4.apply(this,arguments)}function Dce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const oHe={silent:!1,logLevel:"warn"},iHe=["validator"],Oce=Object.prototype,Tce=Oce.toString,aHe=Oce.hasOwnProperty,Mce=/^\s*function (\w+)/;function Nce(e){var t;const n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){const r=n.toString().match(Mce);return r?r[1]:""}return""}const u1=function(e){var t,n;return kce(e)!==!1&&((t=e.constructor)===void 0||kce(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1)};let vi=function(){};const bg=(e,t)=>aHe.call(e,t),lHe=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Ag=Array.isArray||function(e){return Tce.call(e)==="[object Array]"},wg=e=>Tce.call(e)==="[object Function]",vx=(e,t)=>u1(e)&&bg(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),Fce=e=>u1(e)&&(bg(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>bg(e,t)));function $R(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function c1(e,t,n=!1){let r,o=!0,i="";r=u1(e)?e:{type:e};const a=vx(r)?r._vueTypes_name+" - ":"";if(Fce(r)&&r.type!==null){if(r.type===void 0||r.type===!0||!r.required&&t==null)return o;Ag(r.type)?(o=r.type.some(l=>c1(l,t,!0)===!0),i=r.type.map(l=>Nce(l)).join(" or ")):(i=Nce(r),o=i==="Array"?Ag(t):i==="Object"?u1(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(l){if(l==null)return"";const s=l.constructor.toString().match(Mce);return s?s[1].replace(/^Async/,""):""}(t)===i:t instanceof r.type)}if(!o){const l=`${a}value "${t}" should be of type "${i}"`;return n===!1?(vi(l),!1):l}if(bg(r,"validator")&&wg(r.validator)){const l=vi,s=[];if(vi=u=>{s.push(u)},o=r.validator(t),vi=l,!o){const u=(s.length>1?"* ":"")+s.join(` |
|
37 |
* `);return s.length=0,n===!1?(vi(u),o):u}}return o}function vs(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(o){return o===void 0?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(bg(this,"default")&&delete this.default,this):wg(o)||c1(this,o,!0)===!0?(this.default=Ag(o)?()=>[...o]:u1(o)?()=>Object.assign({},o):o,this):(vi(`${this._vueTypes_name} - invalid default value: "${o}"`),this)}}}),{validator:r}=n;return wg(r)&&(n.validator=$R(r,n)),n}function Pu(e,t){const n=vs(e,t);return Object.defineProperty(n,"validate",{value(r){return wg(this.validator)&&vi(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info: |
|
38 |
${JSON.stringify(this)}`),this.validator=$R(r,this),this}})}function Rce(e,t,n){const r=function(s){const u={};return Object.getOwnPropertyNames(s).forEach(c=>{u[c]=Object.getOwnPropertyDescriptor(s,c)}),Object.defineProperties({},u)}(t);if(r._vueTypes_name=e,!u1(n))return r;const{validator:o}=n,i=Dce(n,iHe);if(wg(o)){let{validator:s}=r;s&&(s=(l=(a=s).__original)!==null&&l!==void 0?l:a),r.validator=$R(s?function(u){return s.call(this,u)&&o.call(this,u)}:o,r)}var a,l;return Object.assign(r,i)}function mx(e){return e.replace(/^(?!\s*$)/gm," ")}const Ice=()=>Pu("boolean",{type:Boolean});function sHe(e,t="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return vs(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||vi(`${this._vueTypes_name} - ${t}`),r}})}function uHe(e){if(!Ag(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map(r=>typeof r=="symbol"?r.toString():r).join('", "')}".`,n={validator(r){const o=e.indexOf(r)!==-1;return o||vi(t),o}};if(e.indexOf(null)===-1){const r=e.reduce((o,i)=>{if(i!=null){const a=i.constructor;o.indexOf(a)===-1&&o.push(a)}return o},[]);r.length>0&&(n.type=r)}return vs("oneOf",n)}function cHe(e){if(!Ag(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,r=[];for(let i=0;i<e.length;i+=1){const a=e[i];if(Fce(a)){if(wg(a.validator)&&(t=!0),vx(a,"oneOf")&&a.type){r=r.concat(a.type);continue}if(vx(a,"nullable")){n=!0;continue}if(a.type===!0||!a.type){vi('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(a.type)}else r.push(a)}r=r.filter((i,a)=>r.indexOf(i)===a);const o=n===!1&&r.length>0?r:null;return vs("oneOfType",t?{type:o,validator(i){const a=[],l=e.some(s=>{const u=c1(s,i,!0);return typeof u=="string"&&a.push(u),u===!0});return l||vi(`oneOfType - provided value does not match any of the ${a.length} passed-in validators: |
|
39 |
${mx(a.join(` |
|
40 |
`))}`),l}}:{type:o})}function dHe(e){return vs("arrayOf",{type:Array,validator(t){let n="";const r=t.every(o=>(n=c1(e,o,!0),n===!0));return r||vi(`arrayOf - value validation error: |
|
41 |
${mx(n)}`),r}})}function fHe(e){return vs("instanceOf",{type:e})}function pHe(e){return vs("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(o=>(n=c1(e,t[o],!0),n===!0));return r||vi(`objectOf - value validation error: |
|
42 |
${mx(n)}`),r}})}function hHe(e){const t=Object.keys(e),n=t.filter(o=>{var i;return!((i=e[o])===null||i===void 0||!i.required)}),r=vs("shape",{type:Object,validator(o){if(!u1(o))return!1;const i=Object.keys(o);if(n.length>0&&n.some(a=>i.indexOf(a)===-1)){const a=n.filter(l=>i.indexOf(l)===-1);return vi(a.length===1?`shape - required property "${a[0]}" is not defined.`:`shape - required properties "${a.join('", "')}" are not defined.`),!1}return i.every(a=>{if(t.indexOf(a)===-1)return this._vueTypes_isLoose===!0||(vi(`shape - shape definition does not include a "${a}" property. Allowed keys: "${t.join('", "')}".`),!1);const l=c1(e[a],o[a],!0);return typeof l=="string"&&vi(`shape - "${a}" property validation error: |
|
43 |
${mx(l)}`),l===!0})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const vHe=["name","validate","getter"],mHe=(e=>((e=class{static get any(){return Pu("any",{})}static get func(){return Pu("function",{type:Function}).def(this.defaults.func)}static get bool(){return this.defaults.bool===void 0?Ice():Ice().def(this.defaults.bool)}static get string(){return Pu("string",{type:String}).def(this.defaults.string)}static get number(){return Pu("number",{type:Number}).def(this.defaults.number)}static get array(){return Pu("array",{type:Array}).def(this.defaults.array)}static get object(){return Pu("object",{type:Object}).def(this.defaults.object)}static get integer(){return vs("integer",{type:Number,validator(t){const n=lHe(t);return n===!1&&vi(`integer - "${t}" is not an integer`),n}}).def(this.defaults.integer)}static get symbol(){return vs("symbol",{validator(t){const n=typeof t=="symbol";return n===!1&&vi(`symbol - invalid value "${t}"`),n}})}static get nullable(){return Object.defineProperty({type:null,validator(t){const n=t===null;return n===!1&&vi("nullable - value should be null"),n}},"_vueTypes_name",{value:"nullable"})}static extend(t){if(vi("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),Ag(t))return t.forEach(s=>this.extend(s)),this;const{name:n,validate:r=!1,getter:o=!1}=t,i=Dce(t,vHe);if(bg(this,n))throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);const{type:a}=i;if(vx(a))return delete i.type,Object.defineProperty(this,n,o?{get:()=>Rce(n,a,i)}:{value(...s){const u=Rce(n,a,i);return u.validator&&(u.validator=u.validator.bind(u,...s)),u}});let l;return l=o?{get(){const s=Object.assign({},i);return r?Pu(n,s):vs(n,s)},enumerable:!0}:{value(...s){const u=Object.assign({},i);let c;return c=r?Pu(n,u):vs(n,u),u.validator&&(c.validator=u.validator.bind(c,...s)),c},enumerable:!0},Object.defineProperty(this,n,l)}}).defaults={},e.sensibleDefaults=void 0,e.config=oHe,e.custom=sHe,e.oneOf=uHe,e.instanceOf=fHe,e.oneOfType=cHe,e.arrayOf=dHe,e.objectOf=pHe,e.shape=hHe,e.utils={validate:(t,n)=>c1(n,t,!0)===!0,toType:(t,n,r=!1)=>r?Pu(t,n):vs(t,n)},e))();function Bce(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;return(t=class extends mHe{static get sensibleDefaults(){return u4({},this.defaults)}static set sensibleDefaults(n){this.defaults=n!==!1?u4({},n!==!0?n:e):{}}}).defaults=u4({},e),t}Bce();const gHe=Bce({func:void 0,bool:void 0,string:void 0,number:void 0,object:void 0,integer:void 0});Xn=class extends gHe{static get style(){return Pu("style",{type:[String,Object]})}};let Lce,Pce,jce,Vce,zce;Lce={namespace:"v",elNamespace:"el"},Dw=()=>{const e=Lce;return{variables:e,getPrefixCls:t=>`${e.namespace}-${t}`}},Pce=["xlink:href"],jce=["data-icon"],mm=Te({name:"Icon",__name:"Icon",props:{icon:Xn.string,color:Xn.string,size:Xn.number.def(16),svgClass:Xn.string.def("")},setup(e){const{getPrefixCls:t}=Dw(),n=t("icon"),r=e,o=de(null),i=ee(()=>{var u;return(u=r.icon)==null?void 0:u.startsWith("svg-icon:")}),a=ee(()=>M(i)?`#icon-${r.icon.split("svg-icon:")[1]}`:r.icon),l=ee(()=>{const{color:u,size:c}=r;return{fontSize:`${c}px`,height:"1em",color:u}}),s=ee(()=>{const{svgClass:u}=r;return`iconify ${u}`});return Je(()=>r.icon,u=>{(async c=>{if(M(i))return;const d=M(o);if(!d||(await St(),!c))return;const f=XJ.renderSVG(c,{});if(f)d.textContent="",d.appendChild(f);else{const p=document.createElement("span");p.className="iconify",p.dataset.icon=c,d.textContent="",d.appendChild(p)}})(u)}),(u,c)=>{const d=Ft;return Y(),Pe(d,{class:oe(M(n)),color:e.color,size:e.size},{default:he(()=>[M(i)?(Y(),fe("svg",{key:0,class:oe(M(s)),"aria-hidden":"true"},[ce("use",{"xlink:href":M(a)},null,8,Pce)],2)):(Y(),fe("span",{key:1,ref_key:"elRef",ref:o,class:oe(u.$attrs.class),style:$t(M(l))},[ce("span",{class:oe(M(s)),"data-icon":M(a)},null,10,jce)],6))]),_:1},8,["class","color","size"])}}}),Ew=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Vce=[gQ],zce=[wd,Sa];function Hce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hce(Object(n),!0).forEach(function(r){Xi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hce(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ga(e){return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gx(e){return gx=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gx(e)}function UR(e,t){return UR=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},UR(e,t)}function yHe(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function bHe(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=gx(e);if(t){var o=gx(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yHe(this,n)}}function xr(e){return function(t){if(Array.isArray(t))return WR(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return WR(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WR(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. |
|
44 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function WR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yx(e,t){return Object.keys(e).reduce(function(n,r){return t&&t.indexOf(r)!==-1||n.push(e[r]),n},[])}function Fl(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}var AHe=Te({name:"fcCheckbox",inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:Array,default:function(){return[]}},type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup:function(e,t){var n=dr(e.formCreateInject,"options",[]),r=dr(e,"modelValue"),o=dr(e,"inputValue",""),i=de(o.value),a=dr(e,"input",!1),l=function(u){var c=xr(Fl(r.value)),d=c.indexOf(i.value);i.value=u,d>-1&&(c.splice(d,1),c.push(u),s(c))};Je(o,function(u){a.value?l(u):i.value=u});var s=function(u){t.emit("update:modelValue",u)};return{options:function(){return Array.isArray(n.value)?n.value:[]},value:r,onInput:s,updateCustomValue:l,makeInput:function(u){if(a.value)return ie(u,{value:i.value||void 0,label:i.value||void 0},{default:function(){return[ie(Qe("ElInput"),{size:"small",modelValue:i.value,"onUpdate:modelValue":l},null)]}})}}},render:function(){var e,t,n=this,r=this.type==="button"?"ElCheckboxButton":"ElCheckbox",o=Qe(r);return ie(Qe("ElCheckboxGroup"),Un(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),hn({default:function(){return[n.options().map(function(i,a){var l=hn({},i),s=l.value,u=l.label;return delete l.value,delete l.label,ie(o,Un(l,{label:s,value:s,key:r+a+"-"+s}),{default:function(){return[u||s||""]}})}),(e=(t=n.$slots).default)===null||e===void 0?void 0:e.call(t),n.makeInput(o)]}},yx(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}});function $ce(e){e=e||new Map;var t={$on:function(n,r){var o=e.get(n);o&&o.push(r)||e.set(n,[r])},$once:function(n,r){r._once=!0,t.$on(n,r)},$off:function(n,r){var o=e.get(n);o&&o.splice(o.indexOf(r)>>>0,1)},$emit:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];(e.get(n)||[]).slice().map(function(a){a._once&&(t.$off(n,a),delete a._once),a.apply(void 0,o)}),(e.get("*")||[]).slice().map(function(a){a(n,o)})}};return t}function bx(e,t){t===void 0&&(t={});var n=t.insertAt;if(e&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}bx("._fc-frame ._fc-files img{display:inline-block;height:100%;vertical-align:top;width:100%}._fc-frame ._fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame._fc-disabled ._fc-upload-btn,._fc-frame._fc-disabled .el-button{color:#999;cursor:not-allowed!important}._fc-frame ._fc-upload-cover{background:rgba(0,0,0,.6);bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame ._fc-upload-cover i{color:#fff;cursor:pointer;font-size:20px;margin:0 2px}._fc-frame ._fc-files:hover ._fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame ._fc-upload-icon{cursor:pointer}._fc-files,._fc-frame ._fc-upload-btn{background:#fff;border:1px solid #c0ccda;border-radius:4px;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px rgba(0,0,0,.1);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;height:58px;line-height:58px;margin-right:4px;overflow:hidden;position:relative;text-align:center;width:58px}");var Uce={name:"IconCircleClose"},wHe={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},xHe=[ce("path",{fill:"currentColor",d:"M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"},null,-1),ce("path",{fill:"currentColor",d:"M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"},null,-1)];Uce.render=function(e,t,n,r,o,i){return Y(),fe("svg",wHe,xHe)};var Wce={name:"IconDocument"},_He={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},EHe=[ce("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 01-32 32H160a32 32 0 01-32-32V96a32 32 0 0132-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,-1)];Wce.render=function(e,t,n,r,o,i){return Y(),fe("svg",_He,EHe)};var Gce={name:"IconDelete"},CHe={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},SHe=[ce("path",{fill:"currentColor",d:"M160 256H96a32 32 0 010-64h256V95.936a32 32 0 0132-32h256a32 32 0 0132 32V192h256a32 32 0 110 64h-64v672a32 32 0 01-32 32H192a32 32 0 01-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32zm192 0a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32z"},null,-1)];Gce.render=function(e,t,n,r,o,i){return Y(),fe("svg",CHe,SHe)};var qce={name:"IconView"},kHe={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},DHe=[ce("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"},null,-1)];qce.render=function(e,t,n,r,o,i){return Y(),fe("svg",kHe,DHe)};var Kce={name:"IconFolderOpened"},OHe={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},THe=[ce("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 01216.96 384H832zm-24.96 512H96a32 32 0 01-32-32V160a32 32 0 0132-32h287.872l128.384 128H864a32 32 0 0132 32v96h23.04a32 32 0 0131.04 39.744l-112 448A32 32 0 01807.04 896z"},null,-1)];function Yce(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!oo(e)}Kce.render=function(e,t,n,r,o,i){return Y(),fe("svg",OHe,THe)};var MHe=Te({name:"fcFrame",props:{type:{type:String,default:"input"},field:String,helper:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},src:{type:String,required:!0},icon:{type:String,default:"IconFolderOpened"},width:{type:String,default:"500px"},height:{type:String,default:"370px"},maxLength:{type:Number,default:0},okBtnText:{type:String,default:"\u786E\u5B9A"},closeBtnText:{type:String,default:"\u5173\u95ED"},modalTitle:String,handleIcon:{type:[String,Boolean],default:void 0},title:String,allowRemove:{type:Boolean,default:!0},onOpen:{type:Function,default:function(){}},onOk:{type:Function,default:function(){}},onCancel:{type:Function,default:function(){}},onLoad:{type:Function,default:function(){}},onBeforeRemove:{type:Function,default:function(){}},onRemove:{type:Function,default:function(){}},onHandle:Function,modal:{type:Object,default:function(){return{}}},srcKey:[String,Number],modelValue:[Array,String,Number,Object],previewMask:void 0,footer:{type:Boolean,default:!0},reload:{type:Boolean,default:!0},closeBtn:{type:Boolean,default:!0},okBtn:{type:Boolean,default:!0},formCreateInject:Object},emits:["update:modelValue","change"],components:{IconFolderOpened:Kce,IconView:qce},data:function(){return{fileList:Fl(this.modelValue),previewVisible:!1,frameVisible:!1,previewImage:"",bus:new $ce}},watch:{modelValue:function(e){this.fileList=Fl(e)}},methods:{close:function(){this.closeModel(!0)},closeModel:function(e){this.bus.$emit(e?"$close":"$ok"),this.reload&&(this.bus.$off("$ok"),this.bus.$off("$close")),this.frameVisible=!1},handleCancel:function(){this.previewVisible=!1},showModel:function(){this.disabled||this.onOpen()===!1||(this.frameVisible=!0)},input:function(){var e=this.fileList,t=this.maxLength===1?e[0]||"":e;this.$emit("update:modelValue",t),this.$emit("change",t)},makeInput:function(){var e=this;return ie(Qe("ElInput"),Un({type:"text",modelValue:this.fileList.map(function(t){return e.getSrc(t)}).toString(),readonly:!0},{key:1}),{append:function(){return ie(Qe("ElButton"),{icon:Qe(e.icon),onClick:function(){return e.showModel()}},null)},suffix:function(){return e.fileList.length&&!e.disabled?ie(Qe("ElIcon"),{class:"el-input__icon _fc-upload-icon",onClick:function(){e.fileList=[],e.input()}},{default:function(){return[ie(Uce,null,null)]}}):null}})},makeGroup:function(e){return(!this.maxLength||this.fileList.length<this.maxLength)&&e.push(this.makeBtn()),ie("div",{key:2},[e])},makeItem:function(e,t){return ie("div",{class:"_fc-files",key:"3"+e},[t])},valid:function(e){var t=this.formCreateInject.field||this.field;if(t&&e!==t)throw new Error("[frame]\u65E0\u6548\u7684\u5B57\u6BB5\u503C")},makeIcons:function(e,t){if(this.handleIcon!==!1||this.allowRemove===!0){var n=[];return(this.type!=="file"&&this.handleIcon!==!1||this.type==="file"&&this.handleIcon)&&n.push(this.makeHandleIcon(e,t)),this.allowRemove&&n.push(this.makeRemoveIcon(e,t)),ie("div",{class:"_fc-upload-cover",key:4},[n])}},makeHandleIcon:function(e,t){var n=this,r=Qe(this.handleIcon===!0||this.handleIcon===void 0?"icon-view":this.handleIcon);return ie(Qe("ElIcon"),{onClick:function(){return n.handleClick(e)},key:"5"+t},{default:function(){return[ie(r,null,null)]}})},makeRemoveIcon:function(e,t){var n=this;return ie(Qe("ElIcon"),{onClick:function(){return n.handleRemove(e)},key:"6"+t},{default:function(){return[ie(Gce,null,null)]}})},makeFiles:function(){var e=this;return this.makeGroup(this.fileList.map(function(t,n){return e.makeItem(n,[ie(Qe("ElIcon"),{onClick:function(){return e.handleClick(t)}},{default:function(){return[ie(Wce,null,null)]}}),e.makeIcons(t,n)])}))},makeImages:function(){var e=this;return this.makeGroup(this.fileList.map(function(t,n){return e.makeItem(n,[ie("img",{src:e.getSrc(t)},null),e.makeIcons(t,n)])}))},makeBtn:function(){var e=this,t=Qe(this.icon);return ie("div",{class:"_fc-upload-btn",onClick:function(){return e.showModel()},key:7},[ie(Qe("ElIcon"),null,{default:function(){return[ie(t,null,null)]}})])},handleClick:function(e){if(this.onHandle)return this.onHandle(e);this.previewImage=this.getSrc(e),this.previewVisible=!0},handleRemove:function(e){this.disabled||this.onBeforeRemove(e)!==!1&&(this.fileList.splice(this.fileList.indexOf(e),1),this.input(),this.onRemove(e))},getSrc:function(e){return this.srcKey?e[this.srcKey]:e},frameLoad:function(e){var t=this;this.onLoad(e);try{this.helper===!0&&(e.form_create_helper={api:this.formCreateInject.api,close:function(n){t.valid(n),t.closeModel()},set:function(n,r){t.valid(n),!t.disabled&&t.$emit("update:modelValue",r)},get:function(n){return t.valid(n),t.modelValue},onOk:function(n){return t.bus.$on("$ok",n)},onClose:function(n){return t.bus.$on("$close",n)}})}catch(n){console.error(n)}},makeFooter:function(){var e=this,t=this.$props,n=t.okBtnText,r=t.closeBtnText,o=t.closeBtn,i=t.okBtn;if(t.footer)return ie("div",null,[o?ie(Qe("ElButton"),{onClick:function(){return e.onCancel()!==!1&&(e.frameVisible=!1)}},Yce(r)?r:{default:function(){return[r]}}):null,i?ie(Qe("ElButton"),{type:"primary",onClick:function(){return e.onOk()!==!1&&e.closeModel()}},Yce(n)?n:{default:function(){return[n]}}):null])}},render:function(){var e,t=this,n=this.type;e=n==="input"?this.makeInput():n==="image"?this.makeImages():this.makeFiles();var r=this.$props,o=r.width,i=o===void 0?"30%":o,a=r.height,l=r.src,s=r.title,u=r.modalTitle;return St(function(){t.$refs.frame&&t.frameLoad(t.$refs.frame.contentWindow||{})}),ie("div",{class:{"_fc-frame":!0,"_fc-disabled":this.disabled}},[e,ie(Qe("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:u,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[ie("img",{style:"width: 100%",src:t.previewImage},null)]}}),ie(Qe("ElDialog"),Un({appendToBody:!0},hn({width:i,title:s},this.modal),{modelValue:this.frameVisible,onClose:function(){return t.closeModel(!0)}}),{default:function(){return[t.frameVisible||!t.reload?ie("iframe",{ref:"frame",src:l,frameBorder:"0",style:{height:a,border:"0 none",width:"100%"}},null):null]},footer:function(){return t.makeFooter()}})])},beforeMount:function(){var e=this.formCreateInject,t=e.name,n=e.field,r=e.api;t&&r.on("fc:closeModal:"+t,this.close),n&&r.on("fc:closeModal:"+n,this.close)},beforeUnmount:function(){var e=this.formCreateInject,t=e.name,n=e.field,r=e.api;t&&r.off("fc:closeModal:"+t,this.close),n&&r.off("fc:closeModal:"+n,this.close)}}),NHe=Te({name:"fcRadio",inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[String,Number,Boolean],default:""},type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup:function(e,t){var n=dr(e.formCreateInject,"options",[]),r=dr(e,"modelValue"),o=dr(e,"inputValue",""),i=de(o.value),a=dr(e,"input",!1);Je(o,function(u){a.value?s(u):i.value=u});var l=function(u){t.emit("update:modelValue",u)},s=function(u){var c=i.value;i.value=u,r.value===c&&l(u)};return{options:function(){return Array.isArray(n.value)?n.value:[]},value:r,onInput:l,updateCustomValue:s,customValue:i,makeInput:function(u){if(a.value)return ie(u,{checked:!1,value:i.value||void 0,label:i.value||void 0},{default:function(){return[ie(Qe("ElInput"),{size:"small",modelValue:i.value,"onUpdate:modelValue":s},null)]}})}}},render:function(){var e,t,n=this,r=this.type==="button"?"ElRadioButton":"ElRadio",o=Qe(r);return ie(Qe("ElRadioGroup"),Un(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),hn({default:function(){return[n.options().map(function(i,a){var l=hn({},i),s=l.value,u=l.label;return delete l.value,delete l.label,ie(o,Un(l,{label:s,value:s,key:r+a+"-"+s}),{default:function(){return[u||s||""]}})}),(e=(t=n.$slots).default)===null||e===void 0?void 0:e.call(t),n.makeInput(o)]}},yx(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}}),Bt={type:function(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef:function(e){return e==null},Element:function(e){return ga(e)==="object"&&e!==null&&e.nodeType===1&&!Bt.Object(e)},trueArray:function(e){return Array.isArray(e)&&e.length>0},Function:function(e){var t=this.getType(e);return t==="Function"||t==="AsyncFunction"},getType:function(e){var t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty:function(e){return e==null||!(!Array.isArray(e)||!Array.isArray(e)||e.length)||typeof e=="string"&&!e}};function Jo(e,t){return{}.hasOwnProperty.call(e,t)}["Date","Object","String","Boolean","Array","Number"].forEach(function(e){Bt[e]=function(t){return Bt.type(t,e)}});var FHe=Te({name:"fcSelect",inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String},emits:["update:modelValue","fc.el"],setup:function(e){var t=dr(e.formCreateInject,"options",[]);return{options:function(){return Array.isArray(t.value)?t.value:[]},value:dr(e,"modelValue")}},render:function(){var e,t,n=this,r=function(i,a){return ie(Qe("ElOption"),Un(i,{key:a+"-"+i.value}),null)},o=this.options();return ie(Qe("ElSelect"),Un(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":function(i){return n.$emit("update:modelValue",i)},ref:"el"}),hn({default:function(){return[o.map(function(i,a){return Jo(i||"","options")?function(l,s){return ie(Qe("ElOptionGroup"),{label:l.label,key:s+"-"+l.label},{default:function(){return[Bt.trueArray(l.options)&&l.options.map(function(u,c){return r(u,c)})]}})}(i,a):r(i,a)}),(e=(t=n.$slots).default)===null||e===void 0?void 0:e.call(t)]}},yx(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}}),RHe=Te({name:"fcTree",inheritAttrs:!1,formCreateParser:{mergeProp:function(e){var t=e.prop.props;t.nodeKey||(t.nodeKey="id"),t.props||(t.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:function(){return[]}}},emits:["update:modelValue","fc.el"],watch:{modelValue:function(){this.setValue()}},methods:{updateValue:function(){var e;this.$refs.tree&&(e=this.type==="selected"?this.$refs.tree.getCurrentKey():this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e))},setValue:function(){this.$refs.tree&&(this.type==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(Fl(this.modelValue)))}},render:function(){return ie(Qe("ElTree"),Un(this.$attrs,{ref:"tree",onCheck:this.updateValue,"onNode-click":this.updateValue}),this.$slots)},mounted:function(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}});bx("._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}");var Xce={name:"IconUpload"},IHe={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},BHe=[ce("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)];function Qce(e,t){return{url:e,name:LHe(e),uid:t}}function LHe(e){return(""+e).split("/").pop()}Xce.render=function(e,t,n,r,o,i){return Y(),fe("svg",IHe,BHe)};var PHe=Te({name:"fcUpload",inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return Fl(e)},toValue:function(e,t){return t.prop.props.limit===1?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,modalTitle:String,listType:String,modelValue:[Array,String]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=Fl(this.modelValue).map(Qce)},watch:{modelValue:function(e){this.fileList=Fl(e).map(Qce)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):this.listType==="text"?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update:function(e){var t=e.map(function(n){return n.url}).filter(function(n){return n!==void 0});this.$emit("update:modelValue",t)},handleCancel:function(){this.previewVisible=!1},handleChange:function(e,t){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),e.status==="success"&&this.update(t)},handleRemove:function(e,t){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(t)}},render:function(){var e,t,n=this,r=Fl(this.modelValue).length;return ie("div",{class:"_fc-upload"},[ie(Qe("ElUpload"),Un({key:r},this.$attrs,{"list-type":this.listType||"picture-card",class:{"_fc-exceed":!!this.$attrs.limit&&this.$attrs.limit<=r},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,fileList:this.fileList,ref:"upload"}),hn({default:function(){return[(e=(t=n.$slots).default)!==null&&e!==void 0&&e.call(t)||["text","picture"].indexOf(n.listType)===-1?ie(Qe("ElIcon"),null,{default:function(){return[ie(Xce,null,null)]}}):ie(Qe("ElButton"),{type:"primary"},{default:function(){return[Dt("\u70B9\u51FB\u4E0A\u4F20")]}})]}},yx(this.$slots,["default"]))),ie(Qe("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[ie("img",{style:"width: 100%",src:n.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});function Js(e,t,n){e[t]=n}function d1(e,t){delete e[t]}function c4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=!1;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=t[o];if((r=Array.isArray(i))||Bt.Object(i)){var a=e[o]===void 0;if(r)r=!1,a&&Js(e,o,[]);else if(i._clone&&n!==void 0){if(!n){Js(e,o,i._clone());continue}i=i.getRule(),a&&Js(e,o,{})}else a&&Js(e,o,{});e[o]=c4(e[o],i,n)}else Js(e,o,i),Bt.Undef(i)||(Bt.Undef(i.__json)||(e[o].__json=i.__json),Bt.Undef(i.__origin)||(e[o].__origin=i.__origin))}return n!==void 0&&Array.isArray(e)?e.filter(function(l){return!l||!l.__ctrl}):e}function Zs(e){return c4({},{value:e}).value}var jHe=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&Js(e,r,t[r]);return e};function Sn(){return jHe.apply(this,arguments)}function GR(e){return ga(e)!=="object"||e===null?e:e instanceof Array?xr(e):hn({},e)}bx('._fc-group{display:flex;flex-direction:column;justify-content:center;min-height:38px;width:100%}._fc-group-disabled ._fc-group-add,._fc-group-disabled ._fc-group-btn{cursor:not-allowed}._fc-group-handle{background-color:#fff;border:1px dashed #d9d9d9;border-radius:15px;bottom:-15px;display:flex;flex-direction:row;padding:3px 8px;position:absolute;right:30px}._fc-group-btn{cursor:pointer}._fc-group-idx{align-items:center;background:#eee;border-radius:15px;bottom:-15px;display:flex;font-weight:700;height:30px;justify-content:center;left:10px;position:absolute;width:30px}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{border:1px dashed #d9d9d9;border-radius:5px;display:flex;flex-direction:column;margin:5px 5px 25px;padding:20px 20px 25px;position:relative}._fc-group-arrow{height:20px;position:relative;width:20px}._fc-group-arrow:before{border-left:2px solid #999;border-top:2px solid #999;content:"";height:9px;left:5px;position:absolute;top:8px;transform:rotate(45deg);width:9px}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{cursor:pointer;height:20px;position:relative;width:20px}._fc-group-plus-minus:after,._fc-group-plus-minus:before{background-color:#409eff;content:"";height:2px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:60%}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{border:1px solid rgba(64,158,255,.5);border-radius:15px;cursor:pointer;height:25px;width:25px}._fc-group-add._fc-group-plus-minus:after,._fc-group-add._fc-group-plus-minus:before{width:50%}');var VHe=Te({name:"fcGroup",props:{field:String,rule:Array,expand:Number,options:Object,button:{type:Boolean,default:!0},max:{type:Number,default:0},min:{type:Number,default:0},modelValue:{type:Array,default:function(){return[]}},defaultValue:Object,sortBtn:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},onBeforeRemove:{type:Function,default:function(){}},onBeforeAdd:{type:Function,default:function(){}},formCreateInject:Object,parse:Function},data:function(){return{len:0,cacheRule:{},cacheValue:{},sort:[],form:Fo(this.formCreateInject.form.$form())}},emits:["update:modelValue","change","itemMounted","remove","add"],watch:{rule:{handler:function(e,t){var n=this;Object.keys(this.cacheRule).forEach(function(r){var o=n.cacheRule[r];if(o.$f){var i=o.$f.formData();if(e===t)o.$f.deferSyncValue(function(){c4(o.rule,e),o.$f.setValue(i)},!0);else{var a=o.$f.formData();o.$f.once("reloading",function(){o.$f.setValue(a)}),o.rule=Zs(e)}}})},deep:!0},expand:function(e){var t=e-this.modelValue.length;t>0&&this.expandRule(t)},modelValue:{handler:function(e){var t=this;e=e||[];var n=this.sort,r=n.length,o=r-e.length;if(o<0){for(var i=o;i<0;i++)this.addRule(e.length+i,!0);for(var a=0;a<r;a++)this.setValue(n[a],e[a])}else{if(o>0)for(var l=0;l<o;l++)this.removeRule(n[r-l-1]);e.forEach(function(s,u){t.setValue(n[u],e[u])})}},deep:!0}},methods:{_value:function(e){return e&&Jo(e,this.field)?e[this.field]:e},cache:function(e,t){this.cacheValue[e]=JSON.stringify(t)},input:function(e){this.$emit("update:modelValue",e),this.$emit("change",e)},formData:function(e,t){var n=this,r=this.cacheRule,o=this.sort;if(o.filter(function(a){return r[a].$f}).length===o.length){var i=o.map(function(a){var l=e===a?t:hn({},n.cacheRule[a].$f.form),s=n.field?l[n.field]||null:l;return n.cache(a,s),s});this.input(i)}},setValue:function(e,t){var n=this.field;n&&(t=Xi({},n,this._value(t))),this.cacheValue[e]!==JSON.stringify(n?t[n]:t)&&this.cache(e,t)},addRule:function(e,t){var n=this,r=this.formCreateInject.form.copyRules(this.rule||[]),o=this.options?hn({},this.options):{submitBtn:!1,resetBtn:!1};if(this.defaultValue){o.formData||(o.formData={});var i=Zs(this.defaultValue);Sn(o.formData,this.field?Xi({},this.field,i):i)}this.parse&&this.parse({rule:r,options:o,index:this.sort.length}),this.cacheRule[++this.len]={rule:r,options:o},t&&St(function(){return n.$emit("add",r,Object.keys(n.cacheRule).length-1)})},add$f:function(e,t,n){var r=this;this.cacheRule[t].$f=n,St(function(){r.$emit("itemMounted",n,Object.keys(r.cacheRule).indexOf(t))})},removeRule:function(e,t){var n=this,r=Object.keys(this.cacheRule).indexOf(e);delete this.cacheRule[e],delete this.cacheValue[e],t&&St(function(){return n.$emit("remove",r)})},add:function(e){if(!this.disabled&&this.onBeforeAdd(this.modelValue)!==!1){var t=xr(this.modelValue);t.push(this.defaultValue?Zs(this.defaultValue):this.field?null:{}),this.input(t)}},del:function(e,t){if(!this.disabled&&this.onBeforeRemove(this.modelValue,e)!==!1){this.removeRule(t,!0);var n=xr(this.modelValue);n.splice(e,1),this.input(n)}},addIcon:function(e){return ie("div",{class:"_fc-group-btn _fc-group-plus-minus",onClick:this.add},null)},delIcon:function(e,t){var n=this;return ie("div",{class:"_fc-group-btn _fc-group-plus-minus _fc-group-minus",onClick:function(){return n.del(e,t)}},null)},sortUpIcon:function(e){var t=this;return ie("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-up",onClick:function(){return t.changeSort(e,-1)}},null)},sortDownIcon:function(e){var t=this;return ie("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-down",onClick:function(){return t.changeSort(e,1)}},null)},changeSort:function(e,t){var n=this,r=this.sort[e];this.sort[e]=this.sort[e+t],this.sort[e+t]=r,this.formCreateInject.subForm(this.sort.map(function(o){return n.cacheRule[o].$f})),this.formData(0)},makeIcon:function(e,t,n){var r=this;if(this.$slots.button)return this.$slots.button({total:e,index:t,vm:this,key:n,del:function(){return r.del(t,n)},add:this.add});var o=[];return(!this.max||e<this.max)&&e===t+1&&o.push(this.addIcon(n)),e>this.min&&o.push(this.delIcon(t,n)),this.sortBtn&&t&&o.push(this.sortUpIcon(t)),this.sortBtn&&t!==e-1&&o.push(this.sortDownIcon(t)),o},emitEvent:function(e,t,n,r){this.$emit.apply(this,[e].concat(xr(t),[this.cacheRule[r].$f,n]))},expandRule:function(e){for(var t=0;t<e;t++)this.addRule(t)}},created:function(){var e=this;Je(function(){return hn({},e.cacheRule)},function(r){e.sort=Object.keys(r)},{immediate:!0});for(var t=(this.expand||0)-this.modelValue.length,n=0;n<this.modelValue.length;n++)this.addRule(n);t>0&&this.expandRule(t)},render:function(){var e=this,t=this.sort,n=this.button,r=this.form,o=this.disabled,i=t.length===0?this.$slots.default?this.$slots.default({vm:this,add:this.add}):ie("div",{key:"a_def",class:"_fc-group-plus-minus _fc-group-add fc-clock",onClick:this.add},null):t.map(function(a,l){var s=e.cacheRule[a],u=s.rule,c=s.options,d=n&&!o?e.makeIcon(t.length,l,a):[];return ie("div",{class:"_fc-group-container",key:a},[ie(r,Un({key:a},{disabled:o,"onUpdate:modelValue":function(f){return e.formData(a,f)},"onEmit-event":function(f){for(var p=arguments.length,m=new Array(p>1?p-1:0),v=1;v<p;v++)m[v-1]=arguments[v];return e.emitEvent(f,m,l,a)},"onUpdate:api":function(f){return e.add$f(l,a,f)},inFor:!0,modelValue:e.field?Xi({},e.field,e._value(e.modelValue[l])):e.modelValue[l],rule:u,option:c,extendOption:!0}),null),ie("div",{class:"_fc-group-idx"},[l+1]),d.length?ie("div",{class:"_fc-group-handle fc-clock"},[d]):null])});return ie("div",{key:"con",class:"_fc-group "+(o?"_fc-group-disabled":"")},[i])}}),zHe=Te({name:"fcSubForm",props:{rule:Array,options:{type:Object,default:function(){return Qn({submitBtn:!1,resetBtn:!1})}},modelValue:{type:Object,default:function(){return{}}},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},formCreateInject:Object},data:function(){return{cacheValue:{},subApi:{},form:Fo(this.formCreateInject.form.$form())}},emits:["fc:subform","update:modelValue","change","itemMounted"],watch:{modelValue:function(e){this.setValue(e)}},methods:{formData:function(e){this.cacheValue=JSON.stringify(e),this.$emit("update:modelValue",e),this.$emit("change",e)},setValue:function(e){var t=JSON.stringify(e);this.cacheValue!==t&&(this.cacheValue=t,this.subApi.coverValue(e||{}))},add$f:function(e){var t=this;this.subApi=e,St(function(){t.$emit("itemMounted",e)})}},render:function(){var e=this.form;return ie(e,{disabled:this.disabled,"onUpdate:modelValue":this.formData,modelValue:this.modelValue,"onEmit-event":this.$emit,"onUpdate:api":this.add$f,rule:this.rule,option:this.options,extendOption:!0},null)}}),Jce={name:"IconWarning"},HHe={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},$He=[ce("path",{fill:"currentColor",d:"M512 64a448 448 0 110 896 448 448 0 010-896zm0 832a384 384 0 000-768 384 384 0 000 768zm48-176a48 48 0 11-96 0 48 48 0 0196 0zm-48-464a32 32 0 0132 32v288a32 32 0 01-64 0V288a32 32 0 0132-32z"},null,-1)];Jce.render=function(e,t,n,r,o,i){return Y(),fe("svg",HHe,$He)};var UHe=[AHe,MHe,NHe,FHe,RHe,PHe,VHe,zHe,Jce];function xg(e,t){var n=null;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];n!==null&&clearTimeout(n),n=setTimeout(function(){return e.call.apply(e,[r].concat(i))},t)}}function d4(e){var t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}var Ax=function(e,t){if(e&&e!==t)return e.props.formCreateInject?e.props.formCreateInject:e.parent?Ax(e.parent,t):void 0};function WHe(e,t,n){return Te({name:"FormCreate"+(e.isMobile?"Mobile":""),components:t,directives:n,props:{rule:{type:Array,required:!0,default:function(){return[]}},option:{type:Object,default:function(){return{}}},extendOption:Boolean,driver:[String,Object],modelValue:Object,disabled:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:["update:api","update:modelValue","mounted","submit","change","emit-event","control","remove-rule","remove-field","sync","reload","repeat-field","update","validate-field-fail","validate-fail","created"],render:function(){return this.fc.render()},setup:function(r){var o=dn();qn("parentFC",o);var i=Rt("parentFC",null),a=di(r),l=a.rule,s=a.modelValue,u=a.subForm,c=a.inFor,d=Qn({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:xr(l.value||[]),updateValue:JSON.stringify(s.value||{})}),f=new e(o),p=f.api(),m=c.value,v=function(){var x=Ax(o,i);if(x)if(m){var _=Fl(x.getSubForm()),E=_.indexOf(p);E>-1&&_.splice(E,1)}else x.subForm()},g=null;g0(function(){yl(function(){var x="",_=r.option&&r.option.globalClass||{};Object.keys(_).forEach(function(E){var C="";_[E].style&&Object.keys(_[E].style).forEach(function(T){C+=d4(T)+":"+_[E].style[T]+";"}),_[E].content&&(C+=_[E].content+";"),C&&(x+=".".concat(E,"{").concat(C,"}"))}),r.option&&r.option.style&&(x+=r.option.style),g||((g=document.createElement("style")).type="text/css",document.head.appendChild(g)),g.innerHTML=x||""})});var b=xg(function(){f.bus.$emit("$loadData.$topForm")},100),y=xg(function(){f.bus.$emit("$loadData.$form")},100),w=function(x){f.bus.$emit("change-$form."+x)};return yn(function(){i&&(p.top.bus.$on("$loadData.$form",b),p.top.bus.$on("change",w)),f.mounted()}),xo(function(){i&&(p.top.bus.$off("$loadData.$form",b),p.top.bus.$off("change",w)),g&&document.head.removeChild(g),v(),d.destroyed=!0,f.unmount()}),zs(function(){f.updated()}),Je(u,function(x){x?function(){if(i){var _,E=Ax(o,i);E&&(m?(_=Fl(E.getSubForm())).push(p):_=p,E.subForm(_))}}():v()},{immediate:!0}),Je(function(){return xr(l.value)},function(x){f.$handle.isBreakWatch()||x.length===d.renderRule.length&&x.every(function(_){return d.renderRule.indexOf(_)>-1})||(f.$handle.reloadRule(l.value),o.setupState.renderRule())}),Je(function(){return r.option},function(){f.initOptions(),p.refresh()},{deep:!0}),Je(function(){return[r.disabled,r.preview]},function(){p.refresh()}),Je(s,function(x){JSON.stringify(x||{})!==d.updateValue&&(p.config.forceCoverValue?p.coverValue(x||{}):p.setValue(x||{}))},{deep:!0}),Je(function(){return r.index},function(){p.coverValue({}),St(function(){St(function(){p.clearValidateState()})})},{flush:"sync"}),hn(hn({fc:Fo(f),parent:i&&Fo(i),fapi:Fo(p)},di(d)),{},{getGroupInject:function(){return Ax(o,i)},refresh:function(){++d.unique},renderRule:function(){d.renderRule=xr(l.value||[])},updateValue:function(x){if(!d.destroyed){var _=JSON.stringify(x);d.updateValue!==_&&(d.updateValue=_,o.emit("update:modelValue",x),St(function(){y(),i||b()}))}}})},created:function(){var r=dn();r.emit("update:api",r.setupState.fapi),r.setupState.fc.init()}})}var Zce=["props"],ede=["class","style","directives"],tde=["on"],cp=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=[].concat(Zce,xr(r.normal||[])),i=[].concat(ede,xr(r.array||[])),a=[].concat(tde,xr(r.functional||[])),l=r.props||[];return t.reduce(function(s,u){for(var c in u)if(s[c])if(l.indexOf(c)>-1)s[c]=e([u[c]],s[c]);else if(o.indexOf(c)>-1)s[c]=hn(hn({},s[c]),u[c]);else if(i.indexOf(c)>-1){var d=s[c]instanceof Array?s[c]:[s[c]],f=u[c]instanceof Array?u[c]:[u[c]];s[c]=[].concat(xr(d),xr(f))}else if(a.indexOf(c)>-1)for(var p in u[c])if(s[c][p]){var m=s[c][p]instanceof Array?s[c][p]:[s[c][p]],v=u[c][p]instanceof Array?u[c][p]:[u[c][p]];s[c][p]=[].concat(xr(m),xr(v))}else s[c][p]=u[c][p];else if(c==="hook")for(var g in u[c])s[c][g]?s[c][g]=GHe(s[c][g],u[c][g]):s[c][g]=u[c][g];else s[c]=u[c];else o.indexOf(c)>-1||a.indexOf(c)>-1||l.indexOf(c)>-1?s[c]=hn({},u[c]):i.indexOf(c)>-1?s[c]=u[c]instanceof Array?xr(u[c]):ga(u[c])==="object"?hn({},u[c]):u[c]:s[c]=u[c];return s},n)},GHe=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},qR=["type","slot","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],wx=["validate","children","control"],xx=["effect","deep"];function nde(){return[].concat(qR,xr(Zce),xr(ede),xr(tde),wx,xx)}function rde(e,t,n){return"[form-create ".concat(e,"]: ").concat(t)+""}function KR(e,t){console.error(rde("err",e))}var YR="[[FORM-CREATE-PREFIX-",XR="-FORM-CREATE-SUFFIX]]",ode="$FN:",ide="$FNX:",ade="$GLOBAL:",f4="function";function lde(e,t){return JSON.stringify(c4(Array.isArray(e)?[]:{},e,!0),function(n,r){if(!r||r._isVue!==!0){if(ga(r)!==f4)return r;if(r.__json)return r.__json;if(r.__origin&&(r=r.__origin),!r.__emit)return YR+r+XR}},t)}function sde(e){return new Function("return "+e)()}function Ud(e,t){if(e&&Bt.String(e)&&e.length>4){var n=e.trim(),r=!1;try{if(n.indexOf(XR)>0&&n.indexOf(YR)===0)n=n.replace(XR,"").replace(YR,""),r=!0;else if(n.indexOf(ode)===0)n=n.replace(ode,""),r=!0;else{if(n.indexOf(ade)===0){var o=n.replace(ade,"");return n=function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];var u=l[0].api.getGlobalEvent(o);if(u)return u.call.apply(u,[this].concat(l))},n.__json=e,n.__inject=!0,n}if(n.indexOf(ide)===0)return(n=sde("function($inject){"+n.replace(ide,"")+"}")).__json=e,n.__inject=!0,n;t||n.indexOf(f4)!==0||n===f4||(r=!0)}if(!r)return e;var i=sde(n.indexOf(f4)===-1&&n.indexOf("(")!==0?f4+" "+n:n);return i.__json=e,i}catch(a){return void KR("\u89E3\u6790\u5931\u8D25:".concat(n,` |
|
45 |
|
|
46 |
err: `).concat(a))}}return e}function qHe(e,t){return JSON.parse(e,function(n,r){return Bt.Undef(r)||!r.indexOf?r:Ud(r,t)})}function ude(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!!t}}function QR(e,t){return cde([e],t||!1)[0]}function cde(e,t){return c4([],xr(e),t||!1)}function dp(e,t){return cp(Array.isArray(t)?t:[t],e,{array:wx,normal:xx}),e}function dde(e){var t=Bt.Function(e.getRule)?e.getRule():e;return t.type||(t.type="input"),t}function fde(e,t){Object.defineProperties(e,Object.keys(t).reduce(function(n,r){return n[r]={get:function(){return t[r]()}},n},{}))}function _g(e){return e.__fc__||(e.__origin__?e.__origin__.__fc__:null)}function Lo(e,t){try{t=e()}catch(n){(function(r){KR(r.toString()),console.error(r)})(n)}return t}function JR(){var e={},t=function(n){return n||"default"};return{setSlot:function(n,r){n=t(n),!r||Array.isArray(r)&&r.length||(e[n]||(e[n]=[]),e[n].push(r))},getSlot:function(n,r){n=t(n);var o=[];return(e[n]||[]).forEach(function(i){if(Array.isArray(i))o.push.apply(o,xr(i));else if(Bt.Function(i)){var a=i.apply(void 0,xr(r||[]));Array.isArray(a)?o.push.apply(o,xr(a)):o.push(a)}else Bt.Undef(i)||o.push(i)}),o},getSlots:function(){var n=this,r={};return Object.keys(e).forEach(function(o){r[o]=function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return n.getSlot(o,a)}}),r},slotLen:function(n){return n=t(n),e[n]?e[n].length:0},mergeBag:function(n){var r=this;if(!n)return this;var o=Bt.Function(n.getSlots)?n.getSlots():n;return Array.isArray(n)||oo(n)?this.setSlot(void 0,function(){return n}):Object.keys(o).forEach(function(i){r.setSlot(i,o[i])}),this}}}function pde(e){var t=hn({},e.props||{});return Object.keys(e.on||{}).forEach(function(n){var r,o="on".concat((r=n).replace(r[0],r[0].toLocaleUpperCase()));Array.isArray(t[o])?t[o]=[].concat(xr(t[o]),[e.on[n]]):t[o]?t[o]=[t[o],e.on[n]]:t[o]=e.on[n]}),t.key=e.key,t.ref=e.ref,t.class=e.class,t.id=e.id,t.style=e.style,t.slot&&delete t.slot,t}function ZR(e,t){return Object.setPrototypeOf(e,t),e}var hde=function(e,t){return typeof e=="string"?String(t):typeof e=="number"?Number(t):t},f1={"==":function(e,t){return JSON.stringify(e)===JSON.stringify(hde(e,t))},"!=":function(e,t){return!f1["=="](e,t)},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},on:function(e,t){return e&&e.indexOf&&e.indexOf(hde(e[0],t))>-1},notOn:function(e,t){return!f1.on(e,t)},in:function(e,t){return t&&t.indexOf&&t.indexOf(e)>-1},notIn:function(e,t){return!f1.in(e,t)},between:function(e,t){return e>t[0]&&e<t[1]},notBetween:function(e,t){return e<t[0]||e>t[1]},empty:function(e){return Bt.empty(e)},notEmpty:function(e){return!Bt.empty(e)},pattern:function(e,t){return new RegExp(t,"g").test(e)}};function p1(e,t){return(Array.isArray(t)?t:(t||"").split(".")).forEach(function(n){e!=null&&(e=e[n])}),e}function Oa(e,t){return function(n,r,o){var i=new eI(e,n,r,o,arguments.length>3&&arguments[3]!==void 0?arguments[3]:{});return t&&(Bt.Function(t)?t(i):i.props(t)),i}}function eI(e,t,n,r,o){this._data=Sn({props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0},{type:e,title:t,field:n,value:r,props:o||{}}),this.event=this.on}function vde(e){e.forEach(function(t){eI.prototype[t]=function(n){return dp(this._data,Xi({},t,arguments.length<2?n:Xi({},n,arguments[1]))),this}})}Sn(eI.prototype,{getRule:function(){return this._data},setProp:function(e,t){return Js(this._data,e,t),this},modelField:function(e){return this._data.modelField=e,this},_clone:function(){var e=new this.constructor;return e._data=QR(this._data),e}}),vde(nde());var KHe=Oa("");function YHe(e,t,n){var r=KHe("",t);return r._data.type=e,r._data.title=n,r}function mde(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function gde(e){if(typeof XMLHttpRequest<"u"){var t,n=new XMLHttpRequest,r=e.action;n.onerror=function(i){e.onError(i)},n.onload=function(){if(n.status<200||n.status>=300)return e.onError(function(i,a,l){var s="fail to ".concat(i," ").concat(l.status,"'"),u=new Error(s);return u.status=l.status,u.url=i,u}(r,0,n),mde(n));e.onSuccess(mde(n))},n.open(e.method||"get",r,!0),e.data&&((e.dataType||"").toLowerCase()!=="json"?(t=new FormData,Object.keys(e.data).map(function(i){t.append(i,e.data[i])})):(t=JSON.stringify(e.data),n.setRequestHeader("content-type","application/json"))),e.withCredentials&&"withCredentials"in n&&(n.withCredentials=!0);var o=e.headers||{};Object.keys(o).forEach(function(i){o[i]!=null&&n.setRequestHeader(i,o[i])}),n.send(t)}}function yde(e,t){return new Promise(function(n,r){(t||gde)(hn(hn({},e),{},{onSuccess:function(o){var i=function(l){return l},a=Ud(e.parse);Bt.Function(a)?i=a:a&&Bt.String(a)&&(i=function(l){return p1(l,a)}),n(i(o))},onError:function(o){r(o)}}))})}function p4(e){return Zs(e)}function Ic(e){var t=e.replace(/(-[a-z])/g,function(n){return n.replace("-","").toLocaleUpperCase()});return bde(t)}function bde(e){return e.replace(e[0],e[0].toLowerCase())}function Ade(e){return e==null?"":ga(e)==="object"?JSON.stringify(e,null,2):String(e)}var XHe=0;function _x(){var e=370+ ++XHe;return"F"+Math.random().toString(36).substr(3,3)+Number("".concat(Date.now())).toString(36)+e.toString(36)+"c"}function h4(e,t,n){var r,o=e;return(t||"").split(".").forEach(function(i){r&&(o[r]&&ga(o[r])=="object"||(o[r]={}),o=o[r]),r=i}),o[r]=n,o}var QHe=1;function tI(e){Sn(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e.vm),id:QHe++}),fde(this,{options:function(){return e.options},sort:function(){return e.sort}}),this.initCache(),this.initRender()}(function(e){Sn(e.prototype,{initCache:function(){this.clearCacheAll()},clearCache:function(t){t.rule.cache||(this.cache[t.id]?((this.cache[t.id].use===!0||this.cache[t.id].parent)&&this.$handle.refresh(),this.cache[t.id].parent&&this.clearCache(this.cache[t.id].parent),this.cache[t.id]=null):t.parent&&this.clearCache(t.parent))},clearCacheAll:function(){this.cache={}},setCache:function(t,n,r){this.cache[t.id]={vnode:n,use:!1,parent:r,slot:t.rule.slot}},getCache:function(t){var n=this.cache[t.id];if(n)return n.use=!0,n.vnode}})})(tI),function(e){Sn(e.prototype,{initRender:function(){this.cacheConfig={}},getTypeSlot:function(t){return function n(r){if(r){var o=void 0;return t.rule.field&&(o=r.slots["field-"+d4(t.rule.field)]||r.slots["field-"+t.rule.field]),o||(o=r.slots["type-"+d4(t.type)]||r.slots["type-"+t.type]),o||n(r.setupState.parent)}}(this.vm)},render:function(){var t=this;if(this.vm.setupState.isShow){this.$manager.beforeRender();var n=JR();return this.sort.forEach(function(r){t.renderSlot(n,t.$handle.ctxs[r])}),this.$manager.render(n)}},renderSlot:function(t,n,r){if(this.isFragment(n)){n.initProp(),this.mergeGlobal(n),n.initNone();var o=this.renderChildren(n.loadChildrenPending(),n),i=o.default;i&&t.setSlot(n.rule.slot,function(){return i()}),delete o.default,t.mergeBag(o)}else t.setSlot(n.rule.slot,this.renderCtx(n,r))},mergeGlobal:function(t){var n=this;this.$handle.options.global&&(this.cacheConfig[t.trueType]||(this.cacheConfig[t.trueType]=ee(function(){var r=n.$handle.options.global;return dp({},[r["*"],r[t.originType]||r[t.type]||r[t.type]||{}])})),t.prop=dp({},[this.cacheConfig[t.trueType].value,t.prop]))},setOptions:function(t){var n=t.loadPending({key:"options",origin:t.prop.options,def:[]});t.prop.options=n,t.prop.optionsTo&&n&&h4(t.prop,t.prop.optionsTo,n)},deepSet:function(t){var n=t.rule.deep;n&&Object.keys(n).sort(function(r,o){return r.length<o.length?-1:1}).forEach(function(r){h4(t.prop,r,n[r])})},parseSide:function(t,n){return Bt.Object(t)?dp({props:{formCreateInject:n.prop.props.formCreateInject}},t):t},renderSides:function(t,n,r){var o=n[r?"rule":"prop"];return[this.renderRule(this.parseSide(o.prefix,n)),t,this.renderRule(this.parseSide(o.suffix,n))]},renderId:function(t,n){var r=this,o=this.$handle[n==="field"?"fieldCtx":"nameCtx"][t];return o?o.map(function(i){return r.renderCtx(i,i.parent)}):void 0},renderCtx:function(t,n){var r=this;try{if(t.type==="hidden")return;var o=t.rule;if(!this.cache[t.id]||this.cache[t.id].slot!==o.slot){var i;t.initProp(),this.mergeGlobal(t),t.initNone(),this.$manager.tidyRule(t),this.deepSet(t),this.setOptions(t),this.ctxProp(t);var a=t.prop;a.preview=!!(a.preview!=null?a.preview:this.vm.props.preview!==void 0?this.vm.props.preview:this.options.preview),a.props.formCreateInject=this.injectProp(t);var l=a.cache!==!1,s=a.preview;if(a.hidden)return void this.setCache(t,void 0,n);i=function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];var f={rule:o,prop:a,preview:s,api:r.$handle.api,model:a.model||{},slotValue:c};c.length&&o.slotUpdate&&Lo(function(){return o.slotUpdate(f)});var p={},m=t.loadChildrenPending();t.parser.renderChildren?p=t.parser.renderChildren(m,t):t.parser.loadChildren!==!1&&(p=r.renderChildren(m,t));var v,g=r.getTypeSlot(t);return g?(f.children=p,v=g(f)):v=s?t.parser.preview(GR(p),t):t.parser.render(GR(p),t),v=r.renderSides(v,t),!t.input&&Bt.Undef(a.native)||a.native===!0||(r.fc.targetFormDriver("updateWrap",t),v=r.$manager.makeWrap(t,v)),t.none&&(v=Array.isArray(v)?v.map(function(b){return b&&b.__v_isVNode?r.none(b):b}):r.none(v)),l&&r.setCache(t,function(){return r.stable(v)},n),v},this.setCache(t,i,n)}return function(){var u=r.getCache(t);if(u)return u.apply(void 0,arguments);if(!r.cache[t.id]){var c=r.renderCtx(t,t.parent);return c?c():void 0}}}catch(u){return void console.error(u)}},none:function(t){if(t)return Array.isArray(t.props.class)?t.props.class.push("fc-none"):t.props.class=t.props.class?[t.props.class,"fc-none"]:"fc-none",t},stable:function(t){var n=this;return(Array.isArray(t)?t:[t]).forEach(function(r){r&&r.__v_isVNode&&r.children&&ga(r.children)==="object"&&(r.children.$stable=!0,n.stable(r.children))}),t},getModelField:function(t){return t.prop.modelField||t.parser.modelField||this.fc.modelFields[this.vNode.aliasMap[t.type]]||this.fc.modelFields[t.type]||this.fc.modelFields[t.originType]||"modelValue"},isFragment:function(t){return t.type==="fragment"||t.type==="template"},injectProp:function(t){var n=this,r=this.vm.setupState;r.ctxInject[t.id]||(r.ctxInject[t.id]={api:this.$handle.api,form:this.fc.create,subForm:function(i){n.$handle.addSubForm(t,i)},getSubForm:function(){return n.$handle.subForm[t.id]},options:[],children:[],preview:!1,id:t.id,field:t.field,rule:t.rule,input:t.input});var o=r.ctxInject[t.id];return Sn(o,{preview:t.prop.preview,options:t.prop.options,children:t.loadChildrenPending()}),o},ctxProp:function(t){var n=this,r=t.ref,o=t.key,i=t.rule;this.$manager.mergeProp(t),t.parser.mergeProp(t);var a=[{ref:r,key:i.key||"".concat(o,"fc"),slot:void 0,on:{vnodeMounted:function(u){u.el.__rule__=t.rule,n.onMounted(t,u.el)},"fc.updateValue":function(u){n.$handle.onUpdateValue(t,u)},"fc.el":function(u){t.exportEl=u,u&&((u.$el||u).__rule__=t.rule)}}}];if(t.input){this.vm.props.disabled===!0&&(t.prop.props.disabled=!0);var l=this.getModelField(t),s={callback:function(u){n.onInput(t,u)},value:this.$handle.getFormData(t)};a.push({on:hn(Xi({},"update:".concat(l),s.callback),t.prop.modelEmit?Xi({},t.prop.modelEmit,function(){return n.onEmitInput(t)}):{}),props:Xi({},l,s.value)}),t.prop.model=s}return cp(a,t.prop),t.prop},onMounted:function(t,n){t.el=this.vm.refs[t.ref]||n,t.parser.mounted(t),this.$handle.effect(t,"mounted")},onInput:function(t,n){t.prop.modelEmit?this.$handle.onBaseInput(t,n):this.$handle.onInput(t,n)},onEmitInput:function(t){this.$handle.setValue(t,t.parser.toValue(t.modelValue,t),t.modelValue)},renderChildren:function(t,n){var r=this;if(!Bt.trueArray(t))return{};var o=JR();return t.map(function(i){if(i)return Bt.String(i)?o.setSlot(null,i):i.__fc__?r.renderSlot(o,i.__fc__,n):void(i.type&&St(function(){r.$handle.loadChildren(t,n),r.$handle.refresh()}))}),o.getSlots()},defaultRender:function(t,n){var r=t.prop;return r.component?typeof r.component=="string"?this.vNode.make(r.component,r,n):this.vNode.makeComponent(r.component,r,n):this.vNode[t.type]?this.vNode[t.type](r,n):this.vNode[t.originType]?this.vNode[t.originType](r,n):this.vNode.make(bde(r.type),r,n)},renderRule:function(t,n,r){var o=this;if(t){if(Bt.String(t))return t;var i;if(r)i=t.type;else if(i=t.is,t.type){i=Ic(t.type);var a=this.vNode.aliasMap[i];a&&(i=Ic(a))}if(i){var l=JR();Bt.trueArray(t.children)&&t.children.forEach(function(u){u&&l.setSlot(u==null?void 0:u.slot,function(){return o.renderRule(u)})});var s=hn({},t);return delete s.type,delete s.is,this.vNode.make(i,s,l.mergeBag(n).getSlots())}}}})}(tI);var wde=["hook:updated","hook:mounted"];function xde(e,t,n){var r,o=_x(),i=!!t.field;Sn(this,{id:o,ref:o,wrapRef:o+"fi",rule:t,origin:t.__origin__||t,name:t.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:t.subRule?this:null,cacheConfig:null,prop:hn({},t),computed:{},payload:{},refRule:{},input:i,el:void 0,exportEl:void 0,defaultValue:i?Zs(n):void 0,field:t.field||void 0}),this.updateKey(),r=this,Object.defineProperties(r.origin,{__fc__:ude(Fo(r),!0)}),this.update(e,!0)}function JHe(e,t){for(var n=0;n<e.ctrlRule.length;n++){var r=e.ctrlRule[n];if(r.children===t)return r}}function _de(e){return!!e.rule.__ctrl}function Ede(e,t){return typeof t=="function"?""+t:t}Sn(xde.prototype,{getParentGroup:function(){for(var e=this.parent;e;){if(e.group)return e;e=e.parent}},loadChildrenPending:function(){var e=this,t=this.rule.children||[];return Array.isArray(t)?t:this.loadPending({key:"children",origin:t,def:[],onLoad:function(n){e.$handle&&e.$handle.loadChildren(n,e)},onUpdate:function(n,r){e.$handle&&(n===r?e.$handle.loadChildren(n,e):e.$handle.updateChildren(e,n,r))},onReload:function(n){e.$handle?e.$handle.updateChildren(e,[],n):delete e.pending.children}})},loadPending:function(e){var t=this,n=e.key,r=e.origin,o=e.def,i=e.onLoad,a=e.onReload,l=e.onUpdate;if(this.pending[n]&&this.pending[n].origin===r)return this.getPending(n,o);delete this.pending[n];var s=r;if(Bt.Function(r)){var u=Lo(function(){return r({rule:t.rule,api:t.$api,update:function(c){var d=c||o,f=t.getPending(n,o);t.setPending(n,r,d),l&&l(d,f)},reload:function(){var c=t.getPending(n,o);delete t.pending[n],a&&a(c),t.$api&&t.$api.sync(t.rule)}})});u&&Bt.Function(u.then)?(u.then(function(c){var d=c||o;t.setPending(n,r,d),i&&i(d),t.$api&&t.$api.sync(t.rule)}).catch(function(c){console.error(c)}),s=o,this.setPending(n,r,s)):(s=u||o,this.setPending(n,r,s),i&&i(s))}return s},getPending:function(e,t){return this.pending[e]&&this.pending[e].value||t},setPending:function(e,t,n){this.pending[e]={origin:t,value:Qn(n)}},effectData:function(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData:function(e){e===void 0?this.payload={}:delete this.payload[e]},updateKey:function(e){this.key=_x(),e&&this.parent&&this.parent.updateKey(e)},updateType:function(){this.originType=this.rule.type,this.type=Ic(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser:function(e){this.parser=e,e.init(this)},initProp:function(){var e=this,t=hn({},this.rule);delete t.children,this.prop=dp({},[t].concat(xr(Object.keys(this.payload).map(function(n){return e.payload[n]})),[this.computed]))},initNone:function(){this.none=!(Bt.Undef(this.prop.display)||this.prop.display)},injectValidate:function(){var e=this;return Fl(this.prop.validate).map(function(t){if(Bt.Function(t.validator)){var n=hn({},t),r=e;return n.validator=function(){for(var o,i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return(o=t.validator).call.apply(o,[{that:this,id:r.id,field:r.field,rule:r.rule,api:r.$handle.api}].concat(a))},n}return t})},check:function(e){return this.vm===e.vm},unwatch:function(){this.watch.forEach(function(e){return e()}),this.watch=[],this.refRule={}},unlink:function(){this.linkOn.forEach(function(e){return e()}),this.linkOn=[]},link:function(){this.unlink(),this.$handle.appendLink(this)},watchTo:function(){this.$handle.watchCtx(this)},delete:function(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),Sn(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1})},rmCtrl:function(){this.ctrlRule.forEach(function(e){return e.__fc__&&e.__fc__.rm()}),this.ctrlRule=[]},rm:function(){var e=this,t=function(){var n=e.root.indexOf(e.origin);n>-1&&(e.root.splice(n,1),e.$handle&&e.$handle.refresh())};this.deleted?t():this.$handle.noWatch(function(){e.$handle.deferSyncValue(function(){e.rmCtrl(),t(),e.$handle.rmCtx(e),Sn(e,{root:[]})},e.input)})},update:function(e,t){Sn(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!t&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});var Ex={init:function(e){},toFormValue:function(e,t){return e},toValue:function(e,t){return e},mounted:function(e){},render:function(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultRender?t.$handle.fc.renderDriver.defaultRender(t,e):t.$render.defaultRender(t,e)},preview:function(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultPreview?t.$handle.fc.renderDriver.defaultPreview(t,e):this.render(e,t)},mergeProp:function(e){}},ZHe=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"];function Bc(e){var t=this;fde(this,{options:function(){return e.options.value||{}},bus:function(){return e.bus}}),Sn(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:Qn({}),subRuleData:Qn({}),subForm:{},form:Qn({}),appendData:{},providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:function(){t.lifecycle("reload")}}),this.initData(e.rules),this.$manager=new e.manager(this),this.$render=new tI(this),this.api=e.extendApiFn.reduce(function(n,r){return Sn(n,Lo(function(){return r(n,t)},{})),n},function(n){function r(l){return Bt.Undef(l)?l=n.fields():Array.isArray(l)||(l=[l]),l}function o(l,s,u){r(l).forEach(function(c){n.getCtxs(c).forEach(function(d){Js(d.rule,s,u),n.$render.clearCache(d)})})}function i(){var l=n.subForm;return Object.keys(l).reduce(function(s,u){var c=l[u];return c&&(Array.isArray(c)?s.push.apply(s,xr(c)):s.push(c)),s},[])}var a={get config(){return n.options},set config(l){n.fc.options.value=l},get options(){return n.options},set options(l){n.fc.options.value=l},get form(){return n.form},get rule(){return n.rules},get parent(){return n.vm.setupState.parent&&n.vm.setupState.parent.setupState.fapi},get top(){return a.parent?a.parent.top:a},get children(){return i()},get siblings(){var l=n.vm.setupState.getGroupInject();if(l){var s=l.getSubForm();if(Array.isArray(s))return xr(s)}},get index(){var l=a.siblings;if(l){var s=l.indexOf(a);return s>-1?s:void 0}},formData:function(l){return r(l).reduce(function(s,u){var c=n.getFieldCtx(u);return c&&(s[c.field]=p4(c.rule.value)),s},n.options.appendValue!==!1?p4(n.appendData):{})},getValue:function(l){var s=n.getFieldCtx(l);if(s)return p4(s.rule.value)},coverValue:function(l){var s=hn({},l||{});n.deferSyncValue(function(){n.appendData={},a.fields().forEach(function(u){var c=n.fieldCtx[u];if(c){var d=Jo(l,u);c.forEach(function(f){f.rule.value=d?l[u]:void 0}),delete s[u]}}),Sn(n.appendData,s)},!0)},setValue:function(l){var s=l;arguments.length>=2&&(s=Xi({},l,arguments[1])),n.deferSyncValue(function(){Object.keys(s).forEach(function(u){var c=n.fieldCtx[u];if(!c)return n.appendData[u]=s[u];c.forEach(function(d){d.rule.value=s[u]})})},!0)},removeField:function(l){var s=n.getCtx(l);return n.deferSyncValue(function(){n.getCtxs(l).forEach(function(u){u.rm()})},!0),s?s.origin:void 0},removeRule:function(l){var s=l&&_g(l);if(s)return s.rm(),s.origin},fields:function(){return n.fields()},append:function(l,s,u){var c,d=n.sort.length-1,f=n.getCtx(s);if(f)if(u){if(c=f.getPending("children",f.rule.children),!Array.isArray(c))return;d=f.rule.children.length-1}else d=f.root.indexOf(f.origin),c=f.root;else c=n.rules;c.splice(d+1,0,l)},prepend:function(l,s,u){var c,d=0,f=n.getCtx(s);if(f)if(u){if(c=f.getPending("children",f.rule.children),!Array.isArray(c))return}else d=f.root.indexOf(f.origin),c=f.root;else c=n.rules;c.splice(d,0,l)},hidden:function(l,s){o(s,"hidden",!!l),n.refresh()},hiddenStatus:function(l){var s=n.getCtx(l);if(s)return!!s.rule.hidden},display:function(l,s){o(s,"display",!!l),n.refresh()},displayStatus:function(l){var s=n.getCtx(l);if(s)return!!s.rule.display},disabled:function(l,s){r(s).forEach(function(u){n.getCtxs(u).forEach(function(c){Js(c.rule.props,"disabled",!!l)})}),n.refresh()},all:function(l){return Object.keys(n.ctxs).map(function(s){var u=n.ctxs[s];return l?u.origin:u.rule})},model:function(l){return n.fields().reduce(function(s,u){var c=n.fieldCtx[u][0];return s[u]=l?c.origin:c.rule,s},{})},component:function(l){return Object.keys(n.nameCtx).reduce(function(s,u){var c=n.nameCtx[u].map(function(d){return l?d.origin:d.rule});return s[u]=c.length===1?c[0]:c,s},{})},bind:function(){return a.form},reload:function(l){n.reloadRule(l)},updateOptions:function(l){n.fc.updateOptions(l),a.refresh()},onSubmit:function(l){a.updateOptions({onSubmit:l})},sync:function(l){if(Array.isArray(l))l.forEach(function(u){return a.sync(u)});else{var s=Bt.Object(l)?_g(l):n.getCtxs(l);s&&((s=Array.isArray(s)?s:[s]).forEach(function(u){if(!u.deleted){var c=n.subForm[u.id];c&&(Array.isArray(c)?c.forEach(function(d){d.refresh()}):c&&c.refresh()),n.$render.clearCache(u)}}),n.refresh())}},refresh:function(){i().forEach(function(l){l.refresh()}),n.$render.clearCacheAll(),n.refresh()},refreshOptions:function(){n.$manager.updateOptions(n.options),a.refresh()},hideForm:function(l){n.vm.setupState.isShow=!l},changeStatus:function(){return n.changeStatus},clearChangeStatus:function(){n.changeStatus=!1},updateRule:function(l,s){n.getCtxs(l).forEach(function(u){Sn(u.rule,s)})},updateRules:function(l){Object.keys(l).forEach(function(s){a.updateRule(s,l[s])})},mergeRule:function(l,s){n.getCtxs(l).forEach(function(u){dp(u.rule,s)})},mergeRules:function(l){Object.keys(l).forEach(function(s){a.mergeRule(s,l[s])})},getRule:function(l,s){var u=n.getCtx(l);if(u)return s?u.origin:u.rule},getRenderRule:function(l){var s=n.getCtx(l);if(s)return s.prop},getRefRule:function(l){var s=n.getCtxs(l);if(s){var u=s.map(function(c){return c.rule});return u.length===1?u[0]:u}},setEffect:function(l,s,u){var c=n.getCtx(l);c&&s&&(s[0]==="$"&&(s=s.substr(1)),Jo(c.rule,"$"+s)&&Js(c.rule,"$"+s,u),Jo(c.rule,"effect")||(c.rule.effect={}),Js(c.rule.effect,s,u))},clearEffectData:function(l,s){var u=n.getCtx(l);u&&(s&&s[0]==="$"&&(s=s.substr(1)),u.clearEffectData(s),a.sync(l))},updateValidate:function(l,s,u){u?a.mergeRule(l,{validate:s}):o(l,"validate",s)},updateValidates:function(l,s){Object.keys(l).forEach(function(u){a.updateValidate(u,l[u],s)})},refreshValidate:function(){a.refresh()},resetFields:function(l){r(l).forEach(function(s){n.getCtxs(s).forEach(function(u){n.$render.clearCache(u),u.rule.value=p4(u.defaultValue)})}),St(function(){a.clearValidateState()})},method:function(l,s){var u=a.el(l);if(!u||!u[s])throw new Error(rde("err","".concat(s,"\u65B9\u6CD5\u4E0D\u5B58\u5728")));return function(){return u[s].apply(u,arguments)}},exec:function(l,s){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];return Lo(function(){return a.method(l,s).apply(void 0,c)})},toJson:function(l){return lde(a.rule,l)},trigger:function(l,s){for(var u=a.el(l),c=arguments.length,d=new Array(c>2?c-2:0),f=2;f<c;f++)d[f-2]=arguments[f];u&&u.$emit.apply(u,[s].concat(d))},el:function(l){var s=n.getCtx(l);if(s)return s.el||n.vm.refs[s.ref]},closeModal:function(l){n.bus.$emit("fc:closeModal:"+l)},getSubForm:function(l){var s=n.getCtx(l);return s?n.subForm[s.id]:void 0},getChildrenRuleList:function(l){var s=ga(l)==="object",u=s?_g(l):n.getCtx(l),c=u?u.rule:s?l:a.getRule(l);if(!c)return[];var d,f=[];return(d=u?u.loadChildrenPending():c.children)&&d.forEach(function(p){ga(p)==="object"&&(p.field&&f.push(p),f.push.apply(f,xr(a.getChildrenRuleList(p))))}),f},getParentSubRule:function(l){var s=ga(l)==="object"?_g(l):n.getCtx(l);if(s){var u=s.getParentGroup();if(u)return u.rule}},getChildrenFormData:function(l){return a.getChildrenRuleList(l).reduce(function(s,u){return s[u.field]=p4(u.value),s},{})},setChildrenFormData:function(l,s,u){var c=a.getChildrenRuleList(l);n.deferSyncValue(function(){c.forEach(function(d){Jo(s,d.field)?d.value=s[d.field]:u&&(d.value=void 0)})})},getGlobalEvent:function(l){var s=a.options.globalEvent[l];if(s)return ga(s)==="object"&&(s=s.handle),Ud(s)},getGlobalData:function(l){return new Promise(function(s,u){var c=a.options.globalData[l];c||s(n.fc.loadData[l]),c.type==="fetch"?a.fetch(c).then(function(d){s(d)}).catch(u):s(c.data)})},nextTick:function(l){n.bus.$once("next-tick",l),n.refresh()},nextRefresh:function(l){n.nextRefresh(),l&&Lo(l)},deferSyncValue:function(l,s){n.deferSyncValue(l,s)},emit:function(l){for(var s,u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];(s=n.vm).emit.apply(s,[l].concat(c))},bus:n.bus,fetch:function(l){return new Promise(function(s,u){l=Zs(l),l=n.loadFetchVar(l),n.beforeFetch(l).then(function(){return yde(l,n.fc.create.fetch).then(s).catch(u)})})},watchFetch:function(l,s,u){return n.fc.watchLoadData(function(c,d){var f=Zs(l);f=n.loadFetchVar(f,c),n.beforeFetch(f).then(function(){return yde(f,n.fc.create.fetch).then(function(p){s&&s(p,d)}).catch(function(p){u&&u(p)})})})},getData:function(l,s){return n.fc.getLoadData(l,s)},setData:function(l,s){return n.fc.setData(l,s)},refreshData:function(l){return n.fc.refreshData(l)},helper:{tidyFields:r,props:o}};return["on","once","off"].forEach(function(l){a[l]=function(){var s;(s=n.bus)["$".concat(l)].apply(s,arguments)}}),a.changeValue=a.changeField=a.setValue,a}(this))}Sn(Bc.prototype,{initData:function(e){Sn(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init:function(){this.appendData=hn(hn(hn({},this.options.formData||{}),this.fc.vm.props.modelValue||{}),this.appendData),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle("created")},isBreakWatch:function(){return this.loading||this.noWatchFn||this.reloading},beforeFetch:function(e){var t=this;return new Promise(function(n){var r=t.options.beforeFetch&&Lo(function(){return t.options.beforeFetch(e,{api:t.api})});r&&Bt.Function(r.then)?r.then(n):n()})}}),function(e){Sn(e.prototype,{parseInjectEvent:function(t,n){var r=t.inject||this.options.injectEvent;return this.parseEventLst(t,n,r)},parseEventLst:function(t,n,r,o){var i=this;return Object.keys(n).forEach(function(a){var l=i.parseEvent(t,n[a],r,o);l&&(n[a]=l)}),n},parseEvent:function(t,n,r,o){if(Bt.Function(n)&&(r!==!1&&!Bt.Undef(r)||n.__inject))return this.inject(t,n,r);if(!o&&Array.isArray(n)&&n[0]&&(Bt.String(n[0])||Bt.Function(n[0])))return this.parseEventLst(t,n,r,!0);if(Bt.String(n)){var i=Ud(n);if(i&&n!==i)return i.__inject?this.parseEvent(t,i,r,!0):i}},parseEmit:function(t){var n=this,r={},o=t.rule,i=o.emitPrefix,a=o.field,l=o.name,s=o.inject,u=o.emit||[];return Bt.trueArray(u)&&u.forEach(function(c){if(c){var d,f=i||a||l;if(Bt.Object(c)&&(d=c.inject,f=(c=c.name).prefix||f),f){var p=d4("".concat(f,"-").concat(c)),m=function(){var g,b,y;n.vm.emitsOptions&&(n.vm.emitsOptions[p]=null);for(var w=arguments.length,x=new Array(w),_=0;_<w;_++)x[_]=arguments[_];(g=n.vm).emit.apply(g,[p].concat(x)),(b=n.vm).emit.apply(b,["emit-event",p].concat(x)),(y=n.bus).$emit.apply(y,[p].concat(x))};if(m.__emit=!0,d||s!==!1){var v=d||s||n.options.injectEvent;r[c]=Bt.Undef(v)?m:n.inject(o,m,v)}else r[c]=m}}}),t.computed.on=r,r},getInjectData:function(t,n){var r=t.__fc__&&t.__fc__.$api,o=(t.__fc__&&t.__fc__.$handle.vm||this.vm.props).props,i=o.option,a=o.rule;return{$f:r||this.api,api:r||this.api,rule:a,self:t.__origin__,option:i,inject:n}},inject:function(t,n,r){if(n.__origin){if(this.watching&&!this.loading)return n;n=n.__origin}var o=this,i=function(){for(var a=o.getInjectData(t,r),l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return a.args=[].concat(s),s.unshift(a),n.apply(this,s)};return i.__origin=n,i.__json=n.__json,i},loadStrVar:function(t,n){var r=this;if(t&&typeof t=="string"&&t.indexOf("{{")>-1&&t.indexOf("}}")>-1){var o,i=t,a=function(l){for(var s,u=/{{\s*(.*?)\s*}}/g,c={};(s=u.exec(l))!==null;)s[1]&&(c[s[1]]=!0);return Object.keys(c)}(t);if(a.forEach(function(l){var s=l.split("||"),u=s[0].trim();if(u){var c=(s[1]||"").trim(),d=n?n(u,c):r.fc.getLoadData(u,c);o=d,t=t.replaceAll("{{".concat(l,"}}"),d??"")}}),a.length===1&&i==="{{".concat(a[0],"}}"))return o}return t},loadFetchVar:function(t,n){var r=this,o=function(l){return r.loadStrVar(l,n)};if(t.action=o(t.action),t.headers){var i={};Object.keys(t.headers).forEach(function(l){i[o(l)]=o(t.headers[l])}),t.headers=i}if(t.data){var a={};Object.keys(t.data).forEach(function(l){a[o(l)]=o(t.data[l])}),t.data=a}return t}})}(Bc),function(e){Sn(e.prototype,{usePage:function(){var t=this,n=this.options.page;if(n){var r=25,o=function(i){return i.length<31?31:Math.ceil(i.length/3)}(this.rules);Bt.Object(n)&&(n.first&&(r=parseInt(n.first,10)||r),n.limit&&(o=parseInt(n.limit,10)||o)),Sn(this,{first:r,limit:o,pageEnd:this.rules.length<=r}),this.bus.$on("page-end",function(){return t.vm.emit("page-end",t.api)}),this.pageLoad()}},pageLoad:function(){var t=this;this.bus.$on(wde,function n(){t.pageEnd?(t.bus.$off(wde,n),t.bus.$emit("page-end")):(t.first+=t.limit,t.pageEnd=t.rules.length<=t.first,t.loadRule(),t.refresh())})}})}(Bc),function(e){Sn(e.prototype,{clearNextTick:function(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick:function(t){var n=this;this.clearNextTick(),this.nextTick=setTimeout(function(){t(),n.nextTick=null},10)},render:function(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}(Bc),function(e){Sn(e.prototype,{nextRefresh:function(t){var n=this,r=this.loadedId;St(function(){r===n.loadedId&&(t?t():n.refresh())})},parseRule:function(t){var n=this,r=dde(t);return Object.defineProperties(r,{__origin__:ude(t,!0)}),function(o){var i={props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0};Object.keys(i).forEach(function(a){Jo(o,a)||(o[a]=i[a])})}(r),this.appendValue(r),[r,r.prefix,r.suffix].forEach(function(o){o&&n.loadFn(o,r)}),this.loadCtrl(r),r.update&&(r.update=Ud(r.update)),r},loadFn:function(t,n){var r=this;["on","props","deep"].forEach(function(o){t[o]&&r.parseInjectEvent(n,t[o])})},loadCtrl:function(t){t.control&&t.control.forEach(function(n){n.handle&&(n.handle=Ud(n.handle))})},syncProp:function(t){var n=this,r=t.rule;Bt.trueArray(r.sync)&&cp([{on:r.sync.reduce(function(o,i){return o["update:".concat(i)]=function(a){r.props[i]=a,n.vm.emit("sync",i,a,r,n.fapi)},o},{})}],t.computed)},loadRule:function(){var t=this;this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit("load-start"),this.deferSyncValue(function(){if(t._loadRule(t.rules),t.loading=!1,t.cycleLoad&&t.pageEnd)return t.loadRule();t.syncForm(),t.pageEnd&&t.bus.$emit("load-end"),t.vm.setupState.renderRule()})},loadChildren:function(t,n){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit("load-start"),this._loadRule(t,n),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit("load-end"),this.$render.clearCache(n)},_loadRule:function(t,n){var r=this,o=function l(s){var u=t[s-1];if(!u||!u.__fc__)return s>0?l(s-1):-1;var c=r.sort.indexOf(u.__fc__.id);return c>-1?c:l(s-1)},i=function(l,s){Bt.trueArray(l)&&r._loadRule(l,s)},a=t.map(function(l,s){if((!n||Bt.Object(l))&&(r.pageEnd||n||!(s>=r.first))){if(l.__fc__&&l.__fc__.root===t&&r.ctxs[l.__fc__.id])return i(l.__fc__.loadChildrenPending(),l.__fc__),l.__fc__;var u,c=dde(l),d=function(){return!(!c.field||!r.fieldCtx[c.field]||r.fieldCtx[c.field][0]===l.__fc__)};r.fc.targetFormDriver("loadRule",{rule:c,api:r.api},r.fc),r.ruleEffect(c,"init",{repeat:d()}),d()&&r.vm.emit("repeat-field",l,r.api);var f=!1,p=!!l.__fc__,m=c.value;if(p){if(m=(u=l.__fc__).defaultValue,u.deleted){if(_de(u))return;u.update(r)}else if(!u.check(r)){if(_de(u))return;t[s]=l=l._clone?l._clone():QR(l),u=null,f=!0}}if(u)u.originType!==u.rule.type&&u.updateType(),r.bindParser(u),r.appendValue(u.rule),u.parent&&u.parent!==n&&r.rmSubRuleData(u);else{var v=r.parseRule(l);u=new xde(r,v,m),r.bindParser(u)}r.parseEmit(u),r.syncProp(u),u.parent=n||null,u.root=t,r.setCtx(u),!f&&!p&&r.effect(u,"load"),r.effect(u,"created");var g=u.loadChildrenPending();if(u.parser.loadChildren===!1||i(g,u),!n){var b=o(s);b>-1||!s?r.sort.splice(b+1,0,u.id):r.sort.push(u.id)}var y=u.rule;return u.updated||(u.updated=!0,Bt.Function(y.update)&&r.bus.$once("load-end",function(){r.refreshUpdate(u,y.value,"init")}),r.effect(u,"loaded")),r.refreshControl(u)&&(r.cycleLoad=!0),u}}).filter(function(l){return!!l});n&&(n.children=a)},refreshControl:function(t){return t.input&&t.rule.control&&this.useCtrl(t)},useCtrl:function(t){var n=this,r=function(c){var d=c.rule.control||[];return Bt.Object(d)?[d]:d}(t),o=[],i=this.api;if(!r.length)return!1;for(var a=function(c){var d=r[c],f=d.handle||function(m){return(f1[d.condition||"=="]||f1["=="])(m,d.value)};if(!Bt.trueArray(d.rule))return"continue";var p=hn(hn({},d),{},{valid:Lo(function(){return f(t.rule.value,i)}),ctrl:JHe(t,d.rule),isHidden:Bt.String(d.rule[0])});if(p.valid&&p.ctrl||!p.valid&&!p.ctrl&&!p.isHidden)return"continue";o.push(p)},l=0;l<r.length;l++)a(l);if(!o.length)return!1;var s=[],u=!1;return this.deferSyncValue(function(){o.reverse().forEach(function(c){var d=c.isHidden,f=c.valid,p=c.rule,m=c.prepend,v=c.append,g=c.child,b=c.ctrl,y=c.method;if(d)return f?t.ctrlRule.push({__ctrl:!0,children:p,valid:f}):t.ctrlRule.splice(t.ctrlRule.indexOf(b),1),void s[f?"push":"unshift"](function(){y==="disabled"?n.api.disabled(!f,p):y==="display"?n.api.display(f,p):y==="required"?(p.forEach(function(_){n.api.setEffect(_,"required",f)}),f||n.api.clearValidateState(p)):n.api.hidden(!f,p)});if(f){u=!0;var w={type:"fragment",native:!0,__ctrl:!0,children:p};t.ctrlRule.push(w),n.bus.$once("load-start",function(){m?i.prepend(w,m,g):v||g?i.append(w,v||t.id,g):t.root.splice(t.root.indexOf(t.origin)+1,0,w)})}else{t.ctrlRule.splice(t.ctrlRule.indexOf(b),1);var x=_g(b);x&&x.rm()}})}),s.length&&St(function(){s.forEach(function(c){return c()})}),this.vm.emit("control",t.origin,this.api),this.effect(t,"control"),u},reloadRule:function(t){return this._reloadRule(t)},_reloadRule:function(t){var n=this;t||(t=this.rules);var r=hn({},this.ctxs);this.clearNextTick(),this.initData(t),this.fc.rules=t,this.deferSyncValue(function(){n.bus.$once("load-end",function(){Object.keys(r).filter(function(o){return n.ctxs[o]===void 0}).forEach(function(o){return n.rmCtx(r[o])}),n.$render.clearCacheAll()}),n.reloading=!0,n.loadRule(),n.reloading=!1,n.refresh(),n.bus.$emit("reloading",n.api)}),this.bus.$off("next-tick",this.nextReload),this.bus.$once("next-tick",this.nextReload),this.bus.$emit("update",this.api)},refresh:function(){this.vm.setupState.refresh()}})}(Bc),function(e){Sn(e.prototype,{setValue:function(t,n,r,o){t.deleted||(t.rule.value=n,this.changeStatus=!0,this.nextRefresh(),this.$render.clearCache(t),this.setFormData(t,r),this.syncValue(),this.valueChange(t,n),this.vm.emit("change",t.field,n,t.origin,this.api,o||!1),this.effect(t,"value"),this.emitEvent("change",t.field,n,{rule:t.origin,api:this.api,setFlag:o||!1}))},onInput:function(t,n){var r;t.input&&(this.isQuote(t,r=t.parser.toValue(n,t))||this.isChange(t,n))&&this.setValue(t,r,n)},onUpdateValue:function(t,n){var r=this;this.deferSyncValue(function(){var o=t.getParentGroup(),i=o?r.subRuleData[o.id]:null,a={};Object.keys(n||{}).forEach(function(l){i&&Jo(i,l)?a[l]=n[l]:Jo(r.api.form,l)?r.api.form[l]=n[l]:r.api.top!==r.api&&Jo(r.api.top.form,l)&&(r.api.top.form[l]=n[l])}),Object.keys(a).length&&r.api.setChildrenFormData(o.rule,a)})},onBaseInput:function(t,n){this.setFormData(t,n),t.modelValue=n,this.nextRefresh(),this.$render.clearCache(t)},setFormData:function(t,n){t.modelValue=n;var r=t.getParentGroup();r&&(this.subRuleData[r.id]||(this.subRuleData[r.id]={}),this.subRuleData[r.id][t.field]=t.rule.value),Js(this.formData,t.id,n)},rmSubRuleData:function(t){var n=t.getParentGroup();n&&this.subRuleData[n.id]&&delete this.subRuleData[n.id][t.field]},getFormData:function(t){return this.formData[t.id]},syncForm:function(){var t=this,n=Qn({}),r=this.fields();this.options.appendValue!==!1&&Object.keys(this.appendData).reduce(function(o,i){return r.indexOf(i)===-1&&(o[i]=dr(t.appendData,i)),o},n),r.reduce(function(o,i){var a=t.getCtx(i);return o[i]=dr(a.rule,"value"),o},n),this.form=n,this.syncValue()},appendValue:function(t){t.field&&Jo(this.appendData,t.field)&&(t.value=this.appendData[t.field],delete this.appendData[t.field])},addSubForm:function(t,n){this.subForm[t.id]=n},deferSyncValue:function(t,n){this.deferSyncFn||(this.deferSyncFn=t),this.deferSyncFn.sync||(this.deferSyncFn.sync=n),Lo(t),this.deferSyncFn===t&&(this.deferSyncFn=null,t.sync&&this.syncForm())},syncValue:function(){if(this.deferSyncFn)return this.deferSyncFn.sync=!0;this.vm.setupState.updateValue(hn({},this.form))},isChange:function(t,n){return JSON.stringify(this.getFormData(t),Ede)!==JSON.stringify(n,Ede)},isQuote:function(t,n){return(Bt.Object(n)||Array.isArray(n))&&n===t.rule.value},refreshUpdate:function(t,n,r,o){var i=this;if(Bt.Function(t.rule.update)){var a=Lo(function(){return t.rule.update(n,t.origin,i.api,{origin:r||"change",linkField:o})});if(a===void 0)return;t.rule.hidden=a===!0}},valueChange:function(t,n){this.refreshRule(t,n),this.bus.$emit("change-"+t.field,n)},refreshRule:function(t,n,r,o){this.refreshControl(t)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit("update",this.api),this.refresh()),this.refreshUpdate(t,n,r,o)},appendLink:function(t){var n=this,r=t.rule.link;Bt.trueArray(r)&&r.forEach(function(o){var i=function(){return n.refreshRule(t,t.rule.value,"link",o)};n.bus.$on("change-"+o,i),t.linkOn.push(function(){return n.bus.$off("change-"+o,i)})})},fields:function(){return Object.keys(this.fieldCtx)}})}(Bc),function(e){Sn(e.prototype,{getCtx:function(t){return this.getFieldCtx(t)||this.getNameCtx(t)[0]||this.ctxs[t]},getCtxs:function(t){return this.fieldCtx[t]||this.nameCtx[t]||(this.ctxs[t]?[this.ctxs[t]]:[])},setIdCtx:function(t,n,r){var o="".concat(r,"Ctx");this[o][n]?this[o][n].push(t):this[o][n]=[t]},rmIdCtx:function(t,n,r){var o="".concat(r,"Ctx"),i=this[o][n];if(!i)return!1;var a=i.splice(i.indexOf(t)>>>0,1).length>0;return i.length||delete this[o][n],a},getFieldCtx:function(t){return(this.fieldCtx[t]||[])[0]},getNameCtx:function(t){return this.nameCtx[t]||[]},setCtx:function(t){var n=t.id,r=t.field,o=t.name,i=t.rule;this.ctxs[n]=t,o&&this.setIdCtx(t,o,"name"),t.input&&(this.setIdCtx(t,r,"field"),this.setFormData(t,t.parser.toFormValue(i.value,t)),this.isMounted&&!this.reloading&&this.vm.emit("change",t.field,i.value,t.origin,this.api))},getParser:function(t){var n=this.fc.parsers,r=this.fc.renderDriver;if(r){var o=r.parsers||{},i=o[t.originType]||o[Ic(t.type)]||o[t.trueType];if(i)return i}return n[t.originType]||n[Ic(t.type)]||n[t.trueType]||Ex},bindParser:function(t){t.setParser(this.getParser(t))},getType:function(t){var n=this.fc.CreateNode.aliasMap,r=n[t]||n[Ic(t)]||t;return Ic(r)},noWatch:function(t){this.noWatchFn||(this.noWatchFn=t),Lo(t),this.noWatchFn===t&&(this.noWatchFn=null)},watchCtx:function(t){var n=this;if(nde().filter(function(o){return o[0]!=="_"&&o[0]!=="$"&&ZHe.indexOf(o)===-1}).forEach(function(o){var i=dr(t.rule,o),a=o==="children";t.refRule[o]=i,t.watch.push(Je(a?function(){return Bt.Function(i.value)?i.value:xr(i.value||[])}:function(){return i.value},function(l,s){var u=i.value;if(!n.isBreakWatch()){if(a&&t.parser.loadChildren===!1)return n.$render.clearCache(t),void n.nextRefresh();n.watching=!0,o!=="link"?(["props","on","deep"].indexOf(o)>-1?(n.parseInjectEvent(t.rule,u||{}),o==="props"&&t.input&&n.setFormData(t,t.parser.toFormValue(t.rule.value,t))):o==="emit"?n.parseEmit(t):o==="hidden"&&!!u!=!!s?n.$render.clearCacheAll():["prefix","suffix"].indexOf(o)>-1?u&&n.loadFn(u,t.rule):o==="type"?(t.updateType(),n.bindParser(t)):a&&(Bt.Function(s)&&(s=t.getPending("children",[])),Bt.Function(u)&&(u=t.loadChildrenPending()),n.updateChildren(t,u,s)),n.$render.clearCache(t),n.refresh(),n.watching=!1):t.link()}},{deep:!a,sync:a}))}),t.input){var r=dr(t.rule,"value");t.watch.push(Je(function(){return r.value},function(){var o=t.parser.toFormValue(r.value,t);n.isChange(t,o)&&n.setValue(t,r.value,o,!0)}))}this.bus.$once("load-end",function(){var o=t.rule.computed;o&&(ga(o)!=="object"&&(o={value:o}),Object.keys(o).forEach(function(i){t.watch.push(Je(function(){var a=o[i];if(a){var l;if(ga(a)==="object"){var s=t.getParentGroup(),u=function d(f){if(f=Array.isArray(f)?{mode:"AND",group:f}:f,!Bt.trueArray(f.group))return!0;for(var p=f.mode==="OR",m=!0,v=0;v<f.group.length;v++){var g=f.group[v],b=void 0;if(b=g.mode?d(g):!!f1[g.condition]&&new Function("_$","_$val","$form","_group","with($form){with(this){with(_group){ return _$['".concat(g.condition,"'](").concat(g.field,", ").concat(g.compare?g.compare:"_$val","); }}}")).call(n.api.form,f1,g.value,n.api.top.form,s&&n.subRuleData[s.id]||{}),p&&b)return!0;p||(m=m&&b)}return!p&&m}(a);return a.invert===!0?!u:u}if(Bt.Function(a))l=function(){return a(n.api.form,n.api)};else{var c=t.getParentGroup();l=function(){return new Function("_formulas","$form","_group","$rule","$api","with($form){with(this){with(_group){with(_formulas){ return ".concat(a," }}}}")).call(n.api.form,n.fc.formulas,n.api.top.form,c&&n.subRuleData[c.id]||{},t.rule,n.api)}}return Lo(l,void 0)}},function(a){setTimeout(function(){i==="value"?n.onInput(t,a):i[0]==="$"?n.api.setEffect(t.id,i,a):h4(t.rule,i,a)})},{immediate:i!=="value"||[void 0,null,""].indexOf(t.rule.value)>-1}))}))}),this.watchEffect(t)},updateChildren:function(t,n,r){var o=this;this.deferSyncValue(function(){r&&r.forEach(function(i){(n||[]).indexOf(i)===-1&&i&&!Bt.String(i)&&i.__fc__&&i.__fc__.parent===t&&o.rmCtx(i.__fc__)}),Bt.trueArray(n)&&(o.loadChildren(n,t),o.bus.$emit("update",o.api))})},rmSub:function(t){var n=this;Bt.trueArray(t)&&t.forEach(function(r){r&&r.__fc__&&n.rmCtx(r.__fc__)})},rmCtx:function(t){var n=this;if(!t.deleted){var r=t.id,o=t.field,i=t.input,a=t.name;d1(this.ctxs,r),d1(this.formData,r),d1(this.subForm,r),d1(this.vm.setupState.ctxInject,r);var l=t.getParentGroup();l&&this.subRuleData[l.id]&&d1(this.subRuleData[l.id],o),t.group&&d1(this.subRuleData,r),i&&this.rmIdCtx(t,o,"field"),a&&this.rmIdCtx(t,a,"name"),i&&!Jo(this.fieldCtx,o)&&d1(this.form,o),this.deferSyncValue(function(){if(!n.reloading){if(t.parser.loadChildren!==!1){var u=t.getPending("children",t.rule.children);Bt.trueArray(u)&&u.forEach(function(c){return c.__fc__&&n.rmCtx(c.__fc__)})}t.root===n.rules&&n.vm.setupState.renderRule()}},i);var s=this.sort.indexOf(r);return s>-1&&this.sort.splice(s,1),this.$render.clearCache(t),t.delete(),this.effect(t,"deleted"),i&&!this.fieldCtx[o]&&this.vm.emit("remove-field",o,t.rule,this.api),t.rule.__ctrl||this.vm.emit("remove-rule",t.rule,this.api),t}}})}(Bc),function(e){Sn(e.prototype,{mounted:function(){var t=this,n=function(){t.isMounted=!0,t.lifecycle("mounted")};this.pageEnd?n():this.bus.$once("page-end",n)},lifecycle:function(t){this.fc.targetFormDriver(t,this.api,this.fc),this.vm.emit(t,this.api),this.emitEvent(t,this.api)},emitEvent:function(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var a=this.options[t]||this.options[Ic("on-"+t)];if(a){var l=Ud(a);Bt.Function(l)&&Lo(function(){return l.apply(void 0,o)})}(n=this.bus).$emit.apply(n,[t].concat(o))}})}(Bc),function(e){Sn(e.prototype,{useProvider:function(){var t=this,n=this.fc.providers;Object.keys(n).forEach(function(r){var o=n[r];Bt.Function(o)&&(o=o(t.fc)),o._c=function(i){var a=i.components;if(Array.isArray(a)){var l=function(s){return s.filter(function(u,c,d){return d.indexOf(u,0)===c})}(a.filter(function(s){return s!=="*"}));return!!l.length&&l}return!!Bt.String(a)&&[a]}(o),t.onEffect(o),t.providers[r]=o})},onEffect:function(t){var n=this,r=[];(t._c||["*"]).forEach(function(o){var i=o==="*"?"*":n.getType(o);r.indexOf(i)>-1||(r.push(i),n.bus.$on("p:".concat(t.name,":").concat(i,":").concat(t.input?1:0),function(a,l){t[a]&&t[a].apply(t,xr(l))}))}),t._used=r},watchEffect:function(t){var n=this,r={required:function(){var o,i;return(Jo(t.rule,"$required")?t.rule.$required:(o=t.rule)===null||o===void 0||(i=o.effect)===null||i===void 0?void 0:i.required)||!1}};Object.keys(t.rule.effect||{}).forEach(function(o){r[o]=function(){return t.rule.effect[o]}}),Object.keys(t.rule).forEach(function(o){o[0]==="$"&&(r[o.substr(1)]=function(){return t.rule[o]})}),Object.keys(r).forEach(function(o){t.watch.push(Je(r[o],function(i){n.effect(t,"watch",Xi({},o,i))},{deep:!0}))})},ruleEffect:function(t,n,r){this.emitEffect({rule:t,input:!!t.field,type:this.getType(t.type)},n,r)},effect:function(t,n,r){this.emitEffect({rule:t.rule,input:t.input,type:t.trueType,ctx:t,custom:r},n)},getEffect:function(t,n){return Jo(t,"$"+n)?t["$"+n]:Jo(t,"effect")&&Jo(t.effect,n)?t.effect[n]:void 0},emitEffect:function(t,n,r){var o=this,i=t.ctx,a=t.rule,l=t.input,s=t.type,u=t.custom;if(s&&!(["fcFragment","fragment"].indexOf(s)>-1)){var c=u||Object.keys(a).reduce(function(d,f){return f[0]==="$"&&(d[f.substr(1)]=a[f]),d},hn({},a.effect||{}));Object.keys(c).forEach(function(d){var f=o.providers[d];if(f&&(!f.input||l)){var p;if(f._c){if(!(f._used.indexOf(s)>-1))return;p=s}else p="*";var m=hn({value:c[d],getValue:function(){return o.getEffect(a,d)}},r||{});i&&(m.getProp=function(){return i.effectData(d)},m.clearProp=function(){return i.clearEffectData(d)},m.mergeProp=function(v){return dp(m.getProp(),[v])},m.id=i.id),o.bus.$emit("p:".concat(d,":").concat(p,":").concat(f.input?1:0),n,[m,a,o.api])}})}}})}(Bc);var nI=Te({name:"fcFragment",inheritAttrs:!1,props:["vnode"],render:function(){return this.vnode}});function Cde(e,t){var n=e.directives;return n?(Array.isArray(n)||(n=[n]),nn(t,n.reduce(function(r,o){return r.concat(function(i){return Object.keys(i).map(function(a){var l=i[a],s=gm(a);if(s)return[s,l.value,l.arg,l.modifiers]}).filter(function(a){return!!a})}(o))},[]))):t}function e$e(e){var t=function(){(function(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),i&&UR(o,i)})(r,Sde);var n=bHe(r);function r(){return function(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}(this,r),n.apply(this,arguments)}return r}();return Object.assign(t.prototype,e),t}function Sde(e){Sn(this,{$handle:e,vm:e.vm,options:{},ref:"fcForm",mergeOptionsRule:{normal:["form","row","info","submitBtn","resetBtn"]}}),this.updateKey(),this.init()}Sn(Sde.prototype,{__init:function(){var e=this;this.$render=this.$handle.$render,this.$r=function(){var t;return(t=e.$render).renderRule.apply(t,arguments)}},updateKey:function(){this.key=_x()},init:function(){},update:function(){},beforeRender:function(){},form:function(){return this.vm.refs[this.ref]},getSlot:function(e){return function t(n){if(n){var r=n.slots[e];return r||t(n.setupState.parent)}}(this.vm)},mergeOptions:function(e,t){var n=this;return cp(e.map(function(r){return n.tidyOptions(r)}),t,this.mergeOptionsRule)},updateOptions:function(e){this.$handle.fc.targetFormDriver("updateOptions",e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()},tidyOptions:function(e){return e},tidyRule:function(e){},mergeProp:function(e){},getDefaultOptions:function(){return{}},render:function(e){}});var rI={name:"componentValidate",load:function(e,t,n){var r=e.getValue();r?e.getProp().validate=[{validator:function(){var o=_g(t);if(o){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return n.exec.apply(n,[o.id,r===!0?"formCreateValidate":r].concat(a,[{attr:e,rule:t,api:n}]))}}}]:(e.clearProp(),n.clearValidateState([t.field]))},watch:function(){rI.load.apply(rI,arguments)}},t$e={fetch:function(e){function t(r,o,i){var a=r.value;n.deleted(r),Bt.Function(a)&&(a=a(o,i)),a=function(d){return Bt.String(d)&&(d={action:d,to:"options"}),d}(a);var l=function(d){d===void 0?r.clearProp():h4(r.getProp(),a.to||"options",d),i.sync(o)};if(a&&(a.action||a.key)){if((a=Zs(a)).to||(a.to="options"),a.key){var s=e.$handle.options.globalData[a.key];if(!s)return void l(void 0);if(s.type==="static")return void l(s.data);a=hn(hn({},a),s)}var u=a.onError,c=function(){if(!r.getValue())return r.clearProp(),i.sync(o),!0};n._fn[r.id]=e.watchLoadData(xg(function(d,f){if(f&&a.watch===!1)return n._fn[r.id]();var p=e.$handle.loadFetchVar(Zs(a),d),m=hn(hn({headers:{}},p),{},{onSuccess:function(v,g){if(!c()){var b=function(w){return g?w:Jo(w,"data")?w.data:w},y=Ud(p.parse);Bt.Function(y)?b=y:y&&Bt.String(y)&&(b=function(w){return p1(w,y)}),l(b(v,o,i)),i.sync(o)}},onError:function(v){l(void 0),c()||(u||function(g){return KR(g.message||"fetch fail "+p.action)})(v,o,i)}});e.$handle.beforeFetch(m,{rule:o,api:i}).then(function(){Bt.Function(p.action)?p.action(o,i).then(function(v){m.onSuccess(v,!0)}).catch(function(v){m.onError(v)}):Lo(function(){return e.create.fetch(m,{inject:r,rule:o,api:i})})})},a.wait||600))}else l(void 0)}var n={name:"fetch",_fn:[],mounted:function(){t.apply(void 0,arguments)},watch:function(){t.apply(void 0,arguments)},deleted:function(r){this._fn[r.id]&&this._fn[r.id](),r.clearProp()}};return n},loadData:function(e){var t={name:"loadData",_fn:[],mounted:function(n,r,o){this.deleted(n);var i=Fl(n.getValue()),a=[];i.forEach(function(l){if(l&&(l.attr||l.template)){var s=e.watchLoadData(xg(function(u){var c;c=l.template?e.$handle.loadStrVar(l.template,u):u(l.attr,l.default),l.copy!==!1&&(c=Zs(c));var d=l.modify?r:n.getProp();l.to==="child"?d.children?d.children[0]=c:d.children=[c]:h4(d,l.to||"options",c),o.sync(r)},l.wait||300));l.watch!==!1?a.push(s):s()}}),this._fn[n.id]=a},deleted:function(n){this._fn[n.id]&&this._fn[n.id].forEach(function(r){r()}),n.clearProp()}};return t.watch=t.created,t},componentValidate:rI},n$e={name:"html",loadChildren:!1,render:function(e,t){return t.prop.props.innerHTML=e.default(),t.vNode.make(t.prop.props.tag||"div",t.prop)},renderChildren:function(e){return{default:function(){return e.filter(function(t){return Bt.String(t)}).join("")}}}};function r$e(e){e+="=";for(var t=decodeURIComponent(document.cookie).split(";"),n=0;n<t.length;n++){for(var r=t[n];r.charAt(0)===" ";)r=r.substring(1);if(r.indexOf(e)===0){r=r.substring(e.length,r.length);try{return JSON.parse(r)}catch{return r}}}return null}function o$e(e){var t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return t}return null}function kde(e,t){if(!t)return null;var n=t.split("."),r=e(n.shift());return n.length?r==null?null:p1(r,n):r}function i$e(e){return kde(r$e,e)}function a$e(e){return kde(o$e,e)}function l$e(e,t){var n;return arguments.length===2?t=(n=arguments[1])[e]:n=arguments[2],{id:t,prop:n}}function oI(){return l$e.apply(void 0,["name"].concat(Array.prototype.slice.call(arguments)))}var s$e=1,eu={};function Dde(e){var t,n=Xi({},nI.name,nI),r={},o={},i={},a={},l=[],s=[],u=[e.extendApi],c=hn({},t$e),d={create:YHe,factory:Oa},f={global:{}},p=Qn({}),m=function(){var ne={};function se(){}return Sn(se.prototype,{make:function(le,J,Z){return Cde(J,this.h(le,pde(J),Z))},makeComponent:function(le,J,Z){try{return Cde(J,ie(le,pde(J),Z))}catch(ye){return console.error(ye),ie("")}},h:function(le,J,Z){var ye=dn().appContext.config.isNativeTag(le);ye&&delete J.formCreateInject;try{return ie(ye?le:Qe(le),J,Z)}catch(be){return console.error(be),ie("")}},aliasMap:ne}),Sn(se,{aliasMap:ne,alias:function(le,J){ne[le]=J},use:function(le){Object.keys(le).forEach(function(J){var Z=d4(J),ye=Ade(J).toLocaleLowerCase(),be=le[J];[J,Z,ye].forEach(function(ve){se.alias(J,be),se.prototype[ve]=function(Ae,Ce){return this.make(be,Ae,Ce)}})})}}),se}(),v={},g=e.isMobile===!0;function b(ne){var se=eu[ne];return Array.isArray(se)?se.map(function(le){return le.api()}):se?se.api():void 0}function y(ne){l.push(ne)}function w(){var ne=oI.apply(void 0,arguments);ne.id&&ne.prop&&(o[ne.id]=ne.prop)}function x(){var ne=oI.apply(void 0,arguments);ne.id&&ne.prop&&(c[ne.id]=hn(hn({},ne.prop),{},{name:ne.id}))}function _(ne){m.use(ne)}function E(){var ne=oI.apply(void 0,arguments);if(!ne.id||!ne.prop)return Ex;var se=Ic(ne.id),le=ne.prop,J=le.merge===!0?r[se]:void 0;r[se]=ZR(le,J||Ex),d[se]=Oa(se),le.maker&&Sn(d,le.maker)}function C(ne,se){var le;if(Bt.String(ne)){if(le=ne,se===void 0)return n[le]}else le=ne.displayName||ne.name,se=ne;if(le&&se){var J=Ic(le);n[le]=se,n[J]=se,delete m.aliasMap[le],delete m.aliasMap[J],delete r[le],delete r[J],se.formCreateParser&&E(le,se.formCreateParser)}}function T(){return WHe(W,n,o)}function k(){return nI}function I(ne,se){return Bt.Function(ne.install)?ne.install(O,se):Bt.Function(ne)&&ne(O,se),this}function O(ne,se){var le=function(Z,ye){var be=T();return K7({data:function(){return Qn({rule:Z,option:ye})},render:function(){return pn(be,hn({ref:"fc"},this.$data))}})}(ne,se||{});l.forEach(function(Z){Lo(function(){return Z(O,le)})});var J=document.createElement("div");return((se==null?void 0:se.el)||document.body).appendChild(J),le.mount(J).$refs.fc.fapi}function F(ne){var se=hn({},e);return ne?se.inherit={components:n,parsers:r,directives:o,modelFields:i,providers:c,useApps:l,maker:d,formulas:v,loadData:p}:delete se.inherit,Dde(se)}function N(ne,se){i[ne]=se}function B(ne,se){v[ne]=se}function L(ne,se){var le=a[ne]||{},J=le.parsers||{};se.parsers&&Object.keys(se.parsers).forEach(function(Z){J[Z]=ZR(se.parsers[Z],Ex)}),se.name=ne,a[ne]=hn(hn(hn({},le),se),{},{parsers:J})}function V(ne){ne&&Object.keys(eu).forEach(function(se){(Array.isArray(eu[se])?eu[se]:[eu[se]]).forEach(function(le){le.bus.$emit("$loadData."+ne)})})}function P(ne,se){p[ne]=se,V(ne)}function H(ne,se){var le=function(){for(var J=arguments.length,Z=new Array(J),ye=0;ye<J;ye++)Z[ye]=arguments[ye];return Lo(function(){return se.apply(void 0,Z)})};le._driver=!0,P(ne,le)}function U(ne,se){var le=(ne||"").split(".");ne=le.shift();var J=le.join(".");if(Jo(p,ne)){var Z=p[ne];return Z&&Z._driver?Z=Z(J):le.length&&(Z=p1(Z,le)),Z==null||Z===""?se:Z}return se}function G(ne){u.push(ne)}function z(ne){delete p[ne],V(ne)}function $(ne,se){s.push({name:ne,callback:se})}function W(ne){var se=this;Sn(this,{id:s$e++,create:O,vm:ne,manager:e$e(e.manager),parsers:r,providers:c,modelFields:i,formulas:v,isMobile:g,rules:ne.props.rule,name:ne.props.name||_x(),inFor:ne.props.inFor,prop:{components:n,directives:o},drivers:a,renderDriver:null,setData:P,getData:U,refreshData:V,loadData:p,CreateNode:m,bus:new $ce,unwatch:[],options:de({}),extendApiFn:u,fetchCache:new WeakMap}),s.forEach(function(le){se.bus.$on(le.name,le.callback)}),St(function(){Je(se.options,function(){se.$handle.$manager.updateOptions(se.options.value),se.api().refresh()},{deep:!0})}),Sn(ne.appContext.components,n),Sn(ne.appContext.directives,o),this.$handle=new Bc(this),this.name&&(this.inFor?(eu[this.name]||(eu[this.name]=[]),eu[this.name].push(this)):eu[this.name]=this)}function K(ne){Sn(ne,{version:e.version,ui:e.ui,extendApi:G,getData:U,setDataDriver:H,setData:P,removeData:z,refreshData:V,maker:d,component:C,directive:w,setModelField:N,setFormula:B,setDriver:L,register:x,$vnode:k,parser:E,use:I,factory:F,componentAlias:_,copyRule:QR,copyRules:cde,fetch:gde,$form:T,parseFn:Ud,parseJson:qHe,toJson:lde,useApp:y,getApi:b,on:$})}if(function(ne){var se=ne.key||[],le=ne.array||[],J=ne.normal||[];qR.push.apply(qR,xr(se)),wx.push.apply(wx,xr(le)),xx.push.apply(xx,xr(J)),vde([].concat(xr(se),xr(le),xr(J)))}(e.attrs||{}),W.isMobile=g,Sn(W.prototype,{init:function(){var ne=this;this.isSub()&&this.unwatch.push(Je(function(){return ne.vm.setupState.parent.setupState.fc.options.value},function(){ne.initOptions(),ne.$handle.api.refresh()},{deep:!0})),this.vm.props.driver&&(this.renderDriver=ga(this.vm.props.driver)==="object"?this.vm.props.driver:this.drivers[this.vm.props.driver]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targetFormDriver:function(ne){for(var se=this,le=arguments.length,J=new Array(le>1?le-1:0),Z=1;Z<le;Z++)J[Z-1]=arguments[Z];if(this.renderDriver&&this.renderDriver[ne])return Lo(function(){var ye;return(ye=se.renderDriver)[ne].apply(ye,J)})},globalDataDriver:function(ne){var se=this,le=ne.split("."),J=le.shift(),Z=this.options.value.globalData&&this.options.value.globalData[J];if(Z){if(Z.type==="static")return p1(Z.data,le);var ye,be=this.fetchCache.get(Z);if(be){if(be.status&&(ye=p1(be.data,le)),!be.loading)return ye;be.loading=!1,this.fetchCache.set(Z,be)}else this.fetchCache.set(Z,{status:!1});var ve=xg(function(){Ce();var _e=se.fetchCache.get(Z);se.options.value.globalData&&Object.values(se.options.value.globalData).indexOf(Z)!==-1?(_e&&(_e.loading=!0,se.fetchCache.set(Z,_e)),se.bus.$emit("$loadData.$globalData."+J)):se.fetchCache.delete(Z)},Z.wait||600),Ae=function(_e){se.fetchCache.set(Z,{status:!0,data:_e}),se.bus.$emit("$loadData.$globalData."+J)},Ce=this.watchLoadData(function(_e,ke){if(ke&&Z.watch===!1)return Ce();if(ke)ve();else{var Be=se.$handle.loadFetchVar(GR(Z),_e);se.$handle.api.fetch(Be).then(function($e){Ae($e)}).catch(function($e){Ae(null)})}});return this.unwatch.push(Ce),ye}},globalVarDriver:function(ne){var se=this,le=ne.split(".").shift(),J=this.options.value.globalVariable&&this.options.value.globalVariable[le];if(J){var Z=Bt.Function(J)?J:J.handle;if(Z){var ye,be=this.watchLoadData(function(ve,Ae){if(Ae)return be(),se.bus.$emit("$loadData.$var."+le),ye;ye=Lo(function(){return Z(ve,se.$handle.api)})});return this.unwatch.push(be),ye}}},getLoadData:function(ne,se){var le=null;if(ne!=null){var J=ne.split("."),Z=J.shift();Z==="$form"?le=this.$handle.api.top.formData():Z==="$subForm"?le=this.$handle.api.formData():Z==="$options"?le=this.options.value:Z==="$globalData"?(le=this.globalDataDriver(J.join(".")),J=[]):Z==="$var"?(le=this.globalVarDriver(J.join(".")),J=[]):(le=U(ne,se),J=[]),J.length&&(le=p1(le,J))}return le==null||le===""?se:le},watchLoadData:function(ne){var se=this,le={},J=function(be){Lo(function(){ne(Z,be)})},Z=function(be,ve){if(le[be])return le[be].val;var Ae=se.getLoadData(be,ve),Ce=be.split("."),_e=Ce.shift(),ke=Ce.shift()||"",Be=xg(function(){if(_e!==be){var $e=se.getLoadData(be,ve);JSON.stringify($e)!==JSON.stringify(le[be].val)&&(le[be].val=$e,J(!0))}else J(!0)},0);return se.bus.$on("$loadData."+_e,Be),ke&&se.bus.$on("$loadData."+_e+"."+ke,Be),le[be]={fn:function(){se.bus.$off("$loadData."+_e,Be),ke&&se.bus.$off("$loadData."+_e+"."+ke,Be)},val:Ae},Ae};J(!1);var ye=function(){Object.keys(le).forEach(function(be){return le[be].fn()}),le={}};return this.unwatch.push(ye),ye},isSub:function(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions:function(){this.options.value={};var ne=hn({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},Zs(f));this.isSub()&&(ne=this.mergeOptions(ne,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),ne=this.mergeOptions(ne,this.vm.props.option),this.updateOptions(ne)},mergeOptions:function(ne,se,le){return se=Zs(se),le&&["page","onSubmit","mounted","reload","formData","el","globalClass","style"].forEach(function(J){delete se[J]}),se.global&&(ne.global=function(J,Z){return J?(Object.keys(Z||{}).forEach(function(ye){Z[ye]&&(J[ye]=dp(J[ye]||{},Z[ye]))}),J):Z}(ne.global,se.global),delete se.global),this.$handle.$manager.mergeOptions([se],ne),ne},updateOptions:function(ne){this.options.value=this.mergeOptions(this.options.value,ne),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit("$loadData.$options")},api:function(){return this.$handle.api},render:function(){return this.$handle.render()},mounted:function(){this.$handle.mounted()},unmount:function(){var ne=this;if(this.name)if(this.inFor){var se=eu[this.name].indexOf(this);eu[this.name].splice(se,1)}else delete eu[this.name];s.forEach(function(le){ne.bus.$off(le.name,le.callback)}),this.unwatch.forEach(function(le){return le()}),this.unwatch=[],this.$handle.reloadRule([])},updated:function(){var ne=this;this.$handle.bindNextTick(function(){return ne.bus.$emit("next-tick",ne.$handle.api)})}}),K(O),Sn(t=O,{create:O,isMobile:g,install:function(ne,se){f=hn(hn({},f),se||{});var le="_installedFormCreate_"+e.ui;if(ne[le]!==!0){ne[le]=!0;var J=function(ye){return O(ye,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{})};K(J),ne.config.globalProperties.$formCreate=J;var Z=T();ne.component(Z.name,Z),l.forEach(function(ye){Lo(function(){return ye(t,ne)})})}}}),H("$cookie",i$e),H("$localStorage",a$e),m.use({fragment:"fcFragment"}),e.install&&O.use(e),y(function(ne,se){se.mixin({props:["formCreateInject"]})}),E(n$e),e.inherit){var X=e.inherit;X.components&&Sn(n,X.components),X.parsers&&Sn(r,X.parsers),X.directives&&Sn(o,X.directives),X.modelFields&&Sn(i,X.modelFields),X.providers&&Sn(c,X.providers),X.useApps&&Sn(l,X.useApps),X.maker&&Sn(d,X.maker),X.loadData&&Sn(p,X.loadData),X.formulas&&Sn(v,X.formulas)}var te=T();return ZR(te,O),Object.defineProperties(te,{fetch:{get:function(){return O.fetch},set:function(ne){O.fetch=ne}}}),te.util=O,te}var iI,Ode={date:"YYYY-MM-DD",month:"YYYY-MM",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"},Tde="datePicker",u$e={name:Tde,maker:["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce(function(e,t){return e[t]=Oa(Tde,{type:t.toLowerCase()}),e},{}),mergeProp:function(e){var t=e.prop.props;t.valueFormat||(t.valueFormat=Ode[t.type]||Ode.date)}},aI="hidden",c$e={name:aI,maker:Xi({},aI,function(e,t){return Oa(aI)("",e,t)}),render:function(){return[]}},lI="input",d$e={name:lI,maker:(iI=["password","url","email","text","textarea"].reduce(function(e,t){return e[t]=Oa(lI,{type:t}),e},{}),iI.idate=Oa(lI,{type:"date"}),iI),mergeProp:function(e){var t=e.prop.props;t&&t.autosize&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},Mde="slider",f$e={name:Mde,maker:{sliderRange:Oa(Mde,{range:!0})},toFormValue:function(e,t){var n=Array.isArray(e),r=t.prop.props,o=r.min||0;return r.range===!0?n?e:[o,parseFloat(e)||o]:n?parseFloat(e[0])||o:parseFloat(e)}},sI="timePicker",p$e={name:sI,maker:{time:Oa(sI,function(e){return e.props.isRange=!1}),timeRange:Oa(sI,function(e){return e.props.isRange=!0})},mergeProp:function(e){var t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")}},h$e=[u$e,c$e,d$e,f$e,p$e,{name:"FcRow",render:function(e,t){return t.vNode.col({props:{span:24}},{default:function(){return[t.vNode.row(t.prop,e)]}})}},{name:"select",toFormValue:function(e,t){return t.prop.props.multiple&&!Array.isArray(e)?Fl(e):e}}],v$e={button:"el-button",icon:"el-icon",slider:"el-slider",rate:"el-rate",upload:"fc-upload",cascader:"el-cascader",popover:"el-popover",tooltip:"el-tooltip",colorPicker:"el-colorPicker",timePicker:"el-time-picker",timeSelect:"el-time-select",datePicker:"el-date-picker",switch:"el-switch",select:"fc-select",checkbox:"fc-checkbox",radio:"fc-radio",inputNumber:"el-input-number",number:"el-input-number",input:"el-input",formItem:"el-form-item",form:"el-form",frame:"fc-frame",col:"el-col",row:"el-row",tree:"fc-tree",autoComplete:"el-autocomplete",auto:"el-autocomplete",group:"fc-group",object:"fc-sub-form",subForm:"fc-sub-form"};function Nde(e,t){var n;Jo(e,t)&&Bt.String(e[t])&&(e[t]=(Xi(n={},t,e[t]),Xi(n,"show",!0),n))}function Wd(e){return e===!1}function uI(e){var t=hn({},e);return delete t.children,t}var m$e={validate:function(){var e=this.form();return e?e.validate():new Promise(function(t){return t()})},validateField:function(e){var t=this;return new Promise(function(n,r){var o=t.form();o?o.validateField(e,function(i,a){a?r(a):n(i)}):n()})},clearValidateState:function(e){var t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},tidyOptions:function(e){return["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(function(t){(function(n,r){Jo(n,r)&&!Bt.Object(n[r])&&(n[r]={show:!!n[r]})})(e,t)}),e},tidyRule:function(e){var t=e.prop;return Nde(t,"title"),Nde(t,"info"),t},mergeProp:function(e){e.prop=cp([{info:this.options.info||{},wrap:this.options.wrap||{},col:this.options.col||{},title:this.options.title||{}},e.prop],{info:{trigger:"hover",placement:"top-start",icon:!0},title:{},col:{span:24},wrap:{}},{normal:["title","info","col","wrap"]})},getDefaultOptions:function(){return{form:{inline:!1,labelPosition:"right",labelWidth:"125px",disabled:!1,size:void 0},row:{show:!0,gutter:0},submitBtn:{type:"primary",loading:!1,disabled:!1,innerText:"\u63D0\u4EA4",show:!0,col:void 0,click:void 0},resetBtn:{type:"default",loading:!1,disabled:!1,innerText:"\u91CD\u7F6E",show:!1,col:void 0,click:void 0}}},update:function(){var e=this.options.form;this.rule={props:hn({},e),on:{submit:function(t){t.preventDefault()}},class:[e.className,e.class,"form-create",this.options.preview?"is-preview":""],style:e.style,type:"form"}},beforeRender:function(){var e=this.key,t=this.ref,n=this.$handle;Sn(this.rule,{key:e,ref:t}),Sn(this.rule.props,{model:n.formData})},render:function(e){var t=this;return e.slotLen()&&!this.options.preview&&e.setSlot(void 0,function(){return t.makeFormBtn()}),this.$r(this.rule,Wd(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap:function(e,t){var n=this,r=e.prop,o="".concat(this.key).concat(e.key),i=r.col,a=this.isTitle(r)&&r.wrap.title!==!1,l=i.labelWidth||a?i.labelWidth:0,s=this.rule.props,u=s.inline,c=s.col;delete r.wrap.title;var d=Wd(r.wrap.show)?t:this.$r(cp([r.wrap,{props:hn(hn({labelWidth:l===void 0?l:Ade(l),label:a?r.title.title:void 0},uI(r.wrap||{})),{},{prop:e.id,rules:e.injectValidate()}),class:r.className,key:"".concat(o,"fi"),ref:e.wrapRef,type:"formItem"}]),hn({default:function(){return t}},a?{label:function(){return n.makeInfo(r,o,e)}}:{}));return u===!0||Wd(c)||Wd(i.show)?d:this.makeCol(r,o,[d])},isTitle:function(e){if(this.options.form.title===!1)return!1;var t=e.title;return!(!t.title&&!t.native||Wd(t.show))},makeInfo:function(e,t,n){var r=this,o=hn({},e.title),i=hn({},e.info),a=i.type==="tooltip",l=this.options.form,s=this.getSlot("title"),u=[s?s({title:o.title||"",rule:n.rule,options:this.options}):(o.title||"")+(l.labelSuffix||l["label-suffix"]||"")];if(!Wd(i.show)&&(i.info||i.native)&&!Wd(i.icon)){var c={type:i.type||"popover",props:uI(i),key:"".concat(t,"pop")};delete c.props.icon,delete c.props.show,delete c.props.info,delete c.props.align,delete c.props.native;var d="content";i.info&&!Jo(c.props,d)&&(c.props[d]=i.info),u[i.align!=="left"?"unshift":"push"](this.$r(cp([i,c]),Xi({},o.slot||(a?"default":"reference"),function(){return r.$r({type:"ElIcon",style:"top:2px",key:"".concat(t,"i")},{default:function(){return r.$r({type:i.icon===!0?"icon-warning":i.icon})}},!0)})))}var f=cp([o,{props:uI(o),key:"".concat(t,"tit"),type:o.type||"span"}]);return delete f.props.show,delete f.props.title,delete f.props.native,this.$r(f,u)},makeCol:function(e,t,n){var r=e.col;return this.$r({class:r.class,type:"col",props:r||{span:24},key:"".concat(t,"col")},n)},makeRow:function(e){var t=this.options.row||{};return this.$r({type:"row",props:t,class:t.class,key:"".concat(this.key,"row")},e)},makeFormBtn:function(){var e=[];if(Wd(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),Wd(this.options.resetBtn.show)||e.push(this.makeResetBtn()),e.length){var t=this.$r({type:"formItem",key:"".concat(this.key,"fb")},e);return this.rule.props.inline===!0?t:this.$r({type:"col",props:{span:24},key:"".concat(this.key,"fc")},[t])}},makeResetBtn:function(){var e=this,t=hn({},this.options.resetBtn),n=t.innerText;return delete t.innerText,delete t.click,delete t.col,delete t.show,this.$r({type:"button",props:t,class:"_fc-reset-btn",style:{width:t.width},on:{click:function(){var r=e.$handle.api;e.options.resetBtn.click?e.options.resetBtn.click(r):r.resetFields()}},key:"".concat(this.key,"b2")},[n])},makeSubmitBtn:function(){var e=this,t=hn({},this.options.submitBtn),n=t.innerText;return delete t.innerText,delete t.click,delete t.col,delete t.show,this.$r({type:"button",props:t,class:"_fc-submit-btn",style:{width:t.width},on:{click:function(){var r=e.$handle.api;e.options.submitBtn.click?e.options.submitBtn.click(r):r.submit().catch(function(){})}},key:"".concat(this.key,"b1")},[n])}},h1={};(function(e){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","radio","rate"].forEach(function(t){e[t]=Oa(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker})(h1),function(e){var t="select",n="multiple";e.selectMultiple=Oa(t,Xi({},n,!0)),e.selectOne=Oa(t,Xi({},n,!1))}(h1),function(e){var t={treeSelected:"selected",treeChecked:"checked"};Object.keys(t).reduce(function(n,r){return n[r]=Oa("tree",{type:t[r]}),n},e)}(h1),function(e){var t={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(t).reduce(function(n,r){return n[r]=Oa("upload",function(o){return o.props({uploadType:t[r][0],maxLength:t[r][1]})}),n},e),e.uploadImage=e.image,e.uploadFile=e.file}(h1),function(e){var t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};Object.keys(t).reduce(function(n,r){return n[r]=Oa("frame",function(o){return o.props({type:t[r][0],maxLength:t[r][1]})}),n},e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages}(h1);function Fde(e,t){return Bt.Boolean(e)?e={show:e}:Bt.Undef(e)||Bt.Object(e)||(e={show:t}),e}function g$e(e,t){return{formEl:function(){return t.$manager.form()},wrapEl:function(n){var r=t.getFieldCtx(n);if(r)return t.vm.refs[r.wrapRef]},validate:function(n){return new Promise(function(r,o){var i=e.children,a=[t.$manager.validate()];i.forEach(function(l){a.push(l.validate())}),Promise.all(a).then(function(){r(!0),n&&n(!0)}).catch(function(l){o(l),n&&n(l),t.vm.emit("validate-fail",l,{api:e})})})},validateField:function(n,r){return new Promise(function(o,i){var a=t.getFieldCtx(n);if(a){var l=t.subForm[a.id],s=[t.$manager.validateField(a.id)];Fl(l).forEach(function(u){s.push(u.validate())}),Promise.all(s).then(function(){o(null),r&&r(null)}).catch(function(u){i(u),r&&r(u),t.vm.emit("validate-field-fail",u,{field:n,api:e})})}})},clearValidateState:function(n){var r=this,o=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];e.helper.tidyFields(n).forEach(function(i){o&&r.clearSubValidateState(i),t.getCtxs(i).forEach(function(a){t.$manager.clearValidateState(a)})})},clearSubValidateState:function(n){e.helper.tidyFields(n).forEach(function(r){t.getCtxs(r).forEach(function(o){var i=t.subForm[o.id];i&&(Array.isArray(i)?i.forEach(function(a){a.clearValidateState()}):i&&i.clearValidateState())})})},btn:{loading:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e.submitBtnProps({loading:!!n})},disabled:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e.submitBtnProps({disabled:!!n})},show:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e.submitBtnProps({show:!!n})}},resetBtn:{loading:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e.resetBtnProps({loading:!!n})},disabled:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e.resetBtnProps({disabled:!!n})},show:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e.resetBtnProps({show:!!n})}},submitBtnProps:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=Fde(t.options.submitBtn,!0);Sn(r,n),t.options.submitBtn=r,e.refreshOptions()},resetBtnProps:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=Fde(t.options.resetBtn,!1);Sn(r,n),t.options.resetBtn=r,e.refreshOptions()},submit:function(n,r){return new Promise(function(o,i){e.validate().then(function(){var a=e.formData();Bt.Function(n)&&Lo(function(){return n(a,e)}),Bt.Function(t.options.onSubmit)&&Lo(function(){return t.options.onSubmit(a,e)}),t.vm.emit("submit",a,e),o(a)}).catch(function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];Bt.Function(r)&&Lo(function(){return r.apply(void 0,[e].concat(l))}),i.apply(void 0,l)})})}}}bx(".form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before,.form-create.is-preview .fc-clock{display:none!important}.fc-wrap-left .el-form-item__label{justify-content:flex-start;justify-content:flex-end}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item .el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--large .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item .el-form-item__label{line-height:20px;margin-bottom:4px}");var cI={name:"required",load:function(e,t,n){var r=function(a){return Bt.Boolean(a)?{required:a}:Bt.String(a)?{message:a}:Bt.Undef(a)?{required:!1}:Bt.Function(a)?{validator:a}:Bt.Object(a)?a:{}}(e.getValue());if(r.required===!1)e.clearProp(),n.clearValidateState([t.field]);else{var o=hn({required:!0,validator:function(a,l,s){Bt.empty(l)?s(o.message):s()}},r);if(!o.message){var i=t.title||"";o.message=((ga(i)==="object"?i.title:i)||"")+"\u4E0D\u80FD\u4E3A\u7A7A"}e.getProp().validate=[o]}n.sync(t)},watch:function(){cI.load.apply(cI,arguments)}};function y$e(e){e.componentAlias(v$e),UHe.forEach(function(t){e.component(t.name,t)}),e.register(cI),h$e.forEach(function(t){e.parser(t)}),Object.keys(h1).forEach(function(t){e.maker[t]=h1[t]}),typeof window<"u"&&window.ElementPlus&&e.useApp(function(t,n){n.use(window.ElementPlus)})}_d=Dde({ui:"element-ui",version:"3.2.8",manager:m$e,extendApi:g$e,install:y$e,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}}),typeof window<"u"&&(window.formCreate=_d),_d.maker,function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}.CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;border:0!important;width:auto}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:-50px}.CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;overflow:hidden;position:relative}.CodeMirror-scroll{height:100%;margin-bottom:-50px;margin-right:-50px;outline:none;overflow:scroll!important;padding-bottom:50px;position:relative;z-index:0}.CodeMirror-sizer{border-right:50px solid transparent;position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{display:none;outline:none;position:absolute;z-index:5}.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}.CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-50px;vertical-align:top;white-space:normal}.CodeMirror-gutter-wrapper{background:none!important;border:none!important;position:absolute;z-index:4}.CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}.CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{word-wrap:normal;-webkit-tap-highlight-color:transparent;background:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;z-index:2}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}.CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-hints{background:#fff;border:1px solid silver;border-radius:3px;box-shadow:2px 3px 5px #0003;font-family:monospace;font-size:90%;list-style:none;margin:0;max-height:20em;overflow:hidden;overflow-y:auto;padding:2px;position:absolute;z-index:1}.CodeMirror-hint{border-radius:2px;color:#000;cursor:pointer;margin:0;padding:0 4px;white-space:pre}li.CodeMirror-hint-active{background:#08f;color:#fff}._fd-fn{display:flex;flex-direction:column;height:100%;position:relative;width:100%}._fd-fn .el-button{bottom:3px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;position:absolute;right:5px}._fd-fn-editor{display:flex;flex:1;overflow:scroll;width:100%}._fd-fn-editor .CodeMirror{height:100%;width:100%}._fd-fn-tip{color:#000;direction:ltr;font-family:monospace}._fd-fn-tip .cm-keyword{color:#708;line-height:24px;overflow-x:auto;white-space:nowrap}._fd-fn-tip .cm-keyword::-webkit-scrollbar{background-color:transparent;height:0;width:0}._fd-fn-ind{background-color:#f7f7f7;border-right:1px solid #ddd;display:inline-block;float:left;height:24px;margin-right:4px;width:29px}._fd-fn-arg{cursor:pointer;text-decoration:underline}._fd-fn-arg i{color:#3073ff;font-size:12px}._fd-event .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-event .el-badge{width:100%}._fd-event-dialog .el-dialog__body{padding:10px 20px}._fd-event-con .el-main{padding:0}._fd-event-l,._fd-event-r{border:1px solid #ececec;display:flex;flex:1;flex-direction:column;height:100%}._fd-event-dropdown .el-dropdown-menu{max-height:500px;overflow:scroll}._fd-event-head{align-items:center;background:#f8f9ff;border-bottom:1px solid #eee;display:flex;padding:5px 15px}._fd-event-head .el-button.is-link{color:#2f73ff}._fd-event-r{border-left:0}._fd-event-r ._fd-event-head{justify-content:space-between}._fd-event-l>.el-main,._fd-event-r>.el-main{box-sizing:border-box;display:flex;flex:1;flex-basis:auto;flex-direction:row;min-width:0;width:100%}._fd-event-item,._fd-event-r>.el-main{flex-direction:column}._fd-event-item{display:flex;font-size:14px;justify-content:center;max-width:250px;overflow:hidden;white-space:pre-wrap}._fd-event-l .el-menu{border-right:0;border-top:0;overflow:auto;padding:0 10px 5px;width:100%}._fd-event-l .el-menu-item.is-active{background:#e4e7ed;color:#303133}._fd-event-l .el-menu-item{border:1px solid #ececec;border-radius:5px;height:auto;line-height:1em;margin-top:5px;padding:0}._fd-event-method{color:#9d238c;display:flex;flex-direction:column;font-family:monospace;font-size:14px;justify-content:center;overflow:hidden;white-space:pre-wrap;width:225px}._fd-event-method>span:first-child,._fd-fn-list-method>span:first-child{color:#9d238c}._fd-event-method>span:first-child>span,._fd-fn-list-method>span:first-child>span{color:#000;margin-left:10px}._fd-event-title{align-items:center;display:flex;justify-content:space-between;padding:10px 0;width:100%}._fd-event-title .fc-icon{color:#282828;font-size:18px;margin-right:6px}._fd-event-title .el-input{width:200px}._fd-event-title .el-input__wrapper{box-shadow:none}._fd-event-title .el-menu-item.is-active i{color:#282828}._fd-event-con .CodeMirror{height:100%;width:100%}._fd-event-con .CodeMirror-wrap pre.CodeMirror-line{padding-left:20px}._fd-drag-tool{word-wrap:break-word;box-sizing:border-box;display:block;min-height:20px;outline:1px dashed var(--fc-tool-border-color);overflow:hidden;padding:2px;position:relative;transition:outline-color .3s ease;word-break:break-all}._fd-drag-tool ._fd-drag-tool{height:calc(100% - 6px);margin:3px}._fd-drag-tool+._fd-drag-tool{margin-top:5px}._fd-drag-tool.active{outline:2px solid #2e73ff}._fd-drag-tool.active>div>._fd-drag-btn{display:flex}._fd-drag-tool._fd-drop-hover ._fd-drag-box{padding-bottom:15px!important;padding-top:15px!important}._fd-drag-tool ._fd-drag-btn{display:none}.drag-r{bottom:2px;right:2px}._fd-drag-l,.drag-r{position:absolute;z-index:2}._fd-drag-l{left:0;top:0}._fd-drag-btn{background-color:#2e73ff;color:#fff;cursor:pointer;float:left;height:18px;justify-content:center;line-height:20px;padding-bottom:1px;text-align:center;width:18px}._fd-drag-btn+._fd-drag-btn{margin-left:2px}._fd-drag-danger{background-color:#ff2e2e}._fd-drag-btn i{font-size:14px}._fd-drag-mask{bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}._fd-struct,._fd-struct .el-badge{width:100%}._fd-struct .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-struct .CodeMirror{height:450px}._fd-struct .CodeMirror-line{font-size:13px!important;line-height:16px!important}._fd-struct-con .CodeMirror-lint-tooltip{z-index:1!important}._fd-struct-con .el-dialog__body{padding:0 20px}._fd-row,._fd-html-editor{width:100%}._fd-html-editor .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-html-editor-con .CodeMirror{height:450px}._fd-html-editor-con .CodeMirror-line{font-size:13px!important;line-height:16px!important}._fd-html-editor-con .CodeMirror-lint-tooltip{z-index:1!important}._fd-html-editor-con .el-dialog__body{padding:0 20px}._fd-struct-editor{flex:1;width:100%}._fd-struct-editor>div{height:100%}._fd-gfc,._fd-gfc .el-badge{width:100%}._fd-gfc .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-gfc-dialog .el-tabs__header{margin-bottom:0}._fd-gfc-dialog .form-create{margin-top:15px}._fd-gfc-con .CodeMirror{height:100%;width:100%}._fd-gfc-con .CodeMirror-wrap pre.CodeMirror-line{padding-left:20px}._fd-color-input{width:150px}._fd-color-input .el-input .el-color-picker{margin:0}._fd-color-input .el-input .el-input-group__append{padding:0;width:24px}._fd-color-input .el-input .el-color-picker__trigger{border-left:0;border-radius:0 3px 3px 0}._fd-size-input{align-items:center;display:flex}._fd-size-input .el-input-number--small{width:122px}._fd-size-input .el-button{font-size:14px;margin-left:3px;padding:5px;width:25px}._fd-field-input{width:100%}._fd-field-input .el-input-group__append{color:#606266;cursor:pointer;margin:0;padding:0;width:25px}._fd-fn-list,._fd-fn-list .el-badge{width:100%}._fd-fn-list .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-fn-list-dialog .el-dialog__body{padding:10px 20px}._fd-fn-list-con .el-main{padding:0}._fd-fn-list-l,._fd-fn-list-r{border:1px solid #ececec;display:flex;flex:1;flex-direction:column;height:100%}._fd-fn-list-head{align-items:center;background:#f8f9ff;border-bottom:1px solid #eee;display:flex;padding:5px 15px}._fd-fn-list-head .el-button.is-link{color:#2f73ff}._fd-fn-list-r{border-left:0}._fd-fn-list-r ._fd-fn-list-head{justify-content:flex-end}._fd-fn-list-l>.el-main,._fd-fn-list-r>.el-main{box-sizing:border-box;display:flex;flex:1;flex-basis:auto;flex-direction:row;min-width:0;width:100%}._fd-fn-list-r>.el-main{flex-direction:column}._fd-fn-list-l .el-menu{border-right:0;border-top:0;overflow:auto;padding:0 10px 5px;width:100%}._fd-fn-list-l .el-menu-item.is-active{background:#e4e7ed;color:#303133}._fd-fn-list-l .el-menu-item{border:1px solid #ececec;border-radius:5px;height:auto;line-height:1em;margin-top:5px;padding:0}._fd-fn-list-method{display:flex;flex-direction:column;font-family:monospace;font-size:14px;justify-content:center;line-height:1em;overflow:hidden;padding:10px 0;white-space:pre-wrap;width:100%}._fd-fn-list-method-info>span:first-child,._fd-fn-list-method>span:first-child{color:#9d238c}._fd-fn-list-method-info>span:first-child>span,._fd-fn-list-method>span:first-child>span{color:#000;margin-left:10px}._fd-fn-list-con .CodeMirror{height:100%;width:100%}._fd-fn-list-con .CodeMirror-wrap pre.CodeMirror-line{padding-left:20px}._fd-table-view{overflow:auto}._fd-table-view-cell{background:#fff;border:1px inset rgba(0,0,0,.1);height:100%;min-height:50px}._fd-table-view-cell>._fd-drag-tool{border:0;height:100%;margin:0}._fd-table-view-btn{flex-direction:column;padding:0}._fd-table-view-btn .fc-icon{color:#fff;font-size:16px;width:18px}._fd-table-view-icon{color:#fff;display:flex;height:100%;justify-content:center;margin-top:1px;width:100%}._fd-table-view>table{border-bottom:1px solid #ebeef5;border-right:1px solid #ebeef5;border-color:#ebeef5 currentcolor currentcolor #ebeef5;border-style:solid none none solid;border-width:1px 0 0 1px;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fd-table-view tr{min-height:50px}._fd-table-view td{border-bottom:0;border-right:0;border-color:currentcolor #ebeef5 #ebeef5 currentcolor;border-style:none solid solid none;border-width:0 1px 1px 0;box-sizing:border-box;min-height:50px;min-width:80px;overflow-wrap:break-word;padding:5px;position:relative;white-space:nowrap}._fd-tableCell-drag{height:100%}._fc-table{overflow:auto}._fc-table>table{border-bottom:1px solid #ebeef5;border-right:1px solid #ebeef5;border-color:#ebeef5 currentcolor currentcolor #ebeef5;border-style:solid none none solid;border-width:1px 0 0 1px;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table td,._fc-table tr{min-height:50px}._fc-table td{border-bottom:0;border-right:0;border-color:currentcolor #ebeef5 #ebeef5 currentcolor;border-style:none solid solid none;border-width:0 1px 1px 0;box-sizing:border-box;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fd-validate .append-msg{cursor:pointer}._fd-validate .el-input-group__append{padding:0 10px}._fd-required{align-items:center;display:flex;width:100%}._fd-required .el-input{margin-left:15px}._fd-required .el-switch{height:28px}._td-table-opt[data-v-75561980]{width:100%}._td-table-opt-handle[data-v-75561980]{align-items:center;display:flex;justify-content:space-between;padding-right:5px}._fd-tree-opt ._fd-tree-opt-btn{background-color:#2f73ff;color:#fff;cursor:pointer;float:left;height:19px;justify-content:center;line-height:20px;padding-bottom:1px;text-align:center;width:18px}._fd-tree-opt-node{align-items:center;display:flex}._fd-tree-opt-first{margin-right:5px;width:60px}._fd-tree-opt-last{width:110px}._fd-tree-opt ._fd-tree-opt-danger{background-color:#ff2d2e;border-radius:0 2px 2px 0}._fd-tree-opt .el-tree-node__content{height:28px;margin-bottom:3px}._fd-tree-opt .el-input__inner{border-right:0}._fd-tree-opt .el-input-group__append{background:#fff;padding-left:1px;padding-right:2px;width:90px}._fd-table-form{background:#fff;border:1px solid #ececec;width:100%}._fc-child-empty,._fd-table-form{min-height:130px}._fd-tf-wrap{display:flex;overflow:auto}._fd-tf-wrap>._fd-drag-tool{display:flex;flex-shrink:0;height:auto;margin:2px}._fc-table-form{color:#666;overflow:auto}._fc-table-form .form-create .el-form-item{margin-bottom:1px}._fc-table-form .form-create .el-form-item.is-error{margin-bottom:22px}._fc-table-form .el-form-item__label{display:none!important}._fc-table-form .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-tf-head-idx,._fc-tf-idx{font-weight:500;min-width:40px;text-align:center;width:40px}._fc-tf-btn,._fc-tf-edit{min-width:70px;text-align:center;width:70px}._fc-tf-btn .fc-icon{cursor:pointer}._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,._fc-table-form._fc-disabled>.el-button{cursor:not-allowed}._fc-tf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table-form ._fc-tf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-table-form ._fc-tf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-table-form tr{min-height:50px}._fc-table-form ._fc-read-view{text-align:center;width:100%}._fc-table-form td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-table-form td+td{border-left:1px solid #ebeef5}._fc-tf-table .el-cascader,._fc-tf-table .el-date-editor,._fc-tf-table .el-input-number,._fc-tf-table .el-select,._fc-tf-table .el-slider{width:100%}._fd-tf-col ._fd-tf-con .el-form-item{margin-bottom:1px}._fd-tf-col{display:flex;flex-direction:column;flex-shrink:0;flex-wrap:wrap;width:180px}._fd-tf-con .el-form-item__label{display:none!important}._fd-tf-con{display:flex;flex:1;width:100%}._fd-tf-con .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fd-tf-title{align-items:center;border-bottom:1px solid #ebeef5;display:flex;height:40px;margin-bottom:0;padding-left:5px;width:100%!important}._fd-tf-con ._fc-l-item{display:flex;flex-shrink:0;margin-top:4px;width:100%}._fd-tf-con ._fc-l-item>*{display:none!important}._fd-tf-con .el-cascader,._fd-tf-con .el-date-editor,._fd-tf-con .el-input-number,._fd-tf-con .el-select,._fd-tf-con .el-slider{width:100%}._fc-designer{--fc-drag-empty:"\\62d6\\62fd\\5de6\\4fa7\\5217\\8868\\4e2d\\7684\\7ec4\\4ef6\\5230\\6b64\\5904";--fc-child-empty:"\\70b9\\51fb\\53f3\\4e0b\\89d2 \\e789 \\6309\\94ae\\6dfb\\52a0\\4e00\\5217";--fc-tool-border-color:#2e73ff;background-color:#fff;cursor:default;height:100%;min-height:500px;overflow:hidden;position:relative}._fc-designer>.el-main{bottom:0;left:0;padding:0;position:absolute;right:0;top:0}._fc-m .form-create ._fc-l-item{align-items:center;background:#f5f5f5;border:1px dashed #000;border-radius:4px;color:#000;display:flex!important;height:30px;justify-content:center;margin:5px 0;overflow:hidden;padding-bottom:0;transition:all .3s ease;width:100%}._fc-m .form-create ._fc-l-item ._fc-l-icon{display:inline-block!important;padding:0 4px}._fc-m .form-create ._fc-l-item ._fc-l-name{display:inline-block!important;font-size:12px}._fc-l,._fc-m,._fc-r{border-top:1px solid #ececec;box-sizing:border-box}._fc-r{--el-color-primary:#2e73ff}._fc-r-tab-props{padding:0 20px}._fc-r-title{color:#333;font-size:12px;margin:15px 0 5px}._fc-r-sub ._fc-r-title{align-items:center;display:flex;justify-content:space-between}._fc-r-sub .fc-icon{cursor:pointer}._fc-r-sub ._fd-config-item+._fd-config-item{margin-top:8px}._fc-r-sub>._fd-config-item>._fd-ci-head{padding-left:8px;position:relative}._fc-r-sub>._fd-config-item>._fd-ci-head:before{background-color:#333;border-radius:25px;content:" ";height:5px;left:0;position:absolute;width:5px}._fc-r-name-input .el-input-group__append{color:#606266;cursor:pointer;margin:0;padding:0;width:25px}._fc-r .el-main{padding-bottom:100px}._fc-l .el-main{padding:0}._fc-l .el-tree-node__label{color:#333;font-weight:400;padding:3px}._fc-l .el-tree-node__content{height:30px;margin-top:5px}._fc-l .el-tree-node__content>.el-tree-node__expand-icon{color:#333}._fc-l .el-tree-node__expand-icon.is-leaf{color:transparent}@keyframes a{0%{transform:rotate(0)}to{transform:rotate(1turn)}}._fc-loading{animation:a 2s linear infinite}._fc-tree-node{align-items:center;display:flex;height:26px;justify-content:space-between;line-height:26px;padding-right:5px;width:100%}._fc-tree-node.active,._fc-tree-node.active .icon-more{color:#2e73ff}._fc-tree-label{align-items:center;display:flex}._fc-tree-label>i{font-weight:700;margin-right:5px}._fc-tree-more{align-items:center;display:flex;font-weight:700;padding:0 15px}._fc-l-tabs{border-bottom:1px solid #ececec;display:flex;padding:0}._fc-l-tab{box-sizing:border-box;color:#303133;display:inline-block;flex:1;font-size:14px;font-weight:600;height:40px;line-height:40px;list-style:none;position:relative;text-align:center}._fc-l ._fc-l-tab.active{border-bottom:2px solid #409eff;color:#409eff}._fc-l-group{border:1px solid #eee;margin:12px;padding:0;user-select:none}._fc-l-group ._fc-l-list{align-items:stretch;display:grid;grid-template-columns:repeat(3,1fr)}._fc-l-title{align-items:center;cursor:pointer;display:flex;font-weight:600;justify-content:space-between;margin:0;padding:12px}._fc-l-title,._fc-l-title i{font-size:14px}._fc-l-title i.down{transform:rotate(90deg)}._fc-l-item{background:#fff;color:#000;cursor:pointer;display:inline-block;line-height:1;padding-bottom:10px;text-align:center;transition:all .2s ease}._fc-l-item i{display:inline-block;font-size:21px}._fc-l-item ._fc-l-name{font-size:12px}._fc-l-item ._fc-l-icon{padding:10px 5px 12px}._fc-l-item:hover{background:#2e73ff;color:#fff}._fc-m-tools{border:1px solid #ececec;border-top:0;height:40px;justify-content:space-between;white-space:nowrap}._fc-m-tools,._fc-m-tools-l,._fc-m-tools-r{align-items:center;display:flex}._fc-m-tools-r{overflow:auto}._fc-m-tools-l svg{cursor:pointer;width:18px}._fc-m-tools-l svg+svg{margin-left:10px}._fc-m-tools .line{background:#d8d8d8;height:24px;margin:0 10px;width:1px}._fc-m-tools .el-button{align-items:center;border-radius:5px;display:flex;padding:5px 10px}._fc-m-tools .el-button>span{align-items:center;display:inline-flex;justify-content:center}._fc-m-tools .el-button+.el-button,._fc-m-tools .el-dropdown{margin-left:10px}._fc-m-tools ._fd-m-extend{background-color:#f1f1f1;border-color:#ccc;border-radius:5px;color:#666;padding:5px}._fc-m-tools ._fd-m-extend .fc-icon{margin-right:0}._fc-m-tools ._fd-input-btn{align-items:center;display:flex;font-size:12px;justify-content:space-between}._fc-m-tools ._fd-input-btn .icon-check{color:#67c23a;font-size:18px}._fc-m-tools-r .fc-icon{font-size:14px;margin-right:2px}._fc-m-tools-l .fc-icon{cursor:pointer;font-size:18px}._fc-m-tools-l .fc-icon+.fc-icon{margin-left:10px}._fc-m-tools-l .fc-icon.disabled{color:#999;cursor:not-allowed}._fc-r .el-tabs__nav-wrap:after{background-color:#ececec;height:1px}._fc-r ._fc-r-tabs{border-bottom:1px solid #ececec;display:flex;padding:0}._fc-r .el-button,._fc-r .el-radio-button__inner,._fc-r .el-table__cell .cell{font-weight:400}._fc-r ._fc-r-tab{box-sizing:border-box;color:#303133;display:inline-block;flex:1;font-size:14px;font-weight:600;height:40px;line-height:40px;list-style:none;position:relative;text-align:center}._fc-r ._fc-r-tab.active{border-bottom:2px solid #409eff;color:#409eff}._fc-m-con{background:#f5f5f5;padding:20px 20px 36px;position:relative}._fc-m-drag{box-sizing:border-box;margin:0 auto;overflow:auto;padding:2px}._fc-m-input{padding:5px 5px 80px}._fc-m-input-handle{background:#fff;bottom:17px;box-shadow:0 -8px 14px #0000001a;left:0;margin:20px;padding:12px;position:absolute;right:0;text-align:center;z-index:2}._fc-m-drag.mobile{width:350px}._fc-m-drag.pad{width:770px}._fc-m-drag,.draggable-drag{background:#fff;height:100%;position:relative}._fc-m-drag>form,._fc-m-drag>form>.el-row{height:100%}._fc-m-drag .el-tree{width:100%}._fd-drag-box{height:100%;min-height:60px;transition:padding-bottom,padding-top .3s ease;width:100%}._fd-drag-box ._fd-drag-box{outline:1px dashed #ececec}._fd-drag-tool>._fd-drag-box{outline:none}._fd-drag-box>div[data-draggable]{margin-bottom:1px}._fc-r ._fc-group-container+._fc-group-container{margin-top:20px}._fc-r ._fc-group-container{margin:0;padding:10px}._fc-r ._fc-group-handle{right:15px}._fc-r .el-form-item{margin-bottom:10px!important}._fc-r .el-form-item__label{color:#333}._fc-upload-preview{border-radius:5px;display:inline-block;height:120px;overflow:hidden;width:120px}._fc-tabs .el-tabs__item{font-weight:400}._fc-tabs .el-tabs__nav-scroll{padding:0 15px}._fc-tabs .el-tab-pane{margin-right:15px}._fc-tabs .el-tabs__nav-wrap:after{height:1px}.form-create .fc-none{display:none}._fd-draggable-drag.drag-holder,._fd-elCard-drag.drag-holder,._fd-elCollapseItem-drag.drag-holder,._fd-elTabPane-drag.drag-holder,._fd-group-drag.drag-holder,._fd-subForm-drag.drag-holder,._fd-tableFormColumn-drag.drag-holder{background:#f5f5f5;background-size:0;min-height:90px;position:relative}._fc-child-empty:after,._fd-draggable-drag.drag-holder:after,._fd-elCard-drag.drag-holder:after,._fd-elCollapseItem-drag.drag-holder:after,._fd-elTabPane-drag.drag-holder:after,._fd-group-drag.drag-holder:after,._fd-subForm-drag.drag-holder:after,._fd-tableFormColumn-drag.drag-holder:after{align-items:center;bottom:0;color:#aaa;content:var(--fc-drag-empty);display:flex;font-size:12px;justify-content:center;left:0;position:absolute;right:0;top:0}._fc-designer ._fc-m-drag ._fd-draggable-drag{overflow:scroll;padding:2px 2px 100px}._fc-m-drag._fd-drop-hover ._fd-draggable-drag{padding-top:20px}._fd-draggable-drag.drag-holder{background-color:#fff}._fd-draggable-drag.drag-holder:after{font-size:16px}._fc-child-empty:after{content:var(--fc-child-empty);font-family:fc-icon!important}.fc-configured{color:#999;margin-left:5px}._fc-manage-text{color:#2f73ff;cursor:pointer;font-size:12px;margin-left:4px}._fc-manage-text i{font-size:12px}._fc-message-error{background-color:#fff;border-color:#fff;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:9px 13px;top:16px;z-index:3}._fc-message-error>.el-icon{font-size:18px}._fc-message-error .el-message__content{color:#000000e0;font-size:14px}._fd-preview-dialog{border-radius:6px;padding-top:0}._fd-preview-dialog .el-dialog__header{float:right;position:absolute;right:0;top:0;z-index:1}._fd-preview-code{margin-top:0;max-height:510px;overflow:scroll}._fd-preview-tabs .el-tabs__nav-wrap:after{height:1px}._fd-preview-tabs .el-tabs__item{height:46px}._fd-preview-code>code{white-space:pre-wrap}._fd-row-line{background:#d8d8d8;height:1px;margin:10px 0;width:100%}.CodeMirror-hints{z-index:4}@font-face{font-family:fc-icon;src:url(data:font/woff;base64,d09GRgABAAAAADWQAAsAAAAAXHwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA8FU5NY21hcAAAAYgAAAM/AAAH2BVluylnbHlmAAAEyAAAKykAAEkQjfbIOGhlYWQAAC/0AAAAMQAAADYoBh5haGhlYQAAMCgAAAAeAAAAJAffBEVobXR4AAAwSAAAADUAAAGMjgf//WxvY2EAADCAAAAAyAAAAMhtS338bWF4cAAAMUgAAAAfAAAAIAF/AMFuYW1lAAAxaAAAAUAAAAJnEKM8sHBvc3QAADKoAAAC5wAABOwNtdIjeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGFhZZzAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHnjG8rmBu+N/AwMB8hwFIMjCiKGICAHJADOJ4nN3VV3OUZRjG8f8m60Y3MVbQaCBiQ6UYiL3FktgSe4FQQnT0iAOwboi9C5ZoEM75Bhwxg4OFIUHMhC/gcHzfM7tHDB8Ar/e9MnwBzthnfpl3d2affct9XQEuAtpltVR12EVFR7TV9Gml/Lydevl5tfKf3j+qpe9ENTqiM7qjJ/piIAZjOEZjLMZjInbEVEzHTByIk7k99+ehPJxHcz5P55nmXPNUq96aPHtWOxC1qJc79Ea/dhiKkXM7NBZ3WNAOO8sdjuS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pTSVtoKVTJSKykvLrcmGPhUm1sodoUqcK+1Gkq9pPNTq5mO+rKXmhTyaiutTQqVVj0qWhidDYXYesmDrvXULjjvFXYZbJFIWqbZcFCtKmNU5WEqVAqSZ53Q5cnBs5nyZNcyrCPO2m4B9K4la7S0U4FaYRXNswSkt6nS39MishasbKki6xRL2Wdey31ds9anpurT/qkl7VL2YXQIMm10rxOyq+41/sHfwJ7pAA=) format("woff")}.fc-icon{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:fc-icon!important;font-size:16px;font-style:normal}.icon-data-table:before{content:"\\e7be"}.icon-delete-circle:before{content:"\\e604"}.icon-edit:before{content:"\\e60b"}.icon-save-online:before{content:"\\e64b"}.icon-auto:before{content:"\\e692"}.icon-check:before{content:"\\e64c"}.icon-tooltip:before{content:"\\e7f3"}.icon-watermark:before{content:"\\e645"}.icon-table-form3:before{content:"\\e603"}.icon-table-form2:before{content:"\\e7f1"}.icon-card:before{content:"\\e76b"}.icon-lock:before{content:"\\eadc"}.icon-shadow:before{content:"\\e6cc"}.icon-shadow-inset:before{content:"\\e6cd"}.icon-alignitems-flexstart:before{content:"\\e630";display:inline-block;transform:rotate(180deg)}.icon-align-center:before{content:"\\e607";display:inline-block;transform:rotate(90deg)}.icon-align-flexstart:before{content:"\\e60a";display:inline-block;transform:rotate(90deg)}.icon-align-spacearound:before{content:"\\e61f";display:inline-block;transform:rotate(-90deg)}.icon-align-spacebetween:before{content:"\\e65e";display:inline-block;transform:rotate(-90deg)}.icon-align-stretch:before{content:"\\e606";display:inline-block;transform:rotate(-90deg)}.icon-align-flexend:before{content:"\\e60a";display:inline-block;transform:rotate(-90deg)}.icon-justify-flexend:before{content:"\\e60a";display:inline-block;transform:rotate(180deg)}.icon-direction-rowreverse:before{content:"\\e677"}.icon-direction-row:before{content:"\\e678"}.icon-direction-column:before{content:"\\e679"}.icon-direction-columnreverse:before{content:"\\e67a"}.icon-justify-spacearound:before{content:"\\e61f"}.icon-justify-spacebetween:before{content:"\\e65e"}.icon-alignitems-baseline:before{content:"\\e660"}.icon-alignitems-flexend:before{content:"\\e630"}.icon-alignitems-center:before{content:"\\e632"}.icon-alignitems-stretch:before{content:"\\e633"}.icon-flex-nowrap:before{content:"\\e600"}.icon-flex-wrap:before{content:"\\e601"}.icon-justify-stretch:before{content:"\\e606"}.icon-justify-center:before{content:"\\e607"}.icon-justify-flexstart:before{content:"\\e60a"}.icon-display-flex:before{content:"\\e619"}.icon-display-inlineblock:before{content:"\\e61c"}.icon-display-block:before{content:"\\e61d"}.icon-display-inline:before{content:"\\e61e"}.icon-radius:before{content:"\\e6a1"}.icon-arrow:before{content:"\\e60e"}.icon-link:before{content:"\\e63f"}.icon-question:before{content:"\\e644"}.icon-refresh:before{content:"\\e659"}.icon-setting:before{content:"\\e7c6"}.icon-textarea:before{content:"\\e7c9"}.icon-password:before{content:"\\e7ca"}.icon-table-form:before{content:"\\e7c7"}.icon-value:before{content:"\\e7c8"}.icon-eye:before{content:"\\e796"}.icon-eye-close:before{content:"\\e66f"}.icon-cell:before{content:"\\e602"}.icon-group:before{content:"\\e7c0"}.icon-step-form:before{content:"\\e7c1"}.icon-add-circle:before{content:"\\e7c3"}.icon-add-tr:before{content:"\\e7c4"}.icon-add-td:before{content:"\\e7c5"}.icon-more:before{content:"\\e631"}.icon-flex:before{content:"\\e7b6"}.icon-tag:before{content:"\\e7b9"}.icon-html:before{content:"\\e68f"}.icon-tree-select:before{content:"\\e7bc"}.icon-descriptions:before{content:"\\e7bd"}.icon-table:before{content:"\\eb0a"}.icon-collapse:before{content:"\\e7bf"}.icon-pre-step:before{content:"\\e772"}.icon-next-step:before{content:"\\e775"}.icon-mobile-active:before{content:"\\e778"}.icon-pc-active:before{content:"\\e779"}.icon-pc:before{content:"\\e77a"}.icon-mobile:before{content:"\\e77d"}.icon-pad-active:before{content:"\\e78c"}.icon-pad:before{content:"\\e795"}.icon-subform:before{content:"\\eb77"}.icon-add-child:before{content:"\\e789"}.icon-switch:before{content:"\\e77c"}.icon-tab:before{content:"\\e77b"}.icon-button:before{content:"\\e77e"}.icon-input:before{content:"\\e77f"}.icon-checkbox:before{content:"\\e780"}.icon-radio:before{content:"\\e781"}.icon-rate:before{content:"\\e782"}.icon-number:before{content:"\\e783"}.icon-upload:before{content:"\\e784"}.icon-cascader:before{content:"\\e785"}.icon-space:before{content:"\\e786"}.icon-color:before{content:"\\e787"}.icon-span:before{content:"\\e788"}.icon-alert:before{content:"\\e78a"}.icon-row:before{content:"\\e78b"}.icon-divider:before{content:"\\e78d"}.icon-select:before{content:"\\e78e"}.icon-transfer:before{content:"\\e78f"}.icon-editor:before{content:"\\e790"}.icon-slider:before{content:"\\e791"}.icon-tree:before{content:"\\e792"}.icon-date:before{content:"\\e793"}.icon-time:before{content:"\\e794"}.icon-grid:before{content:"\\eb78"}.icon-delete:before{content:"\\e770"}.icon-copy:before{content:"\\e771"}.icon-import:before{content:"\\e773"}.icon-add:before{content:"\\e774"}.icon-preview:before{content:"\\e776"}.icon-move:before{content:"\\e777"}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-subst,.hljs-title{color:#000;font-weight:400}.hljs-title.function_{color:#7a7a43}.hljs-code,.hljs-comment,.hljs-quote{color:#8c8c8c;font-style:italic}.hljs-meta{color:#9e880d}.hljs-section{color:#871094}.hljs-built_in,.hljs-keyword,.hljs-literal,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag,.hljs-symbol,.hljs-template-tag,.hljs-type,.hljs-variable.language_{color:#0033b3}.hljs-attr,.hljs-property{color:#871094}.hljs-attribute{color:#174ad4}.hljs-number{color:#1750eb}.hljs-regexp{color:#264eff}.hljs-link{color:#006dcc;text-decoration:underline}.hljs-meta .hljs-string,.hljs-string{color:#067d17}.hljs-char.escape_{color:#0037a6}.hljs-doctag{text-decoration:underline}.hljs-template-variable{color:#248f8f}.hljs-addition{background:#bee6be}.hljs-deletion{background:#d6d6d6}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();const Lr={type:(e,t)=>Object.prototype.toString.call(e)==="[object "+t+"]",Undef:e=>e==null,Element:e=>typeof e=="object"&&e!==null&&e.nodeType===1&&!Lr.Object(e),trueArray:e=>Array.isArray(e)&&e.length>0,Function(e){const t=this.getType(e);return t==="Function"||t==="AsyncFunction"},getType(e){const t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty:e=>!!(e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length)||typeof e=="string"&&!e};function v4(e,t){return{}.hasOwnProperty.call(e,t)}function m4(e,t,n){e[t]=n}function Cx(e,t={},n){let r=!1;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let i=t[o];if((r=Array.isArray(i))||Lr.Object(i)){let a=e[o]===void 0;if(r)r=!1,a&&m4(e,o,[]);else if(i._clone&&n!==void 0){if(!n){m4(e,o,i._clone());continue}i=i.getRule(),a&&m4(e,o,{})}else a&&m4(e,o,{});e[o]=Cx(e[o],i,n)}else m4(e,o,i),Lr.Undef(i)||(Lr.Undef(i.__json)||(e[o].__json=i.__json),Lr.Undef(i.__origin)||(e[o].__origin=i.__origin))}return n!==void 0&&Array.isArray(e)?e.filter(o=>!o||!o.__ctrl):e}function Mi(e){return Cx({},{value:e}).value}["Date","Object","String","Boolean","Array","Number"].forEach(e=>{Lr[e]=function(t){return Lr.type(t,e)}});const Rde="[[FORM-CREATE-PREFIX-",Ide="-FORM-CREATE-SUFFIX]]",Bde="$FN:",Lde="$FNX:",Pde="$GLOBAL:",Sx="function";function jde(e){return new Function("return "+e)()}function b$e(e,t){if(e&&Lr.String(e)&&e.length>4){let n=e.trim(),r=!1;try{if(n.indexOf(Ide)>0&&n.indexOf(Rde)===0)n=n.replace(Ide,"").replace(Rde,""),r=!0;else if(n.indexOf(Bde)===0)n=n.replace(Bde,""),r=!0;else{if(n.indexOf(Pde)===0){const i=n.replace(Pde,"");return n=function(...a){const l=a[0].api.getGlobalEvent(i);if(l)return l.call(this,...a)},n.__json=e,n.__inject=!0,n}if(n.indexOf(Lde)===0)return n=jde("function($inject){"+n.replace(Lde,"")+"}"),n.__json=e,n.__inject=!0,n;!t&&n.indexOf(Sx)===0&&n!==Sx&&(r=!0)}if(!r)return e;const o=jde(n.indexOf(Sx)===-1&&n.indexOf("(")!==0?Sx+" "+n:n);return o.__json=e,o}catch(o){return void function(i){console.error(function(a,l){return`[form-create err]: ${l}`}(0,i))}(`\u89E3\u6790\u5931\u8D25:${n} |
|
47 |
|
|
48 |
err: ${o}`)}}return e}function dI(e){return e.replace(e[0],e[0].toLowerCase())}const Vde={name:"zh-cn",form:{field:"\u5B57\u6BB5 ID",title:"\u5B57\u6BB5\u540D\u79F0",info:"\u63D0\u793A\u4FE1\u606F",control:"\u8054\u52A8\u6570\u636E",labelPosition:"\u6807\u7B7E\u7684\u4F4D\u7F6E",labelStyle:"\u6807\u7B7E\u7684\u6837\u5F0F",labelSuffix:"\u6807\u7B7E\u7684\u540E\u7F00",size:"\u8868\u5355\u7684\u5C3A\u5BF8",event:"\u8868\u5355\u4E8B\u4EF6",labelWidth:"\u6807\u7B7E\u7684\u5BBD\u5EA6",hideRequiredAsterisk:"\u9690\u85CF\u5FC5\u586B\u5B57\u6BB5\u7684\u6807\u7B7E\u65C1\u8FB9\u7684\u7EA2\u8272\u661F\u53F7",showMessage:"\u663E\u793A\u6821\u9A8C\u9519\u8BEF\u4FE1\u606F",inlineMessage:"\u4EE5\u884C\u5185\u5F62\u5F0F\u5C55\u793A\u6821\u9A8C\u4FE1\u606F",submitBtn:"\u662F\u5426\u663E\u793A\u8868\u5355\u63D0\u4EA4\u6309\u94AE",resetBtn:"\u662F\u5426\u663E\u793A\u8868\u5355\u91CD\u7F6E\u6309\u94AE",appendChild:"\u6DFB\u52A0\u5B50\u7EA7",formMode:"\u8868\u5355\u6A21\u5F0F",formName:"\u8868\u5355\u540D\u79F0",componentMode:"\u751F\u6210\u7EC4\u4EF6",document:"\u5E2E\u52A9\u6587\u6863"},computed:{fieldUsed:"\u3010{label}\u3011\u5728\u8BA1\u7B97\u516C\u5F0F\u4E2D\u88AB\u4F7F\u7528\uFF0C\u8BF7\u5148\u4FEE\u6539\u5BF9\u5E94\u516C\u5F0F",fieldExist:"\u3010{label}\u3011\u5B57\u6BB5\u5DF2\u5B58\u5728",fieldEmpty:"\u5B57\u6BB5\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",fieldChar:"\u5B57\u6BB5\u540D\u79F0\u5FC5\u987B\u4EE5\u5B57\u6BCD\u5F00\u5934"},validate:{type:"\u5B57\u6BB5\u7C7B\u578B",typePlaceholder:"\u8BF7\u9009\u62E9",trigger:"\u89E6\u53D1\u65B9\u5F0F",mode:"\u9A8C\u8BC1\u65B9\u5F0F",modes:{required:"\u5FC5\u586B",pattern:"\u6B63\u5219\u8868\u8FBE\u5F0F",min:"\u6700\u5C0F\u503C",max:"\u6700\u5927\u503C",len:"\u957F\u5EA6"},types:{string:"\u5B57\u7B26\u4E32",array:"\u591A\u9009",number:"\u6570\u5B57",integer:"\u6574\u6570",float:"\u5C0F\u6570",object:"\u5408\u96C6",date:"\u65E5\u671F",url:"URL\u94FE\u63A5",email:"\u90AE\u7BB1\u5730\u5740"},message:"\u9519\u8BEF\u4FE1\u606F",auto:"\u81EA\u52A8\u83B7\u53D6",autoRequired:"\u8BF7\u8F93\u5165{title}",autoMode:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684{title}",requiredPlaceholder:"\u8BF7\u8F93\u5165\u63D0\u793A\u8BED",required:"\u662F\u5426\u5FC5\u586B",rule:"\u9A8C\u8BC1\u89C4\u5219"},tableOptions:{handle:"\u64CD\u4F5C",add:"\u6DFB\u52A0",empty1:"\u70B9\u51FB\u53F3\u4E0B\u89D2",empty2:"\u6309\u94AE\u6DFB\u52A0\u4E00\u5217",rmCol:"\u5220\u9664\u5F53\u524D\u5217",rmRow:"\u5220\u9664\u5F53\u524D\u884C",splitRow:"\u62C6\u5206\u6210\u884C",splitCol:"\u62C6\u5206\u6210\u5217",mergeBottom:"\u5411\u4E0B\u5408\u5E76",mergeRight:"\u5411\u53F3\u5408\u5E76",addTop:"\u6DFB\u52A0\u4E0A\u5217",addBottom:"\u6DFB\u52A0\u4E0B\u5217",addLeft:"\u6DFB\u52A0\u5DE6\u5217",addRight:"\u6DFB\u52A0\u53F3\u5217",keyValue:"\u952E\u503C\u5BF9"},struct:{title:"\u7F16\u8F91\u6570\u636E",only:"\u3010{label}\u3011\u53EA\u5141\u8BB8\u6DFB\u52A0\u4E00\u4E2A",errorMsg:"\u8F93\u5165\u7684\u5185\u5BB9\u8BED\u6CD5\u9519\u8BEF",configured:"\u5DF2\u914D\u7F6E"},event:{title:"\u8BBE\u7F6E\u4E8B\u4EF6",create:"\u521B\u5EFA\u4E8B\u4EF6",list:"\u4E8B\u4EF6\u5217\u8868",placeholder:"\u8BF7\u8F93\u5165\u4E8B\u4EF6\u7684\u540D\u79F0",saveMsg:"\u8BF7\u5148\u4FDD\u5B58\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u4E8B\u4EF6",type:"\u7C7B\u578B",info:"\u8BF4\u660E",label:"\u5B57\u6BB5",inject:{api:"\u5F53\u524D\u8868\u5355\u7684api",rule:"\u5F53\u524D\u8868\u5355\u7684\u751F\u6210\u89C4\u5219",self:"\u7EC4\u4EF6\u7684\u751F\u6210\u89C4\u5219",option:"\u8868\u5355\u7684\u914D\u7F6E",args:"\u4E8B\u4EF6\u7684\u539F\u59CB\u53C2\u6570"}},fetch:{title:"\u8BBE\u7F6E\u6570\u636E\u6E90",create:"\u521B\u5EFA\u6570\u636E\u6E90",config:"\u8BF7\u6C42\u914D\u7F6E",action:"\u8BF7\u6C42\u94FE\u63A5",actionRequired:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5",placeholder:"\u8BF7\u8F93\u5165\u6570\u636E\u6E90\u7684\u540D\u79F0",method:"\u8BF7\u6C42\u65B9\u5F0F",data:"\u9644\u5E26\u6570\u636E",headers:"\u8BF7\u6C42\u5934\u90E8",parse:"\u6570\u636E\u5904\u7406",response:"\u63A5\u53E3\u8FD4\u56DE\u7684\u6570\u636E",onError:"\u9519\u8BEF\u5904\u7406",remote:"\u8FDC\u7A0B\u6570\u636E",static:"\u9759\u6001\u6570\u636E",optionsType:{fetch:"\u8FDC\u7A0B\u6570\u636E",struct:"\u9759\u6001\u6570\u636E"}},designer:{component:"\u7EC4\u4EF6\u914D\u7F6E",id:"\u552F\u4E00\u503C",name:"\u7F16\u53F7",type:"\u7EC4\u4EF6\u7C7B\u578B",form:"\u8868\u5355\u914D\u7F6E",style:"\u7EC4\u4EF6\u6837\u5F0F\u914D\u7F6E",rule:"\u57FA\u7840\u914D\u7F6E",advanced:"\u9AD8\u7EA7\u914D\u7F6E",props:"\u5C5E\u6027\u914D\u7F6E",validate:"\u9A8C\u8BC1\u914D\u7F6E",event:"\u4E8B\u4EF6\u914D\u7F6E",clearWarn:"\u6E05\u7A7A\u540E\u5C06\u4E0D\u80FD\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u6E05\u7A7A\u5417\uFF1F",childEmpty:"\u70B9\u51FB\u53F3\u4E0B\u89D2 \\e789 \u6309\u94AE\u6DFB\u52A0\u4E00\u5217",dragEmpty:"\u62D6\u62FD\u5DE6\u4FA7\u5217\u8868\u4E2D\u7684\u7EC4\u4EF6\u5230\u6B64\u5904",unload:"\u786E\u5B9A\u79BB\u5F00\u5F53\u524D\u9875\u9762\u5417?"},menu:{main:"\u57FA\u7840\u7EC4\u4EF6",aide:"\u8F85\u52A9\u7EC4\u4EF6",layout:"\u5E03\u5C40\u7EC4\u4EF6",component:"\u7EC4\u4EF6",subform:"\u5B50\u8868\u5355\u7EC4\u4EF6",tree:"\u5927\u7EB2"},props:{title:"\u6807\u9898",content:"\u5185\u5BB9",collection:"\u5408\u96C6",group:"\u5206\u7EC4",custom:"\u81EA\u5B9A\u4E49",change:"\u6539\u53D8",blur:"\u5931\u53BB\u7126\u70B9",preview:"\u9884\u89C8",clear:"\u6E05\u7A7A",cancel:"\u53D6\u6D88",close:"\u5173\u95ED",ok:"\u786E\u5B9A",height:"\u9AD8\u5EA6",width:"\u5BBD\u5EA6",class:"Class",save:"\u4FDD\u5B58",refresh:"\u5237\u65B0",submit:"\u63D0\u4EA4",reset:"\u91CD\u7F6E",copy:"\u590D\u5236",delete:"\u5220\u9664",hide:"\u9690\u85CF",position:"\u4F4D\u7F6E",render:"\u6E32\u67D3",large:"\u5927",default:"\u9ED8\u8BA4",small:"\u5C0F",always:"\u5E38\u663E",never:"\u4E0D\u663E\u793A",hover:"\u60AC\u6D6E",click:"\u70B9\u51FB",button:"\u6309\u94AE",year:"\u5E74\u4EFD",month:"\u6708\u4EFD",date:"\u65E5\u671F",dates:"\u65E5\u671F\u591A\u9009",week:"\u4E00\u5468",datetime:"\u65E5\u671F\u65F6\u95F4",datetimerange:"\u65E5\u671F\u65F6\u95F4\u533A\u95F4",daterange:"\u65E5\u671F\u533A\u95F4",monthrange:"\u6708\u4EFD\u533A\u95F4",left:"\u5DE6\u5BF9\u9F50",right:"\u53F3\u5BF9\u9F50",top:"\u9876\u90E8",text:"\u6587\u5B57",picture:"\u56FE\u7247","picture-card":"\u5361\u7247",center:"\u5C45\u4E2D",vertical:"\u7AD6\u5411",horizontal:"\u6A2A\u5411",manage:"\u7BA1\u7406",key:"\u952E\u540D",name:"\u540D\u79F0",value:"\u503C",inputData:"\u5F55\u5165\u6570\u636E",options:"\u9009\u9879\u6570\u636E",option:"\u9009\u9879",_self:"\u5F53\u524D\u7A97\u53E3",_blank:"\u65B0\u7684\u7A97\u53E3",_parent:"\u7236\u7EA7\u7A97\u53E3",_top:"\u9876\u7EA7\u7A97\u53E3"},com:{cascader:{name:"\u7EA7\u8054\u9009\u62E9\u5668",event:{expandChange:"\u5F53\u5C55\u5F00\u8282\u70B9\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1",removeTag:"\u5728\u591A\u9009\u6A21\u5F0F\u4E0B\uFF0C\u79FB\u9664Tag\u65F6\u89E6\u53D1"},props:{props:"\u914D\u7F6E\u9009\u9879",placeholder:"\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C",disabled:"\u662F\u5426\u7981\u7528",clearable:"\u662F\u5426\u652F\u6301\u6E05\u7A7A\u9009\u9879",showAllLevels:"\u8F93\u5165\u6846\u4E2D\u662F\u5426\u663E\u793A\u9009\u4E2D\u503C\u7684\u5B8C\u6574\u8DEF\u5F84",collapseTags:"\u591A\u9009\u6A21\u5F0F\u4E0B\u662F\u5426\u6298\u53E0Tag",collapseTagsTooltip:"\u5F53\u9F20\u6807\u60AC\u505C\u4E8E\u6298\u53E0\u6807\u7B7E\u7684\u6587\u672C\u65F6\uFF0C\u662F\u5426\u663E\u793A\u6240\u6709\u9009\u4E2D\u7684\u6807\u7B7E",separator:"\u9009\u9879\u5206\u9694\u7B26",filterable:"\u8BE5\u9009\u9879\u662F\u5426\u53EF\u4EE5\u88AB\u641C\u7D22",tagType:"\u6807\u7B7E\u7C7B\u578B"},propsOpt:{multiple:"\u662F\u5426\u591A\u9009",expandTrigger:"\u6B21\u7EA7\u83DC\u5355\u7684\u5C55\u5F00\u65B9\u5F0F",checkStrictly:"\u662F\u5426\u4E25\u683C\u7684\u9075\u5B88\u7236\u5B50\u8282\u70B9\u4E0D\u4E92\u76F8\u5173\u8054",emitPath:"\u5728\u9009\u4E2D\u8282\u70B9\u6539\u53D8\u65F6\uFF0C\u662F\u5426\u8FD4\u56DE\u7531\u8BE5\u8282\u70B9\u6240\u5728\u7684\u5404\u7EA7\u83DC\u5355\u7684\u503C\u6240\u7EC4\u6210\u7684\u6570\u7EC4",value:"\u6307\u5B9A\u9009\u9879\u7684\u503C\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C",label:"\u6307\u5B9A\u9009\u9879\u6807\u7B7E\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C",children:"\u6307\u5B9A\u9009\u9879\u7684\u5B50\u9009\u9879\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C",disabled:"\u6307\u5B9A\u9009\u9879\u7684\u7981\u7528\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C",leaf:"\u6307\u5B9A\u9009\u9879\u7684\u53F6\u5B50\u8282\u70B9\u7684\u6807\u5FD7\u4F4D\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C"}},checkbox:{name:"\u591A\u9009\u6846",props:{type:"\u6309\u94AE\u7C7B\u578B",disabled:"\u662F\u5426\u7981\u7528",min:"\u53EF\u88AB\u52FE\u9009\u7684\u6700\u5C0F\u6570\u91CF",max:"\u53EF\u88AB\u52FE\u9009\u7684\u6700\u5927\u6570\u91CF",textColor:"\u5F53\u6309\u94AE\u4E3A\u6D3B\u8DC3\u72B6\u6001\u65F6\u7684\u5B57\u4F53\u989C\u8272",fill:"\u5F53\u6309\u94AE\u4E3A\u6D3B\u8DC3\u72B6\u6001\u65F6\u7684\u8FB9\u6846\u548C\u80CC\u666F\u989C\u8272"}},col:{name:"\u5E03\u5C40\u683C\u5B50",props:{span:"\u6805\u683C\u5360\u636E\u7684\u5217\u6570",offset:"\u6805\u683C\u5DE6\u4FA7\u7684\u95F4\u9694\u683C\u6570",push:"\u6805\u683C\u5411\u53F3\u79FB\u52A8\u683C\u6570",pull:"\u6805\u683C\u5411\u5DE6\u79FB\u52A8\u683C\u6570"}},colorPicker:{name:"\u989C\u8272\u9009\u62E9\u5668",event:{activeChange:"\u9762\u677F\u4E2D\u5F53\u524D\u663E\u793A\u7684\u989C\u8272\u53D1\u751F\u6539\u53D8\u65F6\u89E6\u53D1"},props:{disabled:"\u662F\u5426\u7981\u7528",showAlpha:"\u662F\u5426\u652F\u6301\u900F\u660E\u5EA6\u9009\u62E9",colorFormat:"\u989C\u8272\u7684\u683C\u5F0F",predefine:"\u9884\u5B9A\u4E49\u989C\u8272"}},datePicker:{name:"\u65E5\u671F",props:{pickerOptions:"\u5F53\u524D\u65F6\u95F4\u65E5\u671F\u9009\u62E9\u5668\u7279\u6709\u7684\u9009\u9879",readonly:"\u5B8C\u5168\u53EA\u8BFB",disabled:"\u7981\u7528",type:"\u663E\u793A\u7C7B\u578B",editable:"\u6587\u672C\u6846\u53EF\u8F93\u5165",clearable:"\u662F\u5426\u663E\u793A\u6E05\u9664\u6309\u94AE",placeholder:"\u975E\u8303\u56F4\u9009\u62E9\u65F6\u7684\u5360\u4F4D\u5185\u5BB9",startPlaceholder:"\u8303\u56F4\u9009\u62E9\u65F6\u5F00\u59CB\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9",endPlaceholder:"\u8303\u56F4\u9009\u62E9\u65F6\u7ED3\u675F\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9",format:"\u663E\u793A\u5728\u8F93\u5165\u6846\u4E2D\u7684\u683C\u5F0F",align:"\u5BF9\u9F50\u65B9\u5F0F",rangeSeparator:"\u9009\u62E9\u8303\u56F4\u65F6\u7684\u5206\u9694\u7B26",unlinkPanels:"\u5728\u8303\u56F4\u9009\u62E9\u5668\u91CC\u53D6\u6D88\u4E24\u4E2A\u65E5\u671F\u9762\u677F\u4E4B\u95F4\u7684\u8054\u52A8"}},dateRange:{name:"\u65E5\u671F\u533A\u95F4"},timeRange:{name:"\u65F6\u95F4\u533A\u95F4"},elAlert:{name:"\u63D0\u793A",description:"\u8BF4\u660E\u6587\u5B57",props:{title:"\u6807\u9898",type:"\u4E3B\u9898",description:"\u8F85\u52A9\u6027\u6587\u5B57",closable:"\u662F\u5426\u53EF\u5173\u95ED",center:"\u6587\u5B57\u662F\u5426\u5C45\u4E2D",closeText:"\u5173\u95ED\u6309\u94AE\u81EA\u5B9A\u4E49\u6587\u672C",showIcon:"\u662F\u5426\u663E\u793A\u56FE\u6807",effect:"\u9009\u62E9\u63D0\u4F9B\u7684\u4E3B\u9898"}},elButton:{name:"\u6309\u94AE",props:{formCreateChild:"\u5185\u5BB9",size:"\u5C3A\u5BF8",type:"\u7C7B\u578B",plain:"\u662F\u5426\u6734\u7D20\u6309\u94AE",round:"\u662F\u5426\u5706\u89D2\u6309\u94AE",circle:"\u662F\u5426\u5706\u5F62\u6309\u94AE",loading:"\u662F\u5426\u52A0\u8F7D\u4E2D\u72B6\u6001",disabled:"\u662F\u5426\u7981\u7528\u72B6\u6001"}},elCard:{name:"\u5361\u7247",props:{header:"\u6807\u9898",shadow:"\u9634\u5F71\u663E\u793A\u65F6\u673A"}},elCollapse:{name:"\u6298\u53E0\u9762\u677F",event:{change:"\u5207\u6362\u5F53\u524D\u6D3B\u52A8\u9762\u677F\uFF0C\u5728\u624B\u98CE\u7434\u6A21\u5F0F\u4E0B\u5176\u7C7B\u578B\u662Fstring\uFF0C\u5728\u5176\u4ED6\u6A21\u5F0F\u4E0B\u662Farray"},props:{accordion:"\u662F\u5426\u624B\u98CE\u7434\u6A21\u5F0F"}},elCollapseItem:{name:"\u9762\u677F",props:{title:"\u9762\u677F\u6807\u9898",name:"\u552F\u4E00\u6807\u5FD7\u7B26",disabled:"\u662F\u5426\u7981\u7528"}},elDivider:{name:"\u5206\u5272\u7EBF",props:{formCreateChild:"\u8BBE\u7F6E\u5206\u5272\u7EBF\u6587\u6848",contentPosition:"\u8BBE\u7F6E\u5206\u5272\u7EBF\u6587\u6848\u7684\u4F4D\u7F6E"}},elTabPane:{name:"\u9009\u9879\u5361",props:{label:"\u9009\u9879\u5361\u6807\u9898",disabled:"\u662F\u5426\u7981\u7528",name:"\u9009\u9879\u5361\u7684\u6807\u8BC6\u7B26",lazy:"\u6807\u7B7E\u662F\u5426\u5EF6\u8FDF\u6E32\u67D3"}},elTabs:{name:"\u6807\u7B7E\u9875",event:{tabClick:"tab \u88AB\u9009\u4E2D\u65F6\u89E6\u53D1",tabChange:"activeName \u6539\u53D8\u65F6\u89E6\u53D1",tabRemove:"\u70B9\u51FB tab \u79FB\u9664\u6309\u94AE\u65F6\u89E6\u53D1",tabAdd:"\u70B9\u51FB tab \u65B0\u589E\u6309\u94AE\u65F6\u89E6\u53D1",edit:"\u70B9\u51FB tab \u7684\u65B0\u589E\u6216\u79FB\u9664\u6309\u94AE\u540E\u89E6\u53D1"},props:{type:"\u98CE\u683C\u7C7B\u578B",closable:"\u6807\u7B7E\u662F\u5426\u53EF\u5173\u95ED",tabPosition:"\u9009\u9879\u5361\u6240\u5728\u4F4D\u7F6E",stretch:"\u6807\u7B7E\u7684\u5BBD\u5EA6\u662F\u5426\u81EA\u6491\u5F00"}},elTag:{name:"\u6807\u7B7E",props:{formCreateNative:"\u662F\u5426\u663E\u793A\u6807\u9898",formCreateTitle:"\u6807\u9898",formCreateChild:"\u6807\u7B7E\u5185\u5BB9",type:"\u6807\u7B7E\u7684\u7C7B\u578B",size:"\u6807\u7B7E\u7684\u5C3A\u5BF8",effect:"\u6807\u7B7E\u7684\u4E3B\u9898",closable:"\u662F\u5426\u53EF\u5173\u95ED",disableTransitions:"\u662F\u5426\u7981\u7528\u6E10\u53D8\u52A8\u753B",hit:"\u662F\u5426\u6709\u8FB9\u6846\u63CF\u8FB9",round:"\u662F\u5426\u4E3A\u5706\u5F62",color:"\u80CC\u666F\u8272"}},elTransfer:{name:"\u7A7F\u68AD\u6846",event:{leftCheckChange:"\u5DE6\u4FA7\u5217\u8868\u5143\u7D20\u88AB\u7528\u6237\u9009\u4E2D / \u53D6\u6D88\u9009\u4E2D\u65F6\u89E6\u53D1",rightCheckChange:"\u53F3\u4FA7\u5217\u8868\u5143\u7D20\u88AB\u7528\u6237\u9009\u4E2D / \u53D6\u6D88\u9009\u4E2D\u65F6\u89E6\u53D1"},props:{filterable:"\u662F\u5426\u53EF\u641C\u7D22",filterPlaceholder:"\u641C\u7D22\u6846\u5360\u4F4D\u7B26",targetOrder:"\u53F3\u4FA7\u5217\u8868\u5143\u7D20\u7684\u6392\u5E8F\u7B56\u7565",targetOrderInfo:"\u82E5\u4E3A original\uFF0C\u5219\u4FDD\u6301\u4E0E\u6570\u636E\u76F8\u540C\u7684\u987A\u5E8F\uFF1B\u82E5\u4E3A push\uFF0C\u5219\u65B0\u52A0\u5165\u7684\u5143\u7D20\u6392\u5728\u6700\u540E\uFF1B\u82E5\u4E3A unshift\uFF0C\u5219\u65B0\u52A0\u5165\u7684\u5143\u7D20\u6392\u5728\u6700\u524D",titles:"\u81EA\u5B9A\u4E49\u5217\u8868\u6807\u9898",buttonTexts:"\u81EA\u5B9A\u4E49\u6309\u94AE\u6587\u6848",props:"\u6570\u636E\u6E90\u7684\u5B57\u6BB5\u522B\u540D"}},elTreeSelect:{name:"\u6811\u5F62\u9009\u62E9",event:{removeTag:"\u591A\u9009\u6A21\u5F0F\u4E0B\u79FB\u9664tag\u65F6\u89E6\u53D1"},props:{multiple:"\u662F\u5426\u591A\u9009",disabled:"\u662F\u5426\u7981\u7528",clearable:"\u662F\u5426\u53EF\u4EE5\u6E05\u7A7A\u9009\u9879",collapseTags:"\u591A\u9009\u65F6\u662F\u5426\u5C06\u9009\u4E2D\u503C\u6309\u6587\u5B57\u7684\u5F62\u5F0F\u5C55\u793A",multipleLimit:"\u591A\u9009\u65F6\u7528\u6237\u6700\u591A\u53EF\u4EE5\u9009\u62E9\u7684\u9879\u76EE\u6570\uFF0C\u4E3A 0 \u5219\u4E0D\u9650\u5236",placeholder:"\u5360\u4F4D\u7B26",props:"\u914D\u7F6E\u9009\u9879",renderAfterExpand:"\u662F\u5426\u5728\u7B2C\u4E00\u6B21\u5C55\u5F00\u67D0\u4E2A\u6811\u8282\u70B9\u540E\u624D\u6E32\u67D3\u5176\u5B50\u8282\u70B9",defaultExpandAll:"\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\u6240\u6709\u8282\u70B9",expandOnClickNode:"\u662F\u5426\u5728\u70B9\u51FB\u8282\u70B9\u7684\u65F6\u5019\u5C55\u5F00\u6216\u8005\u6536\u7F29\u8282\u70B9",checkOnClickNode:"\u662F\u5426\u5728\u70B9\u51FB\u8282\u70B9\u7684\u65F6\u5019\u9009\u4E2D\u8282\u70B9",nodeKey:"\u6BCF\u4E2A\u6811\u8282\u70B9\u7528\u6765\u4F5C\u4E3A\u552F\u4E00\u6807\u8BC6\u7684\u5C5E\u6027\uFF0C\u6574\u68F5\u6811\u5E94\u8BE5\u662F\u552F\u4E00\u7684"}},fcEditor:{name:"\u5BCC\u6587\u672C\u6846",props:{disabled:"\u662F\u5426\u7981\u7528"}},fcRow:{name:"\u6805\u683C\u5E03\u5C40",props:{gutter:"\u6805\u683C\u95F4\u9694",type:"flex\u5E03\u5C40\u6A21\u5F0F",justify:"flex\u5E03\u5C40\u4E0B\u7684\u6C34\u5E73\u6392\u5217\u65B9\u5F0F",align:"flex\u5E03\u5C40\u4E0B\u7684\u5782\u76F4\u6392\u5217\u65B9\u5F0F"}},fcTable:{name:"\u8868\u683C\u5E03\u5C40",props:{border:"\u662F\u5426\u663E\u793A\u8FB9\u6846",borderColor:"\u8FB9\u6846\u989C\u8272",borderWidth:"\u8FB9\u6846\u5BBD\u5EA6"}},fcTableGrid:{name:"\u683C\u5B50"},group:{name:"\u5B50\u8868\u5355",props:{disabled:"\u662F\u5426\u7981\u7528",syncDisabled:"\u662F\u5426\u4E0E\u5B50\u8868\u5355\u5F3A\u5236\u540C\u6B65\u7981\u7528\u72B6\u6001",expand:"\u8BBE\u7F6E\u9ED8\u8BA4\u5C55\u5F00\u51E0\u9879",button:"\u662F\u5426\u663E\u793A\u64CD\u4F5C\u6309\u94AE",sortBtn:"\u662F\u5426\u663E\u793A\u6392\u5E8F\u6309\u94AE",min:"\u8BBE\u7F6E\u6700\u5C0F\u6DFB\u52A0\u51E0\u9879",max:"\u8BBE\u7F6E\u6700\u591A\u6DFB\u52A0\u51E0\u9879"}},html:{name:"HTML",props:{formCreateNative:"\u662F\u5426\u663E\u793A\u6807\u9898",formCreateTitle:"\u6807\u9898",formCreateChild:"\u5185\u5BB9"}},input:{name:"\u8F93\u5165\u6846",event:{change:"\u5F53\u503C\u6539\u53D8\u65F6\uFF0C\u5F53\u7EC4\u4EF6\u5931\u53BB\u7126\u70B9\u6216\u7528\u6237\u6309Enter\u65F6\u89E6\u53D1"},props:{maxlength:"\u6700\u5927\u8F93\u5165\u957F\u5EA6",minlength:"\u6700\u5C0F\u8F93\u5165\u957F\u5EA6",placeholder:"\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C",clearable:"\u662F\u5426\u663E\u793A\u6E05\u9664\u6309\u94AE",disabled:"\u662F\u5426\u7981\u7528",readonly:"\u662F\u5426\u53EA\u8BFB"}},inputNumber:{name:"\u8BA1\u6570\u5668",props:{min:"\u8BBE\u7F6E\u8BA1\u6570\u5668\u5141\u8BB8\u7684\u6700\u5C0F\u503C",max:"\u8BBE\u7F6E\u8BA1\u6570\u5668\u5141\u8BB8\u7684\u6700\u5927\u503C",step:"\u8BA1\u6570\u5668\u6B65\u957F",stepStrictly:"\u662F\u5426\u53EA\u80FD\u8F93\u5165 step \u7684\u500D\u6570",disabled:"\u662F\u5426\u7981\u7528\u8BA1\u6570\u5668",controls:"\u662F\u5426\u4F7F\u7528\u63A7\u5236\u6309\u94AE",controlsPosition:"\u63A7\u5236\u6309\u94AE\u4F4D\u7F6E",placeholder:"\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C"}},password:{name:"\u5BC6\u7801\u8F93\u5165\u6846",event:{change:"\u5F53\u503C\u6539\u53D8\u65F6\uFF0C\u5F53\u7EC4\u4EF6\u5931\u53BB\u7126\u70B9\u6216\u7528\u6237\u6309Enter\u65F6\u89E6\u53D1"},props:{disabled:"\u662F\u5426\u7981\u7528",readonly:"\u662F\u5426\u53EA\u8BFB",maxlength:"\u6700\u5927\u8F93\u5165\u957F\u5EA6",minlength:"\u6700\u5C0F\u8F93\u5165\u957F\u5EA6",placeholder:"\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C",clearable:"\u662F\u5426\u663E\u793A\u6E05\u9664\u6309\u94AE"}},radio:{name:"\u5355\u9009\u6846",props:{disabled:"\u662F\u5426\u7981\u7528",type:"\u6309\u94AE\u5F62\u5F0F",textColor:"\u6309\u94AE\u5F62\u5F0F\u6FC0\u6D3B\u65F6\u7684\u6587\u672C\u989C\u8272",fill:"\u6309\u94AE\u5F62\u5F0F\u6FC0\u6D3B\u65F6\u7684\u586B\u5145\u8272\u548C\u8FB9\u6846\u8272"}},rate:{name:"\u8BC4\u5206",props:{max:"\u6700\u5927\u5206\u503C",disabled:"\u662F\u5426\u7981\u7528",allowHalf:"\u662F\u5426\u5141\u8BB8\u534A\u9009",voidColor:"\u672A\u9009\u4E2D\u65F6\u56FE\u6807\u7684\u989C\u8272",disabledVoidColor:"\u53EA\u8BFB\u65F6\u672A\u9009\u4E2D\u65F6\u56FE\u6807\u7684\u989C\u8272",voidIconClass:"\u672A\u9009\u4E2D\u65F6\u56FE\u6807\u7684\u7C7B\u540D",disabledVoidIconClass:"\u53EA\u8BFB\u65F6\u672A\u9009\u4E2D\u65F6\u56FE\u6807\u7684\u7C7B\u540D",showScore:"\u662F\u5426\u663E\u793A\u5F53\u524D\u5206\u6570",textColor:"\u8F85\u52A9\u6587\u5B57\u7684\u989C\u8272",scoreTemplate:"\u5206\u6570\u663E\u793A\u6A21\u677F"}},select:{name:"\u9009\u62E9\u5668",event:{removeTag:"\u591A\u9009\u6A21\u5F0F\u4E0B\u79FB\u9664tag\u65F6\u89E6\u53D1"},props:{multiple:"\u662F\u5426\u591A\u9009",disabled:"\u662F\u5426\u7981\u7528",clearable:"\u662F\u5426\u53EF\u4EE5\u6E05\u7A7A\u9009\u9879",collapseTags:"\u591A\u9009\u65F6\u662F\u5426\u5C06\u9009\u4E2D\u503C\u6309\u6587\u5B57\u7684\u5F62\u5F0F\u5C55\u793A",multipleLimit:"\u591A\u9009\u65F6\u7528\u6237\u6700\u591A\u53EF\u4EE5\u9009\u62E9\u7684\u9879\u76EE\u6570\uFF0C\u4E3A 0 \u5219\u4E0D\u9650\u5236",placeholder:"\u5360\u4F4D\u7B26",filterable:"\u662F\u5426\u53EF\u641C\u7D22",allowCreate:"\u662F\u5426\u5141\u8BB8\u7528\u6237\u521B\u5EFA\u65B0\u6761\u76EE",noMatchText:"\u641C\u7D22\u6761\u4EF6\u65E0\u5339\u914D\u65F6\u663E\u793A\u7684\u6587\u5B57",noDataText:"\u9009\u9879\u4E3A\u7A7A\u65F6\u663E\u793A\u7684\u6587\u5B57",reserveKeyword:"\u591A\u9009\u4E14\u53EF\u641C\u7D22\u65F6\uFF0C\u662F\u5426\u5728\u9009\u4E2D\u4E00\u4E2A\u9009\u9879\u540E\u4FDD\u7559\u5F53\u524D\u7684\u641C\u7D22\u5173\u952E\u8BCD",defaultFirstOption:"\u5728\u8F93\u5165\u6846\u6309\u4E0B\u56DE\u8F66\uFF0C\u9009\u62E9\u7B2C\u4E00\u4E2A\u5339\u914D\u9879",remote:"\u5176\u4E2D\u7684\u9009\u9879\u662F\u5426\u4ECE\u670D\u52A1\u5668\u8FDC\u7A0B\u52A0\u8F7D",remoteMethod:"\u81EA\u5B9A\u4E49\u8FDC\u7A0B\u641C\u7D22\u65B9\u6CD5"}},slider:{name:"\u6ED1\u5757",props:{min:"\u6700\u5C0F\u503C",max:"\u6700\u5927\u503C",disabled:"\u662F\u5426\u7981\u7528",step:"\u6B65\u957F",showInput:"\u662F\u5426\u663E\u793A\u8F93\u5165\u6846\uFF0C\u4EC5\u5728\u975E\u8303\u56F4\u9009\u62E9\u65F6\u6709\u6548",showInputControls:"\u5728\u663E\u793A\u8F93\u5165\u6846\u7684\u60C5\u51B5\u4E0B\uFF0C\u662F\u5426\u663E\u793A\u8F93\u5165\u6846\u7684\u63A7\u5236\u6309\u94AE",showStops:"\u662F\u5426\u663E\u793A\u95F4\u65AD\u70B9",range:"\u662F\u5426\u4E3A\u8303\u56F4\u9009\u62E9",vertical:"\u662F\u5426\u7AD6\u5411\u6A21\u5F0F",height:"Slider \u9AD8\u5EA6\uFF0C\u7AD6\u5411\u6A21\u5F0F\u65F6\u5FC5\u586B"}},space:{name:"\u95F4\u8DDD",props:{height:"\u9AD8\u5EA6"}},subForm:{name:"\u5206\u7EC4",props:{disabled:"\u662F\u5426\u7981\u7528",syncDisabled:"\u662F\u5426\u4E0E\u5B50\u8868\u5355\u5F3A\u5236\u540C\u6B65\u7981\u7528\u72B6\u6001"}},switch:{name:"\u5F00\u5173",props:{disabled:"\u662F\u5426\u7981\u7528",width:"\u5BBD\u5EA6\uFF08px\uFF09",activeText:"\u6253\u5F00\u65F6\u7684\u6587\u5B57\u63CF\u8FF0",inactiveText:"\u5173\u95ED\u65F6\u7684\u6587\u5B57\u63CF\u8FF0",activeValue:"\u6253\u5F00\u65F6\u7684\u503C",inactiveValue:"\u5173\u95ED\u65F6\u7684\u503C",activeColor:"\u6253\u5F00\u65F6\u7684\u80CC\u666F\u8272",inactiveColor:"\u5173\u95ED\u65F6\u7684\u80CC\u666F\u8272"}},tableForm:{name:"\u8868\u683C\u8868\u5355",props:{disabled:"\u662F\u5426\u7981\u7528",max:"\u6700\u591A\u6DFB\u52A0\u51E0\u884C\uFF0C\u4E3A 0 \u5219\u4E0D\u9650\u5236"}},tableFormColumn:{name:"\u8868\u683C\u683C\u5B50",label:"\u81EA\u5B9A\u4E49\u540D\u79F0",props:{label:"\u6807\u9898",width:"\u5BBD\u5EA6",color:"\u989C\u8272"}},text:{name:"\u6587\u5B57",props:{formCreateNative:"\u662F\u5426\u663E\u793A\u6807\u9898",formCreateTitle:"\u6807\u9898",formCreateChild:"\u5185\u5BB9"}},textarea:{name:"\u591A\u884C\u8F93\u5165\u6846",event:{change:"\u5F53\u503C\u6539\u53D8\u65F6\uFF0C\u5F53\u7EC4\u4EF6\u5931\u53BB\u7126\u70B9\u6216\u7528\u6237\u6309Enter\u65F6\u89E6\u53D1"},props:{disabled:"\u662F\u5426\u7981\u7528",readonly:"\u662F\u5426\u53EA\u8BFB",maxlength:"\u6700\u5927\u8F93\u5165\u957F\u5EA6",minlength:"\u6700\u5C0F\u8F93\u5165\u957F\u5EA6",showWordLimit:"\u662F\u5426\u663E\u793A\u7EDF\u8BA1\u5B57\u6570",placeholder:"\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C",rows:"\u8F93\u5165\u6846\u884C\u6570",autosize:"\u9AD8\u5EA6\u662F\u5426\u81EA\u9002\u5E94"}},timePicker:{name:"\u65F6\u95F4",props:{pickerOptions:"\u5F53\u524D\u65F6\u95F4\u65E5\u671F\u9009\u62E9\u5668\u7279\u6709\u7684\u9009\u9879",readonly:"\u5B8C\u5168\u53EA\u8BFB",disabled:"\u7981\u7528",editable:"\u6587\u672C\u6846\u53EF\u8F93\u5165",clearable:"\u662F\u5426\u663E\u793A\u6E05\u9664\u6309\u94AE",placeholder:"\u975E\u8303\u56F4\u9009\u62E9\u65F6\u7684\u5360\u4F4D\u5185\u5BB9",startPlaceholder:"\u8303\u56F4\u9009\u62E9\u65F6\u5F00\u59CB\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9",endPlaceholder:"\u8303\u56F4\u9009\u62E9\u65F6\u5F00\u59CB\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9",isRange:"\u662F\u5426\u4E3A\u65F6\u95F4\u8303\u56F4\u9009\u62E9",arrowControl:"\u662F\u5426\u4F7F\u7528\u7BAD\u5934\u8FDB\u884C\u65F6\u95F4\u9009\u62E9",align:"\u5BF9\u9F50\u65B9\u5F0F"}},tree:{name:"\u6811\u5F62\u63A7\u4EF6",event:{nodeClick:"\u5F53\u8282\u70B9\u88AB\u70B9\u51FB\u7684\u65F6\u5019\u89E6\u53D1",nodeContextmenu:"\u5F53\u67D0\u4E00\u8282\u70B9\u88AB\u9F20\u6807\u53F3\u952E\u70B9\u51FB\u65F6\u4F1A\u89E6\u53D1\u8BE5\u4E8B\u4EF6",checkChange:"\u5F53\u590D\u9009\u6846\u88AB\u70B9\u51FB\u7684\u65F6\u5019\u89E6\u53D1",check:"\u70B9\u51FB\u8282\u70B9\u590D\u9009\u6846\u4E4B\u540E\u89E6\u53D1",currentChange:"\u5F53\u524D\u9009\u4E2D\u8282\u70B9\u53D8\u5316\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6",nodeExpand:"\u8282\u70B9\u88AB\u5C55\u5F00\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6",nodeCollapse:"\u8282\u70B9\u88AB\u5173\u95ED\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6",nodeDragStart:"\u8282\u70B9\u5F00\u59CB\u62D6\u62FD\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6",nodeDragEnter:"\u62D6\u62FD\u8FDB\u5165\u5176\u4ED6\u8282\u70B9\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6",nodeDragLeave:"\u62D6\u62FD\u79BB\u5F00\u67D0\u4E2A\u8282\u70B9\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6",nodeDragOver:"\u5728\u62D6\u62FD\u8282\u70B9\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6\uFF08\u7C7B\u4F3C\u6D4F\u89C8\u5668\u7684 mouseover \u4E8B\u4EF6\uFF09",nodeDragEnd:"\u62D6\u62FD\u7ED3\u675F\u65F6\uFF08\u53EF\u80FD\u672A\u6210\u529F\uFF09\u89E6\u53D1\u7684\u4E8B\u4EF6",nodeDrop:"\u62D6\u62FD\u6210\u529F\u5B8C\u6210\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6"},props:{emptyText:"\u5185\u5BB9\u4E3A\u7A7A\u7684\u65F6\u5019\u5C55\u793A\u7684\u6587\u672C",props:"\u914D\u7F6E\u9009\u9879",renderAfterExpand:"\u662F\u5426\u5728\u7B2C\u4E00\u6B21\u5C55\u5F00\u67D0\u4E2A\u6811\u8282\u70B9\u540E\u624D\u6E32\u67D3\u5176\u5B50\u8282\u70B9",defaultExpandAll:"\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\u6240\u6709\u8282\u70B9",expandOnClickNode:"\u662F\u5426\u5728\u70B9\u51FB\u8282\u70B9\u7684\u65F6\u5019\u5C55\u5F00\u6216\u8005\u6536\u7F29\u8282\u70B9\uFF0C\u5982\u679C\u4E3A false\uFF0C\u5219\u53EA\u6709\u70B9\u7BAD\u5934\u56FE\u6807\u7684\u65F6\u5019\u624D\u4F1A\u5C55\u5F00\u6216\u8005\u6536\u7F29\u8282\u70B9\u3002",checkOnClickNode:"\u662F\u5426\u5728\u70B9\u51FB\u8282\u70B9\u7684\u65F6\u5019\u9009\u4E2D\u8282\u70B9",autoExpandParent:"\u5C55\u5F00\u5B50\u8282\u70B9\u7684\u65F6\u5019\u662F\u5426\u81EA\u52A8\u5C55\u5F00\u7236\u8282\u70B9",checkStrictly:"\u5728\u663E\u793A\u590D\u9009\u6846\u7684\u60C5\u51B5\u4E0B\uFF0C\u662F\u5426\u4E25\u683C\u7684\u9075\u5FAA\u7236\u5B50\u4E0D\u4E92\u76F8\u5173\u8054\u7684\u505A\u6CD5",accordion:"\u662F\u5426\u6BCF\u6B21\u53EA\u6253\u5F00\u4E00\u4E2A\u540C\u7EA7\u6811\u8282\u70B9\u5C55\u5F00",indent:"\u76F8\u90BB\u7EA7\u8282\u70B9\u95F4\u7684\u6C34\u5E73\u7F29\u8FDB(px)",nodeKey:"\u6BCF\u4E2A\u6811\u8282\u70B9\u7528\u6765\u4F5C\u4E3A\u552F\u4E00\u6807\u8BC6\u7684\u5C5E\u6027\uFF0C\u6574\u68F5\u6811\u5E94\u8BE5\u662F\u552F\u4E00\u7684"}},upload:{name:"\u4E0A\u4F20",info:"\u5728onSuccess\u65B9\u6CD5\u4E2D\u5C06\u63A5\u53E3\u8FD4\u56DE\u7684url\u8D4B\u503C\u7ED9file.url",event:{remove:"\u6587\u4EF6\u5217\u8868\u79FB\u9664\u6587\u4EF6\u65F6\u89E6\u53D1"},props:{listType:"\u4E0A\u4F20\u7C7B\u578B",multiple:"\u662F\u5426\u652F\u6301\u591A\u9009\u6587\u4EF6",action:"\u4E0A\u4F20\u7684\u5730\u5740(\u5FC5\u586B)",onSuccess:"\u4E0A\u4F20\u6210\u529F\u56DE\u8C03",headers:"\u8BBE\u7F6E\u4E0A\u4F20\u7684\u8BF7\u6C42\u5934\u90E8",data:"\u4E0A\u4F20\u65F6\u9644\u5E26\u7684\u989D\u5916\u53C2\u6570",name:"\u4E0A\u4F20\u7684\u6587\u4EF6\u5B57\u6BB5\u540D",withCredentials:"\u652F\u6301\u53D1\u9001 cookie \u51ED\u8BC1\u4FE1\u606F",accept:"\u63A5\u53D7\u4E0A\u4F20\u7684\u6587\u4EF6\u7C7B\u578B",autoUpload:"\u662F\u5426\u5728\u9009\u53D6\u6587\u4EF6\u540E\u7ACB\u5373\u8FDB\u884C\u4E0A\u4F20",disabled:"\u662F\u5426\u7981\u7528",limit:"\u6700\u5927\u5141\u8BB8\u4E0A\u4F20\u4E2A\u6570"}}}};function fp(e,t,n,r=[]){t.id||(t.id=1),n&&n--;for(let o=0;o<3;o++){const i={[t.label]:e+10*n+o,[t.value]:""+t.id++};n&&fp(e,t,n,i.children=[]),r.push(i)}return r}function kx(e,t){const n=[{label:e("fetch.optionsType.struct"),value:2},{label:e("fetch.optionsType.fetch"),value:1}],r=[{value:1,rule:[{type:"FetchConfig",field:"formCreateEffect>fetch",props:{to:t}}]},{value:2,rule:[{type:"TableOptions",field:"formCreate"+g4(t).replace(".",">"),props:{keyValue:"label"}}]}];return{type:"radio",title:e("props.options"),field:"_optionType",value:2,options:n,props:{type:"button"},control:r}}function Dx({t:e,to:t,label:n,value:r}){const o=[{label:e("fetch.optionsType.struct"),value:2},{label:e("fetch.optionsType.fetch"),value:1}],i=[{value:1,rule:[{type:"FetchConfig",field:"formCreateEffect>fetch",props:{to:t}}]},{value:2,rule:[{type:"TreeOptions",field:"formCreate"+g4(t).replace(".",">"),props:{columns:{label:n,value:r},keyValue:n}}]}];return{type:"radio",title:e("props.options"),field:"_optionType",value:2,options:o,props:{type:"button"},control:i}}function g4(e){return e.replace(e[0],e[0].toLocaleUpperCase())}const pp=function(e){const t=/object ([a-zA-Z]*)/.exec(Object.prototype.toString.call(e));return t&&zde[t[1].toLowerCase()]?zde[t[1].toLowerCase()](e):e},zde={object:function(e){var t=[];for(var n in e)!v4(e,n)||t.push(pp(n)+": "+(e[n]!=null?pp(e[n]):"null"));return`{ |
|
49 |
`+t.join(`, |
|
50 |
`)+` |
|
51 |
}`},function:function(e){var t=/^ *([\w]+) *\(/.exec(e=""+e);return t&&t[1]!=="function"?"function "+e:e},array:function(e){for(var t=0,n=[];t<e.length;t++)n[t]=e[t]!=null?pp(e[t]):"null";return"["+n.join(", ")+"]"},string:function(e){for(var t=e.split(""),n=0;n<t.length;n++){var r=t[n];r>=" "?r==="\\"?t[n]="\\\\":r==='"'&&(t[n]='\\"'):t[n]=r===` |
|
52 |
`?"\\n":r==="\r"?"\\r":r===" "?"\\t":r==="\b"?"\\b":r==="\f"?"\\f":"\\u00"+((r=r.charCodeAt())>15?1:0)+r%16}return'"'+t.join("")+'"'}},Hde=function(e){if(e&&typeof e=="object"){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];(Array.isArray(n)||Lr.Object(n))&&Hde(n),Lr.String(n)&&(e[t]=b$e(n))}}return e},A$e=e=>(t,n)=>w$e(t,n,M(e)),w$e=(e,t,n)=>function(r,o,i){let a=0,l=(o=(o||"").split(".")).length;for(;r!=null&&a<l;)r=r[o[a++]];return a&&a===l&&r!==void 0?r:i}(n,e,"").replace(/\{(\w+)\}/g,(r,o)=>{var i;return`${(i=t==null?void 0:t[o])!=null?i:`{${o}}`}`}),x$e=e=>{const t=ee(()=>M(e).name),n=ee(()=>g4(function(o){const i=o.replace(/(-[a-z])/g,function(a){return a.replace("-","").toLocaleUpperCase()});return dI(i)}(t.value||""))),r=Jn(e)?e:de(e);return{lang:t,name:n,locale:r,t:A$e(e)}},fI=e=>x$e(ee(()=>e.value||Vde)),ya=(e,t,n)=>t.map(r=>(r.label=e("props."+r.value)||r.label,r)),er=(e,t,n)=>n.map(r=>(r.field==="formCreate$required"?r.title=e("validate.required")||r.title:r.field&&r.field!=="_optionType"&&(r.title=e("com."+t+"."+r.field)||r.title),r.type==="template"&&Lr.trueArray(r.children)&&(r.children=er(e,t,r.children)),r)),pI=e=>{const t=[];return e&&e.forEach(n=>{if(n._fc_drag_tag){const r={id:n.__fc__.id,rule:n,children:pI(n.children)};r.children.length||delete r.children,t.push(r)}else t.push(...pI(n.children))}),t},$de=e=>{const t=n=>{const r=[];return n&&n.forEach(o=>{o.field?(o.children=t(o.children||[]),o.children.length||delete o.children,r.push(o)):r.push(...t(o.children||[]))}),r};return t(e)},Ude=e=>{const t=n=>{const r=[];return n&&n.forEach(o=>{if(typeof o=="object")if(o._fc_drag_tag){const i={_fc_id:o._fc_id,type:o.type,field:o.field,title:o.title,name:o.name,slot:o.slot,props:{...o.props||{}},children:t(o.children||[])};o.children&&typeof o.children[0]=="string"&&(i.content=o.children[0]),i.children.length||delete i.children,r.push(i)}else r.push(...t(o.children))}),r};return t(e)};function Wde(e){return{name:"$inject",columns:[{label:"$inject.api",info:e("event.inject.api"),type:"Api"},{label:"$inject.rule",info:e("event.inject.rule"),type:"Rule[]"},{label:"$inject.self",info:e("event.inject.self"),type:"Rule"},{label:"$inject.option",info:e("event.inject.option"),type:"Object"},{label:"$inject.args",info:e("event.inject.args"),type:"Array"}]}}function Eg(e){return["",null,void 0].indexOf(e)!==-1}function Gde({t:e}){return[{type:"input",field:">formName",value:"",title:e("form.formName")},{type:"radio",field:"labelPosition",value:"left",title:e("form.labelPosition"),options:ya(e,[{value:"left",label:"left"},{value:"right",label:"right"},{value:"top",label:"top"}])},{type:"radio",field:"size",value:"small",title:e("form.size"),options:ya(e,[{value:"large",label:"large"},{value:"default",label:"default"},{value:"small",label:"small"}])},{type:"input",field:"labelSuffix",value:"",title:e("form.labelSuffix"),style:{width:"150px"}},{type:"SizeInput",field:"labelWidth",value:"125px",title:e("form.labelWidth")},{type:"switch",field:"hideRequiredAsterisk",value:!1,title:e("form.hideRequiredAsterisk")},{type:"switch",field:"showMessage",value:!0,title:e("form.showMessage")},{type:"switch",field:"inlineMessage",value:!1,title:e("form.inlineMessage")},{type:"switch",field:"_submitBtn>show",value:!0,title:e("form.submitBtn")},{type:"switch",field:"_resetBtn>show",value:!1,title:e("form.resetBtn")},{type:"FnConfig",field:">_event",info:{type:"tooltip",native:!0,effect:"light",align:"left",content:e("form.document")+'\uFF1A<a target="_blank" href="https://form-create.com/v3/guide/global-event">https://form-create.com/v3/guide/global-event</a>',rawContent:!0},value:{},col:{show:!0},props:{eventConfig:[{name:"onSubmit",args:["formData","api"]},{name:"onCreated",args:["api"]},{name:"onMounted",args:["api"]},{name:"onChange",args:["field","value","options"]},{name:"beforeFetch",args:["config","data"]}]},title:e("form.event")}]}function y4({t:e}){return[{type:"FieldInput",field:"field",value:"",title:e("form.field")},{type:"input",field:"title",value:"",title:e("form.title")},{type:"input",field:"info",value:"",title:e("form.info")},{type:"SizeInput",field:"formCreateWrap>labelWidth",value:"",title:e("form.labelWidth")},{type:"Struct",field:"_control",value:[],title:e("form.control"),info:{type:"tooltip",native:!0,effect:"light",align:"left",content:e("form.document")+'\uFF1A<a target="_blank" href="https://form-create.com/v3/guide/control">https://form-create.com/v3/guide/control</a>',rawContent:!0},props:{defaultValue:[],validate:t=>!!Array.isArray(t)&&(!t.length||!t.some(({rule:n})=>!Array.isArray(n)))}}]}function qde({t:e}){return[{type:"Required",field:"$required",title:e("validate.required")},{type:"validate",field:"validate",title:e("validate.rule"),value:[]}]}function _$e(e){e=e||new Map;const t={$on(n,r){const o=e.get(n);o&&o.push(r)||e.set(n,[r])},$once(n,r){r._once=!0,t.$on(n,r)},$off(n,r){const o=e.get(n);o&&o.splice(o.indexOf(r)>>>0,1)},$emit(n,...r){(e.get(n)||[]).slice().map(o=>{o._once&&(t.$off(n,o),delete o._once),o(...r)}),(e.get("*")||[]).slice().map(o=>{o(n,r)})}};return t}let E$e=0;function vr(){const e=370+ ++E$e;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+e.toString(36)+"c"}const hI="radio",C$e={menu:"main",icon:"icon-radio",label:"\u5355\u9009\u6846",name:hI,event:["change"],validate:["string","number"],rule:({t:e})=>({type:hI,field:vr(),title:e("com.radio.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:fp(e("props.option"),{label:"label",value:"value"},1)}),props:(e,{t})=>er(t,hI+".props",[kx(t,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{type:"ColorInput",field:"textColor"},{type:"ColorInput",field:"fill"}])},vI="checkbox",S$e={menu:"main",icon:"icon-checkbox",label:"\u591A\u9009\u6846",name:vI,event:["change"],validate:["array"],rule:({t:e})=>({type:vI,field:vr(),title:e("com.checkbox.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:fp(e("props.option"),{label:"label",value:"value"},1)}),props:(e,{t})=>er(t,vI+".props",[kx(t,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{field:"min",type:"inputNumber",props:{min:0}},{field:"max",type:"inputNumber",props:{min:0}},{type:"ColorInput",field:"textColor"},{type:"ColorInput",field:"fill"}])},mI="input",k$e={menu:"main",icon:"icon-input",label:"\u8F93\u5165\u6846",name:mI,event:["blur","focus","change","input","clear"],validate:["string","url","email"],rule:({t:e})=>({type:mI,field:vr(),title:e("com.input.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,mI+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"inputNumber",field:"minlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])},Kde="textarea",D$e={menu:"main",icon:"icon-textarea",label:"\u591A\u884C\u8F93\u5165\u6846",name:Kde,event:["blur","focus","change","input"],validate:["string"],rule:({t:e})=>({type:"input",field:vr(),title:e("com.textarea.name"),info:"",$required:!1,props:{type:"textarea"}}),props:(e,{t})=>er(t,Kde+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"inputNumber",field:"minlength",props:{min:0}},{type:"switch",field:"showWordLimit"},{type:"input",field:"placeholder"},{type:"inputNumber",field:"rows",props:{min:0}},{type:"switch",field:"autosize"}])},Yde="password",O$e={menu:"main",icon:"icon-password",label:"\u5BC6\u7801\u8F93\u5165\u6846",name:Yde,event:["blur","focus","change","input","clear"],validate:["string"],rule:({t:e})=>({type:"input",field:vr(),title:e("com.password.name"),info:"",$required:!1,props:{type:"password"}}),props:(e,{t})=>er(t,Yde+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"inputNumber",field:"minlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])},gI="inputNumber",T$e={menu:"main",icon:"icon-number",label:"\u8BA1\u6570\u5668",name:gI,event:["blur","focus","change"],validate:["number","integer","float"],rule:({t:e})=>({type:gI,field:vr(),title:e("com.inputNumber.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,gI+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"stepStrictly"},{type:"switch",field:"controls",value:!0},{type:"select",field:"controlsPosition",options:ya(t,[{label:"default",value:""},{label:"right",value:"right"}])},{type:"input",field:"placeholder"}])},yI="select",M$e={menu:"main",icon:"icon-select",label:"\u9009\u62E9\u5668",name:yI,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule:({t:e})=>({type:yI,field:vr(),title:e("com.select.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:fp(e("props.option"),{label:"label",value:"value"},1)}),watch:{multiple({rule:e}){e.key=vr()}},props:(e,{t})=>er(t,yI+".props",[kx(t,"options"),{type:"switch",field:"multiple"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"switch",field:"collapseTags"},{type:"inputNumber",field:"multipleLimit",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"filterable"},{type:"switch",field:"remote"},{type:"FnEditor",field:"remoteMethod",props:{body:!0,button:!0,fnx:!0,name:"remoteMethod",args:[Wde(t)]}},{type:"switch",field:"allowCreate"},{type:"input",field:"noMatchText"},{type:"input",field:"noDataText"},{type:"switch",field:"reserveKeyword"},{type:"switch",field:"defaultFirstOption"}])},bI="switch",N$e={menu:"main",icon:"icon-switch",label:"\u5F00\u5173",name:bI,event:["change"],rule:({t:e})=>({type:bI,field:vr(),title:e("com.switch.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,bI+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"width",props:{min:0}},{type:"input",field:"activeText"},{type:"input",field:"inactiveText"},{type:"input",field:"activeValue"},{type:"input",field:"inactiveValue"},{type:"ColorInput",field:"activeColor"},{type:"ColorInput",field:"inactiveColor"}])},AI="slider",F$e={menu:"main",icon:"icon-slider",label:"\u6ED1\u5757",name:AI,event:["change","input"],validate:["number","array"],rule:({t:e})=>({type:AI,field:vr(),title:e("com.slider.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,AI+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"range"},{type:"inputNumber",field:"min",props:{min:0}},{type:"inputNumber",field:"max",props:{min:0}},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"showInput"},{type:"switch",field:"showInputControls",value:!0},{type:"switch",field:"showStops"},{type:"switch",field:"vertical"},{type:"input",field:"height"}])},wI="timePicker",R$e={menu:"main",icon:"icon-time",label:"\u65F6\u95F4",name:wI,event:["change","blur","focus","visibleChange"],rule:({t:e})=>({type:wI,field:vr(),title:e("com.timePicker.name"),info:"",$required:!1,props:{}}),watch:{isRange({rule:e}){e.key=vr()}},props:(e,{t})=>er(t,wI+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"isRange"},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:ya(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},I$e={menu:"main",icon:"icon-time",label:"\u65F6\u95F4\u533A\u95F4",name:"timeRange",event:["change","blur","focus","visibleChange"],rule:({t:e})=>({type:"timePicker",field:vr(),title:e("com.timeRange.name"),info:"",$required:!1,props:{isRange:!0}}),props:(e,{t})=>er(t,"timePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:ya(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},xI="datePicker",B$e={menu:"main",icon:"icon-date",label:"\u65E5\u671F",name:xI,event:["change","blur","focus","calendarChange","panelChange","visibleChange"],rule:({t:e})=>({type:xI,field:vr(),title:e("com.datePicker.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,xI+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:ya(t,[{label:"year",value:"year"},{label:"month",value:"month"},{label:"date",value:"date"},{label:"dates",value:"dates"},{label:"week",value:"week"},{label:"datetime",value:"datetime"},{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:ya(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])},L$e={menu:"main",icon:"icon-date",label:"\u65E5\u671F\u533A\u95F4",name:"dateRange",event:["change","blur","focus","calendarChange","panelChange","visibleChange"],rule:({t:e})=>({type:"datePicker",field:vr(),title:e("com.dateRange.name"),info:"",$required:!1,props:{type:"datetimerange"}}),props:(e,{t})=>er(t,"datePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:ya(t,[{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:ya(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])},_I="rate",P$e={menu:"main",icon:"icon-rate",label:"\u8BC4\u5206",name:_I,event:["change"],validate:["number"],rule:({t:e})=>({type:_I,field:vr(),title:e("com.rate.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,_I+".props",[{type:"inputNumber",field:"max",props:{min:0}},{type:"switch",field:"disabled"},{type:"switch",field:"allowHalf"},{type:"ColorInput",field:"voidColor"},{type:"ColorInput",field:"disabledVoidColor"},{type:"input",field:"voidIconClass"},{type:"input",field:"disabledVoidIconClass"},{type:"switch",field:"showScore"},{type:"ColorInput",field:"textColor"},{type:"input",field:"scoreTemplate"}])},EI="colorPicker",j$e={menu:"main",icon:"icon-color",label:"\u989C\u8272\u9009\u62E9\u5668",name:EI,event:["change","activeChange","focus","blur"],validate:["string"],rule:({t:e})=>({type:EI,field:vr(),title:e("com.colorPicker.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,EI+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"showAlpha"},{type:"select",field:"colorFormat",options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},{type:"tableOptions",field:"predefine",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string"}}])},CI="fcRow",V$e={menu:"layout",icon:"icon-row",label:"\u6805\u683C\u5E03\u5C40",name:CI,mask:!1,children:"col",childrenLen:2,rule:()=>({type:CI,props:{},children:[]}),props:(e,{t})=>er(t,CI+".props",[{type:"inputNumber",field:"gutter",props:{min:0}},{type:"switch",field:"type",props:{activeValue:"flex",inactiveValue:"default"}},{type:"select",field:"justify",options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}]},{type:"select",field:"align",options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}]}])},SI="col",z$e={name:SI,label:"\u683C\u5B50",drag:!0,dragBtn:!1,inside:!0,mask:!1,rule:()=>({type:SI,props:{span:12},children:[]}),props:(e,{t})=>er(t,SI+".props",[{type:"slider",field:"span",value:12,props:{min:0,max:24}},{type:"slider",field:"offset",props:{min:0,max:24}},{type:"slider",field:"push",props:{min:0,max:24}},{type:"slider",field:"pull",props:{min:0,max:24}}])},kI="elTabPane",H$e={label:"\u9009\u9879\u5361",name:kI,inside:!0,drag:!0,dragBtn:!1,mask:!1,rule:({t:e})=>({type:kI,props:{label:e("com.elTabPane.name")},children:[]}),props:(e,{t})=>er(t,kI+".props",[{type:"input",field:"label"},{type:"switch",field:"disabled"},{type:"input",field:"name"},{type:"switch",field:"lazy"}])},DI="elDivider",$$e={menu:"aide",icon:"icon-divider",label:"\u5206\u5272\u7EBF",name:DI,rule:({t:e})=>({type:DI,props:{},children:[e("com.elDivider.name")]}),props:(e,{t})=>er(t,DI+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"contentPosition",options:ya(t,[{label:"left",value:"left"},{label:"right",value:"right"},{label:"center",value:"center"}])}])},Ox="cascader",U$e={menu:"main",icon:"icon-cascader",label:"\u7EA7\u8054\u9009\u62E9\u5668",name:Ox,event:["change","expandChange","blur","focus","visibleChange","removeTag"],validate:["string","number","array"],rule:({t:e})=>({type:Ox,field:vr(),title:e("com.cascader.name"),info:"",effect:{fetch:""},$required:!1,props:{options:fp(e("props.option"),{label:"label",value:"value"},3)}}),props:(e,{t})=>er(t,Ox+".props",[Dx({t,to:"props.options"}),{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"input",field:"placeholder"},{type:"Object",field:"props",props:{rule:er(t,Ox+".propsOpt",[{type:"switch",field:"multiple"},{type:"select",field:"expandTrigger",options:ya(t,[{label:"click",value:"click"},{label:"hover",value:"hover"}])},{type:"switch",field:"checkStrictly"},{type:"switch",field:"emitPath",value:!0},{type:"input",field:"value",value:"value"},{type:"input",field:"label",value:"label"},{type:"input",field:"children",value:"children"},{type:"input",field:"disabled",value:"disabled"},{type:"input",field:"leaf"}])}},{type:"switch",field:"showAllLevels",value:!0},{type:"switch",field:"collapseTags"},{type:"switch",field:"collapseTagsTooltip"},{type:"input",field:"separator"},{type:"switch",field:"filterable"},{type:"select",field:"tagType",options:[{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]}])},OI="upload",W$e={menu:"main",icon:"icon-upload",label:"\u4E0A\u4F20",name:OI,event:["change","remove"],validate:["array"],rule:({t:e})=>({type:OI,field:vr(),title:e("com.upload.name"),info:"",$required:!1,props:{action:"/",onSuccess(t,n){n.url=t.data.url}}}),props:(e,{t})=>er(t,OI+".props",[{type:"switch",field:"disabled"},{type:"select",field:"listType",value:"text",options:ya(t,[{label:"text",value:"text"},{label:"picture",value:"picture"},{label:"picture-card",value:"picture-card"}])},{type:"switch",field:"multiple"},{type:"input",field:"action"},{type:"FnEditor",field:"onSuccess",info:t("com.upload.info"),props:{args:["res","file"],name:"onSuccess",button:!0}},{type:"TableOptions",field:"headers",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"TableOptions",field:"data",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"input",field:"name"},{type:"switch",field:"withCredentials"},{type:"input",field:"accept"},{type:"switch",field:"autoUpload",value:!0},{type:"inputNumber",field:"limit",props:{min:0}}])},TI="elTransfer",G$e={menu:"main",icon:"icon-transfer",label:"\u7A7F\u68AD\u6846",name:TI,event:["change","leftCheckChange","rightCheckChange"],validate:["string","number","array"],rule:({t:e})=>({type:TI,field:vr(),title:e("com.elTransfer.name"),info:"",$required:!1,props:{data:fp(e("props.option"),{label:"label",value:"key"},1)}}),props:(e,{t})=>er(t,TI+".props",[Dx({t,to:"props.data",label:"label",value:"key"}),{type:"switch",field:"filterable"},{type:"input",field:"filterPlaceholder"},{type:"select",field:"targetOrder",info:t("com.elTransfer.targetOrderInfo"),options:[{label:"original",value:"original"},{label:"push",value:"push"},{label:"unshift",value:"unshift"}]},{type:"TableOptions",field:"titles",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string",max:2}},{type:"TableOptions",field:"buttonTexts",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string",max:2}}])},MI="tree",q$e={menu:"main",icon:"icon-tree",label:"\u6811\u5F62\u63A7\u4EF6",name:MI,event:["nodeClick","nodeContextmenu","checkChange","check","currentChange","nodeExpand","nodeCollapse","nodeDragStart","nodeDragEnter","nodeDragLeave","nodeDragOver","nodeDragEnd","nodeDrop"],validate:["string","number","array"],rule:({t:e})=>({type:MI,field:vr(),title:e("com.tree.name"),info:"",effect:{fetch:""},$required:!1,props:{props:{label:"label"},showCheckbox:!0,nodeKey:"id",data:fp(e("props.option"),{label:"label",value:"id"},3)}}),props:(e,{t})=>er(t,MI+".props",[Dx({t,to:"props.data",label:"label",value:"id"}),{type:"input",field:"emptyText"},{type:"TableOptions",field:"props",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"renderAfterExpand",value:!0},{type:"switch",field:"defaultExpandAll"},{type:"switch",field:"expandOnClickNode",value:!0},{type:"switch",field:"checkOnClickNode"},{type:"switch",field:"autoExpandParent",value:!0},{type:"switch",field:"checkStrictly"},{type:"switch",field:"accordion"},{type:"inputNumber",field:"indent"},{type:"input",field:"nodeKey"}])},NI="elAlert",K$e={menu:"aide",icon:"icon-alert",label:"\u63D0\u793A",name:NI,event:["close"],rule:({t:e})=>({type:NI,props:{title:e("com.elAlert.name"),description:e("com.elAlert.description"),type:"success",effect:"dark"},children:[]}),props:(e,{t})=>er(t,NI+".props",[{type:"input",field:"title"},{type:"select",field:"type",options:[{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"info",value:"info"},{label:"error",value:"error"}]},{type:"input",field:"description"},{type:"switch",field:"closable",value:!0},{type:"switch",field:"center",value:!0},{type:"input",field:"closeText"},{type:"switch",field:"showIcon"},{type:"select",field:"effect",options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]}])},Xde="text",Y$e={menu:"aide",icon:"icon-span",label:"\u6587\u5B57",name:Xde,rule:({t:e})=>({type:"div",title:"",native:!0,children:[e("com.text.name")]}),watch:{formCreateNative({value:e,rule:t}){e&&(t.title="")}},props:(e,{t})=>er(t,Xde+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild",props:{type:"textarea"}}])},Qde="space",X$e={menu:"layout",icon:"icon-space",label:"\u95F4\u8DDD",name:Qde,rule:()=>({type:"div",wrap:{show:!1},native:!0,style:{width:"100%",height:"20px"},children:[]}),props:(e,{t})=>[{type:"object",field:"formCreateStyle",native:!0,props:{rule:er(t,Qde+".props",[{type:"input",field:"height",title:"height"}])}}]},FI="elTabs",Q$e={menu:"layout",icon:"icon-tab",label:"\u6807\u7B7E\u9875",name:FI,mask:!1,event:["tabClick","tabChange","tabRemove","tabAdd","edit"],children:"elTabPane",rule:()=>({type:FI,style:{width:"100%"},children:[]}),props:(e,{t})=>er(t,FI+".props",[{type:"select",field:"type",options:[{label:"card",value:"card"},{label:"border-card",value:"border-card"}]},{type:"switch",field:"closable"},{type:"select",field:"tabPosition",options:ya(t,[{label:"top",value:"top"},{label:"right",value:"right"},{label:"left",value:"left"}])},{type:"switch",field:"stretch"}])},RI="elButton",J$e={menu:"aide",icon:"icon-button",label:"\u6309\u94AE",name:RI,mask:!0,event:["click"],rule:({t:e})=>({type:RI,props:{},children:[e("com.elButton.name")]}),props:(e,{t})=>er(t,RI+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"size",options:ya(t,[{label:"large",value:"large"},{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"switch",field:"plain"},{type:"switch",field:"round"},{type:"switch",field:"circle"},{type:"switch",field:"loading"},{type:"switch",field:"disabled"}])},II="fcEditor",Z$e={menu:"main",icon:"icon-editor",label:"\u5BCC\u6587\u672C\u6846",name:II,event:["change"],validate:["string"],rule:({t:e})=>({type:II,field:vr(),title:e("com.fcEditor.name"),info:"",$required:!1,props:{}}),props:(e,{t})=>er(t,II+".props",[{type:"switch",field:"disabled"}])},Jde="group",eUe={menu:"subform",icon:"icon-subform",label:"\u5B50\u8868\u5355",name:Jde,inside:!1,drag:!0,dragBtn:!0,mask:!1,event:["change"],subForm:"array",loadRule(e){e.children=e.props.rule||[],e.type="FcRow",delete e.props.rule},parseRule(e){e.props.rule=e.children,e.type="group",delete e.children,delete e.props.mode},rule:({t:e})=>({type:"fcRow",field:vr(),title:e("com.group.name"),info:"",$required:!1,props:{},children:[]}),props:(e,{t})=>er(t,Jde+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0},{type:"switch",field:"button",value:!0},{type:"switch",field:"sortBtn",value:!0},{type:"inputNumber",field:"expand"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"}])},Zde="subForm",tUe={menu:"subform",icon:"icon-group",label:"\u5206\u7EC4",name:Zde,inside:!1,drag:!0,dragBtn:!0,mask:!1,subForm:"object",event:["change"],loadRule(e){e.children=e.props.rule||[],e.type="FcRow",delete e.props.rule},parseRule(e){e.props.rule=e.children,e.type="subForm",delete e.children},rule:({t:e})=>({type:"fcRow",field:vr(),title:e("com.subForm.name"),info:"",$required:!1,props:{},children:[]}),props:(e,{t})=>er(t,Zde+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0}])},BI="elCard",nUe={menu:"layout",icon:"icon-card",label:"\u5361\u7247",name:BI,drag:!0,inside:!1,mask:!1,rule:({t:e})=>({type:BI,props:{header:e("com.elCard.props.header")},style:{width:"100%"},children:[]}),props:(e,{t})=>er(t,BI+".props",[{type:"input",field:"header"},{type:"select",field:"shadow",value:"always",options:ya(t,[{label:"always",value:"always"},{label:"never",value:"never"},{label:"hover",value:"hover"}])}])},LI="elCollapse",rUe={menu:"layout",icon:"icon-collapse",label:"\u6298\u53E0\u9762\u677F",name:LI,mask:!1,children:"elCollapseItem",event:["change"],rule:()=>({type:LI,props:{},style:{width:"100%"},children:[]}),props:(e,{t})=>er(t,LI+".props",[{type:"switch",field:"accordion"}])},PI="elCollapseItem",oUe={icon:"icon-cell",label:"\u9762\u677F",name:PI,drag:!0,dragBtn:!1,inside:!0,mask:!1,rule:({t:e})=>({type:PI,props:{title:e("com.elCollapseItem.name")},style:{},children:[]}),props:(e,{t})=>er(t,PI+".props",[{type:"input",field:"title"},{type:"input",field:"name"},{type:"switch",field:"disabled"}])},jI="elTreeSelect",iUe={menu:"main",icon:"icon-tree-select",label:"\u6811\u5F62\u9009\u62E9",name:jI,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule:({t:e})=>({type:jI,field:vr(),title:e("com.elTreeSelect.name"),info:"",effect:{fetch:""},$required:!1,props:{nodeKey:"value",showCheckbox:!0,data:fp(e("props.option"),{label:"label",value:"value"},3)}}),watch:{multiple({rule:e}){e.key=vr()}},props:(e,{t})=>er(t,jI+".props",[Dx({t,to:"props.data",label:"label",value:"value"}),{type:"switch",field:"multiple"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"switch",field:"collapseTags"},{type:"inputNumber",field:"multipleLimit",props:{min:0}},{type:"input",field:"placeholder"},{type:"TableOptions",field:"props",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"renderAfterExpand",value:!0},{type:"switch",field:"defaultExpandAll"},{type:"switch",field:"expandOnClickNode",value:!0},{type:"switch",field:"checkOnClickNode"},{type:"input",field:"nodeKey"}])},VI="elTag",aUe={menu:"aide",icon:"icon-tag",label:"\u6807\u7B7E",name:VI,mask:!0,event:["click","close"],rule:({t:e})=>({type:VI,title:"",native:!0,children:[e("com.elTag.name")]}),watch:{formCreateNative({value:e,rule:t}){e&&(t.title="")}},props:(e,{t})=>er(t,VI+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild"},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"select",field:"size",options:ya(t,[{label:"large",value:"large"},{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"effect",options:[{label:"dark",value:"dark"},{label:"light",value:"light"},{label:"plain",value:"plain"}]},{type:"switch",field:"closable"},{type:"switch",field:"disableTransitions"},{type:"switch",field:"hit"},{type:"switch",field:"round"},{type:"ColorInput",field:"color"}])},zI="html",lUe={menu:"aide",icon:"icon-html",label:"HTML",name:zI,rule:()=>({type:zI,title:"",native:!0,attrs:{innerHTML:""},children:[`<div style="color:blue;"> |
|
53 |
html html html html html html html html html |
|
54 |
</div>`]}),watch:{formCreateNative({value:e,rule:t}){e&&(t.title="")}},props:(e,{t})=>er(t,zI+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"HtmlEditor",field:"formCreateChild"}])},HI="fcTable",sUe={menu:"layout",icon:"icon-table",label:"\u8868\u683C\u5E03\u5C40",name:HI,inside:!1,mask:!1,rule:()=>({type:HI,props:{rule:{row:3,col:4,style:{},class:{},layout:[]}},children:[]}),props:(e,{t})=>er(t,HI+".props",[{type:"switch",field:"border",value:!0},{type:"ColorInput",field:"borderColor"},{type:"input",field:"borderWidth"}])},$I="tableForm",uUe={menu:"subform",icon:"icon-table-form",label:"\u8868\u683C\u8868\u5355",name:$I,mask:!1,subForm:"array",event:["change","add","delete"],children:"tableFormColumn",loadRule(e){e.props||(e.props={});const t=e.props.columns||[];e.children=t.map(n=>({type:"tableFormColumn",_fc_drag_tag:"tableFormColumn",props:{label:n.label,width:n.style.width||"",color:n.style.color||""},children:n.rule||[]})),delete e.props.columns},parseRule(e){const t=e.children||[];e.props.columns=t.map(n=>({label:n.props.label,style:{width:n.props.width,color:n.props.color},rule:n.children||[]})),e.children=[]},rule:({t:e})=>({type:$I,field:vr(),title:e("com.tableForm.name"),info:"",props:{},children:[]}),props:(e,{t})=>er(t,$I+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"max",props:{min:0}}])},UI="tableFormColumn",cUe={icon:"icon-cell",name:UI,drag:!0,dragBtn:!1,mask:!1,rule:({t:e})=>({type:UI,props:{label:e("com.tableFormColumn.label"),width:"auto"},children:[]}),props:(e,{t})=>er(t,UI+".props",[{type:"input",field:"label"},{type:"input",field:"width"},{type:"ColorInput",field:"color"}])},dUe=[k$e,D$e,O$e,T$e,C$e,S$e,M$e,N$e,P$e,R$e,I$e,F$e,B$e,L$e,j$e,U$e,W$e,G$e,q$e,iUe,Z$e,eUe,tUe,uUe,cUe,K$e,J$e,Y$e,lUe,$$e,aUe,V$e,sUe,Q$e,X$e,nUe,rUe,z$e,H$e,oUe];function efe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Lc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?efe(Object(n),!0).forEach(function(r){fUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):efe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WI(e){return WI=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},WI(e)}function fUe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gd(){return Gd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gd.apply(this,arguments)}function pUe(e,t){if(e==null)return{};var n,r,o=function(a,l){if(a==null)return{};var s,u,c={},d=Object.keys(a);for(u=0;u<d.length;u++)s=d[u],!(l.indexOf(s)>=0)&&(c[s]=a[s]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(o[n]=e[n]))}return o}function qd(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Kd=qd(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),b4=qd(/Edge/i),tfe=qd(/firefox/i),A4=qd(/safari/i)&&!qd(/chrome/i)&&!qd(/android/i),nfe=qd(/iP(ad|od|hone)/i),hUe=qd(/chrome/i)&&qd(/android/i),rfe={capture:!1,passive:!1};function $r(e,t,n){e.addEventListener(t,n,!Kd&&rfe)}function Ir(e,t,n){e.removeEventListener(t,n,!Kd&&rfe)}function Tx(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function vUe(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Pc(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Tx(e,t):Tx(e,t))||r&&e===n)return e;if(e===n)break}while(e=vUe(e))}return null}var w4,ofe=/\s+/g;function ms(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(ofe," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(ofe," ")}}function Rn(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function Cg(e,t){var n="";if(typeof e=="string")n=e;else do{var r=Rn(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function ife(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function jc(){return document.scrollingElement||document.documentElement}function Ni(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,l,s,u,c,d;if(e!==window&&e.parentNode&&e!==jc()?(a=(i=e.getBoundingClientRect()).top,l=i.left,s=i.bottom,u=i.right,c=i.height,d=i.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!Kd))do if(o&&o.getBoundingClientRect&&(Rn(o,"transform")!=="none"||n&&Rn(o,"position")!=="static")){var f=o.getBoundingClientRect();a-=f.top+parseInt(Rn(o,"border-top-width")),l-=f.left+parseInt(Rn(o,"border-left-width")),s=a+i.height,u=l+i.width;break}while(o=o.parentNode);if(r&&e!==window){var p=Cg(o||e),m=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(c/=v),u=(l/=m)+(d/=m))}return{top:a,left:l,bottom:s,right:u,width:d,height:c}}}function afe(e,t,n){for(var r=hp(e,!0),o=Ni(e)[t];r;){if(!(o>=Ni(r)[n]))return r;if(r===jc())break;r=hp(r,!1)}return!1}function Sg(e,t,n,r){for(var o=0,i=0,a=e.children;i<a.length;){if(a[i].style.display!=="none"&&a[i]!==In.ghost&&(r||a[i]!==In.dragged)&&Pc(a[i],n.draggable,e,!1)){if(o===t)return a[i];o++}i++}return null}function GI(e,t){for(var n=e.lastElementChild;n&&(n===In.ghost||Rn(n,"display")==="none"||t&&!Tx(n,t));)n=n.previousElementSibling;return n||null}function tu(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==In.clone&&(!t||Tx(e,t))&&n++;return n}function lfe(e){var t=0,n=0,r=jc();if(e)do{var o=Cg(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function hp(e,t){if(!e||!e.getBoundingClientRect)return jc();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Rn(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return jc();if(r||t)return n;r=!0}}while(n=n.parentNode);return jc()}function qI(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function sfe(e,t){return function(){if(!w4){var n=arguments;n.length===1?e.call(this,n[0]):e.apply(this,n),w4=setTimeout(function(){w4=void 0},t)}}}function ufe(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function cfe(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var gs="Sortable"+new Date().getTime();function mUe(){var e,t=[];return{captureAnimationState:function(){t=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(n){if(Rn(n,"display")!=="none"&&n!==In.ghost){t.push({target:n,rect:Ni(n)});var r=Lc({},t[t.length-1].rect);if(n.thisAnimationDuration){var o=Cg(n,!0);o&&(r.top-=o.f,r.left-=o.e)}n.fromRect=r}})},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(function(r,o){for(var i in r)if(r.hasOwnProperty(i)){for(var a in o)if(o.hasOwnProperty(a)&&o[a]===r[i][a])return Number(i)}return-1}(t,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(e),void(typeof n=="function"&&n());var o=!1,i=0;t.forEach(function(a){var l=0,s=a.target,u=s.fromRect,c=Ni(s),d=s.prevFromRect,f=s.prevToRect,p=a.rect,m=Cg(s,!0);m&&(c.top-=m.f,c.left-=m.e),s.toRect=c,s.thisAnimationDuration&&qI(d,c)&&!qI(u,c)&&(p.top-c.top)/(p.left-c.left)==(u.top-c.top)/(u.left-c.left)&&(l=function(v,g,b,y){return Math.sqrt(Math.pow(g.top-v.top,2)+Math.pow(g.left-v.left,2))/Math.sqrt(Math.pow(g.top-b.top,2)+Math.pow(g.left-b.left,2))*y.animation}(p,d,f,r.options)),qI(c,u)||(s.prevFromRect=u,s.prevToRect=c,l||(l=r.options.animation),r.animate(s,p,c,l)),l&&(o=!0,i=Math.max(i,l),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},l),s.thisAnimationDuration=l)}),clearTimeout(e),o?e=setTimeout(function(){typeof n=="function"&&n()},i):typeof n=="function"&&n(),t=[]},animate:function(n,r,o,i){if(i){Rn(n,"transition",""),Rn(n,"transform","");var a=Cg(this.el),l=a&&a.a,s=a&&a.d,u=(r.left-o.left)/(l||1),c=(r.top-o.top)/(s||1);n.animatingX=!!u,n.animatingY=!!c,Rn(n,"transform","translate3d("+u+"px,"+c+"px,0)"),this.forRepaintDummy=function(d){return d.offsetWidth}(n),Rn(n,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),Rn(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){Rn(n,"transition",""),Rn(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},i)}}}}var kg=[],KI={initializeByDefault:!0},x4={mount:function(e){for(var t in KI)KI.hasOwnProperty(t)&&!(t in e)&&(e[t]=KI[t]);kg.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),kg.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";kg.forEach(function(i){!t[i.pluginName]||(t[i.pluginName][o]&&t[i.pluginName][o](Lc({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](Lc({sortable:t},n)))})},initializePlugins:function(e,t,n,r){for(var o in kg.forEach(function(a){var l=a.pluginName;if(e.options[l]||a.initializeByDefault){var s=new a(e,t,e.options);s.sortable=e,s.options=e.options,e[l]=s,Gd(n,s.defaults)}}),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);typeof i<"u"&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return kg.forEach(function(r){typeof r.eventProperties=="function"&&Gd(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return kg.forEach(function(o){!e[o.pluginName]||o.optionListeners&&typeof o.optionListeners[t]=="function"&&(r=o.optionListeners[t].call(e[o.pluginName],n))}),r}},gUe=["evt"],Rl=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=pUe(n,gUe);x4.pluginEvent.bind(In)(e,t,Lc({dragEl:Wt,parentEl:Po,ghostEl:ir,rootEl:Co,nextEl:v1,lastDownEl:Mx,cloneEl:Zo,cloneHidden:vp,dragStarted:E4,putSortable:ba,activeSortable:In.active,originalEvent:r,oldIndex:Dg,oldDraggableIndex:_4,newIndex:ys,newDraggableIndex:mp,hideGhostForTarget:gfe,unhideGhostForTarget:yfe,cloneNowHidden:function(){vp=!0},cloneNowShown:function(){vp=!1},dispatchSortableEvent:function(i){il({sortable:t,name:i,originalEvent:r})}},o))};function il(e){(function(t){var n=t.sortable,r=t.rootEl,o=t.name,i=t.targetEl,a=t.cloneEl,l=t.toEl,s=t.fromEl,u=t.oldIndex,c=t.newIndex,d=t.oldDraggableIndex,f=t.newDraggableIndex,p=t.originalEvent,m=t.putSortable,v=t.extraEventProperties;if(n=n||r&&r[gs]){var g,b=n.options,y="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Kd||b4?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=l||r,g.from=s||r,g.item=i||r,g.clone=a,g.oldIndex=u,g.newIndex=c,g.oldDraggableIndex=d,g.newDraggableIndex=f,g.originalEvent=p,g.pullMode=m?m.lastPutMode:void 0;var w=Lc(Lc({},v),x4.getEventProperties(o,n));for(var x in w)g[x]=w[x];r&&r.dispatchEvent(g),b[y]&&b[y].call(n,g)}})(Lc({putSortable:ba,cloneEl:Zo,targetEl:Wt,rootEl:Co,oldIndex:Dg,oldDraggableIndex:_4,newIndex:ys,newDraggableIndex:mp},e))}var Wt,Po,ir,Co,v1,Mx,Zo,vp,Dg,ys,_4,mp,Nx,ba,m1,ju,YI,XI,dfe,ffe,E4,Og,C4,Fx,Ta,Tg=!1,Rx=!1,Ix=[],S4=!1,Bx=!1,QI=[],JI=!1,Lx=[],Px=typeof document<"u",jx=nfe,pfe=b4||Kd?"cssFloat":"float",yUe=Px&&!hUe&&!nfe&&"draggable"in document.createElement("div"),hfe=function(){if(Px){if(Kd)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),vfe=function(e,t){var n=Rn(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Sg(e,0,t),i=Sg(e,1,t),a=o&&Rn(o),l=i&&Rn(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ni(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ni(i).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var c=a.float==="left"?"left":"right";return!i||l.clear!=="both"&&l.clear!==c?"horizontal":"vertical"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||s>=r&&n[pfe]==="none"||i&&n[pfe]==="none"&&s+u>r)?"vertical":"horizontal"},mfe=function(e){function t(o,i){return function(a,l,s,u){var c=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(o==null&&(i||c))return!0;if(o==null||o===!1)return!1;if(i&&o==="clone")return o;if(typeof o=="function")return t(o(a,l,s,u),i)(a,l,s,u);var d=(i?a:l).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var n={},r=e.group;(!r||WI(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},gfe=function(){!hfe&&ir&&Rn(ir,"display","none")},yfe=function(){!hfe&&ir&&Rn(ir,"display","")};Px&&document.addEventListener("click",function(e){if(Rx)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Rx=!1,!1},!0);var g1=function(e){if(Wt){var t=function(o,i){var a;return Ix.some(function(l){var s=l[gs].options.emptyInsertThreshold;if(s&&!GI(l)){var u=Ni(l),c=o>=u.left-s&&o<=u.right+s,d=i>=u.top-s&&i<=u.bottom+s;if(c&&d)return a=l}}),a}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[gs]._onDragOver(n)}}},bUe=function(e){Wt&&Wt.parentNode[gs]._isOutsideThisEl(e.target)};function In(e,t){if(!e||!e.nodeType||e.nodeType!==1)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Gd({},t),e[gs]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return vfe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,a){i.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:In.supportPointer!==!1&&"PointerEvent"in window&&!A4,emptyInsertThreshold:5};for(var r in x4.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var o in mfe(t),this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&yUe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?$r(e,"pointerdown",this._onTapStart):($r(e,"mousedown",this._onTapStart),$r(e,"touchstart",this._onTapStart)),this.nativeDraggable&&($r(e,"dragover",this),$r(e,"dragenter",this)),Ix.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Gd(this,mUe())}function Vx(e,t,n,r,o,i,a,l){var s,u,c=e[gs],d=c.options.onMove;return!window.CustomEvent||Kd||b4?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=r,s.related=o||t,s.relatedRect=i||Ni(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(u=d.call(c,s,a)),u}function ZI(e){e.draggable=!1}function AUe(){JI=!1}function wUe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function zx(e){return setTimeout(e,0)}function eB(e){return clearTimeout(e)}In.prototype={constructor:In,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Og=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Wt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=r.filter;if(function(c){Lx.length=0;for(var d=c.getElementsByTagName("input"),f=d.length;f--;){var p=d[f];p.checked&&Lx.push(p)}}(n),!Wt&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||r.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!A4||!l||l.tagName.toUpperCase()!=="SELECT")&&!((l=Pc(l,r.draggable,n,!1))&&l.animated||Mx===l)){if(Dg=tu(l),_4=tu(l,r.draggable),typeof u=="function"){if(u.call(this,e,l,this))return il({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Rl("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some(function(c){if(c=Pc(s,c.trim(),n,!1))return il({sortable:t,rootEl:c,name:"filter",targetEl:l,fromEl:n,toEl:n}),Rl("filter",t,{evt:e}),!0}),u))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!Pc(s,r.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,l=i.ownerDocument;if(n&&!Wt&&n.parentNode===i){var s=Ni(n);if(Co=i,Po=(Wt=n).parentNode,v1=Wt.nextSibling,Mx=n,Nx=a.group,In.dragged=Wt,m1={target:Wt,clientX:(t||e).clientX,clientY:(t||e).clientY},dfe=m1.clientX-s.left,ffe=m1.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Wt.style["will-change"]="all",r=function(){Rl("delayEnded",o,{evt:e}),In.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!tfe&&o.nativeDraggable&&(Wt.draggable=!0),o._triggerDragStart(e,t),il({sortable:o,name:"choose",originalEvent:e}),ms(Wt,a.chosenClass,!0))},a.ignore.split(",").forEach(function(u){ife(Wt,u.trim(),ZI)}),$r(l,"dragover",g1),$r(l,"mousemove",g1),$r(l,"touchmove",g1),$r(l,"mouseup",o._onDrop),$r(l,"touchend",o._onDrop),$r(l,"touchcancel",o._onDrop),tfe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Wt.draggable=!0),Rl("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(b4||Kd))r();else{if(In.eventCanceled)return void this._onDrop();$r(l,"mouseup",o._disableDelayedDrag),$r(l,"touchend",o._disableDelayedDrag),$r(l,"touchcancel",o._disableDelayedDrag),$r(l,"mousemove",o._delayedDragTouchMoveHandler),$r(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&$r(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Wt&&ZI(Wt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ir(e,"mouseup",this._disableDelayedDrag),Ir(e,"touchend",this._disableDelayedDrag),Ir(e,"touchcancel",this._disableDelayedDrag),Ir(e,"mousemove",this._delayedDragTouchMoveHandler),Ir(e,"touchmove",this._delayedDragTouchMoveHandler),Ir(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?$r(document,"pointermove",this._onTouchMove):$r(document,t?"touchmove":"mousemove",this._onTouchMove):($r(Wt,"dragend",this),$r(Co,"dragstart",this._onDragStart));try{document.selection?zx(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Tg=!1,Co&&Wt){Rl("dragStarted",this,{evt:t}),this.nativeDraggable&&$r(document,"dragover",bUe);var n=this.options;!e&&ms(Wt,n.dragClass,!1),ms(Wt,n.ghostClass,!0),In.active=this,e&&this._appendGhost(),il({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ju){this._lastX=ju.clientX,this._lastY=ju.clientY,gfe();for(var e=document.elementFromPoint(ju.clientX,ju.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ju.clientX,ju.clientY))!==t;)t=e;if(Wt.parentNode[gs]._isOutsideThisEl(e),t)do{if(t[gs]&&t[gs]._onDragOver({clientX:ju.clientX,clientY:ju.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);yfe()}},_onTouchMove:function(e){if(m1){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=ir&&Cg(ir,!0),a=ir&&i&&i.a,l=ir&&i&&i.d,s=jx&&Ta&&lfe(Ta),u=(o.clientX-m1.clientX+r.x)/(a||1)+(s?s[0]-QI[0]:0)/(a||1),c=(o.clientY-m1.clientY+r.y)/(l||1)+(s?s[1]-QI[1]:0)/(l||1);if(!In.active&&!Tg){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ir){i?(i.e+=u-(YI||0),i.f+=c-(XI||0)):i={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");Rn(ir,"webkitTransform",d),Rn(ir,"mozTransform",d),Rn(ir,"msTransform",d),Rn(ir,"transform",d),YI=u,XI=c,ju=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ir){var e=this.options.fallbackOnBody?document.body:Co,t=Ni(Wt,!0,jx,!0,e),n=this.options;if(jx){for(Ta=e;Rn(Ta,"position")==="static"&&Rn(Ta,"transform")==="none"&&Ta!==document;)Ta=Ta.parentNode;Ta!==document.body&&Ta!==document.documentElement?(Ta===document&&(Ta=jc()),t.top+=Ta.scrollTop,t.left+=Ta.scrollLeft):Ta=jc(),QI=lfe(Ta)}ms(ir=Wt.cloneNode(!0),n.ghostClass,!1),ms(ir,n.fallbackClass,!0),ms(ir,n.dragClass,!0),Rn(ir,"transition",""),Rn(ir,"transform",""),Rn(ir,"box-sizing","border-box"),Rn(ir,"margin",0),Rn(ir,"top",t.top),Rn(ir,"left",t.left),Rn(ir,"width",t.width),Rn(ir,"height",t.height),Rn(ir,"opacity","0.8"),Rn(ir,"position",jx?"absolute":"fixed"),Rn(ir,"zIndex","100000"),Rn(ir,"pointerEvents","none"),In.ghost=ir,e.appendChild(ir),Rn(ir,"transform-origin",dfe/parseInt(ir.style.width)*100+"% "+ffe/parseInt(ir.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;Rl("dragStart",this,{evt:e}),In.eventCanceled?this._onDrop():(Rl("setupClone",this),In.eventCanceled||((Zo=cfe(Wt)).draggable=!1,Zo.style["will-change"]="",this._hideClone(),ms(Zo,this.options.chosenClass,!1),In.clone=Zo),n.cloneId=zx(function(){Rl("clone",n),!In.eventCanceled&&(n.options.removeCloneOnHide||Co.insertBefore(Zo,Wt),n._hideClone(),il({sortable:n,name:"clone"}))}),!t&&ms(Wt,o.dragClass,!0),t?(Rx=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ir(document,"mouseup",n._onDrop),Ir(document,"touchend",n._onDrop),Ir(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,Wt)),$r(document,"drop",n),Rn(Wt,"transform","translateZ(0)")),Tg=!0,n._dragStartId=zx(n._dragStarted.bind(n,t,e)),$r(document,"selectstart",n),E4=!0,A4&&Rn(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,i=this.el,a=e.target,l=this.options,s=l.group,u=In.active,c=Nx===s,d=l.sort,f=ba||u,p=this,m=!1;if(!JI){if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),a=Pc(a,l.draggable,i,!0),N("dragOver"),In.eventCanceled)return m;if(Wt.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return L(!1);if(Rx=!1,u&&!l.disabled&&(c?d||(r=Po!==Co):ba===this||(this.lastPutMode=Nx.checkPull(this,u,Wt,e))&&s.checkPut(this,u,Wt,e))){if(o=this._getDirection(e,a)==="vertical",t=Ni(Wt),N("dragOverValid"),In.eventCanceled)return m;if(r)return Po=Co,B(),this._hideClone(),N("revert"),In.eventCanceled||(v1?Co.insertBefore(Wt,v1):Co.appendChild(Wt)),L(!0);var v=GI(i,l.draggable);if(!v||function(P,H,U){var G=Ni(GI(U.el,U.options.draggable)),z=10;return H?P.clientX>G.right+z||P.clientX<=G.right&&P.clientY>G.bottom&&P.clientX>=G.left:P.clientX>G.right&&P.clientY>G.top||P.clientX<=G.right&&P.clientY>G.bottom+z}(e,o,this)&&!v.animated){if(v===Wt)return L(!1);if(v&&i===e.target&&(a=v),a&&(n=Ni(a)),Vx(Co,i,Wt,t,a,n,e,!!a)!==!1)return B(),i.appendChild(Wt),Po=i,V(),L(!0)}else if(v&&function(P,H,U){var G=Ni(Sg(U.el,0,U.options,!0)),z=10;return H?P.clientX<G.left-z||P.clientY<G.top&&P.clientX<G.right:P.clientY<G.top-z||P.clientY<G.bottom&&P.clientX<G.left}(e,o,this)){var g=Sg(i,0,l,!0);if(g===Wt)return L(!1);if(n=Ni(a=g),Vx(Co,i,Wt,t,a,n,e,!1)!==!1)return B(),i.insertBefore(Wt,g),Po=i,V(),L(!0)}else if(a.parentNode===i){n=Ni(a);var b,y,w,x=Wt.parentNode!==i,_=!function(P,H,U){var G=U?P.left:P.top,z=U?P.right:P.bottom,$=U?P.width:P.height,W=U?H.left:H.top,K=U?H.right:H.bottom,X=U?H.width:H.height;return G===W||z===K||G+$/2===W+X/2}(Wt.animated&&Wt.toRect||t,a.animated&&a.toRect||n,o),E=o?"top":"left",C=afe(a,"top","top")||afe(Wt,"top","top"),T=C?C.scrollTop:void 0;if(Og!==a&&(y=n[E],S4=!1,Bx=!_&&l.invertSwap||x),b=function(P,H,U,G,z,$,W,K){var X=G?P.clientY:P.clientX,te=G?U.height:U.width,ne=G?U.top:U.left,se=G?U.bottom:U.right,le=!1;if(!W){if(K&&Fx<te*z){if(!S4&&(C4===1?X>ne+te*$/2:X<se-te*$/2)&&(S4=!0),S4)le=!0;else if(C4===1?X<ne+Fx:X>se-Fx)return-C4}else if(X>ne+te*(1-z)/2&&X<se-te*(1-z)/2)return function(J){return tu(Wt)<tu(J)?1:-1}(H)}return le=le||W,le&&(X<ne+te*$/2||X>se-te*$/2)?X>ne+te/2?1:-1:0}(e,a,n,o,_?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Bx,Og===a),b!==0){var k=tu(Wt);do k-=b,w=Po.children[k];while(w&&(Rn(w,"display")==="none"||w===ir))}if(b===0||w===a)return L(!1);Og=a,C4=b;var I=a.nextElementSibling,O=!1,F=Vx(Co,i,Wt,t,a,n,e,O=b===1);if(F!==!1)return(F===1||F===-1)&&(O=F===1),JI=!0,setTimeout(AUe,30),B(),O&&!I?i.appendChild(Wt):a.parentNode.insertBefore(Wt,O?I:a),C&&ufe(C,0,T-C.scrollTop),Po=Wt.parentNode,y!==void 0&&!Bx&&(Fx=Math.abs(y-Ni(a)[E])),V(),L(!0)}if(i.contains(Wt))return L(!1)}return!1}function N(P,H){Rl(P,p,Lc({evt:e,isOwner:c,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:d,fromSortable:f,target:a,completed:L,onMove:function(U,G){return Vx(Co,i,Wt,t,U,Ni(U),e,G)},changed:V},H))}function B(){N("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function L(P){return N("dragOverCompleted",{insertion:P}),P&&(c?u._hideClone():u._showClone(p),p!==f&&(ms(Wt,ba?ba.options.ghostClass:u.options.ghostClass,!1),ms(Wt,l.ghostClass,!0)),ba!==p&&p!==In.active?ba=p:p===In.active&&ba&&(ba=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll(function(){N("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Wt&&!Wt.animated||a===i&&!a.animated)&&(Og=null),!l.dragoverBubble&&!e.rootEl&&a!==document&&(Wt.parentNode[gs]._isOutsideThisEl(e.target),!P&&g1(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function V(){ys=tu(Wt),mp=tu(Wt,l.draggable),il({sortable:p,name:"change",toEl:i,newIndex:ys,newDraggableIndex:mp,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ir(document,"mousemove",this._onTouchMove),Ir(document,"touchmove",this._onTouchMove),Ir(document,"pointermove",this._onTouchMove),Ir(document,"dragover",g1),Ir(document,"mousemove",g1),Ir(document,"touchmove",g1)},_offUpEvents:function(){var e=this.el.ownerDocument;Ir(e,"mouseup",this._onDrop),Ir(e,"touchend",this._onDrop),Ir(e,"pointerup",this._onDrop),Ir(e,"touchcancel",this._onDrop),Ir(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ys=tu(Wt),mp=tu(Wt,n.draggable),Rl("drop",this,{evt:e}),Po=Wt&&Wt.parentNode,ys=tu(Wt),mp=tu(Wt,n.draggable),In.eventCanceled||(Tg=!1,Bx=!1,S4=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),eB(this.cloneId),eB(this._dragStartId),this.nativeDraggable&&(Ir(document,"drop",this),Ir(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),A4&&Rn(document.body,"user-select",""),Rn(Wt,"transform",""),e&&(E4&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ir&&ir.parentNode&&ir.parentNode.removeChild(ir),(Co===Po||ba&&ba.lastPutMode!=="clone")&&Zo&&Zo.parentNode&&Zo.parentNode.removeChild(Zo),Wt&&(this.nativeDraggable&&Ir(Wt,"dragend",this),ZI(Wt),Wt.style["will-change"]="",E4&&!Tg&&ms(Wt,ba?ba.options.ghostClass:this.options.ghostClass,!1),ms(Wt,this.options.chosenClass,!1),il({sortable:this,name:"unchoose",toEl:Po,newIndex:null,newDraggableIndex:null,originalEvent:e}),Co!==Po?(ys>=0&&(il({rootEl:Po,name:"add",toEl:Po,fromEl:Co,originalEvent:e}),il({sortable:this,name:"remove",toEl:Po,originalEvent:e}),il({rootEl:Po,name:"sort",toEl:Po,fromEl:Co,originalEvent:e}),il({sortable:this,name:"sort",toEl:Po,originalEvent:e})),ba&&ba.save()):ys!==Dg&&ys>=0&&(il({sortable:this,name:"update",toEl:Po,originalEvent:e}),il({sortable:this,name:"sort",toEl:Po,originalEvent:e})),In.active&&((ys==null||ys===-1)&&(ys=Dg,mp=_4),il({sortable:this,name:"end",toEl:Po,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Rl("nulling",this),Co=Wt=Po=ir=v1=Zo=Mx=vp=m1=ju=E4=ys=mp=Dg=_4=Og=C4=ba=Nx=In.dragged=In.ghost=In.clone=In.active=null,Lx.forEach(function(e){e.checked=!0}),Lx.length=YI=XI=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Wt&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)Pc(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||wUe(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(o,i){var a=r.children[i];Pc(a,this.options.draggable,r,!1)&&(n[o]=a)},this),t&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Pc(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=x4.modifyOption(this,e,t);n[e]=typeof r<"u"?r:t,e==="group"&&mfe(n)},destroy:function(){Rl("destroy",this);var e=this.el;e[gs]=null,Ir(e,"mousedown",this._onTapStart),Ir(e,"touchstart",this._onTapStart),Ir(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ir(e,"dragover",this),Ir(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ix.splice(Ix.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!vp){if(Rl("hideClone",this),In.eventCanceled)return;Rn(Zo,"display","none"),this.options.removeCloneOnHide&&Zo.parentNode&&Zo.parentNode.removeChild(Zo),vp=!0}},_showClone:function(e){if(e.lastPutMode==="clone"){if(vp){if(Rl("showClone",this),In.eventCanceled)return;Wt.parentNode!=Co||this.options.group.revertClone?v1?Co.insertBefore(Zo,v1):Co.appendChild(Zo):Co.insertBefore(Zo,Wt),this.options.group.revertClone&&this.animate(Wt,Zo),Rn(Zo,"display",""),vp=!1}}else this._hideClone()}},Px&&$r(document,"touchmove",function(e){(In.active||Tg)&&e.cancelable&&e.preventDefault()}),In.utils={on:$r,off:Ir,css:Rn,find:ife,is:function(e,t){return!!Pc(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:sfe,closest:Pc,toggleClass:ms,clone:cfe,index:tu,nextTick:zx,cancelNextTick:eB,detectDirection:vfe,getChild:Sg},In.get=function(e){return e[gs]},In.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(In.utils=Lc(Lc({},In.utils),r.utils)),x4.mount(r)})},In.create=function(e,t){return new In(e,t)},In.version="1.14.0";var k4,tB,nB,rB,Hx,D4,mi=[],oB=!1;function $x(){mi.forEach(function(e){clearInterval(e.pid)}),mi=[]}function bfe(){clearInterval(D4)}var iB=sfe(function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,u=jc(),c=!1;tB!==n&&(tB=n,$x(),k4=t.scroll,o=t.scrollFn,k4===!0&&(k4=hp(n,!0)));var d=0,f=k4;do{var p=f,m=Ni(p),v=m.top,g=m.bottom,b=m.left,y=m.right,w=m.width,x=m.height,_=void 0,E=void 0,C=p.scrollWidth,T=p.scrollHeight,k=Rn(p),I=p.scrollLeft,O=p.scrollTop;p===u?(_=w<C&&(k.overflowX==="auto"||k.overflowX==="scroll"||k.overflowX==="visible"),E=x<T&&(k.overflowY==="auto"||k.overflowY==="scroll"||k.overflowY==="visible")):(_=w<C&&(k.overflowX==="auto"||k.overflowX==="scroll"),E=x<T&&(k.overflowY==="auto"||k.overflowY==="scroll"));var F=_&&(Math.abs(y-i)<=l&&I+w<C)-(Math.abs(b-i)<=l&&!!I),N=E&&(Math.abs(g-a)<=l&&O+x<T)-(Math.abs(v-a)<=l&&!!O);if(!mi[d])for(var B=0;B<=d;B++)mi[B]||(mi[B]={});(mi[d].vx!=F||mi[d].vy!=N||mi[d].el!==p)&&(mi[d].el=p,mi[d].vx=F,mi[d].vy=N,clearInterval(mi[d].pid),(F!=0||N!=0)&&(c=!0,mi[d].pid=setInterval((function(){r&&this.layer===0&&In.active._onTouchMove(Hx);var L=mi[this.layer].vy?mi[this.layer].vy*s:0,V=mi[this.layer].vx?mi[this.layer].vx*s:0;typeof o=="function"&&o.call(In.dragged.parentNode[gs],V,L,e,Hx,mi[this.layer].el)!=="continue"||ufe(mi[this.layer].el,V,L)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==u&&(f=hp(f,!1)));oB=c}},30),Afe=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||o;a();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);l(),s&&!s.el.contains(c)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function aB(){}function lB(){}function sB(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function wfe(e,t,n){const r=n===0?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,r)}aB.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=Sg(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Afe},Gd(aB,{pluginName:"revertOnSpill"}),lB.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Afe},Gd(lB,{pluginName:"removeOnSpill"}),In.mount(new function(){function e(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?$r(document,"dragover",this._handleAutoScroll):this.options.supportPointer?$r(document,"pointermove",this._handleFallbackAutoScroll):n.touches?$r(document,"touchmove",this._handleFallbackAutoScroll):$r(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ir(document,"dragover",this._handleAutoScroll):(Ir(document,"pointermove",this._handleFallbackAutoScroll),Ir(document,"touchmove",this._handleFallbackAutoScroll),Ir(document,"mousemove",this._handleFallbackAutoScroll)),bfe(),$x(),clearTimeout(w4),w4=void 0},nulling:function(){Hx=tB=k4=oB=D4=nB=rB=null,mi.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var r=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,a=document.elementFromPoint(o,i);if(Hx=t,n||this.options.forceAutoScrollFallback||b4||Kd||A4){iB(t,this.options,a,n);var l=hp(a,!0);oB&&(!D4||o!==nB||i!==rB)&&(D4&&bfe(),D4=setInterval(function(){var s=hp(document.elementFromPoint(o,i),!0);s!==l&&(l=s,$x()),iB(t,r.options,s,n)},10),nB=o,rB=i)}else{if(!this.options.bubbleScroll||hp(a,!0)===jc())return void $x();iB(t,this.options,hp(a,!1),!1)}}},Gd(e,{pluginName:"scroll",initializeByDefault:!0})}),In.mount(lB,aB);const xUe=typeof window<"u"?window.console:global.console,_Ue=/-(\w)/g,EUe=function(e){const t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}(e=>e.replace(_Ue,(t,n)=>n.toUpperCase())),xfe=["Start","Add","Remove","Update","End"],_fe=["Choose","Unchoose","Sort","Filter","Clone"],Efe=["Move"],CUe=[Efe,xfe,_fe].flatMap(e=>e).map(e=>`on${e}`),uB={manage:Efe,manageAndEmit:xfe,emit:_fe},SUe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function Cfe(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function Sfe(e){return e.reduce((t,[n,r])=>(t[n]=r,t),{})}function kfe(e){return Object.entries(e).filter(([t,n])=>!Cfe(t)).map(([t,n])=>[EUe(t),n]).filter(([t,n])=>!function(r){return CUe.indexOf(r)!==-1}(t))}const Dfe=({el:e})=>e,Ofe=e=>e.__draggable_context;let kUe=class{constructor({nodes:{header:e,default:t,footer:n},root:r,realList:o}){this.defaultNodes=t,this.children=[...e,...t,...n],this.externalComponent=r.externalComponent,this.rootTransition=r.transition,this.tag=r.tag,this.realList=o}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(e,t){const{tag:n,children:r,_isRootComponent:o}=this;return e(n,t,o?{default:()=>r}:r)}updated(){const{defaultNodes:e,realList:t}=this;e.forEach((n,r)=>{((o,i)=>{o.__draggable_context=i})(Dfe(n),{element:t[r],index:r})})}getUnderlyingVm(e){return Ofe(e)}getVmIndexFromDomIndex(e,t){const{defaultNodes:n}=this,{length:r}=n,o=t.children,i=o.item(e);if(i===null)return r;const a=Ofe(i);if(a)return a.index;if(r===0)return 0;const l=Dfe(n[0]),s=[...o].findIndex(u=>u===l);return e<s?0:r}};function DUe(e){const t=function(r){return["transition-group","TransitionGroup"].includes(r)}(e),n=!function(r){return SUe.includes(r)}(e)&&!t;return{transition:t,externalComponent:n,tag:n?Qe(e):t?S3:e}}function OUe({$slots:e,tag:t,realList:n,getKey:r}){const o=function({$slots:a,realList:l,getKey:s}){const u=l||[],[c,d]=["header","footer"].map(m=>function(v,g){const b=v[g];return b?b():[]}(a,m)),{item:f}=a;if(!f)throw new Error("draggable element must have an item slot");const p=u.flatMap((m,v)=>f({element:m,index:v}).map(g=>(g.key=s(m),g.props={...g.props||{},"data-draggable":!0},g)));if(p.length!==u.length)throw new Error("Item slot must have only one child");return{header:c,footer:d,default:p}}({$slots:e,realList:n,getKey:r}),i=DUe(t);return new kUe({nodes:o,root:i,realList:n})}function Tfe(e,t){St(()=>this.$emit(e.toLowerCase(),t))}function Mfe(e){return(t,n)=>{if(this.realList!==null)return this[`onDrag${e}`](t,n)}}function TUe(e){const t=Mfe.call(this,e);return(n,r)=>{t.call(this,n,r),Tfe.call(this,e,n)}}let cB=null;const MUe={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},NUe=["update:modelValue","change",...[...uB.manageAndEmit,...uB.emit].map(e=>e.toLowerCase())],dB=Te({name:"draggable",inheritAttrs:!1,props:MUe,emits:NUe,data:()=>({error:!1}),render(){try{this.error=!1;const{$slots:e,$attrs:t,tag:n,componentData:r,realList:o,getKey:i}=this,a=OUe({$slots:e,tag:n,realList:o,getKey:i});this.componentStructure=a;const l=function({$attrs:s,componentData:u={}}){return{...Sfe(Object.entries(s).filter(([c,d])=>Cfe(c))),...u}}({$attrs:t,componentData:r});return a.render(pn,l)}catch(e){return this.error=!0,pn("pre",{style:{color:"red"}},e.stack)}},created(){this.list!==null&&this.modelValue!==null&&xUe.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:e,$el:t,componentStructure:n}=this;n.updated();const r=function({$attrs:i,callBackBuilder:a}){const l=Sfe(kfe(i));Object.entries(a).forEach(([u,c])=>{uB[u].forEach(d=>{l[`on${d}`]=c(d)})});const s=`[data-draggable]${l.draggable||""}`;return{...l,draggable:s}}({$attrs:e,callBackBuilder:{manageAndEmit:i=>TUe.call(this,i),emit:i=>Tfe.bind(this,i),manage:i=>Mfe.call(this,i)}}),o=t.nodeType===1?t:t.parentElement;this._sortable=new In(o,r),this.targetDomElement=o,o.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:e}=this;return e||this.modelValue},getKey(){const{itemKey:e}=this;return typeof e=="function"?e:t=>t[e]}},watch:{$attrs:{handler(e){const{_sortable:t}=this;!t||kfe(e).forEach(([n,r])=>{t.option(n,r)})},deep:!0}},methods:{getUnderlyingVm(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent:e=>e.__draggable_component__,emitChanges(e){St(()=>this.$emit("change",e))},alterList(e){if(this.list)return void e(this.list);const t=[...this.modelValue];e(t),this.$emit("update:modelValue",t)},spliceList(){this.alterList(e=>e.splice(...arguments))},updatePosition(e,t){this.alterList(n=>n.splice(t,0,n.splice(e,1)[0]))},getRelatedContextFromMoveEvent({to:e,related:t}){const n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};const r=n.realList,o={list:r,component:n};return e!==t&&r?{...n.getUnderlyingVm(t)||{},...o}:o},getVmIndexFromDomIndex(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),cB=e.item},onDragAdd(e){const t=e.item._underlying_vm_;if(t===void 0)return;sB(e.item);const n=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(n,0,t);const r={element:t,newIndex:n};this.emitChanges({added:r})},onDragRemove(e){if(wfe(this.$el,e.item,e.oldIndex),e.pullMode==="clone")return void sB(e.clone);const{index:t,element:n}=this.context;this.spliceList(t,1);const r={element:n,oldIndex:t};this.emitChanges({removed:r})},onDragUpdate(e){sB(e.item),wfe(e.from,e.item,e.oldIndex);const t=this.context.index,n=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(t,n);const r={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:r})},computeFutureIndex(e,t){if(!e.element)return 0;const n=[...t.to.children].filter(i=>i.style.display!=="none"),r=n.indexOf(t.related),o=e.component.getVmIndexFromDomIndex(r);return n.indexOf(cB)===-1&&t.willInsertAfter?o+1:o},onDragMove(e,t){const{move:n,realList:r}=this;if(!n||!r)return!0;const o=this.getRelatedContextFromMoveEvent(e),i=this.computeFutureIndex(o,e),a={...this.context,futureIndex:i};return n({...e,relatedContext:o,draggedContext:a},t)},onDragEnd(){cB=null}}}),Ux=_d,Br=_d.factory();let Nfe=null,Ffe=de(null);function fB(...e){return Nfe(...e)}const Rfe=e=>{Ffe.value=e||Vde;const t=fI(Ffe);return Nfe=t.t,t};Rfe(),typeof globalThis<"u"||typeof window<"u"||(typeof global<"u"?global:typeof self<"u");var Ife,Bfe={exports:{}};function Wx(){return Ife||(Ife=1,Bfe.exports=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=r||o||i,l=a&&(r?document.documentMode||6:+(i||o)[1]),s=!i&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!i&&/Chrome\/(\d+)/.exec(e),d=c&&+c[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),v=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),b=/Android/.test(e),y=g||b||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),w=g||/Mac/.test(t),x=/\bCrOS\b/.test(e),_=/win/i.test(t),E=f&&e.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(f=!1,s=!0);var C=w&&(u||f&&(E==null||E<12.11)),T=n||a&&l>=9;function k(h){return new RegExp("(^|\\s)"+h+"(?:$|\\s)\\s*")}var I,O=function(h,A){var D=h.className,S=k(A).exec(D);if(S){var R=D.slice(S.index+S[0].length);h.className=D.slice(0,S.index)+(R?S[1]+R:"")}};function F(h){for(var A=h.childNodes.length;A>0;--A)h.removeChild(h.firstChild);return h}function N(h,A){return F(h).appendChild(A)}function B(h,A,D,S){var R=document.createElement(h);if(D&&(R.className=D),S&&(R.style.cssText=S),typeof A=="string")R.appendChild(document.createTextNode(A));else if(A)for(var j=0;j<A.length;++j)R.appendChild(A[j]);return R}function L(h,A,D,S){var R=B(h,A,D,S);return R.setAttribute("role","presentation"),R}function V(h,A){if(A.nodeType==3&&(A=A.parentNode),h.contains)return h.contains(A);do if(A.nodeType==11&&(A=A.host),A==h)return!0;while(A=A.parentNode)}function P(h){var A;try{A=h.activeElement}catch{A=h.body||null}for(;A&&A.shadowRoot&&A.shadowRoot.activeElement;)A=A.shadowRoot.activeElement;return A}function H(h,A){var D=h.className;k(A).test(D)||(h.className+=(D?" ":"")+A)}function U(h,A){for(var D=h.split(" "),S=0;S<D.length;S++)D[S]&&!k(D[S]).test(A)&&(A+=" "+D[S]);return A}I=document.createRange?function(h,A,D,S){var R=document.createRange();return R.setEnd(S||h,D),R.setStart(h,A),R}:function(h,A,D){var S=document.body.createTextRange();try{S.moveToElementText(h.parentNode)}catch{return S}return S.collapse(!0),S.moveEnd("character",D),S.moveStart("character",A),S};var G=function(h){h.select()};function z(h){return h.display.wrapper.ownerDocument}function $(h){return z(h).defaultView}function W(h){var A=Array.prototype.slice.call(arguments,1);return function(){return h.apply(null,A)}}function K(h,A,D){for(var S in A||(A={}),h)h.hasOwnProperty(S)&&(D!==!1||!A.hasOwnProperty(S))&&(A[S]=h[S]);return A}function X(h,A,D,S,R){A==null&&(A=h.search(/[^\s\u00a0]/))==-1&&(A=h.length);for(var j=S||0,q=R||0;;){var Q=h.indexOf(" ",j);if(Q<0||Q>=A)return q+(A-j);q+=Q-j,q+=D-q%D,j=Q+1}}g?G=function(h){h.selectionStart=0,h.selectionEnd=h.value.length}:a&&(G=function(h){try{h.select()}catch{}});var te=function(){this.id=null,this.f=null,this.time=0,this.handler=W(this.onTimeout,this)};function ne(h,A){for(var D=0;D<h.length;++D)if(h[D]==A)return D;return-1}te.prototype.onTimeout=function(h){h.id=0,h.time<=+new Date?h.f():setTimeout(h.handler,h.time-+new Date)},te.prototype.set=function(h,A){this.f=A;var D=+new Date+h;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,h),this.time=D)};var se=50,le={toString:function(){return"CodeMirror.Pass"}},J={scroll:!1},Z={origin:"*mouse"},ye={origin:"+move"};function be(h,A,D){for(var S=0,R=0;;){var j=h.indexOf(" ",S);j==-1&&(j=h.length);var q=j-S;if(j==h.length||R+q>=A)return S+Math.min(q,A-R);if(R+=j-S,S=j+1,(R+=D-R%D)>=A)return S}}var ve=[""];function Ae(h){for(;ve.length<=h;)ve.push(Ce(ve)+" ");return ve[h]}function Ce(h){return h[h.length-1]}function _e(h,A){for(var D=[],S=0;S<h.length;S++)D[S]=A(h[S],S);return D}function ke(h,A,D){for(var S=0,R=D(A);S<h.length&&D(h[S])<=R;)S++;h.splice(S,0,A)}function Be(){}function $e(h,A){var D;return Object.create?D=Object.create(h):(Be.prototype=h,D=new Be),A&&K(A,D),D}var rt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ge(h){return/\w/.test(h)||h>"\x80"&&(h.toUpperCase()!=h.toLowerCase()||rt.test(h))}function We(h,A){return A?!!(A.source.indexOf("\\w")>-1&&ge(h))||A.test(h):ge(h)}function st(h){for(var A in h)if(h.hasOwnProperty(A)&&h[A])return!1;return!0}var At=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ve(h){return h.charCodeAt(0)>=768&&At.test(h)}function it(h,A,D){for(;(D<0?A>0:A<h.length)&&Ve(h.charAt(A));)A+=D;return A}function dt(h,A,D){for(var S=A>D?-1:1;;){if(A==D)return A;var R=(A+D)/2,j=S<0?Math.ceil(R):Math.floor(R);if(j==A)return h(j)?A:D;h(j)?D=j:A=j+S}}function ot(h,A,D,S){if(!h)return S(A,D,"ltr",0);for(var R=!1,j=0;j<h.length;++j){var q=h[j];(q.from<D&&q.to>A||A==D&&q.to==A)&&(S(Math.max(q.from,A),Math.min(q.to,D),q.level==1?"rtl":"ltr",j),R=!0)}R||S(A,D,"ltr")}var je=null;function we(h,A,D){var S;je=null;for(var R=0;R<h.length;++R){var j=h[R];if(j.from<A&&j.to>A)return R;j.to==A&&(j.from!=j.to&&D=="before"?S=R:je=R),j.from==A&&(j.from!=j.to&&D!="before"?S=R:je=R)}return S??je}var ze=function(){var h="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",A="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(ae){return ae<=247?h.charAt(ae):1424<=ae&&ae<=1524?"R":1536<=ae&&ae<=1785?A.charAt(ae-1536):1774<=ae&&ae<=2220?"r":8192<=ae&&ae<=8203?"w":ae==8204?"b":"L"}var S=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,R=/[stwN]/,j=/[LRr]/,q=/[Lb1n]/,Q=/[1n]/;function re(ae,Se,De){this.level=ae,this.from=Se,this.to=De}return function(ae,Se){var De=Se=="ltr"?"L":"R";if(ae.length==0||Se=="ltr"&&!S.test(ae))return!1;for(var Ue=ae.length,Ge=[],at=0;at<Ue;++at)Ge.push(D(ae.charCodeAt(at)));for(var yt=0,Ot=De;yt<Ue;++yt){var Yt=Ge[yt];Yt=="m"?Ge[yt]=Ot:Ot=Yt}for(var Jt=0,It=De;Jt<Ue;++Jt){var tn=Ge[Jt];tn=="1"&&It=="r"?Ge[Jt]="n":j.test(tn)&&(It=tn,tn=="r"&&(Ge[Jt]="R"))}for(var en=1,fn=Ge[0];en<Ue-1;++en){var ro=Ge[en];ro=="+"&&fn=="1"&&Ge[en+1]=="1"?Ge[en]="1":ro==","&&fn==Ge[en+1]&&(fn=="1"||fn=="n")&&(Ge[en]=fn),fn=ro}for(var Zr=0;Zr<Ue;++Zr){var Ql=Ge[Zr];if(Ql==",")Ge[Zr]="N";else if(Ql=="%"){var ho=void 0;for(ho=Zr+1;ho<Ue&&Ge[ho]=="%";++ho);for(var Cu=Zr&&Ge[Zr-1]=="!"||ho<Ue&&Ge[ho]=="1"?"1":"N",Jl=Zr;Jl<ho;++Jl)Ge[Jl]=Cu;Zr=ho-1}}for(var Bo=0,ml=De;Bo<Ue;++Bo){var Ua=Ge[Bo];ml=="L"&&Ua=="1"?Ge[Bo]="L":j.test(Ua)&&(ml=Ua)}for(var si=0;si<Ue;++si)if(R.test(Ge[si])){var Ko=void 0;for(Ko=si+1;Ko<Ue&&R.test(Ge[Ko]);++Ko);for(var ui=(si?Ge[si-1]:De)=="L",gl=ui==((Ko<Ue?Ge[Ko]:De)=="L")?ui?"L":"R":De,d0=si;d0<Ko;++d0)Ge[d0]=gl;si=Ko-1}for(var pc,Ca=[],ci=0;ci<Ue;)if(q.test(Ge[ci])){var iQ=ci;for(++ci;ci<Ue&&q.test(Ge[ci]);++ci);Ca.push(new re(0,iQ,ci))}else{var Tf=ci,hm=Ca.length,vm=Se=="rtl"?1:0;for(++ci;ci<Ue&&Ge[ci]!="L";++ci);for(var Wa=Tf;Wa<ci;)if(Q.test(Ge[Wa])){Tf<Wa&&(Ca.splice(hm,0,new re(1,Tf,Wa)),hm+=vm);var A3=Wa;for(++Wa;Wa<ci&&Q.test(Ge[Wa]);++Wa);Ca.splice(hm,0,new re(2,A3,Wa)),hm+=vm,Tf=Wa}else++Wa;Tf<ci&&Ca.splice(hm,0,new re(1,Tf,ci))}return Se=="ltr"&&(Ca[0].level==1&&(pc=ae.match(/^\s+/))&&(Ca[0].from=pc[0].length,Ca.unshift(new re(0,0,pc[0].length))),Ce(Ca).level==1&&(pc=ae.match(/\s+$/))&&(Ce(Ca).to-=pc[0].length,Ca.push(new re(0,Ue-pc[0].length,Ue)))),Se=="rtl"?Ca.reverse():Ca}}();function me(h,A){var D=h.order;return D==null&&(D=h.order=ze(h.text,A)),D}var Me=[],Ie=function(h,A,D){if(h.addEventListener)h.addEventListener(A,D,!1);else if(h.attachEvent)h.attachEvent("on"+A,D);else{var S=h._handlers||(h._handlers={});S[A]=(S[A]||Me).concat(D)}};function ht(h,A){return h._handlers&&h._handlers[A]||Me}function gt(h,A,D){if(h.removeEventListener)h.removeEventListener(A,D,!1);else if(h.detachEvent)h.detachEvent("on"+A,D);else{var S=h._handlers,R=S&&S[A];if(R){var j=ne(R,D);j>-1&&(S[A]=R.slice(0,j).concat(R.slice(j+1)))}}}function vt(h,A){var D=ht(h,A);if(D.length)for(var S=Array.prototype.slice.call(arguments,2),R=0;R<D.length;++R)D[R].apply(null,S)}function qt(h,A,D){return typeof A=="string"&&(A={type:A,preventDefault:function(){this.defaultPrevented=!0}}),vt(h,D||A.type,h,A),kt(A)||A.codemirrorIgnore}function mn(h){var A=h._handlers&&h._handlers.cursorActivity;if(A)for(var D=h.curOp.cursorActivityHandlers||(h.curOp.cursorActivityHandlers=[]),S=0;S<A.length;++S)ne(D,A[S])==-1&&D.push(A[S])}function Zt(h,A){return ht(h,A).length>0}function rn(h){h.prototype.on=function(A,D){Ie(this,A,D)},h.prototype.off=function(A,D){gt(this,A,D)}}function zn(h){h.preventDefault?h.preventDefault():h.returnValue=!1}function tt(h){h.stopPropagation?h.stopPropagation():h.cancelBubble=!0}function kt(h){return h.defaultPrevented!=null?h.defaultPrevented:h.returnValue==0}function An(h){zn(h),tt(h)}function _n(h){return h.target||h.srcElement}function po(h){var A=h.which;return A==null&&(1&h.button?A=1:2&h.button?A=3:4&h.button&&(A=2)),w&&h.ctrlKey&&A==1&&(A=3),A}var Qr,Ar,Jr=function(){if(a&&l<9)return!1;var h=B("div");return"draggable"in h||"dragDrop"in h}();function Ao(h){if(Qr==null){var A=B("span","\u200B");N(h,B("span",[A,document.createTextNode("x")])),h.firstChild.offsetHeight!=0&&(Qr=A.offsetWidth<=1&&A.offsetHeight>2&&!(a&&l<8))}var D=Qr?B("span","\u200B"):B("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}function pl(h){if(Ar!=null)return Ar;var A=N(h,document.createTextNode("A\u062EA")),D=I(A,0,1).getBoundingClientRect(),S=I(A,1,2).getBoundingClientRect();return F(h),!(!D||D.left==D.right)&&(Ar=S.right-D.right<3)}var Go=` |
|
55 |
|
|
56 |
b`.split(/\n/).length!=3?function(h){for(var A=0,D=[],S=h.length;A<=S;){var R=h.indexOf(` |
|
57 |
`,A);R==-1&&(R=h.length);var j=h.slice(A,h.charAt(R-1)=="\r"?R-1:R),q=j.indexOf("\r");q!=-1?(D.push(j.slice(0,q)),A+=q+1):(D.push(j),A=R+1)}return D}:function(h){return h.split(/\r\n?|\n/)},za=window.getSelection?function(h){try{return h.selectionStart!=h.selectionEnd}catch{return!1}}:function(h){var A;try{A=h.ownerDocument.selection.createRange()}catch{}return!(!A||A.parentElement()!=h)&&A.compareEndPoints("StartToEnd",A)!=0},sa=function(){var h=B("div");return"oncopy"in h||(h.setAttribute("oncopy","return;"),typeof h.oncopy=="function")}(),He=null;function lt(h){if(He!=null)return He;var A=N(h,B("span","x")),D=A.getBoundingClientRect(),S=I(A,0,1).getBoundingClientRect();return He=Math.abs(D.left-S.left)>1}var Et={},Kt={};function gr(h,A){arguments.length>2&&(A.dependencies=Array.prototype.slice.call(arguments,2)),Et[h]=A}function Bn(h,A){Kt[h]=A}function Ne(h){if(typeof h=="string"&&Kt.hasOwnProperty(h))h=Kt[h];else if(h&&typeof h.name=="string"&&Kt.hasOwnProperty(h.name)){var A=Kt[h.name];typeof A=="string"&&(A={name:A}),(h=$e(A,h)).name=A.name}else{if(typeof h=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(h))return Ne("application/xml");if(typeof h=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(h))return Ne("application/json")}return typeof h=="string"?{name:h}:h||{name:"null"}}function Tt(h,A){A=Ne(A);var D=Et[A.name];if(!D)return Tt(h,"text/plain");var S=D(h,A);if(Oe.hasOwnProperty(A.name)){var R=Oe[A.name];for(var j in R)!R.hasOwnProperty(j)||(S.hasOwnProperty(j)&&(S["_"+j]=S[j]),S[j]=R[j])}if(S.name=A.name,A.helperType&&(S.helperType=A.helperType),A.modeProps)for(var q in A.modeProps)S[q]=A.modeProps[q];return S}var Oe={};function nt(h,A){K(A,Oe.hasOwnProperty(h)?Oe[h]:Oe[h]={})}function ut(h,A){if(A===!0)return A;if(h.copyState)return h.copyState(A);var D={};for(var S in A){var R=A[S];R instanceof Array&&(R=R.concat([])),D[S]=R}return D}function xt(h,A){for(var D;h.innerMode&&(D=h.innerMode(A))&&D.mode!=h;)A=D.state,h=D.mode;return D||{mode:h,state:A}}function En(h,A,D){return!h.startState||h.startState(A,D)}var ln=function(h,A,D){this.pos=this.start=0,this.string=h,this.tabSize=A||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};function Ct(h,A){if((A-=h.first)<0||A>=h.size)throw new Error("There is no line "+(A+h.first)+" in the document.");for(var D=h;!D.lines;)for(var S=0;;++S){var R=D.children[S],j=R.chunkSize();if(A<j){D=R;break}A-=j}return D.lines[A]}function Fn(h,A,D){var S=[],R=A.line;return h.iter(A.line,D.line+1,function(j){var q=j.text;R==D.line&&(q=q.slice(0,D.ch)),R==A.line&&(q=q.slice(A.ch)),S.push(q),++R}),S}function Mo(h,A,D){var S=[];return h.iter(A,D,function(R){S.push(R.text)}),S}function jr(h,A){var D=A-h.height;if(D)for(var S=h;S;S=S.parent)S.height+=D}function cr(h){if(h.parent==null)return null;for(var A=h.parent,D=ne(A.lines,h),S=A.parent;S;A=S,S=S.parent)for(var R=0;S.children[R]!=A;++R)D+=S.children[R].chunkSize();return D+A.first}function Ha(h,A){var D=h.first;e:do{for(var S=0;S<h.children.length;++S){var R=h.children[S],j=R.height;if(A<j){h=R;continue e}A-=j,D+=R.chunkSize()}return D}while(!h.lines);for(var q=0;q<h.lines.length;++q){var Q=h.lines[q].height;if(A<Q)break;A-=Q}return D+q}function pe(h,A){return A>=h.first&&A<h.first+h.size}function xe(h,A){return String(h.lineNumberFormatter(A+h.firstLineNumber))}function Ee(h,A,D){if(D===void 0&&(D=null),!(this instanceof Ee))return new Ee(h,A,D);this.line=h,this.ch=A,this.sticky=D}function Ze(h,A){return h.line-A.line||h.ch-A.ch}function Vt(h,A){return h.sticky==A.sticky&&Ze(h,A)==0}function Cn(h){return Ee(h.line,h.ch)}function on(h,A){return Ze(h,A)<0?A:h}function Pn(h,A){return Ze(h,A)<0?h:A}function Mr(h,A){return Math.max(h.first,Math.min(A,h.first+h.size-1))}function gn(h,A){if(A.line<h.first)return Ee(h.first,0);var D=h.first+h.size-1;return A.line>D?Ee(D,Ct(h,D).text.length):Ef(A,Ct(h,A.line).text.length)}function Ef(h,A){var D=h.ch;return D==null||D>A?Ee(h.line,A):D<0?Ee(h.line,0):h}function gd(h,A){for(var D=[],S=0;S<A.length;S++)D[S]=gn(h,A[S]);return D}ln.prototype.eol=function(){return this.pos>=this.string.length},ln.prototype.sol=function(){return this.pos==this.lineStart},ln.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ln.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ln.prototype.eat=function(h){var A=this.string.charAt(this.pos);if(typeof h=="string"?A==h:A&&(h.test?h.test(A):h(A)))return++this.pos,A},ln.prototype.eatWhile=function(h){for(var A=this.pos;this.eat(h););return this.pos>A},ln.prototype.eatSpace=function(){for(var h=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>h},ln.prototype.skipToEnd=function(){this.pos=this.string.length},ln.prototype.skipTo=function(h){var A=this.string.indexOf(h,this.pos);if(A>-1)return this.pos=A,!0},ln.prototype.backUp=function(h){this.pos-=h},ln.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},ln.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},ln.prototype.match=function(h,A,D){if(typeof h!="string"){var S=this.string.slice(this.pos).match(h);return S&&S.index>0?null:(S&&A!==!1&&(this.pos+=S[0].length),S)}var R=function(j){return D?j.toLowerCase():j};if(R(this.string.substr(this.pos,h.length))==R(h))return A!==!1&&(this.pos+=h.length),!0},ln.prototype.current=function(){return this.string.slice(this.start,this.pos)},ln.prototype.hideFirstChars=function(h,A){this.lineStart+=h;try{return A()}finally{this.lineStart-=h}},ln.prototype.lookAhead=function(h){var A=this.lineOracle;return A&&A.lookAhead(h)},ln.prototype.baseToken=function(){var h=this.lineOracle;return h&&h.baseToken(this.pos)};var Yl=function(h,A){this.state=h,this.lookAhead=A},Ps=function(h,A,D,S){this.state=A,this.doc=h,this.line=D,this.maxLookAhead=S||0,this.baseTokens=null,this.baseTokenPos=1};function om(h,A,D,S){var R=[h.state.modeGen],j={};$Se(h,A.text,h.doc.mode,D,function(ae,Se){return R.push(ae,Se)},j,S);for(var q=D.state,Q=function(ae){D.baseTokens=R;var Se=h.state.overlays[ae],De=1,Ue=0;D.state=!0,$Se(h,A.text,Se.mode,D,function(Ge,at){for(var yt=De;Ue<Ge;){var Ot=R[De];Ot>Ge&&R.splice(De,1,Ge,R[De+1],Ot),De+=2,Ue=Math.min(Ge,Ot)}if(at)if(Se.opaque)R.splice(yt,De-yt,Ge,"overlay "+at),De=yt+2;else for(;yt<De;yt+=2){var Yt=R[yt+1];R[yt+1]=(Yt?Yt+" ":"")+"overlay "+at}},j),D.state=q,D.baseTokens=null,D.baseTokenPos=1},re=0;re<h.state.overlays.length;++re)Q(re);return{styles:R,classes:j.bgClass||j.textClass?j:null}}function n3(h,A,D){if(!A.styles||A.styles[0]!=h.state.modeGen){var S=yd(h,cr(A)),R=A.text.length>h.options.maxHighlightLength&&ut(h.doc.mode,S.state),j=om(h,A,S);R&&(S.state=R),A.stateAfter=S.save(!R),A.styles=j.styles,j.classes?A.styleClasses=j.classes:A.styleClasses&&(A.styleClasses=null),D===h.doc.highlightFrontier&&(h.doc.modeFrontier=Math.max(h.doc.modeFrontier,++h.doc.highlightFrontier))}return A.styles}function yd(h,A,D){var S=h.doc,R=h.display;if(!S.mode.startState)return new Ps(S,!0,A);var j=swt(h,A,D),q=j>S.first&&Ct(S,j-1).stateAfter,Q=q?Ps.fromSaved(S,q,j):new Ps(S,En(S.mode),j);return S.iter(j,A,function(re){t0(h,re.text,Q);var ae=Q.line;re.stateAfter=ae==A-1||ae%5==0||ae>=R.viewFrom&&ae<R.viewTo?Q.save():null,Q.nextLine()}),D&&(S.modeFrontier=Q.line),Q}function t0(h,A,D,S){var R=h.doc.mode,j=new ln(A,h.options.tabSize,D);for(j.start=j.pos=S||0,A==""&&YA(R,D.state);!j.eol();)n0(R,j,D.state),j.start=j.pos}function YA(h,A){if(h.blankLine)return h.blankLine(A);if(h.innerMode){var D=xt(h,A);if(D.mode.blankLine)return D.mode.blankLine(D.state)}}function n0(h,A,D,S){for(var R=0;R<10;R++){S&&(S[0]=xt(h,D).mode);var j=h.token(A,D);if(A.pos>A.start)return j}throw new Error("Mode "+h.name+" failed to advance stream.")}Ps.prototype.lookAhead=function(h){var A=this.doc.getLine(this.line+h);return A!=null&&h>this.maxLookAhead&&(this.maxLookAhead=h),A},Ps.prototype.baseToken=function(h){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=h;)this.baseTokenPos+=2;var A=this.baseTokens[this.baseTokenPos+1];return{type:A&&A.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-h}},Ps.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ps.fromSaved=function(h,A,D){return A instanceof Yl?new Ps(h,ut(h.mode,A.state),D,A.lookAhead):new Ps(h,ut(h.mode,A),D)},Ps.prototype.save=function(h){var A=h!==!1?ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Yl(A,this.maxLookAhead):A};var im=function(h,A,D){this.start=h.start,this.end=h.pos,this.string=h.current(),this.type=A||null,this.state=D};function zSe(h,A,D,S){var R,j,q=h.doc,Q=q.mode,re=Ct(q,(A=gn(q,A)).line),ae=yd(h,A.line,D),Se=new ln(re.text,h.options.tabSize,ae);for(S&&(j=[]);(S||Se.pos<A.ch)&&!Se.eol();)Se.start=Se.pos,R=n0(Q,Se,ae.state),S&&j.push(new im(Se,R,ut(q.mode,ae.state)));return S?j:new im(Se,R,ae.state)}function HSe(h,A){if(h)for(;;){var D=h.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!D)break;h=h.slice(0,D.index)+h.slice(D.index+D[0].length);var S=D[1]?"bgClass":"textClass";A[S]==null?A[S]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(A[S])||(A[S]+=" "+D[2])}return h}function $Se(h,A,D,S,R,j,q){var Q=D.flattenSpans;Q==null&&(Q=h.options.flattenSpans);var re,ae=0,Se=null,De=new ln(A,h.options.tabSize,S),Ue=h.options.addModeClass&&[null];for(A==""&&HSe(YA(D,S.state),j);!De.eol();){if(De.pos>h.options.maxHighlightLength?(Q=!1,q&&t0(h,A,S,De.pos),De.pos=A.length,re=null):re=HSe(n0(D,De,S.state,Ue),j),Ue){var Ge=Ue[0].name;Ge&&(re="m-"+(re?Ge+" "+re:Ge))}if(!Q||Se!=re){for(;ae<De.start;)R(ae=Math.min(De.start,ae+5e3),Se);Se=re}De.start=De.pos}for(;ae<De.pos;){var at=Math.min(De.pos,ae+5e3);R(at,Se),ae=at}}function swt(h,A,D){for(var S,R,j=h.doc,q=D?-1:A-(h.doc.mode.innerMode?1e3:100),Q=A;Q>q;--Q){if(Q<=j.first)return j.first;var re=Ct(j,Q-1),ae=re.stateAfter;if(ae&&(!D||Q+(ae instanceof Yl?ae.lookAhead:0)<=j.modeFrontier))return Q;var Se=X(re.text,null,h.options.tabSize);(R==null||S>Se)&&(R=Q-1,S=Se)}return R}function uwt(h,A){if(h.modeFrontier=Math.min(h.modeFrontier,A),!(h.highlightFrontier<A-10)){for(var D=h.first,S=A-1;S>D;S--){var R=Ct(h,S).stateAfter;if(R&&(!(R instanceof Yl)||S+R.lookAhead<A)){D=S+1;break}}h.highlightFrontier=Math.min(h.highlightFrontier,D)}}var USe=!1,Cf=!1;function cwt(){USe=!0}function dwt(){Cf=!0}function GD(h,A,D){this.marker=h,this.from=A,this.to=D}function XA(h,A){if(h)for(var D=0;D<h.length;++D){var S=h[D];if(S.marker==A)return S}}function fwt(h,A){for(var D,S=0;S<h.length;++S)h[S]!=A&&(D||(D=[])).push(h[S]);return D}function pwt(h,A,D){var S=D&&window.WeakSet&&(D.markedSpans||(D.markedSpans=new WeakSet));S&&h.markedSpans&&S.has(h.markedSpans)?h.markedSpans.push(A):(h.markedSpans=h.markedSpans?h.markedSpans.concat([A]):[A],S&&S.add(h.markedSpans)),A.marker.attachLine(h)}function hwt(h,A,D){var S;if(h)for(var R=0;R<h.length;++R){var j=h[R],q=j.marker;if(j.from==null||(q.inclusiveLeft?j.from<=A:j.from<A)||j.from==A&&q.type=="bookmark"&&(!D||!j.marker.insertLeft)){var Q=j.to==null||(q.inclusiveRight?j.to>=A:j.to>A);(S||(S=[])).push(new GD(q,j.from,Q?null:j.to))}}return S}function vwt(h,A,D){var S;if(h)for(var R=0;R<h.length;++R){var j=h[R],q=j.marker;if(j.to==null||(q.inclusiveRight?j.to>=A:j.to>A)||j.from==A&&q.type=="bookmark"&&(!D||j.marker.insertLeft)){var Q=j.from==null||(q.inclusiveLeft?j.from<=A:j.from<A);(S||(S=[])).push(new GD(q,Q?null:j.from-A,j.to==null?null:j.to-A))}}return S}function gX(h,A){if(A.full)return null;var D=pe(h,A.from.line)&&Ct(h,A.from.line).markedSpans,S=pe(h,A.to.line)&&Ct(h,A.to.line).markedSpans;if(!D&&!S)return null;var R=A.from.ch,j=A.to.ch,q=Ze(A.from,A.to)==0,Q=hwt(D,R,q),re=vwt(S,j,q),ae=A.text.length==1,Se=Ce(A.text).length+(ae?R:0);if(Q)for(var De=0;De<Q.length;++De){var Ue=Q[De];if(Ue.to==null){var Ge=XA(re,Ue.marker);Ge?ae&&(Ue.to=Ge.to==null?null:Ge.to+Se):Ue.to=R}}if(re)for(var at=0;at<re.length;++at){var yt=re[at];yt.to!=null&&(yt.to+=Se),yt.from==null?XA(Q,yt.marker)||(yt.from=Se,ae&&(Q||(Q=[])).push(yt)):(yt.from+=Se,ae&&(Q||(Q=[])).push(yt))}Q&&(Q=WSe(Q)),re&&re!=Q&&(re=WSe(re));var Ot=[Q];if(!ae){var Yt,Jt=A.text.length-2;if(Jt>0&&Q)for(var It=0;It<Q.length;++It)Q[It].to==null&&(Yt||(Yt=[])).push(new GD(Q[It].marker,null,null));for(var tn=0;tn<Jt;++tn)Ot.push(Yt);Ot.push(re)}return Ot}function WSe(h){for(var A=0;A<h.length;++A){var D=h[A];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&h.splice(A--,1)}return h.length?h:null}function mwt(h,A,D){var S=null;if(h.iter(A.line,D.line+1,function(Ge){if(Ge.markedSpans)for(var at=0;at<Ge.markedSpans.length;++at){var yt=Ge.markedSpans[at].marker;yt.readOnly&&(!S||ne(S,yt)==-1)&&(S||(S=[])).push(yt)}}),!S)return null;for(var R=[{from:A,to:D}],j=0;j<S.length;++j)for(var q=S[j],Q=q.find(0),re=0;re<R.length;++re){var ae=R[re];if(!(Ze(ae.to,Q.from)<0||Ze(ae.from,Q.to)>0)){var Se=[re,1],De=Ze(ae.from,Q.from),Ue=Ze(ae.to,Q.to);(De<0||!q.inclusiveLeft&&!De)&&Se.push({from:ae.from,to:Q.from}),(Ue>0||!q.inclusiveRight&&!Ue)&&Se.push({from:Q.to,to:ae.to}),R.splice.apply(R,Se),re+=Se.length-3}}return R}function GSe(h){var A=h.markedSpans;if(A){for(var D=0;D<A.length;++D)A[D].marker.detachLine(h);h.markedSpans=null}}function qSe(h,A){if(A){for(var D=0;D<A.length;++D)A[D].marker.attachLine(h);h.markedSpans=A}}function qD(h){return h.inclusiveLeft?-1:0}function KD(h){return h.inclusiveRight?1:0}function yX(h,A){var D=h.lines.length-A.lines.length;if(D!=0)return D;var S=h.find(),R=A.find(),j=Ze(S.from,R.from)||qD(h)-qD(A);return j?-j:Ze(S.to,R.to)||KD(h)-KD(A)||A.id-h.id}function KSe(h,A){var D,S=Cf&&h.markedSpans;if(S)for(var R=void 0,j=0;j<S.length;++j)(R=S[j]).marker.collapsed&&(A?R.from:R.to)==null&&(!D||yX(D,R.marker)<0)&&(D=R.marker);return D}function YSe(h){return KSe(h,!0)}function YD(h){return KSe(h,!1)}function gwt(h,A){var D,S=Cf&&h.markedSpans;if(S)for(var R=0;R<S.length;++R){var j=S[R];j.marker.collapsed&&(j.from==null||j.from<A)&&(j.to==null||j.to>A)&&(!D||yX(D,j.marker)<0)&&(D=j.marker)}return D}function XSe(h,A,D,S,R){var j=Ct(h,A),q=Cf&&j.markedSpans;if(q)for(var Q=0;Q<q.length;++Q){var re=q[Q];if(re.marker.collapsed){var ae=re.marker.find(0),Se=Ze(ae.from,D)||qD(re.marker)-qD(R),De=Ze(ae.to,S)||KD(re.marker)-KD(R);if(!(Se>=0&&De<=0||Se<=0&&De>=0)&&(Se<=0&&(re.marker.inclusiveRight&&R.inclusiveLeft?Ze(ae.to,D)>=0:Ze(ae.to,D)>0)||Se>=0&&(re.marker.inclusiveRight&&R.inclusiveLeft?Ze(ae.from,S)<=0:Ze(ae.from,S)<0)))return!0}}}function uc(h){for(var A;A=YSe(h);)h=A.find(-1,!0).line;return h}function ywt(h){for(var A;A=YD(h);)h=A.find(1,!0).line;return h}function bwt(h){for(var A,D;A=YD(h);)h=A.find(1,!0).line,(D||(D=[])).push(h);return D}function bX(h,A){var D=Ct(h,A),S=uc(D);return D==S?A:cr(S)}function QSe(h,A){if(A>h.lastLine())return A;var D,S=Ct(h,A);if(!r0(h,S))return A;for(;D=YD(S);)S=D.find(1,!0).line;return cr(S)+1}function r0(h,A){var D=Cf&&A.markedSpans;if(D){for(var S=void 0,R=0;R<D.length;++R)if((S=D[R]).marker.collapsed&&(S.from==null||!S.marker.widgetNode&&S.from==0&&S.marker.inclusiveLeft&&AX(h,A,S)))return!0}}function AX(h,A,D){if(D.to==null){var S=D.marker.find(1,!0);return AX(h,S.line,XA(S.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.to==A.text.length)return!0;for(var R=void 0,j=0;j<A.markedSpans.length;++j)if((R=A.markedSpans[j]).marker.collapsed&&!R.marker.widgetNode&&R.from==D.to&&(R.to==null||R.to!=D.from)&&(R.marker.inclusiveLeft||D.marker.inclusiveRight)&&AX(h,A,R))return!0}function Sf(h){for(var A=0,D=(h=uc(h)).parent,S=0;S<D.lines.length;++S){var R=D.lines[S];if(R==h)break;A+=R.height}for(var j=D.parent;j;j=(D=j).parent)for(var q=0;q<j.children.length;++q){var Q=j.children[q];if(Q==D)break;A+=Q.height}return A}function XD(h){if(h.height==0)return 0;for(var A,D=h.text.length,S=h;A=YSe(S);){var R=A.find(0,!0);S=R.from.line,D+=R.from.ch-R.to.ch}for(S=h;A=YD(S);){var j=A.find(0,!0);D-=S.text.length-j.from.ch,D+=(S=j.to.line).text.length-j.to.ch}return D}function wX(h){var A=h.display,D=h.doc;A.maxLine=Ct(D,D.first),A.maxLineLength=XD(A.maxLine),A.maxLineChanged=!0,D.iter(function(S){var R=XD(S);R>A.maxLineLength&&(A.maxLineLength=R,A.maxLine=S)})}var r3=function(h,A,D){this.text=h,qSe(this,A),this.height=D?D(this):1};function Awt(h,A,D,S){h.text=A,h.stateAfter&&(h.stateAfter=null),h.styles&&(h.styles=null),h.order!=null&&(h.order=null),GSe(h),qSe(h,D);var R=S?S(h):1;R!=h.height&&jr(h,R)}function wwt(h){h.parent=null,GSe(h)}r3.prototype.lineNo=function(){return cr(this)},rn(r3);var xwt={},_wt={};function JSe(h,A){if(!h||/^\s*$/.test(h))return null;var D=A.addModeClass?_wt:xwt;return D[h]||(D[h]=h.replace(/\S+/g,"cm-$&"))}function ZSe(h,A){var D=L("span",null,null,s?"padding-right: .1px":null),S={pre:L("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:h,trailingSpace:!1,splitSpaces:h.getOption("lineWrapping")};A.measure={};for(var R=0;R<=(A.rest?A.rest.length:0);R++){var j=R?A.rest[R-1]:A.line,q=void 0;S.pos=0,S.addToken=Cwt,pl(h.display.measure)&&(q=me(j,h.doc.direction))&&(S.addToken=kwt(S.addToken,q)),S.map=[],Dwt(j,S,n3(h,j,A!=h.display.externalMeasured&&cr(j))),j.styleClasses&&(j.styleClasses.bgClass&&(S.bgClass=U(j.styleClasses.bgClass,S.bgClass||"")),j.styleClasses.textClass&&(S.textClass=U(j.styleClasses.textClass,S.textClass||""))),S.map.length==0&&S.map.push(0,0,S.content.appendChild(Ao(h.display.measure))),R==0?(A.measure.map=S.map,A.measure.cache={}):((A.measure.maps||(A.measure.maps=[])).push(S.map),(A.measure.caches||(A.measure.caches=[])).push({}))}if(s){var Q=S.content.lastChild;(/\bcm-tab\b/.test(Q.className)||Q.querySelector&&Q.querySelector(".cm-tab"))&&(S.content.className="cm-tab-wrap-hack")}return vt(h,"renderLine",h,A.line,S.pre),S.pre.className&&(S.textClass=U(S.pre.className,S.textClass||"")),S}function Ewt(h){var A=B("span","\u2022","cm-invalidchar");return A.title="\\u"+h.charCodeAt(0).toString(16),A.setAttribute("aria-label",A.title),A}function Cwt(h,A,D,S,R,j,q){if(A){var Q,re=h.splitSpaces?Swt(A,h.trailingSpace):A,ae=h.cm.state.specialChars,Se=!1;if(ae.test(A)){Q=document.createDocumentFragment();for(var De=0;;){ae.lastIndex=De;var Ue=ae.exec(A),Ge=Ue?Ue.index-De:A.length-De;if(Ge){var at=document.createTextNode(re.slice(De,De+Ge));a&&l<9?Q.appendChild(B("span",[at])):Q.appendChild(at),h.map.push(h.pos,h.pos+Ge,at),h.col+=Ge,h.pos+=Ge}if(!Ue)break;De+=Ge+1;var yt=void 0;if(Ue[0]==" "){var Ot=h.cm.options.tabSize,Yt=Ot-h.col%Ot;(yt=Q.appendChild(B("span",Ae(Yt),"cm-tab"))).setAttribute("role","presentation"),yt.setAttribute("cm-text"," "),h.col+=Yt}else Ue[0]=="\r"||Ue[0]==` |
|
58 |
`?((yt=Q.appendChild(B("span",Ue[0]=="\r"?"\u240D":"\u2424","cm-invalidchar"))).setAttribute("cm-text",Ue[0]),h.col+=1):((yt=h.cm.options.specialCharPlaceholder(Ue[0])).setAttribute("cm-text",Ue[0]),a&&l<9?Q.appendChild(B("span",[yt])):Q.appendChild(yt),h.col+=1);h.map.push(h.pos,h.pos+1,yt),h.pos++}}else h.col+=A.length,Q=document.createTextNode(re),h.map.push(h.pos,h.pos+A.length,Q),a&&l<9&&(Se=!0),h.pos+=A.length;if(h.trailingSpace=re.charCodeAt(A.length-1)==32,D||S||R||Se||j||q){var Jt=D||"";S&&(Jt+=S),R&&(Jt+=R);var It=B("span",[Q],Jt,j);if(q)for(var tn in q)q.hasOwnProperty(tn)&&tn!="style"&&tn!="class"&&It.setAttribute(tn,q[tn]);return h.content.appendChild(It)}h.content.appendChild(Q)}}function Swt(h,A){if(h.length>1&&!/ /.test(h))return h;for(var D=A,S="",R=0;R<h.length;R++){var j=h.charAt(R);j==" "&&D&&(R==h.length-1||h.charCodeAt(R+1)==32)&&(j="\xA0"),S+=j,D=j==" "}return S}function kwt(h,A){return function(D,S,R,j,q,Q,re){R=R?R+" cm-force-border":"cm-force-border";for(var ae=D.pos,Se=ae+S.length;;){for(var De=void 0,Ue=0;Ue<A.length&&!((De=A[Ue]).to>ae&&De.from<=ae);Ue++);if(De.to>=Se)return h(D,S,R,j,q,Q,re);h(D,S.slice(0,De.to-ae),R,j,null,Q,re),j=null,S=S.slice(De.to-ae),ae=De.to}}}function eke(h,A,D,S){var R=!S&&D.widgetNode;R&&h.map.push(h.pos,h.pos+A,R),!S&&h.cm.display.input.needsContentAttribute&&(R||(R=h.content.appendChild(document.createElement("span"))),R.setAttribute("cm-marker",D.id)),R&&(h.cm.display.input.setUneditable(R),h.content.appendChild(R)),h.pos+=A,h.trailingSpace=!1}function Dwt(h,A,D){var S=h.markedSpans,R=h.text,j=0;if(S)for(var q,Q,re,ae,Se,De,Ue,Ge=R.length,at=0,yt=1,Ot="",Yt=0;;){if(Yt==at){re=ae=Se=Q="",Ue=null,De=null,Yt=1/0;for(var Jt=[],It=void 0,tn=0;tn<S.length;++tn){var en=S[tn],fn=en.marker;if(fn.type=="bookmark"&&en.from==at&&fn.widgetNode)Jt.push(fn);else if(en.from<=at&&(en.to==null||en.to>at||fn.collapsed&&en.to==at&&en.from==at)){if(en.to!=null&&en.to!=at&&Yt>en.to&&(Yt=en.to,ae=""),fn.className&&(re+=" "+fn.className),fn.css&&(Q=(Q?Q+";":"")+fn.css),fn.startStyle&&en.from==at&&(Se+=" "+fn.startStyle),fn.endStyle&&en.to==Yt&&(It||(It=[])).push(fn.endStyle,en.to),fn.title&&((Ue||(Ue={})).title=fn.title),fn.attributes)for(var ro in fn.attributes)(Ue||(Ue={}))[ro]=fn.attributes[ro];fn.collapsed&&(!De||yX(De.marker,fn)<0)&&(De=en)}else en.from>at&&Yt>en.from&&(Yt=en.from)}if(It)for(var Zr=0;Zr<It.length;Zr+=2)It[Zr+1]==Yt&&(ae+=" "+It[Zr]);if(!De||De.from==at)for(var Ql=0;Ql<Jt.length;++Ql)eke(A,0,Jt[Ql]);if(De&&(De.from||0)==at){if(eke(A,(De.to==null?Ge+1:De.to)-at,De.marker,De.from==null),De.to==null)return;De.to==at&&(De=!1)}}if(at>=Ge)break;for(var ho=Math.min(Ge,Yt);;){if(Ot){var Cu=at+Ot.length;if(!De){var Jl=Cu>ho?Ot.slice(0,ho-at):Ot;A.addToken(A,Jl,q?q+re:re,Se,at+Jl.length==Yt?ae:"",Q,Ue)}if(Cu>=ho){Ot=Ot.slice(ho-at),at=ho;break}at=Cu,Se=""}Ot=R.slice(j,j=D[yt++]),q=JSe(D[yt++],A.cm.options)}}else for(var Bo=1;Bo<D.length;Bo+=2)A.addToken(A,R.slice(j,j=D[Bo]),JSe(D[Bo+1],A.cm.options))}function tke(h,A,D){this.line=A,this.rest=bwt(A),this.size=this.rest?cr(Ce(this.rest))-D+1:1,this.node=this.text=null,this.hidden=r0(h,A)}function QD(h,A,D){for(var S,R=[],j=A;j<D;j=S){var q=new tke(h.doc,Ct(h.doc,j),j);S=j+q.size,R.push(q)}return R}var o3=null;function Owt(h){o3?o3.ops.push(h):h.ownsGroup=o3={ops:[h],delayedCallbacks:[]}}function Twt(h){var A=h.delayedCallbacks,D=0;do{for(;D<A.length;D++)A[D].call(null);for(var S=0;S<h.ops.length;S++){var R=h.ops[S];if(R.cursorActivityHandlers)for(;R.cursorActivityCalled<R.cursorActivityHandlers.length;)R.cursorActivityHandlers[R.cursorActivityCalled++].call(null,R.cm)}}while(D<A.length)}function Mwt(h,A){var D=h.ownsGroup;if(D)try{Twt(D)}finally{o3=null,A(D)}}var QA=null;function Vi(h,A){var D=ht(h,A);if(D.length){var S,R=Array.prototype.slice.call(arguments,2);o3?S=o3.delayedCallbacks:QA?S=QA:(S=QA=[],setTimeout(Nwt,0));for(var j=function(Q){S.push(function(){return D[Q].apply(null,R)})},q=0;q<D.length;++q)j(q)}}function Nwt(){var h=QA;QA=null;for(var A=0;A<h.length;++A)h[A]()}function nke(h,A,D,S){for(var R=0;R<A.changes.length;R++){var j=A.changes[R];j=="text"?Rwt(h,A):j=="gutter"?oke(h,A,D,S):j=="class"?xX(h,A):j=="widget"&&Iwt(h,A,S)}A.changes=null}function JA(h){return h.node==h.text&&(h.node=B("div",null,null,"position: relative"),h.text.parentNode&&h.text.parentNode.replaceChild(h.node,h.text),h.node.appendChild(h.text),a&&l<8&&(h.node.style.zIndex=2)),h.node}function Fwt(h,A){var D=A.bgClass?A.bgClass+" "+(A.line.bgClass||""):A.line.bgClass;if(D&&(D+=" CodeMirror-linebackground"),A.background)D?A.background.className=D:(A.background.parentNode.removeChild(A.background),A.background=null);else if(D){var S=JA(A);A.background=S.insertBefore(B("div",null,D),S.firstChild),h.display.input.setUneditable(A.background)}}function rke(h,A){var D=h.display.externalMeasured;return D&&D.line==A.line?(h.display.externalMeasured=null,A.measure=D.measure,D.built):ZSe(h,A)}function Rwt(h,A){var D=A.text.className,S=rke(h,A);A.text==A.node&&(A.node=S.pre),A.text.parentNode.replaceChild(S.pre,A.text),A.text=S.pre,S.bgClass!=A.bgClass||S.textClass!=A.textClass?(A.bgClass=S.bgClass,A.textClass=S.textClass,xX(h,A)):D&&(A.text.className=D)}function xX(h,A){Fwt(h,A),A.line.wrapClass?JA(A).className=A.line.wrapClass:A.node!=A.text&&(A.node.className="");var D=A.textClass?A.textClass+" "+(A.line.textClass||""):A.line.textClass;A.text.className=D||""}function oke(h,A,D,S){if(A.gutter&&(A.node.removeChild(A.gutter),A.gutter=null),A.gutterBackground&&(A.node.removeChild(A.gutterBackground),A.gutterBackground=null),A.line.gutterClass){var R=JA(A);A.gutterBackground=B("div",null,"CodeMirror-gutter-background "+A.line.gutterClass,"left: "+(h.options.fixedGutter?S.fixedPos:-S.gutterTotalWidth)+"px; width: "+S.gutterTotalWidth+"px"),h.display.input.setUneditable(A.gutterBackground),R.insertBefore(A.gutterBackground,A.text)}var j=A.line.gutterMarkers;if(h.options.lineNumbers||j){var q=JA(A),Q=A.gutter=B("div",null,"CodeMirror-gutter-wrapper","left: "+(h.options.fixedGutter?S.fixedPos:-S.gutterTotalWidth)+"px");if(Q.setAttribute("aria-hidden","true"),h.display.input.setUneditable(Q),q.insertBefore(Q,A.text),A.line.gutterClass&&(Q.className+=" "+A.line.gutterClass),h.options.lineNumbers&&(!j||!j["CodeMirror-linenumbers"])&&(A.lineNumber=Q.appendChild(B("div",xe(h.options,D),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+S.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+h.display.lineNumInnerWidth+"px"))),j)for(var re=0;re<h.display.gutterSpecs.length;++re){var ae=h.display.gutterSpecs[re].className,Se=j.hasOwnProperty(ae)&&j[ae];Se&&Q.appendChild(B("div",[Se],"CodeMirror-gutter-elt","left: "+S.gutterLeft[ae]+"px; width: "+S.gutterWidth[ae]+"px"))}}}function Iwt(h,A,D){A.alignable&&(A.alignable=null);for(var S=k("CodeMirror-linewidget"),R=A.node.firstChild,j=void 0;R;R=j)j=R.nextSibling,S.test(R.className)&&A.node.removeChild(R);ike(h,A,D)}function Bwt(h,A,D,S){var R=rke(h,A);return A.text=A.node=R.pre,R.bgClass&&(A.bgClass=R.bgClass),R.textClass&&(A.textClass=R.textClass),xX(h,A),oke(h,A,D,S),ike(h,A,S),A.node}function ike(h,A,D){if(ake(h,A.line,A,D,!0),A.rest)for(var S=0;S<A.rest.length;S++)ake(h,A.rest[S],A,D,!1)}function ake(h,A,D,S,R){if(A.widgets)for(var j=JA(D),q=0,Q=A.widgets;q<Q.length;++q){var re=Q[q],ae=B("div",[re.node],"CodeMirror-linewidget"+(re.className?" "+re.className:""));re.handleMouseEvents||ae.setAttribute("cm-ignore-events","true"),Lwt(re,ae,D,S),h.display.input.setUneditable(ae),R&&re.above?j.insertBefore(ae,D.gutter||D.text):j.appendChild(ae),Vi(re,"redraw")}}function Lwt(h,A,D,S){if(h.noHScroll){(D.alignable||(D.alignable=[])).push(A);var R=S.wrapperWidth;A.style.left=S.fixedPos+"px",h.coverGutter||(R-=S.gutterTotalWidth,A.style.paddingLeft=S.gutterTotalWidth+"px"),A.style.width=R+"px"}h.coverGutter&&(A.style.zIndex=5,A.style.position="relative",h.noHScroll||(A.style.marginLeft=-S.gutterTotalWidth+"px"))}function ZA(h){if(h.height!=null)return h.height;var A=h.doc.cm;if(!A)return 0;if(!V(document.body,h.node)){var D="position: relative;";h.coverGutter&&(D+="margin-left: -"+A.display.gutters.offsetWidth+"px;"),h.noHScroll&&(D+="width: "+A.display.wrapper.clientWidth+"px;"),N(A.display.measure,B("div",[h.node],null,D))}return h.height=h.node.parentNode.offsetHeight}function kf(h,A){for(var D=_n(A);D!=h.wrapper;D=D.parentNode)if(!D||D.nodeType==1&&D.getAttribute("cm-ignore-events")=="true"||D.parentNode==h.sizer&&D!=h.mover)return!0}function JD(h){return h.lineSpace.offsetTop}function _X(h){return h.mover.offsetHeight-h.lineSpace.offsetHeight}function lke(h){if(h.cachedPaddingH)return h.cachedPaddingH;var A=N(h.measure,B("pre","x","CodeMirror-line-like")),D=window.getComputedStyle?window.getComputedStyle(A):A.currentStyle,S={left:parseInt(D.paddingLeft),right:parseInt(D.paddingRight)};return!isNaN(S.left)&&!isNaN(S.right)&&(h.cachedPaddingH=S),S}function bd(h){return se-h.display.nativeBarWidth}function am(h){return h.display.scroller.clientWidth-bd(h)-h.display.barWidth}function EX(h){return h.display.scroller.clientHeight-bd(h)-h.display.barHeight}function Pwt(h,A,D){var S=h.options.lineWrapping,R=S&&am(h);if(!A.measure.heights||S&&A.measure.width!=R){var j=A.measure.heights=[];if(S){A.measure.width=R;for(var q=A.text.firstChild.getClientRects(),Q=0;Q<q.length-1;Q++){var re=q[Q],ae=q[Q+1];Math.abs(re.bottom-ae.bottom)>2&&j.push((re.bottom+ae.top)/2-D.top)}}j.push(D.bottom-D.top)}}function ske(h,A,D){if(h.line==A)return{map:h.measure.map,cache:h.measure.cache};if(h.rest){for(var S=0;S<h.rest.length;S++)if(h.rest[S]==A)return{map:h.measure.maps[S],cache:h.measure.caches[S]};for(var R=0;R<h.rest.length;R++)if(cr(h.rest[R])>D)return{map:h.measure.maps[R],cache:h.measure.caches[R],before:!0}}}function jwt(h,A){var D=cr(A=uc(A)),S=h.display.externalMeasured=new tke(h.doc,A,D);S.lineN=D;var R=S.built=ZSe(h,S);return S.text=R.pre,N(h.display.lineMeasure,R.pre),S}function uke(h,A,D,S){return Ad(h,i3(h,A),D,S)}function CX(h,A){if(A>=h.display.viewFrom&&A<h.display.viewTo)return h.display.view[um(h,A)];var D=h.display.externalMeasured;return D&&A>=D.lineN&&A<D.lineN+D.size?D:void 0}function i3(h,A){var D=cr(A),S=CX(h,D);S&&!S.text?S=null:S&&S.changes&&(nke(h,S,D,TX(h)),h.curOp.forceUpdate=!0),S||(S=jwt(h,A));var R=ske(S,A,D);return{line:A,view:S,rect:null,map:R.map,cache:R.cache,before:R.before,hasHeights:!1}}function Ad(h,A,D,S,R){A.before&&(D=-1);var j,q=D+(S||"");return A.cache.hasOwnProperty(q)?j=A.cache[q]:(A.rect||(A.rect=A.view.text.getBoundingClientRect()),A.hasHeights||(Pwt(h,A.view,A.rect),A.hasHeights=!0),(j=zwt(h,A,D,S)).bogus||(A.cache[q]=j)),{left:j.left,right:j.right,top:R?j.rtop:j.top,bottom:R?j.rbottom:j.bottom}}var lm,cke={left:0,right:0,top:0,bottom:0};function dke(h,A,D){for(var S,R,j,q,Q,re,ae=0;ae<h.length;ae+=3)if(Q=h[ae],re=h[ae+1],A<Q?(R=0,j=1,q="left"):A<re?j=1+(R=A-Q):(ae==h.length-3||A==re&&h[ae+3]>A)&&(R=(j=re-Q)-1,A>=re&&(q="right")),R!=null){if(S=h[ae+2],Q==re&&D==(S.insertLeft?"left":"right")&&(q=D),D=="left"&&R==0)for(;ae&&h[ae-2]==h[ae-3]&&h[ae-1].insertLeft;)S=h[2+(ae-=3)],q="left";if(D=="right"&&R==re-Q)for(;ae<h.length-3&&h[ae+3]==h[ae+4]&&!h[ae+5].insertLeft;)S=h[(ae+=3)+2],q="right";break}return{node:S,start:R,end:j,collapse:q,coverStart:Q,coverEnd:re}}function Vwt(h,A){var D=cke;if(A=="left")for(var S=0;S<h.length&&(D=h[S]).left==D.right;S++);else for(var R=h.length-1;R>=0&&(D=h[R]).left==D.right;R--);return D}function zwt(h,A,D,S){var R,j=dke(A.map,D,S),q=j.node,Q=j.start,re=j.end,ae=j.collapse;if(q.nodeType==3){for(var Se=0;Se<4;Se++){for(;Q&&Ve(A.line.text.charAt(j.coverStart+Q));)--Q;for(;j.coverStart+re<j.coverEnd&&Ve(A.line.text.charAt(j.coverStart+re));)++re;if((R=a&&l<9&&Q==0&&re==j.coverEnd-j.coverStart?q.parentNode.getBoundingClientRect():Vwt(I(q,Q,re).getClientRects(),S)).left||R.right||Q==0)break;re=Q,Q-=1,ae="right"}a&&l<11&&(R=Hwt(h.display.measure,R))}else{var De;Q>0&&(ae=S="right"),R=h.options.lineWrapping&&(De=q.getClientRects()).length>1?De[S=="right"?De.length-1:0]:q.getBoundingClientRect()}if(a&&l<9&&!Q&&(!R||!R.left&&!R.right)){var Ue=q.parentNode.getClientRects()[0];R=Ue?{left:Ue.left,right:Ue.left+l3(h.display),top:Ue.top,bottom:Ue.bottom}:cke}for(var Ge=R.top-A.rect.top,at=R.bottom-A.rect.top,yt=(Ge+at)/2,Ot=A.view.measure.heights,Yt=0;Yt<Ot.length-1&&!(yt<Ot[Yt]);Yt++);var Jt=Yt?Ot[Yt-1]:0,It=Ot[Yt],tn={left:(ae=="right"?R.right:R.left)-A.rect.left,right:(ae=="left"?R.left:R.right)-A.rect.left,top:Jt,bottom:It};return!R.left&&!R.right&&(tn.bogus=!0),h.options.singleCursorHeightPerLine||(tn.rtop=Ge,tn.rbottom=at),tn}function Hwt(h,A){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!lt(h))return A;var D=screen.logicalXDPI/screen.deviceXDPI,S=screen.logicalYDPI/screen.deviceYDPI;return{left:A.left*D,right:A.right*D,top:A.top*S,bottom:A.bottom*S}}function fke(h){if(h.measure&&(h.measure.cache={},h.measure.heights=null,h.rest))for(var A=0;A<h.rest.length;A++)h.measure.caches[A]={}}function pke(h){h.display.externalMeasure=null,F(h.display.lineMeasure);for(var A=0;A<h.display.view.length;A++)fke(h.display.view[A])}function ew(h){pke(h),h.display.cachedCharWidth=h.display.cachedTextHeight=h.display.cachedPaddingH=null,h.options.lineWrapping||(h.display.maxLineChanged=!0),h.display.lineNumChars=null}function hke(h){return c&&b?-(h.body.getBoundingClientRect().left-parseInt(getComputedStyle(h.body).marginLeft)):h.defaultView.pageXOffset||(h.documentElement||h.body).scrollLeft}function vke(h){return c&&b?-(h.body.getBoundingClientRect().top-parseInt(getComputedStyle(h.body).marginTop)):h.defaultView.pageYOffset||(h.documentElement||h.body).scrollTop}function SX(h){var A=uc(h).widgets,D=0;if(A)for(var S=0;S<A.length;++S)A[S].above&&(D+=ZA(A[S]));return D}function ZD(h,A,D,S,R){if(!R){var j=SX(A);D.top+=j,D.bottom+=j}if(S=="line")return D;S||(S="local");var q=Sf(A);if(S=="local"?q+=JD(h.display):q-=h.display.viewOffset,S=="page"||S=="window"){var Q=h.display.lineSpace.getBoundingClientRect();q+=Q.top+(S=="window"?0:vke(z(h)));var re=Q.left+(S=="window"?0:hke(z(h)));D.left+=re,D.right+=re}return D.top+=q,D.bottom+=q,D}function mke(h,A,D){if(D=="div")return A;var S=A.left,R=A.top;if(D=="page")S-=hke(z(h)),R-=vke(z(h));else if(D=="local"||!D){var j=h.display.sizer.getBoundingClientRect();S+=j.left,R+=j.top}var q=h.display.lineSpace.getBoundingClientRect();return{left:S-q.left,top:R-q.top}}function eO(h,A,D,S,R){return S||(S=Ct(h.doc,A.line)),ZD(h,S,uke(h,S,A.ch,R),D)}function cc(h,A,D,S,R,j){function q(at,yt){var Ot=Ad(h,R,at,yt?"right":"left",j);return yt?Ot.left=Ot.right:Ot.right=Ot.left,ZD(h,S,Ot,D)}S=S||Ct(h.doc,A.line),R||(R=i3(h,S));var Q=me(S,h.doc.direction),re=A.ch,ae=A.sticky;if(re>=S.text.length?(re=S.text.length,ae="before"):re<=0&&(re=0,ae="after"),!Q)return q(ae=="before"?re-1:re,ae=="before");function Se(at,yt,Ot){return q(Ot?at-1:at,Q[yt].level==1!=Ot)}var De=we(Q,re,ae),Ue=je,Ge=Se(re,De,ae=="before");return Ue!=null&&(Ge.other=Se(re,Ue,ae!="before")),Ge}function gke(h,A){var D=0;A=gn(h.doc,A),h.options.lineWrapping||(D=l3(h.display)*A.ch);var S=Ct(h.doc,A.line),R=Sf(S)+JD(h.display);return{left:D,right:D,top:R,bottom:R+S.height}}function kX(h,A,D,S,R){var j=Ee(h,A,D);return j.xRel=R,S&&(j.outside=S),j}function DX(h,A,D){var S=h.doc;if((D+=h.display.viewOffset)<0)return kX(S.first,0,null,-1,-1);var R=Ha(S,D),j=S.first+S.size-1;if(R>j)return kX(S.first+S.size-1,Ct(S,j).text.length,null,1,1);A<0&&(A=0);for(var q=Ct(S,R);;){var Q=$wt(h,q,R,A,D),re=gwt(q,Q.ch+(Q.xRel>0||Q.outside>0?1:0));if(!re)return Q;var ae=re.find(1);if(ae.line==R)return ae;q=Ct(S,R=ae.line)}}function yke(h,A,D,S){S-=SX(A);var R=A.text.length,j=dt(function(q){return Ad(h,D,q-1).bottom<=S},R,0);return R=dt(function(q){return Ad(h,D,q).top>S},j,R),{begin:j,end:R}}function bke(h,A,D,S){return D||(D=i3(h,A)),yke(h,A,D,ZD(h,A,Ad(h,D,S),"line").top)}function OX(h,A,D,S){return!(h.bottom<=D)&&(h.top>D||(S?h.left:h.right)>A)}function $wt(h,A,D,S,R){R-=Sf(A);var j=i3(h,A),q=SX(A),Q=0,re=A.text.length,ae=!0,Se=me(A,h.doc.direction);if(Se){var De=(h.options.lineWrapping?Wwt:Uwt)(h,A,D,j,Se,S,R);Q=(ae=De.level!=1)?De.from:De.to-1,re=ae?De.to:De.from-1}var Ue,Ge,at=null,yt=null,Ot=dt(function(en){var fn=Ad(h,j,en);return fn.top+=q,fn.bottom+=q,!!OX(fn,S,R,!1)&&(fn.top<=R&&fn.left<=S&&(at=en,yt=fn),!0)},Q,re),Yt=!1;if(yt){var Jt=S-yt.left<yt.right-S,It=Jt==ae;Ot=at+(It?0:1),Ge=It?"after":"before",Ue=Jt?yt.left:yt.right}else{!ae&&(Ot==re||Ot==Q)&&Ot++,Ge=Ot==0?"after":Ot==A.text.length?"before":Ad(h,j,Ot-(ae?1:0)).bottom+q<=R==ae?"after":"before";var tn=cc(h,Ee(D,Ot,Ge),"line",A,j);Ue=tn.left,Yt=R<tn.top?-1:R>=tn.bottom?1:0}return kX(D,Ot=it(A.text,Ot,1),Ge,Yt,S-Ue)}function Uwt(h,A,D,S,R,j,q){var Q=dt(function(De){var Ue=R[De],Ge=Ue.level!=1;return OX(cc(h,Ee(D,Ge?Ue.to:Ue.from,Ge?"before":"after"),"line",A,S),j,q,!0)},0,R.length-1),re=R[Q];if(Q>0){var ae=re.level!=1,Se=cc(h,Ee(D,ae?re.from:re.to,ae?"after":"before"),"line",A,S);OX(Se,j,q,!0)&&Se.top>q&&(re=R[Q-1])}return re}function Wwt(h,A,D,S,R,j,q){var Q=yke(h,A,S,q),re=Q.begin,ae=Q.end;/\s/.test(A.text.charAt(ae-1))&&ae--;for(var Se=null,De=null,Ue=0;Ue<R.length;Ue++){var Ge=R[Ue];if(!(Ge.from>=ae||Ge.to<=re)){var at=Ad(h,S,Ge.level!=1?Math.min(ae,Ge.to)-1:Math.max(re,Ge.from)).right,yt=at<j?j-at+1e9:at-j;(!Se||De>yt)&&(Se=Ge,De=yt)}}return Se||(Se=R[R.length-1]),Se.from<re&&(Se={from:re,to:Se.to,level:Se.level}),Se.to>ae&&(Se={from:Se.from,to:ae,level:Se.level}),Se}function a3(h){if(h.cachedTextHeight!=null)return h.cachedTextHeight;if(lm==null){lm=B("pre",null,"CodeMirror-line-like");for(var A=0;A<49;++A)lm.appendChild(document.createTextNode("x")),lm.appendChild(B("br"));lm.appendChild(document.createTextNode("x"))}N(h.measure,lm);var D=lm.offsetHeight/50;return D>3&&(h.cachedTextHeight=D),F(h.measure),D||1}function l3(h){if(h.cachedCharWidth!=null)return h.cachedCharWidth;var A=B("span","xxxxxxxxxx"),D=B("pre",[A],"CodeMirror-line-like");N(h.measure,D);var S=A.getBoundingClientRect(),R=(S.right-S.left)/10;return R>2&&(h.cachedCharWidth=R),R||10}function TX(h){for(var A=h.display,D={},S={},R=A.gutters.clientLeft,j=A.gutters.firstChild,q=0;j;j=j.nextSibling,++q){var Q=h.display.gutterSpecs[q].className;D[Q]=j.offsetLeft+j.clientLeft+R,S[Q]=j.clientWidth}return{fixedPos:MX(A),gutterTotalWidth:A.gutters.offsetWidth,gutterLeft:D,gutterWidth:S,wrapperWidth:A.wrapper.clientWidth}}function MX(h){return h.scroller.getBoundingClientRect().left-h.sizer.getBoundingClientRect().left}function Ake(h){var A=a3(h.display),D=h.options.lineWrapping,S=D&&Math.max(5,h.display.scroller.clientWidth/l3(h.display)-3);return function(R){if(r0(h.doc,R))return 0;var j=0;if(R.widgets)for(var q=0;q<R.widgets.length;q++)R.widgets[q].height&&(j+=R.widgets[q].height);return D?j+(Math.ceil(R.text.length/S)||1)*A:j+A}}function NX(h){var A=h.doc,D=Ake(h);A.iter(function(S){var R=D(S);R!=S.height&&jr(S,R)})}function sm(h,A,D,S){var R=h.display;if(!D&&_n(A).getAttribute("cm-not-content")=="true")return null;var j,q,Q=R.lineSpace.getBoundingClientRect();try{j=A.clientX-Q.left,q=A.clientY-Q.top}catch{return null}var re,ae=DX(h,j,q);if(S&&ae.xRel>0&&(re=Ct(h.doc,ae.line).text).length==ae.ch){var Se=X(re,re.length,h.options.tabSize)-re.length;ae=Ee(ae.line,Math.max(0,Math.round((j-lke(h.display).left)/l3(h.display))-Se))}return ae}function um(h,A){if(A>=h.display.viewTo||(A-=h.display.viewFrom)<0)return null;for(var D=h.display.view,S=0;S<D.length;S++)if((A-=D[S].size)<0)return S}function hl(h,A,D,S){A==null&&(A=h.doc.first),D==null&&(D=h.doc.first+h.doc.size),S||(S=0);var R=h.display;if(S&&D<R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>A)&&(R.updateLineNumbers=A),h.curOp.viewChanged=!0,A>=R.viewTo)Cf&&bX(h.doc,A)<R.viewTo&&i0(h);else if(D<=R.viewFrom)Cf&&QSe(h.doc,D+S)>R.viewFrom?i0(h):(R.viewFrom+=S,R.viewTo+=S);else if(A<=R.viewFrom&&D>=R.viewTo)i0(h);else if(A<=R.viewFrom){var j=tO(h,D,D+S,1);j?(R.view=R.view.slice(j.index),R.viewFrom=j.lineN,R.viewTo+=S):i0(h)}else if(D>=R.viewTo){var q=tO(h,A,A,-1);q?(R.view=R.view.slice(0,q.index),R.viewTo=q.lineN):i0(h)}else{var Q=tO(h,A,A,-1),re=tO(h,D,D+S,1);Q&&re?(R.view=R.view.slice(0,Q.index).concat(QD(h,Q.lineN,re.lineN)).concat(R.view.slice(re.index)),R.viewTo+=S):i0(h)}var ae=R.externalMeasured;ae&&(D<ae.lineN?ae.lineN+=S:A<ae.lineN+ae.size&&(R.externalMeasured=null))}function o0(h,A,D){h.curOp.viewChanged=!0;var S=h.display,R=h.display.externalMeasured;if(R&&A>=R.lineN&&A<R.lineN+R.size&&(S.externalMeasured=null),!(A<S.viewFrom||A>=S.viewTo)){var j=S.view[um(h,A)];if(j.node!=null){var q=j.changes||(j.changes=[]);ne(q,D)==-1&&q.push(D)}}}function i0(h){h.display.viewFrom=h.display.viewTo=h.doc.first,h.display.view=[],h.display.viewOffset=0}function tO(h,A,D,S){var R,j=um(h,A),q=h.display.view;if(!Cf||D==h.doc.first+h.doc.size)return{index:j,lineN:D};for(var Q=h.display.viewFrom,re=0;re<j;re++)Q+=q[re].size;if(Q!=A){if(S>0){if(j==q.length-1)return null;R=Q+q[j].size-A,j++}else R=Q-A;A+=R,D+=R}for(;bX(h.doc,D)!=D;){if(j==(S<0?0:q.length-1))return null;D+=S*q[j-(S<0?1:0)].size,j+=S}return{index:j,lineN:D}}function Gwt(h,A,D){var S=h.display;S.view.length==0||A>=S.viewTo||D<=S.viewFrom?(S.view=QD(h,A,D),S.viewFrom=A):(S.viewFrom>A?S.view=QD(h,A,S.viewFrom).concat(S.view):S.viewFrom<A&&(S.view=S.view.slice(um(h,A))),S.viewFrom=A,S.viewTo<D?S.view=S.view.concat(QD(h,S.viewTo,D)):S.viewTo>D&&(S.view=S.view.slice(0,um(h,D)))),S.viewTo=D}function wke(h){for(var A=h.display.view,D=0,S=0;S<A.length;S++){var R=A[S];!R.hidden&&(!R.node||R.changes)&&++D}return D}function tw(h){h.display.input.showSelection(h.display.input.prepareSelection())}function xke(h,A){A===void 0&&(A=!0);var D=h.doc,S={},R=S.cursors=document.createDocumentFragment(),j=S.selection=document.createDocumentFragment(),q=h.options.$customCursor;q&&(A=!0);for(var Q=0;Q<D.sel.ranges.length;Q++)if(A||Q!=D.sel.primIndex){var re=D.sel.ranges[Q];if(!(re.from().line>=h.display.viewTo||re.to().line<h.display.viewFrom)){var ae=re.empty();if(q){var Se=q(h,re);Se&&FX(h,Se,R)}else(ae||h.options.showCursorWhenSelecting)&&FX(h,re.head,R);ae||qwt(h,re,j)}}return S}function FX(h,A,D){var S=cc(h,A,"div",null,null,!h.options.singleCursorHeightPerLine),R=D.appendChild(B("div","\xA0","CodeMirror-cursor"));if(R.style.left=S.left+"px",R.style.top=S.top+"px",R.style.height=Math.max(0,S.bottom-S.top)*h.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(h.getWrapperElement().className)){var j=eO(h,A,"div",null,null),q=j.right-j.left;R.style.width=(q>0?q:h.defaultCharWidth())+"px"}if(S.other){var Q=D.appendChild(B("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Q.style.display="",Q.style.left=S.other.left+"px",Q.style.top=S.other.top+"px",Q.style.height=.85*(S.other.bottom-S.other.top)+"px"}}function nO(h,A){return h.top-A.top||h.left-A.left}function qwt(h,A,D){var S=h.display,R=h.doc,j=document.createDocumentFragment(),q=lke(h.display),Q=q.left,re=Math.max(S.sizerWidth,am(h)-S.sizer.offsetLeft)-q.right,ae=R.direction=="ltr";function Se(It,tn,en,fn){tn<0&&(tn=0),tn=Math.round(tn),fn=Math.round(fn),j.appendChild(B("div",null,"CodeMirror-selected","position: absolute; left: "+It+`px; |
|
59 |
top: `+tn+"px; width: "+(en??re-It)+`px; |
|
60 |
height: `+(fn-tn)+"px"))}function De(It,tn,en){var fn,ro,Zr=Ct(R,It),Ql=Zr.text.length;function ho(Bo,ml){return eO(h,Ee(It,Bo),"div",Zr,ml)}function Cu(Bo,ml,Ua){var si=bke(h,Zr,null,Bo),Ko=ml=="ltr"==(Ua=="after")?"left":"right";return ho(Ua=="after"?si.begin:si.end-(/\s/.test(Zr.text.charAt(si.end-1))?2:1),Ko)[Ko]}var Jl=me(Zr,R.direction);return ot(Jl,tn||0,en??Ql,function(Bo,ml,Ua,si){var Ko=Ua=="ltr",ui=ho(Bo,Ko?"left":"right"),gl=ho(ml-1,Ko?"right":"left"),d0=tn==null&&Bo==0,pc=en==null&&ml==Ql,Ca=si==0,ci=!Jl||si==Jl.length-1;if(gl.top-ui.top<=3){var iQ=(ae?pc:d0)&&ci,Tf=(ae?d0:pc)&&Ca?Q:(Ko?ui:gl).left,hm=iQ?re:(Ko?gl:ui).right;Se(Tf,ui.top,hm-Tf,ui.bottom)}else{var vm,Wa,A3,aQ;Ko?(vm=ae&&d0&&Ca?Q:ui.left,Wa=ae?re:Cu(Bo,Ua,"before"),A3=ae?Q:Cu(ml,Ua,"after"),aQ=ae&&pc&&ci?re:gl.right):(vm=ae?Cu(Bo,Ua,"before"):Q,Wa=!ae&&d0&&Ca?re:ui.right,A3=!ae&&pc&&ci?Q:gl.left,aQ=ae?Cu(ml,Ua,"after"):re),Se(vm,ui.top,Wa-vm,ui.bottom),ui.bottom<gl.top&&Se(Q,ui.bottom,null,gl.top),Se(A3,gl.top,aQ-A3,gl.bottom)}(!fn||nO(ui,fn)<0)&&(fn=ui),nO(gl,fn)<0&&(fn=gl),(!ro||nO(ui,ro)<0)&&(ro=ui),nO(gl,ro)<0&&(ro=gl)}),{start:fn,end:ro}}var Ue=A.from(),Ge=A.to();if(Ue.line==Ge.line)De(Ue.line,Ue.ch,Ge.ch);else{var at=Ct(R,Ue.line),yt=Ct(R,Ge.line),Ot=uc(at)==uc(yt),Yt=De(Ue.line,Ue.ch,Ot?at.text.length+1:null).end,Jt=De(Ge.line,Ot?0:null,Ge.ch).start;Ot&&(Yt.top<Jt.top-2?(Se(Yt.right,Yt.top,null,Yt.bottom),Se(Q,Jt.top,Jt.left,Jt.bottom)):Se(Yt.right,Yt.top,Jt.left-Yt.right,Yt.bottom)),Yt.bottom<Jt.top&&Se(Q,Yt.bottom,null,Jt.top)}D.appendChild(j)}function RX(h){if(h.state.focused){var A=h.display;clearInterval(A.blinker);var D=!0;A.cursorDiv.style.visibility="",h.options.cursorBlinkRate>0?A.blinker=setInterval(function(){h.hasFocus()||s3(h),A.cursorDiv.style.visibility=(D=!D)?"":"hidden"},h.options.cursorBlinkRate):h.options.cursorBlinkRate<0&&(A.cursorDiv.style.visibility="hidden")}}function _ke(h){h.hasFocus()||(h.display.input.focus(),h.state.focused||BX(h))}function IX(h){h.state.delayingBlurEvent=!0,setTimeout(function(){h.state.delayingBlurEvent&&(h.state.delayingBlurEvent=!1,h.state.focused&&s3(h))},100)}function BX(h,A){h.state.delayingBlurEvent&&!h.state.draggingText&&(h.state.delayingBlurEvent=!1),h.options.readOnly!="nocursor"&&(h.state.focused||(vt(h,"focus",h,A),h.state.focused=!0,H(h.display.wrapper,"CodeMirror-focused"),!h.curOp&&h.display.selForContextMenu!=h.doc.sel&&(h.display.input.reset(),s&&setTimeout(function(){return h.display.input.reset(!0)},20)),h.display.input.receivedFocus()),RX(h))}function s3(h,A){h.state.delayingBlurEvent||(h.state.focused&&(vt(h,"blur",h,A),h.state.focused=!1,O(h.display.wrapper,"CodeMirror-focused")),clearInterval(h.display.blinker),setTimeout(function(){h.state.focused||(h.display.shift=!1)},150))}function rO(h){for(var A=h.display,D=A.lineDiv.offsetTop,S=Math.max(0,A.scroller.getBoundingClientRect().top),R=A.lineDiv.getBoundingClientRect().top,j=0,q=0;q<A.view.length;q++){var Q=A.view[q],re=h.options.lineWrapping,ae=void 0,Se=0;if(!Q.hidden){if(R+=Q.line.height,a&&l<8){var De=Q.node.offsetTop+Q.node.offsetHeight;ae=De-D,D=De}else{var Ue=Q.node.getBoundingClientRect();ae=Ue.bottom-Ue.top,!re&&Q.text.firstChild&&(Se=Q.text.firstChild.getBoundingClientRect().right-Ue.left-1)}var Ge=Q.line.height-ae;if((Ge>.005||Ge<-.005)&&(R<S&&(j-=Ge),jr(Q.line,ae),Eke(Q.line),Q.rest))for(var at=0;at<Q.rest.length;at++)Eke(Q.rest[at]);if(Se>h.display.sizerWidth){var yt=Math.ceil(Se/l3(h.display));yt>h.display.maxLineLength&&(h.display.maxLineLength=yt,h.display.maxLine=Q.line,h.display.maxLineChanged=!0)}}}Math.abs(j)>2&&(A.scroller.scrollTop+=j)}function Eke(h){if(h.widgets)for(var A=0;A<h.widgets.length;++A){var D=h.widgets[A],S=D.node.parentNode;S&&(D.height=S.offsetHeight)}}function oO(h,A,D){var S=D&&D.top!=null?Math.max(0,D.top):h.scroller.scrollTop;S=Math.floor(S-JD(h));var R=D&&D.bottom!=null?D.bottom:S+h.wrapper.clientHeight,j=Ha(A,S),q=Ha(A,R);if(D&&D.ensure){var Q=D.ensure.from.line,re=D.ensure.to.line;Q<j?(j=Q,q=Ha(A,Sf(Ct(A,Q))+h.wrapper.clientHeight)):Math.min(re,A.lastLine())>=q&&(j=Ha(A,Sf(Ct(A,re))-h.wrapper.clientHeight),q=re)}return{from:j,to:Math.max(q,j+1)}}function Kwt(h,A){if(!qt(h,"scrollCursorIntoView")){var D=h.display,S=D.sizer.getBoundingClientRect(),R=null,j=D.wrapper.ownerDocument;if(A.top+S.top<0?R=!0:A.bottom+S.top>(j.defaultView.innerHeight||j.documentElement.clientHeight)&&(R=!1),R!=null&&!v){var q=B("div","\u200B",null,`position: absolute; |
|
61 |
top: `+(A.top-D.viewOffset-JD(h.display))+`px; |
|
62 |
height: `+(A.bottom-A.top+bd(h)+D.barHeight)+`px; |
|
63 |
left: `+A.left+"px; width: "+Math.max(2,A.right-A.left)+"px;");h.display.lineSpace.appendChild(q),q.scrollIntoView(R),h.display.lineSpace.removeChild(q)}}}function Ywt(h,A,D,S){var R;S==null&&(S=0),!h.options.lineWrapping&&A==D&&(D=A.sticky=="before"?Ee(A.line,A.ch+1,"before"):A,A=A.ch?Ee(A.line,A.sticky=="before"?A.ch-1:A.ch,"after"):A);for(var j=0;j<5;j++){var q=!1,Q=cc(h,A),re=D&&D!=A?cc(h,D):Q,ae=LX(h,R={left:Math.min(Q.left,re.left),top:Math.min(Q.top,re.top)-S,right:Math.max(Q.left,re.left),bottom:Math.max(Q.bottom,re.bottom)+S}),Se=h.doc.scrollTop,De=h.doc.scrollLeft;if(ae.scrollTop!=null&&(rw(h,ae.scrollTop),Math.abs(h.doc.scrollTop-Se)>1&&(q=!0)),ae.scrollLeft!=null&&(cm(h,ae.scrollLeft),Math.abs(h.doc.scrollLeft-De)>1&&(q=!0)),!q)break}return R}function Xwt(h,A){var D=LX(h,A);D.scrollTop!=null&&rw(h,D.scrollTop),D.scrollLeft!=null&&cm(h,D.scrollLeft)}function LX(h,A){var D=h.display,S=a3(h.display);A.top<0&&(A.top=0);var R=h.curOp&&h.curOp.scrollTop!=null?h.curOp.scrollTop:D.scroller.scrollTop,j=EX(h),q={};A.bottom-A.top>j&&(A.bottom=A.top+j);var Q=h.doc.height+_X(D),re=A.top<S,ae=A.bottom>Q-S;if(A.top<R)q.scrollTop=re?0:A.top;else if(A.bottom>R+j){var Se=Math.min(A.top,(ae?Q:A.bottom)-j);Se!=R&&(q.scrollTop=Se)}var De=h.options.fixedGutter?0:D.gutters.offsetWidth,Ue=h.curOp&&h.curOp.scrollLeft!=null?h.curOp.scrollLeft:D.scroller.scrollLeft-De,Ge=am(h)-D.gutters.offsetWidth,at=A.right-A.left>Ge;return at&&(A.right=A.left+Ge),A.left<10?q.scrollLeft=0:A.left<Ue?q.scrollLeft=Math.max(0,A.left+De-(at?0:10)):A.right>Ge+Ue-3&&(q.scrollLeft=A.right+(at?0:10)-Ge),q}function PX(h,A){A!=null&&(iO(h),h.curOp.scrollTop=(h.curOp.scrollTop==null?h.doc.scrollTop:h.curOp.scrollTop)+A)}function u3(h){iO(h);var A=h.getCursor();h.curOp.scrollToPos={from:A,to:A,margin:h.options.cursorScrollMargin}}function nw(h,A,D){(A!=null||D!=null)&&iO(h),A!=null&&(h.curOp.scrollLeft=A),D!=null&&(h.curOp.scrollTop=D)}function Qwt(h,A){iO(h),h.curOp.scrollToPos=A}function iO(h){var A=h.curOp.scrollToPos;A&&(h.curOp.scrollToPos=null,Cke(h,gke(h,A.from),gke(h,A.to),A.margin))}function Cke(h,A,D,S){var R=LX(h,{left:Math.min(A.left,D.left),top:Math.min(A.top,D.top)-S,right:Math.max(A.right,D.right),bottom:Math.max(A.bottom,D.bottom)+S});nw(h,R.scrollLeft,R.scrollTop)}function rw(h,A){Math.abs(h.doc.scrollTop-A)<2||(n||VX(h,{top:A}),Ske(h,A,!0),n&&VX(h),aw(h,100))}function Ske(h,A,D){A=Math.max(0,Math.min(h.display.scroller.scrollHeight-h.display.scroller.clientHeight,A)),(h.display.scroller.scrollTop!=A||D)&&(h.doc.scrollTop=A,h.display.scrollbars.setScrollTop(A),h.display.scroller.scrollTop!=A&&(h.display.scroller.scrollTop=A))}function cm(h,A,D,S){A=Math.max(0,Math.min(A,h.display.scroller.scrollWidth-h.display.scroller.clientWidth)),(!(D?A==h.doc.scrollLeft:Math.abs(h.doc.scrollLeft-A)<2)||S)&&(h.doc.scrollLeft=A,Mke(h),h.display.scroller.scrollLeft!=A&&(h.display.scroller.scrollLeft=A),h.display.scrollbars.setScrollLeft(A))}function ow(h){var A=h.display,D=A.gutters.offsetWidth,S=Math.round(h.doc.height+_X(h.display));return{clientHeight:A.scroller.clientHeight,viewHeight:A.wrapper.clientHeight,scrollWidth:A.scroller.scrollWidth,clientWidth:A.scroller.clientWidth,viewWidth:A.wrapper.clientWidth,barLeft:h.options.fixedGutter?D:0,docHeight:S,scrollHeight:S+bd(h)+A.barHeight,nativeBarWidth:A.nativeBarWidth,gutterWidth:D}}var dm=function(h,A,D){this.cm=D;var S=this.vert=B("div",[B("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),R=this.horiz=B("div",[B("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");S.tabIndex=R.tabIndex=-1,h(S),h(R),Ie(S,"scroll",function(){S.clientHeight&&A(S.scrollTop,"vertical")}),Ie(R,"scroll",function(){R.clientWidth&&A(R.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};dm.prototype.update=function(h){var A=h.scrollWidth>h.clientWidth+1,D=h.scrollHeight>h.clientHeight+1,S=h.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=A?S+"px":"0";var R=h.viewHeight-(A?S:0);this.vert.firstChild.style.height=Math.max(0,h.scrollHeight-h.clientHeight+R)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(A){this.horiz.style.display="block",this.horiz.style.right=D?S+"px":"0",this.horiz.style.left=h.barLeft+"px";var j=h.viewWidth-h.barLeft-(D?S:0);this.horiz.firstChild.style.width=Math.max(0,h.scrollWidth-h.clientWidth+j)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&h.clientHeight>0&&(S==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?S:0,bottom:A?S:0}},dm.prototype.setScrollLeft=function(h){this.horiz.scrollLeft!=h&&(this.horiz.scrollLeft=h),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},dm.prototype.setScrollTop=function(h){this.vert.scrollTop!=h&&(this.vert.scrollTop=h),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},dm.prototype.zeroWidthHack=function(){var h=w&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=h,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new te,this.disableVert=new te},dm.prototype.enableZeroWidthBar=function(h,A,D){function S(){var R=h.getBoundingClientRect();(D=="vert"?document.elementFromPoint(R.right-1,(R.top+R.bottom)/2):document.elementFromPoint((R.right+R.left)/2,R.bottom-1))!=h?h.style.visibility="hidden":A.set(1e3,S)}h.style.visibility="",A.set(1e3,S)},dm.prototype.clear=function(){var h=this.horiz.parentNode;h.removeChild(this.horiz),h.removeChild(this.vert)};var iw=function(){};function c3(h,A){A||(A=ow(h));var D=h.display.barWidth,S=h.display.barHeight;kke(h,A);for(var R=0;R<4&&D!=h.display.barWidth||S!=h.display.barHeight;R++)D!=h.display.barWidth&&h.options.lineWrapping&&rO(h),kke(h,ow(h)),D=h.display.barWidth,S=h.display.barHeight}function kke(h,A){var D=h.display,S=D.scrollbars.update(A);D.sizer.style.paddingRight=(D.barWidth=S.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=S.bottom)+"px",D.heightForcer.style.borderBottom=S.bottom+"px solid transparent",S.right&&S.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=S.bottom+"px",D.scrollbarFiller.style.width=S.right+"px"):D.scrollbarFiller.style.display="",S.bottom&&h.options.coverGutterNextToScrollbar&&h.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=S.bottom+"px",D.gutterFiller.style.width=A.gutterWidth+"px"):D.gutterFiller.style.display=""}iw.prototype.update=function(){return{bottom:0,right:0}},iw.prototype.setScrollLeft=function(){},iw.prototype.setScrollTop=function(){},iw.prototype.clear=function(){};var Dke={native:dm,null:iw};function Oke(h){h.display.scrollbars&&(h.display.scrollbars.clear(),h.display.scrollbars.addClass&&O(h.display.wrapper,h.display.scrollbars.addClass)),h.display.scrollbars=new Dke[h.options.scrollbarStyle](function(A){h.display.wrapper.insertBefore(A,h.display.scrollbarFiller),Ie(A,"mousedown",function(){h.state.focused&&setTimeout(function(){return h.display.input.focus()},0)}),A.setAttribute("cm-not-content","true")},function(A,D){D=="horizontal"?cm(h,A):rw(h,A)},h),h.display.scrollbars.addClass&&H(h.display.wrapper,h.display.scrollbars.addClass)}var Jwt=0;function fm(h){h.curOp={cm:h,viewChanged:!1,startHeight:h.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Jwt,markArrays:null},Owt(h.curOp)}function pm(h){var A=h.curOp;A&&Mwt(A,function(D){for(var S=0;S<D.ops.length;S++)D.ops[S].cm.curOp=null;Zwt(D)})}function Zwt(h){for(var A=h.ops,D=0;D<A.length;D++)e7t(A[D]);for(var S=0;S<A.length;S++)t7t(A[S]);for(var R=0;R<A.length;R++)n7t(A[R]);for(var j=0;j<A.length;j++)r7t(A[j]);for(var q=0;q<A.length;q++)o7t(A[q])}function e7t(h){var A=h.cm,D=A.display;a7t(A),h.updateMaxLine&&wX(A),h.mustUpdate=h.viewChanged||h.forceUpdate||h.scrollTop!=null||h.scrollToPos&&(h.scrollToPos.from.line<D.viewFrom||h.scrollToPos.to.line>=D.viewTo)||D.maxLineChanged&&A.options.lineWrapping,h.update=h.mustUpdate&&new aO(A,h.mustUpdate&&{top:h.scrollTop,ensure:h.scrollToPos},h.forceUpdate)}function t7t(h){h.updatedDisplay=h.mustUpdate&&jX(h.cm,h.update)}function n7t(h){var A=h.cm,D=A.display;h.updatedDisplay&&rO(A),h.barMeasure=ow(A),D.maxLineChanged&&!A.options.lineWrapping&&(h.adjustWidthTo=uke(A,D.maxLine,D.maxLine.text.length).left+3,A.display.sizerWidth=h.adjustWidthTo,h.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+h.adjustWidthTo+bd(A)+A.display.barWidth),h.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+h.adjustWidthTo-am(A))),(h.updatedDisplay||h.selectionChanged)&&(h.preparedSelection=D.input.prepareSelection())}function r7t(h){var A=h.cm;h.adjustWidthTo!=null&&(A.display.sizer.style.minWidth=h.adjustWidthTo+"px",h.maxScrollLeft<A.doc.scrollLeft&&cm(A,Math.min(A.display.scroller.scrollLeft,h.maxScrollLeft),!0),A.display.maxLineChanged=!1);var D=h.focus&&h.focus==P(z(A));h.preparedSelection&&A.display.input.showSelection(h.preparedSelection,D),(h.updatedDisplay||h.startHeight!=A.doc.height)&&c3(A,h.barMeasure),h.updatedDisplay&&HX(A,h.barMeasure),h.selectionChanged&&RX(A),A.state.focused&&h.updateInput&&A.display.input.reset(h.typing),D&&_ke(h.cm)}function o7t(h){var A=h.cm,D=A.display,S=A.doc;h.updatedDisplay&&Tke(A,h.update),D.wheelStartX!=null&&(h.scrollTop!=null||h.scrollLeft!=null||h.scrollToPos)&&(D.wheelStartX=D.wheelStartY=null),h.scrollTop!=null&&Ske(A,h.scrollTop,h.forceScroll),h.scrollLeft!=null&&cm(A,h.scrollLeft,!0,!0),h.scrollToPos&&Kwt(A,Ywt(A,gn(S,h.scrollToPos.from),gn(S,h.scrollToPos.to),h.scrollToPos.margin));var R=h.maybeHiddenMarkers,j=h.maybeUnhiddenMarkers;if(R)for(var q=0;q<R.length;++q)R[q].lines.length||vt(R[q],"hide");if(j)for(var Q=0;Q<j.length;++Q)j[Q].lines.length&&vt(j[Q],"unhide");D.wrapper.offsetHeight&&(S.scrollTop=A.display.scroller.scrollTop),h.changeObjs&&vt(A,"changes",A,h.changeObjs),h.update&&h.update.finish()}function Xl(h,A){if(h.curOp)return A();fm(h);try{return A()}finally{pm(h)}}function zi(h,A){return function(){if(h.curOp)return A.apply(h,arguments);fm(h);try{return A.apply(h,arguments)}finally{pm(h)}}}function $a(h){return function(){if(this.curOp)return h.apply(this,arguments);fm(this);try{return h.apply(this,arguments)}finally{pm(this)}}}function Hi(h){return function(){var A=this.cm;if(!A||A.curOp)return h.apply(this,arguments);fm(A);try{return h.apply(this,arguments)}finally{pm(A)}}}function aw(h,A){h.doc.highlightFrontier<h.display.viewTo&&h.state.highlight.set(A,W(i7t,h))}function i7t(h){var A=h.doc;if(!(A.highlightFrontier>=h.display.viewTo)){var D=+new Date+h.options.workTime,S=yd(h,A.highlightFrontier),R=[];A.iter(S.line,Math.min(A.first+A.size,h.display.viewTo+500),function(j){if(S.line>=h.display.viewFrom){var q=j.styles,Q=j.text.length>h.options.maxHighlightLength?ut(A.mode,S.state):null,re=om(h,j,S,!0);Q&&(S.state=Q),j.styles=re.styles;var ae=j.styleClasses,Se=re.classes;Se?j.styleClasses=Se:ae&&(j.styleClasses=null);for(var De=!q||q.length!=j.styles.length||ae!=Se&&(!ae||!Se||ae.bgClass!=Se.bgClass||ae.textClass!=Se.textClass),Ue=0;!De&&Ue<q.length;++Ue)De=q[Ue]!=j.styles[Ue];De&&R.push(S.line),j.stateAfter=S.save(),S.nextLine()}else j.text.length<=h.options.maxHighlightLength&&t0(h,j.text,S),j.stateAfter=S.line%5==0?S.save():null,S.nextLine();if(+new Date>D)return aw(h,h.options.workDelay),!0}),A.highlightFrontier=S.line,A.modeFrontier=Math.max(A.modeFrontier,S.line),R.length&&Xl(h,function(){for(var j=0;j<R.length;j++)o0(h,R[j],"text")})}}var aO=function(h,A,D){var S=h.display;this.viewport=A,this.visible=oO(S,h.doc,A),this.editorIsHidden=!S.wrapper.offsetWidth,this.wrapperHeight=S.wrapper.clientHeight,this.wrapperWidth=S.wrapper.clientWidth,this.oldDisplayWidth=am(h),this.force=D,this.dims=TX(h),this.events=[]};function a7t(h){var A=h.display;!A.scrollbarsClipped&&A.scroller.offsetWidth&&(A.nativeBarWidth=A.scroller.offsetWidth-A.scroller.clientWidth,A.heightForcer.style.height=bd(h)+"px",A.sizer.style.marginBottom=-A.nativeBarWidth+"px",A.sizer.style.borderRightWidth=bd(h)+"px",A.scrollbarsClipped=!0)}function l7t(h){if(h.hasFocus())return null;var A=P(z(h));if(!A||!V(h.display.lineDiv,A))return null;var D={activeElt:A};if(window.getSelection){var S=$(h).getSelection();S.anchorNode&&S.extend&&V(h.display.lineDiv,S.anchorNode)&&(D.anchorNode=S.anchorNode,D.anchorOffset=S.anchorOffset,D.focusNode=S.focusNode,D.focusOffset=S.focusOffset)}return D}function s7t(h){if(h&&h.activeElt&&h.activeElt!=P(h.activeElt.ownerDocument)&&(h.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(h.activeElt.nodeName)&&h.anchorNode&&V(document.body,h.anchorNode)&&V(document.body,h.focusNode))){var A=h.activeElt.ownerDocument,D=A.defaultView.getSelection(),S=A.createRange();S.setEnd(h.anchorNode,h.anchorOffset),S.collapse(!1),D.removeAllRanges(),D.addRange(S),D.extend(h.focusNode,h.focusOffset)}}function jX(h,A){var D=h.display,S=h.doc;if(A.editorIsHidden)return i0(h),!1;if(!A.force&&A.visible.from>=D.viewFrom&&A.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&wke(h)==0)return!1;Nke(h)&&(i0(h),A.dims=TX(h));var R=S.first+S.size,j=Math.max(A.visible.from-h.options.viewportMargin,S.first),q=Math.min(R,A.visible.to+h.options.viewportMargin);D.viewFrom<j&&j-D.viewFrom<20&&(j=Math.max(S.first,D.viewFrom)),D.viewTo>q&&D.viewTo-q<20&&(q=Math.min(R,D.viewTo)),Cf&&(j=bX(h.doc,j),q=QSe(h.doc,q));var Q=j!=D.viewFrom||q!=D.viewTo||D.lastWrapHeight!=A.wrapperHeight||D.lastWrapWidth!=A.wrapperWidth;Gwt(h,j,q),D.viewOffset=Sf(Ct(h.doc,D.viewFrom)),h.display.mover.style.top=D.viewOffset+"px";var re=wke(h);if(!Q&&re==0&&!A.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var ae=l7t(h);return re>4&&(D.lineDiv.style.display="none"),u7t(h,D.updateLineNumbers,A.dims),re>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,s7t(ae),F(D.cursorDiv),F(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,Q&&(D.lastWrapHeight=A.wrapperHeight,D.lastWrapWidth=A.wrapperWidth,aw(h,400)),D.updateLineNumbers=null,!0}function Tke(h,A){for(var D=A.viewport,S=!0;;S=!1){if(S&&h.options.lineWrapping&&A.oldDisplayWidth!=am(h))S&&(A.visible=oO(h.display,h.doc,D));else if(D&&D.top!=null&&(D={top:Math.min(h.doc.height+_X(h.display)-EX(h),D.top)}),A.visible=oO(h.display,h.doc,D),A.visible.from>=h.display.viewFrom&&A.visible.to<=h.display.viewTo)break;if(!jX(h,A))break;rO(h);var R=ow(h);tw(h),c3(h,R),HX(h,R),A.force=!1}A.signal(h,"update",h),(h.display.viewFrom!=h.display.reportedViewFrom||h.display.viewTo!=h.display.reportedViewTo)&&(A.signal(h,"viewportChange",h,h.display.viewFrom,h.display.viewTo),h.display.reportedViewFrom=h.display.viewFrom,h.display.reportedViewTo=h.display.viewTo)}function VX(h,A){var D=new aO(h,A);if(jX(h,D)){rO(h),Tke(h,D);var S=ow(h);tw(h),c3(h,S),HX(h,S),D.finish()}}function u7t(h,A,D){var S=h.display,R=h.options.lineNumbers,j=S.lineDiv,q=j.firstChild;function Q(at){var yt=at.nextSibling;return s&&w&&h.display.currentWheelTarget==at?at.style.display="none":at.parentNode.removeChild(at),yt}for(var re=S.view,ae=S.viewFrom,Se=0;Se<re.length;Se++){var De=re[Se];if(!De.hidden)if(De.node&&De.node.parentNode==j){for(;q!=De.node;)q=Q(q);var Ue=R&&A!=null&&A<=ae&&De.lineNumber;De.changes&&(ne(De.changes,"gutter")>-1&&(Ue=!1),nke(h,De,ae,D)),Ue&&(F(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(xe(h.options,ae)))),q=De.node.nextSibling}else{var Ge=Bwt(h,De,ae,D);j.insertBefore(Ge,q)}ae+=De.size}for(;q;)q=Q(q)}function zX(h){var A=h.gutters.offsetWidth;h.sizer.style.marginLeft=A+"px",Vi(h,"gutterChanged",h)}function HX(h,A){h.display.sizer.style.minHeight=A.docHeight+"px",h.display.heightForcer.style.top=A.docHeight+"px",h.display.gutters.style.height=A.docHeight+h.display.barHeight+bd(h)+"px"}function Mke(h){var A=h.display,D=A.view;if(A.alignWidgets||A.gutters.firstChild&&h.options.fixedGutter){for(var S=MX(A)-A.scroller.scrollLeft+h.doc.scrollLeft,R=A.gutters.offsetWidth,j=S+"px",q=0;q<D.length;q++)if(!D[q].hidden){h.options.fixedGutter&&(D[q].gutter&&(D[q].gutter.style.left=j),D[q].gutterBackground&&(D[q].gutterBackground.style.left=j));var Q=D[q].alignable;if(Q)for(var re=0;re<Q.length;re++)Q[re].style.left=j}h.options.fixedGutter&&(A.gutters.style.left=S+R+"px")}}function Nke(h){if(!h.options.lineNumbers)return!1;var A=h.doc,D=xe(h.options,A.first+A.size-1),S=h.display;if(D.length!=S.lineNumChars){var R=S.measure.appendChild(B("div",[B("div",D)],"CodeMirror-linenumber CodeMirror-gutter-elt")),j=R.firstChild.offsetWidth,q=R.offsetWidth-j;return S.lineGutter.style.width="",S.lineNumInnerWidth=Math.max(j,S.lineGutter.offsetWidth-q)+1,S.lineNumWidth=S.lineNumInnerWidth+q,S.lineNumChars=S.lineNumInnerWidth?D.length:-1,S.lineGutter.style.width=S.lineNumWidth+"px",zX(h.display),!0}return!1}function $X(h,A){for(var D=[],S=!1,R=0;R<h.length;R++){var j=h[R],q=null;if(typeof j!="string"&&(q=j.style,j=j.className),j=="CodeMirror-linenumbers"){if(!A)continue;S=!0}D.push({className:j,style:q})}return A&&!S&&D.push({className:"CodeMirror-linenumbers",style:null}),D}function Fke(h){var A=h.gutters,D=h.gutterSpecs;F(A),h.lineGutter=null;for(var S=0;S<D.length;++S){var R=D[S],j=R.className,q=R.style,Q=A.appendChild(B("div",null,"CodeMirror-gutter "+j));q&&(Q.style.cssText=q),j=="CodeMirror-linenumbers"&&(h.lineGutter=Q,Q.style.width=(h.lineNumWidth||1)+"px")}A.style.display=D.length?"":"none",zX(h)}function lw(h){Fke(h.display),hl(h),Mke(h)}function c7t(h,A,D,S){var R=this;this.input=D,R.scrollbarFiller=B("div",null,"CodeMirror-scrollbar-filler"),R.scrollbarFiller.setAttribute("cm-not-content","true"),R.gutterFiller=B("div",null,"CodeMirror-gutter-filler"),R.gutterFiller.setAttribute("cm-not-content","true"),R.lineDiv=L("div",null,"CodeMirror-code"),R.selectionDiv=B("div",null,null,"position: relative; z-index: 1"),R.cursorDiv=B("div",null,"CodeMirror-cursors"),R.measure=B("div",null,"CodeMirror-measure"),R.lineMeasure=B("div",null,"CodeMirror-measure"),R.lineSpace=L("div",[R.measure,R.lineMeasure,R.selectionDiv,R.cursorDiv,R.lineDiv],null,"position: relative; outline: none");var j=L("div",[R.lineSpace],"CodeMirror-lines");R.mover=B("div",[j],null,"position: relative"),R.sizer=B("div",[R.mover],"CodeMirror-sizer"),R.sizerWidth=null,R.heightForcer=B("div",null,null,"position: absolute; height: "+se+"px; width: 1px;"),R.gutters=B("div",null,"CodeMirror-gutters"),R.lineGutter=null,R.scroller=B("div",[R.sizer,R.heightForcer,R.gutters],"CodeMirror-scroll"),R.scroller.setAttribute("tabIndex","-1"),R.wrapper=B("div",[R.scrollbarFiller,R.gutterFiller,R.scroller],"CodeMirror"),R.wrapper.setAttribute("translate","no"),a&&l<8&&(R.gutters.style.zIndex=-1,R.scroller.style.paddingRight=0),!s&&!(n&&y)&&(R.scroller.draggable=!0),h&&(h.appendChild?h.appendChild(R.wrapper):h(R.wrapper)),R.viewFrom=R.viewTo=A.first,R.reportedViewFrom=R.reportedViewTo=A.first,R.view=[],R.renderedView=null,R.externalMeasured=null,R.viewOffset=0,R.lastWrapHeight=R.lastWrapWidth=0,R.updateLineNumbers=null,R.nativeBarWidth=R.barHeight=R.barWidth=0,R.scrollbarsClipped=!1,R.lineNumWidth=R.lineNumInnerWidth=R.lineNumChars=null,R.alignWidgets=!1,R.cachedCharWidth=R.cachedTextHeight=R.cachedPaddingH=null,R.maxLine=null,R.maxLineLength=0,R.maxLineChanged=!1,R.wheelDX=R.wheelDY=R.wheelStartX=R.wheelStartY=null,R.shift=!1,R.selForContextMenu=null,R.activeTouch=null,R.gutterSpecs=$X(S.gutters,S.lineNumbers),Fke(R),D.init(R)}aO.prototype.signal=function(h,A){Zt(h,A)&&this.events.push(arguments)},aO.prototype.finish=function(){for(var h=0;h<this.events.length;h++)vt.apply(null,this.events[h])};var lO=0,Df=null;function Rke(h){var A=h.wheelDeltaX,D=h.wheelDeltaY;return A==null&&h.detail&&h.axis==h.HORIZONTAL_AXIS&&(A=h.detail),D==null&&h.detail&&h.axis==h.VERTICAL_AXIS?D=h.detail:D==null&&(D=h.wheelDelta),{x:A,y:D}}function d7t(h){var A=Rke(h);return A.x*=Df,A.y*=Df,A}function Ike(h,A){c&&d==102&&(h.display.chromeScrollHack==null?h.display.sizer.style.pointerEvents="none":clearTimeout(h.display.chromeScrollHack),h.display.chromeScrollHack=setTimeout(function(){h.display.chromeScrollHack=null,h.display.sizer.style.pointerEvents=""},100));var D=Rke(A),S=D.x,R=D.y,j=Df;A.deltaMode===0&&(S=A.deltaX,R=A.deltaY,j=1);var q=h.display,Q=q.scroller,re=Q.scrollWidth>Q.clientWidth,ae=Q.scrollHeight>Q.clientHeight;if(S&&re||R&&ae){if(R&&w&&s){e:for(var Se=A.target,De=q.view;Se!=Q;Se=Se.parentNode)for(var Ue=0;Ue<De.length;Ue++)if(De[Ue].node==Se){h.display.currentWheelTarget=Se;break e}}if(S&&!n&&!f&&j!=null)return R&&ae&&rw(h,Math.max(0,Q.scrollTop+R*j)),cm(h,Math.max(0,Q.scrollLeft+S*j)),(!R||R&&ae)&&zn(A),void(q.wheelStartX=null);if(R&&j!=null){var Ge=R*j,at=h.doc.scrollTop,yt=at+q.wrapper.clientHeight;Ge<0?at=Math.max(0,at+Ge-50):yt=Math.min(h.doc.height,yt+Ge+50),VX(h,{top:at,bottom:yt})}lO<20&&A.deltaMode!==0&&(q.wheelStartX==null?(q.wheelStartX=Q.scrollLeft,q.wheelStartY=Q.scrollTop,q.wheelDX=S,q.wheelDY=R,setTimeout(function(){if(q.wheelStartX!=null){var Ot=Q.scrollLeft-q.wheelStartX,Yt=Q.scrollTop-q.wheelStartY,Jt=Yt&&q.wheelDY&&Yt/q.wheelDY||Ot&&q.wheelDX&&Ot/q.wheelDX;q.wheelStartX=q.wheelStartY=null,Jt&&(Df=(Df*lO+Jt)/(lO+1),++lO)}},200)):(q.wheelDX+=S,q.wheelDY+=R))}}a?Df=-.53:n?Df=15:c?Df=-.7:p&&(Df=-.3333333333333333);var js=function(h,A){this.ranges=h,this.primIndex=A};js.prototype.primary=function(){return this.ranges[this.primIndex]},js.prototype.equals=function(h){if(h==this)return!0;if(h.primIndex!=this.primIndex||h.ranges.length!=this.ranges.length)return!1;for(var A=0;A<this.ranges.length;A++){var D=this.ranges[A],S=h.ranges[A];if(!Vt(D.anchor,S.anchor)||!Vt(D.head,S.head))return!1}return!0},js.prototype.deepCopy=function(){for(var h=[],A=0;A<this.ranges.length;A++)h[A]=new Vr(Cn(this.ranges[A].anchor),Cn(this.ranges[A].head));return new js(h,this.primIndex)},js.prototype.somethingSelected=function(){for(var h=0;h<this.ranges.length;h++)if(!this.ranges[h].empty())return!0;return!1},js.prototype.contains=function(h,A){A||(A=h);for(var D=0;D<this.ranges.length;D++){var S=this.ranges[D];if(Ze(A,S.from())>=0&&Ze(h,S.to())<=0)return D}return-1};var Vr=function(h,A){this.anchor=h,this.head=A};function dc(h,A,D){var S=h&&h.options.selectionsMayTouch,R=A[D];A.sort(function(Ue,Ge){return Ze(Ue.from(),Ge.from())}),D=ne(A,R);for(var j=1;j<A.length;j++){var q=A[j],Q=A[j-1],re=Ze(Q.to(),q.from());if(S&&!q.empty()?re>0:re>=0){var ae=Pn(Q.from(),q.from()),Se=on(Q.to(),q.to()),De=Q.empty()?q.from()==q.head:Q.from()==Q.head;j<=D&&--D,A.splice(--j,2,new Vr(De?Se:ae,De?ae:Se))}}return new js(A,D)}function a0(h,A){return new js([new Vr(h,A||h)],0)}function l0(h){return h.text?Ee(h.from.line+h.text.length-1,Ce(h.text).length+(h.text.length==1?h.from.ch:0)):h.to}function Bke(h,A){if(Ze(h,A.from)<0)return h;if(Ze(h,A.to)<=0)return l0(A);var D=h.line+A.text.length-(A.to.line-A.from.line)-1,S=h.ch;return h.line==A.to.line&&(S+=l0(A).ch-A.to.ch),Ee(D,S)}function UX(h,A){for(var D=[],S=0;S<h.sel.ranges.length;S++){var R=h.sel.ranges[S];D.push(new Vr(Bke(R.anchor,A),Bke(R.head,A)))}return dc(h.cm,D,h.sel.primIndex)}function Lke(h,A,D){return h.line==A.line?Ee(D.line,h.ch-A.ch+D.ch):Ee(D.line+(h.line-A.line),h.ch)}function f7t(h,A,D){for(var S=[],R=Ee(h.first,0),j=R,q=0;q<A.length;q++){var Q=A[q],re=Lke(Q.from,R,j),ae=Lke(l0(Q),R,j);if(R=Q.to,j=ae,D=="around"){var Se=h.sel.ranges[q],De=Ze(Se.head,Se.anchor)<0;S[q]=new Vr(De?ae:re,De?re:ae)}else S[q]=new Vr(re,re)}return new js(S,h.sel.primIndex)}function WX(h){h.doc.mode=Tt(h.options,h.doc.modeOption),sw(h)}function sw(h){h.doc.iter(function(A){A.stateAfter&&(A.stateAfter=null),A.styles&&(A.styles=null)}),h.doc.modeFrontier=h.doc.highlightFrontier=h.doc.first,aw(h,100),h.state.modeGen++,h.curOp&&hl(h)}function Pke(h,A){return A.from.ch==0&&A.to.ch==0&&Ce(A.text)==""&&(!h.cm||h.cm.options.wholeLineUpdateBefore)}function GX(h,A,D,S){function R(Jt){return D?D[Jt]:null}function j(Jt,It,tn){Awt(Jt,It,tn,S),Vi(Jt,"change",Jt,A)}function q(Jt,It){for(var tn=[],en=Jt;en<It;++en)tn.push(new r3(ae[en],R(en),S));return tn}var Q=A.from,re=A.to,ae=A.text,Se=Ct(h,Q.line),De=Ct(h,re.line),Ue=Ce(ae),Ge=R(ae.length-1),at=re.line-Q.line;if(A.full)h.insert(0,q(0,ae.length)),h.remove(ae.length,h.size-ae.length);else if(Pke(h,A)){var yt=q(0,ae.length-1);j(De,De.text,Ge),at&&h.remove(Q.line,at),yt.length&&h.insert(Q.line,yt)}else if(Se==De)if(ae.length==1)j(Se,Se.text.slice(0,Q.ch)+Ue+Se.text.slice(re.ch),Ge);else{var Ot=q(1,ae.length-1);Ot.push(new r3(Ue+Se.text.slice(re.ch),Ge,S)),j(Se,Se.text.slice(0,Q.ch)+ae[0],R(0)),h.insert(Q.line+1,Ot)}else if(ae.length==1)j(Se,Se.text.slice(0,Q.ch)+ae[0]+De.text.slice(re.ch),R(0)),h.remove(Q.line+1,at);else{j(Se,Se.text.slice(0,Q.ch)+ae[0],R(0)),j(De,Ue+De.text.slice(re.ch),Ge);var Yt=q(1,ae.length-1);at>1&&h.remove(Q.line+1,at-1),h.insert(Q.line+1,Yt)}Vi(h,"change",h,A)}function s0(h,A,D){function S(R,j,q){if(R.linked)for(var Q=0;Q<R.linked.length;++Q){var re=R.linked[Q];if(re.doc!=j){var ae=q&&re.sharedHist;D&&!ae||(A(re.doc,ae),S(re.doc,R,ae))}}}S(h,null,!0)}function jke(h,A){if(A.cm)throw new Error("This document is already in use.");h.doc=A,A.cm=h,NX(h),WX(h),Vke(h),h.options.direction=A.direction,h.options.lineWrapping||wX(h),h.options.mode=A.modeOption,hl(h)}function Vke(h){(h.doc.direction=="rtl"?H:O)(h.display.lineDiv,"CodeMirror-rtl")}function p7t(h){Xl(h,function(){Vke(h),hl(h)})}function sO(h){this.done=[],this.undone=[],this.undoDepth=h?h.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=h?h.maxGeneration:1}function qX(h,A){var D={from:Cn(A.from),to:l0(A),text:Fn(h,A.from,A.to)};return $ke(h,D,A.from.line,A.to.line+1),s0(h,function(S){return $ke(S,D,A.from.line,A.to.line+1)},!0),D}function zke(h){for(;h.length&&Ce(h).ranges;)h.pop()}function h7t(h,A){return A?(zke(h.done),Ce(h.done)):h.done.length&&!Ce(h.done).ranges?Ce(h.done):h.done.length>1&&!h.done[h.done.length-2].ranges?(h.done.pop(),Ce(h.done)):void 0}function Hke(h,A,D,S){var R=h.history;R.undone.length=0;var j,q,Q=+new Date;if((R.lastOp==S||R.lastOrigin==A.origin&&A.origin&&(A.origin.charAt(0)=="+"&&R.lastModTime>Q-(h.cm?h.cm.options.historyEventDelay:500)||A.origin.charAt(0)=="*"))&&(j=h7t(R,R.lastOp==S)))q=Ce(j.changes),Ze(A.from,A.to)==0&&Ze(A.from,q.to)==0?q.to=l0(A):j.changes.push(qX(h,A));else{var re=Ce(R.done);for((!re||!re.ranges)&&uO(h.sel,R.done),j={changes:[qX(h,A)],generation:R.generation},R.done.push(j);R.done.length>R.undoDepth;)R.done.shift(),R.done[0].ranges||R.done.shift()}R.done.push(D),R.generation=++R.maxGeneration,R.lastModTime=R.lastSelTime=Q,R.lastOp=R.lastSelOp=S,R.lastOrigin=R.lastSelOrigin=A.origin,q||vt(h,"historyAdded")}function v7t(h,A,D,S){var R=A.charAt(0);return R=="*"||R=="+"&&D.ranges.length==S.ranges.length&&D.somethingSelected()==S.somethingSelected()&&new Date-h.history.lastSelTime<=(h.cm?h.cm.options.historyEventDelay:500)}function m7t(h,A,D,S){var R=h.history,j=S&&S.origin;D==R.lastSelOp||j&&R.lastSelOrigin==j&&(R.lastModTime==R.lastSelTime&&R.lastOrigin==j||v7t(h,j,Ce(R.done),A))?R.done[R.done.length-1]=A:uO(A,R.done),R.lastSelTime=+new Date,R.lastSelOrigin=j,R.lastSelOp=D,S&&S.clearRedo!==!1&&zke(R.undone)}function uO(h,A){var D=Ce(A);D&&D.ranges&&D.equals(h)||A.push(h)}function $ke(h,A,D,S){var R=A["spans_"+h.id],j=0;h.iter(Math.max(h.first,D),Math.min(h.first+h.size,S),function(q){q.markedSpans&&((R||(R=A["spans_"+h.id]={}))[j]=q.markedSpans),++j})}function g7t(h){if(!h)return null;for(var A,D=0;D<h.length;++D)h[D].marker.explicitlyCleared?A||(A=h.slice(0,D)):A&&A.push(h[D]);return A?A.length?A:null:h}function y7t(h,A){var D=A["spans_"+h.id];if(!D)return null;for(var S=[],R=0;R<A.text.length;++R)S.push(g7t(D[R]));return S}function Uke(h,A){var D=y7t(h,A),S=gX(h,A);if(!D)return S;if(!S)return D;for(var R=0;R<D.length;++R){var j=D[R],q=S[R];if(j&&q)e:for(var Q=0;Q<q.length;++Q){for(var re=q[Q],ae=0;ae<j.length;++ae)if(j[ae].marker==re.marker)continue e;j.push(re)}else q&&(D[R]=q)}return D}function d3(h,A,D){for(var S=[],R=0;R<h.length;++R){var j=h[R];if(j.ranges)S.push(D?js.prototype.deepCopy.call(j):j);else{var q=j.changes,Q=[];S.push({changes:Q});for(var re=0;re<q.length;++re){var ae=q[re],Se=void 0;if(Q.push({from:ae.from,to:ae.to,text:ae.text}),A)for(var De in ae)(Se=De.match(/^spans_(\d+)$/))&&ne(A,Number(Se[1]))>-1&&(Ce(Q)[De]=ae[De],delete ae[De])}}}return S}function KX(h,A,D,S){if(S){var R=h.anchor;if(D){var j=Ze(A,R)<0;j!=Ze(D,R)<0?(R=A,A=D):j!=Ze(A,D)<0&&(A=D)}return new Vr(R,A)}return new Vr(D||A,A)}function cO(h,A,D,S,R){R==null&&(R=h.cm&&(h.cm.display.shift||h.extend)),Ea(h,new js([KX(h.sel.primary(),A,D,R)],0),S)}function Wke(h,A,D){for(var S=[],R=h.cm&&(h.cm.display.shift||h.extend),j=0;j<h.sel.ranges.length;j++)S[j]=KX(h.sel.ranges[j],A[j],null,R);Ea(h,dc(h.cm,S,h.sel.primIndex),D)}function YX(h,A,D,S){var R=h.sel.ranges.slice(0);R[A]=D,Ea(h,dc(h.cm,R,h.sel.primIndex),S)}function Gke(h,A,D,S){Ea(h,a0(A,D),S)}function b7t(h,A,D){var S={ranges:A.ranges,update:function(R){this.ranges=[];for(var j=0;j<R.length;j++)this.ranges[j]=new Vr(gn(h,R[j].anchor),gn(h,R[j].head))},origin:D&&D.origin};return vt(h,"beforeSelectionChange",h,S),h.cm&&vt(h.cm,"beforeSelectionChange",h.cm,S),S.ranges!=A.ranges?dc(h.cm,S.ranges,S.ranges.length-1):A}function qke(h,A,D){var S=h.history.done,R=Ce(S);R&&R.ranges?(S[S.length-1]=A,dO(h,A,D)):Ea(h,A,D)}function Ea(h,A,D){dO(h,A,D),m7t(h,h.sel,h.cm?h.cm.curOp.id:NaN,D)}function dO(h,A,D){(Zt(h,"beforeSelectionChange")||h.cm&&Zt(h.cm,"beforeSelectionChange"))&&(A=b7t(h,A,D));var S=D&&D.bias||(Ze(A.primary().head,h.sel.primary().head)<0?-1:1);Kke(h,Xke(h,A,S,!0)),(!D||D.scroll!==!1)&&h.cm&&h.cm.getOption("readOnly")!="nocursor"&&u3(h.cm)}function Kke(h,A){A.equals(h.sel)||(h.sel=A,h.cm&&(h.cm.curOp.updateInput=1,h.cm.curOp.selectionChanged=!0,mn(h.cm)),Vi(h,"cursorActivity",h))}function Yke(h){Kke(h,Xke(h,h.sel,null,!1))}function Xke(h,A,D,S){for(var R,j=0;j<A.ranges.length;j++){var q=A.ranges[j],Q=A.ranges.length==h.sel.ranges.length&&h.sel.ranges[j],re=fO(h,q.anchor,Q&&Q.anchor,D,S),ae=q.head==q.anchor?re:fO(h,q.head,Q&&Q.head,D,S);(R||re!=q.anchor||ae!=q.head)&&(R||(R=A.ranges.slice(0,j)),R[j]=new Vr(re,ae))}return R?dc(h.cm,R,A.primIndex):A}function f3(h,A,D,S,R){var j=Ct(h,A.line);if(j.markedSpans)for(var q=0;q<j.markedSpans.length;++q){var Q=j.markedSpans[q],re=Q.marker,ae="selectLeft"in re?!re.selectLeft:re.inclusiveLeft,Se="selectRight"in re?!re.selectRight:re.inclusiveRight;if((Q.from==null||(ae?Q.from<=A.ch:Q.from<A.ch))&&(Q.to==null||(Se?Q.to>=A.ch:Q.to>A.ch))){if(R&&(vt(re,"beforeCursorEnter"),re.explicitlyCleared)){if(j.markedSpans){--q;continue}break}if(!re.atomic)continue;if(D){var De=re.find(S<0?1:-1),Ue=void 0;if((S<0?Se:ae)&&(De=Qke(h,De,-S,De&&De.line==A.line?j:null)),De&&De.line==A.line&&(Ue=Ze(De,D))&&(S<0?Ue<0:Ue>0))return f3(h,De,A,S,R)}var Ge=re.find(S<0?-1:1);return(S<0?ae:Se)&&(Ge=Qke(h,Ge,S,Ge.line==A.line?j:null)),Ge?f3(h,Ge,A,S,R):null}}return A}function fO(h,A,D,S,R){var j=S||1;return f3(h,A,D,j,R)||!R&&f3(h,A,D,j,!0)||f3(h,A,D,-j,R)||!R&&f3(h,A,D,-j,!0)||(h.cantEdit=!0,Ee(h.first,0))}function Qke(h,A,D,S){return D<0&&A.ch==0?A.line>h.first?gn(h,Ee(A.line-1)):null:D>0&&A.ch==(S||Ct(h,A.line)).text.length?A.line<h.first+h.size-1?Ee(A.line+1,0):null:new Ee(A.line,A.ch+D)}function Jke(h){h.setSelection(Ee(h.firstLine(),0),Ee(h.lastLine()),J)}function Zke(h,A,D){var S={canceled:!1,from:A.from,to:A.to,text:A.text,origin:A.origin,cancel:function(){return S.canceled=!0}};return D&&(S.update=function(R,j,q,Q){R&&(S.from=gn(h,R)),j&&(S.to=gn(h,j)),q&&(S.text=q),Q!==void 0&&(S.origin=Q)}),vt(h,"beforeChange",h,S),h.cm&&vt(h.cm,"beforeChange",h.cm,S),S.canceled?(h.cm&&(h.cm.curOp.updateInput=2),null):{from:S.from,to:S.to,text:S.text,origin:S.origin}}function p3(h,A,D){if(h.cm){if(!h.cm.curOp)return zi(h.cm,p3)(h,A,D);if(h.cm.state.suppressEdits)return}if(!(Zt(h,"beforeChange")||h.cm&&Zt(h.cm,"beforeChange"))||(A=Zke(h,A,!0))){var S=USe&&!D&&mwt(h,A.from,A.to);if(S)for(var R=S.length-1;R>=0;--R)eDe(h,{from:S[R].from,to:S[R].to,text:R?[""]:A.text,origin:A.origin});else eDe(h,A)}}function eDe(h,A){if(A.text.length!=1||A.text[0]!=""||Ze(A.from,A.to)!=0){var D=UX(h,A);Hke(h,A,D,h.cm?h.cm.curOp.id:NaN),uw(h,A,D,gX(h,A));var S=[];s0(h,function(R,j){!j&&ne(S,R.history)==-1&&(oDe(R.history,A),S.push(R.history)),uw(R,A,null,gX(R,A))})}}function pO(h,A,D){var S=h.cm&&h.cm.state.suppressEdits;if(!S||D){for(var R,j=h.history,q=h.sel,Q=A=="undo"?j.done:j.undone,re=A=="undo"?j.undone:j.done,ae=0;ae<Q.length&&(R=Q[ae],!(D?R.ranges&&!R.equals(h.sel):!R.ranges));ae++);if(ae!=Q.length){for(j.lastOrigin=j.lastSelOrigin=null;;){if(!(R=Q.pop()).ranges){if(S)return void Q.push(R);break}if(uO(R,re),D&&!R.equals(h.sel))return void Ea(h,R,{clearRedo:!1});q=R}var Se=[];uO(q,re),re.push({changes:Se,generation:j.generation}),j.generation=R.generation||++j.maxGeneration;for(var De=Zt(h,"beforeChange")||h.cm&&Zt(h.cm,"beforeChange"),Ue=function(yt){var Ot=R.changes[yt];if(Ot.origin=A,De&&!Zke(h,Ot,!1))return Q.length=0,{};Se.push(qX(h,Ot));var Yt=yt?UX(h,Ot):Ce(Q);uw(h,Ot,Yt,Uke(h,Ot)),!yt&&h.cm&&h.cm.scrollIntoView({from:Ot.from,to:l0(Ot)});var Jt=[];s0(h,function(It,tn){!tn&&ne(Jt,It.history)==-1&&(oDe(It.history,Ot),Jt.push(It.history)),uw(It,Ot,null,Uke(It,Ot))})},Ge=R.changes.length-1;Ge>=0;--Ge){var at=Ue(Ge);if(at)return at.v}}}}function tDe(h,A){if(A!=0&&(h.first+=A,h.sel=new js(_e(h.sel.ranges,function(R){return new Vr(Ee(R.anchor.line+A,R.anchor.ch),Ee(R.head.line+A,R.head.ch))}),h.sel.primIndex),h.cm)){hl(h.cm,h.first,h.first-A,A);for(var D=h.cm.display,S=D.viewFrom;S<D.viewTo;S++)o0(h.cm,S,"gutter")}}function uw(h,A,D,S){if(h.cm&&!h.cm.curOp)return zi(h.cm,uw)(h,A,D,S);if(A.to.line<h.first)tDe(h,A.text.length-1-(A.to.line-A.from.line));else if(!(A.from.line>h.lastLine())){if(A.from.line<h.first){var R=A.text.length-1-(h.first-A.from.line);tDe(h,R),A={from:Ee(h.first,0),to:Ee(A.to.line+R,A.to.ch),text:[Ce(A.text)],origin:A.origin}}var j=h.lastLine();A.to.line>j&&(A={from:A.from,to:Ee(j,Ct(h,j).text.length),text:[A.text[0]],origin:A.origin}),A.removed=Fn(h,A.from,A.to),D||(D=UX(h,A)),h.cm?A7t(h.cm,A,S):GX(h,A,S),dO(h,D,J),h.cantEdit&&fO(h,Ee(h.firstLine(),0))&&(h.cantEdit=!1)}}function A7t(h,A,D){var S=h.doc,R=h.display,j=A.from,q=A.to,Q=!1,re=j.line;h.options.lineWrapping||(re=cr(uc(Ct(S,j.line))),S.iter(re,q.line+1,function(Ge){if(Ge==R.maxLine)return Q=!0,!0})),S.sel.contains(A.from,A.to)>-1&&mn(h),GX(S,A,D,Ake(h)),h.options.lineWrapping||(S.iter(re,j.line+A.text.length,function(Ge){var at=XD(Ge);at>R.maxLineLength&&(R.maxLine=Ge,R.maxLineLength=at,R.maxLineChanged=!0,Q=!1)}),Q&&(h.curOp.updateMaxLine=!0)),uwt(S,j.line),aw(h,400);var ae=A.text.length-(q.line-j.line)-1;A.full?hl(h):j.line!=q.line||A.text.length!=1||Pke(h.doc,A)?hl(h,j.line,q.line+1,ae):o0(h,j.line,"text");var Se=Zt(h,"changes"),De=Zt(h,"change");if(De||Se){var Ue={from:j,to:q,text:A.text,removed:A.removed,origin:A.origin};De&&Vi(h,"change",h,Ue),Se&&(h.curOp.changeObjs||(h.curOp.changeObjs=[])).push(Ue)}h.display.selForContextMenu=null}function h3(h,A,D,S,R){var j;S||(S=D),Ze(S,D)<0&&(D=(j=[S,D])[0],S=j[1]),typeof A=="string"&&(A=h.splitLines(A)),p3(h,{from:D,to:S,text:A,origin:R})}function nDe(h,A,D,S){D<h.line?h.line+=S:A<h.line&&(h.line=A,h.ch=0)}function rDe(h,A,D,S){for(var R=0;R<h.length;++R){var j=h[R],q=!0;if(j.ranges){j.copied||((j=h[R]=j.deepCopy()).copied=!0);for(var Q=0;Q<j.ranges.length;Q++)nDe(j.ranges[Q].anchor,A,D,S),nDe(j.ranges[Q].head,A,D,S)}else{for(var re=0;re<j.changes.length;++re){var ae=j.changes[re];if(D<ae.from.line)ae.from=Ee(ae.from.line+S,ae.from.ch),ae.to=Ee(ae.to.line+S,ae.to.ch);else if(A<=ae.to.line){q=!1;break}}q||(h.splice(0,R+1),R=0)}}}function oDe(h,A){var D=A.from.line,S=A.to.line,R=A.text.length-(S-D)-1;rDe(h.done,D,S,R),rDe(h.undone,D,S,R)}function cw(h,A,D,S){var R=A,j=A;return typeof A=="number"?j=Ct(h,Mr(h,A)):R=cr(A),R==null?null:(S(j,R)&&h.cm&&o0(h.cm,R,D),j)}function dw(h){this.lines=h,this.parent=null;for(var A=0,D=0;D<h.length;++D)h[D].parent=this,A+=h[D].height;this.height=A}function fw(h){this.children=h;for(var A=0,D=0,S=0;S<h.length;++S){var R=h[S];A+=R.chunkSize(),D+=R.height,R.parent=this}this.size=A,this.height=D,this.parent=null}Vr.prototype.from=function(){return Pn(this.anchor,this.head)},Vr.prototype.to=function(){return on(this.anchor,this.head)},Vr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},dw.prototype={chunkSize:function(){return this.lines.length},removeInner:function(h,A){for(var D=h,S=h+A;D<S;++D){var R=this.lines[D];this.height-=R.height,wwt(R),Vi(R,"delete")}this.lines.splice(h,A)},collapse:function(h){h.push.apply(h,this.lines)},insertInner:function(h,A,D){this.height+=D,this.lines=this.lines.slice(0,h).concat(A).concat(this.lines.slice(h));for(var S=0;S<A.length;++S)A[S].parent=this},iterN:function(h,A,D){for(var S=h+A;h<S;++h)if(D(this.lines[h]))return!0}},fw.prototype={chunkSize:function(){return this.size},removeInner:function(h,A){this.size-=A;for(var D=0;D<this.children.length;++D){var S=this.children[D],R=S.chunkSize();if(h<R){var j=Math.min(A,R-h),q=S.height;if(S.removeInner(h,j),this.height-=q-S.height,R==j&&(this.children.splice(D--,1),S.parent=null),(A-=j)==0)break;h=0}else h-=R}if(this.size-A<25&&(this.children.length>1||!(this.children[0]instanceof dw))){var Q=[];this.collapse(Q),this.children=[new dw(Q)],this.children[0].parent=this}},collapse:function(h){for(var A=0;A<this.children.length;++A)this.children[A].collapse(h)},insertInner:function(h,A,D){this.size+=A.length,this.height+=D;for(var S=0;S<this.children.length;++S){var R=this.children[S],j=R.chunkSize();if(h<=j){if(R.insertInner(h,A,D),R.lines&&R.lines.length>50){for(var q=R.lines.length%25+25,Q=q;Q<R.lines.length;){var re=new dw(R.lines.slice(Q,Q+=25));R.height-=re.height,this.children.splice(++S,0,re),re.parent=this}R.lines=R.lines.slice(0,q),this.maybeSpill()}break}h-=j}},maybeSpill:function(){if(!(this.children.length<=10)){var h=this;do{var A=new fw(h.children.splice(h.children.length-5,5));if(h.parent){h.size-=A.size,h.height-=A.height;var D=ne(h.parent.children,h);h.parent.children.splice(D+1,0,A)}else{var S=new fw(h.children);S.parent=h,h.children=[S,A],h=S}A.parent=h.parent}while(h.children.length>10);h.parent.maybeSpill()}},iterN:function(h,A,D){for(var S=0;S<this.children.length;++S){var R=this.children[S],j=R.chunkSize();if(h<j){var q=Math.min(A,j-h);if(R.iterN(h,q,D))return!0;if((A-=q)==0)break;h=0}else h-=j}}};var pw=function(h,A,D){if(D)for(var S in D)D.hasOwnProperty(S)&&(this[S]=D[S]);this.doc=h,this.node=A};function iDe(h,A,D){Sf(A)<(h.curOp&&h.curOp.scrollTop||h.doc.scrollTop)&&PX(h,D)}function w7t(h,A,D,S){var R=new pw(h,D,S),j=h.cm;return j&&R.noHScroll&&(j.display.alignWidgets=!0),cw(h,A,"widget",function(q){var Q=q.widgets||(q.widgets=[]);if(R.insertAt==null?Q.push(R):Q.splice(Math.min(Q.length,Math.max(0,R.insertAt)),0,R),R.line=q,j&&!r0(h,q)){var re=Sf(q)<h.scrollTop;jr(q,q.height+ZA(R)),re&&PX(j,R.height),j.curOp.forceUpdate=!0}return!0}),j&&Vi(j,"lineWidgetAdded",j,R,typeof A=="number"?A:cr(A)),R}pw.prototype.clear=function(){var h=this.doc.cm,A=this.line.widgets,D=this.line,S=cr(D);if(S!=null&&A){for(var R=0;R<A.length;++R)A[R]==this&&A.splice(R--,1);A.length||(D.widgets=null);var j=ZA(this);jr(D,Math.max(0,D.height-j)),h&&(Xl(h,function(){iDe(h,D,-j),o0(h,S,"widget")}),Vi(h,"lineWidgetCleared",h,this,S))}},pw.prototype.changed=function(){var h=this,A=this.height,D=this.doc.cm,S=this.line;this.height=null;var R=ZA(this)-A;!R||(r0(this.doc,S)||jr(S,S.height+R),D&&Xl(D,function(){D.curOp.forceUpdate=!0,iDe(D,S,R),Vi(D,"lineWidgetChanged",D,h,cr(S))}))},rn(pw);var aDe=0,u0=function(h,A){this.lines=[],this.type=A,this.doc=h,this.id=++aDe};function v3(h,A,D,S,R){if(S&&S.shared)return x7t(h,A,D,S,R);if(h.cm&&!h.cm.curOp)return zi(h.cm,v3)(h,A,D,S,R);var j=new u0(h,R),q=Ze(A,D);if(S&&K(S,j,!1),q>0||q==0&&j.clearWhenEmpty!==!1)return j;if(j.replacedWith&&(j.collapsed=!0,j.widgetNode=L("span",[j.replacedWith],"CodeMirror-widget"),S.handleMouseEvents||j.widgetNode.setAttribute("cm-ignore-events","true"),S.insertLeft&&(j.widgetNode.insertLeft=!0)),j.collapsed){if(XSe(h,A.line,A,D,j)||A.line!=D.line&&XSe(h,D.line,A,D,j))throw new Error("Inserting collapsed marker partially overlapping an existing one");dwt()}j.addToHistory&&Hke(h,{from:A,to:D,origin:"markText"},h.sel,NaN);var Q,re=A.line,ae=h.cm;if(h.iter(re,D.line+1,function(De){ae&&j.collapsed&&!ae.options.lineWrapping&&uc(De)==ae.display.maxLine&&(Q=!0),j.collapsed&&re!=A.line&&jr(De,0),pwt(De,new GD(j,re==A.line?A.ch:null,re==D.line?D.ch:null),h.cm&&h.cm.curOp),++re}),j.collapsed&&h.iter(A.line,D.line+1,function(De){r0(h,De)&&jr(De,0)}),j.clearOnEnter&&Ie(j,"beforeCursorEnter",function(){return j.clear()}),j.readOnly&&(cwt(),(h.history.done.length||h.history.undone.length)&&h.clearHistory()),j.collapsed&&(j.id=++aDe,j.atomic=!0),ae){if(Q&&(ae.curOp.updateMaxLine=!0),j.collapsed)hl(ae,A.line,D.line+1);else if(j.className||j.startStyle||j.endStyle||j.css||j.attributes||j.title)for(var Se=A.line;Se<=D.line;Se++)o0(ae,Se,"text");j.atomic&&Yke(ae.doc),Vi(ae,"markerAdded",ae,j)}return j}u0.prototype.clear=function(){if(!this.explicitlyCleared){var h=this.doc.cm,A=h&&!h.curOp;if(A&&fm(h),Zt(this,"clear")){var D=this.find();D&&Vi(this,"clear",D.from,D.to)}for(var S=null,R=null,j=0;j<this.lines.length;++j){var q=this.lines[j],Q=XA(q.markedSpans,this);h&&!this.collapsed?o0(h,cr(q),"text"):h&&(Q.to!=null&&(R=cr(q)),Q.from!=null&&(S=cr(q))),q.markedSpans=fwt(q.markedSpans,Q),Q.from==null&&this.collapsed&&!r0(this.doc,q)&&h&&jr(q,a3(h.display))}if(h&&this.collapsed&&!h.options.lineWrapping)for(var re=0;re<this.lines.length;++re){var ae=uc(this.lines[re]),Se=XD(ae);Se>h.display.maxLineLength&&(h.display.maxLine=ae,h.display.maxLineLength=Se,h.display.maxLineChanged=!0)}S!=null&&h&&this.collapsed&&hl(h,S,R+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,h&&Yke(h.doc)),h&&Vi(h,"markerCleared",h,this,S,R),A&&pm(h),this.parent&&this.parent.clear()}},u0.prototype.find=function(h,A){h==null&&this.type=="bookmark"&&(h=1);for(var D,S,R=0;R<this.lines.length;++R){var j=this.lines[R],q=XA(j.markedSpans,this);if(q.from!=null&&(D=Ee(A?j:cr(j),q.from),h==-1))return D;if(q.to!=null&&(S=Ee(A?j:cr(j),q.to),h==1))return S}return D&&{from:D,to:S}},u0.prototype.changed=function(){var h=this,A=this.find(-1,!0),D=this,S=this.doc.cm;!A||!S||Xl(S,function(){var R=A.line,j=cr(A.line),q=CX(S,j);if(q&&(fke(q),S.curOp.selectionChanged=S.curOp.forceUpdate=!0),S.curOp.updateMaxLine=!0,!r0(D.doc,R)&&D.height!=null){var Q=D.height;D.height=null;var re=ZA(D)-Q;re&&jr(R,R.height+re)}Vi(S,"markerChanged",S,h)})},u0.prototype.attachLine=function(h){if(!this.lines.length&&this.doc.cm){var A=this.doc.cm.curOp;(!A.maybeHiddenMarkers||ne(A.maybeHiddenMarkers,this)==-1)&&(A.maybeUnhiddenMarkers||(A.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(h)},u0.prototype.detachLine=function(h){if(this.lines.splice(ne(this.lines,h),1),!this.lines.length&&this.doc.cm){var A=this.doc.cm.curOp;(A.maybeHiddenMarkers||(A.maybeHiddenMarkers=[])).push(this)}},rn(u0);var hw=function(h,A){this.markers=h,this.primary=A;for(var D=0;D<h.length;++D)h[D].parent=this};function x7t(h,A,D,S,R){(S=K(S)).shared=!1;var j=[v3(h,A,D,S,R)],q=j[0],Q=S.widgetNode;return s0(h,function(re){Q&&(S.widgetNode=Q.cloneNode(!0)),j.push(v3(re,gn(re,A),gn(re,D),S,R));for(var ae=0;ae<re.linked.length;++ae)if(re.linked[ae].isParent)return;q=Ce(j)}),new hw(j,q)}function lDe(h){return h.findMarks(Ee(h.first,0),h.clipPos(Ee(h.lastLine())),function(A){return A.parent})}function _7t(h,A){for(var D=0;D<A.length;D++){var S=A[D],R=S.find(),j=h.clipPos(R.from),q=h.clipPos(R.to);if(Ze(j,q)){var Q=v3(h,j,q,S.primary,S.primary.type);S.markers.push(Q),Q.parent=S}}}function E7t(h){for(var A=function(S){var R=h[S],j=[R.primary.doc];s0(R.primary.doc,function(re){return j.push(re)});for(var q=0;q<R.markers.length;q++){var Q=R.markers[q];ne(j,Q.doc)==-1&&(Q.parent=null,R.markers.splice(q--,1))}},D=0;D<h.length;D++)A(D)}hw.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var h=0;h<this.markers.length;++h)this.markers[h].clear();Vi(this,"clear")}},hw.prototype.find=function(h,A){return this.primary.find(h,A)},rn(hw);var C7t=0,vl=function(h,A,D,S,R){if(!(this instanceof vl))return new vl(h,A,D,S,R);D==null&&(D=0),fw.call(this,[new dw([new r3("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var j=Ee(D,0);this.sel=a0(j),this.history=new sO(null),this.id=++C7t,this.modeOption=A,this.lineSep=S,this.direction=R=="rtl"?"rtl":"ltr",this.extend=!1,typeof h=="string"&&(h=this.splitLines(h)),GX(this,{from:j,to:j,text:h}),Ea(this,a0(j),J)};vl.prototype=$e(fw.prototype,{constructor:vl,iter:function(h,A,D){D?this.iterN(h-this.first,A-h,D):this.iterN(this.first,this.first+this.size,h)},insert:function(h,A){for(var D=0,S=0;S<A.length;++S)D+=A[S].height;this.insertInner(h-this.first,A,D)},remove:function(h,A){this.removeInner(h-this.first,A)},getValue:function(h){var A=Mo(this,this.first,this.first+this.size);return h===!1?A:A.join(h||this.lineSeparator())},setValue:Hi(function(h){var A=Ee(this.first,0),D=this.first+this.size-1;p3(this,{from:A,to:Ee(D,Ct(this,D).text.length),text:this.splitLines(h),origin:"setValue",full:!0},!0),this.cm&&nw(this.cm,0,0),Ea(this,a0(A),J)}),replaceRange:function(h,A,D,S){h3(this,h,A=gn(this,A),D=D?gn(this,D):A,S)},getRange:function(h,A,D){var S=Fn(this,gn(this,h),gn(this,A));return D===!1?S:D===""?S.join(""):S.join(D||this.lineSeparator())},getLine:function(h){var A=this.getLineHandle(h);return A&&A.text},getLineHandle:function(h){if(pe(this,h))return Ct(this,h)},getLineNumber:function(h){return cr(h)},getLineHandleVisualStart:function(h){return typeof h=="number"&&(h=Ct(this,h)),uc(h)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(h){return gn(this,h)},getCursor:function(h){var A=this.sel.primary();return h==null||h=="head"?A.head:h=="anchor"?A.anchor:h=="end"||h=="to"||h===!1?A.to():A.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Hi(function(h,A,D){Gke(this,gn(this,typeof h=="number"?Ee(h,A||0):h),null,D)}),setSelection:Hi(function(h,A,D){Gke(this,gn(this,h),gn(this,A||h),D)}),extendSelection:Hi(function(h,A,D){cO(this,gn(this,h),A&&gn(this,A),D)}),extendSelections:Hi(function(h,A){Wke(this,gd(this,h),A)}),extendSelectionsBy:Hi(function(h,A){Wke(this,gd(this,_e(this.sel.ranges,h)),A)}),setSelections:Hi(function(h,A,D){if(h.length){for(var S=[],R=0;R<h.length;R++)S[R]=new Vr(gn(this,h[R].anchor),gn(this,h[R].head||h[R].anchor));A==null&&(A=Math.min(h.length-1,this.sel.primIndex)),Ea(this,dc(this.cm,S,A),D)}}),addSelection:Hi(function(h,A,D){var S=this.sel.ranges.slice(0);S.push(new Vr(gn(this,h),gn(this,A||h))),Ea(this,dc(this.cm,S,S.length-1),D)}),getSelection:function(h){for(var A,D=this.sel.ranges,S=0;S<D.length;S++){var R=Fn(this,D[S].from(),D[S].to());A=A?A.concat(R):R}return h===!1?A:A.join(h||this.lineSeparator())},getSelections:function(h){for(var A=[],D=this.sel.ranges,S=0;S<D.length;S++){var R=Fn(this,D[S].from(),D[S].to());h!==!1&&(R=R.join(h||this.lineSeparator())),A[S]=R}return A},replaceSelection:function(h,A,D){for(var S=[],R=0;R<this.sel.ranges.length;R++)S[R]=h;this.replaceSelections(S,A,D||"+input")},replaceSelections:Hi(function(h,A,D){for(var S=[],R=this.sel,j=0;j<R.ranges.length;j++){var q=R.ranges[j];S[j]={from:q.from(),to:q.to(),text:this.splitLines(h[j]),origin:D}}for(var Q=A&&A!="end"&&f7t(this,S,A),re=S.length-1;re>=0;re--)p3(this,S[re]);Q?qke(this,Q):this.cm&&u3(this.cm)}),undo:Hi(function(){pO(this,"undo")}),redo:Hi(function(){pO(this,"redo")}),undoSelection:Hi(function(){pO(this,"undo",!0)}),redoSelection:Hi(function(){pO(this,"redo",!0)}),setExtending:function(h){this.extend=h},getExtending:function(){return this.extend},historySize:function(){for(var h=this.history,A=0,D=0,S=0;S<h.done.length;S++)h.done[S].ranges||++A;for(var R=0;R<h.undone.length;R++)h.undone[R].ranges||++D;return{undo:A,redo:D}},clearHistory:function(){var h=this;this.history=new sO(this.history),s0(this,function(A){return A.history=h.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(h){return h&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(h){return this.history.generation==(h||this.cleanGeneration)},getHistory:function(){return{done:d3(this.history.done),undone:d3(this.history.undone)}},setHistory:function(h){var A=this.history=new sO(this.history);A.done=d3(h.done.slice(0),null,!0),A.undone=d3(h.undone.slice(0),null,!0)},setGutterMarker:Hi(function(h,A,D){return cw(this,h,"gutter",function(S){var R=S.gutterMarkers||(S.gutterMarkers={});return R[A]=D,!D&&st(R)&&(S.gutterMarkers=null),!0})}),clearGutter:Hi(function(h){var A=this;this.iter(function(D){D.gutterMarkers&&D.gutterMarkers[h]&&cw(A,D,"gutter",function(){return D.gutterMarkers[h]=null,st(D.gutterMarkers)&&(D.gutterMarkers=null),!0})})}),lineInfo:function(h){var A;if(typeof h=="number"){if(!(pe(this,h)&&(A=h,h=Ct(this,h))))return null}else if((A=cr(h))==null)return null;return{line:A,handle:h,text:h.text,gutterMarkers:h.gutterMarkers,textClass:h.textClass,bgClass:h.bgClass,wrapClass:h.wrapClass,widgets:h.widgets}},addLineClass:Hi(function(h,A,D){return cw(this,h,A=="gutter"?"gutter":"class",function(S){var R=A=="text"?"textClass":A=="background"?"bgClass":A=="gutter"?"gutterClass":"wrapClass";if(S[R]){if(k(D).test(S[R]))return!1;S[R]+=" "+D}else S[R]=D;return!0})}),removeLineClass:Hi(function(h,A,D){return cw(this,h,A=="gutter"?"gutter":"class",function(S){var R=A=="text"?"textClass":A=="background"?"bgClass":A=="gutter"?"gutterClass":"wrapClass",j=S[R];if(!j)return!1;if(D==null)S[R]=null;else{var q=j.match(k(D));if(!q)return!1;var Q=q.index+q[0].length;S[R]=j.slice(0,q.index)+(q.index&&Q!=j.length?" ":"")+j.slice(Q)||null}return!0})}),addLineWidget:Hi(function(h,A,D){return w7t(this,h,A,D)}),removeLineWidget:function(h){h.clear()},markText:function(h,A,D){return v3(this,gn(this,h),gn(this,A),D,D&&D.type||"range")},setBookmark:function(h,A){var D={replacedWith:A&&(A.nodeType==null?A.widget:A),insertLeft:A&&A.insertLeft,clearWhenEmpty:!1,shared:A&&A.shared,handleMouseEvents:A&&A.handleMouseEvents};return v3(this,h=gn(this,h),h,D,"bookmark")},findMarksAt:function(h){var A=[],D=Ct(this,(h=gn(this,h)).line).markedSpans;if(D)for(var S=0;S<D.length;++S){var R=D[S];(R.from==null||R.from<=h.ch)&&(R.to==null||R.to>=h.ch)&&A.push(R.marker.parent||R.marker)}return A},findMarks:function(h,A,D){h=gn(this,h),A=gn(this,A);var S=[],R=h.line;return this.iter(h.line,A.line+1,function(j){var q=j.markedSpans;if(q)for(var Q=0;Q<q.length;Q++){var re=q[Q];!(re.to!=null&&R==h.line&&h.ch>=re.to||re.from==null&&R!=h.line||re.from!=null&&R==A.line&&re.from>=A.ch)&&(!D||D(re.marker))&&S.push(re.marker.parent||re.marker)}++R}),S},getAllMarks:function(){var h=[];return this.iter(function(A){var D=A.markedSpans;if(D)for(var S=0;S<D.length;++S)D[S].from!=null&&h.push(D[S].marker)}),h},posFromIndex:function(h){var A,D=this.first,S=this.lineSeparator().length;return this.iter(function(R){var j=R.text.length+S;if(j>h)return A=h,!0;h-=j,++D}),gn(this,Ee(D,A))},indexFromPos:function(h){var A=(h=gn(this,h)).ch;if(h.line<this.first||h.ch<0)return 0;var D=this.lineSeparator().length;return this.iter(this.first,h.line,function(S){A+=S.text.length+D}),A},copy:function(h){var A=new vl(Mo(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return A.scrollTop=this.scrollTop,A.scrollLeft=this.scrollLeft,A.sel=this.sel,A.extend=!1,h&&(A.history.undoDepth=this.history.undoDepth,A.setHistory(this.getHistory())),A},linkedDoc:function(h){h||(h={});var A=this.first,D=this.first+this.size;h.from!=null&&h.from>A&&(A=h.from),h.to!=null&&h.to<D&&(D=h.to);var S=new vl(Mo(this,A,D),h.mode||this.modeOption,A,this.lineSep,this.direction);return h.sharedHist&&(S.history=this.history),(this.linked||(this.linked=[])).push({doc:S,sharedHist:h.sharedHist}),S.linked=[{doc:this,isParent:!0,sharedHist:h.sharedHist}],_7t(S,lDe(this)),S},unlinkDoc:function(h){if(h instanceof wo&&(h=h.doc),this.linked){for(var A=0;A<this.linked.length;++A)if(this.linked[A].doc==h){this.linked.splice(A,1),h.unlinkDoc(this),E7t(lDe(this));break}}if(h.history==this.history){var D=[h.id];s0(h,function(S){return D.push(S.id)},!0),h.history=new sO(null),h.history.done=d3(this.history.done,D),h.history.undone=d3(this.history.undone,D)}},iterLinkedDocs:function(h){s0(this,h)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(h){return this.lineSep?h.split(this.lineSep):Go(h)},lineSeparator:function(){return this.lineSep||` |
|
64 |
`},setDirection:Hi(function(h){h!="rtl"&&(h="ltr"),h!=this.direction&&(this.direction=h,this.iter(function(A){return A.order=null}),this.cm&&p7t(this.cm))})}),vl.prototype.eachLine=vl.prototype.iter;var sDe=0;function S7t(h){var A=this;if(uDe(A),!qt(A,h)&&!kf(A.display,h)){zn(h),a&&(sDe=+new Date);var D=sm(A,h,!0),S=h.dataTransfer.files;if(D&&!A.isReadOnly())if(S&&S.length&&window.FileReader&&window.File)for(var R=S.length,j=Array(R),q=0,Q=function(){++q==R&&zi(A,function(){var Ge={from:D=gn(A.doc,D),to:D,text:A.doc.splitLines(j.filter(function(at){return at!=null}).join(A.doc.lineSeparator())),origin:"paste"};p3(A.doc,Ge),qke(A.doc,a0(gn(A.doc,D),gn(A.doc,l0(Ge))))})()},re=function(Ge,at){if(A.options.allowDropFileTypes&&ne(A.options.allowDropFileTypes,Ge.type)==-1)Q();else{var yt=new FileReader;yt.onerror=function(){return Q()},yt.onload=function(){var Ot=yt.result;/[\x00-\x08\x0e-\x1f]{2}/.test(Ot)||(j[at]=Ot),Q()},yt.readAsText(Ge)}},ae=0;ae<S.length;ae++)re(S[ae],ae);else{if(A.state.draggingText&&A.doc.sel.contains(D)>-1)return A.state.draggingText(h),void setTimeout(function(){return A.display.input.focus()},20);try{var Se=h.dataTransfer.getData("Text");if(Se){var De;if(A.state.draggingText&&!A.state.draggingText.copy&&(De=A.listSelections()),dO(A.doc,a0(D,D)),De)for(var Ue=0;Ue<De.length;++Ue)h3(A.doc,"",De[Ue].anchor,De[Ue].head,"drag");A.replaceSelection(Se,"around","paste"),A.display.input.focus()}}catch{}}}}function k7t(h,A){if(a&&(!h.state.draggingText||+new Date-sDe<100))An(A);else if(!qt(h,A)&&!kf(h.display,A)&&(A.dataTransfer.setData("Text",h.getSelection()),A.dataTransfer.effectAllowed="copyMove",A.dataTransfer.setDragImage&&!p)){var D=B("img",null,null,"position: fixed; left: 0; top: 0;");D.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(D.width=D.height=1,h.display.wrapper.appendChild(D),D._top=D.offsetTop),A.dataTransfer.setDragImage(D,0,0),f&&D.parentNode.removeChild(D)}}function D7t(h,A){var D=sm(h,A);if(D){var S=document.createDocumentFragment();FX(h,D,S),h.display.dragCursor||(h.display.dragCursor=B("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),h.display.lineSpace.insertBefore(h.display.dragCursor,h.display.cursorDiv)),N(h.display.dragCursor,S)}}function uDe(h){h.display.dragCursor&&(h.display.lineSpace.removeChild(h.display.dragCursor),h.display.dragCursor=null)}function cDe(h){if(document.getElementsByClassName){for(var A=document.getElementsByClassName("CodeMirror"),D=[],S=0;S<A.length;S++){var R=A[S].CodeMirror;R&&D.push(R)}D.length&&D[0].operation(function(){for(var j=0;j<D.length;j++)h(D[j])})}}var dDe=!1;function O7t(){dDe||(T7t(),dDe=!0)}function T7t(){var h;Ie(window,"resize",function(){h==null&&(h=setTimeout(function(){h=null,cDe(M7t)},100))}),Ie(window,"blur",function(){return cDe(s3)})}function M7t(h){var A=h.display;A.cachedCharWidth=A.cachedTextHeight=A.cachedPaddingH=null,A.scrollbarsClipped=!1,h.setSize()}for(var c0={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},vw=0;vw<10;vw++)c0[vw+48]=c0[vw+96]=String(vw);for(var hO=65;hO<=90;hO++)c0[hO]=String.fromCharCode(hO);for(var mw=1;mw<=12;mw++)c0[mw+111]=c0[mw+63235]="F"+mw;var Of={};function N7t(h){var A=h.split(/-(?!$)/);h=A[A.length-1];for(var D,S,R,j,q=0;q<A.length-1;q++){var Q=A[q];if(/^(cmd|meta|m)$/i.test(Q))j=!0;else if(/^a(lt)?$/i.test(Q))D=!0;else if(/^(c|ctrl|control)$/i.test(Q))S=!0;else{if(!/^s(hift)?$/i.test(Q))throw new Error("Unrecognized modifier name: "+Q);R=!0}}return D&&(h="Alt-"+h),S&&(h="Ctrl-"+h),j&&(h="Cmd-"+h),R&&(h="Shift-"+h),h}function F7t(h){var A={};for(var D in h)if(h.hasOwnProperty(D)){var S=h[D];if(/^(name|fallthrough|(de|at)tach)$/.test(D))continue;if(S=="..."){delete h[D];continue}for(var R=_e(D.split(" "),N7t),j=0;j<R.length;j++){var q=void 0,Q=void 0;j==R.length-1?(Q=R.join(" "),q=S):(Q=R.slice(0,j+1).join(" "),q="...");var re=A[Q];if(re){if(re!=q)throw new Error("Inconsistent bindings for "+Q)}else A[Q]=q}delete h[D]}for(var ae in A)h[ae]=A[ae];return h}function m3(h,A,D,S){var R=(A=vO(A)).call?A.call(h,S):A[h];if(R===!1)return"nothing";if(R==="...")return"multi";if(R!=null&&D(R))return"handled";if(A.fallthrough){if(Object.prototype.toString.call(A.fallthrough)!="[object Array]")return m3(h,A.fallthrough,D,S);for(var j=0;j<A.fallthrough.length;j++){var q=m3(h,A.fallthrough[j],D,S);if(q)return q}}}function fDe(h){var A=typeof h=="string"?h:c0[h.keyCode];return A=="Ctrl"||A=="Alt"||A=="Shift"||A=="Mod"}function pDe(h,A,D){var S=h;return A.altKey&&S!="Alt"&&(h="Alt-"+h),(C?A.metaKey:A.ctrlKey)&&S!="Ctrl"&&(h="Ctrl-"+h),(C?A.ctrlKey:A.metaKey)&&S!="Mod"&&(h="Cmd-"+h),!D&&A.shiftKey&&S!="Shift"&&(h="Shift-"+h),h}function hDe(h,A){if(f&&h.keyCode==34&&h.char)return!1;var D=c0[h.keyCode];return D!=null&&!h.altGraphKey&&(h.keyCode==3&&h.code&&(D=h.code),pDe(D,h,A))}function vO(h){return typeof h=="string"?Of[h]:h}function g3(h,A){for(var D=h.doc.sel.ranges,S=[],R=0;R<D.length;R++){for(var j=A(D[R]);S.length&&Ze(j.from,Ce(S).to)<=0;){var q=S.pop();if(Ze(q.from,j.from)<0){j.from=q.from;break}}S.push(j)}Xl(h,function(){for(var Q=S.length-1;Q>=0;Q--)h3(h.doc,"",S[Q].from,S[Q].to,"+delete");u3(h)})}function XX(h,A,D){var S=it(h.text,A+D,D);return S<0||S>h.text.length?null:S}function QX(h,A,D){var S=XX(h,A.ch,D);return S==null?null:new Ee(A.line,S,D<0?"after":"before")}function JX(h,A,D,S,R){if(h){A.doc.direction=="rtl"&&(R=-R);var j=me(D,A.doc.direction);if(j){var q,Q=R<0?Ce(j):j[0],re=R<0==(Q.level==1)?"after":"before";if(Q.level>0||A.doc.direction=="rtl"){var ae=i3(A,D);q=R<0?D.text.length-1:0;var Se=Ad(A,ae,q).top;q=dt(function(De){return Ad(A,ae,De).top==Se},R<0==(Q.level==1)?Q.from:Q.to-1,q),re=="before"&&(q=XX(D,q,1))}else q=R<0?Q.to:Q.from;return new Ee(S,q,re)}}return new Ee(S,R<0?D.text.length:0,R<0?"before":"after")}function R7t(h,A,D,S){var R=me(A,h.doc.direction);if(!R)return QX(A,D,S);D.ch>=A.text.length?(D.ch=A.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var j=we(R,D.ch,D.sticky),q=R[j];if(h.doc.direction=="ltr"&&q.level%2==0&&(S>0?q.to>D.ch:q.from<D.ch))return QX(A,D,S);var Q,re=function(Yt,Jt){return XX(A,Yt instanceof Ee?Yt.ch:Yt,Jt)},ae=function(Yt){return h.options.lineWrapping?(Q=Q||i3(h,A),bke(h,A,Q,Yt)):{begin:0,end:A.text.length}},Se=ae(D.sticky=="before"?re(D,-1):D.ch);if(h.doc.direction=="rtl"||q.level==1){var De=q.level==1==S<0,Ue=re(D,De?1:-1);if(Ue!=null&&(De?Ue<=q.to&&Ue<=Se.end:Ue>=q.from&&Ue>=Se.begin)){var Ge=De?"before":"after";return new Ee(D.line,Ue,Ge)}}var at=function(Yt,Jt,It){for(var tn=function(Zr,Ql){return Ql?new Ee(D.line,re(Zr,1),"before"):new Ee(D.line,Zr,"after")};Yt>=0&&Yt<R.length;Yt+=Jt){var en=R[Yt],fn=Jt>0==(en.level!=1),ro=fn?It.begin:re(It.end,-1);if(en.from<=ro&&ro<en.to||(ro=fn?en.from:re(en.to,-1),It.begin<=ro&&ro<It.end))return tn(ro,fn)}},yt=at(j+S,S,Se);if(yt)return yt;var Ot=S>0?Se.end:re(Se.begin,-1);return Ot==null||S>0&&Ot==A.text.length||!(yt=at(S>0?0:R.length-1,S,ae(Ot)))?null:yt}Of.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Of.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Of.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Of.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Of.default=w?Of.macDefault:Of.pcDefault;var gw={selectAll:Jke,singleSelection:function(h){return h.setSelection(h.getCursor("anchor"),h.getCursor("head"),J)},killLine:function(h){return g3(h,function(A){if(A.empty()){var D=Ct(h.doc,A.head.line).text.length;return A.head.ch==D&&A.head.line<h.lastLine()?{from:A.head,to:Ee(A.head.line+1,0)}:{from:A.head,to:Ee(A.head.line,D)}}return{from:A.from(),to:A.to()}})},deleteLine:function(h){return g3(h,function(A){return{from:Ee(A.from().line,0),to:gn(h.doc,Ee(A.to().line+1,0))}})},delLineLeft:function(h){return g3(h,function(A){return{from:Ee(A.from().line,0),to:A.from()}})},delWrappedLineLeft:function(h){return g3(h,function(A){var D=h.charCoords(A.head,"div").top+5;return{from:h.coordsChar({left:0,top:D},"div"),to:A.from()}})},delWrappedLineRight:function(h){return g3(h,function(A){var D=h.charCoords(A.head,"div").top+5,S=h.coordsChar({left:h.display.lineDiv.offsetWidth+100,top:D},"div");return{from:A.from(),to:S}})},undo:function(h){return h.undo()},redo:function(h){return h.redo()},undoSelection:function(h){return h.undoSelection()},redoSelection:function(h){return h.redoSelection()},goDocStart:function(h){return h.extendSelection(Ee(h.firstLine(),0))},goDocEnd:function(h){return h.extendSelection(Ee(h.lastLine()))},goLineStart:function(h){return h.extendSelectionsBy(function(A){return vDe(h,A.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(h){return h.extendSelectionsBy(function(A){return mDe(h,A.head)},{origin:"+move",bias:1})},goLineEnd:function(h){return h.extendSelectionsBy(function(A){return I7t(h,A.head.line)},{origin:"+move",bias:-1})},goLineRight:function(h){return h.extendSelectionsBy(function(A){var D=h.cursorCoords(A.head,"div").top+5;return h.coordsChar({left:h.display.lineDiv.offsetWidth+100,top:D},"div")},ye)},goLineLeft:function(h){return h.extendSelectionsBy(function(A){var D=h.cursorCoords(A.head,"div").top+5;return h.coordsChar({left:0,top:D},"div")},ye)},goLineLeftSmart:function(h){return h.extendSelectionsBy(function(A){var D=h.cursorCoords(A.head,"div").top+5,S=h.coordsChar({left:0,top:D},"div");return S.ch<h.getLine(S.line).search(/\S/)?mDe(h,A.head):S},ye)},goLineUp:function(h){return h.moveV(-1,"line")},goLineDown:function(h){return h.moveV(1,"line")},goPageUp:function(h){return h.moveV(-1,"page")},goPageDown:function(h){return h.moveV(1,"page")},goCharLeft:function(h){return h.moveH(-1,"char")},goCharRight:function(h){return h.moveH(1,"char")},goColumnLeft:function(h){return h.moveH(-1,"column")},goColumnRight:function(h){return h.moveH(1,"column")},goWordLeft:function(h){return h.moveH(-1,"word")},goGroupRight:function(h){return h.moveH(1,"group")},goGroupLeft:function(h){return h.moveH(-1,"group")},goWordRight:function(h){return h.moveH(1,"word")},delCharBefore:function(h){return h.deleteH(-1,"codepoint")},delCharAfter:function(h){return h.deleteH(1,"char")},delWordBefore:function(h){return h.deleteH(-1,"word")},delWordAfter:function(h){return h.deleteH(1,"word")},delGroupBefore:function(h){return h.deleteH(-1,"group")},delGroupAfter:function(h){return h.deleteH(1,"group")},indentAuto:function(h){return h.indentSelection("smart")},indentMore:function(h){return h.indentSelection("add")},indentLess:function(h){return h.indentSelection("subtract")},insertTab:function(h){return h.replaceSelection(" ")},insertSoftTab:function(h){for(var A=[],D=h.listSelections(),S=h.options.tabSize,R=0;R<D.length;R++){var j=D[R].from(),q=X(h.getLine(j.line),j.ch,S);A.push(Ae(S-q%S))}h.replaceSelections(A)},defaultTab:function(h){h.somethingSelected()?h.indentSelection("add"):h.execCommand("insertTab")},transposeChars:function(h){return Xl(h,function(){for(var A=h.listSelections(),D=[],S=0;S<A.length;S++)if(A[S].empty()){var R=A[S].head,j=Ct(h.doc,R.line).text;if(j){if(R.ch==j.length&&(R=new Ee(R.line,R.ch-1)),R.ch>0)R=new Ee(R.line,R.ch+1),h.replaceRange(j.charAt(R.ch-1)+j.charAt(R.ch-2),Ee(R.line,R.ch-2),R,"+transpose");else if(R.line>h.doc.first){var q=Ct(h.doc,R.line-1).text;q&&(R=new Ee(R.line,1),h.replaceRange(j.charAt(0)+h.doc.lineSeparator()+q.charAt(q.length-1),Ee(R.line-1,q.length-1),R,"+transpose"))}}D.push(new Vr(R,R))}h.setSelections(D)})},newlineAndIndent:function(h){return Xl(h,function(){for(var A=h.listSelections(),D=A.length-1;D>=0;D--)h.replaceRange(h.doc.lineSeparator(),A[D].anchor,A[D].head,"+input");A=h.listSelections();for(var S=0;S<A.length;S++)h.indentLine(A[S].from().line,null,!0);u3(h)})},openLine:function(h){return h.replaceSelection(` |
|
65 |
`,"start")},toggleOverwrite:function(h){return h.toggleOverwrite()}};function vDe(h,A){var D=Ct(h.doc,A),S=uc(D);return S!=D&&(A=cr(S)),JX(!0,h,S,A,1)}function I7t(h,A){var D=Ct(h.doc,A),S=ywt(D);return S!=D&&(A=cr(S)),JX(!0,h,D,A,-1)}function mDe(h,A){var D=vDe(h,A.line),S=Ct(h.doc,D.line),R=me(S,h.doc.direction);if(!R||R[0].level==0){var j=Math.max(D.ch,S.text.search(/\S/)),q=A.line==D.line&&A.ch<=j&&A.ch;return Ee(D.line,q?0:j,D.sticky)}return D}function mO(h,A,D){if(typeof A=="string"&&!(A=gw[A]))return!1;h.display.input.ensurePolled();var S=h.display.shift,R=!1;try{h.isReadOnly()&&(h.state.suppressEdits=!0),D&&(h.display.shift=!1),R=A(h)!=le}finally{h.display.shift=S,h.state.suppressEdits=!1}return R}function B7t(h,A,D){for(var S=0;S<h.state.keyMaps.length;S++){var R=m3(A,h.state.keyMaps[S],D,h);if(R)return R}return h.options.extraKeys&&m3(A,h.options.extraKeys,D,h)||m3(A,h.options.keyMap,D,h)}var L7t=new te;function yw(h,A,D,S){var R=h.state.keySeq;if(R){if(fDe(A))return"handled";if(/\'$/.test(A)?h.state.keySeq=null:L7t.set(50,function(){h.state.keySeq==R&&(h.state.keySeq=null,h.display.input.reset())}),gDe(h,R+" "+A,D,S))return!0}return gDe(h,A,D,S)}function gDe(h,A,D,S){var R=B7t(h,A,S);return R=="multi"&&(h.state.keySeq=A),R=="handled"&&Vi(h,"keyHandled",h,A,D),(R=="handled"||R=="multi")&&(zn(D),RX(h)),!!R}function yDe(h,A){var D=hDe(A,!0);return!!D&&(A.shiftKey&&!h.state.keySeq?yw(h,"Shift-"+D,A,function(S){return mO(h,S,!0)})||yw(h,D,A,function(S){if(typeof S=="string"?/^go[A-Z]/.test(S):S.motion)return mO(h,S)}):yw(h,D,A,function(S){return mO(h,S)}))}function P7t(h,A,D){return yw(h,"'"+D+"'",A,function(S){return mO(h,S,!0)})}var ZX=null;function bDe(h){var A=this;if(!(h.target&&h.target!=A.display.input.getField()||(A.curOp.focus=P(z(A)),qt(A,h)))){a&&l<11&&h.keyCode==27&&(h.returnValue=!1);var D=h.keyCode;A.display.shift=D==16||h.shiftKey;var S=yDe(A,h);f&&(ZX=S?D:null,!S&&D==88&&!sa&&(w?h.metaKey:h.ctrlKey)&&A.replaceSelection("",null,"cut")),n&&!w&&!S&&D==46&&h.shiftKey&&!h.ctrlKey&&document.execCommand&&document.execCommand("cut"),D==18&&!/\bCodeMirror-crosshair\b/.test(A.display.lineDiv.className)&&j7t(A)}}function j7t(h){var A=h.display.lineDiv;function D(S){(S.keyCode==18||!S.altKey)&&(O(A,"CodeMirror-crosshair"),gt(document,"keyup",D),gt(document,"mouseover",D))}H(A,"CodeMirror-crosshair"),Ie(document,"keyup",D),Ie(document,"mouseover",D)}function ADe(h){h.keyCode==16&&(this.doc.sel.shift=!1),qt(this,h)}function wDe(h){var A=this;if(!(h.target&&h.target!=A.display.input.getField()||kf(A.display,h)||qt(A,h)||h.ctrlKey&&!h.altKey||w&&h.metaKey)){var D=h.keyCode,S=h.charCode;if(f&&D==ZX)return ZX=null,void zn(h);if(!f||h.which&&!(h.which<10)||!yDe(A,h)){var R=String.fromCharCode(S??D);R!="\b"&&(P7t(A,h,R)||A.display.input.onKeyPress(h))}}}var bw,Aw,V7t=400,eQ=function(h,A,D){this.time=h,this.pos=A,this.button=D};function z7t(h,A){var D=+new Date;return Aw&&Aw.compare(D,h,A)?(bw=Aw=null,"triple"):bw&&bw.compare(D,h,A)?(Aw=new eQ(D,h,A),bw=null,"double"):(bw=new eQ(D,h,A),Aw=null,"single")}function xDe(h){var A=this,D=A.display;if(!(qt(A,h)||D.activeTouch&&D.input.supportsTouch())){if(D.input.ensurePolled(),D.shift=h.shiftKey,kf(D,h))return void(s||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100)));if(!tQ(A,h)){var S=sm(A,h),R=po(h),j=S?z7t(S,R):"single";$(A).focus(),R==1&&A.state.selectingText&&A.state.selectingText(h),(!S||!H7t(A,R,S,j,h))&&(R==1?S?U7t(A,S,j,h):_n(h)==D.scroller&&zn(h):R==2?(S&&cO(A.doc,S),setTimeout(function(){return D.input.focus()},20)):R==3&&(T?A.display.input.onContextMenu(h):IX(A)))}}}function H7t(h,A,D,S,R){var j="Click";return S=="double"?j="Double"+j:S=="triple"&&(j="Triple"+j),yw(h,pDe(j=(A==1?"Left":A==2?"Middle":"Right")+j,R),R,function(q){if(typeof q=="string"&&(q=gw[q]),!q)return!1;var Q=!1;try{h.isReadOnly()&&(h.state.suppressEdits=!0),Q=q(h,D)!=le}finally{h.state.suppressEdits=!1}return Q})}function $7t(h,A,D){var S=h.getOption("configureMouse"),R=S?S(h,A,D):{};if(R.unit==null){var j=x?D.shiftKey&&D.metaKey:D.altKey;R.unit=j?"rectangle":A=="single"?"char":A=="double"?"word":"line"}return(R.extend==null||h.doc.extend)&&(R.extend=h.doc.extend||D.shiftKey),R.addNew==null&&(R.addNew=w?D.metaKey:D.ctrlKey),R.moveOnDrag==null&&(R.moveOnDrag=!(w?D.altKey:D.ctrlKey)),R}function U7t(h,A,D,S){a?setTimeout(W(_ke,h),0):h.curOp.focus=P(z(h));var R,j=$7t(h,D,S),q=h.doc.sel;h.options.dragDrop&&Jr&&!h.isReadOnly()&&D=="single"&&(R=q.contains(A))>-1&&(Ze((R=q.ranges[R]).from(),A)<0||A.xRel>0)&&(Ze(R.to(),A)>0||A.xRel<0)?W7t(h,S,A,j):G7t(h,S,A,j)}function W7t(h,A,D,S){var R=h.display,j=!1,q=zi(h,function(ae){s&&(R.scroller.draggable=!1),h.state.draggingText=!1,h.state.delayingBlurEvent&&(h.hasFocus()?h.state.delayingBlurEvent=!1:IX(h)),gt(R.wrapper.ownerDocument,"mouseup",q),gt(R.wrapper.ownerDocument,"mousemove",Q),gt(R.scroller,"dragstart",re),gt(R.scroller,"drop",q),j||(zn(ae),S.addNew||cO(h.doc,D,null,null,S.extend),s&&!p||a&&l==9?setTimeout(function(){R.wrapper.ownerDocument.body.focus({preventScroll:!0}),R.input.focus()},20):R.input.focus())}),Q=function(ae){j=j||Math.abs(A.clientX-ae.clientX)+Math.abs(A.clientY-ae.clientY)>=10},re=function(){return j=!0};s&&(R.scroller.draggable=!0),h.state.draggingText=q,q.copy=!S.moveOnDrag,Ie(R.wrapper.ownerDocument,"mouseup",q),Ie(R.wrapper.ownerDocument,"mousemove",Q),Ie(R.scroller,"dragstart",re),Ie(R.scroller,"drop",q),h.state.delayingBlurEvent=!0,setTimeout(function(){return R.input.focus()},20),R.scroller.dragDrop&&R.scroller.dragDrop()}function _De(h,A,D){if(D=="char")return new Vr(A,A);if(D=="word")return h.findWordAt(A);if(D=="line")return new Vr(Ee(A.line,0),gn(h.doc,Ee(A.line+1,0)));var S=D(h,A);return new Vr(S.from,S.to)}function G7t(h,A,D,S){a&&IX(h);var R=h.display,j=h.doc;zn(A);var q,Q,re=j.sel,ae=re.ranges;if(S.addNew&&!S.extend?(Q=j.sel.contains(D),q=Q>-1?ae[Q]:new Vr(D,D)):(q=j.sel.primary(),Q=j.sel.primIndex),S.unit=="rectangle")S.addNew||(q=new Vr(D,D)),D=sm(h,A,!0,!0),Q=-1;else{var Se=_De(h,D,S.unit);q=S.extend?KX(q,Se.anchor,Se.head,S.extend):Se}S.addNew?Q==-1?(Q=ae.length,Ea(j,dc(h,ae.concat([q]),Q),{scroll:!1,origin:"*mouse"})):ae.length>1&&ae[Q].empty()&&S.unit=="char"&&!S.extend?(Ea(j,dc(h,ae.slice(0,Q).concat(ae.slice(Q+1)),0),{scroll:!1,origin:"*mouse"}),re=j.sel):YX(j,Q,q,Z):(Q=0,Ea(j,new js([q],0),Z),re=j.sel);var De=D;function Ue(It){if(Ze(De,It)!=0)if(De=It,S.unit=="rectangle"){for(var tn=[],en=h.options.tabSize,fn=X(Ct(j,D.line).text,D.ch,en),ro=X(Ct(j,It.line).text,It.ch,en),Zr=Math.min(fn,ro),Ql=Math.max(fn,ro),ho=Math.min(D.line,It.line),Cu=Math.min(h.lastLine(),Math.max(D.line,It.line));ho<=Cu;ho++){var Jl=Ct(j,ho).text,Bo=be(Jl,Zr,en);Zr==Ql?tn.push(new Vr(Ee(ho,Bo),Ee(ho,Bo))):Jl.length>Bo&&tn.push(new Vr(Ee(ho,Bo),Ee(ho,be(Jl,Ql,en))))}tn.length||tn.push(new Vr(D,D)),Ea(j,dc(h,re.ranges.slice(0,Q).concat(tn),Q),{origin:"*mouse",scroll:!1}),h.scrollIntoView(It)}else{var ml,Ua=q,si=_De(h,It,S.unit),Ko=Ua.anchor;Ze(si.anchor,Ko)>0?(ml=si.head,Ko=Pn(Ua.from(),si.anchor)):(ml=si.anchor,Ko=on(Ua.to(),si.head));var ui=re.ranges.slice(0);ui[Q]=q7t(h,new Vr(gn(j,Ko),ml)),Ea(j,dc(h,ui,Q),Z)}}var Ge=R.wrapper.getBoundingClientRect(),at=0;function yt(It){var tn=++at,en=sm(h,It,!0,S.unit=="rectangle");if(en)if(Ze(en,De)!=0){h.curOp.focus=P(z(h)),Ue(en);var fn=oO(R,j);(en.line>=fn.to||en.line<fn.from)&&setTimeout(zi(h,function(){at==tn&&yt(It)}),150)}else{var ro=It.clientY<Ge.top?-20:It.clientY>Ge.bottom?20:0;ro&&setTimeout(zi(h,function(){at==tn&&(R.scroller.scrollTop+=ro,yt(It))}),50)}}function Ot(It){h.state.selectingText=!1,at=1/0,It&&(zn(It),R.input.focus()),gt(R.wrapper.ownerDocument,"mousemove",Yt),gt(R.wrapper.ownerDocument,"mouseup",Jt),j.history.lastSelOrigin=null}var Yt=zi(h,function(It){It.buttons!==0&&po(It)?yt(It):Ot(It)}),Jt=zi(h,Ot);h.state.selectingText=Jt,Ie(R.wrapper.ownerDocument,"mousemove",Yt),Ie(R.wrapper.ownerDocument,"mouseup",Jt)}function q7t(h,A){var D=A.anchor,S=A.head,R=Ct(h.doc,D.line);if(Ze(D,S)==0&&D.sticky==S.sticky)return A;var j=me(R);if(!j)return A;var q=we(j,D.ch,D.sticky),Q=j[q];if(Q.from!=D.ch&&Q.to!=D.ch)return A;var re,ae=q+(Q.from==D.ch==(Q.level!=1)?0:1);if(ae==0||ae==j.length)return A;if(S.line!=D.line)re=(S.line-D.line)*(h.doc.direction=="ltr"?1:-1)>0;else{var Se=we(j,S.ch,S.sticky),De=Se-q||(S.ch-D.ch)*(Q.level==1?-1:1);re=Se==ae-1||Se==ae?De<0:De>0}var Ue=j[ae+(re?-1:0)],Ge=re==(Ue.level==1),at=Ge?Ue.from:Ue.to,yt=Ge?"after":"before";return D.ch==at&&D.sticky==yt?A:new Vr(new Ee(D.line,at,yt),S)}function EDe(h,A,D,S){var R,j;if(A.touches)R=A.touches[0].clientX,j=A.touches[0].clientY;else try{R=A.clientX,j=A.clientY}catch{return!1}if(R>=Math.floor(h.display.gutters.getBoundingClientRect().right))return!1;S&&zn(A);var q=h.display,Q=q.lineDiv.getBoundingClientRect();if(j>Q.bottom||!Zt(h,D))return kt(A);j-=Q.top-q.viewOffset;for(var re=0;re<h.display.gutterSpecs.length;++re){var ae=q.gutters.childNodes[re];if(ae&&ae.getBoundingClientRect().right>=R)return vt(h,D,h,Ha(h.doc,j),h.display.gutterSpecs[re].className,A),kt(A)}}function tQ(h,A){return EDe(h,A,"gutterClick",!0)}function CDe(h,A){kf(h.display,A)||K7t(h,A)||qt(h,A,"contextmenu")||T||h.display.input.onContextMenu(A)}function K7t(h,A){return!!Zt(h,"gutterContextMenu")&&EDe(h,A,"gutterContextMenu",!1)}function SDe(h){h.display.wrapper.className=h.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+h.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ew(h)}eQ.prototype.compare=function(h,A,D){return this.time+V7t>h&&Ze(A,this.pos)==0&&D==this.button};var y3={toString:function(){return"CodeMirror.Init"}},kDe={},gO={};function Y7t(h){var A=h.optionHandlers;function D(S,R,j,q){h.defaults[S]=R,j&&(A[S]=q?function(Q,re,ae){ae!=y3&&j(Q,re,ae)}:j)}h.defineOption=D,h.Init=y3,D("value","",function(S,R){return S.setValue(R)},!0),D("mode",null,function(S,R){S.doc.modeOption=R,WX(S)},!0),D("indentUnit",2,WX,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(S){sw(S),ew(S),hl(S)},!0),D("lineSeparator",null,function(S,R){if(S.doc.lineSep=R,R){var j=[],q=S.doc.first;S.doc.iter(function(re){for(var ae=0;;){var Se=re.text.indexOf(R,ae);if(Se==-1)break;ae=Se+R.length,j.push(Ee(q,Se))}q++});for(var Q=j.length-1;Q>=0;Q--)h3(S.doc,R,j[Q],Ee(j[Q].line,j[Q].ch+R.length))}}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(S,R,j){S.state.specialChars=new RegExp(R.source+(R.test(" ")?"":"| "),"g"),j!=y3&&S.refresh()}),D("specialCharPlaceholder",Ewt,function(S){return S.refresh()},!0),D("electricChars",!0),D("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(S,R){return S.getInputField().spellcheck=R},!0),D("autocorrect",!1,function(S,R){return S.getInputField().autocorrect=R},!0),D("autocapitalize",!1,function(S,R){return S.getInputField().autocapitalize=R},!0),D("rtlMoveVisually",!_),D("wholeLineUpdateBefore",!0),D("theme","default",function(S){SDe(S),lw(S)},!0),D("keyMap","default",function(S,R,j){var q=vO(R),Q=j!=y3&&vO(j);Q&&Q.detach&&Q.detach(S,q),q.attach&&q.attach(S,Q||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Q7t,!0),D("gutters",[],function(S,R){S.display.gutterSpecs=$X(R,S.options.lineNumbers),lw(S)},!0),D("fixedGutter",!0,function(S,R){S.display.gutters.style.left=R?MX(S.display)+"px":"0",S.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(S){return c3(S)},!0),D("scrollbarStyle","native",function(S){Oke(S),c3(S),S.display.scrollbars.setScrollTop(S.doc.scrollTop),S.display.scrollbars.setScrollLeft(S.doc.scrollLeft)},!0),D("lineNumbers",!1,function(S,R){S.display.gutterSpecs=$X(S.options.gutters,R),lw(S)},!0),D("firstLineNumber",1,lw,!0),D("lineNumberFormatter",function(S){return S},lw,!0),D("showCursorWhenSelecting",!1,tw,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(S,R){R=="nocursor"&&(s3(S),S.display.input.blur()),S.display.input.readOnlyChanged(R)}),D("screenReaderLabel",null,function(S,R){R=R===""?null:R,S.display.input.screenReaderLabelChanged(R)}),D("disableInput",!1,function(S,R){R||S.display.input.reset()},!0),D("dragDrop",!0,X7t),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,tw,!0),D("singleCursorHeightPerLine",!0,tw,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,sw,!0),D("addModeClass",!1,sw,!0),D("pollInterval",100),D("undoDepth",200,function(S,R){return S.doc.history.undoDepth=R}),D("historyEventDelay",1250),D("viewportMargin",10,function(S){return S.refresh()},!0),D("maxHighlightLength",1e4,sw,!0),D("moveInputWithCursor",!0,function(S,R){R||S.display.input.resetPosition()}),D("tabindex",null,function(S,R){return S.display.input.getField().tabIndex=R||""}),D("autofocus",null),D("direction","ltr",function(S,R){return S.doc.setDirection(R)},!0),D("phrases",null)}function X7t(h,A,D){if(!A!=!(D&&D!=y3)){var S=h.display.dragFunctions,R=A?Ie:gt;R(h.display.scroller,"dragstart",S.start),R(h.display.scroller,"dragenter",S.enter),R(h.display.scroller,"dragover",S.over),R(h.display.scroller,"dragleave",S.leave),R(h.display.scroller,"drop",S.drop)}}function Q7t(h){h.options.lineWrapping?(H(h.display.wrapper,"CodeMirror-wrap"),h.display.sizer.style.minWidth="",h.display.sizerWidth=null):(O(h.display.wrapper,"CodeMirror-wrap"),wX(h)),NX(h),hl(h),ew(h),setTimeout(function(){return c3(h)},100)}function wo(h,A){var D=this;if(!(this instanceof wo))return new wo(h,A);this.options=A=A?K(A):{},K(kDe,A,!1);var S=A.value;typeof S=="string"?S=new vl(S,A.mode,null,A.lineSeparator,A.direction):A.mode&&(S.modeOption=A.mode),this.doc=S;var R=new wo.inputStyles[A.inputStyle](this),j=this.display=new c7t(h,S,R,A);for(var q in j.wrapper.CodeMirror=this,SDe(this),A.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Oke(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new te,keySeq:null,specialChars:null},A.autofocus&&!y&&j.input.focus(),a&&l<11&&setTimeout(function(){return D.display.input.reset(!0)},20),J7t(this),O7t(),fm(this),this.curOp.forceUpdate=!0,jke(this,S),A.autofocus&&!y||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&BX(D)},20):s3(this),gO)gO.hasOwnProperty(q)&&gO[q](this,A[q],y3);Nke(this),A.finishInit&&A.finishInit(this);for(var Q=0;Q<nQ.length;++Q)nQ[Q](this);pm(this),s&&A.lineWrapping&&getComputedStyle(j.lineDiv).textRendering=="optimizelegibility"&&(j.lineDiv.style.textRendering="auto")}function J7t(h){var A=h.display;Ie(A.scroller,"mousedown",zi(h,xDe)),Ie(A.scroller,"dblclick",a&&l<11?zi(h,function(re){if(!qt(h,re)){var ae=sm(h,re);if(ae&&!tQ(h,re)&&!kf(h.display,re)){zn(re);var Se=h.findWordAt(ae);cO(h.doc,Se.anchor,Se.head)}}}):function(re){return qt(h,re)||zn(re)}),Ie(A.scroller,"contextmenu",function(re){return CDe(h,re)}),Ie(A.input.getField(),"contextmenu",function(re){A.scroller.contains(re.target)||CDe(h,re)});var D,S={end:0};function R(){A.activeTouch&&(D=setTimeout(function(){return A.activeTouch=null},1e3),(S=A.activeTouch).end=+new Date)}function j(re){if(re.touches.length!=1)return!1;var ae=re.touches[0];return ae.radiusX<=1&&ae.radiusY<=1}function q(re,ae){if(ae.left==null)return!0;var Se=ae.left-re.left,De=ae.top-re.top;return Se*Se+De*De>400}Ie(A.scroller,"touchstart",function(re){if(!qt(h,re)&&!j(re)&&!tQ(h,re)){A.input.ensurePolled(),clearTimeout(D);var ae=+new Date;A.activeTouch={start:ae,moved:!1,prev:ae-S.end<=300?S:null},re.touches.length==1&&(A.activeTouch.left=re.touches[0].pageX,A.activeTouch.top=re.touches[0].pageY)}}),Ie(A.scroller,"touchmove",function(){A.activeTouch&&(A.activeTouch.moved=!0)}),Ie(A.scroller,"touchend",function(re){var ae=A.activeTouch;if(ae&&!kf(A,re)&&ae.left!=null&&!ae.moved&&new Date-ae.start<300){var Se,De=h.coordsChar(A.activeTouch,"page");Se=!ae.prev||q(ae,ae.prev)?new Vr(De,De):!ae.prev.prev||q(ae,ae.prev.prev)?h.findWordAt(De):new Vr(Ee(De.line,0),gn(h.doc,Ee(De.line+1,0))),h.setSelection(Se.anchor,Se.head),h.focus(),zn(re)}R()}),Ie(A.scroller,"touchcancel",R),Ie(A.scroller,"scroll",function(){A.scroller.clientHeight&&(rw(h,A.scroller.scrollTop),cm(h,A.scroller.scrollLeft,!0),vt(h,"scroll",h))}),Ie(A.scroller,"mousewheel",function(re){return Ike(h,re)}),Ie(A.scroller,"DOMMouseScroll",function(re){return Ike(h,re)}),Ie(A.wrapper,"scroll",function(){return A.wrapper.scrollTop=A.wrapper.scrollLeft=0}),A.dragFunctions={enter:function(re){qt(h,re)||An(re)},over:function(re){qt(h,re)||(D7t(h,re),An(re))},start:function(re){return k7t(h,re)},drop:zi(h,S7t),leave:function(re){qt(h,re)||uDe(h)}};var Q=A.input.getField();Ie(Q,"keyup",function(re){return ADe.call(h,re)}),Ie(Q,"keydown",zi(h,bDe)),Ie(Q,"keypress",zi(h,wDe)),Ie(Q,"focus",function(re){return BX(h,re)}),Ie(Q,"blur",function(re){return s3(h,re)})}wo.defaults=kDe,wo.optionHandlers=gO;var nQ=[];function ww(h,A,D,S){var R,j=h.doc;D==null&&(D="add"),D=="smart"&&(j.mode.indent?R=yd(h,A).state:D="prev");var q=h.options.tabSize,Q=Ct(j,A),re=X(Q.text,null,q);Q.stateAfter&&(Q.stateAfter=null);var ae,Se=Q.text.match(/^\s*/)[0];if(S||/\S/.test(Q.text)){if(D=="smart"&&((ae=j.mode.indent(R,Q.text.slice(Se.length),Q.text))==le||ae>150)){if(!S)return;D="prev"}}else ae=0,D="not";D=="prev"?ae=A>j.first?X(Ct(j,A-1).text,null,q):0:D=="add"?ae=re+h.options.indentUnit:D=="subtract"?ae=re-h.options.indentUnit:typeof D=="number"&&(ae=re+D),ae=Math.max(0,ae);var De="",Ue=0;if(h.options.indentWithTabs)for(var Ge=Math.floor(ae/q);Ge;--Ge)Ue+=q,De+=" ";if(Ue<ae&&(De+=Ae(ae-Ue)),De!=Se)return h3(j,De,Ee(A,0),Ee(A,Se.length),"+input"),Q.stateAfter=null,!0;for(var at=0;at<j.sel.ranges.length;at++){var yt=j.sel.ranges[at];if(yt.head.line==A&&yt.head.ch<Se.length){var Ot=Ee(A,Se.length);YX(j,at,new Vr(Ot,Ot));break}}}wo.defineInitHook=function(h){return nQ.push(h)};var fc=null;function yO(h){fc=h}function rQ(h,A,D,S,R){var j=h.doc;h.display.shift=!1,S||(S=j.sel);var q=+new Date-200,Q=R=="paste"||h.state.pasteIncoming>q,re=Go(A),ae=null;if(Q&&S.ranges.length>1)if(fc&&fc.text.join(` |
|
66 |
`)==A){if(S.ranges.length%fc.text.length==0){ae=[];for(var Se=0;Se<fc.text.length;Se++)ae.push(j.splitLines(fc.text[Se]))}}else re.length==S.ranges.length&&h.options.pasteLinesPerSelection&&(ae=_e(re,function(Yt){return[Yt]}));for(var De=h.curOp.updateInput,Ue=S.ranges.length-1;Ue>=0;Ue--){var Ge=S.ranges[Ue],at=Ge.from(),yt=Ge.to();Ge.empty()&&(D&&D>0?at=Ee(at.line,at.ch-D):h.state.overwrite&&!Q?yt=Ee(yt.line,Math.min(Ct(j,yt.line).text.length,yt.ch+Ce(re).length)):Q&&fc&&fc.lineWise&&fc.text.join(` |
|
67 |
`)==re.join(` |
|
68 |
`)&&(at=yt=Ee(at.line,0)));var Ot={from:at,to:yt,text:ae?ae[Ue%ae.length]:re,origin:R||(Q?"paste":h.state.cutIncoming>q?"cut":"+input")};p3(h.doc,Ot),Vi(h,"inputRead",h,Ot)}A&&!Q&&ODe(h,A),u3(h),h.curOp.updateInput<2&&(h.curOp.updateInput=De),h.curOp.typing=!0,h.state.pasteIncoming=h.state.cutIncoming=-1}function DDe(h,A){var D=h.clipboardData&&h.clipboardData.getData("Text");if(D)return h.preventDefault(),!A.isReadOnly()&&!A.options.disableInput&&A.hasFocus()&&Xl(A,function(){return rQ(A,D,0,null,"paste")}),!0}function ODe(h,A){if(h.options.electricChars&&h.options.smartIndent)for(var D=h.doc.sel,S=D.ranges.length-1;S>=0;S--){var R=D.ranges[S];if(!(R.head.ch>100||S&&D.ranges[S-1].head.line==R.head.line)){var j=h.getModeAt(R.head),q=!1;if(j.electricChars){for(var Q=0;Q<j.electricChars.length;Q++)if(A.indexOf(j.electricChars.charAt(Q))>-1){q=ww(h,R.head.line,"smart");break}}else j.electricInput&&j.electricInput.test(Ct(h.doc,R.head.line).text.slice(0,R.head.ch))&&(q=ww(h,R.head.line,"smart"));q&&Vi(h,"electricInput",h,R.head.line)}}}function TDe(h){for(var A=[],D=[],S=0;S<h.doc.sel.ranges.length;S++){var R=h.doc.sel.ranges[S].head.line,j={anchor:Ee(R,0),head:Ee(R+1,0)};D.push(j),A.push(h.getRange(j.anchor,j.head))}return{text:A,ranges:D}}function MDe(h,A,D,S){h.setAttribute("autocorrect",D?"":"off"),h.setAttribute("autocapitalize",S?"":"off"),h.setAttribute("spellcheck",!!A)}function NDe(){var h=B("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),A=B("div",[h],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?h.style.width="1000px":h.setAttribute("wrap","off"),g&&(h.style.border="1px solid black"),MDe(h),A}function Z7t(h){var A=h.optionHandlers,D=h.helpers={};h.prototype={constructor:h,focus:function(){$(this).focus(),this.display.input.focus()},setOption:function(S,R){var j=this.options,q=j[S];j[S]==R&&S!="mode"||(j[S]=R,A.hasOwnProperty(S)&&zi(this,A[S])(this,R,q),vt(this,"optionChange",this,S))},getOption:function(S){return this.options[S]},getDoc:function(){return this.doc},addKeyMap:function(S,R){this.state.keyMaps[R?"push":"unshift"](vO(S))},removeKeyMap:function(S){for(var R=this.state.keyMaps,j=0;j<R.length;++j)if(R[j]==S||R[j].name==S)return R.splice(j,1),!0},addOverlay:$a(function(S,R){var j=S.token?S:h.getMode(this.options,S);if(j.startState)throw new Error("Overlays may not be stateful.");ke(this.state.overlays,{mode:j,modeSpec:S,opaque:R&&R.opaque,priority:R&&R.priority||0},function(q){return q.priority}),this.state.modeGen++,hl(this)}),removeOverlay:$a(function(S){for(var R=this.state.overlays,j=0;j<R.length;++j){var q=R[j].modeSpec;if(q==S||typeof S=="string"&&q.name==S)return R.splice(j,1),this.state.modeGen++,void hl(this)}}),indentLine:$a(function(S,R,j){typeof R!="string"&&typeof R!="number"&&(R=R==null?this.options.smartIndent?"smart":"prev":R?"add":"subtract"),pe(this.doc,S)&&ww(this,S,R,j)}),indentSelection:$a(function(S){for(var R=this.doc.sel.ranges,j=-1,q=0;q<R.length;q++){var Q=R[q];if(Q.empty())Q.head.line>j&&(ww(this,Q.head.line,S,!0),j=Q.head.line,q==this.doc.sel.primIndex&&u3(this));else{var re=Q.from(),ae=Q.to(),Se=Math.max(j,re.line);j=Math.min(this.lastLine(),ae.line-(ae.ch?0:1))+1;for(var De=Se;De<j;++De)ww(this,De,S);var Ue=this.doc.sel.ranges;re.ch==0&&R.length==Ue.length&&Ue[q].from().ch>0&&YX(this.doc,q,new Vr(re,Ue[q].to()),J)}}}),getTokenAt:function(S,R){return zSe(this,S,R)},getLineTokens:function(S,R){return zSe(this,Ee(S),R,!0)},getTokenTypeAt:function(S){S=gn(this.doc,S);var R,j=n3(this,Ct(this.doc,S.line)),q=0,Q=(j.length-1)/2,re=S.ch;if(re==0)R=j[2];else for(;;){var ae=q+Q>>1;if((ae?j[2*ae-1]:0)>=re)Q=ae;else{if(!(j[2*ae+1]<re)){R=j[2*ae+2];break}q=ae+1}}var Se=R?R.indexOf("overlay "):-1;return Se<0?R:Se==0?null:R.slice(0,Se-1)},getModeAt:function(S){var R=this.doc.mode;return R.innerMode?h.innerMode(R,this.getTokenAt(S).state).mode:R},getHelper:function(S,R){return this.getHelpers(S,R)[0]},getHelpers:function(S,R){var j=[];if(!D.hasOwnProperty(R))return j;var q=D[R],Q=this.getModeAt(S);if(typeof Q[R]=="string")q[Q[R]]&&j.push(q[Q[R]]);else if(Q[R])for(var re=0;re<Q[R].length;re++){var ae=q[Q[R][re]];ae&&j.push(ae)}else Q.helperType&&q[Q.helperType]?j.push(q[Q.helperType]):q[Q.name]&&j.push(q[Q.name]);for(var Se=0;Se<q._global.length;Se++){var De=q._global[Se];De.pred(Q,this)&&ne(j,De.val)==-1&&j.push(De.val)}return j},getStateAfter:function(S,R){var j=this.doc;return yd(this,(S=Mr(j,S??j.first+j.size-1))+1,R).state},cursorCoords:function(S,R){var j=this.doc.sel.primary();return cc(this,S==null?j.head:typeof S=="object"?gn(this.doc,S):S?j.from():j.to(),R||"page")},charCoords:function(S,R){return eO(this,gn(this.doc,S),R||"page")},coordsChar:function(S,R){return DX(this,(S=mke(this,S,R||"page")).left,S.top)},lineAtHeight:function(S,R){return S=mke(this,{top:S,left:0},R||"page").top,Ha(this.doc,S+this.display.viewOffset)},heightAtLine:function(S,R,j){var q,Q=!1;if(typeof S=="number"){var re=this.doc.first+this.doc.size-1;S<this.doc.first?S=this.doc.first:S>re&&(S=re,Q=!0),q=Ct(this.doc,S)}else q=S;return ZD(this,q,{top:0,left:0},R||"page",j||Q).top+(Q?this.doc.height-Sf(q):0)},defaultTextHeight:function(){return a3(this.display)},defaultCharWidth:function(){return l3(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(S,R,j,q,Q){var re=this.display,ae=(S=cc(this,gn(this.doc,S))).bottom,Se=S.left;if(R.style.position="absolute",R.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(R),re.sizer.appendChild(R),q=="over")ae=S.top;else if(q=="above"||q=="near"){var De=Math.max(re.wrapper.clientHeight,this.doc.height),Ue=Math.max(re.sizer.clientWidth,re.lineSpace.clientWidth);(q=="above"||S.bottom+R.offsetHeight>De)&&S.top>R.offsetHeight?ae=S.top-R.offsetHeight:S.bottom+R.offsetHeight<=De&&(ae=S.bottom),Se+R.offsetWidth>Ue&&(Se=Ue-R.offsetWidth)}R.style.top=ae+"px",R.style.left=R.style.right="",Q=="right"?(Se=re.sizer.clientWidth-R.offsetWidth,R.style.right="0px"):(Q=="left"?Se=0:Q=="middle"&&(Se=(re.sizer.clientWidth-R.offsetWidth)/2),R.style.left=Se+"px"),j&&Xwt(this,{left:Se,top:ae,right:Se+R.offsetWidth,bottom:ae+R.offsetHeight})},triggerOnKeyDown:$a(bDe),triggerOnKeyPress:$a(wDe),triggerOnKeyUp:ADe,triggerOnMouseDown:$a(xDe),execCommand:function(S){if(gw.hasOwnProperty(S))return gw[S].call(null,this)},triggerElectric:$a(function(S){ODe(this,S)}),findPosH:function(S,R,j,q){var Q=1;R<0&&(Q=-1,R=-R);for(var re=gn(this.doc,S),ae=0;ae<R&&!(re=oQ(this.doc,re,Q,j,q)).hitSide;++ae);return re},moveH:$a(function(S,R){var j=this;this.extendSelectionsBy(function(q){return j.display.shift||j.doc.extend||q.empty()?oQ(j.doc,q.head,S,R,j.options.rtlMoveVisually):S<0?q.from():q.to()},ye)}),deleteH:$a(function(S,R){var j=this.doc.sel,q=this.doc;j.somethingSelected()?q.replaceSelection("",null,"+delete"):g3(this,function(Q){var re=oQ(q,Q.head,S,R,!1);return S<0?{from:re,to:Q.head}:{from:Q.head,to:re}})}),findPosV:function(S,R,j,q){var Q=1,re=q;R<0&&(Q=-1,R=-R);for(var ae=gn(this.doc,S),Se=0;Se<R;++Se){var De=cc(this,ae,"div");if(re==null?re=De.left:De.left=re,(ae=FDe(this,De,Q,j)).hitSide)break}return ae},moveV:$a(function(S,R){var j=this,q=this.doc,Q=[],re=!this.display.shift&&!q.extend&&q.sel.somethingSelected();if(q.extendSelectionsBy(function(Se){if(re)return S<0?Se.from():Se.to();var De=cc(j,Se.head,"div");Se.goalColumn!=null&&(De.left=Se.goalColumn),Q.push(De.left);var Ue=FDe(j,De,S,R);return R=="page"&&Se==q.sel.primary()&&PX(j,eO(j,Ue,"div").top-De.top),Ue},ye),Q.length)for(var ae=0;ae<q.sel.ranges.length;ae++)q.sel.ranges[ae].goalColumn=Q[ae]}),findWordAt:function(S){var R=Ct(this.doc,S.line).text,j=S.ch,q=S.ch;if(R){var Q=this.getHelper(S,"wordChars");S.sticky!="before"&&q!=R.length||!j?++q:--j;for(var re=R.charAt(j),ae=We(re,Q)?function(Se){return We(Se,Q)}:/\s/.test(re)?function(Se){return/\s/.test(Se)}:function(Se){return!/\s/.test(Se)&&!We(Se)};j>0&&ae(R.charAt(j-1));)--j;for(;q<R.length&&ae(R.charAt(q));)++q}return new Vr(Ee(S.line,j),Ee(S.line,q))},toggleOverwrite:function(S){S!=null&&S==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):O(this.display.cursorDiv,"CodeMirror-overwrite"),vt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==P(z(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:$a(function(S,R){nw(this,S,R)}),getScrollInfo:function(){var S=this.display.scroller;return{left:S.scrollLeft,top:S.scrollTop,height:S.scrollHeight-bd(this)-this.display.barHeight,width:S.scrollWidth-bd(this)-this.display.barWidth,clientHeight:EX(this),clientWidth:am(this)}},scrollIntoView:$a(function(S,R){S==null?(S={from:this.doc.sel.primary().head,to:null},R==null&&(R=this.options.cursorScrollMargin)):typeof S=="number"?S={from:Ee(S,0),to:null}:S.from==null&&(S={from:S,to:null}),S.to||(S.to=S.from),S.margin=R||0,S.from.line!=null?Qwt(this,S):Cke(this,S.from,S.to,S.margin)}),setSize:$a(function(S,R){var j=this,q=function(re){return typeof re=="number"||/^\d+$/.test(String(re))?re+"px":re};S!=null&&(this.display.wrapper.style.width=q(S)),R!=null&&(this.display.wrapper.style.height=q(R)),this.options.lineWrapping&&pke(this);var Q=this.display.viewFrom;this.doc.iter(Q,this.display.viewTo,function(re){if(re.widgets){for(var ae=0;ae<re.widgets.length;ae++)if(re.widgets[ae].noHScroll){o0(j,Q,"widget");break}}++Q}),this.curOp.forceUpdate=!0,vt(this,"refresh",this)}),operation:function(S){return Xl(this,S)},startOperation:function(){return fm(this)},endOperation:function(){return pm(this)},refresh:$a(function(){var S=this.display.cachedTextHeight;hl(this),this.curOp.forceUpdate=!0,ew(this),nw(this,this.doc.scrollLeft,this.doc.scrollTop),zX(this.display),(S==null||Math.abs(S-a3(this.display))>.5||this.options.lineWrapping)&&NX(this),vt(this,"refresh",this)}),swapDoc:$a(function(S){var R=this.doc;return R.cm=null,this.state.selectingText&&this.state.selectingText(),jke(this,S),ew(this),this.display.input.reset(),nw(this,S.scrollLeft,S.scrollTop),this.curOp.forceScroll=!0,Vi(this,"swapDoc",this,R),R}),phrase:function(S){var R=this.options.phrases;return R&&Object.prototype.hasOwnProperty.call(R,S)?R[S]:S},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},rn(h),h.registerHelper=function(S,R,j){D.hasOwnProperty(S)||(D[S]=h[S]={_global:[]}),D[S][R]=j},h.registerGlobalHelper=function(S,R,j,q){h.registerHelper(S,R,q),D[S]._global.push({pred:j,val:q})}}function oQ(h,A,D,S,R){var j=A,q=D,Q=Ct(h,A.line),re=R&&h.direction=="rtl"?-D:D;function ae(){var Jt=A.line+re;return!(Jt<h.first||Jt>=h.first+h.size)&&(A=new Ee(Jt,A.ch,A.sticky),Q=Ct(h,Jt))}function Se(Jt){var It;if(S=="codepoint"){var tn=Q.text.charCodeAt(A.ch+(D>0?0:-1));if(isNaN(tn))It=null;else{var en=D>0?tn>=55296&&tn<56320:tn>=56320&&tn<57343;It=new Ee(A.line,Math.max(0,Math.min(Q.text.length,A.ch+D*(en?2:1))),-D)}}else It=R?R7t(h.cm,Q,A,D):QX(Q,A,D);if(It==null){if(Jt||!ae())return!1;A=JX(R,h.cm,Q,A.line,re)}else A=It;return!0}if(S=="char"||S=="codepoint")Se();else if(S=="column")Se(!0);else if(S=="word"||S=="group")for(var De=null,Ue=S=="group",Ge=h.cm&&h.cm.getHelper(A,"wordChars"),at=!0;!(D<0)||Se(!at);at=!1){var yt=Q.text.charAt(A.ch)||` |
|
69 |
`,Ot=We(yt,Ge)?"w":Ue&&yt==` |
|
70 |
`?"n":!Ue||/\s/.test(yt)?null:"p";if(Ue&&!at&&!Ot&&(Ot="s"),De&&De!=Ot){D<0&&(D=1,Se(),A.sticky="after");break}if(Ot&&(De=Ot),D>0&&!Se(!at))break}var Yt=fO(h,A,j,q,!0);return Vt(j,Yt)&&(Yt.hitSide=!0),Yt}function FDe(h,A,D,S){var R,j,q=h.doc,Q=A.left;if(S=="page"){var re=Math.min(h.display.wrapper.clientHeight,$(h).innerHeight||q(h).documentElement.clientHeight),ae=Math.max(re-.5*a3(h.display),3);R=(D>0?A.bottom:A.top)+D*ae}else S=="line"&&(R=D>0?A.bottom+3:A.top-3);for(;(j=DX(h,Q,R)).outside;){if(D<0?R<=0:R>=q.height){j.hitSide=!0;break}R+=5*D}return j}var Wr=function(h){this.cm=h,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new te,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function RDe(h,A){var D=CX(h,A.line);if(!D||D.hidden)return null;var S=Ct(h.doc,A.line),R=ske(D,S,A.line),j=me(S,h.doc.direction),q="left";j&&(q=we(j,A.ch)%2?"right":"left");var Q=dke(R.map,A.ch,q);return Q.offset=Q.collapse=="right"?Q.end:Q.start,Q}function e9t(h){for(var A=h;A;A=A.parentNode)if(/CodeMirror-gutter-wrapper/.test(A.className))return!0;return!1}function b3(h,A){return A&&(h.bad=!0),h}function t9t(h,A,D,S,R){var j="",q=!1,Q=h.doc.lineSeparator(),re=!1;function ae(Ge){return function(at){return at.id==Ge}}function Se(){q&&(j+=Q,re&&(j+=Q),q=re=!1)}function De(Ge){Ge&&(Se(),j+=Ge)}function Ue(Ge){if(Ge.nodeType==1){var at=Ge.getAttribute("cm-text");if(at)return void De(at);var yt,Ot=Ge.getAttribute("cm-marker");if(Ot){var Yt=h.findMarks(Ee(S,0),Ee(R+1,0),ae(+Ot));return void(Yt.length&&(yt=Yt[0].find(0))&&De(Fn(h.doc,yt.from,yt.to).join(Q)))}if(Ge.getAttribute("contenteditable")=="false")return;var Jt=/^(pre|div|p|li|table|br)$/i.test(Ge.nodeName);if(!/^br$/i.test(Ge.nodeName)&&Ge.textContent.length==0)return;Jt&&Se();for(var It=0;It<Ge.childNodes.length;It++)Ue(Ge.childNodes[It]);/^(pre|p)$/i.test(Ge.nodeName)&&(re=!0),Jt&&(q=!0)}else Ge.nodeType==3&&De(Ge.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ue(A),A!=D;)A=A.nextSibling,re=!1;return j}function bO(h,A,D){var S;if(A==h.display.lineDiv){if(!(S=h.display.lineDiv.childNodes[D]))return b3(h.clipPos(Ee(h.display.viewTo-1)),!0);A=null,D=0}else for(S=A;;S=S.parentNode){if(!S||S==h.display.lineDiv)return null;if(S.parentNode&&S.parentNode==h.display.lineDiv)break}for(var R=0;R<h.display.view.length;R++){var j=h.display.view[R];if(j.node==S)return n9t(j,A,D)}}function n9t(h,A,D){var S=h.text.firstChild,R=!1;if(!A||!V(S,A))return b3(Ee(cr(h.line),0),!0);if(A==S&&(R=!0,A=S.childNodes[D],D=0,!A)){var j=h.rest?Ce(h.rest):h.line;return b3(Ee(cr(j),j.text.length),R)}var q=A.nodeType==3?A:null,Q=A;for(!q&&A.childNodes.length==1&&A.firstChild.nodeType==3&&(q=A.firstChild,D&&(D=q.nodeValue.length));Q.parentNode!=S;)Q=Q.parentNode;var re=h.measure,ae=re.maps;function Se(Ot,Yt,Jt){for(var It=-1;It<(ae?ae.length:0);It++)for(var tn=It<0?re.map:ae[It],en=0;en<tn.length;en+=3){var fn=tn[en+2];if(fn==Ot||fn==Yt){var ro=cr(It<0?h.line:h.rest[It]),Zr=tn[en]+Jt;return(Jt<0||fn!=Ot)&&(Zr=tn[en+(Jt?1:0)]),Ee(ro,Zr)}}}var De=Se(q,Q,D);if(De)return b3(De,R);for(var Ue=Q.nextSibling,Ge=q?q.nodeValue.length-D:0;Ue;Ue=Ue.nextSibling){if(De=Se(Ue,Ue.firstChild,0))return b3(Ee(De.line,De.ch-Ge),R);Ge+=Ue.textContent.length}for(var at=Q.previousSibling,yt=D;at;at=at.previousSibling){if(De=Se(at,at.firstChild,-1))return b3(Ee(De.line,De.ch+yt),R);yt+=at.textContent.length}}Wr.prototype.init=function(h){var A=this,D=this,S=D.cm,R=D.div=h.lineDiv;function j(Q){for(var re=Q.target;re;re=re.parentNode){if(re==R)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(re.className))break}return!1}function q(Q){if(j(Q)&&!qt(S,Q)){if(S.somethingSelected())yO({lineWise:!1,text:S.getSelections()}),Q.type=="cut"&&S.replaceSelection("",null,"cut");else{if(!S.options.lineWiseCopyCut)return;var re=TDe(S);yO({lineWise:!0,text:re.text}),Q.type=="cut"&&S.operation(function(){S.setSelections(re.ranges,0,J),S.replaceSelection("",null,"cut")})}if(Q.clipboardData){Q.clipboardData.clearData();var ae=fc.text.join(` |
|
71 |
`);if(Q.clipboardData.setData("Text",ae),Q.clipboardData.getData("Text")==ae)return void Q.preventDefault()}var Se=NDe(),De=Se.firstChild;S.display.lineSpace.insertBefore(Se,S.display.lineSpace.firstChild),De.value=fc.text.join(` |
|
72 |
`);var Ue=P(R.ownerDocument);G(De),setTimeout(function(){S.display.lineSpace.removeChild(Se),Ue.focus(),Ue==R&&D.showPrimarySelection()},50)}}R.contentEditable=!0,MDe(R,S.options.spellcheck,S.options.autocorrect,S.options.autocapitalize),Ie(R,"paste",function(Q){!j(Q)||qt(S,Q)||DDe(Q,S)||l<=11&&setTimeout(zi(S,function(){return A.updateFromDOM()}),20)}),Ie(R,"compositionstart",function(Q){A.composing={data:Q.data,done:!1}}),Ie(R,"compositionupdate",function(Q){A.composing||(A.composing={data:Q.data,done:!1})}),Ie(R,"compositionend",function(Q){A.composing&&(Q.data!=A.composing.data&&A.readFromDOMSoon(),A.composing.done=!0)}),Ie(R,"touchstart",function(){return D.forceCompositionEnd()}),Ie(R,"input",function(){A.composing||A.readFromDOMSoon()}),Ie(R,"copy",q),Ie(R,"cut",q)},Wr.prototype.screenReaderLabelChanged=function(h){h?this.div.setAttribute("aria-label",h):this.div.removeAttribute("aria-label")},Wr.prototype.prepareSelection=function(){var h=xke(this.cm,!1);return h.focus=P(this.div.ownerDocument)==this.div,h},Wr.prototype.showSelection=function(h,A){!h||!this.cm.display.view.length||((h.focus||A)&&this.showPrimarySelection(),this.showMultipleSelections(h))},Wr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Wr.prototype.showPrimarySelection=function(){var h=this.getSelection(),A=this.cm,D=A.doc.sel.primary(),S=D.from(),R=D.to();if(A.display.viewTo==A.display.viewFrom||S.line>=A.display.viewTo||R.line<A.display.viewFrom)h.removeAllRanges();else{var j=bO(A,h.anchorNode,h.anchorOffset),q=bO(A,h.focusNode,h.focusOffset);if(!j||j.bad||!q||q.bad||Ze(Pn(j,q),S)!=0||Ze(on(j,q),R)!=0){var Q=A.display.view,re=S.line>=A.display.viewFrom&&RDe(A,S)||{node:Q[0].measure.map[2],offset:0},ae=R.line<A.display.viewTo&&RDe(A,R);if(!ae){var Se=Q[Q.length-1].measure,De=Se.maps?Se.maps[Se.maps.length-1]:Se.map;ae={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!re||!ae)return void h.removeAllRanges();var Ue,Ge=h.rangeCount&&h.getRangeAt(0);try{Ue=I(re.node,re.offset,ae.offset,ae.node)}catch{}Ue&&(!n&&A.state.focused?(h.collapse(re.node,re.offset),Ue.collapsed||(h.removeAllRanges(),h.addRange(Ue))):(h.removeAllRanges(),h.addRange(Ue)),Ge&&h.anchorNode==null?h.addRange(Ge):n&&this.startGracePeriod()),this.rememberSelection()}}},Wr.prototype.startGracePeriod=function(){var h=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){h.gracePeriod=!1,h.selectionChanged()&&h.cm.operation(function(){return h.cm.curOp.selectionChanged=!0})},20)},Wr.prototype.showMultipleSelections=function(h){N(this.cm.display.cursorDiv,h.cursors),N(this.cm.display.selectionDiv,h.selection)},Wr.prototype.rememberSelection=function(){var h=this.getSelection();this.lastAnchorNode=h.anchorNode,this.lastAnchorOffset=h.anchorOffset,this.lastFocusNode=h.focusNode,this.lastFocusOffset=h.focusOffset},Wr.prototype.selectionInEditor=function(){var h=this.getSelection();if(!h.rangeCount)return!1;var A=h.getRangeAt(0).commonAncestorContainer;return V(this.div,A)},Wr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||P(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Wr.prototype.blur=function(){this.div.blur()},Wr.prototype.getField=function(){return this.div},Wr.prototype.supportsTouch=function(){return!0},Wr.prototype.receivedFocus=function(){var h=this,A=this;function D(){A.cm.state.focused&&(A.pollSelection(),A.polling.set(A.cm.options.pollInterval,D))}this.selectionInEditor()?setTimeout(function(){return h.pollSelection()},20):Xl(this.cm,function(){return A.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,D)},Wr.prototype.selectionChanged=function(){var h=this.getSelection();return h.anchorNode!=this.lastAnchorNode||h.anchorOffset!=this.lastAnchorOffset||h.focusNode!=this.lastFocusNode||h.focusOffset!=this.lastFocusOffset},Wr.prototype.pollSelection=function(){if(this.readDOMTimeout==null&&!this.gracePeriod&&this.selectionChanged()){var h=this.getSelection(),A=this.cm;if(b&&c&&this.cm.display.gutterSpecs.length&&e9t(h.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var D=bO(A,h.anchorNode,h.anchorOffset),S=bO(A,h.focusNode,h.focusOffset);D&&S&&Xl(A,function(){Ea(A.doc,a0(D,S),J),(D.bad||S.bad)&&(A.curOp.selectionChanged=!0)})}}},Wr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var h,A,D,S=this.cm,R=S.display,j=S.doc.sel.primary(),q=j.from(),Q=j.to();if(q.ch==0&&q.line>S.firstLine()&&(q=Ee(q.line-1,Ct(S.doc,q.line-1).length)),Q.ch==Ct(S.doc,Q.line).text.length&&Q.line<S.lastLine()&&(Q=Ee(Q.line+1,0)),q.line<R.viewFrom||Q.line>R.viewTo-1)return!1;q.line==R.viewFrom||(h=um(S,q.line))==0?(A=cr(R.view[0].line),D=R.view[0].node):(A=cr(R.view[h].line),D=R.view[h-1].node.nextSibling);var re,ae,Se=um(S,Q.line);if(Se==R.view.length-1?(re=R.viewTo-1,ae=R.lineDiv.lastChild):(re=cr(R.view[Se+1].line)-1,ae=R.view[Se+1].node.previousSibling),!D)return!1;for(var De=S.doc.splitLines(t9t(S,D,ae,A,re)),Ue=Fn(S.doc,Ee(A,0),Ee(re,Ct(S.doc,re).text.length));De.length>1&&Ue.length>1;)if(Ce(De)==Ce(Ue))De.pop(),Ue.pop(),re--;else{if(De[0]!=Ue[0])break;De.shift(),Ue.shift(),A++}for(var Ge=0,at=0,yt=De[0],Ot=Ue[0],Yt=Math.min(yt.length,Ot.length);Ge<Yt&&yt.charCodeAt(Ge)==Ot.charCodeAt(Ge);)++Ge;for(var Jt=Ce(De),It=Ce(Ue),tn=Math.min(Jt.length-(De.length==1?Ge:0),It.length-(Ue.length==1?Ge:0));at<tn&&Jt.charCodeAt(Jt.length-at-1)==It.charCodeAt(It.length-at-1);)++at;if(De.length==1&&Ue.length==1&&A==q.line)for(;Ge&&Ge>q.ch&&Jt.charCodeAt(Jt.length-at-1)==It.charCodeAt(It.length-at-1);)Ge--,at++;De[De.length-1]=Jt.slice(0,Jt.length-at).replace(/^\u200b+/,""),De[0]=De[0].slice(Ge).replace(/\u200b+$/,"");var en=Ee(A,Ge),fn=Ee(re,Ue.length?Ce(Ue).length-at:0);return De.length>1||De[0]||Ze(en,fn)?(h3(S.doc,De,en,fn,"+input"),!0):void 0},Wr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wr.prototype.reset=function(){this.forceCompositionEnd()},Wr.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wr.prototype.readFromDOMSoon=function(){var h=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(h.readDOMTimeout=null,h.composing){if(!h.composing.done)return;h.composing=null}h.updateFromDOM()},80))},Wr.prototype.updateFromDOM=function(){var h=this;(this.cm.isReadOnly()||!this.pollContent())&&Xl(this.cm,function(){return hl(h.cm)})},Wr.prototype.setUneditable=function(h){h.contentEditable="false"},Wr.prototype.onKeyPress=function(h){h.charCode==0||this.composing||(h.preventDefault(),this.cm.isReadOnly()||zi(this.cm,rQ)(this.cm,String.fromCharCode(h.charCode==null?h.keyCode:h.charCode),0))},Wr.prototype.readOnlyChanged=function(h){this.div.contentEditable=String(h!="nocursor")},Wr.prototype.onContextMenu=function(){},Wr.prototype.resetPosition=function(){},Wr.prototype.needsContentAttribute=!0;var qo=function(h){this.cm=h,this.prevInput="",this.pollingFast=!1,this.polling=new te,this.hasSelection=!1,this.composing=null};function r9t(h,A){if((A=A?K(A):{}).value=h.value,!A.tabindex&&h.tabIndex&&(A.tabindex=h.tabIndex),!A.placeholder&&h.placeholder&&(A.placeholder=h.placeholder),A.autofocus==null){var D=P(h.ownerDocument);A.autofocus=D==h||h.getAttribute("autofocus")!=null&&D==document.body}function S(){h.value=Q.getValue()}var R;if(h.form&&(Ie(h.form,"submit",S),!A.leaveSubmitMethodAlone)){var j=h.form;R=j.submit;try{var q=j.submit=function(){S(),j.submit=R,j.submit(),j.submit=q}}catch{}}A.finishInit=function(re){re.save=S,re.getTextArea=function(){return h},re.toTextArea=function(){re.toTextArea=isNaN,S(),h.parentNode.removeChild(re.getWrapperElement()),h.style.display="",h.form&&(gt(h.form,"submit",S),!A.leaveSubmitMethodAlone&&typeof h.form.submit=="function"&&(h.form.submit=R))}},h.style.display="none";var Q=wo(function(re){return h.parentNode.insertBefore(re,h.nextSibling)},A);return Q}function o9t(h){h.off=gt,h.on=Ie,h.wheelEventPixels=d7t,h.Doc=vl,h.splitLines=Go,h.countColumn=X,h.findColumn=be,h.isWordChar=ge,h.Pass=le,h.signal=vt,h.Line=r3,h.changeEnd=l0,h.scrollbarModel=Dke,h.Pos=Ee,h.cmpPos=Ze,h.modes=Et,h.mimeModes=Kt,h.resolveMode=Ne,h.getMode=Tt,h.modeExtensions=Oe,h.extendMode=nt,h.copyState=ut,h.startState=En,h.innerMode=xt,h.commands=gw,h.keyMap=Of,h.keyName=hDe,h.isModifierKey=fDe,h.lookupKey=m3,h.normalizeKeyMap=F7t,h.StringStream=ln,h.SharedTextMarker=hw,h.TextMarker=u0,h.LineWidget=pw,h.e_preventDefault=zn,h.e_stopPropagation=tt,h.e_stop=An,h.addClass=H,h.contains=V,h.rmClass=O,h.keyNames=c0}qo.prototype.init=function(h){var A=this,D=this,S=this.cm;this.createField(h);var R=this.textarea;function j(q){if(!qt(S,q)){if(S.somethingSelected())yO({lineWise:!1,text:S.getSelections()});else{if(!S.options.lineWiseCopyCut)return;var Q=TDe(S);yO({lineWise:!0,text:Q.text}),q.type=="cut"?S.setSelections(Q.ranges,null,J):(D.prevInput="",R.value=Q.text.join(` |
|
73 |
`),G(R))}q.type=="cut"&&(S.state.cutIncoming=+new Date)}}h.wrapper.insertBefore(this.wrapper,h.wrapper.firstChild),g&&(R.style.width="0px"),Ie(R,"input",function(){a&&l>=9&&A.hasSelection&&(A.hasSelection=null),D.poll()}),Ie(R,"paste",function(q){qt(S,q)||DDe(q,S)||(S.state.pasteIncoming=+new Date,D.fastPoll())}),Ie(R,"cut",j),Ie(R,"copy",j),Ie(h.scroller,"paste",function(q){if(!kf(h,q)&&!qt(S,q)){if(!R.dispatchEvent)return S.state.pasteIncoming=+new Date,void D.focus();var Q=new Event("paste");Q.clipboardData=q.clipboardData,R.dispatchEvent(Q)}}),Ie(h.lineSpace,"selectstart",function(q){kf(h,q)||zn(q)}),Ie(R,"compositionstart",function(){var q=S.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:q,range:S.markText(q,S.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(R,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},qo.prototype.createField=function(h){this.wrapper=NDe(),this.textarea=this.wrapper.firstChild},qo.prototype.screenReaderLabelChanged=function(h){h?this.textarea.setAttribute("aria-label",h):this.textarea.removeAttribute("aria-label")},qo.prototype.prepareSelection=function(){var h=this.cm,A=h.display,D=h.doc,S=xke(h);if(h.options.moveInputWithCursor){var R=cc(h,D.sel.primary().head,"div"),j=A.wrapper.getBoundingClientRect(),q=A.lineDiv.getBoundingClientRect();S.teTop=Math.max(0,Math.min(A.wrapper.clientHeight-10,R.top+q.top-j.top)),S.teLeft=Math.max(0,Math.min(A.wrapper.clientWidth-10,R.left+q.left-j.left))}return S},qo.prototype.showSelection=function(h){var A=this.cm.display;N(A.cursorDiv,h.cursors),N(A.selectionDiv,h.selection),h.teTop!=null&&(this.wrapper.style.top=h.teTop+"px",this.wrapper.style.left=h.teLeft+"px")},qo.prototype.reset=function(h){if(!this.contextMenuPending&&!this.composing){var A=this.cm;if(A.somethingSelected()){this.prevInput="";var D=A.getSelection();this.textarea.value=D,A.state.focused&&G(this.textarea),a&&l>=9&&(this.hasSelection=D)}else h||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},qo.prototype.getField=function(){return this.textarea},qo.prototype.supportsTouch=function(){return!1},qo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!y||P(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},qo.prototype.blur=function(){this.textarea.blur()},qo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qo.prototype.receivedFocus=function(){this.slowPoll()},qo.prototype.slowPoll=function(){var h=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){h.poll(),h.cm.state.focused&&h.slowPoll()})},qo.prototype.fastPoll=function(){var h=!1,A=this;function D(){A.poll()||h?(A.pollingFast=!1,A.slowPoll()):(h=!0,A.polling.set(60,D))}A.pollingFast=!0,A.polling.set(20,D)},qo.prototype.poll=function(){var h=this,A=this.cm,D=this.textarea,S=this.prevInput;if(this.contextMenuPending||!A.state.focused||za(D)&&!S&&!this.composing||A.isReadOnly()||A.options.disableInput||A.state.keySeq)return!1;var R=D.value;if(R==S&&!A.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===R||w&&/[\uf700-\uf7ff]/.test(R))return A.display.input.reset(),!1;if(A.doc.sel==A.display.selForContextMenu){var j=R.charCodeAt(0);if(j==8203&&!S&&(S="\u200B"),j==8666)return this.reset(),this.cm.execCommand("undo")}for(var q=0,Q=Math.min(S.length,R.length);q<Q&&S.charCodeAt(q)==R.charCodeAt(q);)++q;return Xl(A,function(){rQ(A,R.slice(q),S.length-q,null,h.composing?"*compose":null),R.length>1e3||R.indexOf(` |
|
74 |
`)>-1?D.value=h.prevInput="":h.prevInput=R,h.composing&&(h.composing.range.clear(),h.composing.range=A.markText(h.composing.start,A.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},qo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qo.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},qo.prototype.onContextMenu=function(h){var A=this,D=A.cm,S=D.display,R=A.textarea;A.contextMenuPending&&A.contextMenuPending();var j=sm(D,h),q=S.scroller.scrollTop;if(j&&!f){D.options.resetSelectionOnContextMenu&&D.doc.sel.contains(j)==-1&&zi(D,Ea)(D.doc,a0(j),J);var Q,re=R.style.cssText,ae=A.wrapper.style.cssText,Se=A.wrapper.offsetParent.getBoundingClientRect();if(A.wrapper.style.cssText="position: static",R.style.cssText=`position: absolute; width: 30px; height: 30px; |
|
75 |
top: `+(h.clientY-Se.top-5)+"px; left: "+(h.clientX-Se.left-5)+`px; |
|
76 |
z-index: 1000; background: `+(a?"rgba(255, 255, 255, .05)":"transparent")+`; |
|
77 |
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`,s&&(Q=R.ownerDocument.defaultView.scrollY),S.input.focus(),s&&R.ownerDocument.defaultView.scrollTo(null,Q),S.input.reset(),D.somethingSelected()||(R.value=A.prevInput=" "),A.contextMenuPending=Ge,S.selForContextMenu=D.doc.sel,clearTimeout(S.detectingSelectAll),a&&l>=9&&Ue(),T){An(h);var De=function(){gt(window,"mouseup",De),setTimeout(Ge,20)};Ie(window,"mouseup",De)}else setTimeout(Ge,50)}function Ue(){if(R.selectionStart!=null){var at=D.somethingSelected(),yt="\u200B"+(at?R.value:"");R.value="\u21DA",R.value=yt,A.prevInput=at?"":"\u200B",R.selectionStart=1,R.selectionEnd=yt.length,S.selForContextMenu=D.doc.sel}}function Ge(){if(A.contextMenuPending==Ge&&(A.contextMenuPending=!1,A.wrapper.style.cssText=ae,R.style.cssText=re,a&&l<9&&S.scrollbars.setScrollTop(S.scroller.scrollTop=q),R.selectionStart!=null)){(!a||a&&l<9)&&Ue();var at=0,yt=function(){S.selForContextMenu==D.doc.sel&&R.selectionStart==0&&R.selectionEnd>0&&A.prevInput=="\u200B"?zi(D,Jke)(D):at++<10?S.detectingSelectAll=setTimeout(yt,500):(S.selForContextMenu=null,S.input.reset())};S.detectingSelectAll=setTimeout(yt,200)}}},qo.prototype.readOnlyChanged=function(h){h||this.reset(),this.textarea.disabled=h=="nocursor",this.textarea.readOnly=!!h},qo.prototype.setUneditable=function(){},qo.prototype.needsContentAttribute=!1,Y7t(wo),Z7t(wo);var i9t="iter insert remove copy getEditor constructor".split(" ");for(var AO in vl.prototype)vl.prototype.hasOwnProperty(AO)&&ne(i9t,AO)<0&&(wo.prototype[AO]=function(h){return function(){return h.apply(this.doc,arguments)}}(vl.prototype[AO]));return rn(vl),wo.inputStyles={textarea:qo,contenteditable:Wr},wo.defineMode=function(h){!wo.defaults.mode&&h!="null"&&(wo.defaults.mode=h),gr.apply(this,arguments)},wo.defineMIME=Bn,wo.defineMode("null",function(){return{token:function(h){return h.skipToEnd()}}}),wo.defineMIME("text/plain","null"),wo.defineExtension=function(h,A){wo.prototype[h]=A},wo.defineDocExtension=function(h,A){vl.prototype[h]=A},wo.fromTextArea=r9t,o9t(wo),wo.version="6.65.7",wo}()),Bfe.exports}var Mg=Wx();(function(e){e.defineMode("javascript",function(t,n){var r,o,i=t.indentUnit,a=n.statementIndent,l=n.jsonld,s=n.json||l,u=n.trackScope!==!1,c=n.typescript,d=n.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function pe(Pn){return{type:Pn,style:"keyword"}}var xe=pe("keyword a"),Ee=pe("keyword b"),Ze=pe("keyword c"),Vt=pe("keyword d"),Cn=pe("operator"),on={type:"atom",style:"atom"};return{if:pe("if"),while:xe,with:xe,else:Ee,do:Ee,try:Ee,finally:Ee,return:Vt,break:Vt,continue:Vt,new:pe("new"),delete:Ze,void:Ze,throw:Ze,debugger:pe("debugger"),var:pe("var"),const:pe("var"),let:pe("var"),function:pe("function"),catch:pe("catch"),for:pe("for"),switch:pe("switch"),case:pe("case"),default:pe("default"),in:Cn,typeof:Cn,instanceof:Cn,true:on,false:on,null:on,undefined:on,NaN:on,Infinity:on,this:pe("this"),class:pe("class"),super:pe("atom"),yield:Ze,export:pe("export"),import:pe("import"),extends:Ze,await:Ze}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(pe){for(var xe,Ee=!1,Ze=!1;(xe=pe.next())!=null;){if(!Ee){if(xe=="/"&&!Ze)return;xe=="["?Ze=!0:Ze&&xe=="]"&&(Ze=!1)}Ee=!Ee&&xe=="\\"}}function g(pe,xe,Ee){return r=pe,o=Ee,xe}function b(pe,xe){var Ee=pe.next();if(Ee=='"'||Ee=="'")return xe.tokenize=y(Ee),xe.tokenize(pe,xe);if(Ee=="."&&pe.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if(Ee=="."&&pe.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Ee))return g(Ee);if(Ee=="="&&pe.eat(">"))return g("=>","operator");if(Ee=="0"&&pe.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(Ee))return pe.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if(Ee=="/")return pe.eat("*")?(xe.tokenize=w,w(pe,xe)):pe.eat("/")?(pe.skipToEnd(),g("comment","comment")):Ha(pe,xe,1)?(v(pe),pe.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(pe.eat("="),g("operator","operator",pe.current()));if(Ee=="`")return xe.tokenize=x,x(pe,xe);if(Ee=="#"&&pe.peek()=="!")return pe.skipToEnd(),g("meta","meta");if(Ee=="#"&&pe.eatWhile(d))return g("variable","property");if(Ee=="<"&&pe.match("!--")||Ee=="-"&&pe.match("->")&&!/\S/.test(pe.string.slice(0,pe.start)))return pe.skipToEnd(),g("comment","comment");if(p.test(Ee))return(Ee!=">"||!xe.lexical||xe.lexical.type!=">")&&(pe.eat("=")?(Ee=="!"||Ee=="=")&&pe.eat("="):/[<>*+\-|&?]/.test(Ee)&&(pe.eat(Ee),Ee==">"&&pe.eat(Ee))),Ee=="?"&&pe.eat(".")?g("."):g("operator","operator",pe.current());if(d.test(Ee)){pe.eatWhile(d);var Ze=pe.current();if(xe.lastType!="."){if(f.propertyIsEnumerable(Ze)){var Vt=f[Ze];return g(Vt.type,Vt.style,Ze)}if(Ze=="async"&&pe.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",Ze)}return g("variable","variable",Ze)}}function y(pe){return function(xe,Ee){var Ze,Vt=!1;if(l&&xe.peek()=="@"&&xe.match(m))return Ee.tokenize=b,g("jsonld-keyword","meta");for(;(Ze=xe.next())!=null&&(Ze!=pe||Vt);)Vt=!Vt&&Ze=="\\";return Vt||(Ee.tokenize=b),g("string","string")}}function w(pe,xe){for(var Ee,Ze=!1;Ee=pe.next();){if(Ee=="/"&&Ze){xe.tokenize=b;break}Ze=Ee=="*"}return g("comment","comment")}function x(pe,xe){for(var Ee,Ze=!1;(Ee=pe.next())!=null;){if(!Ze&&(Ee=="`"||Ee=="$"&&pe.eat("{"))){xe.tokenize=b;break}Ze=!Ze&&Ee=="\\"}return g("quasi","string-2",pe.current())}var _="([{}])";function E(pe,xe){xe.fatArrowAt&&(xe.fatArrowAt=null);var Ee=pe.string.indexOf("=>",pe.start);if(!(Ee<0)){if(c){var Ze=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(pe.string.slice(pe.start,Ee));Ze&&(Ee=Ze.index)}for(var Vt=0,Cn=!1,on=Ee-1;on>=0;--on){var Pn=pe.string.charAt(on),Mr=_.indexOf(Pn);if(Mr>=0&&Mr<3){if(!Vt){++on;break}if(--Vt==0){Pn=="("&&(Cn=!0);break}}else if(Mr>=3&&Mr<6)++Vt;else if(d.test(Pn))Cn=!0;else if(/["'\/`]/.test(Pn))for(;;--on){if(on==0)return;if(pe.string.charAt(on-1)==Pn&&pe.string.charAt(on-2)!="\\"){on--;break}}else if(Cn&&!Vt){++on;break}}Cn&&!Vt&&(xe.fatArrowAt=on)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function T(pe,xe,Ee,Ze,Vt,Cn){this.indented=pe,this.column=xe,this.type=Ee,this.prev=Vt,this.info=Cn,Ze!=null&&(this.align=Ze)}function k(pe,xe){if(!u)return!1;for(var Ee=pe.localVars;Ee;Ee=Ee.next)if(Ee.name==xe)return!0;for(var Ze=pe.context;Ze;Ze=Ze.prev)for(Ee=Ze.vars;Ee;Ee=Ee.next)if(Ee.name==xe)return!0}function I(pe,xe,Ee,Ze,Vt){var Cn=pe.cc;for(O.state=pe,O.stream=Vt,O.marked=null,O.cc=Cn,O.style=xe,pe.lexical.hasOwnProperty("align")||(pe.lexical.align=!0);;)if((Cn.length?Cn.pop():s?le:ne)(Ee,Ze)){for(;Cn.length&&Cn[Cn.length-1].lex;)Cn.pop()();return O.marked?O.marked:Ee=="variable"&&k(pe,Ze)?"variable-2":xe}}var O={state:null,column:null,marked:null,cc:null};function F(){for(var pe=arguments.length-1;pe>=0;pe--)O.cc.push(arguments[pe])}function N(){return F.apply(null,arguments),!0}function B(pe,xe){for(var Ee=xe;Ee;Ee=Ee.next)if(Ee.name==pe)return!0;return!1}function L(pe){var xe=O.state;if(O.marked="def",u){if(xe.context){if(xe.lexical.info=="var"&&xe.context&&xe.context.block){var Ee=V(pe,xe.context);if(Ee!=null)return void(xe.context=Ee)}else if(!B(pe,xe.localVars))return void(xe.localVars=new U(pe,xe.localVars))}n.globalVars&&!B(pe,xe.globalVars)&&(xe.globalVars=new U(pe,xe.globalVars))}}function V(pe,xe){if(xe){if(xe.block){var Ee=V(pe,xe.prev);return Ee?Ee==xe.prev?xe:new H(Ee,xe.vars,!0):null}return B(pe,xe.vars)?xe:new H(xe.prev,new U(pe,xe.vars),!1)}return null}function P(pe){return pe=="public"||pe=="private"||pe=="protected"||pe=="abstract"||pe=="readonly"}function H(pe,xe,Ee){this.prev=pe,this.vars=xe,this.block=Ee}function U(pe,xe){this.name=pe,this.next=xe}var G=new U("this",new U("arguments",null));function z(){O.state.context=new H(O.state.context,O.state.localVars,!1),O.state.localVars=G}function $(){O.state.context=new H(O.state.context,O.state.localVars,!0),O.state.localVars=null}function W(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}function K(pe,xe){var Ee=function(){var Ze=O.state,Vt=Ze.indented;if(Ze.lexical.type=="stat")Vt=Ze.lexical.indented;else for(var Cn=Ze.lexical;Cn&&Cn.type==")"&&Cn.align;Cn=Cn.prev)Vt=Cn.indented;Ze.lexical=new T(Vt,O.stream.column(),pe,null,Ze.lexical,xe)};return Ee.lex=!0,Ee}function X(){var pe=O.state;pe.lexical.prev&&(pe.lexical.type==")"&&(pe.indented=pe.lexical.indented),pe.lexical=pe.lexical.prev)}function te(pe){function xe(Ee){return Ee==pe?N():pe==";"||Ee=="}"||Ee==")"||Ee=="]"?F():N(xe)}return xe}function ne(pe,xe){return pe=="var"?N(K("vardef",xe),An,te(";"),X):pe=="keyword a"?N(K("form"),Z,ne,X):pe=="keyword b"?N(K("form"),ne,X):pe=="keyword d"?O.stream.match(/^\s*$/,!1)?N():N(K("stat"),be,te(";"),X):pe=="debugger"?N(te(";")):pe=="{"?N(K("}"),$,je,X,W):pe==";"?N():pe=="if"?(O.state.lexical.info=="else"&&O.state.cc[O.state.cc.length-1]==X&&O.state.cc.pop()(),N(K("form"),Z,ne,X,Ao)):pe=="function"?N(sa):pe=="for"?N(K("form"),$,pl,ne,W,X):pe=="class"||c&&xe=="interface"?(O.marked="keyword",N(K("form",pe=="class"?pe:xe),gr,X)):pe=="variable"?c&&xe=="declare"?(O.marked="keyword",N(ne)):c&&(xe=="module"||xe=="enum"||xe=="type")&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword",xe=="enum"?N(Mo):xe=="type"?N(lt,te("operator"),Ie,te(";")):N(K("form"),_n,te("{"),K("}"),je,X,X)):c&&xe=="namespace"?(O.marked="keyword",N(K("form"),le,ne,X)):c&&xe=="abstract"?(O.marked="keyword",N(ne)):N(K("stat"),We):pe=="switch"?N(K("form"),Z,te("{"),K("}","switch"),$,je,X,X,W):pe=="case"?N(le,te(":")):pe=="default"?N(te(":")):pe=="catch"?N(K("form"),z,se,ne,X,W):pe=="export"?N(K("stat"),Oe,X):pe=="import"?N(K("stat"),ut,X):pe=="async"?N(ne):xe=="@"?N(le,ne):F(K("stat"),le,te(";"),X)}function se(pe){if(pe=="(")return N(Et,te(")"))}function le(pe,xe){return ye(pe,xe,!1)}function J(pe,xe){return ye(pe,xe,!0)}function Z(pe){return pe!="("?F():N(K(")"),be,te(")"),X)}function ye(pe,xe,Ee){if(O.state.fatArrowAt==O.stream.start){var Ze=Ee?Be:ke;if(pe=="(")return N(z,K(")"),dt(Et,")"),X,te("=>"),Ze,W);if(pe=="variable")return F(z,_n,te("=>"),Ze,W)}var Vt=Ee?Ae:ve;return C.hasOwnProperty(pe)?N(Vt):pe=="function"?N(sa,Vt):pe=="class"||c&&xe=="interface"?(O.marked="keyword",N(K("form"),Kt,X)):pe=="keyword c"||pe=="async"?N(Ee?J:le):pe=="("?N(K(")"),be,te(")"),X,Vt):pe=="operator"||pe=="spread"?N(Ee?J:le):pe=="["?N(K("]"),Fn,X,Vt):pe=="{"?ot(At,"}",null,Vt):pe=="quasi"?F(Ce,Vt):pe=="new"?N($e(Ee)):N()}function be(pe){return pe.match(/[;\}\)\],]/)?F():F(le)}function ve(pe,xe){return pe==","?N(be):Ae(pe,xe,!1)}function Ae(pe,xe,Ee){var Ze=Ee==0?ve:Ae,Vt=Ee==0?le:J;if(pe=="=>")return N(z,Ee?Be:ke,W);if(pe=="operator")return/\+\+|--/.test(xe)||c&&xe=="!"?N(Ze):c&&xe=="<"&&O.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(K(">"),dt(Ie,">"),X,Ze):xe=="?"?N(le,te(":"),Vt):N(Vt);if(pe=="quasi")return F(Ce,Ze);if(pe!=";"){if(pe=="(")return ot(J,")","call",Ze);if(pe==".")return N(st,Ze);if(pe=="[")return N(K("]"),be,te("]"),X,Ze);if(c&&xe=="as")return O.marked="keyword",N(Ie,Ze);if(pe=="regexp")return O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),N(Vt)}}function Ce(pe,xe){return pe!="quasi"?F():xe.slice(xe.length-2)!="${"?N(Ce):N(be,_e)}function _e(pe){if(pe=="}")return O.marked="string-2",O.state.tokenize=x,N(Ce)}function ke(pe){return E(O.stream,O.state),F(pe=="{"?ne:le)}function Be(pe){return E(O.stream,O.state),F(pe=="{"?ne:J)}function $e(pe){return function(xe){return xe=="."?N(pe?ge:rt):xe=="variable"&&c?N(zn,pe?Ae:ve):F(pe?J:le)}}function rt(pe,xe){if(xe=="target")return O.marked="keyword",N(ve)}function ge(pe,xe){if(xe=="target")return O.marked="keyword",N(Ae)}function We(pe){return pe==":"?N(X,ne):F(ve,te(";"),X)}function st(pe){if(pe=="variable")return O.marked="property",N()}function At(pe,xe){return pe=="async"?(O.marked="property",N(At)):pe=="variable"||O.style=="keyword"?(O.marked="property",xe=="get"||xe=="set"?N(Ve):(c&&O.state.fatArrowAt==O.stream.start&&(Ee=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+Ee[0].length),N(it))):pe=="number"||pe=="string"?(O.marked=l?"property":O.style+" property",N(it)):pe=="jsonld-keyword"?N(it):c&&P(xe)?(O.marked="keyword",N(At)):pe=="["?N(le,we,te("]"),it):pe=="spread"?N(J,it):xe=="*"?(O.marked="keyword",N(At)):pe==":"?F(it):void 0;var Ee}function Ve(pe){return pe!="variable"?F(it):(O.marked="property",N(sa))}function it(pe){return pe==":"?N(J):pe=="("?F(sa):void 0}function dt(pe,xe,Ee){function Ze(Vt,Cn){if(Ee?Ee.indexOf(Vt)>-1:Vt==","){var on=O.state.lexical;return on.info=="call"&&(on.pos=(on.pos||0)+1),N(function(Pn,Mr){return Pn==xe||Mr==xe?F():F(pe)},Ze)}return Vt==xe||Cn==xe?N():Ee&&Ee.indexOf(";")>-1?F(pe):N(te(xe))}return function(Vt,Cn){return Vt==xe||Cn==xe?N():F(pe,Ze)}}function ot(pe,xe,Ee){for(var Ze=3;Ze<arguments.length;Ze++)O.cc.push(arguments[Ze]);return N(K(xe,Ee),dt(pe,xe),X)}function je(pe){return pe=="}"?N():F(ne,je)}function we(pe,xe){if(c){if(pe==":")return N(Ie);if(xe=="?")return N(we)}}function ze(pe,xe){if(c&&(pe==":"||xe=="in"))return N(Ie)}function me(pe){if(c&&pe==":")return O.stream.match(/^\s*\w+\s+is\b/,!1)?N(le,Me,Ie):N(Ie)}function Me(pe,xe){if(xe=="is")return O.marked="keyword",N()}function Ie(pe,xe){return xe=="keyof"||xe=="typeof"||xe=="infer"||xe=="readonly"?(O.marked="keyword",N(xe=="typeof"?J:Ie)):pe=="variable"||xe=="void"?(O.marked="type",N(rn)):xe=="|"||xe=="&"?N(Ie):pe=="string"||pe=="number"||pe=="atom"?N(rn):pe=="["?N(K("]"),dt(Ie,"]",","),X,rn):pe=="{"?N(K("}"),gt,X,rn):pe=="("?N(dt(Zt,")"),ht,rn):pe=="<"?N(dt(Ie,">"),Ie):pe=="quasi"?F(qt,rn):void 0}function ht(pe){if(pe=="=>")return N(Ie)}function gt(pe){return pe.match(/[\}\)\]]/)?N():pe==","||pe==";"?N(gt):F(vt,gt)}function vt(pe,xe){return pe=="variable"||O.style=="keyword"?(O.marked="property",N(vt)):xe=="?"||pe=="number"||pe=="string"?N(vt):pe==":"?N(Ie):pe=="["?N(te("variable"),ze,te("]"),vt):pe=="("?F(He,vt):pe.match(/[;\}\)\],]/)?void 0:N()}function qt(pe,xe){return pe!="quasi"?F():xe.slice(xe.length-2)!="${"?N(qt):N(Ie,mn)}function mn(pe){if(pe=="}")return O.marked="string-2",O.state.tokenize=x,N(qt)}function Zt(pe,xe){return pe=="variable"&&O.stream.match(/^\s*[?:]/,!1)||xe=="?"?N(Zt):pe==":"?N(Ie):pe=="spread"?N(Zt):F(Ie)}function rn(pe,xe){return xe=="<"?N(K(">"),dt(Ie,">"),X,rn):xe=="|"||pe=="."||xe=="&"?N(Ie):pe=="["?N(Ie,te("]"),rn):xe=="extends"||xe=="implements"?(O.marked="keyword",N(Ie)):xe=="?"?N(Ie,te(":"),Ie):void 0}function zn(pe,xe){if(xe=="<")return N(K(">"),dt(Ie,">"),X,rn)}function tt(){return F(Ie,kt)}function kt(pe,xe){if(xe=="=")return N(Ie)}function An(pe,xe){return xe=="enum"?(O.marked="keyword",N(Mo)):F(_n,we,Ar,Jr)}function _n(pe,xe){return c&&P(xe)?(O.marked="keyword",N(_n)):pe=="variable"?(L(xe),N()):pe=="spread"?N(_n):pe=="["?ot(Qr,"]"):pe=="{"?ot(po,"}"):void 0}function po(pe,xe){return pe!="variable"||O.stream.match(/^\s*:/,!1)?(pe=="variable"&&(O.marked="property"),pe=="spread"?N(_n):pe=="}"?F():pe=="["?N(le,te("]"),te(":"),po):N(te(":"),_n,Ar)):(L(xe),N(Ar))}function Qr(){return F(_n,Ar)}function Ar(pe,xe){if(xe=="=")return N(J)}function Jr(pe){if(pe==",")return N(An)}function Ao(pe,xe){if(pe=="keyword b"&&xe=="else")return N(K("form","else"),ne,X)}function pl(pe,xe){return xe=="await"?N(pl):pe=="("?N(K(")"),Go,X):void 0}function Go(pe){return pe=="var"?N(An,za):pe=="variable"?N(za):F(za)}function za(pe,xe){return pe==")"?N():pe==";"?N(za):xe=="in"||xe=="of"?(O.marked="keyword",N(le,za)):F(le,za)}function sa(pe,xe){return xe=="*"?(O.marked="keyword",N(sa)):pe=="variable"?(L(xe),N(sa)):pe=="("?N(z,K(")"),dt(Et,")"),X,me,ne,W):c&&xe=="<"?N(K(">"),dt(tt,">"),X,sa):void 0}function He(pe,xe){return xe=="*"?(O.marked="keyword",N(He)):pe=="variable"?(L(xe),N(He)):pe=="("?N(z,K(")"),dt(Et,")"),X,me,W):c&&xe=="<"?N(K(">"),dt(tt,">"),X,He):void 0}function lt(pe,xe){return pe=="keyword"||pe=="variable"?(O.marked="type",N(lt)):xe=="<"?N(K(">"),dt(tt,">"),X):void 0}function Et(pe,xe){return xe=="@"&&N(le,Et),pe=="spread"?N(Et):c&&P(xe)?(O.marked="keyword",N(Et)):c&&pe=="this"?N(we,Ar):F(_n,we,Ar)}function Kt(pe,xe){return pe=="variable"?gr(pe,xe):Bn(pe,xe)}function gr(pe,xe){if(pe=="variable")return L(xe),N(Bn)}function Bn(pe,xe){return xe=="<"?N(K(">"),dt(tt,">"),X,Bn):xe=="extends"||xe=="implements"||c&&pe==","?(xe=="implements"&&(O.marked="keyword"),N(c?Ie:le,Bn)):pe=="{"?N(K("}"),Ne,X):void 0}function Ne(pe,xe){return pe=="async"||pe=="variable"&&(xe=="static"||xe=="get"||xe=="set"||c&&P(xe))&&O.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(O.marked="keyword",N(Ne)):pe=="variable"||O.style=="keyword"?(O.marked="property",N(Tt,Ne)):pe=="number"||pe=="string"?N(Tt,Ne):pe=="["?N(le,we,te("]"),Tt,Ne):xe=="*"?(O.marked="keyword",N(Ne)):c&&pe=="("?F(He,Ne):pe==";"||pe==","?N(Ne):pe=="}"?N():xe=="@"?N(le,Ne):void 0}function Tt(pe,xe){if(xe=="!"||xe=="?")return N(Tt);if(pe==":")return N(Ie,Ar);if(xe=="=")return N(J);var Ee=O.state.lexical.prev;return F(Ee&&Ee.info=="interface"?He:sa)}function Oe(pe,xe){return xe=="*"?(O.marked="keyword",N(Ct,te(";"))):xe=="default"?(O.marked="keyword",N(le,te(";"))):pe=="{"?N(dt(nt,"}"),Ct,te(";")):F(ne)}function nt(pe,xe){return xe=="as"?(O.marked="keyword",N(te("variable"))):pe=="variable"?F(J,nt):void 0}function ut(pe){return pe=="string"?N():pe=="("?F(le):pe=="."?F(ve):F(xt,En,Ct)}function xt(pe,xe){return pe=="{"?ot(xt,"}"):(pe=="variable"&&L(xe),xe=="*"&&(O.marked="keyword"),N(ln))}function En(pe){if(pe==",")return N(xt,En)}function ln(pe,xe){if(xe=="as")return O.marked="keyword",N(xt)}function Ct(pe,xe){if(xe=="from")return O.marked="keyword",N(le)}function Fn(pe){return pe=="]"?N():F(dt(J,"]"))}function Mo(){return F(K("form"),_n,te("{"),K("}"),dt(jr,"}"),X,X)}function jr(){return F(_n,Ar)}function cr(pe,xe){return pe.lastType=="operator"||pe.lastType==","||p.test(xe.charAt(0))||/[,.]/.test(xe.charAt(0))}function Ha(pe,xe,Ee){return xe.tokenize==b&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(xe.lastType)||xe.lastType=="quasi"&&/\{\s*$/.test(pe.string.slice(0,pe.pos-(Ee||0)))}return z.lex=$.lex=!0,W.lex=!0,X.lex=!0,{startState:function(pe){var xe={tokenize:b,lastType:"sof",cc:[],lexical:new T((pe||0)-i,0,"block",!1),localVars:n.localVars,context:n.localVars&&new H(null,null,!1),indented:pe||0};return n.globalVars&&typeof n.globalVars=="object"&&(xe.globalVars=n.globalVars),xe},token:function(pe,xe){if(pe.sol()&&(xe.lexical.hasOwnProperty("align")||(xe.lexical.align=!1),xe.indented=pe.indentation(),E(pe,xe)),xe.tokenize!=w&&pe.eatSpace())return null;var Ee=xe.tokenize(pe,xe);return r=="comment"?Ee:(xe.lastType=r!="operator"||o!="++"&&o!="--"?r:"incdec",I(xe,Ee,r,o,pe))},indent:function(pe,xe){if(pe.tokenize==w||pe.tokenize==x)return e.Pass;if(pe.tokenize!=b)return 0;var Ee,Ze=xe&&xe.charAt(0),Vt=pe.lexical;if(!/^\s*else\b/.test(xe))for(var Cn=pe.cc.length-1;Cn>=0;--Cn){var on=pe.cc[Cn];if(on==X)Vt=Vt.prev;else if(on!=Ao&&on!=W)break}for(;(Vt.type=="stat"||Vt.type=="form")&&(Ze=="}"||(Ee=pe.cc[pe.cc.length-1])&&(Ee==ve||Ee==Ae)&&!/^[,\.=+\-*:?[\(]/.test(xe));)Vt=Vt.prev;a&&Vt.type==")"&&Vt.prev.type=="stat"&&(Vt=Vt.prev);var Pn=Vt.type,Mr=Ze==Pn;return Pn=="vardef"?Vt.indented+(pe.lastType=="operator"||pe.lastType==","?Vt.info.length+1:0):Pn=="form"&&Ze=="{"?Vt.indented:Pn=="form"?Vt.indented+i:Pn=="stat"?Vt.indented+(cr(pe,xe)?a||i:0):Vt.info!="switch"||Mr||n.doubleIndentSwitch==0?Vt.align?Vt.column+(Mr?0:1):Vt.indented+(Mr?0:i):Vt.indented+(/^(?:case|default)\b/.test(xe)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:Ha,skipExpression:function(pe){I(pe,"atom","atom","true",new e.StringStream("",2,null))}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})(Wx()),function(e){var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(v,g){if(this.cm=v,this.options=g,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var b=this;v.on("cursorActivity",this.activityFunc=function(){b.cursorActivity()})}}e.showHint=function(v,g,b){if(!g)return v.showHint(b);b&&b.async&&(g.async=!0);var y={hint:g};if(b)for(var w in b)y[w]=b[w];return v.showHint(y)},e.defineExtension("showHint",function(v){v=a(this,this.getCursor("start"),v);var g=this.listSelections();if(!(g.length>1)){if(this.somethingSelected()){if(!v.hint.supportsSelection)return;for(var b=0;b<g.length;b++)if(g[b].head.line!=g[b].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var y=this.state.completionActive=new r(this,v);!y.options.hint||(e.signal(this,"startCompletion",this),y.update(!0))}}),e.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var o=window.requestAnimationFrame||function(v){return setTimeout(v,1e3/60)},i=window.cancelAnimationFrame||clearTimeout;function a(v,g,b){var y=v.options.hintOptions,w={};for(var x in m)w[x]=m[x];if(y)for(var x in y)y[x]!==void 0&&(w[x]=y[x]);if(b)for(var x in b)b[x]!==void 0&&(w[x]=b[x]);return w.hint.resolve&&(w.hint=w.hint.resolve(v,g)),w}function l(v){return typeof v=="string"?v:v.text}function s(v,g){var b={Up:function(){g.moveFocus(-1)},Down:function(){g.moveFocus(1)},PageUp:function(){g.moveFocus(1-g.menuSize(),!0)},PageDown:function(){g.moveFocus(g.menuSize()-1,!0)},Home:function(){g.setFocus(0)},End:function(){g.setFocus(g.length-1)},Enter:g.pick,Tab:g.pick,Esc:g.close};/Mac/.test(navigator.platform)&&(b["Ctrl-P"]=function(){g.moveFocus(-1)},b["Ctrl-N"]=function(){g.moveFocus(1)});var y=v.options.customKeys,w=y?{}:b;function x(C,T){var k;k=typeof T!="string"?function(I){return T(I,g)}:b.hasOwnProperty(T)?b[T]:T,w[C]=k}if(y)for(var _ in y)y.hasOwnProperty(_)&&x(_,y[_]);var E=v.options.extraKeys;if(E)for(var _ in E)E.hasOwnProperty(_)&&x(_,E[_]);return w}function u(v,g){for(;g&&g!=v;){if(g.nodeName.toUpperCase()==="LI"&&g.parentNode==v)return g;g=g.parentNode}}function c(v,g){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=v,this.data=g,this.picked=!1;var b=this,y=v.cm,w=y.getInputField().ownerDocument,x=w.defaultView||w.parentWindow,_=this.hints=w.createElement("ul");_.setAttribute("role","listbox"),_.setAttribute("aria-expanded","true"),_.id=this.id;var E=v.cm.options.theme;_.className="CodeMirror-hints "+E,this.selectedHint=g.selectedHint||0;for(var C=g.list,T=0;T<C.length;++T){var k=_.appendChild(w.createElement("li")),I=C[T],O=t+(T!=this.selectedHint?"":" "+n);I.className!=null&&(O=I.className+" "+O),k.className=O,T==this.selectedHint&&k.setAttribute("aria-selected","true"),k.id=this.id+"-"+T,k.setAttribute("role","option"),I.render?I.render(k,g,I):k.appendChild(w.createTextNode(I.displayText||l(I))),k.hintId=T}var F=v.options.container||w.body,N=y.cursorCoords(v.options.alignWithWord?g.from:null),B=N.left,L=N.bottom,V=!0,P=0,H=0;if(F!==w.body){var U=["absolute","relative","fixed"].indexOf(x.getComputedStyle(F).position)!==-1?F:F.offsetParent,G=U.getBoundingClientRect(),z=w.body.getBoundingClientRect();P=G.left-z.left-U.scrollLeft,H=G.top-z.top-U.scrollTop}_.style.left=B-P+"px",_.style.top=L-H+"px";var $=x.innerWidth||Math.max(w.body.offsetWidth,w.documentElement.offsetWidth),W=x.innerHeight||Math.max(w.body.offsetHeight,w.documentElement.offsetHeight);F.appendChild(_),y.getInputField().setAttribute("aria-autocomplete","list"),y.getInputField().setAttribute("aria-owns",this.id),y.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var K,X=v.options.moveOnOverlap?_.getBoundingClientRect():new DOMRect,te=!!v.options.paddingForScrollbar&&_.scrollHeight>_.clientHeight+1;if(setTimeout(function(){K=y.getScrollInfo()}),X.bottom-W>0){var ne=X.bottom-X.top;if(N.top-(N.bottom-X.top)-ne>0)_.style.top=(L=N.top-ne-H)+"px",V=!1;else if(ne>W){_.style.height=W-5+"px",_.style.top=(L=N.bottom-X.top-H)+"px";var se=y.getCursor();g.from.ch!=se.ch&&(N=y.cursorCoords(se),_.style.left=(B=N.left-P)+"px",X=_.getBoundingClientRect())}}var le,J=X.right-$;if(te&&(J+=y.display.nativeBarWidth),J>0&&(X.right-X.left>$&&(_.style.width=$-5+"px",J-=X.right-X.left-$),_.style.left=(B=Math.max(N.left-J-P,0))+"px"),te)for(var Z=_.firstChild;Z;Z=Z.nextSibling)Z.style.paddingRight=y.display.nativeBarWidth+"px";y.addKeyMap(this.keyMap=s(v,{moveFocus:function(be,ve){b.changeActive(b.selectedHint+be,ve)},setFocus:function(be){b.changeActive(be)},menuSize:function(){return b.screenAmount()},length:C.length,close:function(){v.close()},pick:function(){b.pick()},data:g})),v.options.closeOnUnfocus&&(y.on("blur",this.onBlur=function(){le=setTimeout(function(){v.close()},100)}),y.on("focus",this.onFocus=function(){clearTimeout(le)})),y.on("scroll",this.onScroll=function(){var be=y.getScrollInfo(),ve=y.getWrapperElement().getBoundingClientRect();K||(K=y.getScrollInfo());var Ae=L+K.top-be.top,Ce=Ae-(x.pageYOffset||(w.documentElement||w.body).scrollTop);if(V||(Ce+=_.offsetHeight),Ce<=ve.top||Ce>=ve.bottom)return v.close();_.style.top=Ae+"px",_.style.left=B+K.left-be.left+"px"}),e.on(_,"dblclick",function(be){var ve=u(_,be.target||be.srcElement);ve&&ve.hintId!=null&&(b.changeActive(ve.hintId),b.pick())}),e.on(_,"click",function(be){var ve=u(_,be.target||be.srcElement);ve&&ve.hintId!=null&&(b.changeActive(ve.hintId),v.options.completeOnSingleClick&&b.pick())}),e.on(_,"mousedown",function(){setTimeout(function(){y.focus()},20)});var ye=this.getSelectedHintRange();return(ye.from!==0||ye.to!==0)&&this.scrollToActive(),e.signal(g,"select",C[this.selectedHint],_.childNodes[this.selectedHint]),!0}function d(v,g){if(!v.somethingSelected())return g;for(var b=[],y=0;y<g.length;y++)g[y].supportsSelection&&b.push(g[y]);return b}function f(v,g,b,y){if(v.async)v(g,y,b);else{var w=v(g,b);w&&w.then?w.then(y):y(w)}}function p(v,g){var b,y=v.getHelpers(g,"hint");if(y.length){var w=function(x,_,E){var C=d(x,y);function T(k){if(k==C.length)return _(null);f(C[k],x,E,function(I){I&&I.list.length>0?_(I):T(k+1)})}T(0)};return w.async=!0,w.supportsSelection=!0,w}return(b=v.getHelper(v.getCursor(),"hintWords"))?function(x){return e.hint.fromList(x,{words:b})}:e.hint.anyword?function(x,_){return e.hint.anyword(x,_)}:function(){}}r.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(v,g){var b=v.list[g],y=this;this.cm.operation(function(){b.hint?b.hint(y.cm,v,b):y.cm.replaceRange(l(b),b.from||v.from,b.to||v.to,"complete"),e.signal(v,"pick",b),y.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var v=this.startPos;this.data&&(v=this.data.from);var g=this.cm.getCursor(),b=this.cm.getLine(g.line);if(g.line!=this.startPos.line||b.length-g.ch!=this.startLen-this.startPos.ch||g.ch<v.ch||this.cm.somethingSelected()||!g.ch||this.options.closeCharacters.test(b.charAt(g.ch-1)))this.close();else{var y=this;this.debounce=o(function(){y.update()}),this.widget&&this.widget.disable()}},update:function(v){if(this.tick!=null){var g=this,b=++this.tick;f(this.options.hint,this.cm,this.options,function(y){g.tick==b&&g.finishUpdate(y,v)})}},finishUpdate:function(v,g){this.data&&e.signal(this.data,"update");var b=this.widget&&this.widget.picked||g&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=v,v&&v.list.length&&(b&&v.list.length==1?this.pick(v,0):(this.widget=new c(this,v),e.signal(v,"shown")))}},c.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var v=this.completion.cm.getInputField();v.removeAttribute("aria-activedescendant"),v.removeAttribute("aria-owns");var g=this.completion.cm;this.completion.options.closeOnUnfocus&&(g.off("blur",this.onBlur),g.off("focus",this.onFocus)),g.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var v=this;this.keyMap={Enter:function(){v.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(v,g){if(v>=this.data.list.length?v=g?this.data.list.length-1:0:v<0&&(v=g?0:this.data.list.length-1),this.selectedHint!=v){var b=this.hints.childNodes[this.selectedHint];b&&(b.className=b.className.replace(" "+n,""),b.removeAttribute("aria-selected")),(b=this.hints.childNodes[this.selectedHint=v]).className+=" "+n,b.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",b.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],b)}},scrollToActive:function(){var v=this.getSelectedHintRange(),g=this.hints.childNodes[v.from],b=this.hints.childNodes[v.to],y=this.hints.firstChild;g.offsetTop<this.hints.scrollTop?this.hints.scrollTop=g.offsetTop-y.offsetTop:b.offsetTop+b.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=b.offsetTop+b.offsetHeight-this.hints.clientHeight+y.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var v=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-v),to:Math.min(this.data.list.length-1,this.selectedHint+v)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",function(v,g){var b,y=v.getCursor(),w=v.getTokenAt(y),x=e.Pos(y.line,w.start),_=y;w.start<y.ch&&/\w/.test(w.string.charAt(y.ch-w.start-1))?b=w.string.substr(0,y.ch-w.start):(b="",x=y);for(var E=[],C=0;C<g.words.length;C++){var T=g.words[C];T.slice(0,b.length)==b&&E.push(T)}if(E.length)return{list:E,from:x,to:_}}),e.commands.autocomplete=e.showHint;var m={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(Wx()),function(e){var t=e.Pos;function n(v,g){for(var b=0,y=v.length;b<y;++b)g(v[b])}function r(v,g){if(!Array.prototype.indexOf){for(var b=v.length;b--;)if(v[b]===g)return!0;return!1}return v.indexOf(g)!=-1}function o(v,g,b,y){var w=v.getCursor(),x=b(v,w);if(!/\b(?:string|comment)\b/.test(x.type)){var _=e.innerMode(v.getMode(),x.state);if(_.mode.helperType!=="json"){x.state=_.state,/^[\w$_]*$/.test(x.string)?x.end>w.ch&&(x.end=w.ch,x.string=x.string.slice(0,w.ch-x.start)):x={start:w.ch,end:w.ch,string:"",state:x.state,type:x.string=="."?"property":null};for(var E=x;E.type=="property";){if((E=b(v,t(w.line,E.start))).string!=".")return;if(E=b(v,t(w.line,E.start)),!C)var C=[];C.push(E)}return{list:m(x,C,g,y),from:t(w.line,x.start),to:t(w.line,x.end)}}}}function i(v,g){return o(v,d,function(b,y){return b.getTokenAt(y)},g)}function a(v,g){var b=v.getTokenAt(g);return g.ch==b.start+1&&b.string.charAt(0)=="."?(b.end=b.start,b.string=".",b.type="property"):/^\.[\w$_]*$/.test(b.string)&&(b.type="property",b.start++,b.string=b.string.replace(/\./,"")),b}function l(v,g){return o(v,f,a,g)}e.registerHelper("hint","javascript",i),e.registerHelper("hint","coffeescript",l);var s="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),u="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),c="prototype apply call bind".split(" "),d="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function p(v,g){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var b=v;b;b=Object.getPrototypeOf(b))Object.getOwnPropertyNames(b).forEach(g);else for(var y in v)g(y)}function m(v,g,b,y){var w=[],x=v.string,_=y&&y.globalScope||window;function E(N){N.lastIndexOf(x,0)==0&&!r(w,N)&&w.push(N)}function C(N){typeof N=="string"?n(s,E):N instanceof Array?n(u,E):N instanceof Function&&n(c,E),p(N,E)}if(g&&g.length){var T,k=g.pop();for(k.type&&k.type.indexOf("variable")===0?(y&&y.additionalContext&&(T=y.additionalContext[k.string]),(!y||y.useGlobalScope!==!1)&&(T=T||_[k.string])):k.type=="string"?T="":k.type=="atom"?T=1:k.type=="function"&&(_.jQuery==null||k.string!="$"&&k.string!="jQuery"||typeof _.jQuery!="function"?_._!=null&&k.string=="_"&&typeof _._=="function"&&(T=_._()):T=_.jQuery());T!=null&&g.length;)T=T[g.pop().string];T!=null&&C(T)}else{for(var I=v.state.localVars;I;I=I.next)E(I.name);for(var O=v.state.context;O;O=O.prev)for(I=O.vars;I;I=I.next)E(I.name);for(I=v.state.globalVars;I;I=I.next)E(I.name);if(y&&y.additionalContext!=null)for(var F in y.additionalContext)E(F);(!y||y.useGlobalScope!==!1)&&C(_),n(b,E)}return w}}(Wx());const nu=e=>El({message:e,type:"error",customClass:"_fc-message-error"}),jo=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Lfe="[[FORM-CREATE-PREFIX-",Pfe="-FORM-CREATE-SUFFIX]]",FUe=Te({name:"FnEditor",emits:["update:modelValue","change"],props:{modelValue:[String,Function],name:String,args:Array,body:Boolean,button:Boolean,fnx:Boolean},inject:["designer"],data:()=>({editor:null,fn:"",visible:!1,value:""}),watch:{modelValue(e){e!=this.value&&(!e||!e.__json||e.__json&&e.__json!=this.value)&&this.editor&&this.editor.setValue(this.tidyValue())}},computed:{t(){return this.designer.setupState.t},argStr(){return(this.args||[]).map(e=>typeof e=="string"?e:e.name).join(", ")},argList(){return this.args.map(e=>typeof e=="string"?{name:e,type:"string"}:e)}},mounted(){this.$nextTick(()=>{this.load()})},methods:{save(){const e=this.editor.getValue()||"";if(e.trim()==="")this.fn="";else{let t;try{t=new Function("return function "+this.name+"("+this.argStr+"){"+e+"}")()}catch(n){return console.error(n),nu(this.t("struct.errorMsg")),!1}this.body?this.fn=(this.fnx?"$FNX:":"")+e:this.fn=Lfe+t+Pfe}return this.submit(),!0},submit(){this.$emit("update:modelValue",this.fn),this.$emit("change",this.fn),this.value=this.fn,this.visible=!1},tidyValue(){let e=this.modelValue||"";return e.__json&&(e=e.__json),this.fnx&&e.indexOf("$FNX:")===0&&(e=e.slice(5)),typeof e=="function"?(e=pp(e),e=/(?:function\s*\w*\s*\(.*?\)|\(\s*.*?\s*\)\s*=>)\s*{([\s\S]*)}/g.exec(e)[1].trim()):this.body||(e=e.replace(Lfe+"function "+this.name+"("+this.argStr+"){","").replace("}"+Pfe,"")),this.value=e,e},load(){this.$nextTick(()=>{let e=this.tidyValue();this.editor=Fo(Mg(this.$refs.editor,{lineNumbers:!0,mode:{name:"javascript",globalVars:!0},extraKeys:{"Ctrl-Space":"autocomplete"},line:!0,tabSize:2,lineWrapping:!0,value:e})),this.editor.on("inputRead",(t,n)=>{n.keyCode===32&&n.ctrlKey&&Mg.showHint(t,Mg.hint.javascript)}),this.editor.on("change",()=>{this.visible=!0}),function(t){t.addKeyMap({name:"autoParentheses","'('":n=>{const r=n.getCursor();n.replaceRange("()",r,r,"+insert"),n.doc.setCursor({line:r.line,ch:r.ch+1})}}),t.addKeyMap({name:"autoBraces","'{'":n=>{const r=n.getCursor();n.replaceRange("{}",r,r,"+insert"),n.doc.setCursor({line:r.line,ch:r.ch+1})}}),t.addKeyMap({name:"autoBrackets","'['":n=>{const r=n.getCursor();n.replaceRange("[]",r,r,"+insert"),n.doc.setCursor({line:r.line,ch:r.ch+1})}})}(this.editor)})}}}),RUe={class:"_fd-fn"},IUe={class:"_fd-fn-tip"},BUe=ce("div",{class:"_fd-fn-ind"},null,-1),LUe={class:"cm-keyword"},PUe={key:0},jUe={class:"_fd-fn-arg"},VUe=ce("i",{class:"fc-icon icon-question"},null,-1),zUe={ref:"editor",class:"_fd-fn-editor"},HUe=ce("div",{class:"_fd-fn-tip"},[ce("div",{class:"_fd-fn-ind"}),ce("div",{class:"cm-keyword"},"}")],-1),Gx=jo(FUe,[["render",function(e,t,n,r,o,i){const a=Qe("el-table-column"),l=Qe("el-table"),s=Qe("el-popover"),u=Qe("el-button");return Y(),fe("div",RUe,[ce("div",IUe,[BUe,ce("div",LUe,[ce("span",null,[Dt("function "+Ye(e.name)+"(",1),(Y(!0),fe(bt,null,bn(e.argList,(c,d)=>(Y(),fe(bt,null,[Dt(Ye(d>0?", ":""),1),c.type==="string"?(Y(),fe("span",PUe,Ye(c.name),1)):(Y(),Pe(s,{key:1,placement:"top-start",width:400,trigger:"click",title:c.name,content:c.info||""},{reference:he(()=>[ce("span",jUe,[Dt(Ye(c.name),1),VUe])]),default:he(()=>[c.columns?(Y(),Pe(l,{key:0,data:c.columns,border:""},{default:he(()=>[ie(a,{width:"120",property:"label",label:e.t("event.label")},null,8,["label"]),ie(a,{property:"info",label:e.t("event.info")},null,8,["label"]),ie(a,{width:"80",property:"type",label:e.t("event.type")},null,8,["label"])]),_:2},1032,["data"])):Fe("",!0)]),_:2},1032,["title","content"]))],64))),256)),Dt(") {")])])]),ce("div",zUe,null,512),HUe,e.visible&&e.button?(Y(),Pe(u,{key:0,type:"primary",size:"small",onClick:e.save},{default:he(()=>[Dt(Ye(e.t("props.save")),1)]),_:1},8,["onClick"])):Fe("",!0)])}]]),Ng="$FNX:",qx=e=>Lr.String(e)&&e.indexOf(Ng)===0,$Ue=Te({name:"EventConfig",emits:["update:modelValue"],props:{modelValue:[Object,void 0,null],componentName:"",eventName:{type:Array,default:()=>[]}},inject:["designer"],components:{FnEditor:Gx},data:()=>({visible:!1,activeData:null,val:null,defActive:"no",event:{},cus:!1,cusValue:"",eventStr:""}),computed:{t(){return this.designer.setupState.t},eventNum(){let e=0;return Object.keys(this.modelValue||{}).forEach(t=>{e+=Array.isArray(this.modelValue[t])?this.modelValue[t].length:1}),e},fnArgs(){return[Wde(this.t)]}},watch:{visible(e){this.event=e?this.loadFN(Cx({},this.modelValue||{})):{},e||(this.destroy(),this.closeCus())}},methods:{addCus(){const e=this.cusValue&&this.cusValue.trim();e&&(this.closeCus(),this.add(e))},closeCus(){this.cus=!1,this.cusValue=""},cusEvent(){this.cus=!0},loadFN(e){const t={};return Object.keys(e).forEach(n=>{if(Array.isArray(e[n])){const r=[];e[n].forEach(o=>{qx(o)?r.push(o.replace(Ng,"")):Lr.Function(o)&&qx(o.__json)?r.push(o.__json.replace(Ng,"")):o&&o.indexOf("$GLOBAL:")===0&&r.push(o)}),t[n]=r}else qx(e[n])?t[n]=[e[n].replace(Ng,"")]:Lr.Function(e[n])&&qx(e[n].__json)?t[n]=[e[n].__json.replace(Ng,"")]:e[n]&&e[n].indexOf("$GLOBAL:")===0&&(t[n]=[e[n]])}),t},parseFN(e){const t={};return Object.keys(e).forEach(n=>{const r=[];e[n].forEach((o,i)=>{r[i]=o.indexOf("$GLOBAL:")!==0?Ng+o:o}),r.length>0&&(t[n]=r.length===1?r[0]:r)}),t},add(e){let t={};if(Array.isArray(this.event[e]))this.event[e].push(""),t={name:e,item:this.event[e],index:this.event[e].length-1};else if(this.event[e]){const n=[this.event[e],""];this.event[e]=n,t={name:e,item:n,index:1}}else{const n=[""];this.event[e]=n,t={name:e,item:n,index:0}}this.activeData||this.edit(t)},edit(e){e.key=vr(),e.item?this.val=e.item[e.index]:this.val=this.event[e.name],this.activeData=e,this.eventStr=this.val,this.defActive=e.name+(e.index||0)},save(){if(!this.$refs.fn.save())return;const e=this.eventStr;this.activeData.item?this.activeData.item[this.activeData.index]=e:this.event[this.activeData.name]=e,this.destroy()},rm(e){e.index!==void 0?e.item.splice(e.index,1):this.$delete(this.event,e.name),this.defActive===e.name+(e.index||0)&&this.destroy()},destroy(){this.activeData=null,this.val=null,this.defActive="no"},close(){this.destroy()},submit(){if(this.activeData)return nu(this.t("event.saveMsg"));this.$emit("update:modelValue",this.parseFN(this.event)),this.visible=!1,this.destroy(),this.closeCus()}},beforeCreate(){window.$inject={$f:{},rule:[],self:{},option:{},inject:{},args:[]}}}),UUe={class:"_fd-event"},WUe={class:"el-dropdown-link"},GUe=ce("i",{class:"el-icon-arrow-down el-icon--right"},null,-1),qUe={class:"_fd-event-item"},KUe=["onClick"],YUe={class:"_fd-event-method"},XUe=["onClick"],QUe=["onClick"],JUe={class:"_fd-event-method"},ZUe=["onClick"],eWe={target:"_blank",href:"https://form-create.com/v3/instance"},jfe=jo($Ue,[["render",function(e,t,n,r,o,i){const a=Qe("el-button"),l=Qe("el-badge"),s=Qe("el-dropdown-item"),u=Qe("el-dropdown-menu"),c=Qe("el-dropdown"),d=Qe("el-header"),f=Qe("el-menu-item"),p=Qe("el-input"),m=Qe("el-menu"),v=Qe("el-main"),g=Qe("el-container"),b=Qe("el-aside"),y=Qe("FnEditor"),w=Qe("el-dialog");return Y(),fe("div",UUe,[ie(l,{value:e.eventNum,type:"warning",hidden:e.eventNum<1},{default:he(()=>[ie(a,{size:"small",onClick:t[0]||(t[0]=x=>e.visible=!0)},{default:he(()=>[Dt(Ye(e.t("event.title")),1)]),_:1})]),_:1},8,["value","hidden"]),ie(w,{class:"_fd-event-dialog",title:e.t("event.title"),modelValue:e.visible,"onUpdate:modelValue":t[8]||(t[8]=x=>e.visible=x),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"980px"},{footer:he(()=>[ce("div",null,[ie(a,{size:"default",onClick:t[7]||(t[7]=x=>e.visible=!1)},{default:he(()=>[Dt(Ye(e.t("props.cancel")),1)]),_:1}),ie(a,{type:"primary",size:"default",onClick:e.submit,color:"#2f73ff"},{default:he(()=>[Dt(Ye(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:he(()=>[ie(g,{class:"_fd-event-con",style:{height:"600px"}},{default:he(()=>[ie(b,{style:{width:"300px"}},{default:he(()=>[ie(g,{class:"_fd-event-l"},{default:he(()=>[ie(d,{class:"_fd-event-head",height:"40px"},{default:he(()=>[ie(c,{"popper-class":"_fd-event-dropdown",trigger:"click",size:"default",placement:"bottom-start"},{dropdown:he(()=>[ie(u,null,{default:he(()=>[(Y(!0),fe(bt,null,bn(e.eventName,x=>(Y(),Pe(s,{key:x,onClick:_=>e.add(x)},{default:he(()=>[ce("div",qUe,[ce("span",null,Ye(x),1)])]),_:2},1032,["onClick"]))),128)),ie(s,{divided:e.eventName.length>0,onClick:e.cusEvent},{default:he(()=>[ce("div",null,Ye(e.t("props.custom")),1)]),_:1},8,["divided","onClick"])]),_:1})]),default:he(()=>[ce("span",WUe,[ie(a,{link:"",type:"primary",size:"default"},{default:he(()=>[Dt(Ye(e.t("event.create")),1),GUe]),_:1})])]),_:1})]),_:1}),ie(v,null,{default:he(()=>[ie(m,{"default-active":e.defActive,modelValue:e.activeData,"onUpdate:modelValue":t[5]||(t[5]=x=>e.activeData=x)},{default:he(()=>[(Y(!0),fe(bt,null,bn(e.event,(x,_)=>(Y(),fe(bt,null,[Array.isArray(x)?(Y(!0),fe(bt,{key:0},bn(x,(E,C)=>(Y(),Pe(f,{key:_+C,index:_+C},{default:he(()=>[ce("div",{class:"_fd-event-title",onClick:Gt(T=>e.edit({name:_,item:x,index:C}),["stop"])},[ce("div",YUe,[ce("span",null,[Dt("function"),ce("span",null,Ye(_),1)])]),ce("i",{class:"fc-icon icon-delete",onClick:Gt(T=>e.rm({name:_,item:x,index:C}),["stop"])},null,8,XUe)],8,KUe)]),_:2},1032,["index"]))),128)):(Y(),Pe(f,{key:1,index:_+0},{default:he(()=>[ce("div",{class:"_fd-event-title",onClick:Gt(E=>e.edit({name:_}),["stop"])},[ce("div",JUe,[ce("span",null,[Dt("function"),ce("span",null,Ye(_),1)])]),ce("i",{class:"fc-icon icon-delete",onClick:Gt(E=>e.rm({name:_}),["stop"])},null,8,ZUe)],8,QUe)]),_:2},1032,["index"]))],64))),256)),e.cus?(Y(),Pe(f,{key:0,style:{"padding-left":"10px"},index:"custom"},{default:he(()=>[ce("div",{class:"_fd-event-title",onClick:t[4]||(t[4]=Gt(()=>{},["stop"]))},[ie(p,{type:"text",modelValue:e.cusValue,"onUpdate:modelValue":t[1]||(t[1]=x=>e.cusValue=x),size:"default",onKeydown:Rr(e.addCus,["enter"]),placeholder:e.t("event.placeholder")},null,8,["modelValue","onKeydown","placeholder"]),ce("div",null,[ce("i",{class:"fc-icon icon-add",onClick:t[2]||(t[2]=Gt((...x)=>e.addCus&&e.addCus(...x),["stop"]))}),ce("i",{class:"fc-icon icon-delete",onClick:t[3]||(t[3]=Gt((...x)=>e.closeCus&&e.closeCus(...x),["stop"]))})])])]),_:1})):Fe("",!0)]),_:1},8,["default-active","modelValue"])]),_:1})]),_:1})]),_:1}),ie(v,null,{default:he(()=>[ie(g,{class:"_fd-event-r"},{default:he(()=>[e.activeData?(Y(),Pe(d,{key:0,class:"_fd-event-head",height:"40px"},{default:he(()=>[ce("div",null,[ce("a",eWe,Ye(e.t("form.document")),1)]),ce("div",null,[ie(a,{size:"small",onClick:e.close},{default:he(()=>[Dt(Ye(e.t("props.cancel")),1)]),_:1},8,["onClick"]),ie(a,{size:"small",type:"primary",onClick:e.save,color:"#2f73ff"},{default:he(()=>[Dt(Ye(e.t("props.save")),1)]),_:1},8,["onClick"])])]),_:1})):Fe("",!0),e.activeData?(Y(),Pe(v,{key:1},{default:he(()=>[ie(y,{ref:"fn",modelValue:e.eventStr,"onUpdate:modelValue":t[6]||(t[6]=x=>e.eventStr=x),body:"",name:e.activeData.name,args:e.fnArgs,style:{height:"519px"}},null,8,["modelValue","name","args"])]),_:1})):Fe("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}]]);function tWe(e,t){var n=null;return function(...r){n!==null&&clearTimeout(n),n=setTimeout(()=>e.call(this,...r),t)}}function Vfe(e){return e instanceof Map?e.clear=e.delete=e.set=()=>{throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{throw Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;r!=="object"&&r!=="function"||Object.isFrozen(n)||Vfe(n)}),e}let zfe=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Hfe(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function gp(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(r=>{for(const o in r)n[o]=r[o]}),n}const $fe=e=>!!e.scope;let nWe=class{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Hfe(e)}openNode(e){if(!$fe(e))return;const t=((n,{prefix:r})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const o=n.split(".");return[`${r}${o.shift()}`,...o.map((i,a)=>`${i}${"_".repeat(a+1)}`)].join(" ")}return`${r}${n}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){$fe(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}};const Ufe=(e={})=>{const t={children:[]};return Object.assign(t,e),t};let rWe=class GOe{constructor(){this.rootNode=Ufe(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Ufe({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{GOe._collapse(n)}))}},oWe=class extends rWe{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope="language:"+t),this.add(n)}toHTML(){return new nWe(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function O4(e){return e?typeof e=="string"?e:e.source:null}function Wfe(e){return y1("(?=",e,")")}function iWe(e){return y1("(?:",e,")*")}function aWe(e){return y1("(?:",e,")?")}function y1(...e){return e.map(t=>O4(t)).join("")}function pB(...e){return"("+((t=>{const n=t[t.length-1];return typeof n=="object"&&n.constructor===Object?(t.splice(t.length-1,1),n):{}})(e).capture?"":"?:")+e.map(t=>O4(t)).join("|")+")"}function Gfe(e){return RegExp(e.toString()+"|").exec("").length-1}const lWe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function hB(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const o=n;let i=O4(r),a="";for(;i.length>0;){const l=lWe.exec(i);if(!l){a+=i;break}a+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?a+="\\"+(Number(l[1])+o):(a+=l[0],l[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const qfe="[a-zA-Z]\\w*",vB="[a-zA-Z_]\\w*",Kfe="\\b\\d+(\\.\\d+)?",Yfe="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Xfe="\\b(0b[01]+)",T4={begin:"\\\\[\\s\\S]",relevance:0},sWe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[T4]},uWe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[T4]},Kx=(e,t,n={})=>{const r=gp({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=pB("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:y1(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},cWe=Kx("//","$"),dWe=Kx("/\\*","\\*/"),fWe=Kx("#","$");var Yx=Object.freeze({__proto__:null,APOS_STRING_MODE:sWe,BACKSLASH_ESCAPE:T4,BINARY_NUMBER_MODE:{scope:"number",begin:Xfe,relevance:0},BINARY_NUMBER_RE:Xfe,COMMENT:Kx,C_BLOCK_COMMENT_MODE:dWe,C_LINE_COMMENT_MODE:cWe,C_NUMBER_MODE:{scope:"number",begin:Yfe,relevance:0},C_NUMBER_RE:Yfe,END_SAME_AS_BEGIN:e=>Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}}),HASH_COMMENT_MODE:fWe,IDENT_RE:qfe,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+vB,relevance:0},NUMBER_MODE:{scope:"number",begin:Kfe,relevance:0},NUMBER_RE:Kfe,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:uWe,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[T4,{begin:/\[/,end:/\]/,relevance:0,contains:[T4]}]},RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=y1(t,/.*\b/,e.binary,/\b.*/)),gp({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},TITLE_MODE:{scope:"title",begin:qfe,relevance:0},UNDERSCORE_IDENT_RE:vB,UNDERSCORE_TITLE_MODE:{scope:"title",begin:vB,relevance:0}});function pWe(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function hWe(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function vWe(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=pWe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function mWe(e,t){Array.isArray(e.illegal)&&(e.illegal=pB(...e.illegal))}function gWe(e,t){if(e.match){if(e.begin||e.end)throw Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function yWe(e,t){e.relevance===void 0&&(e.relevance=1)}const bWe=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=y1(n.beforeMatch,Wfe(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},AWe=["of","and","for","in","not","or","if","then","parent","list","value"],wWe="keyword";function Qfe(e,t,n=wWe){const r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(i=>{Object.assign(r,Qfe(e[i],t,i))}),r;function o(i,a){t&&(a=a.map(l=>l.toLowerCase())),a.forEach(l=>{const s=l.split("|");r[s[0]]=[i,xWe(s[0],s[1])]})}}function xWe(e,t){return t?Number(t):(n=>AWe.includes(n.toLowerCase()))(e)?0:1}const Jfe={},b1=e=>{console.error(e)},Zfe=(e,...t)=>{console.log("WARN: "+e,...t)},Fg=(e,t)=>{Jfe[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Jfe[`${e}/${t}`]=!0)},Xx=Error();function epe(e,t,{key:n}){let r=0;const o=e[n],i={},a={};for(let l=1;l<=t.length;l++)a[l+r]=o[l],i[l+r]=!0,r+=Gfe(t[l-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function _We(e){(t=>{t.scope&&typeof t.scope=="object"&&t.scope!==null&&(t.beginScope=t.scope,delete t.scope)})(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),(t=>{if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw b1("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Xx;if(typeof t.beginScope!="object"||t.beginScope===null)throw b1("beginScope must be object"),Xx;epe(t,t.begin,{key:"beginScope"}),t.begin=hB(t.begin,{joinWith:""})}})(e),(t=>{if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw b1("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Xx;if(typeof t.endScope!="object"||t.endScope===null)throw b1("endScope must be object"),Xx;epe(t,t.end,{key:"endScope"}),t.end=hB(t.end,{joinWith:""})}})(e)}function EWe(e){function t(o,i){return RegExp(O4(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(i?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(i,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,i]),this.matchAt+=Gfe(i)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const i=this.regexes.map(a=>a[1]);this.matcherRe=t(hB(i,{joinWith:"|"}),!0),this.lastIndex=0}exec(i){this.matcherRe.lastIndex=this.lastIndex;const a=this.matcherRe.exec(i);if(!a)return null;const l=a.findIndex((u,c)=>c>0&&u!==void 0),s=this.matchIndexes[l];return a.splice(0,l),Object.assign(a,s)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(i){if(this.multiRegexes[i])return this.multiRegexes[i];const a=new n;return this.rules.slice(i).forEach(([l,s])=>a.addRule(l,s)),a.compile(),this.multiRegexes[i]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(i,a){this.rules.push([i,a]),a.type==="begin"&&this.count++}exec(i){const a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let l=a.exec(i);if(this.resumingScanAtSamePosition()&&(!l||l.index!==this.lastIndex)){const s=this.getMatcher(0);s.lastIndex=this.lastIndex+1,l=s.exec(i)}return l&&(this.regexIndex+=l.position+1,this.regexIndex===this.count&&this.considerAll()),l}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=gp(e.classNameAliases||{}),function o(i,a){const l=i;if(i.isCompiled)return l;[hWe,gWe,_We,bWe].forEach(u=>u(i,a)),e.compilerExtensions.forEach(u=>u(i,a)),i.__beforeBegin=null,[vWe,mWe,yWe].forEach(u=>u(i,a)),i.isCompiled=!0;let s=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),s=i.keywords.$pattern,delete i.keywords.$pattern),s=s||/\w+/,i.keywords&&(i.keywords=Qfe(i.keywords,e.case_insensitive)),l.keywordPatternRe=t(s,!0),a&&(i.begin||(i.begin=/\B|\b/),l.beginRe=t(l.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(l.endRe=t(l.end)),l.terminatorEnd=O4(l.end)||"",i.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(i.end?"|":"")+a.terminatorEnd)),i.illegal&&(l.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(u=>(c=>(c.variants&&!c.cachedVariants&&(c.cachedVariants=c.variants.map(d=>gp(c,{variants:null},d))),c.cachedVariants?c.cachedVariants:tpe(c)?gp(c,{starts:c.starts?gp(c.starts):null}):Object.isFrozen(c)?gp(c):c))(u==="self"?i:u))),i.contains.forEach(u=>{o(u,l)}),i.starts&&o(i.starts,a),l.matcher=(u=>{const c=new r;return u.contains.forEach(d=>c.addRule(d.begin,{rule:d,type:"begin"})),u.terminatorEnd&&c.addRule(u.terminatorEnd,{type:"end"}),u.illegal&&c.addRule(u.illegal,{type:"illegal"}),c})(l),l}(e)}function tpe(e){return!!e&&(e.endsWithParent||tpe(e.starts))}let CWe=class extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}};const mB=Hfe,npe=gp,rpe=Symbol("nomatch"),ope=e=>{const t=Object.create(null),n=Object.create(null),r=[];let o=!0;const i="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:oWe};function s(w){return l.noHighlightRe.test(w)}function u(w,x,_){let E="",C="";typeof x=="object"?(E=w,_=x.ignoreIllegals,C=x.language):(Fg("10.7.0","highlight(lang, code, ...args) has been deprecated."),Fg("10.7.0",`Please use highlight(code, options) instead. |
|
78 |
https://github.com/highlightjs/highlight.js/issues/2277`),C=w,E=x),_===void 0&&(_=!0);const T={code:E,language:C};y("before:highlight",T);const k=T.result?T.result:c(T.language,T.code,_);return k.code=T.code,y("after:highlight",k),k}function c(w,x,_,E){const C=Object.create(null);function T(){if(!z.keywords)return W.addText(K);let le=0;z.keywordPatternRe.lastIndex=0;let J=z.keywordPatternRe.exec(K),Z="";for(;J;){Z+=K.substring(le,J.index);const be=H.case_insensitive?J[0].toLowerCase():J[0],ve=(ye=be,z.keywords[ye]);if(ve){const[Ae,Ce]=ve;if(W.addText(Z),Z="",C[be]=(C[be]||0)+1,C[be]<=7&&(X+=Ce),Ae.startsWith("_"))Z+=J[0];else{const _e=H.classNameAliases[Ae]||Ae;I(J[0],_e)}}else Z+=J[0];le=z.keywordPatternRe.lastIndex,J=z.keywordPatternRe.exec(K)}var ye;Z+=K.substring(le),W.addText(Z)}function k(){z.subLanguage!=null?(()=>{if(K==="")return;let le=null;if(typeof z.subLanguage=="string"){if(!t[z.subLanguage])return W.addText(K);le=c(z.subLanguage,K,!0,$[z.subLanguage]),$[z.subLanguage]=le._top}else le=d(K,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(X+=le.relevance),W.__addSublanguage(le._emitter,le.language)})():T(),K=""}function I(le,J){le!==""&&(W.startScope(J),W.addText(le),W.endScope())}function O(le,J){let Z=1;const ye=J.length-1;for(;Z<=ye;){if(!le._emit[Z]){Z++;continue}const be=H.classNameAliases[le[Z]]||le[Z],ve=J[Z];be?I(ve,be):(K=ve,T(),K=""),Z++}}function F(le,J){return le.scope&&typeof le.scope=="string"&&W.openNode(H.classNameAliases[le.scope]||le.scope),le.beginScope&&(le.beginScope._wrap?(I(K,H.classNameAliases[le.beginScope._wrap]||le.beginScope._wrap),K=""):le.beginScope._multi&&(O(le.beginScope,J),K="")),z=Object.create(le,{parent:{value:z}}),z}function N(le,J,Z){let ye=((be,ve)=>{const Ae=be&&be.exec(ve);return Ae&&Ae.index===0})(le.endRe,Z);if(ye){if(le["on:end"]){const be=new zfe(le);le["on:end"](J,be),be.isMatchIgnored&&(ye=!1)}if(ye){for(;le.endsParent&&le.parent;)le=le.parent;return le}}if(le.endsWithParent)return N(le.parent,J,Z)}function B(le){return z.matcher.regexIndex===0?(K+=le[0],1):(se=!0,0)}function L(le){const J=le[0],Z=x.substring(le.index),ye=N(z,le,Z);if(!ye)return rpe;const be=z;z.endScope&&z.endScope._wrap?(k(),I(J,z.endScope._wrap)):z.endScope&&z.endScope._multi?(k(),O(z.endScope,le)):be.skip?K+=J:(be.returnEnd||be.excludeEnd||(K+=J),k(),be.excludeEnd&&(K=J));do z.scope&&W.closeNode(),z.skip||z.subLanguage||(X+=z.relevance),z=z.parent;while(z!==ye.parent);return ye.starts&&F(ye.starts,le),be.returnEnd?0:J.length}let V={};function P(le,J){const Z=J&&J[0];if(K+=le,Z==null)return k(),0;if(V.type==="begin"&&J.type==="end"&&V.index===J.index&&Z===""){if(K+=x.slice(J.index,J.index+1),!o){const ye=Error(`0 width match regex (${w})`);throw ye.languageName=w,ye.badRule=V.rule,ye}return 1}if(V=J,J.type==="begin")return(ye=>{const be=ye[0],ve=ye.rule,Ae=new zfe(ve),Ce=[ve.__beforeBegin,ve["on:begin"]];for(const _e of Ce)if(_e&&(_e(ye,Ae),Ae.isMatchIgnored))return B(be);return ve.skip?K+=be:(ve.excludeBegin&&(K+=be),k(),ve.returnBegin||ve.excludeBegin||(K=be)),F(ve,ye),ve.returnBegin?0:be.length})(J);if(J.type==="illegal"&&!_){const ye=Error('Illegal lexeme "'+Z+'" for mode "'+(z.scope||"<unnamed>")+'"');throw ye.mode=z,ye}if(J.type==="end"){const ye=L(J);if(ye!==rpe)return ye}if(J.type==="illegal"&&Z==="")return 1;if(ne>1e5&&ne>3*J.index)throw Error("potential infinite loop, way more iterations than matches");return K+=Z,Z.length}const H=v(w);if(!H)throw b1(i.replace("{}",w)),Error('Unknown language: "'+w+'"');const U=EWe(H);let G="",z=E||U;const $={},W=new l.__emitter(l);(()=>{const le=[];for(let J=z;J!==H;J=J.parent)J.scope&&le.unshift(J.scope);le.forEach(J=>W.openNode(J))})();let K="",X=0,te=0,ne=0,se=!1;try{if(H.__emitTokens)H.__emitTokens(x,W);else{for(z.matcher.considerAll();;){ne++,se?se=!1:z.matcher.considerAll(),z.matcher.lastIndex=te;const le=z.matcher.exec(x);if(!le)break;const J=P(x.substring(te,le.index),le);te=le.index+J}P(x.substring(te))}return W.finalize(),G=W.toHTML(),{language:w,value:G,relevance:X,illegal:!1,_emitter:W,_top:z}}catch(le){if(le.message&&le.message.includes("Illegal"))return{language:w,value:mB(x),illegal:!0,relevance:0,_illegalBy:{message:le.message,index:te,context:x.slice(te-100,te+100),mode:le.mode,resultSoFar:G},_emitter:W};if(o)return{language:w,value:mB(x),illegal:!1,relevance:0,errorRaised:le,_emitter:W,_top:z};throw le}}function d(w,x){x=x||l.languages||Object.keys(t);const _=(O=>{const F={value:mB(O),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return F._emitter.addText(O),F})(w),E=x.filter(v).filter(b).map(O=>c(O,w,!1));E.unshift(_);const C=E.sort((O,F)=>{if(O.relevance!==F.relevance)return F.relevance-O.relevance;if(O.language&&F.language){if(v(O.language).supersetOf===F.language)return 1;if(v(F.language).supersetOf===O.language)return-1}return 0}),[T,k]=C,I=T;return I.secondBest=k,I}function f(w){let x=null;const _=(T=>{let k=T.className+" ";k+=T.parentNode?T.parentNode.className:"";const I=l.languageDetectRe.exec(k);if(I){const O=v(I[1]);return O||(Zfe(i.replace("{}",I[1])),Zfe("Falling back to no-highlight mode for this block.",T)),O?I[1]:"no-highlight"}return k.split(/\s+/).find(O=>s(O)||v(O))})(w);if(s(_))return;if(y("before:highlightElement",{el:w,language:_}),w.dataset.highlighted)return console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",w);if(w.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(w)),l.throwUnescapedHTML))throw new CWe("One of your code blocks includes unescaped HTML.",w.innerHTML);x=w;const E=x.textContent,C=_?u(E,{language:_,ignoreIllegals:!0}):d(E);w.innerHTML=C.value,w.dataset.highlighted="yes",((T,k,I)=>{const O=k&&n[k]||I;T.classList.add("hljs"),T.classList.add("language-"+O)})(w,_,C.language),w.result={language:C.language,re:C.relevance,relevance:C.relevance},C.secondBest&&(w.secondBest={language:C.secondBest.language,relevance:C.secondBest.relevance}),y("after:highlightElement",{el:w,result:C,text:E})}let p=!1;function m(){document.readyState!=="loading"?document.querySelectorAll(l.cssSelector).forEach(f):p=!0}function v(w){return w=(w||"").toLowerCase(),t[w]||t[n[w]]}function g(w,{languageName:x}){typeof w=="string"&&(w=[w]),w.forEach(_=>{n[_.toLowerCase()]=x})}function b(w){const x=v(w);return x&&!x.disableAutodetect}function y(w,x){const _=w;r.forEach(E=>{E[_]&&E[_](x)})}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",()=>{p&&m()},!1),Object.assign(e,{highlight:u,highlightAuto:d,highlightAll:m,highlightElement:f,highlightBlock:w=>(Fg("10.7.0","highlightBlock will be removed entirely in v12.0"),Fg("10.7.0","Please use highlightElement now."),f(w)),configure:w=>{l=npe(l,w)},initHighlighting:()=>{m(),Fg("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:()=>{m(),Fg("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:(w,x)=>{let _=null;try{_=x(e)}catch(E){if(b1("Language definition for '{}' could not be registered.".replace("{}",w)),!o)throw E;b1(E),_=a}_.name||(_.name=w),t[w]=_,_.rawDefinition=x.bind(null,e),_.aliases&&g(_.aliases,{languageName:w})},unregisterLanguage:w=>{delete t[w];for(const x of Object.keys(n))n[x]===w&&delete n[x]},listLanguages:()=>Object.keys(t),getLanguage:v,registerAliases:g,autoDetection:b,inherit:npe,addPlugin:w=>{(x=>{x["before:highlightBlock"]&&!x["before:highlightElement"]&&(x["before:highlightElement"]=_=>{x["before:highlightBlock"](Object.assign({block:_.el},_))}),x["after:highlightBlock"]&&!x["after:highlightElement"]&&(x["after:highlightElement"]=_=>{x["after:highlightBlock"](Object.assign({block:_.el},_))})})(w),r.push(w)},removePlugin:w=>{const x=r.indexOf(w);x!==-1&&r.splice(x,1)}}),e.debugMode=()=>{o=!1},e.safeMode=()=>{o=!0},e.versionString="11.9.0",e.regex={concat:y1,lookahead:Wfe,either:pB,optional:aWe,anyNumberOfTimes:iWe};for(const w in Yx)typeof Yx[w]=="object"&&Vfe(Yx[w]);return Object.assign(e,Yx),e},Qx=ope({});Qx.newInstance=()=>ope({});var SWe=e=>{const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(o,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),s={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,l,a,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,i,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[s],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[s],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:s}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}},kWe=(()=>{const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],a=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],l=[].concat(i,r,o);return s=>{const u=s.regex,c=e,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,z)=>{const $=G[0].length+G.index,W=G.input[$];if(W==="<"||W===",")return void z.ignoreMatch();let K;W===">"&&(((te,{after:ne})=>{const se="</"+te[0].slice(1);return te.input.indexOf(se,ne)!==-1})(G,{after:$})||z.ignoreMatch());const X=G.input.substring($);((K=X.match(/^\s*=/))||(K=X.match(/^\s+extends\s+/))&&K.index===0)&&z.ignoreMatch()}},f={$pattern:e,keyword:t,literal:n,built_in:l,"variable.language":a},p="[0-9](_?[0-9])*",m=`\\.(${p})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${v})((${m})|\\.)?|(${m}))[eE][+-]?(${p})\\b`},{begin:`\\b(${v})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},y={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},w={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,b],subLanguage:"css"}},x={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[s.BACKSLASH_ESCAPE,b]},E={className:"comment",variants:[s.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),s.C_BLOCK_COMMENT_MODE,s.C_LINE_COMMENT_MODE]},C=[s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,y,w,x,_,{match:/\$\d+/},g];b.contains=C.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(C)});const T=[].concat(E,b.contains),k=T.concat([{begin:/\(/,end:/\)/,keywords:f,contains:["self"].concat(T)}]),I={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:k},O={variants:[{match:[/class/,/\s+/,c,/\s+/,/extends/,/\s+/,u.concat(c,"(",u.concat(/\./,c),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,c],scope:{1:"keyword",3:"title.class"}}]},F={relevance:0,match:u.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},N={variants:[{match:[/function/,/\s+/,c,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/},B={match:u.concat(/\b/,(L=[...i,"super","import"],u.concat("(?!",L.join("|"),")")),c,u.lookahead(/\(/)),className:"title.function",relevance:0};var L;const V={begin:u.concat(/\./,u.lookahead(u.concat(c,/(?![0-9A-Za-z$_(])/))),end:c,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},P={match:[/get|set/,/\s+/,c,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+s.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,c,/\s*/,/=\s*/,/(async\s*)?/,u.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[s.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,y,w,x,_,E,{match:/\$\d+/},g,F,{className:"attr",begin:c+u.lookahead(":"),relevance:0},U,{begin:"("+s.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,s.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:s.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},N,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+s.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[I,s.inherit(s.TITLE_MODE,{begin:c,className:"title.function"})]},{match:/\.\.\./,relevance:0},V,{match:"\\$"+c,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},B,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},O,P,{match:/\$[(.]/}]}}})();Qx.registerLanguage("javascript",kWe),Qx.registerLanguage("xml",SWe);const DWe=Te({name:"FcDesigner",components:{fcDraggable:dB,DragForm:Br.$form(),ViewForm:Ux.$form(),EventConfig:jfe},props:{menu:Array,height:[String,Number],config:{type:Object,default:()=>({})},mask:{type:Boolean,default:void 0},locale:Object,handle:Array},emits:["active","create","copy","delete","drag","inputData","save"],setup(e){const{menu:t,height:n,mask:r,locale:o,handle:i}=di(e),a=dn(),l=Qn({active:null});qn("fcx",l),qn("designer",a);const s=dr(e,"config",{}),u=dr(s.value,"baseRule",null),c=dr(s.value,"componentRule",{}),d=dr(s.value,"validateRule",null),f=dr(s.value,"formRule",null),p=ee(()=>{const O=n.value;return O?Lr.Number(O)?`${O}px`:O:"100%"}),m=ee(()=>s.value.fieldReadonly!==!1),v=ee(()=>s.value.hiddenMenu||[]),g=ee(()=>s.value.hiddenItem||[]),b=ee(()=>s.value.hiddenDragMenu===!0),y=ee(()=>s.value.hiddenDragBtn===!0);let w=fB;o.value&&(w=fI(o).t);const x=(...O)=>w(...O),_=(O,F,...N)=>{if(F){if(Lr.Function(F))return F(...N);if(F.rule){let B=F.rule(...N);return F.prepend?B=[...B,...O(...N)]:F.append&&(B=[...O(...N),...B]),B}}return O(...N)},E=Qn({cacheProps:{},operation:{idx:-1,list:[]},moveRule:null,addRule:null,added:null,bus:_$e(),device:"pc",activeTab:"form",activeMenuTab:"menu",activeRule:null,children:de([]),treeInfo:[],menuList:t.value||[{name:"main",title:"\u57FA\u7840\u7EC4\u4EF6",list:[]},{name:"subform",title:"\u5B50\u8868\u5355\u7EC4\u4EF6",list:[]},{name:"aide",title:"\u8F85\u52A9\u7EC4\u4EF6",list:[]},{name:"layout",title:"\u5E03\u5C40\u7EC4\u4EF6",list:[]}],dragRuleList:{},eventShow:!1,unloadStatus:!1,previewStatus:"form",t:x,preview:{state:!1,rule:[],option:{},api:{}},inputForm:{state:!1,rule:[],option:{},api:{},data:{},key:""},dragForm:de({rule:[],api:{}}),formOptions:{},oldOptionsKeys:[],form:{rule:_(Gde,f.value,{t:x}),api:{},option:{form:{labelPosition:"top",size:"small"},submitBtn:!1},value:{form:{},submitBtn:!1}},baseForm:{isShow:!1,rule:_(y4,u.value,{t:x}),api:{},value:{},options:{global:{input:{modelEmit:"blur"}},form:{labelPosition:"top",size:"small"},submitBtn:!1,mounted:O=>{O.activeRule=E.activeRule,O.setValue(O.options.formData||{})}}},validateForm:{isShow:!1,rule:_(qde,d.value,{t:x}),api:{},value:[],options:{global:{input:{modelEmit:"blur"}},form:{labelPosition:"top",size:"small"},submitBtn:!1,mounted:O=>{O.activeRule=E.activeRule,O.setValue(O.options.formData||{})}}},propsForm:{isShow:!1,rule:[],api:{},value:{},options:{global:{input:{modelEmit:"blur"},inputNumber:{props:{controlsPosition:"right"}}},form:{labelPosition:"top",size:"small"},submitBtn:!1,mounted:O=>{O.activeRule=E.activeRule,O.setValue(O.options.formData||{})}}},customForm:{isShow:!1,config:null,key:"",rule:[],api:{},options:{global:{input:{modelEmit:"blur"}},form:{labelPosition:"top",size:"small"},submitBtn:!1}}});Je(()=>E.preview.state,function(O){O||St(()=>{E.previewStatus="form",E.preview.rule=E.preview.option=null})});let C=null;const T=(O,F)=>{if(O[10]!==">"){if(!(O=O.replace("formCreate","")))return;O=dI(O)}else O=O.replace("formCreate>","");const N=O.split(">"),B=N.pop();let L=E.activeRule;N.forEach((V,P)=>{P||(V=dI(V)),L[V]||(L[V]={}),L=L[V]}),F({source:L,field:B})};Je(()=>o.value,O=>{w=O?fI(o).t:fB;const F=E.form.api.formData&&E.form.api.formData(),N=E.baseForm.api.formData&&E.baseForm.api.formData(),B=E.validateForm.api.formData&&E.validateForm.api.formData();E.validateForm.rule=_(qde,d.value,{t:x}),E.baseForm.rule=_(y4,u.value,{t:x}),E.form.rule=_(Gde,f.value,{t:x}),E.cacheProps={};const L=E.activeRule;let V=null;L&&(V=E.propsForm.api.formData&&E.propsForm.api.formData(),E.propsForm.rule=E.cacheProps[L._fc_id]=k.getPropsRule(L)),St(()=>{F&&E.form.api.setValue(F),N&&E.baseForm.api.setValue(N),B&&E.validateForm.api.setValue(B),V&&E.propsForm.api.setValue(V)})});const k={unWatchActiveRule(){C&&C(),C=null},watchActiveRule(){k.unWatchActiveRule(),C=Je(()=>E.activeRule,function(O){O&&k.updateRuleFormData()},{deep:!0,flush:"post"})},makeChildren:O=>Qn({children:O}).children,addMenu(O){if(!O.name||!O.list)return;let F=!0;E.menuList.forEach((N,B)=>{N.name===O.name&&(E.menuList[B]=O,F=!1)}),F&&E.menuList.push(O)},removeMenu(O){[...E.menuList].forEach((F,N)=>{F.name===O&&E.menuList.splice(N,1)})},setMenuItem(O,F){E.menuList.forEach(N=>{N.name===O&&(N.list=F)})},appendMenuItem(O,F){E.menuList.forEach(N=>{N.name===O&&N.list.push(...Array.isArray(F)?F:[F])})},removeMenuItem(O){E.menuList.forEach(F=>{let N;Lr.String(O)?[...F.list].forEach((B,L)=>{B.name===O&&F.list.splice(L,1)}):(N=F.list.indexOf(O))>-1&&F.list.splice(N,1)})},addComponent(O){Array.isArray(O)?O.forEach(F=>{E.dragRuleList[F.name]=F,F.menu&&k.appendMenuItem(F.menu,F)}):(E.dragRuleList[O.name]=O,O.menu&&k.appendMenuItem(O.menu,O))},openInputData(O){E.inputForm.state=O===void 0?!E.inputForm.state:!!O,E.inputForm.state&&(E.inputForm.rule=Br.parseJson(k.getJson()),E.inputForm.option=Br.parseJson(k.getOptionsJson()),E.inputForm.option.formData=Mi(E.inputForm.data),E.inputForm.option.submitBtn.show=!1,E.inputForm.option.resetBtn.show=!1,k.clearActiveRule())},inputSave(){const O=E.inputForm.api.formData();Object.keys(O).forEach(N=>{Eg(O[N])&&delete O[N]});const F=JSON.stringify(E.inputForm.data)!==JSON.stringify(O);E.inputForm.data=O,E.inputForm.state=!1,a.emit("inputData",O),F&&k.addOperationRecord()},inputClear(){k.inputReset({})},inputReset(O){E.inputForm.rule=Br.parseJson(k.getJson()),E.inputForm.option.formData=O||Mi(E.inputForm.data),E.inputForm.key=vr()},setFormData(O){E.inputForm.data=O||{}},getFormData:()=>E.inputForm.data,getParent(O){let F=O.__fc__.parent.rule;const N=F._menu;return N&&N.inside&&(O=F,F=F.__fc__.parent.rule),{root:F,parent:O}},updateName(){this.activeRule.name="ref_"+vr()},makeDrag:(O,F,N,B,L)=>({type:"DragBox",wrap:{show:!1},col:{show:!1},inject:!0,props:{rule:{props:{tag:"el-col",group:O===!0?"default":O,ghostClass:"ghost",animation:150,handle:"._fd-drag-btn",emptyInsertThreshold:0,direction:"vertical",itemKey:"type"}},tag:F},children:N,slot:L,on:B}),clearDragRule(){k.setRule([]),k.addOperationRecord(),E.unloadStatus=!1},makeDragRule:O=>k.makeChildren([k.makeDrag(!0,"draggable",O,{add:(F,N)=>k.dragAdd(O,N),end:(F,N)=>k.dragEnd(O,N),start:(F,N)=>k.dragStart(O,N),unchoose:(F,N)=>k.dragUnchoose(O,N)})]),handleSave(){a.emit("save",{rule:k.getJson(),options:k.getOptionsJson()})},openPreview(){E.preview.state=!0;const O=k.getJson(),F=k.getOptionsJson();E.preview.rule=Br.parseJson(O),E.preview.option=Br.parseJson(F),E.preview.html=Qx.highlight(function(N,B){return`<template> |
|
79 |
<form-create |
|
80 |
v-model="formData" |
|
81 |
v-model:api="fapi" |
|
82 |
:rule="rule" |
|
83 |
:option="option" |
|
84 |
@submit="onSubmit" |
|
85 |
></form-create> |
|
86 |
</template> |
|
87 |
|
|
88 |
<script> |
|
89 |
import formCreate from "@form-create/element-ui"; |
|
90 |
|
|
91 |
export default { |
|
92 |
components: { |
|
93 |
formCreate: formCreate.$form() |
|
94 |
}, |
|
95 |
data () { |
|
96 |
const option = formCreate.parseJson('${B.replaceAll("\\","\\\\").replaceAll("'","\\")}'); |
|
97 |
return { |
|
98 |
formData: {}, |
|
99 |
fapi: null, |
|
100 |
rule: formCreate.parseJson('${N.replaceAll("\\","\\\\").replaceAll("'","\\")}'), |
|
101 |
option: option |
|
102 |
} |
|
103 |
}, |
|
104 |
methods: { |
|
105 |
onSubmit (formData) { |
|
106 |
//todo \u63D0\u4EA4\u8868\u5355 |
|
107 |
} |
|
108 |
} |
|
109 |
} |
|
110 |
<\/script>`}(O,F),{language:"xml"}).value},getRule:()=>k.parseRule(Mi(E.dragForm.rule[0].children)),getJson:()=>Br.toJson(k.getRule()),getOption(){const O=Mi(E.formOptions);Object.keys(O._event||{}).forEach(N=>{O._event[N]&&(O[N]=O._event[N])}),delete O._event,O.submitBtn=O._submitBtn,O.resetBtn=O._resetBtn,O.resetBtn.innerText=x("props.reset"),O.submitBtn.innerText=x("props.submit");const F=Mi(E.inputForm.data);return Object.keys(F).length>0&&(O.formData=F),delete O._submitBtn,delete O._resetBtn,O},getOptions(){k.getOption()},getOptionsJson(){return Br.toJson([this.getOption()]).slice(1).slice(0,-1)},setRule(O){O||(O=[]),E.children=de(k.loadRule(Lr.String(O)?Br.parseJson(O):Mi(O))),k.clearActiveRule(),E.dragForm.rule=k.makeDragRule(k.makeChildren(E.children)),k.updateTree()},setBaseRuleConfig(O,F){u.value={rule:O,append:F},E.baseForm.rule=_(y4,u.value,{t:x})},setComponentRuleConfig(O,F,N){c.value[O]={rule:F,append:N},E.cacheProps={};const B=E.activeRule;if(B){const L=E.propsForm.api.formData&&E.propsForm.api.formData();E.propsForm.rule=E.cacheProps[B._fc_id]=_(B._menu.props,c.value&&c.value[B._menu.name],B,{t:x,api:E.dragForm.api}),St(()=>{L&&E.propsForm.api.setValue(L)})}},setValidateRuleConfig(O,F){d.value={rule:O,append:F},E.validateForm.rule=_(y4,d.value,{t:x})},setFormRuleConfig(O,F){f.value={rule:O,append:F},E.form.rule=_(y4,f.value,{t:x})},clearActiveRule(){E.activeRule=null,E.customForm.config=null,E.activeTab="form",l.active=""},setOption(O){let F=Lr.String(O)?JSON.parse(O):Mi(O||{});F.form={inline:!1,hideRequiredAsterisk:!1,labelPosition:"right",size:"default",labelWidth:"125px",...F.form||{}},F._event={onSubmit:F.onSubmit||"",onCreated:F.onCreated||"",onMounted:F.onMounted||"",onChange:F.onChange||"",beforeFetch:F.beforeFetch||""},F._resetBtn=typeof F.resetBtn=="object"?F.resetBtn:{show:F.resetBtn===!0},F._submitBtn=typeof F.submitBtn=="object"?F.submitBtn:{show:F.submitBtn!==!1},F.submitBtn=F.resetBtn=!1,E.inputForm.data=F.formData||{},E.oldOptionsKeys=Object.keys(E.form.value),delete F.formData,E.formOptions=F,k.updateOptionsValue()},setOptions(O){k.setOption(O)},updateOptionsValue(){const O={};E.oldOptionsKeys.forEach(N=>{O[N]=void 0});const F={...O,...E.formOptions.form};Object.keys(E.formOptions).forEach(N=>{const B=E.formOptions[N];F[">"+N]=B,typeof B=="object"&&Object.keys(B).forEach(L=>{F[N+">"+L]=B[L]})}),E.form.value=F},loadRule(O,F,N){const B=[];return O.forEach(L=>{if(Lr.String(L))return B.push(L);let V=E.dragRuleList[L._fc_drag_tag]||E.dragRuleList[L.type];if(V||(V=function(P){return{icon:P.field?"icon-input":"icon-cell",label:P.field||P.type,name:"_",mask:!0,handleBtn:["delete"],rule:()=>P,props:()=>[]}}(L),L._fc_drag_tag="_"),N&&(L._fc_template=N),V&&V.loadRule&&V.loadRule(L),L.children=k.loadRule(L.children||[],V,N),L.control&&(L._control=L.control,delete L.control),L.computed&&(L._computed=L.computed,delete L.computed),L.on&&(L._on=L.on,delete L.on),V){const P=L.slot;let H;F&&F.slot&&P&&P!=="default"&&(H=k.getSlotConfig(F,P,V)),delete L.slot,L=k.makeRule(H||V,L),P&&(L.slot=P)}B.push(L)}),B},parseRule:(O,F)=>[...O].reduce((N,B)=>{let L=F;if(Lr.String(B))return N.push(B),N;if(B.type==="DragBox")return N.push(...k.parseRule(B.children,L||B.slot)),N;if(B.type==="DragTool"){if(L=B.slot||F,B=B.children[0],Lr.String(B))return N.push(B),N;if(B.type==="DragBox")return N.push(...k.parseRule(B.children,L||B.slot)),N}return B&&(B={...B},L&&L!=="default"&&(B.slot=L),B.children&&B.children.length&&(B.children=k.parseRule(B.children)),delete B.key,delete B.component,B._menu&&(B._menu.parseRule&&B._menu.parseRule(B),delete B._menu),B._fc_drag_tag==="_"&&delete B._fc_drag_tag,B._control&&(B.control=B._control,delete B._control),B._computed&&(B.computed=B._computed,delete B._computed),B.slot||delete B.slot,B._on&&(B.on=B._on,delete B._on),B.props&&Object.keys(B.props).forEach(V=>{Eg(B.props[V])&&delete B.props[V]}),Object.keys(B).filter(V=>V.indexOf("__")===0||Array.isArray(B[V])&&B[V].length===0||Lr.Object(B[V])&&Object.keys(B[V]).length===0).forEach(V=>{delete B[V]}),N.push(B)),N},[]),fields:()=>E.dragForm.api.all().map(O=>O.field).filter(O=>!!O),baseChange(O,F,N,B){k.handleChange("",O,F,N,B)},formOptChange(O,F){E.form.value[O]=F,O.indexOf(">")===-1&&(O="form>"+O);let N=E.formOptions;const B=O.split(">"),L=B.pop();B.forEach(V=>{V&&(N[V]||(N[V]={}),N=N[V])}),N[L]=F},propRemoveField(O,F,N){var B,L,V;if(E.activeRule&&N[E.activeRule._fc_id]===E.activeRule){k.unWatchActiveRule();const P=O;E.dragForm.api.sync(E.activeRule),O.indexOf("__")!==0&&(O==="formCreateChild"?delete E.activeRule.children[0]:O.indexOf("formCreate")===0||O.indexOf(">")>0?(O.indexOf("formCreate")<0&&(O="props>"+O),T(O,({source:H,field:U})=>{delete H[U]})):delete E.activeRule.props[O]),k.watchActiveRule(),(V=(L=(B=E.activeRule._menu)==null?void 0:B.watch)==null?void 0:L[P])==null||V.call(L,{field:P,value:void 0,api:N,rule:E.activeRule,ctx:a})}},propChange(O,F,N,B){k.handleChange("props",O,F,N,B)},handleChange(O,F,N,B,L){var V,P,H;if(E.activeRule&&L[E.activeRule._fc_id]===E.activeRule){k.unWatchActiveRule();const U=F;F.indexOf("__")!==0&&(F==="formCreateChild"?E.activeRule.children[0]=N:F.indexOf("formCreate")===0||F.indexOf(">")>0?(F.indexOf("formCreate")<0&&(F=(O?O+">":"")+F),T(F,({source:G,field:z})=>{Eg(N)?delete G[z]:G[z]=N})):O&&Eg(N)?delete E.activeRule[O][F]:(O?E.activeRule[O]:E.activeRule)[F]=N),k.watchActiveRule(),(H=(P=(V=E.activeRule._menu)==null?void 0:V.watch)==null?void 0:P[U])==null||H.call(P,{field:U,value:N,api:L,rule:E.activeRule,ctx:a})}},validateChange(O,F,N,B){!E.activeRule||E.validateForm.api[E.activeRule._fc_id]!==E.activeRule||(k.handleChange("",O,F,N,B),E.dragForm.api.refreshValidate(),E.dragForm.api.nextTick(()=>{E.dragForm.api.clearValidateState(E.activeRule.__fc__.id)}))},triggerActive(O){let F;if(F=O._menu.inside?O.children[0]:O.__fc__.parent.rule,F&&F.type==="DragTool"){const N=E.dragForm.api.el(F.__fc__.id);N&&(l.active=N.id,a.emit("active",O),k.toolActive(O))}},customFormChange(O,F){E.customForm.config&&E.customForm.config.change(O,F)},customActive(O){E.baseForm.isShow=!1,E.propsForm.isShow=!1,E.eventShow=!1,E.validateForm.isShow=!1,E.activeRule=null,E.customForm.config=O,E.customForm.isShow=!0,E.customForm.propsShow=O.props&&k.getConfig("showPropsForm")!==!1,E.customForm.key=vr(),E.customForm.rule=E.customForm.propsShow?O.props({t:x}):[],E.customForm.options.formData=O.formData,St(()=>{E.activeTab="props"})},getPropsRule(O){let F=_(O._menu.props,c.value&&c.value[O._menu.name],O,{t:x,api:E.dragForm.api});if(c.value&&c.value.default){const N=c.value.default;F=_(()=>F,Lr.Function(N)?{rule:N,append:!0}:N,O,{t:x,api:E.dragForm.api})}return F},toolActive(O){k.unWatchActiveRule(),E.customForm.isShow=!1,E.customForm.config=null,E.activeRule&&(delete E.propsForm.api[E.activeRule._fc_id],delete E.baseForm.api[E.activeRule._fc_id],delete E.validateForm.api[E.activeRule._fc_id],delete E.dragForm.api.activeRule),E.activeRule=O,E.dragForm.api.activeRule=O,St(()=>{E.activeTab="props",St(()=>{E.propsForm.api[E.activeRule._fc_id]=E.activeRule,E.baseForm.api[E.activeRule._fc_id]=E.activeRule,E.validateForm.api[E.activeRule._fc_id]=E.activeRule})}),E.cacheProps[O._fc_id]||(E.cacheProps[O._fc_id]=k.getPropsRule(O));const F=O._menu.hiddenBaseField||[];E.baseForm.api.hidden(!1),F.length&&E.baseForm.api.hidden(!0,F),this.getConfig("showControl",!0)||E.baseForm.api.hidden(!0,"_control");const N=v4(O,"field");E.baseForm.isShow=N&&O.input!==!1&&k.getConfig("showBaseForm")!==!1,E.propsForm.isShow=E.cacheProps[O._fc_id].length>0&&k.getConfig("showPropsForm")!==!1,E.eventShow=O._menu.event&&O._menu.event.length>0&&k.getConfig("showEventForm")!==!1,E.validateForm.isShow=E.baseForm.isShow&&O._menu.validate!==!1&&k.getConfig("showValidateForm")!==!1,E.propsForm.rule=E.cacheProps[O._fc_id],k.updateRuleFormData(),k.watchActiveRule()},getConfig:(O,F)=>s.value&&v4(s.value,O)?s.value[O]:F,updateRuleFormData(){const O=E.activeRule;let F={formCreateChild:""+O.children[0],"formCreateWrap>labelWidth":""};const N=s.value.appendConfigData;Lr.Function(N)?F={...F,...N(O)}:Array.isArray(N)&&N.forEach(L=>{F[L]=void 0}),Object.keys(O).forEach(L=>{["effect","config","payload","id","type","_menu"].indexOf(L)<0&&(F["formCreate"+g4(L)]=Mi(O[L]))}),Object.keys(O.props).forEach(L=>{const V=O.props[L];F[L]=Mi(V),Lr.Object(V)&&Object.keys(V).forEach(P=>{F[L+">"+P]=Mi(V[P])})}),["props","effect","attrs","style","wrap"].forEach(L=>{O[L]&&typeof O[L]=="object"&&Object.keys(O[L]).forEach(V=>{F["formCreate"+g4(L)+">"+V]=Mi(O[L][V])})});const B=O._menu.attrs||{};Object.keys(B).forEach(L=>{F["__"+L]=B[L]({rule:O})}),E.propsForm.value=F,E.baseForm.isShow&&(E.baseForm.value={field:O.field,title:O.title||"",info:O.info,_control:O._control,...F},E.validateForm.value={validate:O.validate?[...O.validate]:[],$required:F.formCreate$required},E.dragForm.api.refreshValidate(),E.dragForm.api.nextTick(()=>{E.dragForm.api.clearValidateState(O.__fc__.id)}))},dragStart(O){E.moveRule=O,E.added=!1},dragUnchoose(O,F){E.addRule={children:O,oldIndex:F.oldIndex}},clickMenu(O){k.dragMenu({menu:O,children:E.children,index:E.children.length})},checkOnly(O){let F=!1;return E.dragForm.api.all().forEach(N=>{F=F||N._fc_template===O.name||N._menu&&N._menu.name===O.name}),F&&nu(E.t("struct.only",{label:x("com."+O.name+".name")||O.label})),F},dragMenu({menu:O,children:F,index:N,slot:B}){if(E.inputForm.state||O.only&&k.checkOnly(O))return;k.handleAddBefore();const L=E.dragRuleList[O.name];a.emit("drag",{item:O,dragRule:L});const V=k.makeRule(E.dragRuleList[L.name]);B&&(V.slot=B),F.splice(N,0,V),k.handleAddAfter({rule:V})},replaceField(O){const F=["array","object"].indexOf(O._menu.subForm)>-1;let N=k.parseRule(Mi([O]))[0];return F&&(N.field=vr()),N=Br.toJson(N),N=F?k.batchReplaceUni(N):k.batchReplaceField(N),k.loadRule([Br.parseJson(N)])[0]},batchReplaceField:O=>(O=O.replace(/"field"\s*:\s*"(\w[\w\d]+)"/g,(F,N)=>`"field":"${vr()}"`),k.batchReplaceUni(O)),batchReplaceUni:O=>O=O.replace(/"_fc_id"\s*:\s*"(\w[\w\d]+)"/g,()=>`"_fc_id":"id_${vr()}"`),dragAdd(O,F,N){const B=F.newIndex,L=F.item._underlying_vm_;if(L&&L.__fc__){if(E.addRule){k.handleSortBefore();const V=E.addRule.children.splice(E.addRule.children.indexOf(L),1)[0];N?V.slot=N:delete V.slot,O.splice(B,0,V),k.handleSortAfter({rule:V})}}else k.dragMenu({menu:L,children:O,index:B,slot:N});E.added=!0},dragEnd(O,{newIndex:F,oldIndex:N},B){if(!E.added&&(E.moveRule!==O||F!==N)){k.handleSortBefore();const L=E.moveRule.splice(N,1);B&&(L.slot=B),O.splice(F,0,L[0]),k.handleSortAfter({rule:L[0]})}E.moveRule=null,E.addRule=null,E.added=!1},getSlotConfig(O,F,N){let B={};return(O.slot||[]).forEach(L=>{L.name===F&&(B=L.config||{})}),{...N,dragBtn:!1,handleBtn:!!N.children&&["addChild"],...B}},makeRule(O,F){const N=F||O.rule({t:x});N._menu=Fo(O),N._fc_id||(N._fc_id="id_"+vr()),N.name||(N.name="ref_"+vr()),O.component&&(N.component=Fo(O.component)),N._computed||(N._computed={}),N.effect||(N.effect={}),v4(N,"display")||(N.display=!0),v4(N,"hidden")||(N.hidden=!1),N._fc_drag_tag=O.name;let B,L=O.only===!0;const V=N.children||[];if(O.drag&&(N.children=[B=k.makeDrag(O.drag,N._menu?N._menu.name:N.type,V,{end:(H,U)=>k.dragEnd(H.self.children,U),add:(H,U)=>k.dragAdd(H.self.children,U),start:(H,U)=>k.dragStart(H.self.children,U),unchoose:(H,U)=>k.dragUnchoose(H.self.children,U)})]),O.children&&!F&&!V.length)for(let H=0;H<(O.childrenLen||1);H++){const U=k.makeRule(E.dragRuleList[O.children]);(B||N).children.push(U)}const P=r.value!==void 0?r.value!==!1:O.mask!==!1;return O.tool===!1?N:O.inside?(N.children=k.makeChildren([{type:"DragTool",props:{dragBtn:O.dragBtn!==!1,children:O.children,mask:P,handleBtn:O.handleBtn,only:L},inject:!0,on:{delete:({self:H})=>{const U=k.getParent(H).parent;k.handleRemoveBefore({parent:U,rule:U})!==!1&&(U.__fc__.rm(),a.emit("delete",U),E.activeRule===U&&k.clearActiveRule(),k.handleRemoveAfter({rule:U}))},create:({self:H})=>{k.handleAddBefore();const U=k.getParent(H);a.emit("create",U.parent);const G=k.makeRule(U.parent._menu);U.parent.slot&&(G.slot=U.parent.slot),U.root.children.splice(U.root.children.indexOf(U.parent)+1,0,G),k.handleAddAfter({rule:U.parent})},addChild:({self:H})=>{k.handleAddBefore();const U=k.getParent(H),G=U.parent._menu,z=E.dragRuleList[G.children];if(!z)return;const $=k.makeRule(z);(G.drag?U.parent.children[0]:U.parent).children[0].children.push($),k.handleAddAfter({rule:$})},copy:({self:H})=>{k.handleCopyBefore();const U=k.getParent(H);a.emit("copy",U.parent);const G=k.replaceField(U.parent);U.root.children.splice(U.root.children.indexOf(U.parent)+1,0,G),k.handleCopyAfter({rule:U.parent})},active:({self:H})=>{const U=k.getParent(H);a.emit("active",U.parent),setTimeout(()=>{k.toolActive(U.parent)},10)}},children:N.children}]),N):{type:"DragTool",props:{dragBtn:O.dragBtn!==!1,children:O.children,mask:P,handleBtn:O.handleBtn,only:L},inject:!0,display:!!N.display,on:{delete:({self:H})=>{k.handleRemoveBefore({parent:H,rule:H.children[0]})!==!1&&(a.emit("delete",H.children[0]),H.__fc__.rm(),E.activeRule===H.children[0]&&k.clearActiveRule(),k.handleRemoveAfter({rule:H.children[0]}))},create:({self:H})=>{k.handleAddBefore(),a.emit("create",H.children[0]);const U=k.getParent(H),G=k.makeRule(H.children[0]._menu);U.parent.slot&&(G.slot=U.parent.slot),U.root.children.splice(U.root.children.indexOf(U.parent)+1,0,G),k.handleAddAfter({rule:G})},addChild:({self:H})=>{k.handleAddBefore();const U=H.children[0]._menu,G=E.dragRuleList[U.children];if(!G)return;const z=k.makeRule(G);(U.drag?H.children[0]:H).children[0].children.push(z),k.handleAddAfter({rule:z})},copy:({self:H})=>{k.handleCopyBefore(),a.emit("copy",H.children[0]);const U=k.getParent(H),G=k.replaceField(H.children[0]);H.slot&&(G.slot=H.slot),U.root.children.splice(U.root.children.indexOf(U.parent)+1,0,G),k.handleCopyAfter({rule:H.children[0]})},active:({self:H})=>{a.emit("active",H.children[0]),setTimeout(()=>{k.toolActive(H.children[0])},10)}},children:k.makeChildren([N])}},toolHandle(O,F){if(!O._fc_drag_tag||O._menu.tool===!1)return void O.__fc__.rm();let N;N=O._menu.inside?O.children[0].__fc__.exportEl:O.__fc__.parent.exportEl,N.$emit(F)},handleAddBefore(){},handleRemoveBefore(){},handleCopyBefore(){},handleSortBefore(){},addOperationRecord(){const O=k.getJson(),F=Mi(E.inputForm.data),N=E.operation.list.slice(0,E.operation.idx+1);N.push({rule:O,formData:F}),E.operation.list=N,E.operation.idx=N.length-1,E.unloadStatus=N.length!==1},prevOperationRecord(){if(!E.operation.list[E.operation.idx-1])return;const O=E.operation.list[--E.operation.idx];k.useOperationRecord(O),k.clearActiveRule()},nextOperationRecord(){if(!E.operation.list[E.operation.idx+1])return;const O=E.operation.list[++E.operation.idx];k.useOperationRecord(O),k.clearActiveRule()},useOperationRecord(O){E.inputForm.data=O.formData,k.setRule(O.rule)},handleAddAfter(){k.addOperationRecord(),k.updateTree()},handleRemoveAfter(){k.addOperationRecord(),k.updateTree()},handleCopyAfter(){k.addOperationRecord(),k.updateTree()},handleSortAfter(){k.addOperationRecord(),k.updateTree()},treeChange(O){k.triggerActive(O.rule)},getFormDescription:()=>$de(k.getDescription()),getDescription:()=>Ude(E.dragForm.rule[0].children),getSubFormDescription(O){let F=O.__fc__&&O.__fc__.parent;for(;F;){if(F.rule._menu&&["array","object"].indexOf(F.rule._menu.subForm)>-1)return $de(Ude(F.rule.children));F=F.parent}return null},getSubFormChildren(O){let F=O.__fc__&&O.__fc__.parent;for(;F;){if(F.rule._menu&&["array","object"].indexOf(F.rule._menu.subForm)>-1)return F.rule.children||[];F=F.parent}return null},updateTree:tWe(function(){St(()=>{E.treeInfo=pI(E.dragForm.rule[0].children)})},300),findTree(O){let F;const N=B=>{B.forEach(L=>{L.rule.field===O?F=L.children:L.children&&N(L.children)})};return N(E.treeInfo),F||[]},handleDragenter(O){E.bus.$emit("dragenter",O)},handleDragleave(O){E.bus.$emit("dragleave",O)},handleDrop(O){E.bus.$emit("drop",O)},changeEvent(O){E.activeRule._on=O},triggerHandle(O){O.handle()}};E.dragForm.rule=k.makeDragRule(k.makeChildren(E.children)),k.setOption({}),k.addComponent(dUe);const I=ee(()=>Object.keys(E.inputForm.data).length>0);return{...di(E),...k,dragHeight:p,t:x,handle:i,inputCheckStatus:I,fieldReadonly:m,hiddenMenu:v,hiddenItem:g,hiddenDragMenu:b,hiddenDragBtn:y}},created(){document.body.ondrop=e=>{e.preventDefault(),e.stopPropagation()},window.onbeforeunload=e=>{this.unloadStatus&&(e.returnValue=this.t("designer.unload"))}}}),OWe=["onClick"],TWe=["onClick"],MWe={class:"_fc-l-icon"},NWe={class:"_fc-l-name"},FWe={class:"_fc-tree-label"},RWe=ce("i",{class:"fc-icon icon-more"},null,-1),IWe={class:"_fc-m-tools-l"},BWe=[ce("path",{d:"M15.04 783.36h986.88v49.28H15.04zM163.2 191.36h690.88c27.2 0 49.28 22.08 49.28 49.28v542.72H113.92V240.64c0-27.2 22.08-49.28 49.28-49.28z",fill:"#7F7F7F"},null,-1),ce("path",{d:"M163.2 240.64h690.88v493.44H163.2z",fill:"#E5E5E5"},null,-1)],LWe={key:1,class:"icon",viewBox:"0 0 1024 1024"},PWe=[ce("path",{d:"M15.04 783.36h986.88v49.28H15.04zM163.2 191.36h690.88c27.2 0 49.28 22.08 49.28 49.28v542.72H113.92V240.64c0-27.2 22.08-49.28 49.28-49.28z",fill:"#2E73FF"},null,-1),ce("path",{d:"M163.2 240.64h690.88v493.44H163.2z",fill:"#E0EAFF"},null,-1)],jWe=[ce("path",{d:"M217.28 29.76h589.44c29.44 0 53.44 24 53.44 53.44v857.28c0 29.44-24 53.44-53.44 53.44H217.28c-29.44 0-53.44-24-53.44-53.44V83.52c0-29.76 24-53.76 53.44-53.76z",fill:"#7F7F7F"},null,-1),ce("path",{d:"M217.28 136.96h589.44v750.08H217.28z",fill:"#E5E5E5"},null,-1)],VWe={key:3,class:"icon",viewBox:"0 0 1024 1024"},zWe=[ce("path",{d:"M217.28 29.76h589.44c29.44 0 53.44 24 53.44 53.44v857.28c0 29.44-24 53.44-53.44 53.44H217.28c-29.44 0-53.44-24-53.44-53.44V83.52c0-29.76 24-53.76 53.44-53.76z",fill:"#2E73FF"},null,-1),ce("path",{d:"M217.28 136.96h589.44v750.08H217.28z",fill:"#E0EAFF"},null,-1)],HWe=[ce("path",{d:"M271.68 31.04h480.96c29.44 0 53.44 24 53.44 53.44v854.72c0 29.44-24 53.44-53.44 53.44H271.68c-29.44 0-53.44-24-53.44-53.44V84.48c0-29.44 23.68-53.44 53.44-53.44z",fill:"#7F7F7F"},null,-1),ce("path",{d:"M271.68 137.92h480.96v747.84H271.68z",fill:"#E5E5E5"},null,-1)],$We={key:5,class:"icon",viewBox:"0 0 1024 1024"},UWe=[ce("path",{d:"M271.68 31.04h480.96c29.44 0 53.44 24 53.44 53.44v854.72c0 29.44-24 53.44-53.44 53.44H271.68c-29.44 0-53.44-24-53.44-53.44V84.48c0-29.44 23.68-53.44 53.44-53.44z",fill:"#2E73FF"},null,-1),ce("path",{d:"M271.68 137.92h480.96v747.84H271.68z",fill:"#E0EAFF"},null,-1)],WWe=ce("div",{class:"line"},null,-1),GWe={class:"_fc-m-tools-r"},qWe=ce("i",{class:"fc-icon icon-save-online"},null,-1),KWe=ce("i",{class:"fc-icon icon-preview"},null,-1),YWe=ce("i",{class:"fc-icon icon-delete"},null,-1),XWe=ce("i",{class:"fc-icon icon-more"},null,-1),QWe=ce("div",{class:"line"},null,-1),JWe={class:"_fd-input-btn"},ZWe={key:0,class:"fc-icon icon-check"},eGe={key:0,class:"_fc-m-input"},tGe={key:0,class:"_fc-m-input-handle"},nGe={class:"_fc-r-title"},rGe={class:"_fc-r-title"},oGe={key:1,class:"_fd-preview-code"},iGe=["innerHTML"];let ipe,ape,lpe,spe,upe,cpe,dpe,fpe,ppe,hpe;mc=jo(DWe,[["render",function(e,t,n,r,o,i){const a=Qe("el-header"),l=Qe("fcDraggable"),s=Qe("el-main"),u=Qe("el-dropdown-item"),c=Qe("el-dropdown-menu"),d=Qe("el-dropdown"),f=Qe("el-tree"),p=Qe("el-container"),m=Qe("el-aside"),v=Qe("el-button"),g=Qe("el-popconfirm"),b=Qe("el-switch"),y=Qe("ViewForm"),w=Qe("DragForm"),x=Qe("el-tag"),_=Qe("el-input"),E=Qe("el-divider"),C=Qe("EventConfig"),T=Qe("el-tab-pane"),k=Qe("el-tabs"),I=Qe("el-dialog");return Y(),Pe(p,{class:"_fc-designer",style:$t(e.height?`height:${e.dragHeight};flex:0;`:""),onDragenter:e.handleDragenter,onDragleave:e.handleDragleave,onDrop:e.handleDrop},{default:he(()=>[ie(s,null,{default:he(()=>[(Y(),Pe(p,{style:{height:"100%"},key:e.locale&&e.locale.name},{default:he(()=>[ie(m,{class:"_fc-l",width:"266px"},{default:he(()=>[ie(p,{style:{height:"100%"}},{default:he(()=>[ie(a,{height:"40px",class:"_fc-l-tabs"},{default:he(()=>[ce("div",{class:oe(["_fc-l-tab",{active:e.activeMenuTab==="menu"}]),onClick:t[0]||(t[0]=O=>e.activeMenuTab="menu")},Ye(e.t("menu.component")),3),ce("div",{class:oe(["_fc-l-tab",{active:e.activeMenuTab==="tree"}]),onClick:t[1]||(t[1]=O=>e.activeMenuTab="tree")},Ye(e.t("menu.tree")),3)]),_:1}),nn(ie(s,null,{default:he(()=>[(Y(!0),fe(bt,null,bn(e.menuList,(O,F)=>(Y(),fe(bt,null,[e.hiddenMenu.indexOf(O.name)===-1?(Y(),fe("div",{class:"_fc-l-group",key:F},[ce("h4",{class:"_fc-l-title",onClick:N=>O.hidden=!O.hidden},[Dt(Ye(e.t("menu."+O.name)||O.title)+" ",1),ce("i",{class:oe(["fc-icon icon-arrow",{down:!O.hidden}])},null,2)],8,OWe),nn(ie(l,{group:{name:"default",pull:"clone",put:!1},sort:!1,itemKey:"name",class:"_fc-l-list",list:O.list},{item:he(({element:N})=>[e.hiddenItem.indexOf(N.name)===-1?(Y(),fe("div",{key:0,class:"_fc-l-item",onClick:B=>e.clickMenu(N)},[ce("div",MWe,[ce("i",{class:oe(["fc-icon",N.icon||"icon-input"])},null,2)]),ce("span",NWe,Ye(e.t("com."+N.name+".name")||N.label),1)],8,TWe)):Fe("",!0)]),_:2},1032,["list"]),[[$n,!O.hidden]])])):Fe("",!0)],64))),256))]),_:1},512),[[$n,e.activeMenuTab==="menu"]]),e.activeMenuTab==="tree"?(Y(),Pe(s,{key:0},{default:he(()=>[ie(f,{ref:"treeRef",data:e.treeInfo,"default-expand-all":"","expand-on-click-node":!1,onCurrentChange:e.treeChange},{default:he(({node:O,data:F})=>[ce("div",{class:oe(["_fc-tree-node",{active:e.activeRule===F.rule}])},[ce("div",FWe,[ce("i",{class:oe(["fc-icon",F.rule._menu&&F.rule._menu.icon||"icon-cell"])},null,2),ce("span",null,Ye((F.rule.title||"").trim()||F.rule.props&&F.rule.props.label||e.t("com."+(F.rule._menu&&F.rule._menu.name)+".name")||F.rule.type),1)]),F.slot?Fe("",!0):(Y(),fe("div",{key:0,class:"_fc-tree-more",onClick:t[2]||(t[2]=Gt(()=>{},["stop"]))},[ie(d,{trigger:"click",size:"default"},{dropdown:he(()=>[ie(c,null,{default:he(()=>[F.rule._fc_drag_tag!=="_"?(Y(),Pe(u,{key:"1",onClick:N=>e.toolHandle(F.rule,"copy")},{default:he(()=>[Dt(Ye(e.t("props.copy")),1)]),_:2},1032,["onClick"])):Fe("",!0),F.rule._menu&&F.rule._menu.children&&F.rule._fc_drag_tag!=="_"?(Y(),Pe(u,{key:"2",onClick:N=>e.toolHandle(F.rule,"addChild")},{default:he(()=>[Dt(Ye(e.t("form.appendChild")),1)]),_:2},1032,["onClick"])):Fe("",!0),ie(u,{key:"3",onClick:N=>e.toolHandle(F.rule,"delete")},{default:he(()=>[Dt(Ye(e.t("props.delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:he(()=>[RWe]),_:2},1024)]))],2)]),_:1},8,["data","onCurrentChange"])]),_:1})):Fe("",!0)]),_:1})]),_:1}),ie(p,{class:"_fc-m"},{default:he(()=>[ie(a,{class:"_fc-m-tools",height:"45"},{default:he(()=>[ce("div",IWe,[e.inputForm.state?Fe("",!0):(Y(),fe(bt,{key:0},[e.getConfig("showDevice")!==!1?(Y(),fe(bt,{key:0},[e.device!=="pc"?(Y(),fe("svg",{key:0,onClick:t[3]||(t[3]=O=>e.device="pc"),class:"icon",viewBox:"0 0 1024 1024"},BWe)):Fe("",!0),e.device==="pc"?(Y(),fe("svg",LWe,PWe)):Fe("",!0),e.device!=="pad"?(Y(),fe("svg",{key:2,onClick:t[4]||(t[4]=O=>e.device="pad"),class:"icon",viewBox:"0 0 1024 1024"},jWe)):Fe("",!0),e.device==="pad"?(Y(),fe("svg",VWe,zWe)):Fe("",!0),e.device!=="mobile"?(Y(),fe("svg",{key:4,onClick:t[5]||(t[5]=O=>e.device="mobile"),class:"icon",viewBox:"0 0 1024 1024"},HWe)):Fe("",!0),e.device==="mobile"?(Y(),fe("svg",$We,UWe)):Fe("",!0),WWe],64)):Fe("",!0),ce("div",null,[ce("i",{class:oe(["fc-icon icon-pre-step",{disabled:!e.operation.list[e.operation.idx-1]}]),onClick:t[6]||(t[6]=(...O)=>e.prevOperationRecord&&e.prevOperationRecord(...O))},null,2),ce("i",{class:oe(["fc-icon icon-next-step",{disabled:!e.operation.list[e.operation.idx+1]}]),onClick:t[7]||(t[7]=(...O)=>e.nextOperationRecord&&e.nextOperationRecord(...O))},null,2)])],64))]),ce("div",GWe,[e.inputForm.state?Fe("",!0):(Y(),fe(bt,{key:0},[ft(e.$slots,"handle"),e.getConfig("showSaveBtn",!1)?(Y(),Pe(v,{key:0,type:"success",plain:"",size:"small",onClick:e.handleSave},{default:he(()=>[qWe,Dt(" "+Ye(e.t("props.save")),1)]),_:1},8,["onClick"])):Fe("",!0),ie(v,{type:"primary",plain:"",size:"small",onClick:e.openPreview},{default:he(()=>[KWe,Dt(" "+Ye(e.t("props.preview")),1)]),_:1},8,["onClick"]),ie(g,{title:e.t("designer.clearWarn"),width:"200px","confirm-button-text":e.t("props.clear"),"cancel-button-text":e.t("props.cancel"),onConfirm:e.clearDragRule},{reference:he(()=>[ie(v,{type:"danger",plain:"",size:"small"},{default:he(()=>[YWe,Dt(Ye(e.t("props.clear")),1)]),_:1})]),_:1},8,["title","confirm-button-text","cancel-button-text","onConfirm"]),e.handle&&e.handle.length?(Y(),Pe(d,{key:1,trigger:"click",size:"default"},{dropdown:he(()=>[ie(c,null,{default:he(()=>[(Y(!0),fe(bt,null,bn(e.handle,O=>(Y(),Pe(u,{onClick:Gt(F=>e.triggerHandle(O),["stop"])},{default:he(()=>[ce("div",null,Ye(O.label),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),default:he(()=>[ie(v,{class:"_fd-m-extend",plain:"",size:"small"},{default:he(()=>[XWe]),_:1})]),_:1})):Fe("",!0)],64)),QWe,ce("div",JWe,[e.inputCheckStatus?(Y(),fe("i",ZWe)):Fe("",!0),ce("span",null,Ye(e.t("props.inputData"))+"\uFF1A",1),ie(b,{size:"small","model-value":e.inputForm.state,"inline-prompt":"","onUpdate:modelValue":e.openInputData},null,8,["model-value","onUpdate:modelValue"])])])]),_:3}),ie(s,{class:"_fc-m-con"},{default:he(()=>[(Y(),fe("a",{key:e.activeRule?e.activeRule._fc_id:"",style:{"background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAAiCAYAAAAu2wBPAAABG2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+l1vpCgAAAAFzUkdCAK7OHOkAAAAEc0JJVAgICAh8CGSIAAAQoElEQVR4nO1dW3KbSBf+usGM335lBQMjKVV6imYFI6/Azgoir2CcFdhegZMVRF5BnBVYs4I4T1QJMMwKwrw5GLr/B53GRwhdLTuZDF9VKgj6crr79OlzAwMNGjRo0KBBgwYNGjRo0KBBgwYNGjT4mSHiOP4MoL+Dtg48zxsDQBzH1wAGqyoopc7b7fbZDvpu0KBBg40hi6J4v4N2bpjwG2AN4QcAUsqrHfTdoEGDBltBWpY1fmwjSqlP7HqwZrWx53k3j+27QYMGDbaF7XleEsfxCMCQ3R8DSNZtREr5jl3/yR4l1BYAuJjVDBvtr0GDBt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":"no-repeat !important","background-size":"cover !important","background-position":"center !important",position:"absolute !important",overflow:"hidden !important",left:"50% !important",width:"160px!important",right:"0 !important",top:"auto !important",bottom:"9px !important",display:"block !important",height:"17px !important","text-align":"center !important",opacity:"1 !important",visibility:"visible !important",margin:"0 0 0 -80px !important",padding:"0 !important"},target:"_blank",href:"https://form-create.com/"})),ce("div",{class:oe(["_fc-m-drag",e.device]),ref:"dragCon",style:$t({"--fc-drag-empty":`'${e.t("designer.dragEmpty")}'`,"--fc-child-empty":`'${e.t("designer.childEmpty")}'`})},[e.inputForm.state?(Y(),fe("div",eGe,[(Y(),Pe(y,{key:e.inputForm.key,rule:e.inputForm.rule,option:e.inputForm.option,api:e.inputForm.api,"onUpdate:api":t[8]||(t[8]=O=>e.inputForm.api=O),disabled:!1},null,8,["rule","option","api"]))])):(Y(),Pe(w,{key:1,rule:e.dragForm.rule,option:e.formOptions,api:e.dragForm.api,"onUpdate:api":t[9]||(t[9]=O=>e.dragForm.api=O)},null,8,["rule","option","api"]))],6),e.inputForm.state?(Y(),fe("div",tGe,[ie(v,{plain:"",onClick:t[10]||(t[10]=O=>e.inputClear())},{default:he(()=>[Dt(Ye(e.t("props.clear")),1)]),_:1}),ie(v,{plain:"",onClick:t[11]||(t[11]=O=>e.inputReset())},{default:he(()=>[Dt(Ye(e.t("props.reset")),1)]),_:1}),ie(v,{type:"primary",plain:"",onClick:t[12]||(t[12]=O=>e.inputSave())},{default:he(()=>[Dt(Ye(e.t("props.save")),1)]),_:1})])):Fe("",!0)]),_:1})]),_:3}),e.config&&e.config.showConfig===!1?Fe("",!0):(Y(),Pe(m,{key:0,class:"_fc-r",width:"320px"},{default:he(()=>[ie(p,{style:{height:"100%"}},{default:he(()=>[ie(a,{height:"40px",class:"_fc-r-tabs"},{default:he(()=>[e.activeRule||e.customForm.isShow||e.config&&e.config.showFormConfig===!1?(Y(),fe("div",{key:0,class:oe(["_fc-r-tab",{active:e.activeTab==="props"}]),onClick:t[13]||(t[13]=O=>e.activeTab="props")},Ye(e.t("designer.component")),3)):Fe("",!0),e.config&&e.config.showFormConfig===!1?Fe("",!0):(Y(),fe("div",{key:1,class:oe(["_fc-r-tab",{active:e.activeTab==="form"&&(!!e.activeRule||e.customForm.isShow)}]),onClick:t[14]||(t[14]=O=>e.activeTab="form")},Ye(e.t("designer.form")),3))]),_:1}),e.config&&e.config.showFormConfig===!1?Fe("",!0):nn((Y(),Pe(s,{key:0,class:"_fc-r-tab-form"},{default:he(()=>[ie(w,{rule:e.form.rule,option:e.form.option,modelValue:e.form.value,onChange:e.formOptChange,api:e.form.api,"onUpdate:api":t[15]||(t[15]=O=>e.form.api=O)},null,8,["rule","option","modelValue","onChange","api"])]),_:1},512)),[[$n,e.activeTab==="form"]]),nn((Y(),Pe(s,{class:"_fc-r-tab-props",key:e.activeRule?e.activeRule._fc_id:e.customForm.config?e.customForm.key:""},{default:he(()=>[e.activeRule||e.customForm.config&&(e.customForm.config.name||e.customForm.config.label)?(Y(),fe(bt,{key:0},[ce("p",nGe,Ye(e.t("designer.type")),1),ie(x,{type:"success",effect:"plain","disable-transitions":""},{default:he(()=>[e.activeRule?(Y(),fe(bt,{key:0},[Dt(Ye(e.t("com."+e.activeRule._menu.name+".name")||e.activeRule._menu.label),1)],64)):(Y(),fe(bt,{key:1},[Dt(Ye(e.t("com."+e.customForm.config.name+".name")||e.customForm.config.label||e.customForm.config.name),1)],64))]),_:1}),e.activeRule&&e.activeRule.name?(Y(),fe(bt,{key:0},[ce("p",rGe,Ye(e.t("designer.name")),1),ie(_,{size:"small",class:"_fc-r-name-input","model-value":e.activeRule.name,readonly:""},{append:he(()=>[ce("i",{class:"fc-icon icon-auto",onClick:t[16]||(t[16]=(...O)=>e.updateName&&e.updateName(...O))})]),_:1},8,["model-value"])],64)):Fe("",!0)],64)):Fe("",!0),e.baseForm.isShow?(Y(),Pe(E,{key:1},{default:he(()=>[Dt(Ye(e.t("designer.rule")),1)]),_:1})):Fe("",!0),nn(ie(w,{api:e.baseForm.api,"onUpdate:api":t[17]||(t[17]=O=>e.baseForm.api=O),rule:e.baseForm.rule,option:e.baseForm.options,modelValue:e.baseForm.value,onChange:e.baseChange},null,8,["api","rule","option","modelValue","onChange"]),[[$n,e.baseForm.isShow]]),e.propsForm.isShow?(Y(),Pe(E,{key:2},{default:he(()=>[Dt(Ye(e.t("designer.props")),1)]),_:1})):Fe("",!0),nn(ie(w,{api:e.propsForm.api,"onUpdate:api":t[18]||(t[18]=O=>e.propsForm.api=O),rule:e.propsForm.rule,option:e.propsForm.options,modelValue:e.propsForm.value,onChange:e.propChange,onRemoveField:e.propRemoveField},null,8,["api","rule","option","modelValue","onChange","onRemoveField"]),[[$n,e.propsForm.isShow]]),e.customForm.isShow&&e.customForm.propsShow?(Y(),Pe(E,{key:3},{default:he(()=>[Dt(Ye(e.t("designer.props")),1)]),_:1})):Fe("",!0),e.customForm.isShow&&e.customForm.propsShow?(Y(),Pe(w,{api:e.customForm.api,"onUpdate:api":t[19]||(t[19]=O=>e.customForm.api=O),rule:e.customForm.rule,option:e.customForm.options,key:e.customForm.key,onChange:e.customFormChange},null,8,["api","rule","option","onChange"])):Fe("",!0),e.eventShow?(Y(),Pe(E,{key:5},{default:he(()=>[Dt(Ye(e.t("designer.event")),1)]),_:1})):Fe("",!0),e.eventShow?(Y(),Pe(C,{key:6,"event-name":e.activeRule&&e.activeRule._menu.event||[],"component-name":e.activeRule&&e.activeRule._menu.name||"","model-value":e.activeRule&&e.activeRule._on||{},"onUpdate:modelValue":e.changeEvent},null,8,["event-name","component-name","model-value","onUpdate:modelValue"])):Fe("",!0),e.activeRule?(Y(),fe(bt,{key:7},[e.validateForm.isShow?(Y(),Pe(E,{key:0},{default:he(()=>[Dt(Ye(e.t("designer.validate")),1)]),_:1})):Fe("",!0),e.validateForm.isShow?(Y(),Pe(w,{api:e.validateForm.api,"onUpdate:api":t[20]||(t[20]=O=>e.validateForm.api=O),rule:e.validateForm.rule,option:e.validateForm.options,modelValue:e.validateForm.value,onChange:e.validateChange,key:e.activeRule._fc_id},null,8,["api","rule","option","modelValue","onChange"])):Fe("",!0)],64)):Fe("",!0)]),_:1})),[[$n,e.activeTab==="props"]])]),_:1})]),_:1})),ie(I,{modelValue:e.preview.state,"onUpdate:modelValue":t[23]||(t[23]=O=>e.preview.state=O),width:"800px",class:"_fd-preview-dialog","append-to-body":""},{default:he(()=>[ie(k,{class:"_fd-preview-tabs",modelValue:e.previewStatus,"onUpdate:modelValue":t[21]||(t[21]=O=>e.previewStatus=O)},{default:he(()=>[ie(T,{label:e.t("form.formMode"),name:"form"},null,8,["label"]),ie(T,{label:e.t("form.componentMode"),name:"component"},null,8,["label"])]),_:1},8,["modelValue"]),e.previewStatus==="form"?(Y(),fe(bt,{key:0},[e.preview.state?(Y(),Pe(y,{key:0,rule:e.preview.rule,option:e.preview.option,api:e.preview.api,"onUpdate:api":t[22]||(t[22]=O=>e.preview.api=O)},null,8,["rule","option","api"])):Fe("",!0)],64)):(Y(),fe("pre",oGe,[ce("code",{innerHTML:e.preview.html},null,8,iGe)]))]),_:1},8,["modelValue"])]),_:3}))]),_:3})]),_:3},8,["style","onDragenter","onDragleave","onDrop"])}]]),ipe=Te({name:"DragTool",emits:["create","copy","addChild","delete","active","fc.el"],props:{dragBtn:Boolean,children:String,mask:Boolean,handleBtn:[Boolean,Array],formCreateInject:Object,unique:String,only:Boolean},inject:{fcx:{default:null},designer:{default:null},dragTool:{default:null}},provide(){return{dragTool:this}},computed:{isCreate(){return!!this.dragTool&&!!this.dragTool.children},btns(){return Array.isArray(this.handleBtn)?!!this.handleBtn.length&&this.handleBtn:this.handleBtn!==!1},id(){return this.unique||this.formCreateInject.id},hiddenMenu(){return this.designer.ctx.hiddenDragMenu},hiddenBtn(){return this.designer.ctx.hiddenDragBtn}},methods:{active(){this.fcx.active!==this.id&&(this.fcx.active=this.id,this.$emit("active"))}},mounted(){this.$emit("fc.el",this)}}),ape={key:0,class:"_fd-drag-mask"},lpe={key:1,class:"_fd-drag-l"},spe={key:0,class:"_fd-drag-btn",style:{cursor:"move"}},upe=[ce("i",{class:"fc-icon icon-move"},null,-1)],cpe={key:2,class:"drag-r"},dpe=[ce("i",{class:"fc-icon icon-add"},null,-1)],fpe=[ce("i",{class:"fc-icon icon-copy"},null,-1)],ppe=[ce("i",{class:"fc-icon icon-add-child"},null,-1)],hpe=[ce("i",{class:"fc-icon icon-delete"},null,-1)];const vpe=jo(ipe,[["render",function(e,t,n,r,o,i){return Y(),fe("div",{class:oe(["_fd-drag-tool",{active:e.fcx.active===e.id}]),onClick:t[4]||(t[4]=Gt((...a)=>e.active&&e.active(...a),["stop"]))},[e.mask?(Y(),fe("div",ape)):Fe("",!0),e.hiddenBtn?Fe("",!0):(Y(),fe("div",lpe,[e.fcx.active===e.id&&e.dragBtn!==!1?(Y(),fe("div",spe,upe)):Fe("",!0)])),e.btns===!1||e.hiddenMenu?Fe("",!0):(Y(),fe("div",cpe,[ft(e.$slots,"handle",{},()=>[e.isCreate&&(e.btns===!0||e.btns.indexOf("create")>-1)?(Y(),fe("div",{key:0,class:"_fd-drag-btn",onClick:t[0]||(t[0]=a=>e.$emit("create"))},dpe)):Fe("",!0),!e.only&&(e.btns===!0||e.btns.indexOf("copy")>-1)?(Y(),fe("div",{key:1,class:"_fd-drag-btn",onClick:t[1]||(t[1]=a=>e.$emit("copy"))},fpe)):Fe("",!0),e.children&&(e.btns===!0||e.btns.indexOf("addChild")>-1)?(Y(),fe("div",{key:2,class:"_fd-drag-btn",onClick:t[2]||(t[2]=a=>e.$emit("addChild"))},ppe)):Fe("",!0),e.btns===!0||e.btns.indexOf("delete")>-1?(Y(),fe("div",{key:3,class:"_fd-drag-btn _fd-drag-danger",onClick:t[3]||(t[3]=a=>e.$emit("delete"))},hpe)):Fe("",!0)])])),ft(e.$slots,"default")],2)}]]),aGe=Te({name:"Struct",emits:["update:modelValue"],props:{modelValue:[Object,Array,Function],title:String,defaultValue:{require:!1},validate:Function},inject:["designer"],computed:{t(){return this.designer.setupState.t},configured(){return!Lr.empty(this.modelValue)}},data:()=>({editor:null,visible:!1,oldVal:null}),watch:{modelValue(){this.load()},visible(e){e&&this.load()}},methods:{load(){const e=pp(Hde(this.modelValue?Mi(this.modelValue):this.defaultValue));this.oldVal=e,this.$nextTick(()=>{this.editor=Fo(Mg(this.$refs.editor,{lineNumbers:!0,mode:"javascript",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:e||""}))})},onOk(){const e=this.editor.getValue();let t;try{t=new Function("return "+e)()}catch(n){return console.error(n),nu(this.t("struct.errorMsg")),!1}return this.validate&&this.validate(t)===!1?(nu(this.t("struct.errorMsg")),!1):(this.visible=!1,pp(t)!==this.oldVal&&this.$emit("update:modelValue",t),!0)}}}),lGe={class:"_fd-struct"},sGe={key:0,ref:"editor"},uGe=jo(aGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-button"),l=Qe("el-badge"),s=Qe("el-dialog");return Y(),fe("div",lGe,[ie(l,{type:"warning","is-dot":"",hidden:!e.configured},{default:he(()=>[ie(a,{onClick:t[0]||(t[0]=u=>e.visible=!0),size:"small"},{default:he(()=>[Dt(Ye(e.title||e.t("struct.title")),1)]),_:1})]),_:1},8,["hidden"]),ie(s,{class:"_fd-struct-con",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":t[2]||(t[2]=u=>e.visible=u),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":""},{footer:he(()=>[ce("div",null,[ie(a,{onClick:t[1]||(t[1]=u=>e.visible=!1),size:"default"},{default:he(()=>[Dt(Ye(e.t("props.cancel")),1)]),_:1}),ie(a,{type:"primary",onClick:e.onOk,size:"default",color:"#2f73ff"},{default:he(()=>[Dt(Ye(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:he(()=>[e.visible?(Y(),fe("div",sGe,null,512)):Fe("",!0)]),_:1},8,["title","modelValue"])])}]]),cGe=jo(Te({name:"fcRow",mounted(){}}),[["render",function(e,t,n,r,o,i){const a=Qe("el-col");return Y(),Pe(a,{span:24},{default:he(()=>[ce("div",Un({class:["_fd-row el-row",{"_fc-child-empty":!e.$slots.default}]},e.$attrs),[ft(e.$slots,"default")],16)]),_:3})}]]),dGe=Te({name:"HtmlEditor",emits:["update:modelValue"],props:{modelValue:String,title:String,defaultValue:{require:!1}},inject:["designer"],computed:{t(){return this.designer.setupState.t}},data:()=>({editor:null,visible:!1,oldVal:null}),watch:{modelValue(){this.load()},visible(e){e&&this.load()}},methods:{validateXML(e){var t;const n=new DOMParser().parseFromString(e,"application/xml").getElementsByTagName("parsererror");return n.length>0&&(t=n[0].innerText.split(` |
|
111 |
`)[0])!=null?t:""},load(){this.oldVal=this.modelValue,this.$nextTick(()=>{this.editor=Fo(Mg(this.$refs.editor,{lineNumbers:!0,mode:"xml",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:this.modelValue||""}))})},onOk(){const e=this.editor.getValue();return this.validateXML(e)?(nu(this.t("struct.errorMsg")),!1):(this.visible=!1,e!==this.oldVal&&this.$emit("update:modelValue",e),!0)}}}),fGe={class:"_fd-html-editor"},pGe={key:0,ref:"editor"},hGe=jo(dGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-button"),l=Qe("el-dialog");return Y(),fe("div",fGe,[ie(a,{onClick:t[0]||(t[0]=s=>e.visible=!0),style:{width:"100%"}},{default:he(()=>[Dt(Ye(e.title||e.t("struct.title")),1)]),_:1}),ie(l,{class:"_fd-html-editor-con",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":t[2]||(t[2]=s=>e.visible=s),"close-on-click-modal":!1,"append-to-body":""},{footer:he(()=>[ce("div",null,[ie(a,{onClick:t[1]||(t[1]=s=>e.visible=!1),size:"default"},{default:he(()=>[Dt(Ye(e.t("props.cancel")),1)]),_:1}),ie(a,{type:"primary",onClick:e.onOk,size:"default"},{default:he(()=>[Dt(Ye(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:he(()=>[e.visible?(Y(),fe("div",pGe,null,512)):Fe("",!0)]),_:1},8,["title","modelValue"])])}]]),vGe=Te({name:"StructEditor",props:{modelValue:[Object,Array,Function],defaultValue:{require:!1}},inject:["designer"],data:()=>({editor:null,visible:!1,err:!1,oldVal:null}),computed:{t(){return this.designer.setupState.t}},mounted(){this.$nextTick(()=>{this.load()})},methods:{load(){const e=this.modelValue?pp(this.modelValue):"";this.oldVal=e,this.$nextTick(()=>{this.editor=Fo(Mg(this.$refs.editor,{lineNumbers:!0,mode:"javascript",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:e||""}))})},save(){const e=this.editor.getValue();let t;try{t=new Function("return "+e)()}catch(n){return console.error(n),nu(this.t("struct.errorMsg")),!1}return this.validate&&this.validate(t)===!1?(this.err=!0,!1):(this.visible=!1,pp(t)!==this.oldVal&&this.$emit("update:modelValue",t),!0)}}}),mGe={class:"_fd-struct-editor"},gGe={ref:"editor"},yGe=jo(vGe,[["render",function(e,t,n,r,o,i){return Y(),fe("div",mGe,[ce("div",gGe,null,512)])}]]),bGe=Te({name:"FetchConfig",emits:["update:modelValue"],props:{modelValue:[Object,String],to:String},components:{DragForm:Br.$form(),FnEditor:Gx,StructEditor:yGe},inject:["designer"],data(){return{visible:!1,value:Mi(this.modelValue||{}),form:{api:{},formData:{},rule:[],options:{form:{labelWidth:"90px",size:"default"},submitBtn:!1,resetBtn:!1}}}},computed:{t(){return this.designer.setupState.t},configured(){return!Lr.empty(this.modelValue)}},watch:{visible(e){e&&(this.value=Mi(this.modelValue||{}))}},methods:{open(){this.visible=!0},active(){const e=this.value;this.form.rule=e.type==="static"?[]:(t=>[{type:"input",field:"action",title:t("fetch.action"),value:"",props:{size:"default"},validate:[{required:!0,message:t("fetch.actionRequired"),trigger:"blur"}]},{type:"radio",field:"method",title:t("fetch.method"),value:"GET",props:{size:"default"},options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],$required:!0},{type:"TableOptions",field:"headers",title:t("fetch.headers"),value:{},props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object",size:"default"}},{type:"TableOptions",field:"data",title:t("fetch.data"),value:{},props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object",size:"default"}}])(this.t),this.form.formData={...e},this.form.label=e.label,this.form.type=e.type,this.form.data=e.data,this.form.parse=e.parse||"",this.form.onError=e.onError||""},save(){this.form.api.validate().then(()=>{const e={...this.form.formData};this.$refs.parse&&!this.$refs.parse.save()||this.$refs.error&&!this.$refs.error.save()||(e.parse=this.form.parse,e.onError=this.form.onError,e.label=this.form.label,e.type=this.form.type,e.to=this.to||"options",this.$emit("update:modelValue",e),this.visible=!1)}).catch(e=>{console.error(e),nu(e[Object.keys(e)[0]][0].message)})}},created(){this.active()}}),AGe={class:"_fd-gfc"},wGe=jo(bGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-button"),l=Qe("el-badge"),s=Qe("DragForm"),u=Qe("el-tab-pane"),c=Qe("FnEditor"),d=Qe("el-tabs"),f=Qe("el-container"),p=Qe("el-dialog");return Y(),fe("div",AGe,[ie(l,{type:"warning","is-dot":"",hidden:!e.configured},{default:he(()=>[ie(a,{onClick:t[0]||(t[0]=m=>e.visible=!0),size:"small"},{default:he(()=>[Dt(Ye(e.t("struct.title")),1)]),_:1})]),_:1},8,["hidden"]),ie(p,{class:"_fd-gfc-dialog",title:e.t("fetch.optionsType.fetch"),modelValue:e.visible,"onUpdate:modelValue":t[6]||(t[6]=m=>e.visible=m),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"980px"},{footer:he(()=>[ce("div",null,[ie(a,{size:"default",onClick:t[5]||(t[5]=m=>e.visible=!1)},{default:he(()=>[Dt(Ye(e.t("props.cancel")),1)]),_:1}),ie(a,{type:"primary",size:"default",onClick:e.save,color:"#2f73ff"},{default:he(()=>[Dt(Ye(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:he(()=>[ie(f,{class:"_fd-gfc-con",style:{height:"450px"}},{default:he(()=>[ie(d,{"model-value":"first",class:"_fc-tabs",style:{width:"100%"}},{default:he(()=>[ie(u,{label:e.t("fetch.config"),name:"first"},{default:he(()=>[ie(s,{api:e.form.api,"onUpdate:api":t[1]||(t[1]=m=>e.form.api=m),modelValue:e.form.formData,"onUpdate:modelValue":t[2]||(t[2]=m=>e.form.formData=m),rule:e.form.rule,option:e.form.options},null,8,["api","modelValue","rule","option"])]),_:1},8,["label"]),ie(u,{lazy:"",label:e.t("fetch.parse"),name:"second"},{default:he(()=>[ie(c,{style:{height:"415px"},modelValue:e.form.parse,"onUpdate:modelValue":t[3]||(t[3]=m=>e.form.parse=m),name:"parse",args:[{name:"res",info:e.t("fetch.response")}],ref:"parse"},null,8,["modelValue","args"])]),_:1},8,["label"]),ie(u,{lazy:"",label:e.t("fetch.onError"),name:"third"},{default:he(()=>[ie(c,{style:{height:"415px"},modelValue:e.form.onError,"onUpdate:modelValue":t[4]||(t[4]=m=>e.form.onError=m),name:"onError",args:["e"],ref:"error"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}]]),xGe=Te({name:"ColorInput",inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:String},watch:{modelValue(){this.value=this.modelValue||""},value(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},data(){return{value:this.modelValue||""}},methods:{},created(){}}),_Ge={class:"_fd-color-input"},EGe=jo(xGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-color-picker"),l=Qe("el-input");return Y(),fe("div",_Ge,[ie(l,{clearable:"",modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=s=>e.value=s)},{append:he(()=>[ie(a,{"show-alpha":"","color-format":"hex",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=s=>e.value=s)},null,8,["modelValue"])]),_:1},8,["modelValue"])])}]]),CGe=Te({name:"SizeInput",inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:String,size:String,unit:{type:Array,default:()=>["auto","px","%","vh","vw","em","rem"]},defaultUnit:{type:String,default:"px"}},watch:{modelValue(){this.parseValue()}},data(){return{idx:1,num:0,oldValue:this.modelValue||""}},methods:{parseValue(){this.modelValue!=="auto"?(this.idx=Math.max(this.unit.indexOf(this.defaultUnit),0),this.unit.forEach((e,t)=>{(this.modelValue||"").indexOf(e)>-1&&(this.idx=t)}),this.num=Eg(this.modelValue)?null:parseFloat(this.modelValue||0)):(this.idx=0,this.num=0)},submit(){this.oldValue=Eg(this.num)?"":""+this.num+this.unit[this.idx],this.$emit("update:modelValue",this.oldValue),this.$emit("change",this.oldValue)},changeType(e){if(e!==void 0){if(this.idx===e)return;this.idx=e}else this.idx++,this.idx>4&&(this.idx=0);this.unit[this.idx]==="auto"?(this.oldValue="auto",this.$emit("update:modelValue","auto"),this.$emit("change","auto")):this.submit()}},created(){this.parseValue()}}),SGe={class:"_fd-size-input"},kGe=jo(CGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-button"),l=Qe("el-inputNumber"),s=Qe("el-dropdown-item"),u=Qe("el-dropdown-menu"),c=Qe("el-dropdown");return Y(),fe("div",SGe,[e.unit[e.idx]==="auto"?(Y(),Pe(a,{key:0,size:e.size,style:{width:"150px"},onClick:t[0]||(t[0]=d=>e.changeType())},{default:he(()=>[Dt(Ye(e.unit[e.idx]),1)]),_:1},8,["size"])):(Y(),fe(bt,{key:1},[ie(l,{size:e.size,modelValue:e.num,"onUpdate:modelValue":t[1]||(t[1]=d=>e.num=d),onChange:e.submit,"controls-position":"right"},null,8,["size","modelValue","onChange"]),ie(c,{trigger:"click",size:"small"},{dropdown:he(()=>[ie(u,null,{default:he(()=>[(Y(!0),fe(bt,null,bn(e.unit,(d,f)=>(Y(),Pe(s,{key:d,onClick:p=>e.changeType(f)},{default:he(()=>[ce("div",null,Ye(d),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:he(()=>[ie(a,{size:e.size},{default:he(()=>[Dt(Ye(e.unit[e.idx]),1)]),_:1},8,["size"])]),_:1})],64))])}]]),DGe=Te({name:"FieldInput",inject:["designer"],emits:["update:modelValue"],props:{modelValue:String},computed:{fieldReadonly(){return this.designer.setupState.fieldReadonly},activeRule(){return this.designer.setupState.activeRule},t(){return this.designer.setupState.t}},data(){return{value:this.modelValue||"",oldValue:""}},watch:{modelValue(e){this.value=e}},methods:{getSubChildren(){let e=this.designer.setupState.getSubFormChildren(this.activeRule)||[];return e=Lr.trueArray(e)?e:this.designer.setupState.children,e},getSubFieldChildren(){const e=this.getSubChildren(),t=[],n=r=>(r&&r.forEach(o=>{o&&o._fc_drag_tag&&o.field?t.push({...o,children:[]}):o&&o.children&&n(o.children)}),t);return n(e)},checkValue(){const e=this.oldValue;let t=(this.value||"").replace(/[\s ]/g,"");if(!t)return nu(this.t("computed.fieldEmpty")),e;if(!/^[a-zA-Z]/.test(t))return nu(this.t("computed.fieldChar")),e;if(e!==t){const n=t.indexOf(".")>-1;if(n&&(t=t.replaceAll(".","_")),this.getSubFieldChildren().filter(r=>r.field===t).length>0)return nu(this.t("computed.fieldExist",{label:t})),e;if(n)return t}return this.oldValue="",t},onFocus(){this.oldValue=this.value},makeField(){this.oldValue=this.value,this.value=vr(),this.onInput()},onInput(){this.value!==this.modelValue&&(this.value=this.checkValue(),this.value!==this.modelValue&&this.$emit("update:modelValue",this.value))}}}),OGe={class:"_fd-field-input"},TGe=jo(DGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-input");return Y(),fe("div",OGe,[ie(a,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=l=>e.value=l),readonly:e.fieldReadonly,disabled:e.fieldReadonly,onFocus:e.onFocus,onBlur:e.onInput},Ff({_:2},[e.fieldReadonly?void 0:{name:"append",fn:he(()=>[ce("i",{class:"fc-icon icon-auto",onClick:t[0]||(t[0]=(...l)=>e.makeField&&e.makeField(...l))})]),key:"0"}]),1032,["modelValue","readonly","disabled","onFocus","onBlur"])])}]]),MGe=Te({name:"FnConfig",emits:["update:modelValue"],props:{modelValue:[Object,void 0,null],eventConfig:{type:Array,default:()=>[]}},inject:["designer"],components:{FnEditor:Gx},data:()=>({visible:!1,activeData:null,defActive:"no",event:{},cus:!1,eventStr:""}),computed:{t(){return this.designer.setupState.t},eventNum(){let e=0;return Object.keys(this.modelValue||{}).forEach(t=>{this.modelValue[t]&&e++}),e}},watch:{visible(e){this.event=e?this.loadFN(Cx({},this.modelValue||{})):{},e||this.destroy()}},methods:{getArgs:e=>e.args.join(", "),loadFN(e){const t={};return this.eventConfig.forEach(n=>{const r=n.name,o=e[r]||"";t[r]={item:n,fn:o}}),t},parseFN(e){const t={};return Object.keys(e).forEach(n=>{e[n].fn&&(t[n]=e[n].fn)}),t},edit(e){e.key=vr(),this.activeData=e,this.eventStr=e.fn||`[[FORM-CREATE-PREFIX-function ${e.item.name}(${this.getArgs(e.item)}){}-FORM-CREATE-SUFFIX]]`,this.defActive=e.item.name},save(){this.$refs.fn.save()&&(this.activeData.fn=this.eventStr,this.destroy())},destroy(){this.activeData=null,this.defActive="no"},close(){this.destroy()},submit(){if(this.activeData)return nu(this.t("event.saveMsg"));this.$emit("update:modelValue",this.parseFN(this.event)),this.visible=!1,this.destroy()}}}),NGe={class:"_fd-fn-list"},FGe=["onClick"],RGe=jo(MGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-button"),l=Qe("el-badge"),s=Qe("el-text"),u=Qe("el-header"),c=Qe("el-menu-item"),d=Qe("el-menu"),f=Qe("el-main"),p=Qe("el-container"),m=Qe("el-aside"),v=Qe("FnEditor"),g=Qe("el-dialog");return Y(),fe("div",NGe,[ie(l,{value:e.eventNum,type:"warning",hidden:e.eventNum<1},{default:he(()=>[ie(a,{onClick:t[0]||(t[0]=b=>e.visible=!0),size:"small"},{default:he(()=>[Dt(Ye(e.t("event.title")),1)]),_:1})]),_:1},8,["value","hidden"]),ie(g,{class:"_fd-fn-list-dialog",title:e.t("event.title"),modelValue:e.visible,"onUpdate:modelValue":t[4]||(t[4]=b=>e.visible=b),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"980px"},{footer:he(()=>[ce("div",null,[ie(a,{size:"default",onClick:t[3]||(t[3]=b=>e.visible=!1)},{default:he(()=>[Dt(Ye(e.t("props.cancel")),1)]),_:1}),ie(a,{type:"primary",size:"default",onClick:e.submit,color:"#2f73ff"},{default:he(()=>[Dt(Ye(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:he(()=>[ie(p,{class:"_fd-fn-list-con",style:{height:"600px"}},{default:he(()=>[ie(m,{style:{width:"300px"}},{default:he(()=>[ie(p,{class:"_fd-fn-list-l"},{default:he(()=>[ie(u,{class:"_fd-fn-list-head",height:"40px"},{default:he(()=>[ie(s,{type:"primary",size:"default"},{default:he(()=>[Dt(Ye(e.t("event.list")),1)]),_:1})]),_:1}),ie(f,null,{default:he(()=>[ie(d,{"default-active":e.defActive,modelValue:e.activeData,"onUpdate:modelValue":t[1]||(t[1]=b=>e.activeData=b)},{default:he(()=>[(Y(!0),fe(bt,null,bn(e.event,(b,y)=>(Y(),Pe(c,{index:y},{default:he(()=>[ce("div",{class:"_fd-fn-list-method",onClick:Gt(w=>e.edit(b),["stop"])},[ce("span",null,[Dt("function"),ce("span",null,Ye(y),1)])],8,FGe)]),_:2},1032,["index"]))),256))]),_:1},8,["default-active","modelValue"])]),_:1})]),_:1})]),_:1}),ie(f,null,{default:he(()=>[ie(p,{class:"_fd-fn-list-r"},{default:he(()=>[e.activeData?(Y(),Pe(u,{key:0,class:"_fd-fn-list-head",height:"40px"},{default:he(()=>[ie(a,{size:"small",onClick:e.close},{default:he(()=>[Dt(Ye(e.t("props.cancel")),1)]),_:1},8,["onClick"]),ie(a,{size:"small",type:"primary",onClick:e.save,color:"#2f73ff"},{default:he(()=>[Dt(Ye(e.t("props.save")),1)]),_:1},8,["onClick"])]),_:1})):Fe("",!0),e.activeData?(Y(),Pe(f,{key:1},{default:he(()=>[ie(v,{ref:"fn",modelValue:e.eventStr,"onUpdate:modelValue":t[2]||(t[2]=b=>e.eventStr=b),name:e.activeData.item.name,args:e.activeData.item.args},null,8,["modelValue","name","args"])]),_:1})):Fe("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}]]),mpe=Te({name:"DragBox",props:["rule","tag","formCreateInject","list"],render(e){const t={...e.$props.rule.props,...e.$attrs};let n="_fd-"+e.$props.tag+"-drag _fd-drag-box";Object.keys(e.$slots).length||(n+=" drag-holder"),t.class=n,t.modelValue=e.$props.list||[...e.$props.formCreateInject.children];const r={};return e.$slots.default&&e.$slots.default().forEach(o=>{o.key&&(r[o.key]=o)}),pn(dB,t,{item:({element:o,index:i})=>{var a;const l=(a=o==null?void 0:o.__fc__)==null?void 0:a.key;if(l){let s=r["_"+o.slot];if(s?s.children.forEach(u=>{u.key===l+"fc"&&(s=u)}):s=r[l+"fc"],s)return pn("div",{class:"_fc-"+e.$props.tag+"-item _fd-drag-item",key:l},s)}return pn("div",{class:"_fc-"+e.$props.tag+"-item _fd-drag-item",key:i},null)}})}}),IGe=Te({name:"FcTableView",props:{label:String,width:[Number,String],formCreateInject:Object,border:{type:Boolean,default:!0},borderWidth:String,borderColor:String,rule:{type:Object,default:()=>({row:1,col:1})}},inject:["designer"],components:{DragTool:vpe,DragBox:mpe},watch:{rule:{handler(){this.initRule(),this.style=this.rule.style},immediate:!0}},data:()=>({unique:{},style:{},dragProp:{rule:{props:{tag:"el-col",group:"default",ghostClass:"ghost",animation:150,handle:"._fd-drag-btn",emptyInsertThreshold:0,direction:"vertical",itemKey:"type"}},tag:"tableCell"},lattice:{},uni:{}}),computed:{t(){return this.designer.setupState.t},tableColor(){const e={};return this.border===!1?e.border="0 none":(this.borderColor&&(e.borderColor=this.borderColor),this.borderWidth&&(e.borderWidth=this.borderWidth)),e}},methods:{getUnique(e){return this.unique[e]||(this.unique[e]=vr()),this.unique[e]},getSlotChildren(e){const t=[];return this.formCreateInject.children.forEach(n=>{e.indexOf(n.slot)>-1&&t.push(n)}),t},dragAdd(e,t){const n=this.designer.setupState,r=this.formCreateInject.children,o=`${t.pid}:${t.idx}`,i=e.item._underlying_vm_,a=n.addRule&&n.addRule.children===n.moveRule;a&&n.moveRule.splice(n.moveRule.indexOf(i),1);let l=0;const s="drag"+t.pid+t.idx;if(this.$refs[s][0].list.length){let u=this.$refs[s][0].list[e.newIndex?e.newIndex-1:0];l=r.indexOf(u)+(e.newIndex?1:0)}else if(r.length){const u=Object.keys(this.$refs);for(let c=u.indexOf(s)-1;c>=0;c--){if(!this.$refs[u[c]]||!this.$refs[u[c]].length)continue;const d=this.$refs[u[c]][0].list||[];if(d.length){l=r.indexOf(d[d.length-1])+1;break}}}e.newIndex=l,a?(i.slot=o,r.splice(e.newIndex,0,i),n.added=!0,n.handleSortAfter({rule:i})):n.dragAdd(r,e,`${t.pid}:${t.idx}`)},dragEnd(e,t){const n=this.designer.setupState,r=this.formCreateInject.children,o=e.item._underlying_vm_,i=r.indexOf(o);e.newIndex=i+(e.newIndex-e.oldIndex),e.oldIndex=i,n.dragEnd(this.formCreateInject.children,e,`${t.pid}:${t.idx}`)},dragStart(){this.designer.setupState.dragStart(this.formCreateInject.children)},dragUnchoose(e){this.designer.setupState.dragUnchoose(this.formCreateInject.children,e)},initRule(){const e=this.rule;e.style||(e.style={}),e.class||(e.class={}),e.layout||(e.layout=[]),e.row||(e.row=1),e.col||(e.col=1)},active(e){const t=`${e.pid}:${e.idx}`,n=this.rule.style[t]||{};this.designer.setupState.customActive({name:"fcTableGrid",props:()=>[{type:"input",field:"width",title:this.t("props.width")},{type:"input",field:"height",title:this.t("props.height")},{type:"input",field:"class",title:this.t("props.class")}],change:(r,o)=>{this.rule.style[t]||(this.rule.style[t]={}),this.rule.style[t][r]=o},formData:{height:n.height||"",width:n.width||"",class:n.class||""}})},command(e){this[e[0]](...e[1])},rmSlot(e,t){const n=Object.keys(e),r=this.formCreateInject.children;let o=0;[...r].forEach((i,a)=>{if(!i.slot)return;let l;t.indexOf(i.slot)>-1?(r.splice(a-o,1),o++):(l=n.indexOf(i.slot))>-1&&(i.slot=e[n[l]])}),t.forEach(i=>{delete this.style[i]}),this.loadRule()},rmRow(e){this.rule.row--;const t={},n=[];for(let i=e.pid;i<this.rule.row+1;i++)for(let a=0;a<this.rule.col;a++)i===e.pid?n.push(`${e.pid}:${a}`):t[`${i}:${a}`]=`${i-1}:${a}`;let r=0;const o=this.rule.layout;[...o].forEach((i,a)=>{i.top===e.pid&&(o.splice(a-r,1),r++)}),o.forEach(i=>{i.top>e.pid&&i.top--}),this.rmSlot(t,n)},rmCol(e){this.rule.col--;const t={},n=[];for(let i=0;i<this.rule.row;i++){for(let a=e.idx+1;a<this.rule.col+1;a++)t[`${i}:${a}`]=`${i}:${a-1}`;n.push(`${i}:${e.idx}`)}let r=0;const o=this.rule.layout;[...o].forEach((i,a)=>{i.left===e.idx&&(o.splice(a-r,1),r++)}),o.forEach(i=>{i.left>e.idx&&i.left--}),this.rmSlot(t,n)},splitRow(e){const t=e.data.layout,n=t.row;if(t.row=0,n>1)for(let r=1;r<n;r++)this.rule.layout.push({...t,top:t.top+r});this.loadRule()},splitCol(e){const t=e.data.layout,n=t.col;if(t.col=0,n>1)for(let r=1;r<n;r++)this.rule.layout.push({...t,left:t.left+r});this.loadRule()},makeMap(e){let t=[];for(let n=e.top;n<(e.row||e.top+1);n++)for(let r=e.left;r<(e.col||e.left+1);r++)t.push(`${n}:${r}`);return t},mergeRight(e){let t;if(e.data.layout){const r=(e.data.layout.col||1)+1;e.data.layout.col=r+e.idx>this.rule.col?this.rule.col-e.idx:r,t=e.data.layout}else t={top:e.pid,left:e.idx,col:2},this.rule.layout.push(t);const n=this.makeMap(t);this.formCreateInject.children.forEach(r=>{!r.slot||n.indexOf(r.slot)>-1&&(r.slot=`${e.pid}:${e.idx}`)}),this.loadRule()},mergeBottom(e){let t;if(e.data.layout){const r=(e.data.layout.row||1)+1;e.data.layout.row=r+r.pid>this.rule.col?this.rule.col-e.pid:r,t=e.data.layout}else t={top:e.pid,left:e.idx,row:2},this.rule.layout.push(t);const n=this.makeMap(t);this.formCreateInject.children.forEach(r=>{!r.slot||n.indexOf(r.slot)>-1&&(r.slot=`${e.pid}:${e.idx}`)}),this.loadRule()},addCol(e,t){if(this.rule.col++,this.rule.layout.forEach(n=>{n.left>(t?e.idx-1:e.idx)&&n.left++}),t||e.idx<this.rule.col-2){const n={};for(let o=0;o<this.rule.row;o++)for(let i=t?e.idx-1:e.idx+1;i<this.rule.col-1;i++)n[`${o}:${i}`]=`${o}:${i+1}`;const r=Object.keys(n);this.formCreateInject.children.forEach(o=>{let i;o.slot&&(i=r.indexOf(o.slot))>-1&&(o.slot=n[r[i]])}),r.forEach(o=>{this.style[o]&&(this.style[n[o]]=this.style[o],delete this.style[o])})}this.loadRule()},addRow(e,t){if(this.rule.row++,this.rule.layout.forEach(n=>{n.top>(t?e.pid-1:e.pid)&&n.top++}),t||e.pid<this.rule.row-2){const n={};for(let o=t?e.pid-1:e.pid+1;o<this.rule.row;o++)for(let i=0;i<this.rule.col;i++)n[`${o}:${i}`]=`${o+1}:${i}`;const r=Object.keys(n);this.formCreateInject.children.forEach(o=>{let i;o.slot&&(i=r.indexOf(o.slot))>-1&&(o.slot=n[r[i]])}),r.reverse().forEach(o=>{this.style[o]&&(this.style[n[o]]=this.style[o],delete this.style[o])})}this.loadRule()},loadRule(){const e=[],t=this.rule||{row:1,col:1};for(let r=0;r<t.row;r++){const o=[];e.push(o);for(let i=0;i<t.col;i++)o.push({rowspan:1,colspan:1,slot:[],show:!0,id:this.getUnique(`${r}${i}`)})}[...t.layout||[]].forEach((r,o)=>{if((!r.row||r.row<=0)&&(!r.col||r.col<=0)||!e[r.top]||!e[r.top][r.left]||!e[r.top][r.left].show)return void t.layout.splice(o,1);const i=e[r.top][r.left];i.layout=r;let a=1,l=1;if(r.col&&(a=r.col+r.left>t.col?t.col-r.left:r.col,i.colspan=a),r.row&&(l=r.row+r.top>t.row?t.row-r.top:r.row,i.rowspan=l),l&&a)for(let s=0;s<l;s++){const u=e[r.top+s];if(u)for(let c=0;c<a;c++)!c&&!s||(u[r.left+c]&&(u[r.left+c].show=!1),i.slot.push(`${r.top+s}:${r.left+c}`))}});const n=r=>!(r&&!r.layout&&r.show);e.forEach((r,o)=>{r.forEach((i,a)=>{let l=!1,s=!1;if(i.layout){const u=i.layout.col||1,c=i.layout.row||1;for(let d=0;d<u;d++)if(!e[o+c]||n(e[o+c][a+d])){s=!0;continue}for(let d=0;d<c;d++)if(!e[o+d]||n(e[o+d][a+u])){l=!0;continue}}else l=n(r[a+1]),s=!e[o+1]||n(e[o+1][a]);i.right=l,i.bottom=s})}),this.lattice=e,this.formCreateInject.rule.props.rule=t}},beforeMount(){this.loadRule()}}),BGe={class:"_fd-table-view"},LGe={class:"_fd-table-view-cell"},PGe=["onClick"],jGe=[ce("i",{class:"fc-icon icon-add-tr"},null,-1)],VGe=["onClick"],zGe=[ce("i",{class:"fc-icon icon-add-tr",style:{transform:"rotate(90deg)"}},null,-1)],HGe={class:"_fd-drag-btn _fd-table-view-btn"},$Ge=ce("i",{class:"fc-icon icon-setting"},null,-1),UGe=jo(IGe,[["render",function(e,t,n,r,o,i){const a=Qe("DragBox"),l=Qe("el-dropdown-item"),s=Qe("el-dropdown-menu"),u=Qe("el-dropdown"),c=Qe("DragTool");return Y(),fe("div",BGe,[ce("table",{border:"1",cellspacing:"0",cellpadding:"0",style:$t(e.tableColor)},[(Y(!0),fe(bt,null,bn(e.rule.row,(d,f)=>(Y(),fe("tr",{key:f},[(Y(!0),fe(bt,null,bn(e.rule.col,(p,m)=>(Y(),fe(bt,null,[e.lattice[f][m].show?(Y(),fe("td",Un({key:`${f}${m}`,ref_for:!0},e.lattice[f][m]?{colspan:e.lattice[f][m].colspan,rowspan:e.lattice[f][m].rowspan}:{},{style:[e.tableColor,e.style&&e.style[`${f}:${m}`]||{}],class:e.rule.class&&e.rule.class[`${f}:${m}`]||""}),[ce("div",LGe,[ie(c,{"drag-btn":!1,"handle-btn":!0,onActive:v=>e.active({pid:f,idx:m}),unique:e.lattice[f][m].id},{handle:he(()=>[ce("div",{class:"_fd-drag-btn _fd-table-view-btn",onClick:v=>e.addRow({pid:f,idx:m,data:e.lattice[f][m]},0)},jGe,8,PGe),ce("div",{class:"_fd-drag-btn _fd-table-view-btn",onClick:v=>e.addCol({pid:f,idx:m,data:e.lattice[f][m]},0)},zGe,8,VGe),ce("div",HGe,[ie(u,{trigger:"click",onCommand:e.command},{dropdown:he(()=>[ie(s,null,{default:he(()=>[ie(l,{command:["addCol",[{pid:f,idx:m,data:e.lattice[f][m]},1]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.addLeft")),1)]),_:2},1032,["command"]),ie(l,{command:["addCol",[{pid:f,idx:m,data:e.lattice[f][m]},0]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.addRight")),1)]),_:2},1032,["command"]),ie(l,{command:["addRow",[{pid:f,idx:m,data:e.lattice[f][m]},1]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.addTop")),1)]),_:2},1032,["command"]),ie(l,{command:["addRow",[{pid:f,idx:m,data:e.lattice[f][m]},0]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.addBottom")),1)]),_:2},1032,["command"]),ie(l,{divided:"",disabled:e.lattice[f][m].right,command:["mergeRight",[{pid:f,idx:m,data:e.lattice[f][m]}]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.mergeRight")),1)]),_:2},1032,["disabled","command"]),ie(l,{disabled:e.lattice[f][m].bottom,command:["mergeBottom",[{pid:f,idx:m,data:e.lattice[f][m]}]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.mergeBottom")),1)]),_:2},1032,["disabled","command"]),ie(l,{divided:"",disabled:!(e.lattice[f][m].layout&&e.lattice[f][m].layout.col>1),command:["splitCol",[{pid:f,idx:m,data:e.lattice[f][m]}]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.splitCol")),1)]),_:2},1032,["disabled","command"]),ie(l,{disabled:!(e.lattice[f][m].layout&&e.lattice[f][m].layout.row>1),command:["splitRow",[{pid:f,idx:m,data:e.lattice[f][m]}]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.splitRow")),1)]),_:2},1032,["disabled","command"]),ie(l,{divided:"",disabled:e.rule.col<2,command:["rmCol",[{pid:f,idx:m,data:e.lattice[f][m]}]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.rmCol")),1)]),_:2},1032,["disabled","command"]),ie(l,{disabled:e.rule.row<2,command:["rmRow",[{pid:f,idx:m,data:e.lattice[f][m]}]]},{default:he(()=>[Dt(Ye(e.t("tableOptions.rmRow")),1)]),_:2},1032,["disabled","command"])]),_:2},1024)]),default:he(()=>[$Ge]),_:2},1032,["onCommand"])])]),default:he(()=>[ie(a,Un({ref_for:!0},e.dragProp,{onAdd:v=>e.dragAdd(v,{pid:f,idx:m}),ref_for:!0,ref:"drag"+f+m,onEnd:v=>e.dragEnd(v,{pid:f,idx:m}),onStart:t[0]||(t[0]=v=>e.dragStart(v)),onUnchoose:t[1]||(t[1]=v=>e.dragUnchoose(v)),list:e.getSlotChildren([`${f}:${m}`,...e.lattice[f][m].slot])}),{default:he(()=>[ft(e.$slots,`${f}:${m}`)]),_:2},1040,["onAdd","onEnd","list"])]),_:2},1032,["onActive","unique"])])],16)):Fe("",!0)],64))),256))]))),128))],4)])}]]),WGe={name:"FcTable",props:{label:String,width:[Number,String],border:{type:Boolean,default:!0},borderWidth:String,borderColor:String,rule:{type:Object,default:()=>({row:1,col:1})}},watch:{rule:{handler(){this.initRule(),this.loadRule(),this.tdStyle=this.rule.style||{},this.tdClass=this.rule.class||{}},immediate:!0,deep:!0}},data:()=>({tdStyle:{},tdClass:{},lattice:{}}),computed:{tableColor(){const e={};return this.border===!1?e.border="0 none":(this.borderColor&&(e.borderColor=this.borderColor),this.borderWidth&&(e.borderWidth=this.borderWidth)),e}},methods:{initRule(){const e=this.rule;e.style||(e.style={}),e.layout||(e.layout=[]),e.row||(e.row=1),e.col||(e.col=1)},loadRule(){const e=[],t=this.rule||{row:1,col:1};for(let r=0;r<t.row;r++){const o=[];e.push(o);for(let i=0;i<t.col;i++)o.push({rowspan:1,colspan:1,slot:[],show:!0})}[...t.layout||[]].forEach((r,o)=>{if((!r.row||r.row<=0)&&(!r.col||r.col<=0)||!e[r.top]||!e[r.top][r.left]||!e[r.top][r.left].show)return void t.layout.splice(o,1);const i=e[r.top][r.left];i.layout=r;let a=1,l=1;if(r.col&&(a=r.col+r.left>t.col?t.col-r.left:r.col,i.colspan=a),r.row&&(l=r.row+r.top>t.row?t.row-r.top:r.row,i.rowspan=l),l&&a)for(let s=0;s<l;s++){const u=e[r.top+s];if(u)for(let c=0;c<a;c++)!c&&!s||(u[r.left+c]&&(u[r.left+c].show=!1),i.slot.push(`${r.top+s}:${r.left+c}`))}});const n=r=>!(r&&!r.layout&&r.show);e.forEach((r,o)=>{r.forEach((i,a)=>{let l=!1,s=!1;if(i.layout){const u=i.layout.col||1,c=i.layout.row||1;for(let d=0;d<u;d++)if(!e[o+c]||n(e[o+c][a+d])){s=!0;continue}for(let d=0;d<c;d++)if(!e[o+d]||n(e[o+d][a+u])){l=!0;continue}}else l=n(r[a+1]),s=!e[o+1]||n(e[o+1][a]);i.right=l,i.bottom=s})}),this.lattice=e}}},GGe={class:"_fc-table"},qGe=jo(WGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-col");return Y(),Pe(a,{span:24},{default:he(()=>[ce("div",GGe,[ce("table",{border:"1",cellspacing:"0",cellpadding:"0",style:$t(i.tableColor)},[(Y(!0),fe(bt,null,bn(n.rule.row,(l,s)=>(Y(),fe("tr",{key:s},[(Y(!0),fe(bt,null,bn(n.rule.col,(u,c)=>(Y(),fe(bt,{key:`${s}${c}`},[o.lattice[s][c].show?(Y(),fe("td",Un({key:0,ref_for:!0},o.lattice[s][c]?{colspan:o.lattice[s][c].colspan,rowspan:o.lattice[s][c].rowspan}:{},{valign:"top",class:o.tdClass&&o.tdClass[`${s}:${c}`]||"",style:[i.tableColor,o.tdStyle&&o.tdStyle[`${s}:${c}`]||{}]}),[ft(e.$slots,`${s}:${c}`),(Y(!0),fe(bt,null,bn(o.lattice[s][c].slot,d=>ft(e.$slots,`${d}`)),256))],16)):Fe("",!0)],64))),128))]))),128))],4)])]),_:3})}]]),KGe=Te({name:"Validate",inject:["designer"],props:{modelValue:Array},components:{DragForm:Br.$form()},watch:{modelValue(e){this.formValue=this.parseValue(e)}},data(){const e=this.designer.setupState.t,t=this.designer.setupState.activeRule._menu.validate||[],n={string:e("validate.types.string"),array:e("validate.types.array"),number:e("validate.types.number"),integer:e("validate.types.integer"),float:e("validate.types.float"),object:e("validate.types.object"),date:e("validate.types.date"),url:e("validate.types.url"),email:e("validate.types.email")},r=(o=>{const i=[];return o&&o.forEach(a=>{i.push({label:n[a],value:a})}),i.push({label:e("props.custom"),value:"validator"}),i})(t);return{formValue:{},t:e,option:{form:{labelPosition:"top",size:"small",labelWidth:"90px"},submitBtn:!1,appendValue:!0,formData:this.parseValue(this.modelValue)},rule:[{type:"group",field:"validate",props:{expand:1,sortBtn:!1,defaultValue:{type:r[0].value},rule:[{type:r.length===1?"hidden":"select",field:"type",value:"",title:e("validate.type"),props:{placeholder:e("validate.typePlaceholder")},control:[{value:["url","date","email","object","validator"],condition:"notIn",rule:["mode","min","max","len","pattern"]},{value:"validator",rule:["validator"]}],options:r},{type:"select",title:e("validate.trigger"),field:"trigger",value:"change",options:ya(e,[{label:"blur",value:"blur"},{label:"change",value:"change"},{label:"submit",value:"submit"}])},{type:"FnEditor",field:"validator",value:"",props:{name:"validator",args:["rule","value","callback"],button:!0},style:"height:300px;"},{type:"select",title:e("validate.mode"),field:"mode",options:[{value:"min",label:e("validate.modes.min")},{value:"max",label:e("validate.modes.max")},{value:"len",label:e("validate.modes.len")},{value:"pattern",label:e("validate.modes.pattern")}],value:"min",control:[{value:"pattern",rule:[{type:"input",field:"pattern",props:{size:"small"},title:e("validate.modes.pattern")}]},{value:"min",rule:[{type:"inputNumber",field:"min",title:e("validate.modes.min")}]},{value:"max",rule:[{type:"inputNumber",field:"max",title:e("validate.modes.max")}]},{value:"len",rule:[{type:"inputNumber",field:"len",title:e("validate.modes.len")}]}]},{type:"input",title:e("validate.message"),field:"message",value:"",children:[{type:"span",slot:"append",inject:!0,class:"append-msg",on:{click:o=>{const i=this.designer.setupState.activeRule.title;this.designer.setupState.activeRule&&o.api.setValue("message",e(o.api.form.mode!=="required"?"validate.autoMode":"validate.autoRequired",{title:i}))}},children:[e("validate.auto")]}]}]},value:[]}]}},methods:{onInput:function(e,t){const n=Mi(t),r=[];(n||[]).forEach(o=>{if(!o||!Object.keys(o).length)return!1;if(o.type==="validator"&&!o.validator)return;const i={...o};o.validator||delete i.validator,r.push(i)}),this.$emit("update:modelValue",r)},parseValue(e){let t={validate:e?[...e]:[],type:e.length?e[0].type||"string":void 0};return t.validate.forEach(n=>{n.mode||Object.keys(n).forEach(r=>{["message","type","trigger","mode"].indexOf(r)<0&&(n.mode=r)})}),t}}}),YGe=jo(KGe,[["render",function(e,t,n,r,o,i){const a=Qe("DragForm");return Y(),Pe(a,{class:"_fd-validate",rule:e.rule,option:e.option,modelValue:e.formValue,onChange:e.onInput},null,8,["rule","option","modelValue","onChange"])}]]),XGe=Te({name:"Required",emits:["update:modelValue"],props:{modelValue:{}},inject:["designer"],watch:{required(){this.update()},requiredMsg(){this.update()},modelValue(e){const t=Lr.String(e);this.required=e!==void 0&&(!!t||!!e),this.requiredMsg=t?e:""}},computed:{t(){return this.designer.setupState.t}},data(){const e=Lr.String(this.modelValue);return{required:this.modelValue!==void 0&&(!!e||!!this.modelValue),requiredMsg:e?this.modelValue:""}},methods:{update(){let e;e=this.required!==!1&&(this.requiredMsg||!0),this.$emit("update:modelValue",e)}}}),QGe={class:"_fd-required"},JGe=jo(XGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-switch"),l=Qe("el-input");return Y(),fe("div",QGe,[ie(a,{modelValue:e.required,"onUpdate:modelValue":t[0]||(t[0]=s=>e.required=s)},null,8,["modelValue"]),e.required?(Y(),Pe(l,{key:0,modelValue:e.requiredMsg,"onUpdate:modelValue":t[1]||(t[1]=s=>e.requiredMsg=s),placeholder:e.t("validate.requiredPlaceholder")},null,8,["modelValue","placeholder"])):Fe("",!0)])}]]),ZGe=Te({name:"TableOptions",emits:["update:modelValue","change"],props:{modelValue:[Array,Object],column:{type:Array,default:()=>[{label:"label",key:"label"},{label:"value",key:"value"}]},valueType:String,max:Number,size:String},inject:["designer"],watch:{modelValue(){this.value=this.tidyModelValue()}},computed:{t(){return this.designer.setupState.t}},data(){return{value:this.tidyModelValue()}},methods:{tidyModelValue(){const e=this.modelValue;return this.valueType==="string"?(e||[]).map(t=>({value:""+t})):this.valueType==="object"?Object.keys(e||{}).map(t=>({label:t,value:e[t]})):[...e||[]].map(t=>function(n){return typeof n!="object"||n===null?n:n instanceof Array?[...n]:{...n}}(t))},tidyValue(){if(this.valueType==="object"){const e={};return this.value.forEach(t=>{t.label&&t.value&&(e[t.label]=t.value)}),e}return this.value.map(e=>this.valueType==="string"?e.value:{...e})},onInput(e){(this.column.length!==1||e[this.column[0].key])&&this.column.every(t=>t.required===!1||(["object","string"].indexOf(this.valueType)>-1?e[t.key]!==void 0&&e[t.key]!==""&&e[t.key]!==null:e[t.key]!==void 0))&&this.input()},input(){const e=this.tidyValue();this.$emit("update:modelValue",e),this.$emit("change",e)},add(){this.value.push(this.column.reduce((e,t)=>(e[t.key]="",e),{}))},del(e){this.value.splice(e,1),this.input()}}}),eqe=e=>(xw("data-v-75561980"),e=e(),_w(),e),tqe={class:"_td-table-opt"},nqe=["onClick"],rqe={class:"_td-table-opt-handle"},oqe=eqe(()=>ce("i",{class:"fc-icon icon-add"},null,-1)),iqe=jo(ZGe,[["render",function(e,t,n,r,o,i){const a=Qe("el-input"),l=Qe("el-table-column"),s=Qe("el-table"),u=Qe("el-button");return Y(),fe("div",tqe,[ie(s,{data:e.value,border:"",size:e.size||"small",style:{width:"100%"}},{default:he(()=>[(Y(!0),fe(bt,null,bn(e.column,(c,d)=>(Y(),Pe(l,{key:c.label+d,label:c.label},{default:he(f=>[ie(a,{size:e.size||"small",modelValue:f.row[c.key]||"","onUpdate:modelValue":p=>f.row[c.key]=p,onBlur:p=>e.onInput(f.row)},null,8,["size","modelValue","onUpdate:modelValue","onBlur"])]),_:2},1032,["label"]))),128)),ie(l,{width:"70",align:"center",fixed:"right",label:e.t("tableOptions.handle")},{default:he(c=>[ce("i",{class:"fc-icon icon-delete",onClick:d=>e.del(c.$index)},null,8,nqe)]),_:1},8,["label"])]),_:1},8,["data","size"]),ce("div",rqe,[!e.max||e.max>e.value.length?(Y(),Pe(u,{key:0,link:"",type:"primary",onClick:e.add},{default:he(()=>[oqe,Dt(" "+Ye(e.t("tableOptions.add")),1)]),_:1},8,["onClick"])):Fe("",!0)])])}],["__scopeId","data-v-75561980"]]),aqe=Te({name:"TreeOptions",emits:["update:modelValue"],props:{modelValue:Array,columns:Object},inject:["designer"],data(){return{value:[...Mi(this.modelValue||[])]}},computed:{t(){return this.designer.setupState.t},overColumns(){return this.columns?{label:this.columns.label||"label",value:this.columns.value||"value"}:{label:"label",value:"value"}}},created(){this.value.length||(this.value=[{}])},methods:{tidyValue(){return Mi(this.value)},change(){this.$emit("update:modelValue",this.tidyValue())},add(e){const t=e.parent;(t.data.children||t.data).push({})},append(e){e.children||(e.children=[]),e.children.push({})},remove(e,t){const n=e.parent;n.data.children?(n.data.children.splice(n.data.children.indexOf(t),1),n.data.children.length||delete n.data.children):n.data.splice(n.data.indexOf(t),1),this.change()}}}),lqe={class:"_fd-tree-opt"},sqe={class:"_fd-tree-opt-node"},uqe=["onClick"],cqe=[ce("i",{class:"fc-icon icon-add"},null,-1)],dqe=["onClick"],fqe=[ce("i",{class:"fc-icon icon-add-child"},null,-1)],pqe=["onClick"],hqe=[ce("i",{class:"fc-icon icon-delete"},null,-1)],vqe=jo(aqe,[["render",function(e,t,n,r,o,i){const a=Qe("el-input"),l=Qe("el-tree");return Y(),fe("div",lqe,[ie(l,{data:e.value,"node-key":"index","expand-on-click-node":!1},{default:he(({node:s,data:u})=>[ce("div",sqe,[ie(a,{class:"_fd-tree-opt-first",modelValue:u[e.overColumns.label],"onUpdate:modelValue":c=>u[e.overColumns.label]=c,onBlur:e.change},null,8,["modelValue","onUpdate:modelValue","onBlur"]),ie(a,{class:"_fd-tree-opt-last",modelValue:u[e.overColumns.value],"onUpdate:modelValue":c=>u[e.overColumns.value]=c,onBlur:e.change},{append:he(()=>[ce("div",{class:"_fd-tree-opt-btn",onClick:c=>e.add(s,u)},cqe,8,uqe),ce("div",{class:"_fd-tree-opt-btn",onClick:c=>e.append(u)},fqe,8,dqe),ce("div",{class:"_fd-tree-opt-btn _fd-tree-opt-danger",onClick:c=>e.remove(s,u)},hqe,8,pqe)]),_:2},1032,["modelValue","onUpdate:modelValue","onBlur"])])]),_:1},8,["data"])])}]]),mqe=Te({name:"TableFormView",data:()=>({})}),gqe={class:"_fd-table-form"},yqe={key:0,class:"_fd-tf-wrap"},bqe={key:1,class:"_fc-child-empty"},Aqe=jo(mqe,[["render",function(e,t,n,r,o,i){return Y(),fe("div",gqe,[e.$slots.default?(Y(),fe("div",yqe,[ft(e.$slots,"default")])):(Y(),fe("div",bqe))])}]]),wqe={name:"TableForm",emits:["change","add","delete","update:modelValue"],props:{formCreateInject:Object,modelValue:{type:Array,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},options:{type:Object,default:()=>Qn({submitBtn:!1,resetBtn:!1})},max:Number,disabled:Boolean},watch:{modelValue:{handler(){this.updateTable()},deep:!0}},data(){return{rule:[],trs:[],fapi:{},Form:Fo(this.formCreateInject.form.$form()),copyTrs:"",oldValue:""}},methods:{formChange(e,t,n,r,o){o===!1&&this.updateValue()},updateValue(){const e=this.trs.map((n,r)=>({...this.modelValue[r]||{},...this.fapi.getChildrenFormData(n)})).filter(n=>{if(n==null)return!1;let r=!1;return Object.keys(n).forEach(o=>{r=r||n[o]!==void 0&&n[o]!==""&&n[o]!==null}),r}),t=JSON.stringify(e);t!==this.oldValue&&(this.oldValue=t,this.$emit("update:modelValue",e),this.$emit("change",e))},setRawData(e,t){const n=this.trs[e];this.fapi.setChildrenFormData(n,t,!0)},updateTable(){const e=JSON.stringify(this.modelValue);this.oldValue!==e&&(this.oldValue=e,this.trs=this.trs.splice(0,this.modelValue.length),this.modelValue.length||this.addRaw(),this.modelValue.forEach((t,n)=>{this.trs[n]||this.addRaw(),this.setRawData(n,t)}),this.rule[0].children[1].children=this.trs)},delRaw(e){this.disabled||(this.trs.splice(e,1),this.updateValue(),this.trs.length?this.trs.forEach(t=>this.updateRaw(t)):this.addRaw(),this.$emit("delete",e))},addRaw(e){if(e&&this.disabled)return;const t=_d.parseJson(this.copyTrs)[0];this.trs.push(t),this.updateRaw(t),e&&this.$emit("add",this.trs.length)},updateRaw(e){const t=this.trs.indexOf(e);e.children[0].props.innerText=t+1,e.children[e.children.length-1].children[0].props.onClick=()=>{this.delRaw(t)}},loadRule(){const e=[{type:"th",native:!0,class:"_fc-tf-head-idx",props:{innerText:"#"}}];let t=[{type:"td",class:"_fc-tf-idx",native:!0,props:{innerText:"0"}}];this.columns.forEach(n=>{e.push({type:"th",native:!0,style:n.style,props:{innerText:n.label||""}}),t.push({type:"td",native:!0,children:[...n.rule||[]]})}),e.push({type:"th",native:!0,class:"_fc-tf-edit fc-clock",props:{innerText:"\u64CD\u4F5C"}}),t.push({type:"td",native:!0,class:"_fc-tf-btn fc-clock",children:[{type:"i",native:!0,class:"fc-icon icon-delete",props:{}}]}),this.copyTrs=_d.toJson([{type:"tr",native:!0,subRule:!0,children:t}]),this.rule=[{type:"table",native:!0,class:"_fc-tf-table",props:{border:"1",cellspacing:"0",cellpadding:"0"},children:[{type:"thead",native:!0,children:[{type:"tr",native:!0,children:e}]},{type:"tbody",native:!0,children:this.trs}]}],this.addRaw()}},created(){this.loadRule()},mounted(){this.updateTable()}},xqe=ce("i",{class:"fc-icon icon-add-circle",style:{"font-weight":"700"}},null,-1),_qe=jo(wqe,[["render",function(e,t,n,r,o,i){const a=Qe("el-button");return Y(),fe("div",{class:oe(["_fc-table-form",{"_fc-disabled":n.disabled}])},[(Y(),Pe(Hn(o.Form),{option:n.options,rule:o.rule,extendOption:!0,disabled:n.disabled,onChange:i.formChange,api:o.fapi,"onUpdate:api":t[0]||(t[0]=l=>o.fapi=l),onEmitEvent:e.$emit},null,40,["option","rule","disabled","onChange","api","onEmitEvent"])),!n.max||n.max>this.trs.length?(Y(),Pe(a,{key:0,link:"",type:"primary",class:"fc-clock",onClick:t[1]||(t[1]=l=>i.addRaw(!0))},{default:he(()=>[xqe,Dt(" \u6DFB\u52A0 ")]),_:1})):Fe("",!0)],2)}]]),Eqe=Te({name:"TableFormColumnView",props:{label:String,width:[Number,String],color:String},computed:{colStyle(){const e=this.width,t={width:Lr.Number(e)?`${e}px`:e&&e!=="auto"?e:"180px"};return this.color&&(t.color=this.color),t}},data:()=>({})}),Cqe={class:"_fd-tf-title"},Sqe={class:"_fd-tf-con"},kqe=jo(Eqe,[["render",function(e,t,n,r,o,i){return Y(),fe("div",{class:"_fd-tf-col",style:$t(e.colStyle)},[ce("div",Cqe,Ye(e.label||""),1),ce("div",Sqe,[ft(e.$slots,"default")])],4)}]]);function gpe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qi(e){return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qi(e)}function Dqe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oqe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ype={exports:{}};ype.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&Qi(r)==="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var a in r)n.d(i,a,(function(l){return r[l]}).bind(null,a));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=141)}([function(e,t){function n(r){return r&&r.__esModule?r:{default:r}}e.exports=n},function(e,t,n){e.exports=n(142)},function(e,t,n){n.r(t),n.d(t,"__extends",function(){return o}),n.d(t,"__assign",function(){return i}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return l}),n.d(t,"__param",function(){return s}),n.d(t,"__metadata",function(){return u}),n.d(t,"__awaiter",function(){return c}),n.d(t,"__generator",function(){return d}),n.d(t,"__createBinding",function(){return f}),n.d(t,"__exportStar",function(){return p}),n.d(t,"__values",function(){return m}),n.d(t,"__read",function(){return v}),n.d(t,"__spread",function(){return g}),n.d(t,"__spreadArrays",function(){return b}),n.d(t,"__spreadArray",function(){return y}),n.d(t,"__await",function(){return w}),n.d(t,"__asyncGenerator",function(){return x}),n.d(t,"__asyncDelegator",function(){return _}),n.d(t,"__asyncValues",function(){return E}),n.d(t,"__makeTemplateObject",function(){return C}),n.d(t,"__importStar",function(){return k}),n.d(t,"__importDefault",function(){return I}),n.d(t,"__classPrivateFieldGet",function(){return O}),n.d(t,"__classPrivateFieldSet",function(){return F});var r=function(N,B){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,V){L.__proto__=V}||function(L,V){for(var P in V)Object.prototype.hasOwnProperty.call(V,P)&&(L[P]=V[P])},r(N,B)};function o(N,B){if(typeof B!="function"&&B!==null)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function L(){this.constructor=N}r(N,B),N.prototype=B===null?Object.create(B):(L.prototype=B.prototype,new L)}var i=function(){return i=Object.assign||function(N){for(var B,L=1,V=arguments.length;L<V;L++)for(var P in B=arguments[L])Object.prototype.hasOwnProperty.call(B,P)&&(N[P]=B[P]);return N},i.apply(this,arguments)};function a(N,B){var L={};for(var V in N)Object.prototype.hasOwnProperty.call(N,V)&&B.indexOf(V)<0&&(L[V]=N[V]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function"){var P=0;for(V=Object.getOwnPropertySymbols(N);P<V.length;P++)B.indexOf(V[P])<0&&Object.prototype.propertyIsEnumerable.call(N,V[P])&&(L[V[P]]=N[V[P]])}return L}function l(N,B,L,V){var P,H=arguments.length,U=H<3?B:V===null?V=Object.getOwnPropertyDescriptor(B,L):V;if((typeof Reflect>"u"?"undefined":Qi(Reflect))==="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(N,B,L,V);else for(var G=N.length-1;G>=0;G--)(P=N[G])&&(U=(H<3?P(U):H>3?P(B,L,U):P(B,L))||U);return H>3&&U&&Object.defineProperty(B,L,U),U}function s(N,B){return function(L,V){B(L,V,N)}}function u(N,B){if((typeof Reflect>"u"?"undefined":Qi(Reflect))==="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(N,B)}function c(N,B,L,V){function P(H){return H instanceof L?H:new L(function(U){U(H)})}return new(L||(L=Promise))(function(H,U){function G(W){try{$(V.next(W))}catch(K){U(K)}}function z(W){try{$(V.throw(W))}catch(K){U(K)}}function $(W){W.done?H(W.value):P(W.value).then(G,z)}$((V=V.apply(N,B||[])).next())})}function d(N,B){var L,V,P,H,U={label:0,sent:function(){if(1&P[0])throw P[1];return P[1]},trys:[],ops:[]};return H={next:G(0),throw:G(1),return:G(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function G($){return function(W){return z([$,W])}}function z($){if(L)throw new TypeError("Generator is already executing.");for(;U;)try{if(L=1,V&&(P=2&$[0]?V.return:$[0]?V.throw||((P=V.return)&&P.call(V),0):V.next)&&!(P=P.call(V,$[1])).done)return P;switch(V=0,P&&($=[2&$[0],P.value]),$[0]){case 0:case 1:P=$;break;case 4:return U.label++,{value:$[1],done:!1};case 5:U.label++,V=$[1],$=[0];continue;case 7:$=U.ops.pop(),U.trys.pop();continue;default:if(!(P=(P=U.trys).length>0&&P[P.length-1])&&($[0]===6||$[0]===2)){U=0;continue}if($[0]===3&&(!P||$[1]>P[0]&&$[1]<P[3])){U.label=$[1];break}if($[0]===6&&U.label<P[1]){U.label=P[1],P=$;break}if(P&&U.label<P[2]){U.label=P[2],U.ops.push($);break}P[2]&&U.ops.pop(),U.trys.pop();continue}$=B.call(N,U)}catch(W){$=[6,W],V=0}finally{L=P=0}if(5&$[0])throw $[1];return{value:$[0]?$[1]:void 0,done:!0}}}var f=Object.create?function(N,B,L,V){V===void 0&&(V=L),Object.defineProperty(N,V,{enumerable:!0,get:function(){return B[L]}})}:function(N,B,L,V){V===void 0&&(V=L),N[V]=B[L]};function p(N,B){for(var L in N)L!=="default"&&!Object.prototype.hasOwnProperty.call(B,L)&&f(B,N,L)}function m(N){var B=typeof Symbol=="function"&&Symbol.iterator,L=B&&N[B],V=0;if(L)return L.call(N);if(N&&typeof N.length=="number")return{next:function(){return N&&V>=N.length&&(N=void 0),{value:N&&N[V++],done:!N}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(N,B){var L=typeof Symbol=="function"&&N[Symbol.iterator];if(!L)return N;var V,P,H=L.call(N),U=[];try{for(;(B===void 0||B-- >0)&&!(V=H.next()).done;)U.push(V.value)}catch(G){P={error:G}}finally{try{V&&!V.done&&(L=H.return)&&L.call(H)}finally{if(P)throw P.error}}return U}function g(){for(var N=[],B=0;B<arguments.length;B++)N=N.concat(v(arguments[B]));return N}function b(){for(var N=0,B=0,L=arguments.length;B<L;B++)N+=arguments[B].length;var V=Array(N),P=0;for(B=0;B<L;B++)for(var H=arguments[B],U=0,G=H.length;U<G;U++,P++)V[P]=H[U];return V}function y(N,B){for(var L=0,V=B.length,P=N.length;L<V;L++,P++)N[P]=B[L];return N}function w(N){return this instanceof w?(this.v=N,this):new w(N)}function x(N,B,L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var V,P=L.apply(N,B||[]),H=[];return V={},U("next"),U("throw"),U("return"),V[Symbol.asyncIterator]=function(){return this},V;function U(X){P[X]&&(V[X]=function(te){return new Promise(function(ne,se){H.push([X,te,ne,se])>1||G(X,te)})})}function G(X,te){try{z(P[X](te))}catch(ne){K(H[0][3],ne)}}function z(X){X.value instanceof w?Promise.resolve(X.value.v).then($,W):K(H[0][2],X)}function $(X){G("next",X)}function W(X){G("throw",X)}function K(X,te){X(te),H.shift(),H.length&&G(H[0][0],H[0][1])}}function _(N){var B,L;return B={},V("next"),V("throw",function(P){throw P}),V("return"),B[Symbol.iterator]=function(){return this},B;function V(P,H){B[P]=N[P]?function(U){return(L=!L)?{value:w(N[P](U)),done:P==="return"}:H?H(U):U}:H}}function E(N){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,L=N[Symbol.asyncIterator];return L?L.call(N):(N=typeof m=="function"?m(N):N[Symbol.iterator](),B={},V("next"),V("throw"),V("return"),B[Symbol.asyncIterator]=function(){return this},B);function V(H){B[H]=N[H]&&function(U){return new Promise(function(G,z){P(G,z,(U=N[H](U)).done,U.value)})}}function P(H,U,G,z){Promise.resolve(z).then(function($){H({value:$,done:G})},U)}}function C(N,B){return Object.defineProperty?Object.defineProperty(N,"raw",{value:B}):N.raw=B,N}var T=Object.create?function(N,B){Object.defineProperty(N,"default",{enumerable:!0,value:B})}:function(N,B){N.default=B};function k(N){if(N&&N.__esModule)return N;var B={};if(N!=null)for(var L in N)L!=="default"&&Object.prototype.hasOwnProperty.call(N,L)&&f(B,N,L);return T(B,N),B}function I(N){return N&&N.__esModule?N:{default:N}}function O(N,B){if(!B.has(N))throw new TypeError("attempted to get private field on non-instance");return B.get(N)}function F(N,B,L){if(!B.has(N))throw new TypeError("attempted to set private field on non-instance");return B.set(N,L),L}},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(89)),a=r(n(4)),l=r(n(26)),s=r(n(17)),u=r(n(120)),c=r(n(27)),d=r(n(91)),f=r(n(70)),p=r(n(44)),m=r(n(57));(0,o.default)(t,"__esModule",{value:!0}),t.DomElement=void 0;var v=n(2),g=n(6),b=[];function y(T){var k=document.createElement("div");k.innerHTML=T;var I=k.children;return g.toArray(I)}function w(T){return!!T&&(T instanceof HTMLCollection||T instanceof NodeList)}function x(T){var k=document.querySelectorAll(T);return g.toArray(k)}function _(T){var k=[],I=[];return k=(0,i.default)(T)?T:T.split(";"),(0,a.default)(k).call(k,function(O){var F,N=(0,l.default)(F=O.split(":")).call(F,function(B){return(0,s.default)(B).call(B)});N.length===2&&I.push(N[0]+":"+N[1])}),I}var E=function(){function T(k){if(this.elems=[],this.length=this.elems.length,this.dataSource=new u.default,k){if(k instanceof T)return k;var I=[],O=k instanceof Node?k.nodeType:-1;if(this.selector=k,O===1||O===9)I=[k];else if(w(k))I=g.toArray(k);else if(k instanceof Array)I=k;else if(typeof k=="string"){var F,N=(0,s.default)(F=k.replace(`/ |
|
112 |
/mg`,"")).call(F);I=(0,c.default)(N).call(N,"<")===0?y(N):x(N)}var B=I.length;if(!B)return this;for(var L=0;L<B;L++)this.elems.push(I[L]);this.length=B}}return(0,o.default)(T.prototype,"id",{get:function(){return this.elems[0].id},enumerable:!1,configurable:!0}),T.prototype.forEach=function(k){for(var I=0;I<this.length;I++){var O=this.elems[I];if(k.call(O,O,I)===!1)break}return this},T.prototype.clone=function(k){var I;k===void 0&&(k=!1);var O=[];return(0,a.default)(I=this.elems).call(I,function(F){O.push(F.cloneNode(!!k))}),C(O)},T.prototype.get=function(k){k===void 0&&(k=0);var I=this.length;return k>=I&&(k%=I),C(this.elems[k])},T.prototype.first=function(){return this.get(0)},T.prototype.last=function(){var k=this.length;return this.get(k-1)},T.prototype.on=function(k,I,O){var F;return k?(typeof I=="function"&&(O=I,I=""),(0,a.default)(F=this).call(F,function(N){if(I){var B=function(L){var V=L.target;V.matches(I)&&O.call(V,L)};N.addEventListener(k,B),b.push({elem:N,selector:I,fn:O,agentFn:B})}else N.addEventListener(k,O)})):this},T.prototype.off=function(k,I,O){var F;return k?(typeof I=="function"&&(O=I,I=""),(0,a.default)(F=this).call(F,function(N){if(I){for(var B=-1,L=0;L<b.length;L++){var V=b[L];if(V.selector===I&&V.fn===O&&V.elem===N){B=L;break}}if(B!==-1){var P=(0,d.default)(b).call(b,B,1)[0].agentFn;N.removeEventListener(k,P)}}else N.removeEventListener(k,O)})):this},T.prototype.attr=function(k,I){var O;return I==null?this.elems[0].getAttribute(k)||"":(0,a.default)(O=this).call(O,function(F){F.setAttribute(k,I)})},T.prototype.removeAttr=function(k){var I;(0,a.default)(I=this).call(I,function(O){O.removeAttribute(k)})},T.prototype.addClass=function(k){var I;return k?(0,a.default)(I=this).call(I,function(O){if(O.className){var F=O.className.split(/\s/);F=(0,f.default)(F).call(F,function(N){return!!(0,s.default)(N).call(N)}),(0,c.default)(F).call(F,k)<0&&F.push(k),O.className=F.join(" ")}else O.className=k}):this},T.prototype.removeClass=function(k){var I;return k?(0,a.default)(I=this).call(I,function(O){if(O.className){var F=O.className.split(/\s/);F=(0,f.default)(F).call(F,function(N){return!(!(N=(0,s.default)(N).call(N))||N===k)}),O.className=F.join(" ")}}):this},T.prototype.hasClass=function(k){if(!k)return!1;var I=this.elems[0];if(!I.className)return!1;var O=I.className.split(/\s/);return(0,p.default)(O).call(O,k)},T.prototype.css=function(k,I){var O,F;return F=I==""?"":k+":"+I+";",(0,a.default)(O=this).call(O,function(N){var B,L=(0,s.default)(B=N.getAttribute("style")||"").call(B);if(L){var V=_(L);V=(0,l.default)(V).call(V,function(P){return(0,c.default)(P).call(P,k)===0?F:P}),F!=""&&(0,c.default)(V).call(V,F)<0&&V.push(F),F==""&&(V=_(V)),N.setAttribute("style",V.join("; "))}else N.setAttribute("style",F)})},T.prototype.getBoundingClientRect=function(){return this.elems[0].getBoundingClientRect()},T.prototype.show=function(){return this.css("display","block")},T.prototype.hide=function(){return this.css("display","none")},T.prototype.children=function(){var k=this.elems[0];return k?C(k.children):null},T.prototype.childNodes=function(){var k=this.elems[0];return k?C(k.childNodes):null},T.prototype.replaceChildAll=function(k){for(var I=this.getNode(),O=this.elems[0];O.hasChildNodes();)I.firstChild&&O.removeChild(I.firstChild);this.append(k)},T.prototype.append=function(k){var I;return(0,a.default)(I=this).call(I,function(O){(0,a.default)(k).call(k,function(F){O.appendChild(F)})})},T.prototype.remove=function(){var k;return(0,a.default)(k=this).call(k,function(I){if(I.remove)I.remove();else{var O=I.parentElement;O&&O.removeChild(I)}})},T.prototype.isContain=function(k){var I=this.elems[0],O=k.elems[0];return I.contains(O)},T.prototype.getNodeName=function(){return this.elems[0].nodeName},T.prototype.getNode=function(k){return k===void 0&&(k=0),this.elems[k]},T.prototype.find=function(k){return C(this.elems[0].querySelectorAll(k))},T.prototype.text=function(k){var I;return k?(0,a.default)(I=this).call(I,function(O){O.innerHTML=k}):this.elems[0].innerHTML.replace(/<[^>]+>/g,function(){return""})},T.prototype.html=function(k){var I=this.elems[0];return k?(I.innerHTML=k,this):I.innerHTML},T.prototype.val=function(){var k,I=this.elems[0];return(0,s.default)(k=I.value).call(k)},T.prototype.focus=function(){var k;return(0,a.default)(k=this).call(k,function(I){I.focus()})},T.prototype.prev=function(){return C(this.elems[0].previousElementSibling)},T.prototype.next=function(){return C(this.elems[0].nextElementSibling)},T.prototype.getNextSibling=function(){return C(this.elems[0].nextSibling)},T.prototype.parent=function(){return C(this.elems[0].parentElement)},T.prototype.parentUntil=function(k,I){var O=I||this.elems[0];if(O.nodeName==="BODY")return null;var F=O.parentElement;return F===null?null:F.matches(k)?C(F):this.parentUntil(k,F)},T.prototype.parentUntilEditor=function(k,I,O){var F=O||this.elems[0];if(C(F).equal(I.$textContainerElem)||C(F).equal(I.$toolbarElem))return null;var N=F.parentElement;return N===null?null:N.matches(k)?C(N):this.parentUntilEditor(k,I,N)},T.prototype.equal=function(k){return k instanceof T?this.elems[0]===k.elems[0]:k instanceof HTMLElement&&this.elems[0]===k},T.prototype.insertBefore=function(k){var I,O=C(k).elems[0];return O?(0,a.default)(I=this).call(I,function(F){var N=O.parentNode;N==null||N.insertBefore(F,O)}):this},T.prototype.insertAfter=function(k){var I,O=C(k).elems[0],F=O&&O.nextSibling;return O?(0,a.default)(I=this).call(I,function(N){var B=O.parentNode;F?B.insertBefore(N,F):B.appendChild(N)}):this},T.prototype.data=function(k,I){if(I==null)return this.dataSource.get(k);this.dataSource.set(k,I)},T.prototype.getNodeTop=function(k){if(this.length<1)return this;var I=this.parent();return k.$textElem.equal(this)||k.$textElem.equal(I)?this:(I.prior=this,I.getNodeTop(k))},T.prototype.getOffsetData=function(){var k=this.elems[0];return{top:k.offsetTop,left:k.offsetLeft,width:k.offsetWidth,height:k.offsetHeight,parent:k.offsetParent}},T.prototype.scrollTop=function(k){this.elems[0].scrollTo({top:k})},T}();function C(){for(var T=[],k=0;k<arguments.length;k++)T[k]=arguments[k];return new((0,m.default)(E).apply(E,v.__spreadArrays([void 0],T)))}t.DomElement=E,t.default=C},function(e,t,n){e.exports=n(180)},function(e,t,n){var r=n(8),o=n(71).f,i=n(100),a=n(9),l=n(39),s=n(19),u=n(16),c=function(d){var f=function(p,m,v){if(this instanceof d){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,m)}return new d(p,m,v)}return d.apply(this,arguments)};return f.prototype=d.prototype,f};e.exports=function(d,f){var p,m,v,g,b,y,w,x,_=d.target,E=d.global,C=d.stat,T=d.proto,k=E?r:C?r[_]:(r[_]||{}).prototype,I=E?a:a[_]||(a[_]={}),O=I.prototype;for(v in f)p=!i(E?v:_+(C?".":"#")+v,d.forced)&&k&&u(k,v),b=I[v],p&&(y=d.noTargetGet?(x=o(k,v))&&x.value:k[v]),g=p&&y?y:f[v],(!p||Qi(b)!==Qi(g))&&(w=d.bind&&p?l(g,r):d.wrap&&p?c(g):T&&typeof g=="function"?l(Function.call,g):g,(d.sham||g&&g.sham||b&&b.sham)&&s(w,"sham",!0),I[v]=w,T&&(u(a,m=_+"Prototype")||s(a,m,{}),a[m][v]=g,d.real&&O&&!O[v]&&s(O,v,g)))}},function(e,t,n){var r=n(0),o=r(n(92)),i=r(n(1)),a=r(n(256)),l=r(n(45)),s=r(n(46)),u=r(n(89)),c=r(n(26));(0,i.default)(t,"__esModule",{value:!0}),t.hexToRgb=t.getRandomCode=t.toArray=t.deepClone=t.isFunction=t.debounce=t.throttle=t.arrForEach=t.forEach=t.replaceSpecialSymbol=t.replaceHtmlSymbol=t.getRandom=t.UA=void 0;var d=n(2),f=function(){function k(){this._ua=navigator.userAgent;var I=this._ua.match(/(Edge?)\/(\d+)/);this.isOldEdge=!!(I&&I[1]=="Edge"&&(0,a.default)(I[2])<19),this.isFirefox=!(!/Firefox\/\d+/.test(this._ua)||/Seamonkey\/\d+/.test(this._ua))}return k.prototype.isIE=function(){return"ActiveXObject"in window},k.prototype.isWebkit=function(){return/webkit/i.test(this._ua)},k}();function p(k){var I;return k===void 0&&(k=""),k+(0,l.default)(I=Math.random().toString()).call(I,2)}function m(k){return k.replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,""").replace(/(\r\n|\r|\n)/g,"<br/>")}function v(k){return k.replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,'"')}function g(k,I){for(var O in k)if(Object.prototype.hasOwnProperty.call(k,O)&&I(O,k[O])===!1)break}function b(k,I){var O,F,N=k.length||0;for(O=0;O<N&&(F=k[O],I.call(k,F,O)!==!1);O++);}function y(k,I){I===void 0&&(I=200);var O=!1;return function(){for(var F=this,N=[],B=0;B<arguments.length;B++)N[B]=arguments[B];O||(O=!0,(0,s.default)(function(){O=!1,k.call.apply(k,d.__spreadArrays([F],N))},I))}}function w(k,I){I===void 0&&(I=200);var O=0;return function(){for(var F=this,N=[],B=0;B<arguments.length;B++)N[B]=arguments[B];O&&window.clearTimeout(O),O=(0,s.default)(function(){O=0,k.call.apply(k,d.__spreadArrays([F],N))},I)}}function x(k){return typeof k=="function"}function _(k){if((0,o.default)(k)!=="object"||typeof k=="function"||k===null)return k;var I;for(var O in(0,u.default)(k)&&(I=[]),(0,u.default)(k)||(I={}),k)Object.prototype.hasOwnProperty.call(k,O)&&(I[O]=_(k[O]));return I}function E(k){return(0,l.default)(Array.prototype).call(k)}function C(){var k;return(0,l.default)(k=Math.random().toString(36)).call(k,-5)}function T(k){var I=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(k);if(I==null)return null;var O=(0,c.default)(I).call(I,function(F){return(0,a.default)(F,16)});return"rgb("+O[1]+", "+O[2]+", "+O[3]+")"}t.UA=new f,t.getRandom=p,t.replaceHtmlSymbol=m,t.replaceSpecialSymbol=v,t.forEach=g,t.arrForEach=b,t.throttle=y,t.debounce=w,t.isFunction=x,t.deepClone=_,t.toArray=E,t.getRandomCode=C,t.hexToRgb=T},function(e,t,n){function r(){}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.EMPTY_P_REGEX=t.EMPTY_P_LAST_REGEX=t.EMPTY_P=t.urlRegex=t.EMPTY_FN=void 0,t.EMPTY_FN=r,t.urlRegex=/^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?/,t.EMPTY_P='<p data-we-empty-p=""><br></p>',t.EMPTY_P_LAST_REGEX=/<p data-we-empty-p=""><br\/?><\/p>$/gim,t.EMPTY_P_REGEX=/<p data-we-empty-p="">/gim},function(e,t,n){(function(r){var o=function(i){return i&&i.Math==Math&&i};e.exports=o((typeof globalThis>"u"?"undefined":Qi(globalThis))=="object"&&globalThis)||o((typeof window>"u"?"undefined":Qi(window))=="object"&&window)||o((typeof self>"u"?"undefined":Qi(self))=="object"&&self)||o(Qi(r)=="object"&&r)||Function("return this")()}).call(this,n(145))},function(e,t){e.exports={}},function(e,t,n){var r=n(8),o=n(74),i=n(16),a=n(64),l=n(76),s=n(105),u=o("wks"),c=r.Symbol,d=s?c:c&&c.withoutSetter||a;e.exports=function(f){return i(u,f)||(l&&i(c,f)?u[f]=c[f]:u[f]=d("Symbol."+f)),u[f]}},function(e,t){e.exports=function(n){try{return!!n()}catch{return!0}}},function(e,t,n){var r=n(9),o=n(16),i=n(93),a=n(18).f;e.exports=function(l){var s=r.Symbol||(r.Symbol={});o(s,l)||a(s,l,{value:i.f(l)})}},function(e,t){e.exports=function(n){return Qi(n)==="object"?n!==null:typeof n=="function"}},function(e,t,n){var r=n(11);e.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(e,t,n){var r=n(9);e.exports=function(o){return r[o+"Prototype"]}},function(e,t){var n={}.hasOwnProperty;e.exports=function(r,o){return n.call(r,o)}},function(e,t,n){e.exports=n(192)},function(e,t,n){var r=n(14),o=n(99),i=n(25),a=n(60),l=Object.defineProperty;t.f=r?l:function(s,u,c){if(i(s),u=a(u,!0),i(c),o)try{return l(s,u,c)}catch{}if("get"in c||"set"in c)throw TypeError("Accessors not supported");return"value"in c&&(s[u]=c.value),s}},function(e,t,n){var r=n(14),o=n(18),i=n(48);e.exports=r?function(a,l,s){return o.f(a,l,i(1,s))}:function(a,l,s){return a[l]=s,a}},function(e,t,n){var r=function(){var g;return function(){return typeof g>"u"&&(g=!!(window&&document&&document.all&&!window.atob)),g}}(),o=function(){var g={};return function(b){if(typeof g[b]>"u"){var y=document.querySelector(b);if(window.HTMLIFrameElement&&y instanceof window.HTMLIFrameElement)try{y=y.contentDocument.head}catch{y=null}g[b]=y}return g[b]}}(),i=[];function a(g){for(var b=-1,y=0;y<i.length;y++)if(i[y].identifier===g){b=y;break}return b}function l(g,b){for(var y={},w=[],x=0;x<g.length;x++){var _=g[x],E=b.base?_[0]+b.base:_[0],C=y[E]||0,T="".concat(E," ").concat(C);y[E]=C+1;var k=a(T),I={css:_[1],media:_[2],sourceMap:_[3]};k!==-1?(i[k].references++,i[k].updater(I)):i.push({identifier:T,updater:v(I,b),references:1}),w.push(T)}return w}function s(g){var b=document.createElement("style"),y=g.attributes||{};if(typeof y.nonce>"u"){var w=n.nc;w&&(y.nonce=w)}if(Object.keys(y).forEach(function(_){b.setAttribute(_,y[_])}),typeof g.insert=="function")g.insert(b);else{var x=o(g.insert||"head");if(!x)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");x.appendChild(b)}return b}function u(g){if(g.parentNode===null)return!1;g.parentNode.removeChild(g)}var c=function(){var g=[];return function(b,y){return g[b]=y,g.filter(Boolean).join(` |
|
113 |
`)}}();function d(g,b,y,w){var x=y?"":w.media?"@media ".concat(w.media," {").concat(w.css,"}"):w.css;if(g.styleSheet)g.styleSheet.cssText=c(b,x);else{var _=document.createTextNode(x),E=g.childNodes;E[b]&&g.removeChild(E[b]),E.length?g.insertBefore(_,E[b]):g.appendChild(_)}}function f(g,b,y){var w=y.css,x=y.media,_=y.sourceMap;if(x?g.setAttribute("media",x):g.removeAttribute("media"),_&&typeof btoa<"u"&&(w+=` |
|
114 |
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(_))))," */")),g.styleSheet)g.styleSheet.cssText=w;else{for(;g.firstChild;)g.removeChild(g.firstChild);g.appendChild(document.createTextNode(w))}}var p=null,m=0;function v(g,b){var y,w,x;if(b.singleton){var _=m++;y=p||(p=s(b)),w=d.bind(null,y,_,!1),x=d.bind(null,y,_,!0)}else y=s(b),w=f.bind(null,y,b),x=function(){u(y)};return w(g),function(E){if(E){if(E.css===g.css&&E.media===g.media&&E.sourceMap===g.sourceMap)return;w(g=E)}else x()}}e.exports=function(g,b){!(b=b||{}).singleton&&typeof b.singleton!="boolean"&&(b.singleton=r());var y=l(g=g||[],b);return function(w){if(w=w||[],Object.prototype.toString.call(w)==="[object Array]"){for(var x=0;x<y.length;x++){var _=a(y[x]);i[_].references--}for(var E=l(w,b),C=0;C<y.length;C++){var T=a(y[C]);i[T].references===0&&(i[T].updater(),i.splice(T,1))}y=E}}}},function(e,t,n){function r(i,a){var l=i[1]||"",s=i[3];if(!s)return l;if(a&&typeof btoa=="function"){var u=o(s),c=s.sources.map(function(d){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(d," */")});return[l].concat(c).concat([u]).join(` |
|
115 |
`)}return[l].join(` |
|
116 |
`)}function o(i){var a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a);return"/*# ".concat(l," */")}e.exports=function(i){var a=[];return a.toString=function(){return this.map(function(l){var s=r(l,i);return l[2]?"@media ".concat(l[2]," {").concat(s,"}"):s}).join("")},a.i=function(l,s,u){typeof l=="string"&&(l=[[null,l,""]]);var c={};if(u)for(var d=0;d<this.length;d++){var f=this[d][0];f!=null&&(c[f]=!0)}for(var p=0;p<l.length;p++){var m=[].concat(l[p]);u&&c[m[0]]||(s&&(m[2]?m[2]="".concat(s," and ").concat(m[2]):m[2]=s),a.push(m))}},a}},function(e,t,n){var r=n(14),o=n(11),i=n(16),a=Object.defineProperty,l={},s=function(u){throw u};e.exports=function(u,c){if(i(l,u))return l[u];c||(c={});var d=[][u],f=!!i(c,"ACCESSORS")&&c.ACCESSORS,p=i(c,0)?c[0]:s,m=i(c,1)?c[1]:void 0;return l[u]=!!d&&!o(function(){if(f&&!r)return!0;var v={length:-1};f?a(v,1,{enumerable:!0,get:s}):v[1]=1,d.call(v,p,m)})}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=function(i){function a(l,s){return i.call(this,l,s)||this}return r.__extends(a,i),a}(r.__importDefault(n(95)).default);t.default=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(46));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(3)),u=l.__importDefault(n(95)),c=l.__importDefault(n(133)),d=function(f){function p(m,v,g){var b=f.call(this,m,v)||this;g.title=v.i18next.t("menus.dropListMenu."+g.title);var y,w=v.config.lang==="zh-CN"?"":"w-e-drop-list-tl";w!==""&&g.type==="list"&&(0,i.default)(y=g.list).call(y,function(_){var E=_.$elem,C=s.default(E.children());if(C.length>0){var T=C==null?void 0:C.getNodeName();T&&T==="I"&&E.addClass(w)}});var x=new c.default(b,g);return b.dropList=x,m.on("click",function(){var _;v.selection.getRange()!=null&&(m.css("z-index",v.zIndex.get("menu")),(0,i.default)(_=v.txt.eventHooks.dropListMenuHoverEvents).call(_,function(E){return E()}),x.show())}).on("mouseleave",function(){m.css("z-index","auto"),x.hideTimeoutId=(0,a.default)(function(){x.hide()})}),b}return l.__extends(p,f),p}(u.default);t.default=d},function(e,t,n){var r=n(13);e.exports=function(o){if(!r(o))throw TypeError(String(o)+" is not an object");return o}},function(e,t,n){e.exports=n(188)},function(e,t,n){e.exports=n(201)},function(e,t,n){var r=n(72),o=n(49);e.exports=function(i){return r(o(i))}},function(e,t,n){var r=n(49);e.exports=function(o){return Object(r(o))}},function(e,t,n){var r=n(39),o=n(72),i=n(29),a=n(34),l=n(88),s=[].push,u=function(c){var d=c==1,f=c==2,p=c==3,m=c==4,v=c==6,g=c==5||v;return function(b,y,w,x){for(var _,E,C=i(b),T=o(C),k=r(y,w,3),I=a(T.length),O=0,F=x||l,N=d?F(b,I):f?F(b,0):void 0;I>O;O++)if((g||O in T)&&(E=k(_=T[O],O,C),c)){if(d)N[O]=E;else if(E)switch(c){case 3:return!0;case 5:return _;case 6:return O;case 2:s.call(N,_)}else if(m)return!1}return v?-1:p||m?m:N}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(e,t,n){e.exports=n(283)},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(31)),l=r(n(131));(0,o.default)(t,"__esModule",{value:!0});var s=n(2),u=s.__importDefault(n(3)),c=n(7),d=function(){function f(p,m){this.menu=p,this.conf=m,this.$container=u.default('<div class="w-e-panel-container"></div>');var v=p.editor;v.txt.eventHooks.clickEvents.push(f.hideCurAllPanels),v.txt.eventHooks.toolbarClickEvents.push(f.hideCurAllPanels),v.txt.eventHooks.dropListMenuHoverEvents.push(f.hideCurAllPanels)}return f.prototype.create=function(){var p=this,m=this.menu;if(!f.createdMenus.has(m)){var v=this.conf,g=this.$container,b=v.width||300,y=m.editor.$toolbarElem.getBoundingClientRect(),w=m.$elem.getBoundingClientRect(),x=y.height+y.top-w.top,_=(y.width-b)/2+y.left-w.left,E=300;Math.abs(_)>E&&(_=w.left<document.documentElement.clientWidth/2?-w.width/2:-b+w.width/2),g.css("width",b+"px").css("margin-top",x+"px").css("margin-left",_+"px").css("z-index",m.editor.zIndex.get("panel"));var C=u.default('<i class="w-e-icon-close w-e-panel-close"></i>');g.append(C),C.on("click",function(){p.remove()});var T=u.default('<ul class="w-e-panel-tab-title"></ul>'),k=u.default('<div class="w-e-panel-tab-content"></div>');g.append(T).append(k);var I=v.height;I&&k.css("height",I+"px").css("overflow-y","auto");var O=v.tabs||[],F=[],N=[];(0,i.default)(O).call(O,function(L,V){if(L){var P=L.title||"",H=L.tpl||"",U=u.default('<li class="w-e-item">'+P+"</li>");T.append(U);var G=u.default(H);k.append(G),F.push(U),N.push(G),V===0?(U.data("active",!0),U.addClass("w-e-active")):G.hide(),U.on("click",function(){U.data("active")||((0,i.default)(F).call(F,function(z){z.data("active",!1),z.removeClass("w-e-active")}),(0,i.default)(N).call(N,function(z){z.hide()}),U.data("active",!0),U.addClass("w-e-active"),G.show())})}}),g.on("click",function(L){L.stopPropagation()}),m.$elem.append(g),(0,i.default)(O).call(O,function(L,V){if(L){var P=L.events||[];(0,i.default)(P).call(P,function(H){var U,G=H.selector,z=H.type,$=H.fn||c.EMPTY_FN,W=N[V],K=(U=H.bindEnter)!==null&&U!==void 0&&U,X=function(te){return s.__awaiter(p,void 0,void 0,function(){return s.__generator(this,function(ne){switch(ne.label){case 0:return te.stopPropagation(),[4,$(te)];case 1:return ne.sent()&&this.remove(),[2]}})})};(0,a.default)(W).call(W,G).on(z,X),K&&z==="click"&&W.on("keyup",function(te){te.keyCode==13&&X(te)})})}});var B=(0,a.default)(g).call(g,"input[type=text],textarea");B.length&&B.get(0).focus(),f.hideCurAllPanels(),m.setPanel(this),f.createdMenus.add(m)}},f.prototype.remove=function(){var p=this.menu,m=this.$container;m&&m.remove(),f.createdMenus.delete(p)},f.hideCurAllPanels=function(){var p;f.createdMenus.size!==0&&(0,i.default)(p=f.createdMenus).call(p,function(m){var v=m.panel;v&&v.remove()})},f.createdMenus=new l.default,f}();t.default=d},function(e,t){var n={}.toString;e.exports=function(r){return n.call(r).slice(8,-1)}},function(e,t,n){var r=n(62),o=Math.min;e.exports=function(i){return i>0?o(r(i),9007199254740991):0}},function(e,t,n){var r=n(9),o=n(8),i=function(a){return typeof a=="function"?a:void 0};e.exports=function(a,l){return arguments.length<2?i(r[a])||i(o[a]):r[a]&&r[a][l]||o[a]&&o[a][l]}},function(e,t,n){var r=n(81),o=n(18).f,i=n(19),a=n(16),l=n(170),s=n(10)("toStringTag");e.exports=function(u,c,d,f){if(u){var p=d?u:u.prototype;a(p,s)||o(p,s,{configurable:!0,value:c}),f&&!r&&i(p,"toString",l)}}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=function(i){function a(l,s){return i.call(this,l,s)||this}return r.__extends(a,i),a.prototype.setPanel=function(l){this.panel=l},a}(r.__importDefault(n(95)).default);t.default=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(57));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=function(){function u(c,d,f){this.editor=c,this.$targetElem=d,this.conf=f,this._show=!1,this._isInsertTextContainer=!1;var p=l.default("<div></div>");p.addClass("w-e-tooltip"),this.$container=p}return u.prototype.getPositionData=function(){var c=this.$container,d=0,f=0,p=20,m=document.documentElement.scrollTop,v=this.$targetElem.getBoundingClientRect(),g=this.editor.$textElem.getBoundingClientRect(),b=this.$targetElem.getOffsetData(),y=l.default(b.parent),w=this.editor.$textElem.elems[0].scrollTop;if(this._isInsertTextContainer=y.equal(this.editor.$textContainerElem),this._isInsertTextContainer){var x=y.getBoundingClientRect().height,_=b.top,E=b.left,C=b.height,T=_-w;T>p+5?(d=T-p-15,c.addClass("w-e-tooltip-up")):T+C+p<x?(d=T+C+10,c.addClass("w-e-tooltip-down")):(d=(T>0?T:0)+p+10,c.addClass("w-e-tooltip-down")),f=E<0?0:E}else v.top<p||v.top-g.top<p?(d=v.bottom+m+5,c.addClass("w-e-tooltip-down")):(d=v.top+m-p-15,c.addClass("w-e-tooltip-up")),f=v.left<0?0:v.left;return{top:d,left:f}},u.prototype.appendMenus=function(){var c=this,d=this.conf,f=this.editor,p=this.$targetElem,m=this.$container;(0,i.default)(d).call(d,function(v,g){var b=v.$elem,y=l.default("<div></div>");y.addClass("w-e-tooltip-item-wrapper "),y.append(b),m.append(y),b.on("click",function(w){w.preventDefault(),v.onClick(f,p)&&c.remove()})})},u.prototype.create=function(){var c,d,f=this.editor,p=this.$container;this.appendMenus();var m=this.getPositionData(),v=m.top,g=m.left;p.css("top",v+"px"),p.css("left",g+"px"),p.css("z-index",f.zIndex.get("tooltip")),this._isInsertTextContainer?this.editor.$textContainerElem.append(p):l.default("body").append(p),this._show=!0,f.beforeDestroy((0,a.default)(c=this.remove).call(c,this)),f.txt.eventHooks.onBlurEvents.push((0,a.default)(d=this.remove).call(d,this))},u.prototype.remove=function(){this.$container.remove(),this._show=!1},(0,o.default)(u.prototype,"isShow",{get:function(){return this._show},enumerable:!1,configurable:!0}),u}();t.default=s},function(e,t,n){var r=n(40);e.exports=function(o,i,a){if(r(o),i===void 0)return o;switch(a){case 0:return function(){return o.call(i)};case 1:return function(l){return o.call(i,l)};case 2:return function(l,s){return o.call(i,l,s)};case 3:return function(l,s,u){return o.call(i,l,s,u)}}return function(){return o.apply(i,arguments)}}},function(e,t){e.exports=function(n){if(typeof n!="function")throw TypeError(String(n)+" is not a function");return n}},function(e,t,n){var r,o,i,a=n(165),l=n(8),s=n(13),u=n(19),c=n(16),d=n(63),f=n(51),p=l.WeakMap,m=function(_){return i(_)?o(_):r(_,{})},v=function(_){return function(E){var C;if(!s(E)||(C=o(E)).type!==_)throw TypeError("Incompatible receiver, "+_+" required");return C}};if(a){var g=new p,b=g.get,y=g.has,w=g.set;r=function(_,E){return w.call(g,_,E),E},o=function(_){return b.call(g,_)||{}},i=function(_){return y.call(g,_)}}else{var x=d("state");f[x]=!0,r=function(_,E){return u(_,x,E),E},o=function(_){return c(_,x)?_[x]:{}},i=function(_){return c(_,x)}}e.exports={set:r,get:o,has:i,enforce:m,getterFor:v}},function(e,t){e.exports=!0},function(e,t){e.exports={}},function(e,t,n){e.exports=n(213)},function(e,t,n){e.exports=n(261)},function(e,t,n){e.exports=n(265)},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0}),t.createElementFragment=t.createDocumentFragment=t.createElement=t.insertBefore=t.getEndPoint=t.getStartPoint=t.updateRange=t.filterSelectionNodes=void 0;var a=n(2),l=n(137),s=a.__importDefault(n(3));function u(b){var y=[];return(0,i.default)(b).call(b,function(w){var x=w.getNodeName();if(x!==l.ListType.OrderedList&&x!==l.ListType.UnorderedList)y.push(w);else if(w.prior)y.push(w.prior);else{var _=w.children();_==null||(0,i.default)(_).call(_,function(E){y.push(s.default(E))})}}),y}function c(b,y,w){var x=b.selection,_=document.createRange();y.length>1?(_.setStart(y.elems[0],0),_.setEnd(y.elems[y.length-1],y.elems[y.length-1].childNodes.length)):_.selectNodeContents(y.elems[0]),w&&_.collapse(!1),x.saveRange(_),x.restoreSelection()}function d(b){var y;return b.prior?b.prior:s.default((y=b.children())===null||y===void 0?void 0:y.elems[0])}function f(b){var y;return b.prior?b.prior:s.default((y=b.children())===null||y===void 0?void 0:y.last().elems[0])}function p(b,y,w){w===void 0&&(w=null),b.parent().elems[0].insertBefore(y,w)}function m(b){return document.createElement(b)}function v(){return document.createDocumentFragment()}function g(b,y,w){return w===void 0&&(w="li"),(0,i.default)(b).call(b,function(x){var _=m(w);_.innerHTML=x.html(),y.appendChild(_),x.remove()}),y}t.filterSelectionNodes=u,t.updateRange=c,t.getStartPoint=d,t.getEndPoint=f,t.insertBefore=p,t.createElement=m,t.createDocumentFragment=v,t.createElementFragment=g},function(e,t){e.exports=function(n,r){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:r}}},function(e,t){e.exports=function(n){if(n==null)throw TypeError("Can't call method on "+n);return n}},function(e,t,n){var r=n(164).charAt,o=n(41),i=n(75),a="String Iterator",l=o.set,s=o.getterFor(a);i(String,"String",function(u){l(this,{type:a,string:String(u),index:0})},function(){var u,c=s(this),d=c.string,f=c.index;return f>=d.length?{value:void 0,done:!0}:(u=r(d,f),c.index+=u.length,{value:u,done:!1})})},function(e,t){e.exports={}},function(e,t,n){var r=n(106),o=n(80);e.exports=Object.keys||function(i){return r(i,o)}},function(e,t,n){var r=n(19);e.exports=function(o,i,a,l){l&&l.enumerable?o[i]=a:r(o,i,a)}},function(e,t,n){n(173);var r=n(174),o=n(8),i=n(65),a=n(19),l=n(43),s=n(10)("toStringTag");for(var u in r){var c=o[u],d=c&&c.prototype;d&&i(d)!==s&&a(d,s,u),l[u]=l.Array}},function(e,t,n){var r=n(33);e.exports=Array.isArray||function(o){return r(o)=="Array"}},function(e,t,n){var r=n(11),o=n(10),i=n(86),a=o("species");e.exports=function(l){return i>=51||!r(function(){var s=[];return(s.constructor={})[a]=function(){return{foo:1}},s[l](Boolean).foo!==1})}},function(e,t,n){e.exports=n(222)},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.ListHandle=void 0;var r=n(2).__importDefault(n(373)),o=function(){function i(a){this.options=a,this.selectionRangeElem=new r.default}return i}();t.ListHandle=o},function(e,t,n){var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(a){var l=o(this,a);return!!l&&l.enumerable}:r},function(e,t,n){var r=n(13);e.exports=function(o,i){if(!r(o))return o;var a,l;if(i&&typeof(a=o.toString)=="function"&&!r(l=a.call(o))||typeof(a=o.valueOf)=="function"&&!r(l=a.call(o))||!i&&typeof(a=o.toString)=="function"&&!r(l=a.call(o)))return l;throw TypeError("Can't convert object to primitive value")}},function(e,t){},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(o){return isNaN(o=+o)?0:(o>0?r:n)(o)}},function(e,t,n){var r=n(74),o=n(64),i=r("keys");e.exports=function(a){return i[a]||(i[a]=o(a))}},function(e,t){var n=0,r=Math.random();e.exports=function(o){return"Symbol("+String(o===void 0?"":o)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(81),o=n(33),i=n(10)("toStringTag"),a=o(function(){return arguments}())=="Arguments",l=function(s,u){try{return s[u]}catch{}};e.exports=r?o:function(s){var u,c,d;return s===void 0?"Undefined":s===null?"Null":typeof(c=l(u=Object(s),i))=="string"?c:a?o(u):(d=o(u))=="Object"&&typeof u.callee=="function"?"Arguments":d}},function(e,t,n){var r=n(25),o=n(111),i=n(34),a=n(39),l=n(112),s=n(113),u=function(d,f){this.stopped=d,this.result=f},c=e.exports=function(d,f,p,m,v){var g,b,y,w,x,_,E,C=a(f,p,m?2:1);if(v)g=d;else{if(typeof(b=l(d))!="function")throw TypeError("Target is not iterable");if(o(b)){for(y=0,w=i(d.length);w>y;y++)if((x=m?C(r(E=d[y])[0],E[1]):C(d[y]))&&x instanceof u)return x;return new u(!1)}g=b.call(d)}for(_=g.next;!(E=_.call(g)).done;)if(Qi(x=s(g,C,E.value,m))=="object"&&x&&x instanceof u)return x;return new u(!1)};c.stop=function(d){return new u(!0,d)}},function(e,t,n){var r=n(11);e.exports=function(o,i){var a=[][o];return!!a&&r(function(){a.call(null,i||function(){throw 1},1)})}},function(e,t){e.exports=` |
|
117 |
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},function(e,t,n){var r=n(60),o=n(18),i=n(48);e.exports=function(a,l,s){var u=r(l);u in a?o.f(a,u,i(0,s)):a[u]=s}},function(e,t,n){e.exports=n(209)},function(e,t,n){var r=n(14),o=n(59),i=n(48),a=n(28),l=n(60),s=n(16),u=n(99),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(d,f){if(d=a(d),f=l(f,!0),u)try{return c(d,f)}catch{}if(s(d,f))return i(!o.f.call(d,f),d[f])}},function(e,t,n){var r=n(11),o=n(33),i="".split;e.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return o(a)=="String"?i.call(a,""):Object(a)}:Object},function(e,t,n){var r=n(8),o=n(13),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(l){return a?i.createElement(l):{}}},function(e,t,n){var r=n(42),o=n(102);(e.exports=function(i,a){return o[i]||(o[i]=a!==void 0?a:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(5),o=n(167),i=n(104),a=n(171),l=n(36),s=n(19),u=n(53),c=n(10),d=n(42),f=n(43),p=n(103),m=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,g=c("iterator"),b="keys",y="values",w="entries",x=function(){return this};e.exports=function(_,E,C,T,k,I,O){o(C,E,T);var F,N,B,L=function($){if($===k&&G)return G;if(!v&&$ in H)return H[$];switch($){case b:case y:case w:return function(){return new C(this,$)}}return function(){return new C(this)}},V=E+" Iterator",P=!1,H=_.prototype,U=H[g]||H["@@iterator"]||k&&H[k],G=!v&&U||L(k),z=E=="Array"&&H.entries||U;if(z&&(F=i(z.call(new _)),m!==Object.prototype&&F.next&&(!d&&i(F)!==m&&(a?a(F,m):typeof F[g]!="function"&&s(F,g,x)),l(F,V,!0,!0),d&&(f[V]=x))),k==y&&U&&U.name!==y&&(P=!0,G=function(){return U.call(this)}),(!d||O)&&H[g]!==G&&s(H,g,G),f[E]=G,k)if(N={values:L(y),keys:I?G:L(b),entries:L(w)},O)for(B in N)(v||P||!(B in H))&&u(H,B,N[B]);else r({target:E,proto:!0,forced:v||P},N);return N}},function(e,t,n){var r=n(11);e.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(e,t,n){var r,o=n(25),i=n(169),a=n(80),l=n(51),s=n(107),u=n(73),c=n(63),d=">",f="<",p="prototype",m="script",v=c("IE_PROTO"),g=function(){},b=function(_){return f+m+d+_+f+"/"+m+d},y=function(_){_.write(b("")),_.close();var E=_.parentWindow.Object;return _=null,E},w=function(){var _,E=u("iframe"),C="java"+m+":";return E.style.display="none",s.appendChild(E),E.src=String(C),(_=E.contentWindow.document).open(),_.write(b("document.F=Object")),_.close(),_.F},x=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch{}x=r?y(r):w();for(var _=a.length;_--;)delete x[p][a[_]];return x()};l[v]=!0,e.exports=Object.create||function(_,E){var C;return _!==null?(g[p]=o(_),C=new g,g[p]=null,C[v]=_):C=x(),E===void 0?C:i(C,E)}},function(e,t,n){var r=n(28),o=n(34),i=n(79),a=function(l){return function(s,u,c){var d,f=r(s),p=o(f.length),m=i(c,p);if(l&&u!=u){for(;p>m;)if((d=f[m++])!=d)return!0}else for(;p>m;m++)if((l||m in f)&&f[m]===u)return l||m||0;return!l&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(62),o=Math.max,i=Math.min;e.exports=function(a,l){var s=r(a);return s<0?o(s+l,0):i(s,l)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r={};r[n(10)("toStringTag")]="z",e.exports=String(r)==="[object z]"},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(n,r,o){if(!(n instanceof r))throw TypeError("Incorrect "+(o?o+" ":"")+"invocation");return n}},function(e,t,n){var r=n(35);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(40),o=function(i){var a,l;this.promise=new i(function(s,u){if(a!==void 0||l!==void 0)throw TypeError("Bad Promise constructor");a=s,l=u}),this.resolve=r(a),this.reject=r(l)};e.exports.f=function(i){return new o(i)}},function(e,t,n){var r,o,i=n(8),a=n(84),l=i.process,s=l&&l.versions,u=s&&s.v8;u?o=(r=u.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(6),u=a.__importDefault(n(267)),c=a.__importDefault(n(280)),d=a.__importDefault(n(281)),f=a.__importDefault(n(282)),p=a.__importDefault(n(301)),m=a.__importStar(n(416)),v=a.__importDefault(n(417)),g=a.__importDefault(n(418)),b=a.__importDefault(n(419)),y=a.__importStar(n(420)),w=a.__importDefault(n(423)),x=a.__importDefault(n(424)),_=a.__importDefault(n(425)),E=a.__importDefault(n(427)),C=a.__importDefault(n(437)),T=a.__importDefault(n(440)),k=a.__importStar(n(441)),I=a.__importDefault(n(23)),O=a.__importDefault(n(133)),F=a.__importDefault(n(24)),N=a.__importDefault(n(32)),B=a.__importDefault(n(37)),L=a.__importDefault(n(38)),V=1,P=function(){function H(U,G){this.pluginsFunctionList={},this.beforeDestroyHooks=[],this.id="wangEditor-"+V++,this.toolbarSelector=U,this.textSelector=G,m.selectorValidator(this),this.config=s.deepClone(u.default),this.$toolbarElem=l.default("<div></div>"),this.$textContainerElem=l.default("<div></div>"),this.$textElem=l.default("<div></div>"),this.toolbarElemId="",this.textElemId="",this.isFocus=!1,this.isComposing=!1,this.isCompatibleMode=!1,this.selection=new c.default(this),this.cmd=new d.default(this),this.txt=new f.default(this),this.menus=new p.default(this),this.zIndex=new x.default,this.change=new _.default(this),this.history=new E.default(this),this.onSelectionChange=new T.default(this);var z=C.default(this),$=z.disable,W=z.enable;this.disable=$,this.enable=W,this.isEnable=!0}return H.prototype.initSelection=function(U){v.default(this,U)},H.prototype.create=function(){this.zIndex.init(this),this.isCompatibleMode=this.config.compatibleMode(),this.isCompatibleMode||(this.config.onchangeTimeout=30),b.default(this),m.default(this),this.txt.init(),this.menus.init(),y.default(this),this.initSelection(!0),g.default(this),this.change.observe(),this.history.observe(),k.default(this)},H.prototype.beforeDestroy=function(U){return this.beforeDestroyHooks.push(U),this},H.prototype.destroy=function(){var U,G=this;(0,i.default)(U=this.beforeDestroyHooks).call(U,function(z){return z.call(G)}),this.$toolbarElem.remove(),this.$textContainerElem.remove()},H.prototype.fullScreen=function(){y.setFullScreen(this)},H.prototype.unFullScreen=function(){y.setUnFullScreen(this)},H.prototype.scrollToHead=function(U){w.default(this,U)},H.registerMenu=function(U,G){!G||typeof G!="function"||(H.globalCustomMenuConstructorList[U]=G)},H.prototype.registerPlugin=function(U,G){k.registerPlugin(U,G,this.pluginsFunctionList)},H.registerPlugin=function(U,G){k.registerPlugin(U,G,H.globalPluginsFunctionList)},H.$=l.default,H.BtnMenu=I.default,H.DropList=O.default,H.DropListMenu=F.default,H.Panel=N.default,H.PanelMenu=B.default,H.Tooltip=L.default,H.globalCustomMenuConstructorList={},H.globalPluginsFunctionList={},H}();t.default=P},function(e,t,n){var r=n(13),o=n(55),i=n(10)("species");e.exports=function(a,l){var s;return o(a)&&(typeof(s=a.constructor)!="function"||s!==Array&&!o(s.prototype)?r(s)&&(s=s[i])===null&&(s=void 0):s=void 0),new(s===void 0?Array:s)(l===0?0:l)}},function(e,t,n){e.exports=n(185)},function(e,t,n){var r=n(49),o="["+n(68)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),l=function(s){return function(u){var c=String(r(u));return 1&s&&(c=c.replace(i,"")),2&s&&(c=c.replace(a,"")),c}};e.exports={start:l(1),end:l(2),trim:l(3)}},function(e,t,n){e.exports=n(205)},function(e,t,n){var r=n(227),o=n(230);function i(a){return e.exports=i=typeof o=="function"&&typeof r=="symbol"?function(l){return typeof l}:function(l){return l&&typeof o=="function"&&l.constructor===o&&l!==o.prototype?"symbol":typeof l},i(a)}e.exports=i},function(e,t,n){var r=n(10);t.f=r},function(e,t,n){e.exports=n(306)},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(32)),l=function(){function s(u,c){var d=this;this.$elem=u,this.editor=c,this._active=!1,u.on("click",function(f){var p;a.default.hideCurAllPanels(),(0,i.default)(p=c.txt.eventHooks.menuClickEvents).call(p,function(m){return m()}),f.stopPropagation(),c.selection.getRange()!=null&&d.clickHandler(f)})}return s.prototype.clickHandler=function(u){},s.prototype.active=function(){this._active=!0,this.$elem.addClass("w-e-active")},s.prototype.unActive=function(){this._active=!1,this.$elem.removeClass("w-e-active")},(0,o.default)(s.prototype,"isActive",{get:function(){return this._active},enumerable:!1,configurable:!0}),s}();t.default=l},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(57)),a=r(n(4)),l=r(n(27));(0,o.default)(t,"__esModule",{value:!0});var s=n(2),u=n(6),c=s.__importDefault(n(135)),d=s.__importDefault(n(136)),f=function(){function p(m){this.editor=m}return p.prototype.insertImg=function(m,v,g){var b=this.editor,y=b.config,w="validate.",x=function(T,k){return k===void 0&&(k=w),b.i18next.t(k+T)},_=v?'alt="'+v+'" ':"",E=g?'data-href="'+encodeURIComponent(g)+'" ':"";b.cmd.do("insertHTML",'<img src="'+m+'" '+_+E+'style="max-width:100%;" contenteditable="false"/>'),y.linkImgCallback(m,v,g);var C=document.createElement("img");C.onload=function(){C=null},C.onerror=function(){y.customAlert(x("\u63D2\u5165\u56FE\u7247\u9519\u8BEF"),"error","wangEditor: "+x("\u63D2\u5165\u56FE\u7247\u9519\u8BEF")+"\uFF0C"+x("\u56FE\u7247\u94FE\u63A5")+' "'+m+'"\uFF0C'+x("\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25")),C=null},C.onabort=function(){return C=null},C.src=m},p.prototype.uploadImg=function(m){var v=this;if(m.length){var g=this.editor,b=g.config,y="validate.",w=function(K){return g.i18next.t(y+K)},x=b.uploadImgServer,_=b.uploadImgShowBase64,E=b.uploadImgMaxSize,C=E/1024/1024,T=b.uploadImgMaxLength,k=b.uploadFileName,I=b.uploadImgParams,O=b.uploadImgParamsWithUrl,F=b.uploadImgHeaders,N=b.uploadImgHooks,B=b.uploadImgTimeout,L=b.withCredentials,V=b.customUploadImg;if(V||x||_){var P,H=[],U=[];if(u.arrForEach(m,function(K){if(K){var X=K.name||K.type.replace("/","."),te=K.size;if(X&&te){var ne=g.config.uploadImgAccept.join("|");if(new RegExp(".("+ne+")$","i").test(X)===!1)return void U.push("\u3010"+X+"\u3011"+w("\u4E0D\u662F\u56FE\u7247"));if(E<te)return void U.push("\u3010"+X+"\u3011"+w("\u5927\u4E8E")+" "+C+"M");H.push(K)}}}),U.length)return void b.customAlert(w("\u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7")+`: |
|
118 |
`+U.join(` |
|
119 |
`),"warning");if(H.length===0)return void b.customAlert(w("\u4F20\u5165\u7684\u6587\u4EF6\u4E0D\u5408\u6CD5"),"warning");if(H.length>T)return void b.customAlert(w("\u4E00\u6B21\u6700\u591A\u4E0A\u4F20")+T+w("\u5F20\u56FE\u7247"),"warning");if(V&&typeof V=="function")return void V(H,(0,i.default)(P=this.insertImg).call(P,this));var G=new FormData;if((0,a.default)(H).call(H,function(K,X){var te=k||K.name;H.length>1&&(te+=X+1),G.append(te,K)}),x){var z=x.split("#");x=z[0];var $=z[1]||"";(0,a.default)(u).call(u,I,function(K,X){O&&((0,l.default)(x).call(x,"?")>0?x+="&":x+="?",x=x+K+"="+X),G.append(K,X)}),$&&(x+="#"+$);var W=c.default(x,{timeout:B,formData:G,headers:F,withCredentials:!!L,beforeSend:function(K){if(N.before)return N.before(K,g,H)},onTimeout:function(K){b.customAlert(w("\u4E0A\u4F20\u56FE\u7247\u8D85\u65F6"),"error"),N.timeout&&N.timeout(K,g)},onProgress:function(K,X){var te=new d.default(g);X.lengthComputable&&(K=X.loaded/X.total,te.show(K))},onError:function(K){b.customAlert(w("\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF"),"error",w("\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF")+"\uFF0C"+w("\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001")+": "+K.status),N.error&&N.error(K,g)},onFail:function(K,X){b.customAlert(w("\u4E0A\u4F20\u56FE\u7247\u5931\u8D25"),"error",w("\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+"\uFF0C"+w("\u8FD4\u56DE\u7ED3\u679C")+": "+X),N.fail&&N.fail(K,g,X)},onSuccess:function(K,X){if(N.customInsert){var te;N.customInsert((0,i.default)(te=v.insertImg).call(te,v),X,g)}else{if(X.errno!="0")return b.customAlert(w("\u4E0A\u4F20\u56FE\u7247\u5931\u8D25"),"error",w("\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+"\uFF0C"+w("\u8FD4\u56DE\u7ED3\u679C")+" errno="+X.errno),void(N.fail&&N.fail(K,g,X));var ne=X.data;(0,a.default)(ne).call(ne,function(se){typeof se=="string"?v.insertImg(se):v.insertImg(se.url,se.alt,se.href)}),N.success&&N.success(K,g,X)}}});return void(typeof W=="string"&&b.customAlert(W,"error"))}_&&u.arrForEach(m,function(K){var X=v,te=new FileReader;te.readAsDataURL(K),te.onload=function(){if(this.result){var ne=this.result.toString();X.insertImg(ne,ne)}}})}}},p}();t.default=f},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(410)),a=r(n(4)),l=r(n(45));function s(p){return!!p.length&&p.attr("class")==="w-e-todo"}function u(p){var m=p.selection.getSelectionRangeTopNodes();if(m.length!==0)return(0,i.default)(m).call(m,function(v){return s(v)})}function c(p,m,v){var g;if(p.hasChildNodes()){var b=p.cloneNode(),y=!1;m.nodeValue===""&&(y=!0);var w=[];return(0,a.default)(g=p.childNodes).call(g,function(x){if(!d(x,m)&&y&&(b.appendChild(x.cloneNode(!0)),x.nodeName!=="BR"&&w.push(x)),d(x,m)){if(x.nodeType===1){var _=c(x,m,v);_&&_.textContent!==""&&(b==null||b.appendChild(_))}if(x.nodeType===3&&m.isEqualNode(x)){var E=f(x,v);b.textContent=E}y=!0}}),(0,a.default)(w).call(w,function(x){x.remove()}),b}}function d(p,m){return p.nodeType===3?p.nodeValue===m.nodeValue:p.contains(m)}function f(p,m,v){v===void 0&&(v=!0);var g=p.nodeValue,b=g==null?void 0:(0,l.default)(g).call(g,0,m);if(g=g==null?void 0:(0,l.default)(g).call(g,m),!v){var y=g;g=b,b=y}return p.nodeValue=b,g}(0,o.default)(t,"__esModule",{value:!0}),t.dealTextNode=t.isAllTodo=t.isTodo=t.getCursorNextNode=void 0,t.isTodo=s,t.isAllTodo=u,t.getCursorNextNode=c,t.dealTextNode=f},function(e,t,n){var r=n(0)(n(1));(0,r.default)(t,"__esModule",{value:!0});var o=n(430),i=function(){function a(l){this.maxSize=l,this.isRe=!1,this.data=new o.CeilStack(l),this.revokeData=new o.CeilStack(l)}return(0,r.default)(a.prototype,"size",{get:function(){return[this.data.size,this.revokeData.size]},enumerable:!1,configurable:!0}),a.prototype.resetMaxSize=function(l){this.data.resetMax(l),this.revokeData.resetMax(l)},a.prototype.save=function(l){return this.isRe&&(this.revokeData.clear(),this.isRe=!1),this.data.instack(l),this},a.prototype.revoke=function(l){!this.isRe&&(this.isRe=!0);var s=this.data.outstack();return!!s&&(this.revokeData.instack(s),l(s),!0)},a.prototype.restore=function(l){!this.isRe&&(this.isRe=!0);var s=this.revokeData.outstack();return!!s&&(this.data.instack(s),l(s),!0)},a}();t.default=i},function(e,t,n){var r=n(14),o=n(11),i=n(73);e.exports=!r&&!o(function(){return Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a!=7})},function(e,t,n){var r=n(11),o=/#|\.prototype\./,i=function(c,d){var f=l[a(c)];return f==u||f!=s&&(typeof d=="function"?r(d):!!d)},a=i.normalize=function(c){return String(c).replace(o,".").toLowerCase()},l=i.data={},s=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(102),o=Function.toString;typeof r.inspectSource!="function"&&(r.inspectSource=function(i){return o.call(i)}),e.exports=r.inspectSource},function(e,t,n){var r=n(8),o=n(166),i="__core-js_shared__",a=r[i]||o(i,{});e.exports=a},function(e,t,n){var r,o,i,a=n(104),l=n(19),s=n(16),u=n(10),c=n(42),d=u("iterator"),f=!1,p=function(){return this};[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(r=o):f=!0),r==null&&(r={}),!c&&!s(r,d)&&l(r,d,p),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},function(e,t,n){var r=n(16),o=n(29),i=n(63),a=n(168),l=i("IE_PROTO"),s=Object.prototype;e.exports=a?Object.getPrototypeOf:function(u){return u=o(u),r(u,l)?u[l]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?s:null}},function(e,t,n){var r=n(76);e.exports=r&&!Symbol.sham&&Qi(Symbol.iterator)=="symbol"},function(e,t,n){var r=n(16),o=n(28),i=n(78).indexOf,a=n(51);e.exports=function(l,s){var u,c=o(l),d=0,f=[];for(u in c)!r(a,u)&&r(c,u)&&f.push(u);for(;s.length>d;)r(c,u=s[d++])&&(~i(f,u)||f.push(u));return f}},function(e,t,n){var r=n(35);e.exports=r("document","documentElement")},function(e,t,n){var r=n(8);e.exports=r.Promise},function(e,t,n){var r=n(53);e.exports=function(o,i,a){for(var l in i)a&&a.unsafe&&o[l]?o[l]=i[l]:r(o,l,i[l],a);return o}},function(e,t,n){var r=n(35),o=n(18),i=n(10),a=n(14),l=i("species");e.exports=function(s){var u=r(s),c=o.f;a&&u&&!u[l]&&c(u,l,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(10),o=n(43),i=r("iterator"),a=Array.prototype;e.exports=function(l){return l!==void 0&&(o.Array===l||a[i]===l)}},function(e,t,n){var r=n(65),o=n(43),i=n(10)("iterator");e.exports=function(a){if(a!=null)return a[i]||a["@@iterator"]||o[r(a)]}},function(e,t,n){var r=n(25);e.exports=function(o,i,a,l){try{return l?i(r(a)[0],a[1]):i(a)}catch(u){var s=o.return;throw s!==void 0&&r(s.call(o)),u}}},function(e,t,n){var r=n(10)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch{}e.exports=function(l,s){if(!s&&!o)return!1;var u=!1;try{var c={};c[r]=function(){return{next:function(){return{done:u=!0}}}},l(c)}catch{}return u}},function(e,t,n){var r=n(25),o=n(40),i=n(10)("species");e.exports=function(a,l){var s,u=r(a).constructor;return u===void 0||(s=r(u)[i])==null?l:o(s)}},function(e,t,n){var r,o,i,a=n(8),l=n(11),s=n(33),u=n(39),c=n(107),d=n(73),f=n(117),p=a.location,m=a.setImmediate,v=a.clearImmediate,g=a.process,b=a.MessageChannel,y=a.Dispatch,w=0,x={},_="onreadystatechange",E=function(I){if(x.hasOwnProperty(I)){var O=x[I];delete x[I],O()}},C=function(I){return function(){E(I)}},T=function(I){E(I.data)},k=function(I){a.postMessage(I+"",p.protocol+"//"+p.host)};(!m||!v)&&(m=function(I){for(var O=[],F=1;arguments.length>F;)O.push(arguments[F++]);return x[++w]=function(){(typeof I=="function"?I:Function(I)).apply(void 0,O)},r(w),w},v=function(I){delete x[I]},s(g)=="process"?r=function(I){g.nextTick(C(I))}:y&&y.now?r=function(I){y.now(C(I))}:b&&!f?(i=(o=new b).port2,o.port1.onmessage=T,r=u(i.postMessage,i,1)):!a.addEventListener||typeof postMessage!="function"||a.importScripts||l(k)||p.protocol==="file:"?r=_ in d("script")?function(I){c.appendChild(d("script"))[_]=function(){c.removeChild(this),E(I)}}:function(I){setTimeout(C(I),0)}:(r=k,a.addEventListener("message",T,!1))),e.exports={set:m,clear:v}},function(e,t,n){var r=n(84);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r=n(25),o=n(13),i=n(85);e.exports=function(a,l){if(r(a),o(l)&&l.constructor===a)return l;var s=i.f(a);return(0,s.resolve)(l),s.promise}},function(e,t){e.exports=function(n){try{return{error:!1,value:n()}}catch(r){return{error:!0,value:r}}}},function(e,t,n){e.exports=n(197)},function(e,t,n){var r=n(5),o=n(8),i=n(122),a=n(11),l=n(19),s=n(66),u=n(83),c=n(13),d=n(36),f=n(18).f,p=n(30).forEach,m=n(14),v=n(41),g=v.set,b=v.getterFor;e.exports=function(y,w,x){var _,E=y.indexOf("Map")!==-1,C=y.indexOf("Weak")!==-1,T=E?"set":"add",k=o[y],I=k&&k.prototype,O={};if(m&&typeof k=="function"&&(C||I.forEach&&!a(function(){new k().entries().next()}))){_=w(function(N,B){g(u(N,_,y),{type:y,collection:new k}),B!=null&&s(B,N[T],N,E)});var F=b(y);p(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(N){var B=N=="add"||N=="set";N in I&&(!C||N!="clear")&&l(_.prototype,N,function(L,V){var P=F(this).collection;if(!B&&C&&!c(L))return N=="get"&&void 0;var H=P[N](L===0?0:L,V);return B?this:H})}),C||f(_.prototype,"size",{configurable:!0,get:function(){return F(this).collection.size}})}else _=x.getConstructor(w,y,E,T),i.REQUIRED=!0;return d(_,y,!1,!0),O[y]=_,r({global:!0,forced:!0},O),C||x.setStrong(_,y,E),_}},function(e,t,n){var r=n(51),o=n(13),i=n(16),a=n(18).f,l=n(64),s=n(200),u=l("meta"),c=0,d=Object.isExtensible||function(){return!0},f=function(b){a(b,u,{value:{objectID:"O"+ ++c,weakData:{}}})},p=function(b,y){if(!o(b))return Qi(b)=="symbol"?b:(typeof b=="string"?"S":"P")+b;if(!i(b,u)){if(!d(b))return"F";if(!y)return"E";f(b)}return b[u].objectID},m=function(b,y){if(!i(b,u)){if(!d(b))return!0;if(!y)return!1;f(b)}return b[u].weakData},v=function(b){return s&&g.REQUIRED&&d(b)&&!i(b,u)&&f(b),b},g=e.exports={REQUIRED:!1,fastKey:p,getWeakData:m,onFreeze:v};r[u]=!0},function(e,t,n){var r=n(18).f,o=n(77),i=n(109),a=n(39),l=n(83),s=n(66),u=n(75),c=n(110),d=n(14),f=n(122).fastKey,p=n(41),m=p.set,v=p.getterFor;e.exports={getConstructor:function(g,b,y,w){var x=g(function(T,k){l(T,x,b),m(T,{type:b,index:o(null),first:void 0,last:void 0,size:0}),d||(T.size=0),k!=null&&s(k,T[w],T,y)}),_=v(b),E=function(T,k,I){var O,F,N=_(T),B=C(T,k);return B?B.value=I:(N.last=B={index:F=f(k,!0),key:k,value:I,previous:O=N.last,next:void 0,removed:!1},N.first||(N.first=B),O&&(O.next=B),d?N.size++:T.size++,F!=="F"&&(N.index[F]=B)),T},C=function(T,k){var I,O=_(T),F=f(k);if(F!=="F")return O.index[F];for(I=O.first;I;I=I.next)if(I.key==k)return I};return i(x.prototype,{clear:function(){for(var T=this,k=_(T),I=k.index,O=k.first;O;)O.removed=!0,O.previous&&(O.previous=O.previous.next=void 0),delete I[O.index],O=O.next;k.first=k.last=void 0,d?k.size=0:T.size=0},delete:function(T){var k=this,I=_(k),O=C(k,T);if(O){var F=O.next,N=O.previous;delete I.index[O.index],O.removed=!0,N&&(N.next=F),F&&(F.previous=N),I.first==O&&(I.first=F),I.last==O&&(I.last=N),d?I.size--:k.size--}return!!O},forEach:function(T){for(var k,I=_(this),O=a(T,arguments.length>1?arguments[1]:void 0,3);k=k?k.next:I.first;)for(O(k.value,k.key,this);k&&k.removed;)k=k.previous},has:function(T){return!!C(this,T)}}),i(x.prototype,y?{get:function(T){var k=C(this,T);return k&&k.value},set:function(T,k){return E(this,T===0?0:T,k)}}:{add:function(T){return E(this,T=T===0?0:T,T)}}),d&&r(x.prototype,"size",{get:function(){return _(this).size}}),x},setStrong:function(g,b,y){var w=b+" Iterator",x=v(b),_=v(w);u(g,b,function(E,C){m(this,{type:w,target:E,state:x(E),kind:C,last:void 0})},function(){for(var E=_(this),C=E.kind,T=E.last;T&&T.removed;)T=T.previous;return E.target&&(E.last=T=T?T.next:E.state.first)?C=="keys"?{value:T.key,done:!1}:C=="values"?{value:T.value,done:!1}:{value:[T.key,T.value],done:!1}:(E.target=void 0,{value:void 0,done:!0})},y?"entries":"values",!y,!0),c(b)}}},function(e,t,n){n(12)("iterator")},function(e,t,n){var r=n(106),o=n(80).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(i){return r(i,o)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){e.exports=n(268)},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={zIndex:1e4}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={focus:!0,height:300,placeholder:"\u8BF7\u8F93\u5165\u6B63\u6587",zIndexFullScreen:10002,showFullScreen:!0}},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0}),t.getPasteImgs=t.getPasteHtml=t.getPasteText=void 0;var a=n(2),l=n(6),s=a.__importDefault(n(292));function u(f){var p=f.clipboardData,m="";return m=p==null?window.clipboardData&&window.clipboardData.getData("text"):p.getData("text/plain"),l.replaceHtmlSymbol(m)}function c(f,p,m){p===void 0&&(p=!0),m===void 0&&(m=!1);var v=f.clipboardData,g="";if(v&&(g=v.getData("text/html")),!g){var b=u(f);if(!b)return"";g="<p>"+b+"</p>"}return g=g.replace(/<(\d)/gm,function(y,w){return"<"+w}),g=g.replace(/<(\/?meta.*?)>/gim,""),g=s.default(g,p,m)}function d(f){var p,m=[];if(u(f))return m;var v=(p=f.clipboardData)===null||p===void 0?void 0:p.items;return v&&(0,i.default)(l).call(l,v,function(g,b){var y=b.type;/image/i.test(y)&&m.push(b.getAsFile())}),m}t.getPasteText=u,t.getPasteHtml=c,t.getPasteImgs=d},function(e,t,n){e.exports=n(294)},function(e,t,n){e.exports=n(310)},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(46));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=n(7),u=function(){function c(d,f){var p=this;this.hideTimeoutId=0,this.menu=d,this.conf=f;var m=l.default('<div class="w-e-droplist"></div>'),v=l.default("<p>"+f.title+"</p>");v.addClass("w-e-dp-title"),m.append(v);var g=f.list||[],b=f.type||"list",y=f.clickHandler||s.EMPTY_FN,w=l.default('<ul class="'+(b==="list"?"w-e-list":"w-e-block")+'"></ul>');(0,i.default)(g).call(g,function(x){var _=x.$elem,E=x.value,C=l.default('<li class="w-e-item"></li>');_&&(C.append(_),w.append(C),C.on("click",function(T){y(E),T.stopPropagation(),p.hideTimeoutId=(0,a.default)(function(){p.hide()})}))}),m.append(w),m.on("mouseleave",function(){p.hideTimeoutId=(0,a.default)(function(){p.hide()})}),this.$container=m,this.rendered=!1,this._show=!1}return c.prototype.show=function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var d=this.menu.$elem,f=this.$container;if(!this._show){if(this.rendered)f.show();else{var p=d.getBoundingClientRect().height||0,m=this.conf.width||100;f.css("margin-top",p+"px").css("width",m+"px"),d.append(f),this.rendered=!0}this._show=!0}},c.prototype.hide=function(){var d=this.$container;!this._show||(d.hide(),this._show=!1)},(0,o.default)(c.prototype,"isShow",{get:function(){return this._show},enumerable:!1,configurable:!0}),c}();t.default=u},function(e,t,n){function r(o){var i=o.selection.getSelectionContainerElem();return!(i==null||!i.length)&&i.getNodeName()==="A"}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){var r=n(0),o=r(n(92)),i=r(n(1)),a=r(n(4));(0,i.default)(t,"__esModule",{value:!0});var l=n(6);function s(u,c){var d=new XMLHttpRequest;if(d.open("POST",u),d.timeout=c.timeout||1e4,d.ontimeout=function(){console.error("wangEditor - \u8BF7\u6C42\u8D85\u65F6"),c.onTimeout&&c.onTimeout(d)},d.upload&&(d.upload.onprogress=function(p){var m=p.loaded/p.total;c.onProgress&&c.onProgress(m,p)}),c.headers&&(0,a.default)(l).call(l,c.headers,function(p,m){d.setRequestHeader(p,m)}),d.withCredentials=!!c.withCredentials,c.beforeSend){var f=c.beforeSend(d);if(f&&(0,o.default)(f)==="object"&&f.prevent)return f.msg}return d.onreadystatechange=function(){if(d.readyState===4){var p=d.status;if(!(p<200||p>=300&&p<400)){if(p>=400)return console.error("wangEditor - XHR \u62A5\u9519\uFF0C\u72B6\u6001\u7801 "+p),void(c.onError&&c.onError(d));var m,v=d.responseText;if((0,o.default)(v)!=="object")try{m=JSON.parse(v)}catch{return console.error("wangEditor - \u8FD4\u56DE\u7ED3\u679C\u4E0D\u662F JSON \u683C\u5F0F",v),void(c.onFail&&c.onFail(d,v))}else m=v;c.onSuccess(d,m)}}},d.send(c.formData||null),d}t.default=s},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(342)),a=r(n(46));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=function(){function u(c){this.editor=c,this.$textContainer=c.$textContainerElem,this.$bar=l.default('<div class="w-e-progress"></div>'),this.isShow=!1,this.time=0,this.timeoutId=0}return u.prototype.show=function(c){var d=this;if(!this.isShow){this.isShow=!0;var f=this.$bar;this.$textContainer.append(f),(0,i.default)()-this.time>100&&c<=1&&(f.css("width",100*c+"%"),this.time=(0,i.default)());var p=this.timeoutId;p&&clearTimeout(p),this.timeoutId=(0,a.default)(function(){d.hide()},500)}},u.prototype.hide=function(){this.$bar.remove(),this.isShow=!1,this.time=0,this.timeoutId=0},u}();t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.ListType=void 0;var r,o=n(2),i=o.__importDefault(n(3)),a=o.__importDefault(n(24)),l=n(47),s=o.__importStar(n(371));(function(c){c.OrderedList="OL",c.UnorderedList="UL"})(r=t.ListType||(t.ListType={}));var u=function(c){function d(f){var p=this,m=i.default(`<div class="w-e-menu" data-title="\u5E8F\u5217"> |
|
120 |
<i class="w-e-icon-list2"></i> |
|
121 |
</div>`),v={width:130,title:"\u5E8F\u5217",type:"list",list:[{$elem:i.default(` |
|
122 |
<p> |
|
123 |
<i class="w-e-icon-list2 w-e-drop-list-item"></i> |
|
124 |
`+f.i18next.t("menus.dropListMenu.list.\u65E0\u5E8F\u5217\u8868")+` |
|
125 |
<p>`),value:r.UnorderedList},{$elem:i.default(`<p> |
|
126 |
<i class="w-e-icon-list-numbered w-e-drop-list-item"></i> |
|
127 |
`+f.i18next.t("menus.dropListMenu.list.\u6709\u5E8F\u5217\u8868")+` |
|
128 |
<p>`),value:r.OrderedList}],clickHandler:function(g){p.command(g)}};return p=c.call(this,m,f,v)||this}return o.__extends(d,c),d.prototype.command=function(f){this.editor.selection.getSelectionContainerElem()!==void 0&&(this.handleSelectionRangeNodes(f),this.tryChangeActive())},d.prototype.validator=function(f,p,m){return!(!f.length||!p.length||m.equal(f)||m.equal(p))},d.prototype.handleSelectionRangeNodes=function(f){var p=this.editor,m=p.selection,v=f.toLowerCase(),g=m.getSelectionContainerElem(),b=m.getSelectionStartElem().getNodeTop(p),y=m.getSelectionEndElem().getNodeTop(p);if(this.validator(b,y,p.$textElem)){var w=m.getRange(),x=w==null?void 0:w.collapsed;p.$textElem.equal(g)||(g=g.getNodeTop(p));var _,E={editor:p,listType:f,listTarget:v,$selectionElem:g,$startElem:b,$endElem:y};_=this.isOrderElem(g)?s.ClassType.Wrap:this.isOrderElem(b)&&this.isOrderElem(y)?s.ClassType.Join:this.isOrderElem(b)?s.ClassType.StartJoin:this.isOrderElem(y)?s.ClassType.EndJoin:s.ClassType.Other;var C=new s.default(s.createListHandle(_,E,w));l.updateRange(p,C.getSelectionRangeElem(),!!x)}},d.prototype.isOrderElem=function(f){var p=f.getNodeName();return p===r.OrderedList||p===r.UnorderedList},d.prototype.tryChangeActive=function(){},d}(a.default);t.default=u},function(e,t,n){e.exports=n(395)},function(e,t,n){function r(o){var i=o.selection.getSelectionContainerElem();return!(i==null||!i.length||i.getNodeName()!="CODE"&&i.getNodeName()!="PRE"&&i.parent().getNodeName()!="CODE"&&i.parent().getNodeName()!="PRE"&&!/hljs/.test(i.parent().attr("class")))}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(31));(0,o.default)(t,"__esModule",{value:!0}),t.todo=void 0;var a=n(2).__importDefault(n(3)),l=function(){function u(c){var d;this.template='<ul class="w-e-todo"><li><span contenteditable="false"><input type="checkbox"></span></li></ul>',this.checked=!1,this.$todo=a.default(this.template),this.$child=(d=c==null?void 0:c.childNodes())===null||d===void 0?void 0:d.clone(!0)}return u.prototype.init=function(){var c=this.$child,d=this.getInputContainer();c&&c.insertAfter(d)},u.prototype.getInput=function(){var c=this.$todo;return(0,i.default)(c).call(c,"input")},u.prototype.getInputContainer=function(){return this.getInput().parent()},u.prototype.getTodo=function(){return this.$todo},u}();function s(u){var c=new l(u);return c.init(),c}t.todo=l,t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2);n(146),n(148),n(152),n(154),n(156),n(158),n(160);var o=r.__importDefault(n(87));r.__exportStar(n(442),t),t.default=o.default},function(e,t,n){var r=n(143);e.exports=r},function(e,t,n){n(144);var r=n(9).Object,o=e.exports=function(i,a,l){return r.defineProperty(i,a,l)};r.defineProperty.sham&&(o.sham=!0)},function(e,t,n){var r=n(5),o=n(14);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(18).f})},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch{(typeof window>"u"?"undefined":Qi(window))==="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(20),o=n(147);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-toolbar, |
|
129 |
.w-e-text-container, |
|
130 |
.w-e-menu-panel { |
|
131 |
padding: 0; |
|
132 |
margin: 0; |
|
133 |
box-sizing: border-box; |
|
134 |
background-color: #fff; |
|
135 |
/*\u8868\u60C5\u83DC\u5355\u6837\u5F0F*/ |
|
136 |
/*\u5206\u5272\u7EBF\u6837\u5F0F*/ |
|
137 |
} |
|
138 |
.w-e-toolbar h1, |
|
139 |
.w-e-text-container h1, |
|
140 |
.w-e-menu-panel h1 { |
|
141 |
font-size: 32px !important; |
|
142 |
} |
|
143 |
.w-e-toolbar h2, |
|
144 |
.w-e-text-container h2, |
|
145 |
.w-e-menu-panel h2 { |
|
146 |
font-size: 24px !important; |
|
147 |
} |
|
148 |
.w-e-toolbar h3, |
|
149 |
.w-e-text-container h3, |
|
150 |
.w-e-menu-panel h3 { |
|
151 |
font-size: 18.72px !important; |
|
152 |
} |
|
153 |
.w-e-toolbar h4, |
|
154 |
.w-e-text-container h4, |
|
155 |
.w-e-menu-panel h4 { |
|
156 |
font-size: 16px !important; |
|
157 |
} |
|
158 |
.w-e-toolbar h5, |
|
159 |
.w-e-text-container h5, |
|
160 |
.w-e-menu-panel h5 { |
|
161 |
font-size: 13.28px !important; |
|
162 |
} |
|
163 |
.w-e-toolbar p, |
|
164 |
.w-e-text-container p, |
|
165 |
.w-e-menu-panel p { |
|
166 |
font-size: 16px !important; |
|
167 |
} |
|
168 |
.w-e-toolbar .eleImg, |
|
169 |
.w-e-text-container .eleImg, |
|
170 |
.w-e-menu-panel .eleImg { |
|
171 |
cursor: pointer; |
|
172 |
display: inline-block; |
|
173 |
font-size: 18px; |
|
174 |
padding: 0 3px; |
|
175 |
} |
|
176 |
.w-e-toolbar *, |
|
177 |
.w-e-text-container *, |
|
178 |
.w-e-menu-panel * { |
|
179 |
padding: 0; |
|
180 |
margin: 0; |
|
181 |
box-sizing: border-box; |
|
182 |
} |
|
183 |
.w-e-toolbar hr, |
|
184 |
.w-e-text-container hr, |
|
185 |
.w-e-menu-panel hr { |
|
186 |
cursor: pointer; |
|
187 |
display: block; |
|
188 |
height: 0px; |
|
189 |
border: 0; |
|
190 |
border-top: 3px solid #ccc; |
|
191 |
margin: 20px 0; |
|
192 |
} |
|
193 |
.w-e-clear-fix:after { |
|
194 |
content: ""; |
|
195 |
display: table; |
|
196 |
clear: both; |
|
197 |
} |
|
198 |
.w-e-drop-list-item { |
|
199 |
position: relative; |
|
200 |
top: 1px; |
|
201 |
padding-right: 7px; |
|
202 |
color: #333 !important; |
|
203 |
} |
|
204 |
.w-e-drop-list-tl { |
|
205 |
padding-left: 10px; |
|
206 |
text-align: left; |
|
207 |
} |
|
208 |
`,""]),e.exports=t},function(e,t,n){var r=n(20),o=n(149);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){var r=n(21),o=n(150),i=n(151);t=r(!1);var a=o(i);t.push([e.i,`@font-face { |
|
209 |
font-family: 'w-e-icon'; |
|
210 |
src: url(`+a+`) format('truetype'); |
|
211 |
font-weight: normal; |
|
212 |
font-style: normal; |
|
213 |
} |
|
214 |
[class^="w-e-icon-"], |
|
215 |
[class*=" w-e-icon-"] { |
|
216 |
/* use !important to prevent issues with browser extensions that change fonts */ |
|
217 |
font-family: 'w-e-icon' !important; |
|
218 |
speak: none; |
|
219 |
font-style: normal; |
|
220 |
font-weight: normal; |
|
221 |
font-variant: normal; |
|
222 |
text-transform: none; |
|
223 |
line-height: 1; |
|
224 |
/* Better Font Rendering =========== */ |
|
225 |
-webkit-font-smoothing: antialiased; |
|
226 |
-moz-osx-font-smoothing: grayscale; |
|
227 |
} |
|
228 |
.w-e-icon-close:before { |
|
229 |
content: "\\f00d"; |
|
230 |
} |
|
231 |
.w-e-icon-upload2:before { |
|
232 |
content: "\\e9c6"; |
|
233 |
} |
|
234 |
.w-e-icon-trash-o:before { |
|
235 |
content: "\\f014"; |
|
236 |
} |
|
237 |
.w-e-icon-header:before { |
|
238 |
content: "\\f1dc"; |
|
239 |
} |
|
240 |
.w-e-icon-pencil2:before { |
|
241 |
content: "\\e906"; |
|
242 |
} |
|
243 |
.w-e-icon-paint-brush:before { |
|
244 |
content: "\\f1fc"; |
|
245 |
} |
|
246 |
.w-e-icon-image:before { |
|
247 |
content: "\\e90d"; |
|
248 |
} |
|
249 |
.w-e-icon-play:before { |
|
250 |
content: "\\e912"; |
|
251 |
} |
|
252 |
.w-e-icon-location:before { |
|
253 |
content: "\\e947"; |
|
254 |
} |
|
255 |
.w-e-icon-undo:before { |
|
256 |
content: "\\e965"; |
|
257 |
} |
|
258 |
.w-e-icon-redo:before { |
|
259 |
content: "\\e966"; |
|
260 |
} |
|
261 |
.w-e-icon-quotes-left:before { |
|
262 |
content: "\\e977"; |
|
263 |
} |
|
264 |
.w-e-icon-list-numbered:before { |
|
265 |
content: "\\e9b9"; |
|
266 |
} |
|
267 |
.w-e-icon-list2:before { |
|
268 |
content: "\\e9bb"; |
|
269 |
} |
|
270 |
.w-e-icon-link:before { |
|
271 |
content: "\\e9cb"; |
|
272 |
} |
|
273 |
.w-e-icon-happy:before { |
|
274 |
content: "\\e9df"; |
|
275 |
} |
|
276 |
.w-e-icon-bold:before { |
|
277 |
content: "\\ea62"; |
|
278 |
} |
|
279 |
.w-e-icon-underline:before { |
|
280 |
content: "\\ea63"; |
|
281 |
} |
|
282 |
.w-e-icon-italic:before { |
|
283 |
content: "\\ea64"; |
|
284 |
} |
|
285 |
.w-e-icon-strikethrough:before { |
|
286 |
content: "\\ea65"; |
|
287 |
} |
|
288 |
.w-e-icon-table2:before { |
|
289 |
content: "\\ea71"; |
|
290 |
} |
|
291 |
.w-e-icon-paragraph-left:before { |
|
292 |
content: "\\ea77"; |
|
293 |
} |
|
294 |
.w-e-icon-paragraph-center:before { |
|
295 |
content: "\\ea78"; |
|
296 |
} |
|
297 |
.w-e-icon-paragraph-right:before { |
|
298 |
content: "\\ea79"; |
|
299 |
} |
|
300 |
.w-e-icon-paragraph-justify:before { |
|
301 |
content: "\\ea7a"; |
|
302 |
} |
|
303 |
.w-e-icon-terminal:before { |
|
304 |
content: "\\f120"; |
|
305 |
} |
|
306 |
.w-e-icon-page-break:before { |
|
307 |
content: "\\ea68"; |
|
308 |
} |
|
309 |
.w-e-icon-cancel-circle:before { |
|
310 |
content: "\\ea0d"; |
|
311 |
} |
|
312 |
.w-e-icon-font:before { |
|
313 |
content: "\\ea5c"; |
|
314 |
} |
|
315 |
.w-e-icon-text-heigh:before { |
|
316 |
content: "\\ea5f"; |
|
317 |
} |
|
318 |
.w-e-icon-paint-format:before { |
|
319 |
content: "\\e90c"; |
|
320 |
} |
|
321 |
.w-e-icon-indent-increase:before { |
|
322 |
content: "\\ea7b"; |
|
323 |
} |
|
324 |
.w-e-icon-indent-decrease:before { |
|
325 |
content: "\\ea7c"; |
|
326 |
} |
|
327 |
.w-e-icon-row-height:before { |
|
328 |
content: "\\e9be"; |
|
329 |
} |
|
330 |
.w-e-icon-fullscreen_exit:before { |
|
331 |
content: "\\e900"; |
|
332 |
} |
|
333 |
.w-e-icon-fullscreen:before { |
|
334 |
content: "\\e901"; |
|
335 |
} |
|
336 |
.w-e-icon-split-line:before { |
|
337 |
content: "\\ea0b"; |
|
338 |
} |
|
339 |
.w-e-icon-checkbox-checked:before { |
|
340 |
content: "\\ea52"; |
|
341 |
} |
|
342 |
`,""]),e.exports=t},function(e,t,n){e.exports=function(r,o){return o||(o={}),typeof(r=r&&r.__esModule?r.default:r)!="string"?r:(/^['"].*['"]$/.test(r)&&(r=r.slice(1,-1)),o.hash&&(r+=o.hash),/["'() \t\n]/.test(r)||o.needQuotes?'"'.concat(r.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):r)}},function(e,t,n){n.r(t),t.default="data:font/woff;base64,d09GRgABAAAAABskAAsAAAAAGtgAAAAA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AGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},function(e,t,n){var r=n(20),o=n(153);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-toolbar { |
|
343 |
display: flex; |
|
344 |
padding: 0 6px; |
|
345 |
flex-wrap: wrap; |
|
346 |
position: relative; |
|
347 |
/* \u5355\u4E2A\u83DC\u5355 */ |
|
348 |
} |
|
349 |
.w-e-toolbar .w-e-menu { |
|
350 |
position: relative; |
|
351 |
display: flex; |
|
352 |
width: 40px; |
|
353 |
height: 40px; |
|
354 |
align-items: center; |
|
355 |
justify-content: center; |
|
356 |
text-align: center; |
|
357 |
cursor: pointer; |
|
358 |
} |
|
359 |
.w-e-toolbar .w-e-menu i { |
|
360 |
color: #999; |
|
361 |
} |
|
362 |
.w-e-toolbar .w-e-menu:hover { |
|
363 |
background-color: #F6F6F6; |
|
364 |
} |
|
365 |
.w-e-toolbar .w-e-menu:hover i { |
|
366 |
color: #333; |
|
367 |
} |
|
368 |
.w-e-toolbar .w-e-active i { |
|
369 |
color: #1e88e5; |
|
370 |
} |
|
371 |
.w-e-toolbar .w-e-active:hover i { |
|
372 |
color: #1e88e5; |
|
373 |
} |
|
374 |
.w-e-menu-tooltip { |
|
375 |
position: absolute; |
|
376 |
display: flex; |
|
377 |
color: #f1f1f1; |
|
378 |
background-color: rgba(0, 0, 0, 0.75); |
|
379 |
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); |
|
380 |
border-radius: 4px; |
|
381 |
padding: 4px 5px 6px; |
|
382 |
justify-content: center; |
|
383 |
align-items: center; |
|
384 |
} |
|
385 |
.w-e-menu-tooltip-up::after { |
|
386 |
content: ""; |
|
387 |
position: absolute; |
|
388 |
top: 100%; |
|
389 |
left: 50%; |
|
390 |
margin-left: -5px; |
|
391 |
border: 5px solid rgba(0, 0, 0, 0); |
|
392 |
border-top-color: rgba(0, 0, 0, 0.73); |
|
393 |
} |
|
394 |
.w-e-menu-tooltip-down::after { |
|
395 |
content: ""; |
|
396 |
position: absolute; |
|
397 |
bottom: 100%; |
|
398 |
left: 50%; |
|
399 |
margin-left: -5px; |
|
400 |
border: 5px solid rgba(0, 0, 0, 0); |
|
401 |
border-bottom-color: rgba(0, 0, 0, 0.73); |
|
402 |
} |
|
403 |
.w-e-menu-tooltip-item-wrapper { |
|
404 |
font-size: 14px; |
|
405 |
margin: 0 5px; |
|
406 |
} |
|
407 |
`,""]),e.exports=t},function(e,t,n){var r=n(20),o=n(155);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-text-container { |
|
408 |
position: relative; |
|
409 |
height: 100%; |
|
410 |
} |
|
411 |
.w-e-text-container .w-e-progress { |
|
412 |
position: absolute; |
|
413 |
background-color: #1e88e5; |
|
414 |
top: 0; |
|
415 |
left: 0; |
|
416 |
height: 1px; |
|
417 |
} |
|
418 |
.w-e-text-container .placeholder { |
|
419 |
color: #D4D4D4; |
|
420 |
position: absolute; |
|
421 |
font-size: 11pt; |
|
422 |
line-height: 22px; |
|
423 |
left: 10px; |
|
424 |
top: 10px; |
|
425 |
-webkit-user-select: none; |
|
426 |
-moz-user-select: none; |
|
427 |
-ms-user-select: none; |
|
428 |
user-select: none; |
|
429 |
z-index: -1; |
|
430 |
} |
|
431 |
.w-e-text { |
|
432 |
padding: 0 10px; |
|
433 |
overflow-y: auto; |
|
434 |
} |
|
435 |
.w-e-text p, |
|
436 |
.w-e-text h1, |
|
437 |
.w-e-text h2, |
|
438 |
.w-e-text h3, |
|
439 |
.w-e-text h4, |
|
440 |
.w-e-text h5, |
|
441 |
.w-e-text table, |
|
442 |
.w-e-text pre { |
|
443 |
margin: 10px 0; |
|
444 |
line-height: 1.5; |
|
445 |
} |
|
446 |
.w-e-text ul, |
|
447 |
.w-e-text ol { |
|
448 |
margin: 10px 0 10px 20px; |
|
449 |
} |
|
450 |
.w-e-text blockquote { |
|
451 |
display: block; |
|
452 |
border-left: 8px solid #d0e5f2; |
|
453 |
padding: 5px 10px; |
|
454 |
margin: 10px 0; |
|
455 |
line-height: 1.4; |
|
456 |
font-size: 100%; |
|
457 |
background-color: #f1f1f1; |
|
458 |
} |
|
459 |
.w-e-text code { |
|
460 |
display: inline-block; |
|
461 |
background-color: #f1f1f1; |
|
462 |
border-radius: 3px; |
|
463 |
padding: 3px 5px; |
|
464 |
margin: 0 3px; |
|
465 |
} |
|
466 |
.w-e-text pre code { |
|
467 |
display: block; |
|
468 |
} |
|
469 |
.w-e-text table { |
|
470 |
border-top: 1px solid #ccc; |
|
471 |
border-left: 1px solid #ccc; |
|
472 |
} |
|
473 |
.w-e-text table td, |
|
474 |
.w-e-text table th { |
|
475 |
border-bottom: 1px solid #ccc; |
|
476 |
border-right: 1px solid #ccc; |
|
477 |
padding: 3px 5px; |
|
478 |
min-height: 30px; |
|
479 |
height: 30px; |
|
480 |
} |
|
481 |
.w-e-text table th { |
|
482 |
border-bottom: 2px solid #ccc; |
|
483 |
text-align: center; |
|
484 |
background-color: #f1f1f1; |
|
485 |
} |
|
486 |
.w-e-text:focus { |
|
487 |
outline: none; |
|
488 |
} |
|
489 |
.w-e-text img { |
|
490 |
cursor: pointer; |
|
491 |
} |
|
492 |
.w-e-text img:hover { |
|
493 |
box-shadow: 0 0 5px #333; |
|
494 |
} |
|
495 |
.w-e-text .w-e-todo { |
|
496 |
margin: 0 0 0 20px; |
|
497 |
} |
|
498 |
.w-e-text .w-e-todo li { |
|
499 |
list-style: none; |
|
500 |
font-size: 1em; |
|
501 |
} |
|
502 |
.w-e-text .w-e-todo li span:nth-child(1) { |
|
503 |
position: relative; |
|
504 |
left: -18px; |
|
505 |
} |
|
506 |
.w-e-text .w-e-todo li span:nth-child(1) input { |
|
507 |
position: absolute; |
|
508 |
margin-right: 3px; |
|
509 |
} |
|
510 |
.w-e-text .w-e-todo li span:nth-child(1) input[type=checkbox] { |
|
511 |
top: 50%; |
|
512 |
margin-top: -6px; |
|
513 |
} |
|
514 |
.w-e-tooltip { |
|
515 |
position: absolute; |
|
516 |
display: flex; |
|
517 |
color: #f1f1f1; |
|
518 |
background-color: rgba(0, 0, 0, 0.75); |
|
519 |
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); |
|
520 |
border-radius: 4px; |
|
521 |
padding: 4px 5px 6px; |
|
522 |
justify-content: center; |
|
523 |
align-items: center; |
|
524 |
} |
|
525 |
.w-e-tooltip-up::after { |
|
526 |
content: ""; |
|
527 |
position: absolute; |
|
528 |
top: 100%; |
|
529 |
left: 50%; |
|
530 |
margin-left: -5px; |
|
531 |
border: 5px solid rgba(0, 0, 0, 0); |
|
532 |
border-top-color: rgba(0, 0, 0, 0.73); |
|
533 |
} |
|
534 |
.w-e-tooltip-down::after { |
|
535 |
content: ""; |
|
536 |
position: absolute; |
|
537 |
bottom: 100%; |
|
538 |
left: 50%; |
|
539 |
margin-left: -5px; |
|
540 |
border: 5px solid rgba(0, 0, 0, 0); |
|
541 |
border-bottom-color: rgba(0, 0, 0, 0.73); |
|
542 |
} |
|
543 |
.w-e-tooltip-item-wrapper { |
|
544 |
cursor: pointer; |
|
545 |
font-size: 14px; |
|
546 |
margin: 0 5px; |
|
547 |
} |
|
548 |
.w-e-tooltip-item-wrapper:hover { |
|
549 |
color: #ccc; |
|
550 |
text-decoration: underline; |
|
551 |
} |
|
552 |
`,""]),e.exports=t},function(e,t,n){var r=n(20),o=n(157);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-menu .w-e-panel-container { |
|
553 |
position: absolute; |
|
554 |
top: 0; |
|
555 |
left: 50%; |
|
556 |
border: 1px solid #ccc; |
|
557 |
border-top: 0; |
|
558 |
box-shadow: 1px 1px 2px #ccc; |
|
559 |
color: #333; |
|
560 |
background-color: #fff; |
|
561 |
text-align: left; |
|
562 |
/* \u4E3A emotion panel \u5B9A\u5236\u7684\u6837\u5F0F */ |
|
563 |
/* \u4E0A\u4F20\u56FE\u7247\u3001\u4E0A\u4F20\u89C6\u9891\u7684 panel \u5B9A\u5236\u6837\u5F0F */ |
|
564 |
} |
|
565 |
.w-e-menu .w-e-panel-container .w-e-panel-close { |
|
566 |
position: absolute; |
|
567 |
right: 0; |
|
568 |
top: 0; |
|
569 |
padding: 5px; |
|
570 |
margin: 2px 5px 0 0; |
|
571 |
cursor: pointer; |
|
572 |
color: #999; |
|
573 |
} |
|
574 |
.w-e-menu .w-e-panel-container .w-e-panel-close:hover { |
|
575 |
color: #333; |
|
576 |
} |
|
577 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-title { |
|
578 |
list-style: none; |
|
579 |
display: flex; |
|
580 |
font-size: 14px; |
|
581 |
margin: 2px 10px 0 10px; |
|
582 |
border-bottom: 1px solid #f1f1f1; |
|
583 |
} |
|
584 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-item { |
|
585 |
padding: 3px 5px; |
|
586 |
color: #999; |
|
587 |
cursor: pointer; |
|
588 |
margin: 0 3px; |
|
589 |
position: relative; |
|
590 |
top: 1px; |
|
591 |
} |
|
592 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-active { |
|
593 |
color: #333; |
|
594 |
border-bottom: 1px solid #333; |
|
595 |
cursor: default; |
|
596 |
font-weight: 700; |
|
597 |
} |
|
598 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content { |
|
599 |
padding: 10px 15px 10px 15px; |
|
600 |
font-size: 16px; |
|
601 |
/* \u8F93\u5165\u6846\u7684\u6837\u5F0F */ |
|
602 |
/* \u6309\u94AE\u7684\u6837\u5F0F */ |
|
603 |
} |
|
604 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input:focus, |
|
605 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus, |
|
606 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content button:focus { |
|
607 |
outline: none; |
|
608 |
} |
|
609 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea { |
|
610 |
width: 100%; |
|
611 |
border: 1px solid #ccc; |
|
612 |
padding: 5px; |
|
613 |
margin-top: 10px; |
|
614 |
} |
|
615 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus { |
|
616 |
border-color: #1e88e5; |
|
617 |
} |
|
618 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text] { |
|
619 |
border: none; |
|
620 |
border-bottom: 1px solid #ccc; |
|
621 |
font-size: 14px; |
|
622 |
height: 20px; |
|
623 |
color: #333; |
|
624 |
text-align: left; |
|
625 |
} |
|
626 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].small { |
|
627 |
width: 30px; |
|
628 |
text-align: center; |
|
629 |
} |
|
630 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].block { |
|
631 |
display: block; |
|
632 |
width: 100%; |
|
633 |
margin: 10px 0; |
|
634 |
} |
|
635 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { |
|
636 |
border-bottom: 2px solid #1e88e5; |
|
637 |
} |
|
638 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { |
|
639 |
font-size: 14px; |
|
640 |
color: #1e88e5; |
|
641 |
border: none; |
|
642 |
padding: 5px 10px; |
|
643 |
background-color: #fff; |
|
644 |
cursor: pointer; |
|
645 |
border-radius: 3px; |
|
646 |
} |
|
647 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { |
|
648 |
float: left; |
|
649 |
margin-right: 10px; |
|
650 |
} |
|
651 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { |
|
652 |
float: right; |
|
653 |
margin-left: 10px; |
|
654 |
} |
|
655 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { |
|
656 |
color: #999; |
|
657 |
} |
|
658 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { |
|
659 |
color: #c24f4a; |
|
660 |
} |
|
661 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { |
|
662 |
background-color: #f1f1f1; |
|
663 |
} |
|
664 |
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { |
|
665 |
content: ""; |
|
666 |
display: table; |
|
667 |
clear: both; |
|
668 |
} |
|
669 |
.w-e-menu .w-e-panel-container .w-e-emoticon-container .w-e-item { |
|
670 |
cursor: pointer; |
|
671 |
font-size: 18px; |
|
672 |
padding: 0 3px; |
|
673 |
display: inline-block; |
|
674 |
} |
|
675 |
.w-e-menu .w-e-panel-container .w-e-up-img-container, |
|
676 |
.w-e-menu .w-e-panel-container .w-e-up-video-container { |
|
677 |
text-align: center; |
|
678 |
} |
|
679 |
.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn, |
|
680 |
.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn { |
|
681 |
display: inline-block; |
|
682 |
color: #999; |
|
683 |
cursor: pointer; |
|
684 |
font-size: 60px; |
|
685 |
line-height: 1; |
|
686 |
} |
|
687 |
.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover, |
|
688 |
.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn:hover { |
|
689 |
color: #333; |
|
690 |
} |
|
691 |
`,""]),e.exports=t},function(e,t,n){var r=n(20),o=n(159);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-toolbar .w-e-droplist { |
|
692 |
position: absolute; |
|
693 |
left: 0; |
|
694 |
top: 0; |
|
695 |
background-color: #fff; |
|
696 |
border: 1px solid #f1f1f1; |
|
697 |
border-right-color: #ccc; |
|
698 |
border-bottom-color: #ccc; |
|
699 |
} |
|
700 |
.w-e-toolbar .w-e-droplist .w-e-dp-title { |
|
701 |
text-align: center; |
|
702 |
color: #999; |
|
703 |
line-height: 2; |
|
704 |
border-bottom: 1px solid #f1f1f1; |
|
705 |
font-size: 13px; |
|
706 |
} |
|
707 |
.w-e-toolbar .w-e-droplist ul.w-e-list { |
|
708 |
list-style: none; |
|
709 |
line-height: 1; |
|
710 |
} |
|
711 |
.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { |
|
712 |
color: #333; |
|
713 |
padding: 5px 0; |
|
714 |
} |
|
715 |
.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { |
|
716 |
background-color: #f1f1f1; |
|
717 |
} |
|
718 |
.w-e-toolbar .w-e-droplist ul.w-e-block { |
|
719 |
list-style: none; |
|
720 |
text-align: left; |
|
721 |
padding: 5px; |
|
722 |
} |
|
723 |
.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { |
|
724 |
display: inline-block; |
|
725 |
padding: 3px 5px; |
|
726 |
} |
|
727 |
.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { |
|
728 |
background-color: #f1f1f1; |
|
729 |
} |
|
730 |
`,""]),e.exports=t},function(e,t,n){var r=n(0)(n(161));Element.prototype.matches||(Element.prototype.matches=function(o){for(var i=this.ownerDocument.querySelectorAll(o),a=i.length;a>=0&&i.item(a)!==this;a--);return a>-1}),r.default||(window.Promise=r.default)},function(e,t,n){e.exports=n(162)},function(e,t,n){var r=n(163);e.exports=r},function(e,t,n){n(61),n(50),n(54),n(175),n(178),n(179);var r=n(9);e.exports=r.Promise},function(e,t,n){var r=n(62),o=n(49),i=function(a){return function(l,s){var u,c,d=String(o(l)),f=r(s),p=d.length;return f<0||f>=p?a?"":void 0:(u=d.charCodeAt(f))<55296||u>56319||f+1===p||(c=d.charCodeAt(f+1))<56320||c>57343?a?d.charAt(f):u:a?d.slice(f,f+2):c-56320+(u-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){var r=n(8),o=n(101),i=r.WeakMap;e.exports=typeof i=="function"&&/native code/.test(o(i))},function(e,t,n){var r=n(8),o=n(19);e.exports=function(i,a){try{o(r,i,a)}catch{r[i]=a}return a}},function(e,t,n){var r=n(103).IteratorPrototype,o=n(77),i=n(48),a=n(36),l=n(43),s=function(){return this};e.exports=function(u,c,d){var f=c+" Iterator";return u.prototype=o(r,{next:i(1,d)}),a(u,f,!1,!0),l[f]=s,u}},function(e,t,n){var r=n(11);e.exports=!r(function(){function o(){}return o.prototype.constructor=null,Object.getPrototypeOf(new o)!==o.prototype})},function(e,t,n){var r=n(14),o=n(18),i=n(25),a=n(52);e.exports=r?Object.defineProperties:function(l,s){i(l);for(var u,c=a(s),d=c.length,f=0;d>f;)o.f(l,u=c[f++],s[u]);return l}},function(e,t,n){var r=n(81),o=n(65);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){var r=n(25),o=n(172);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i,a=!1,l={};try{(i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(l,[]),a=l instanceof Array}catch{}return function(s,u){return r(s),o(u),a?i.call(s,u):s.__proto__=u,s}}():void 0)},function(e,t,n){var r=n(13);e.exports=function(o){if(!r(o)&&o!==null)throw TypeError("Can't set "+String(o)+" as a prototype");return o}},function(e,t,n){var r=n(28),o=n(82),i=n(43),a=n(41),l=n(75),s="Array Iterator",u=a.set,c=a.getterFor(s);e.exports=l(Array,"Array",function(d,f){u(this,{type:s,target:r(d),index:0,kind:f})},function(){var d=c(this),f=d.target,p=d.kind,m=d.index++;return!f||m>=f.length?(d.target=void 0,{value:void 0,done:!0}):p=="keys"?{value:m,done:!1}:p=="values"?{value:f[m],done:!1}:{value:[m,f[m]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r,o,i,a,l=n(5),s=n(42),u=n(8),c=n(35),d=n(108),f=n(53),p=n(109),m=n(36),v=n(110),g=n(13),b=n(40),y=n(83),w=n(33),x=n(101),_=n(66),E=n(114),C=n(115),T=n(116).set,k=n(176),I=n(118),O=n(177),F=n(85),N=n(119),B=n(41),L=n(100),V=n(10),P=n(86),H=V("species"),U="Promise",G=B.get,z=B.set,$=B.getterFor(U),W=d,K=u.TypeError,X=u.document,te=u.process,ne=c("fetch"),se=F.f,le=se,J=w(te)=="process",Z=!!(X&&X.createEvent&&u.dispatchEvent),ye="unhandledrejection",be="rejectionhandled",ve=0,Ae=1,Ce=2,_e=1,ke=2,Be=L(U,function(){if(x(W)===String(W)&&(P===66||!J&&typeof PromiseRejectionEvent!="function")||s&&!W.prototype.finally)return!0;if(P>=51&&/native code/.test(W))return!1;var je=W.resolve(1),we=function(ze){ze(function(){},function(){})};return(je.constructor={})[H]=we,!(je.then(function(){})instanceof we)}),$e=Be||!E(function(je){W.all(je).catch(function(){})}),rt=function(je){var we;return!(!g(je)||typeof(we=je.then)!="function")&&we},ge=function(je,we,ze){if(!we.notified){we.notified=!0;var me=we.reactions;k(function(){for(var Me=we.value,Ie=we.state==Ae,ht=0;me.length>ht;){var gt,vt,qt,mn=me[ht++],Zt=Ie?mn.ok:mn.fail,rn=mn.resolve,zn=mn.reject,tt=mn.domain;try{Zt?(Ie||(we.rejection===ke&&Ve(je,we),we.rejection=_e),Zt===!0?gt=Me:(tt&&tt.enter(),gt=Zt(Me),tt&&(tt.exit(),qt=!0)),gt===mn.promise?zn(K("Promise-chain cycle")):(vt=rt(gt))?vt.call(gt,rn,zn):rn(gt)):zn(Me)}catch(kt){tt&&!qt&&tt.exit(),zn(kt)}}we.reactions=[],we.notified=!1,ze&&!we.rejection&&st(je,we)})}},We=function(je,we,ze){var me,Me;Z?((me=X.createEvent("Event")).promise=we,me.reason=ze,me.initEvent(je,!1,!0),u.dispatchEvent(me)):me={promise:we,reason:ze},(Me=u["on"+je])?Me(me):je===ye&&O("Unhandled promise rejection",ze)},st=function(je,we){T.call(u,function(){var ze,me=we.value;if(At(we)&&(ze=N(function(){J?te.emit("unhandledRejection",me,je):We(ye,je,me)}),we.rejection=J||At(we)?ke:_e,ze.error))throw ze.value})},At=function(je){return je.rejection!==_e&&!je.parent},Ve=function(je,we){T.call(u,function(){J?te.emit("rejectionHandled",je):We(be,je,we.value)})},it=function(je,we,ze,me){return function(Me){je(we,ze,Me,me)}},dt=function(je,we,ze,me){we.done||(we.done=!0,me&&(we=me),we.value=ze,we.state=Ce,ge(je,we,!0))},ot=function je(we,ze,me,Me){if(!ze.done){ze.done=!0,Me&&(ze=Me);try{if(we===me)throw K("Promise can't be resolved itself");var Ie=rt(me);Ie?k(function(){var ht={done:!1};try{Ie.call(me,it(je,we,ht,ze),it(dt,we,ht,ze))}catch(gt){dt(we,ht,gt,ze)}}):(ze.value=me,ze.state=Ae,ge(we,ze,!1))}catch(ht){dt(we,{done:!1},ht,ze)}}};Be&&(W=function(je){y(this,W,U),b(je),r.call(this);var we=G(this);try{je(it(ot,this,we),it(dt,this,we))}catch(ze){dt(this,we,ze)}},(r=function(je){z(this,{type:U,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:ve,value:void 0})}).prototype=p(W.prototype,{then:function(je,we){var ze=$(this),me=se(C(this,W));return me.ok=typeof je!="function"||je,me.fail=typeof we=="function"&&we,me.domain=J?te.domain:void 0,ze.parent=!0,ze.reactions.push(me),ze.state!=ve&&ge(this,ze,!1),me.promise},catch:function(je){return this.then(void 0,je)}}),o=function(){var je=new r,we=G(je);this.promise=je,this.resolve=it(ot,je,we),this.reject=it(dt,je,we)},F.f=se=function(je){return je===W||je===i?new o(je):le(je)},!s&&typeof d=="function"&&(a=d.prototype.then,f(d.prototype,"then",function(je,we){var ze=this;return new W(function(me,Me){a.call(ze,me,Me)}).then(je,we)},{unsafe:!0}),typeof ne=="function"&&l({global:!0,enumerable:!0,forced:!0},{fetch:function(je){return I(W,ne.apply(u,arguments))}}))),l({global:!0,wrap:!0,forced:Be},{Promise:W}),m(W,U,!1,!0),v(U),i=c(U),l({target:U,stat:!0,forced:Be},{reject:function(je){var we=se(this);return we.reject.call(void 0,je),we.promise}}),l({target:U,stat:!0,forced:s||Be},{resolve:function(je){return I(s&&this===i?W:this,je)}}),l({target:U,stat:!0,forced:$e},{all:function(je){var we=this,ze=se(we),me=ze.resolve,Me=ze.reject,Ie=N(function(){var ht=b(we.resolve),gt=[],vt=0,qt=1;_(je,function(mn){var Zt=vt++,rn=!1;gt.push(void 0),qt++,ht.call(we,mn).then(function(zn){rn||(rn=!0,gt[Zt]=zn,--qt||me(gt))},Me)}),--qt||me(gt)});return Ie.error&&Me(Ie.value),ze.promise},race:function(je){var we=this,ze=se(we),me=ze.reject,Me=N(function(){var Ie=b(we.resolve);_(je,function(ht){Ie.call(we,ht).then(ze.resolve,me)})});return Me.error&&me(Me.value),ze.promise}})},function(e,t,n){var r,o,i,a,l,s,u,c,d=n(8),f=n(71).f,p=n(33),m=n(116).set,v=n(117),g=d.MutationObserver||d.WebKitMutationObserver,b=d.process,y=d.Promise,w=p(b)=="process",x=f(d,"queueMicrotask"),_=x&&x.value;_||(r=function(){var E,C;for(w&&(E=b.domain)&&E.exit();o;){C=o.fn,o=o.next;try{C()}catch(T){throw o?a():i=void 0,T}}i=void 0,E&&E.enter()},w?a=function(){b.nextTick(r)}:g&&!v?(l=!0,s=document.createTextNode(""),new g(r).observe(s,{characterData:!0}),a=function(){s.data=l=!l}):y&&y.resolve?(u=y.resolve(void 0),c=u.then,a=function(){c.call(u,r)}):a=function(){m.call(d,r)}),e.exports=_||function(E){var C={fn:E,next:void 0};i&&(i.next=C),o||(o=C,a()),i=C}},function(e,t,n){var r=n(8);e.exports=function(o,i){var a=r.console;a&&a.error&&(arguments.length===1?a.error(o):a.error(o,i))}},function(e,t,n){var r=n(5),o=n(40),i=n(85),a=n(119),l=n(66);r({target:"Promise",stat:!0},{allSettled:function(s){var u=this,c=i.f(u),d=c.resolve,f=c.reject,p=a(function(){var m=o(u.resolve),v=[],g=0,b=1;l(s,function(y){var w=g++,x=!1;v.push(void 0),b++,m.call(u,y).then(function(_){x||(x=!0,v[w]={status:"fulfilled",value:_},--b||d(v))},function(_){x||(x=!0,v[w]={status:"rejected",reason:_},--b||d(v))})}),--b||d(v)});return p.error&&f(p.value),c.promise}})},function(e,t,n){var r=n(5),o=n(42),i=n(108),a=n(11),l=n(35),s=n(115),u=n(118),c=n(53);r({target:"Promise",proto:!0,real:!0,forced:!!i&&a(function(){i.prototype.finally.call({then:function(){}},function(){})})},{finally:function(d){var f=s(this,l("Promise")),p=typeof d=="function";return this.then(p?function(m){return u(f,d()).then(function(){return m})}:d,p?function(m){return u(f,d()).then(function(){throw m})}:d)}}),!o&&typeof i=="function"&&!i.prototype.finally&&c(i.prototype,"finally",l("Promise").prototype.finally)},function(e,t,n){n(54);var r=n(181),o=n(65),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};e.exports=function(l){var s=l.forEach;return l===i||l instanceof Array&&s===i.forEach||a.hasOwnProperty(o(l))?r:s}},function(e,t,n){var r=n(182);e.exports=r},function(e,t,n){n(183);var r=n(15);e.exports=r("Array").forEach},function(e,t,n){var r=n(5),o=n(184);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){var r=n(30).forEach,o=n(67),i=n(22),a=o("forEach"),l=i("forEach");e.exports=a&&l?[].forEach:function(s){return r(this,s,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var r=n(186);e.exports=r},function(e,t,n){n(187);var r=n(9);e.exports=r.Array.isArray},function(e,t,n){n(5)({target:"Array",stat:!0},{isArray:n(55)})},function(e,t,n){var r=n(189);e.exports=r},function(e,t,n){var r=n(190),o=Array.prototype;e.exports=function(i){var a=i.map;return i===o||i instanceof Array&&a===o.map?r:a}},function(e,t,n){n(191);var r=n(15);e.exports=r("Array").map},function(e,t,n){var r=n(5),o=n(30).map,i=n(56),a=n(22),l=i("map"),s=a("map");r({target:"Array",proto:!0,forced:!l||!s},{map:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(193);e.exports=r},function(e,t,n){var r=n(194),o=String.prototype;e.exports=function(i){var a=i.trim;return typeof i=="string"||i===o||i instanceof String&&a===o.trim?r:a}},function(e,t,n){n(195);var r=n(15);e.exports=r("String").trim},function(e,t,n){var r=n(5),o=n(90).trim;r({target:"String",proto:!0,forced:n(196)("trim")},{trim:function(){return o(this)}})},function(e,t,n){var r=n(11),o=n(68),i="\u200B\x85\u180E";e.exports=function(a){return r(function(){return!!o[a]()||i[a]()!=i||o[a].name!==a})}},function(e,t,n){var r=n(198);e.exports=r},function(e,t,n){n(199),n(61),n(50),n(54);var r=n(9);e.exports=r.Map},function(e,t,n){var r=n(121),o=n(123);e.exports=r("Map",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},o)},function(e,t,n){var r=n(11);e.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(e,t,n){var r=n(202);e.exports=r},function(e,t,n){var r=n(203),o=Array.prototype;e.exports=function(i){var a=i.indexOf;return i===o||i instanceof Array&&a===o.indexOf?r:a}},function(e,t,n){n(204);var r=n(15);e.exports=r("Array").indexOf},function(e,t,n){var r=n(5),o=n(78).indexOf,i=n(67),a=n(22),l=[].indexOf,s=!!l&&1/[1].indexOf(1,-0)<0,u=i("indexOf"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:s||!u||!c},{indexOf:function(d){return s?l.apply(this,arguments)||0:o(this,d,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(206);e.exports=r},function(e,t,n){var r=n(207),o=Array.prototype;e.exports=function(i){var a=i.splice;return i===o||i instanceof Array&&a===o.splice?r:a}},function(e,t,n){n(208);var r=n(15);e.exports=r("Array").splice},function(e,t,n){var r=n(5),o=n(79),i=n(62),a=n(34),l=n(29),s=n(88),u=n(69),c=n(56),d=n(22),f=c("splice"),p=d("splice",{ACCESSORS:!0,0:0,1:2}),m=Math.max,v=Math.min,g=9007199254740991,b="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!f||!p},{splice:function(y,w){var x,_,E,C,T,k,I=l(this),O=a(I.length),F=o(y,O),N=arguments.length;if(N===0?x=_=0:N===1?(x=0,_=O-F):(x=N-2,_=v(m(i(w),0),O-F)),O+x-_>g)throw TypeError(b);for(E=s(I,_),C=0;C<_;C++)(T=F+C)in I&&u(E,C,I[T]);if(E.length=_,x<_){for(C=F;C<O-_;C++)k=C+x,(T=C+_)in I?I[k]=I[T]:delete I[k];for(C=O;C>O-_+x;C--)delete I[C-1]}else if(x>_)for(C=O-_;C>F;C--)k=C+x-1,(T=C+_-1)in I?I[k]=I[T]:delete I[k];for(C=0;C<x;C++)I[C+F]=arguments[C+2];return I.length=O-_+x,E}})},function(e,t,n){var r=n(210);e.exports=r},function(e,t,n){var r=n(211),o=Array.prototype;e.exports=function(i){var a=i.filter;return i===o||i instanceof Array&&a===o.filter?r:a}},function(e,t,n){n(212);var r=n(15);e.exports=r("Array").filter},function(e,t,n){var r=n(5),o=n(30).filter,i=n(56),a=n(22),l=i("filter"),s=a("filter");r({target:"Array",proto:!0,forced:!l||!s},{filter:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(214);e.exports=r},function(e,t,n){var r=n(215),o=n(217),i=Array.prototype,a=String.prototype;e.exports=function(l){var s=l.includes;return l===i||l instanceof Array&&s===i.includes?r:typeof l=="string"||l===a||l instanceof String&&s===a.includes?o:s}},function(e,t,n){n(216);var r=n(15);e.exports=r("Array").includes},function(e,t,n){var r=n(5),o=n(78).includes,i=n(82);r({target:"Array",proto:!0,forced:!n(22)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(a){return o(this,a,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,n){n(218);var r=n(15);e.exports=r("String").includes},function(e,t,n){var r=n(5),o=n(219),i=n(49);r({target:"String",proto:!0,forced:!n(221)("includes")},{includes:function(a){return!!~String(i(this)).indexOf(o(a),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(220);e.exports=function(o){if(r(o))throw TypeError("The method doesn't accept regular expressions");return o}},function(e,t,n){var r=n(13),o=n(33),i=n(10)("match");e.exports=function(a){var l;return r(a)&&((l=a[i])!==void 0?!!l:o(a)=="RegExp")}},function(e,t,n){var r=n(10)("match");e.exports=function(o){var i=/./;try{"/./"[o](i)}catch{try{return i[r]=!1,"/./"[o](i)}catch{}}return!1}},function(e,t,n){var r=n(223);e.exports=r},function(e,t,n){var r=n(224),o=Function.prototype;e.exports=function(i){var a=i.bind;return i===o||i instanceof Function&&a===o.bind?r:a}},function(e,t,n){n(225);var r=n(15);e.exports=r("Function").bind},function(e,t,n){n(5)({target:"Function",proto:!0},{bind:n(226)})},function(e,t,n){var r=n(40),o=n(13),i=[].slice,a={},l=function(s,u,c){if(!(u in a)){for(var d=[],f=0;f<u;f++)d[f]="a["+f+"]";a[u]=Function("C,a","return new C("+d.join(",")+")")}return a[u](s,c)};e.exports=Function.bind||function(s){var u=r(this),c=i.call(arguments,1),d=function(){var f=c.concat(i.call(arguments));return this instanceof d?l(u,f.length,f):u.apply(s,f)};return o(u.prototype)&&(d.prototype=u.prototype),d}},function(e,t,n){e.exports=n(228)},function(e,t,n){var r=n(229);e.exports=r},function(e,t,n){n(124),n(50),n(54);var r=n(93);e.exports=r.f("iterator")},function(e,t,n){e.exports=n(231)},function(e,t,n){var r=n(232);n(251),n(252),n(253),n(254),n(255),e.exports=r},function(e,t,n){n(233),n(61),n(234),n(236),n(237),n(238),n(239),n(124),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250);var r=n(9);e.exports=r.Symbol},function(e,t,n){var r=n(5),o=n(11),i=n(55),a=n(13),l=n(29),s=n(34),u=n(69),c=n(88),d=n(56),f=n(10),p=n(86),m=f("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",b=p>=51||!o(function(){var x=[];return x[m]=!1,x.concat()[0]!==x}),y=d("concat"),w=function(x){if(!a(x))return!1;var _=x[m];return _!==void 0?!!_:i(x)};r({target:"Array",proto:!0,forced:!b||!y},{concat:function(x){var _,E,C,T,k,I=l(this),O=c(I,0),F=0;for(_=-1,C=arguments.length;_<C;_++)if(w(k=_===-1?I:arguments[_])){if(F+(T=s(k.length))>v)throw TypeError(g);for(E=0;E<T;E++,F++)E in k&&u(O,F,k[E])}else{if(F>=v)throw TypeError(g);u(O,F++,k)}return O.length=F,O}})},function(e,t,n){var r=n(5),o=n(8),i=n(35),a=n(42),l=n(14),s=n(76),u=n(105),c=n(11),d=n(16),f=n(55),p=n(13),m=n(25),v=n(29),g=n(28),b=n(60),y=n(48),w=n(77),x=n(52),_=n(125),E=n(235),C=n(126),T=n(71),k=n(18),I=n(59),O=n(19),F=n(53),N=n(74),B=n(63),L=n(51),V=n(64),P=n(10),H=n(93),U=n(12),G=n(36),z=n(41),$=n(30).forEach,W=B("hidden"),K="Symbol",X="prototype",te=P("toPrimitive"),ne=z.set,se=z.getterFor(K),le=Object[X],J=o.Symbol,Z=i("JSON","stringify"),ye=T.f,be=k.f,ve=E.f,Ae=I.f,Ce=N("symbols"),_e=N("op-symbols"),ke=N("string-to-symbol-registry"),Be=N("symbol-to-string-registry"),$e=N("wks"),rt=o.QObject,ge=!rt||!rt[X]||!rt[X].findChild,We=l&&c(function(){return w(be({},"a",{get:function(){return be(this,"a",{value:7}).a}})).a!=7})?function(Me,Ie,ht){var gt=ye(le,Ie);gt&&delete le[Ie],be(Me,Ie,ht),gt&&Me!==le&&be(le,Ie,gt)}:be,st=function(Me,Ie){var ht=Ce[Me]=w(J[X]);return ne(ht,{type:K,tag:Me,description:Ie}),l||(ht.description=Ie),ht},At=u?function(Me){return Qi(Me)=="symbol"}:function(Me){return Object(Me)instanceof J},Ve=function(Me,Ie,ht){Me===le&&Ve(_e,Ie,ht),m(Me);var gt=b(Ie,!0);return m(ht),d(Ce,gt)?(ht.enumerable?(d(Me,W)&&Me[W][gt]&&(Me[W][gt]=!1),ht=w(ht,{enumerable:y(0,!1)})):(d(Me,W)||be(Me,W,y(1,{})),Me[W][gt]=!0),We(Me,gt,ht)):be(Me,gt,ht)},it=function(Me,Ie){m(Me);var ht=g(Ie),gt=x(ht).concat(ze(ht));return $(gt,function(vt){(!l||ot.call(ht,vt))&&Ve(Me,vt,ht[vt])}),Me},dt=function(Me,Ie){return Ie===void 0?w(Me):it(w(Me),Ie)},ot=function(Me){var Ie=b(Me,!0),ht=Ae.call(this,Ie);return!(this===le&&d(Ce,Ie)&&!d(_e,Ie))&&(!(ht||!d(this,Ie)||!d(Ce,Ie)||d(this,W)&&this[W][Ie])||ht)},je=function(Me,Ie){var ht=g(Me),gt=b(Ie,!0);if(ht!==le||!d(Ce,gt)||d(_e,gt)){var vt=ye(ht,gt);return vt&&d(Ce,gt)&&!(d(ht,W)&&ht[W][gt])&&(vt.enumerable=!0),vt}},we=function(Me){var Ie=ve(g(Me)),ht=[];return $(Ie,function(gt){!d(Ce,gt)&&!d(L,gt)&&ht.push(gt)}),ht},ze=function(Me){var Ie=Me===le,ht=ve(Ie?_e:g(Me)),gt=[];return $(ht,function(vt){d(Ce,vt)&&(!Ie||d(le,vt))&>.push(Ce[vt])}),gt};if(s||(J=function(){if(this instanceof J)throw TypeError("Symbol is not a constructor");var Me=arguments.length&&arguments[0]!==void 0?String(arguments[0]):void 0,Ie=V(Me),ht=function gt(vt){this===le&>.call(_e,vt),d(this,W)&&d(this[W],Ie)&&(this[W][Ie]=!1),We(this,Ie,y(1,vt))};return l&&ge&&We(le,Ie,{configurable:!0,set:ht}),st(Ie,Me)},F(J[X],"toString",function(){return se(this).tag}),F(J,"withoutSetter",function(Me){return st(V(Me),Me)}),I.f=ot,k.f=Ve,T.f=je,_.f=E.f=we,C.f=ze,H.f=function(Me){return st(P(Me),Me)},l&&(be(J[X],"description",{configurable:!0,get:function(){return se(this).description}}),a||F(le,"propertyIsEnumerable",ot,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:J}),$(x($e),function(Me){U(Me)}),r({target:K,stat:!0,forced:!s},{for:function(Me){var Ie=String(Me);if(d(ke,Ie))return ke[Ie];var ht=J(Ie);return ke[Ie]=ht,Be[ht]=Ie,ht},keyFor:function(Me){if(!At(Me))throw TypeError(Me+" is not a symbol");if(d(Be,Me))return Be[Me]},useSetter:function(){ge=!0},useSimple:function(){ge=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!l},{create:dt,defineProperty:Ve,defineProperties:it,getOwnPropertyDescriptor:je}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:we,getOwnPropertySymbols:ze}),r({target:"Object",stat:!0,forced:c(function(){C.f(1)})},{getOwnPropertySymbols:function(Me){return C.f(v(Me))}}),Z){var me=!s||c(function(){var Me=J();return Z([Me])!="[null]"||Z({a:Me})!="{}"||Z(Object(Me))!="{}"});r({target:"JSON",stat:!0,forced:me},{stringify:function(Me,Ie,ht){for(var gt,vt=[Me],qt=1;arguments.length>qt;)vt.push(arguments[qt++]);if(gt=Ie,(p(Ie)||Me!==void 0)&&!At(Me))return f(Ie)||(Ie=function(mn,Zt){if(typeof gt=="function"&&(Zt=gt.call(this,mn,Zt)),!At(Zt))return Zt}),vt[1]=Ie,Z.apply(null,vt)}})}J[X][te]||O(J[X],te,J[X].valueOf),G(J,K),L[W]=!0},function(e,t,n){var r=n(28),o=n(125).f,i={}.toString,a=(typeof window>"u"?"undefined":Qi(window))=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(s){try{return o(s)}catch{return a.slice()}};e.exports.f=function(s){return a&&i.call(s)=="[object Window]"?l(s):o(r(s))}},function(e,t,n){n(12)("asyncIterator")},function(e,t){},function(e,t,n){n(12)("hasInstance")},function(e,t,n){n(12)("isConcatSpreadable")},function(e,t,n){n(12)("match")},function(e,t,n){n(12)("matchAll")},function(e,t,n){n(12)("replace")},function(e,t,n){n(12)("search")},function(e,t,n){n(12)("species")},function(e,t,n){n(12)("split")},function(e,t,n){n(12)("toPrimitive")},function(e,t,n){n(12)("toStringTag")},function(e,t,n){n(12)("unscopables")},function(e,t,n){n(36)(Math,"Math",!0)},function(e,t,n){var r=n(8);n(36)(r.JSON,"JSON",!0)},function(e,t,n){n(12)("asyncDispose")},function(e,t,n){n(12)("dispose")},function(e,t,n){n(12)("observable")},function(e,t,n){n(12)("patternMatch")},function(e,t,n){n(12)("replaceAll")},function(e,t,n){e.exports=n(257)},function(e,t,n){var r=n(258);e.exports=r},function(e,t,n){n(259);var r=n(9);e.exports=r.parseInt},function(e,t,n){var r=n(5),o=n(260);r({global:!0,forced:parseInt!=o},{parseInt:o})},function(e,t,n){var r=n(8),o=n(90).trim,i=n(68),a=r.parseInt,l=/^[+-]?0[Xx]/,s=a(i+"08")!==8||a(i+"0x16")!==22;e.exports=s?function(u,c){var d=o(String(u));return a(d,c>>>0||(l.test(d)?16:10))}:a},function(e,t,n){var r=n(262);e.exports=r},function(e,t,n){var r=n(263),o=Array.prototype;e.exports=function(i){var a=i.slice;return i===o||i instanceof Array&&a===o.slice?r:a}},function(e,t,n){n(264);var r=n(15);e.exports=r("Array").slice},function(e,t,n){var r=n(5),o=n(13),i=n(55),a=n(79),l=n(34),s=n(28),u=n(69),c=n(10),d=n(56),f=n(22),p=d("slice"),m=f("slice",{ACCESSORS:!0,0:0,1:2}),v=c("species"),g=[].slice,b=Math.max;r({target:"Array",proto:!0,forced:!p||!m},{slice:function(y,w){var x,_,E,C=s(this),T=l(C.length),k=a(y,T),I=a(w===void 0?T:w,T);if(i(C)&&(typeof(x=C.constructor)!="function"||x!==Array&&!i(x.prototype)?o(x)&&(x=x[v])===null&&(x=void 0):x=void 0,x===Array||x===void 0))return g.call(C,k,I);for(_=new(x===void 0?Array:x)(b(I-k,0)),E=0;k<I;k++,E++)k in C&&u(_,E,C[k]);return _.length=E,_}})},function(e,t,n){n(266);var r=n(9);e.exports=r.setTimeout},function(e,t,n){var r=n(5),o=n(8),i=n(84),a=[].slice,l=function(s){return function(u,c){var d=arguments.length>2,f=d?a.call(arguments,2):void 0;return s(d?function(){(typeof u=="function"?u:Function(u)).apply(this,f)}:u,c)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(127));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(272)),s=a.__importDefault(n(273)),u=a.__importDefault(n(128)),c=a.__importDefault(n(274)),d=a.__importDefault(n(275)),f=a.__importDefault(n(276)),p=a.__importDefault(n(129)),m=a.__importDefault(n(277)),v=a.__importDefault(n(278)),g=a.__importDefault(n(279)),b=(0,i.default)({},l.default,s.default,u.default,d.default,c.default,f.default,p.default,m.default,v.default,g.default,{linkCheck:function(y,w){return!0}});t.default=b},function(e,t,n){var r=n(269);e.exports=r},function(e,t,n){n(270);var r=n(9);e.exports=r.Object.assign},function(e,t,n){var r=n(5),o=n(271);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(14),o=n(11),i=n(52),a=n(126),l=n(59),s=n(29),u=n(72),c=Object.assign,d=Object.defineProperty;e.exports=!c||o(function(){if(r&&c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var f={},p={},m=Symbol(),v="abcdefghijklmnopqrst";return f[m]=7,v.split("").forEach(function(g){p[g]=g}),c({},f)[m]!=7||i(c({},p)).join("")!=v})?function(f,p){for(var m=s(f),v=arguments.length,g=1,b=a.f,y=l.f;v>g;)for(var w,x=u(arguments[g++]),_=b?i(x).concat(b(x)):i(x),E=_.length,C=0;E>C;)w=_[C++],(!r||y.call(x,w))&&(m[w]=x[w]);return m}:c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={menus:["head","bold","fontSize","fontName","italic","underline","strikeThrough","indent","lineHeight","foreColor","backColor","link","list","todo","justify","quote","emoticon","image","video","table","code","splitLine","undo","redo"],fontNames:["\u9ED1\u4F53","\u4EFF\u5B8B","\u6977\u4F53","\u6807\u6977\u4F53","\u534E\u6587\u4EFF\u5B8B","\u534E\u6587\u6977\u4F53","\u5B8B\u4F53","\u5FAE\u8F6F\u96C5\u9ED1","Arial","Tahoma","Verdana","Times New Roman","Courier New"],fontSizes:{"x-small":{name:"10px",value:"1"},small:{name:"13px",value:"2"},normal:{name:"16px",value:"3"},large:{name:"18px",value:"4"},"x-large":{name:"24px",value:"5"},"xx-large":{name:"32px",value:"6"},"xxx-large":{name:"48px",value:"7"}},colors:["#000000","#ffffff","#eeece0","#1c487f","#4d80bf","#c24f4a","#8baa4a","#7b5ba1","#46acc8","#f9963b"],languageType:["Bash","C","C#","C++","CSS","Java","JavaScript","JSON","TypeScript","Plain text","Html","XML","SQL","Go","Kotlin","Lua","Markdown","PHP","Python","Shell Session","Ruby"],languageTab:"\u3000\u3000\u3000\u3000",emotions:[{title:"\u8868\u60C5",type:"emoji",content:"\u{1F600} \u{1F603} \u{1F604} \u{1F601} \u{1F606} \u{1F605} \u{1F602} \u{1F923} \u{1F60A} \u{1F607} \u{1F642} \u{1F643} \u{1F609} \u{1F60C} \u{1F60D} \u{1F618} \u{1F617} \u{1F619} \u{1F61A} \u{1F60B} \u{1F61B} \u{1F61D} \u{1F61C} \u{1F913} \u{1F60E} \u{1F60F} \u{1F612} \u{1F61E} \u{1F614} \u{1F61F} \u{1F615} \u{1F641} \u{1F623} \u{1F616} \u{1F62B} \u{1F629} \u{1F622} \u{1F62D} \u{1F624} \u{1F620} \u{1F621} \u{1F633} \u{1F631} \u{1F628} \u{1F917} \u{1F914} \u{1F636} \u{1F611} \u{1F62C} \u{1F644} \u{1F62F} \u{1F634} \u{1F637} \u{1F911} \u{1F608} \u{1F921} \u{1F4A9} \u{1F47B} \u{1F480} \u{1F440} \u{1F463}".split(/\s/)},{title:"\u624B\u52BF",type:"emoji",content:"\u{1F450} \u{1F64C} \u{1F44F} \u{1F91D} \u{1F44D} \u{1F44E} \u{1F44A} \u270A \u{1F91B} \u{1F91C} \u{1F91E} \u270C\uFE0F \u{1F918} \u{1F44C} \u{1F448} \u{1F449} \u{1F446} \u{1F447} \u261D\uFE0F \u270B \u{1F91A} \u{1F590} \u{1F596} \u{1F44B} \u{1F919} \u{1F4AA} \u{1F595} \u270D\uFE0F \u{1F64F}".split(/\s/)}],lineHeights:["1","1.15","1.6","2","2.5","3"],undoLimit:20,indentation:"2em",showMenuTooltips:!0,menuTooltipPosition:"up"}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(7);function o(i,a,l){window.alert(i),l&&console.error("wangEditor: "+l)}t.default={onchangeTimeout:200,onchange:null,onfocus:r.EMPTY_FN,onblur:r.EMPTY_FN,onCatalogChange:null,customAlert:o}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={pasteFilterStyle:!0,pasteIgnoreImg:!1,pasteTextHandle:function(r){return r}}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={styleWithCSS:!1}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(7);t.default={linkImgCheck:function(o,i,a){return!0},showLinkImg:!0,showLinkImgAlt:!0,showLinkImgHref:!0,linkImgCallback:r.EMPTY_FN,uploadImgAccept:["jpg","jpeg","png","gif","bmp"],uploadImgServer:"",uploadImgShowBase64:!1,uploadImgMaxSize:5242880,uploadImgMaxLength:100,uploadFileName:"",uploadImgParams:{},uploadImgParamsWithUrl:!1,uploadImgHeaders:{},uploadImgHooks:{},uploadImgTimeout:1e4,withCredentials:!1,customUploadImg:null,uploadImgFromMedia:null}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={lang:"zh-CN",languages:{"zh-CN":{wangEditor:{\u91CD\u7F6E:"\u91CD\u7F6E",\u63D2\u5165:"\u63D2\u5165",\u9ED8\u8BA4:"\u9ED8\u8BA4",\u521B\u5EFA:"\u521B\u5EFA",\u4FEE\u6539:"\u4FEE\u6539",\u5982:"\u5982",\u8BF7\u8F93\u5165\u6B63\u6587:"\u8BF7\u8F93\u5165\u6B63\u6587",menus:{title:{\u6807\u9898:"\u6807\u9898",\u52A0\u7C97:"\u52A0\u7C97",\u5B57\u53F7:"\u5B57\u53F7",\u5B57\u4F53:"\u5B57\u4F53",\u659C\u4F53:"\u659C\u4F53",\u4E0B\u5212\u7EBF:"\u4E0B\u5212\u7EBF",\u5220\u9664\u7EBF:"\u5220\u9664\u7EBF",\u7F29\u8FDB:"\u7F29\u8FDB",\u884C\u9AD8:"\u884C\u9AD8",\u6587\u5B57\u989C\u8272:"\u6587\u5B57\u989C\u8272",\u80CC\u666F\u8272:"\u80CC\u666F\u8272",\u94FE\u63A5:"\u94FE\u63A5",\u5E8F\u5217:"\u5E8F\u5217",\u5BF9\u9F50:"\u5BF9\u9F50",\u5F15\u7528:"\u5F15\u7528",\u8868\u60C5:"\u8868\u60C5",\u56FE\u7247:"\u56FE\u7247",\u89C6\u9891:"\u89C6\u9891",\u8868\u683C:"\u8868\u683C",\u4EE3\u7801:"\u4EE3\u7801",\u5206\u5272\u7EBF:"\u5206\u5272\u7EBF",\u6062\u590D:"\u6062\u590D",\u64A4\u9500:"\u64A4\u9500",\u5168\u5C4F:"\u5168\u5C4F",\u53D6\u6D88\u5168\u5C4F:"\u53D6\u6D88\u5168\u5C4F",\u5F85\u529E\u4E8B\u9879:"\u5F85\u529E\u4E8B\u9879"},dropListMenu:{\u8BBE\u7F6E\u6807\u9898:"\u8BBE\u7F6E\u6807\u9898",\u80CC\u666F\u989C\u8272:"\u80CC\u666F\u989C\u8272",\u6587\u5B57\u989C\u8272:"\u6587\u5B57\u989C\u8272",\u8BBE\u7F6E\u5B57\u53F7:"\u8BBE\u7F6E\u5B57\u53F7",\u8BBE\u7F6E\u5B57\u4F53:"\u8BBE\u7F6E\u5B57\u4F53",\u8BBE\u7F6E\u7F29\u8FDB:"\u8BBE\u7F6E\u7F29\u8FDB",\u5BF9\u9F50\u65B9\u5F0F:"\u5BF9\u9F50\u65B9\u5F0F",\u8BBE\u7F6E\u884C\u9AD8:"\u8BBE\u7F6E\u884C\u9AD8",\u5E8F\u5217:"\u5E8F\u5217",head:{\u6B63\u6587:"\u6B63\u6587"},indent:{\u589E\u52A0\u7F29\u8FDB:"\u589E\u52A0\u7F29\u8FDB",\u51CF\u5C11\u7F29\u8FDB:"\u51CF\u5C11\u7F29\u8FDB"},justify:{\u9760\u5DE6:"\u9760\u5DE6",\u5C45\u4E2D:"\u5C45\u4E2D",\u9760\u53F3:"\u9760\u53F3",\u4E24\u7AEF:"\u4E24\u7AEF"},list:{\u65E0\u5E8F\u5217\u8868:"\u65E0\u5E8F\u5217\u8868",\u6709\u5E8F\u5217\u8868:"\u6709\u5E8F\u5217\u8868"}},panelMenus:{emoticon:{\u9ED8\u8BA4:"\u9ED8\u8BA4",\u65B0\u6D6A:"\u65B0\u6D6A",emoji:"emoji",\u624B\u52BF:"\u624B\u52BF"},image:{\u4E0A\u4F20\u56FE\u7247:"\u4E0A\u4F20\u56FE\u7247",\u7F51\u7EDC\u56FE\u7247:"\u7F51\u7EDC\u56FE\u7247",\u56FE\u7247\u5730\u5740:"\u56FE\u7247\u5730\u5740",\u56FE\u7247\u6587\u5B57\u8BF4\u660E:"\u56FE\u7247\u6587\u5B57\u8BF4\u660E",\u8DF3\u8F6C\u94FE\u63A5:"\u8DF3\u8F6C\u94FE\u63A5"},link:{\u94FE\u63A5:"\u94FE\u63A5",\u94FE\u63A5\u6587\u5B57:"\u94FE\u63A5\u6587\u5B57",\u53D6\u6D88\u94FE\u63A5:"\u53D6\u6D88\u94FE\u63A5",\u67E5\u770B\u94FE\u63A5:"\u67E5\u770B\u94FE\u63A5"},video:{\u63D2\u5165\u89C6\u9891:"\u63D2\u5165\u89C6\u9891",\u4E0A\u4F20\u89C6\u9891:"\u4E0A\u4F20\u89C6\u9891"},table:{\u884C:"\u884C",\u5217:"\u5217",\u7684:"\u7684",\u8868\u683C:"\u8868\u683C",\u6DFB\u52A0\u884C:"\u6DFB\u52A0\u884C",\u5220\u9664\u884C:"\u5220\u9664\u884C",\u6DFB\u52A0\u5217:"\u6DFB\u52A0\u5217",\u5220\u9664\u5217:"\u5220\u9664\u5217",\u8BBE\u7F6E\u8868\u5934:"\u8BBE\u7F6E\u8868\u5934",\u53D6\u6D88\u8868\u5934:"\u53D6\u6D88\u8868\u5934",\u63D2\u5165\u8868\u683C:"\u63D2\u5165\u8868\u683C",\u5220\u9664\u8868\u683C:"\u5220\u9664\u8868\u683C"},code:{\u5220\u9664\u4EE3\u7801:"\u5220\u9664\u4EE3\u7801",\u4FEE\u6539\u4EE3\u7801:"\u4FEE\u6539\u4EE3\u7801",\u63D2\u5165\u4EE3\u7801:"\u63D2\u5165\u4EE3\u7801"}}},validate:{\u5F20\u56FE\u7247:"\u5F20\u56FE\u7247",\u5927\u4E8E:"\u5927\u4E8E",\u56FE\u7247\u94FE\u63A5:"\u56FE\u7247\u94FE\u63A5",\u4E0D\u662F\u56FE\u7247:"\u4E0D\u662F\u56FE\u7247",\u8FD4\u56DE\u7ED3\u679C:"\u8FD4\u56DE\u7ED3\u679C",\u4E0A\u4F20\u56FE\u7247\u8D85\u65F6:"\u4E0A\u4F20\u56FE\u7247\u8D85\u65F6",\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF:"\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF",\u4E0A\u4F20\u56FE\u7247\u5931\u8D25:"\u4E0A\u4F20\u56FE\u7247\u5931\u8D25",\u63D2\u5165\u56FE\u7247\u9519\u8BEF:"\u63D2\u5165\u56FE\u7247\u9519\u8BEF",\u4E00\u6B21\u6700\u591A\u4E0A\u4F20:"\u4E00\u6B21\u6700\u591A\u4E0A\u4F20",\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25:"\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25",\u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7:"\u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7",\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001:"\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001",\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF:"\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF",\u8BF7\u66FF\u6362\u4E3A\u652F\u6301\u7684\u56FE\u7247\u7C7B\u578B:"\u8BF7\u66FF\u6362\u4E3A\u652F\u6301\u7684\u56FE\u7247\u7C7B\u578B",\u60A8\u63D2\u5165\u7684\u7F51\u7EDC\u56FE\u7247\u65E0\u6CD5\u8BC6\u522B:"\u60A8\u63D2\u5165\u7684\u7F51\u7EDC\u56FE\u7247\u65E0\u6CD5\u8BC6\u522B",\u60A8\u521A\u624D\u63D2\u5165\u7684\u56FE\u7247\u94FE\u63A5\u672A\u901A\u8FC7\u7F16\u8F91\u5668\u6821\u9A8C:"\u60A8\u521A\u624D\u63D2\u5165\u7684\u56FE\u7247\u94FE\u63A5\u672A\u901A\u8FC7\u7F16\u8F91\u5668\u6821\u9A8C",\u63D2\u5165\u89C6\u9891\u9519\u8BEF:"\u63D2\u5165\u89C6\u9891\u9519\u8BEF",\u89C6\u9891\u94FE\u63A5:"\u89C6\u9891\u94FE\u63A5",\u4E0D\u662F\u89C6\u9891:"\u4E0D\u662F\u89C6\u9891",\u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7:"\u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7",\u4E2A\u89C6\u9891:"\u4E2A\u89C6\u9891",\u4E0A\u4F20\u89C6\u9891\u8D85\u65F6:"\u4E0A\u4F20\u89C6\u9891\u8D85\u65F6",\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF:"\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF",\u4E0A\u4F20\u89C6\u9891\u5931\u8D25:"\u4E0A\u4F20\u89C6\u9891\u5931\u8D25",\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF:"\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF"}}},en:{wangEditor:{\u91CD\u7F6E:"reset",\u63D2\u5165:"insert",\u9ED8\u8BA4:"default",\u521B\u5EFA:"create",\u4FEE\u6539:"edit",\u5982:"like",\u8BF7\u8F93\u5165\u6B63\u6587:"please enter the text",menus:{title:{\u6807\u9898:"head",\u52A0\u7C97:"bold",\u5B57\u53F7:"font size",\u5B57\u4F53:"font family",\u659C\u4F53:"italic",\u4E0B\u5212\u7EBF:"underline",\u5220\u9664\u7EBF:"strikethrough",\u7F29\u8FDB:"indent",\u884C\u9AD8:"line heihgt",\u6587\u5B57\u989C\u8272:"font color",\u80CC\u666F\u8272:"background",\u94FE\u63A5:"link",\u5E8F\u5217:"numbered list",\u5BF9\u9F50:"align",\u5F15\u7528:"quote",\u8868\u60C5:"emoticons",\u56FE\u7247:"image",\u89C6\u9891:"media",\u8868\u683C:"table",\u4EE3\u7801:"code",\u5206\u5272\u7EBF:"split line",\u6062\u590D:"undo",\u64A4\u9500:"redo",\u5168\u5C4F:"fullscreen",\u53D6\u6D88\u5168\u5C4F:"cancel fullscreen",\u5F85\u529E\u4E8B\u9879:"todo"},dropListMenu:{\u8BBE\u7F6E\u6807\u9898:"title",\u80CC\u666F\u989C\u8272:"background",\u6587\u5B57\u989C\u8272:"font color",\u8BBE\u7F6E\u5B57\u53F7:"font size",\u8BBE\u7F6E\u5B57\u4F53:"font family",\u8BBE\u7F6E\u7F29\u8FDB:"indent",\u5BF9\u9F50\u65B9\u5F0F:"align",\u8BBE\u7F6E\u884C\u9AD8:"line heihgt",\u5E8F\u5217:"list",head:{\u6B63\u6587:"text"},indent:{\u589E\u52A0\u7F29\u8FDB:"indent",\u51CF\u5C11\u7F29\u8FDB:"outdent"},justify:{\u9760\u5DE6:"left",\u5C45\u4E2D:"center",\u9760\u53F3:"right",\u4E24\u7AEF:"justify"},list:{\u65E0\u5E8F\u5217\u8868:"unordered",\u6709\u5E8F\u5217\u8868:"ordered"}},panelMenus:{emoticon:{\u8868\u60C5:"emoji",\u624B\u52BF:"gesture"},image:{\u4E0A\u4F20\u56FE\u7247:"upload image",\u7F51\u7EDC\u56FE\u7247:"network image",\u56FE\u7247\u5730\u5740:"image link",\u56FE\u7247\u6587\u5B57\u8BF4\u660E:"image alt",\u8DF3\u8F6C\u94FE\u63A5:"hyperlink"},link:{\u94FE\u63A5:"link",\u94FE\u63A5\u6587\u5B57:"link text",\u53D6\u6D88\u94FE\u63A5:"unlink",\u67E5\u770B\u94FE\u63A5:"view links"},video:{\u63D2\u5165\u89C6\u9891:"insert video",\u4E0A\u4F20\u89C6\u9891:"upload local video"},table:{\u884C:"rows",\u5217:"columns",\u7684:" ",\u8868\u683C:"table",\u6DFB\u52A0\u884C:"insert row",\u5220\u9664\u884C:"delete row",\u6DFB\u52A0\u5217:"insert column",\u5220\u9664\u5217:"delete column",\u8BBE\u7F6E\u8868\u5934:"set header",\u53D6\u6D88\u8868\u5934:"cancel header",\u63D2\u5165\u8868\u683C:"insert table",\u5220\u9664\u8868\u683C:"delete table"},code:{\u5220\u9664\u4EE3\u7801:"delete code",\u4FEE\u6539\u4EE3\u7801:"edit code",\u63D2\u5165\u4EE3\u7801:"insert code"}}},validate:{\u5F20\u56FE\u7247:"images",\u5927\u4E8E:"greater than",\u56FE\u7247\u94FE\u63A5:"image link",\u4E0D\u662F\u56FE\u7247:"is not image",\u8FD4\u56DE\u7ED3\u679C:"return results",\u4E0A\u4F20\u56FE\u7247\u8D85\u65F6:"upload image timeout",\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF:"upload image error",\u4E0A\u4F20\u56FE\u7247\u5931\u8D25:"upload image failed",\u63D2\u5165\u56FE\u7247\u9519\u8BEF:"insert image error",\u4E00\u6B21\u6700\u591A\u4E0A\u4F20:"once most at upload",\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25:"download link failed",\u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7:"image validate failed",\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001:"server return status",\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF:"upload image return results error",\u8BF7\u66FF\u6362\u4E3A\u652F\u6301\u7684\u56FE\u7247\u7C7B\u578B:"please replace with a supported image type",\u60A8\u63D2\u5165\u7684\u7F51\u7EDC\u56FE\u7247\u65E0\u6CD5\u8BC6\u522B:"the network picture you inserted is not recognized",\u60A8\u521A\u624D\u63D2\u5165\u7684\u56FE\u7247\u94FE\u63A5\u672A\u901A\u8FC7\u7F16\u8F91\u5668\u6821\u9A8C:"the image link you just inserted did not pass the editor verification",\u63D2\u5165\u89C6\u9891\u9519\u8BEF:"insert video error",\u89C6\u9891\u94FE\u63A5:"video link",\u4E0D\u662F\u89C6\u9891:"is not video",\u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7:"video validate failed",\u4E2A\u89C6\u9891:"videos",\u4E0A\u4F20\u89C6\u9891\u8D85\u65F6:"upload video timeout",\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF:"upload video error",\u4E0A\u4F20\u89C6\u9891\u5931\u8D25:"upload video failed",\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF:"upload video return results error"}}}}}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(6);function o(){return!(!r.UA.isIE()&&!r.UA.isOldEdge)}t.default={compatibleMode:o,historyMaxSize:30}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(7);t.default={onlineVideoCheck:function(o){return!0},onlineVideoCallback:r.EMPTY_FN,showLinkVideo:!0,uploadVideoAccept:["mp4"],uploadVideoServer:"",uploadVideoMaxSize:1073741824,uploadVideoName:"",uploadVideoParams:{},uploadVideoParamsWithUrl:!1,uploadVideoHeaders:{},uploadVideoHooks:{},uploadVideoTimeout:72e5,withVideoCredentials:!1,customUploadVideo:null,customInsertVideo:null}},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3)),l=n(6),s=n(7),u=function(){function c(d){this._currentRange=null,this.editor=d}return c.prototype.getRange=function(){return this._currentRange},c.prototype.saveRange=function(d){if(d)this._currentRange=d;else{var f=window.getSelection();if(f.rangeCount!==0){var p=f.getRangeAt(0),m=this.getSelectionContainerElem(p);if(m!=null&&m.length&&m.attr("contenteditable")!=="false"&&!m.parentUntil("[contenteditable=false]")){var v=this.editor,g=v.$textElem;if(g.isContain(m)){var b;if(g.elems[0]===m.elems[0]&&(0,i.default)(b=g.html()).call(b)===s.EMPTY_P){var y=g.children(),w=y==null?void 0:y.last();v.selection.createRangeByElem(w,!0,!0),v.selection.restoreSelection()}this._currentRange=p}}}}},c.prototype.collapseRange=function(d){d===void 0&&(d=!1);var f=this._currentRange;f&&f.collapse(d)},c.prototype.getSelectionText=function(){var d=this._currentRange;return d?d.toString():""},c.prototype.getSelectionContainerElem=function(d){var f,p;if(f=d||this._currentRange)return p=f.commonAncestorContainer,a.default(p.nodeType===1?p:p.parentNode)},c.prototype.getSelectionStartElem=function(d){var f,p;if(f=d||this._currentRange)return p=f.startContainer,a.default(p.nodeType===1?p:p.parentNode)},c.prototype.getSelectionEndElem=function(d){var f,p;if(f=d||this._currentRange)return p=f.endContainer,a.default(p.nodeType===1?p:p.parentNode)},c.prototype.isSelectionEmpty=function(){var d=this._currentRange;return!(!d||!d.startContainer||d.startContainer!==d.endContainer||d.startOffset!==d.endOffset)},c.prototype.restoreSelection=function(){var d=window.getSelection(),f=this._currentRange;d&&f&&(d.removeAllRanges(),d.addRange(f))},c.prototype.createEmptyRange=function(){var d,f=this.editor,p=this.getRange();if(p&&this.isSelectionEmpty())try{l.UA.isWebkit()?(f.cmd.do("insertHTML","​"),p.setEnd(p.endContainer,p.endOffset+1),this.saveRange(p)):(d=a.default("<strong>​</strong>"),f.cmd.do("insertElem",d),this.createRangeByElem(d,!0))}catch{}},c.prototype.createRangeByElems=function(d,f){var p=window.getSelection?window.getSelection():document.getSelection();p==null||p.removeAllRanges();var m=document.createRange();m.setStart(d,0),m.setEnd(f,f.childNodes.length||1),this.saveRange(m),this.restoreSelection()},c.prototype.createRangeByElem=function(d,f,p){if(d.length){var m=d.elems[0],v=document.createRange();p?v.selectNodeContents(m):v.selectNode(m),f!=null&&(v.collapse(f),f||(this.saveRange(v),this.editor.selection.moveCursor(m))),this.saveRange(v)}},c.prototype.getSelectionRangeTopNodes=function(){var d,f,p=(d=this.getSelectionStartElem())===null||d===void 0?void 0:d.getNodeTop(this.editor),m=(f=this.getSelectionEndElem())===null||f===void 0?void 0:f.getNodeTop(this.editor);return this.recordSelectionNodes(a.default(p),a.default(m))},c.prototype.moveCursor=function(d,f){var p,m=this.getRange(),v=d.nodeType===3?(p=d.nodeValue)===null||p===void 0?void 0:p.length:d.childNodes.length;(l.UA.isFirefox||l.UA.isIE())&&v!==0&&(d.nodeType===3||d.childNodes[v-1].nodeName==="BR")&&(v-=1);var g=f??v;!m||d&&(m.setStart(d,g),m.setEnd(d,g),this.restoreSelection())},c.prototype.getCursorPos=function(){var d=window.getSelection();return d==null?void 0:d.anchorOffset},c.prototype.clearWindowSelectionRange=function(){var d=window.getSelection();d&&d.removeAllRanges()},c.prototype.recordSelectionNodes=function(d,f){var p=[],m=!0;try{for(var v=d,g=this.editor.$textElem;m;){var b=v==null?void 0:v.getNodeTop(this.editor);b.getNodeName()==="BODY"&&(m=!1),b.length>0&&(p.push(a.default(v)),f!=null&&f.equal(b)||g.equal(b)?m=!1:v=b.getNextSibling())}}catch{m=!1}return p},c.prototype.setRangeToElem=function(d){var f=this.getRange();f==null||f.setStart(d,0),f==null||f.setEnd(d,0)},c}();t.default=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3)),o=function(){function i(a){this.editor=a}return i.prototype.do=function(a,l){var s=this.editor;s.config.styleWithCSS&&document.execCommand("styleWithCSS",!1,"true");var u=s.selection;if(u.getRange()){switch(u.restoreSelection(),a){case"insertHTML":this.insertHTML(l);break;case"insertElem":this.insertElem(l);break;default:this.execCommand(a,l)}s.menus.changeActive(),u.saveRange(),u.restoreSelection()}},i.prototype.insertHTML=function(a){var l=this.editor,s=l.selection.getRange();if(s!=null){if(this.queryCommandSupported("insertHTML"))this.execCommand("insertHTML",a);else if(s.insertNode){if(s.deleteContents(),r.default(a).elems.length>0)s.insertNode(r.default(a).elems[0]);else{var u=document.createElement("p");u.appendChild(document.createTextNode(a)),s.insertNode(u)}l.selection.collapseRange()}}},i.prototype.insertElem=function(a){var l=this.editor.selection.getRange();l!=null&&l.insertNode&&(l.deleteContents(),l.insertNode(a.elems[0]))},i.prototype.execCommand=function(a,l){document.execCommand(a,!1,l)},i.prototype.queryCommandValue=function(a){return document.queryCommandValue(a)},i.prototype.queryCommandState=function(a){return document.queryCommandState(a)},i.prototype.queryCommandSupported=function(a){return document.queryCommandSupported(a)},i}();t.default=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(31)),a=r(n(4)),l=r(n(17)),s=r(n(27)),u=r(n(46));(0,o.default)(t,"__esModule",{value:!0});var c=n(2),d=c.__importDefault(n(3)),f=c.__importDefault(n(287)),p=n(6),m=c.__importDefault(n(299)),v=c.__importDefault(n(300)),g=n(7),b=function(){function y(w){this.editor=w,this.eventHooks={onBlurEvents:[],changeEvents:[],dropEvents:[],clickEvents:[],keydownEvents:[],keyupEvents:[],tabUpEvents:[],tabDownEvents:[],enterUpEvents:[],enterDownEvents:[],deleteUpEvents:[],deleteDownEvents:[],pasteEvents:[],linkClickEvents:[],codeClickEvents:[],textScrollEvents:[],toolbarClickEvents:[],imgClickEvents:[],imgDragBarMouseDownEvents:[],tableClickEvents:[],menuClickEvents:[],dropListMenuHoverEvents:[],splitLineEvents:[],videoClickEvents:[]}}return y.prototype.init=function(){this._saveRange(),this._bindEventHooks(),f.default(this)},y.prototype.togglePlaceholder=function(){var w,x=this.html(),_=(0,i.default)(w=this.editor.$textContainerElem).call(w,".placeholder");_.hide(),!this.editor.isComposing&&(!x||x===" ")&&_.show()},y.prototype.clear=function(){this.html(g.EMPTY_P)},y.prototype.html=function(w){var x=this.editor,_=x.$textElem;if(w==null){var E=_.html(),C=(E=(E=(E=(E=E.replace(/\u200b/gm,"")).replace(/<p><\/p>/gim,"")).replace(g.EMPTY_P_LAST_REGEX,"")).replace(g.EMPTY_P_REGEX,"<p>")).match(/<(img|br|hr|input)[^>]*>/gi);return C!==null&&(0,a.default)(C).call(C,function(T){T.match(/\/>/)||(E=E.replace(T,T.substring(0,T.length-1)+"/>"))}),E}(w=(0,l.default)(w).call(w))===""&&(w=g.EMPTY_P),(0,s.default)(w).call(w,"<")!==0&&(w="<p>"+w+"</p>"),_.html(w),x.initSelection()},y.prototype.setJSON=function(w){var x=v.default(w).children(),_=this.editor.$textElem;!x||_.replaceChildAll(x)},y.prototype.getJSON=function(){var w=this.editor.$textElem;return m.default(w)},y.prototype.text=function(w){var x=this.editor,_=x.$textElem;if(w==null){var E=_.text();return E=E.replace(/\u200b/gm,"")}_.text("<p>"+w+"</p>"),x.initSelection()},y.prototype.append=function(w){var x=this.editor;(0,s.default)(w).call(w,"<")!==0&&(w="<p>"+w+"</p>"),this.html(this.html()+w),x.initSelection()},y.prototype._saveRange=function(){var w=this.editor,x=w.$textElem,_=d.default(document);function E(){w.selection.saveRange(),w.menus.changeActive()}function C(){E(),x.off("click",C)}function T(){E(),_.off("mouseup",T)}function k(){_.on("mouseup",T),x.off("mouseleave",k)}x.on("keyup",E),x.on("click",C),x.on("mousedown",function(){x.on("mouseleave",k)}),x.on("mouseup",function(I){x.off("mouseleave",k),(0,u.default)(function(){w.selection.getRange()!==null&&E()},0)})},y.prototype._bindEventHooks=function(){var w=this.editor,x=w.$textElem,_=this.eventHooks;function E(C){C.preventDefault()}x.on("click",function(C){var T=_.clickEvents;(0,a.default)(T).call(T,function(k){return k(C)})}),x.on("keyup",function(C){if(C.keyCode===13){var T=_.enterUpEvents;(0,a.default)(T).call(T,function(k){return k(C)})}}),x.on("keyup",function(C){var T=_.keyupEvents;(0,a.default)(T).call(T,function(k){return k(C)})}),x.on("keydown",function(C){var T=_.keydownEvents;(0,a.default)(T).call(T,function(k){return k(C)})}),x.on("keyup",function(C){if(C.keyCode===8||C.keyCode===46){var T=_.deleteUpEvents;(0,a.default)(T).call(T,function(k){return k(C)})}}),x.on("keydown",function(C){if(C.keyCode===8||C.keyCode===46){var T=_.deleteDownEvents;(0,a.default)(T).call(T,function(k){return k(C)})}}),x.on("paste",function(C){if(!p.UA.isIE()){C.preventDefault();var T=_.pasteEvents;(0,a.default)(T).call(T,function(k){return k(C)})}}),x.on("keydown",function(C){(w.isFocus||w.isCompatibleMode)&&(C.ctrlKey||C.metaKey)&&C.keyCode===90&&(C.preventDefault(),C.shiftKey?w.history.restore():w.history.revoke())}),x.on("keyup",function(C){if(C.keyCode===9){C.preventDefault();var T=_.tabUpEvents;(0,a.default)(T).call(T,function(k){return k(C)})}}),x.on("keydown",function(C){if(C.keyCode===9){C.preventDefault();var T=_.tabDownEvents;(0,a.default)(T).call(T,function(k){return k(C)})}}),x.on("scroll",p.throttle(function(C){var T=_.textScrollEvents;(0,a.default)(T).call(T,function(k){return k(C)})},100)),d.default(document).on("dragleave",E).on("drop",E).on("dragenter",E).on("dragover",E),w.beforeDestroy(function(){d.default(document).off("dragleave",E).off("drop",E).off("dragenter",E).off("dragover",E)}),x.on("drop",function(C){C.preventDefault();var T=_.dropEvents;(0,a.default)(T).call(T,function(k){return k(C)})}),x.on("click",function(C){var T=null,k=C.target,I=d.default(k);if(I.getNodeName()==="A")T=I;else{var O=I.parentUntil("a");O!=null&&(T=O)}if(T){var F=_.linkClickEvents;(0,a.default)(F).call(F,function(N){return N(T)})}}),x.on("click",function(C){var T=null,k=C.target,I=d.default(k);if(I.getNodeName()==="IMG"&&!I.elems[0].getAttribute("data-emoji")&&(C.stopPropagation(),T=I),T){var O=_.imgClickEvents;(0,a.default)(O).call(O,function(F){return F(T)})}}),x.on("click",function(C){var T=null,k=C.target,I=d.default(k);if(I.getNodeName()==="PRE")T=I;else{var O=I.parentUntil("pre");O!==null&&(T=O)}if(T){var F=_.codeClickEvents;(0,a.default)(F).call(F,function(N){return N(T)})}}),x.on("click",function(C){var T=null,k=C.target,I=d.default(k);if(I.getNodeName()==="HR"&&(T=I),T){w.selection.createRangeByElem(T),w.selection.restoreSelection();var O=_.splitLineEvents;(0,a.default)(O).call(O,function(F){return F(T)})}}),w.$toolbarElem.on("click",function(C){var T=_.toolbarClickEvents;(0,a.default)(T).call(T,function(k){return k(C)})}),w.$textContainerElem.on("mousedown",function(C){var T=C.target;if(d.default(T).hasClass("w-e-img-drag-rb")){var k=_.imgDragBarMouseDownEvents;(0,a.default)(k).call(k,function(I){return I()})}}),x.on("click",function(C){var T=null,k=C.target;if(T=d.default(k).parentUntilEditor("TABLE",w,k)){var I=_.tableClickEvents;(0,a.default)(I).call(I,function(O){return O(T,C)})}}),x.on("keydown",function(C){if(C.keyCode===13){var T=_.enterDownEvents;(0,a.default)(T).call(T,function(k){return k(C)})}}),x.on("click",function(C){var T=null,k=C.target,I=d.default(k);if(I.getNodeName()==="VIDEO"&&(C.stopPropagation(),T=I),T){var O=_.videoClickEvents;(0,a.default)(O).call(O,function(F){return F(T)})}})},y}();t.default=b},function(e,t,n){var r=n(284);e.exports=r},function(e,t,n){var r=n(285),o=Array.prototype;e.exports=function(i){var a=i.find;return i===o||i instanceof Array&&a===o.find?r:a}},function(e,t,n){n(286);var r=n(15);e.exports=r("Array").find},function(e,t,n){var r=n(5),o=n(30).find,i=n(82),a=n(22),l="find",s=!0,u=a(l);l in[]&&Array(1)[l](function(){s=!1}),r({target:"Array",proto:!0,forced:s||!u},{find:function(c){return o(this,c,arguments.length>1?arguments[1]:void 0)}}),i(l)},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(288)),i=r.__importStar(n(289)),a=r.__importDefault(n(290)),l=r.__importDefault(n(291)),s=r.__importDefault(n(298));function u(c){var d=c.editor,f=c.eventHooks;o.default(d,f.enterUpEvents,f.enterDownEvents),i.default(d,f.deleteUpEvents,f.deleteDownEvents),i.cutToKeepP(d,f.keyupEvents),a.default(d,f.tabDownEvents),l.default(d,f.pasteEvents),s.default(d,f.imgClickEvents)}t.default=u},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(27));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(7),s=a.__importDefault(n(3));function u(c,d,f){function p(g){var b,y=s.default(l.EMPTY_P);y.insertBefore(g),(0,i.default)(b=g.html()).call(b,"<img")>=0?y.remove():(c.selection.createRangeByElem(y,!0,!0),c.selection.restoreSelection(),g.remove())}function m(){var g=c.$textElem,b=c.selection.getSelectionContainerElem(),y=b.parent();y.html()==="<code><br></code>"||b.getNodeName()==="FONT"&&b.text()===""&&b.attr("face")==="monospace"?p(y):y.equal(g)&&(b.getNodeName()==="P"&&b.attr("data-we-empty-p")===null||b.text()||p(b))}function v(g){var b;c.selection.saveRange((b=getSelection())===null||b===void 0?void 0:b.getRangeAt(0)),c.selection.getSelectionContainerElem().id===c.textElemId&&(g.preventDefault(),c.cmd.do("insertHTML","<p><br></p>"))}d.push(m),f.push(v)}t.default=u},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(17)),a=r(n(44));(0,o.default)(t,"__esModule",{value:!0}),t.cutToKeepP=void 0;var l=n(2),s=n(7),u=l.__importDefault(n(3));function c(f,p,m){function v(){var b=f.$textElem,y=f.$textElem.html(),w=f.$textElem.text(),x=(0,i.default)(y).call(y),_=["<p><br></p>","<br>",'<p data-we-empty-p=""></p>',s.EMPTY_P];/^\s*$/.test(w)&&(!x||(0,a.default)(_).call(_,x))&&(b.html(s.EMPTY_P),f.selection.createRangeByElem(b,!1,!0),f.selection.restoreSelection(),f.selection.moveCursor(b.getNode(),0))}function g(b){var y,w=f.$textElem;(0,i.default)(y=w.html().toLowerCase()).call(y)!==s.EMPTY_P||b.preventDefault()}p.push(v),m.push(g)}function d(f,p){function m(v){var g;if(v.keyCode===88){var b=f.$textElem,y=(0,i.default)(g=b.html().toLowerCase()).call(g);if(!y||y==="<br>"){var w=u.default(s.EMPTY_P);b.html(" "),b.append(w),f.selection.createRangeByElem(w,!1,!0),f.selection.restoreSelection(),f.selection.moveCursor(w.getNode(),0)}}}p.push(m)}t.cutToKeepP=d,t.default=c},function(e,t,n){function r(o,i){function a(){if(o.cmd.queryCommandSupported("insertHTML")){var l=o.selection.getSelectionContainerElem();if(l){var s=l.parent(),u=l.getNodeName(),c=s.getNodeName();u=="CODE"||c==="CODE"||c==="PRE"||/hljs/.test(c)?o.cmd.do("insertHTML",o.config.languageTab):o.cmd.do("insertHTML"," ")}}}i.push(a)}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(130),l=n(6),s=n(7);function u(m){var v,g=(0,i.default)(v=m.replace(/<div>/gim,"<p>").replace(/<\/div>/gim,"</p>")).call(v),b=document.createElement("div");return b.innerHTML=g,b.innerHTML.replace(/<p><\/p>/gim,"")}function c(m){return m.replace(/<br>|<br\/>/gm,` |
|
731 |
`).replace(/<[^>]+>/gm,"")}function d(m){var v;if(m==="")return!1;var g=document.createElement("div");return g.innerHTML=m,((v=g.firstChild)===null||v===void 0?void 0:v.nodeName)==="P"}function f(m){if(m==null||!m.length)return!1;var v=m.elems[0];return v.nodeName==="P"&&v.innerHTML==="<br>"}function p(m,v){function g(b){var y=m.config,w=y.pasteFilterStyle,x=y.pasteIgnoreImg,_=y.pasteTextHandle,E=a.getPasteHtml(b,w,x),C=a.getPasteText(b);C=C.replace(/\n/gm,"<br>");var T=m.selection.getSelectionContainerElem();if(T){var k=T==null?void 0:T.getNodeName(),I=T==null?void 0:T.getNodeTop(m),O="";if(I.elems[0]&&(O=I==null?void 0:I.getNodeName()),k==="CODE"||O==="PRE")return _&&l.isFunction(_)&&(C=""+(_(C)||"")),void m.cmd.do("insertHTML",c(C));if(s.urlRegex.test(C)&&w){_&&l.isFunction(_)&&(C=""+(_(C)||""));var F=s.urlRegex.exec(C)[0],N=C.replace(s.urlRegex,"");return m.cmd.do("insertHTML",'<a href="'+F+'" target="_blank">'+F+"</a>"+N)}if(E)try{if(_&&l.isFunction(_)&&(E=""+(_(E)||"")),/[\.\#\@]?\w+[ ]+\{[^}]*\}/.test(E)&&w)m.cmd.do("insertHTML",""+u(C));else{var B=u(E);if(d(B)){var L=m.$textElem;if(m.cmd.do("insertHTML",B),L.equal(T))return void m.selection.createEmptyRange();f(I)&&I.remove()}else/^<img [^>]*src=['"]([^'"]+)[^>]*>$/g.test(B)||m.cmd.do("insertHTML",B)}}catch{_&&l.isFunction(_)&&(C=""+(_(C)||"")),m.cmd.do("insertHTML",""+u(C))}}}v.push(g)}t.default=p},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(17)),a=r(n(4)),l=r(n(44));(0,o.default)(t,"__esModule",{value:!0});var s=n(2),u=n(293),c=s.__importDefault(n(297));function d(g){var b=/<span>.*?<\/span>/gi,y=/<span>(.*?)<\/span>/;return g.replace(b,function(w){var x=w.match(y);return x==null?"":x[1]})}function f(g,b){var y;return g=(0,i.default)(y=g.toLowerCase()).call(y),!!(u.IGNORE_TAGS.has(g)||b&&g==="img")}function p(g,b){var y="";y="<"+g;var w=[];return(0,a.default)(b).call(b,function(x){w.push(x.name+'="'+x.value+'"')}),w.length>0&&(y=y+" "+w.join(" ")),y=y+(u.EMPTY_TAGS.has(g)?"/":"")+">"}function m(g){return"</"+g+">"}function v(g,b,y){b===void 0&&(b=!0),y===void 0&&(y=!1);var w=[],x="";function _(T){(T=(0,i.default)(T).call(T))&&(u.EMPTY_TAGS.has(T)||(x=T))}function E(){x=""}new c.default().parse(g,{startElement:function(T,k){if(_(T),!f(T,y)){var I=u.NECESSARY_ATTRS.get(T)||[],O=[];(0,a.default)(k).call(k,function(N){var B=N.name;B!=="style"?(0,l.default)(I).call(I,B)!==!1&&O.push(N):b||O.push(N)});var F=p(T,O);w.push(F)}},characters:function(T){!T||f(x,y)||w.push(T)},endElement:function(T){if(!f(T,y)){var k=m(T);w.push(k),E()}},comment:function(T){_(T)}});var C=w.join("");return C=d(C)}t.default=v},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(131)),a=r(n(120));(0,o.default)(t,"__esModule",{value:!0}),t.TOP_LEVEL_TAGS=t.EMPTY_TAGS=t.NECESSARY_ATTRS=t.IGNORE_TAGS=void 0,t.IGNORE_TAGS=new i.default(["doctype","!doctype","html","head","meta","body","script","style","link","frame","iframe","title","svg","center","o:p"]),t.NECESSARY_ATTRS=new a.default([["img",["src","alt"]],["a",["href","target"]],["td",["colspan","rowspan"]],["th",["colspan","rowspan"]]]),t.EMPTY_TAGS=new i.default(["area","base","basefont","br","col","hr","img","input","isindex","embed"]),t.TOP_LEVEL_TAGS=new i.default(["h1","h2","h3","h4","h5","p","ul","ol","table","blockquote","pre","hr","form"])},function(e,t,n){var r=n(295);e.exports=r},function(e,t,n){n(296),n(61),n(50),n(54);var r=n(9);e.exports=r.Set},function(e,t,n){var r=n(121),o=n(123);e.exports=r("Set",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},o)},function(e,t){function n(){}n.prototype={handler:null,startTagRe:/^<([^>\s\/]+)((\s+[^=>\s]+(\s*=\s*((\"[^"]*\")|(\'[^']*\')|[^>\s]+))?)*)\s*\/?\s*>/m,endTagRe:/^<\/([^>\s]+)[^>]*>/m,attrRe:/([^=\s]+)(\s*=\s*((\"([^"]*)\")|(\'([^']*)\')|[^>\s]+))?/gm,parse:function(r,o){o&&(this.contentHandler=o);for(var i,a,l,s=!1,u=this;r.length>0;)r.substring(0,4)=="<!--"?(l=r.indexOf("-->"))!=-1?(this.contentHandler.comment(r.substring(4,l)),r=r.substring(l+3),s=!1):s=!0:r.substring(0,2)=="</"?this.endTagRe.test(r)?(i=RegExp.lastMatch,a=RegExp.rightContext,i.replace(this.endTagRe,function(){return u.parseEndTag.apply(u,arguments)}),r=a,s=!1):s=!0:r.charAt(0)=="<"&&(this.startTagRe.test(r)?(i=RegExp.lastMatch,a=RegExp.rightContext,i.replace(this.startTagRe,function(){return u.parseStartTag.apply(u,arguments)}),r=a,s=!1):s=!0),s&&((l=r.indexOf("<"))==-1?(this.contentHandler.characters(r),r=""):(this.contentHandler.characters(r.substring(0,l)),r=r.substring(l))),s=!0},parseStartTag:function(r,o,i){var a=this.parseAttributes(o,i);this.contentHandler.startElement(o,a)},parseEndTag:function(r,o){this.contentHandler.endElement(o)},parseAttributes:function(r,o){var i=this,a=[];return o.replace(this.attrRe,function(l,s,u,c,d,f,p,m){a.push(i.parseAttribute(r,l,s,u,c,d,f,p,m))}),a},parseAttribute:function(r,o,i){var a="";return arguments[7]?a=arguments[8]:arguments[5]?a=arguments[6]:arguments[3]&&(a=arguments[4]),{name:i,value:a||arguments[3]?a:null}}},e.exports=n},function(e,t,n){function r(o,i){function a(l){o.selection.createRangeByElem(l),o.selection.restoreSelection()}i.push(a)}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3));function u(c){var d=[],f=c.childNodes()||[];return(0,i.default)(f).call(f,function(p){var m,v=p.nodeType;if(v===3&&(m=p.textContent||"",m=l.replaceHtmlSymbol(m)),v===1){(m={}).tag=p.nodeName.toLowerCase();for(var g=[],b=p.attributes,y=b.length||0,w=0;w<y;w++){var x=b[w];g.push({name:x.name,value:x.value})}m.attrs=g,m.children=u(s.default(p))}m&&d.push(m)}),d}t.default=u},function(e,t,n){var r=n(0),o=r(n(92)),i=r(n(1)),a=r(n(4));(0,i.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3));function s(u,c){c===void 0&&(c=document.createElement("div"));var d=c;return(0,a.default)(u).call(u,function(f){var p,m;typeof f=="string"&&(p=document.createTextNode(f)),(0,o.default)(f)==="object"&&(p=document.createElement(f.tag),(0,a.default)(m=f.attrs).call(m,function(v){l.default(p).attr(v.name,v.value)}),f.children&&f.children.length>0&&s(f.children,p.getRootNode())),p&&d.appendChild(p)}),l.default(d)}t.default=s},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(89)),a=r(n(70)),l=r(n(44)),s=r(n(302)),u=r(n(4)),c=r(n(94)),d=r(n(132)),f=r(n(46)),p=r(n(57));(0,o.default)(t,"__esModule",{value:!0});var m=n(2),v=m.__importDefault(n(87)),g=m.__importDefault(n(314)),b=m.__importDefault(n(3)),y=function(){function w(x){this.editor=x,this.menuList=[],this.constructorList=g.default}return w.prototype.extend=function(x,_){!_||typeof _!="function"||(this.constructorList[x]=_)},w.prototype.init=function(){var x,_,E=this,C=this.editor.config,T=C.excludeMenus;(0,i.default)(T)===!1&&(T=[]),C.menus=(0,a.default)(x=C.menus).call(x,function(L){return(0,l.default)(T).call(T,L)===!1});var k=(0,s.default)(v.default.globalCustomMenuConstructorList);k=(0,a.default)(k).call(k,function(L){return(0,l.default)(T).call(T,L)}),(0,u.default)(k).call(k,function(L){delete v.default.globalCustomMenuConstructorList[L]}),(0,u.default)(_=C.menus).call(_,function(L){var V=E.constructorList[L];E._initMenuList(L,V)});for(var I=0,O=(0,c.default)(v.default.globalCustomMenuConstructorList);I<O.length;I++){var F=O[I],N=F[0],B=F[1];this._initMenuList(N,B)}this._addToToolbar(),C.showMenuTooltips&&this._bindMenuTooltips()},w.prototype._initMenuList=function(x,_){var E;if(_!=null&&typeof _=="function")if((0,d.default)(E=this.menuList).call(E,function(T){return T.key===x}))console.warn("\u83DC\u5355\u540D\u79F0\u91CD\u590D:"+x);else{var C=new _(this.editor);C.key=x,this.menuList.push(C)}},w.prototype._bindMenuTooltips=function(){var x=this.editor,_=x.$toolbarElem,E=x.config.menuTooltipPosition,C=b.default('<div class="w-e-menu-tooltip w-e-menu-tooltip-'+E+`"> |
|
732 |
<div class="w-e-menu-tooltip-item-wrapper"> |
|
733 |
<div></div> |
|
734 |
</div> |
|
735 |
</div>`);C.css("visibility","hidden"),_.append(C),C.css("z-index",x.zIndex.get("tooltip"));var T=0;function k(){T&&clearTimeout(T)}function I(){k(),C.css("visibility","hidden")}_.on("mouseover",function(O){var F,N,B=O.target,L=b.default(B);if(L.isContain(_))I();else{if(L.parentUntil(".w-e-droplist")!=null)I();else if(L.attr("data-title"))F=L.attr("data-title"),N=L;else{var V=L.parentUntil(".w-e-menu");V!=null&&(F=V.attr("data-title"),N=V)}if(F&&N){k();var P=N.getOffsetData();C.text(x.i18next.t("menus.title."+F));var H=C.getOffsetData(),U=P.left+P.width/2-H.width/2;C.css("left",U+"px"),E==="up"?C.css("top",P.top-H.height-8+"px"):E==="down"&&C.css("top",P.top+P.height+8+"px"),T=(0,f.default)(function(){C.css("visibility","visible")},200)}else I()}}).on("mouseleave",function(){I()})},w.prototype._addToToolbar=function(){var x,_=this.editor.$toolbarElem;(0,u.default)(x=this.menuList).call(x,function(E){var C=E.$elem;C&&_.append(C)})},w.prototype.menuFind=function(x){for(var _=this.menuList,E=0,C=_.length;E<C;E++)if(_[E].key===x)return _[E];return _[0]},w.prototype.changeActive=function(){var x;(0,u.default)(x=this.menuList).call(x,function(_){var E;(0,f.default)((0,p.default)(E=_.tryChangeActive).call(E,_),100)})},w}();t.default=y},function(e,t,n){e.exports=n(303)},function(e,t,n){var r=n(304);e.exports=r},function(e,t,n){n(305);var r=n(9);e.exports=r.Object.keys},function(e,t,n){var r=n(5),o=n(29),i=n(52);r({target:"Object",stat:!0,forced:n(11)(function(){i(1)})},{keys:function(a){return i(o(a))}})},function(e,t,n){var r=n(307);e.exports=r},function(e,t,n){n(308);var r=n(9);e.exports=r.Object.entries},function(e,t,n){var r=n(5),o=n(309).entries;r({target:"Object",stat:!0},{entries:function(i){return o(i)}})},function(e,t,n){var r=n(14),o=n(52),i=n(28),a=n(59).f,l=function(s){return function(u){for(var c,d=i(u),f=o(d),p=f.length,m=0,v=[];p>m;)c=f[m++],(!r||a.call(d,c))&&v.push(s?[c,d[c]]:d[c]);return v}};e.exports={entries:l(!0),values:l(!1)}},function(e,t,n){var r=n(311);e.exports=r},function(e,t,n){var r=n(312),o=Array.prototype;e.exports=function(i){var a=i.some;return i===o||i instanceof Array&&a===o.some?r:a}},function(e,t,n){n(313);var r=n(15);e.exports=r("Array").some},function(e,t,n){var r=n(5),o=n(30).some,i=n(67),a=n(22),l=i("some"),s=a("some");r({target:"Array",proto:!0,forced:!l||!s},{some:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(315)),i=r.__importDefault(n(316)),a=r.__importDefault(n(321)),l=r.__importDefault(n(326)),s=r.__importDefault(n(327)),u=r.__importDefault(n(328)),c=r.__importDefault(n(329)),d=r.__importDefault(n(331)),f=r.__importDefault(n(333)),p=r.__importDefault(n(334)),m=r.__importDefault(n(337)),v=r.__importDefault(n(338)),g=r.__importDefault(n(339)),b=r.__importDefault(n(350)),y=r.__importDefault(n(365)),w=r.__importDefault(n(369)),x=r.__importDefault(n(137)),_=r.__importDefault(n(378)),E=r.__importDefault(n(380)),C=r.__importDefault(n(381)),T=r.__importDefault(n(382)),k=r.__importDefault(n(401)),I=r.__importDefault(n(406)),O=r.__importDefault(n(409));t.default={bold:o.default,head:i.default,italic:l.default,link:a.default,underline:s.default,strikeThrough:u.default,fontName:c.default,fontSize:d.default,justify:f.default,quote:p.default,backColor:m.default,foreColor:v.default,video:g.default,image:b.default,indent:y.default,emoticon:w.default,list:x.default,lineHeight:_.default,undo:E.default,redo:C.default,table:T.default,code:k.default,splitLine:I.default,todo:O.default}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(23)),i=r.__importDefault(n(3)),a=function(l){function s(u){var c=i.default(`<div class="w-e-menu" data-title="\u52A0\u7C97"> |
|
736 |
<i class="w-e-icon-bold"></i> |
|
737 |
</div>`);return l.call(this,c,u)||this}return r.__extends(s,l),s.prototype.clickHandler=function(){var u=this.editor,c=u.selection.isSelectionEmpty();c&&u.selection.createEmptyRange(),u.cmd.do("bold"),c&&(u.selection.collapseRange(),u.selection.restoreSelection())},s.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("bold")?this.active():this.unActive()},s}(o.default);t.default=a},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(27)),a=r(n(31)),l=r(n(4)),s=r(n(317)),u=r(n(44));(0,o.default)(t,"__esModule",{value:!0});var c=n(2),d=c.__importDefault(n(24)),f=c.__importDefault(n(3)),p=n(6),m=n(7),v=function(g){function b(y){var w=this,x=f.default('<div class="w-e-menu" data-title="\u6807\u9898"><i class="w-e-icon-header"></i></div>'),_={width:100,title:"\u8BBE\u7F6E\u6807\u9898",type:"list",list:[{$elem:f.default("<h1>H1</h1>"),value:"<h1>"},{$elem:f.default("<h2>H2</h2>"),value:"<h2>"},{$elem:f.default("<h3>H3</h3>"),value:"<h3>"},{$elem:f.default("<h4>H4</h4>"),value:"<h4>"},{$elem:f.default("<h5>H5</h5>"),value:"<h5>"},{$elem:f.default("<p>"+y.i18next.t("menus.dropListMenu.head.\u6B63\u6587")+"</p>"),value:"<p>"}],clickHandler:function(E){w.command(E)}};return w=g.call(this,x,y,_)||this,y.config.onCatalogChange&&(w.oldCatalogs=[],w.addListenerCatalog(),w.getCatalogs()),w}return c.__extends(b,g),b.prototype.command=function(y){var w=this.editor,x=w.selection.getSelectionContainerElem();if(x&&w.$textElem.equal(x))this.setMultilineHead(y);else{var _;if((0,i.default)(_=["OL","UL","LI","TABLE","TH","TR","CODE","HR"]).call(_,f.default(x).getNodeName())>-1)return;w.cmd.do("formatBlock",y)}y!=="<p>"&&this.addUidForSelectionElem()},b.prototype.addUidForSelectionElem=function(){var y=this.editor.selection.getSelectionContainerElem(),w=p.getRandomCode();f.default(y).attr("id",w)},b.prototype.addListenerCatalog=function(){var y=this;this.editor.txt.eventHooks.changeEvents.push(function(){y.getCatalogs()})},b.prototype.getCatalogs=function(){var y=this.editor,w=this.editor.$textElem,x=y.config.onCatalogChange,_=(0,a.default)(w).call(w,"h1,h2,h3,h4,h5"),E=[];(0,l.default)(_).call(_,function(C,T){var k=f.default(C),I=k.attr("id"),O=k.getNodeName(),F=k.text();I||(I=p.getRandomCode(),k.attr("id",I)),F&&E.push({tag:O,id:I,text:F})}),(0,s.default)(this.oldCatalogs)!==(0,s.default)(E)&&(this.oldCatalogs=E,x&&x(E))},b.prototype.setMultilineHead=function(y){var w,x,_=this,E=this.editor,C=E.selection,T=(w=C.getSelectionContainerElem())===null||w===void 0?void 0:w.elems[0],k=["IMG","VIDEO","TABLE","TH","TR","UL","OL","PRE","HR","BLOCKQUOTE"],I=f.default(C.getSelectionStartElem()),O=f.default(C.getSelectionEndElem());O.elems[0].outerHTML===f.default(m.EMPTY_P).elems[0].outerHTML&&!O.elems[0].nextSibling&&(O=O.prev());var F=[];F.push(I.getNodeTop(E));var N=[],B=(x=C.getRange())===null||x===void 0?void 0:x.commonAncestorContainer.childNodes;B==null||(0,l.default)(B).call(B,function(P,H){P===F[0].getNode()&&N.push(H),P===O.getNodeTop(E).getNode()&&N.push(H)});for(var L=0;F[L].getNode()!==O.getNodeTop(E).getNode();){if(!F[L].elems[0])return;var V=f.default(F[L].next().getNode());F.push(V),L++}F==null||(0,l.default)(F).call(F,function(P,H){if(!_.hasTag(P,k)){var U=f.default(y),G=P.parent().getNode();U.html(""+P.html()),G.insertBefore(U.getNode(),P.getNode()),P.remove()}}),C.createRangeByElems(T.children[N[0]],T.children[N[1]])},b.prototype.hasTag=function(y,w){var x,_=this;if(!y)return!1;if((0,u.default)(w).call(w,y==null?void 0:y.getNodeName()))return!0;var E=!1;return(x=y.children())===null||x===void 0||(0,l.default)(x).call(x,function(C){E=_.hasTag(f.default(C),w)}),E},b.prototype.tryChangeActive=function(){var y=/^h/i,w=this.editor.cmd.queryCommandValue("formatBlock");y.test(w)?this.active():this.unActive()},b}(d.default);t.default=v},function(e,t,n){e.exports=n(318)},function(e,t,n){var r=n(319);e.exports=r},function(e,t,n){n(320);var r=n(9);r.JSON||(r.JSON={stringify:JSON.stringify}),e.exports=function(o,i,a){return r.JSON.stringify.apply(null,arguments)}},function(e,t,n){var r=n(5),o=n(35),i=n(11),a=o("JSON","stringify"),l=/[\uD800-\uDFFF]/g,s=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,c=function(f,p,m){var v=m.charAt(p-1),g=m.charAt(p+1);return s.test(f)&&!u.test(g)||u.test(f)&&!s.test(v)?"\\u"+f.charCodeAt(0).toString(16):f},d=i(function(){return a("\uDF06\uD834")!=='"\uDF06\uD834"'||a("\uDEAD")!=='"\uDEAD"'});a&&r({target:"JSON",stat:!0,forced:d},{stringify:function(f,p,m){var v=a.apply(null,arguments);return typeof v=="string"?v.replace(l,c):v}})},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(37)),s=a.__importDefault(n(3)),u=a.__importDefault(n(322)),c=a.__importDefault(n(134)),d=a.__importDefault(n(32)),f=a.__importDefault(n(324)),p=n(7),m=function(v){function g(b){var y=this,w=s.default('<div class="w-e-menu" data-title="\u94FE\u63A5"><i class="w-e-icon-link"></i></div>');return y=v.call(this,w,b)||this,f.default(b),y}return a.__extends(g,v),g.prototype.clickHandler=function(){var b,y=this.editor,w=y.selection.getSelectionContainerElem(),x=y.$textElem,_=x.html();if((0,i.default)(_).call(_)===p.EMPTY_P){var E=x.children();y.selection.createRangeByElem(E,!0,!0),w=y.selection.getSelectionContainerElem()}if(!w||!y.$textElem.equal(w))if(this.isActive){if(!(b=y.selection.getSelectionContainerElem()))return;this.createPanel(b.text(),b.attr("href"))}else y.selection.isSelectionEmpty()?this.createPanel("",""):this.createPanel(y.selection.getSelectionText(),"")},g.prototype.createPanel=function(b,y){var w=u.default(this.editor,b,y);new d.default(this,w).create()},g.prototype.tryChangeActive=function(){var b=this.editor;c.default(b)?this.active():this.unActive()},g}(l.default);t.default=m},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3)),u=a.__importDefault(n(134)),c=n(323);function d(f,p,m){var v,g=l.getRandom("input-link"),b=l.getRandom("input-text"),y=l.getRandom("btn-ok"),w=l.getRandom("btn-del"),x=u.default(f)?"inline-block":"none";function _(){if(u.default(f)){var I=f.selection.getSelectionContainerElem();!I||(f.selection.createRangeByElem(I),f.selection.restoreSelection(),v=I)}}function E(I,O){var F=new RegExp(/(<\/*ul>)|(<\/*li>)|(<\/*ol>)/g);I=I.replace(F,""),u.default(f)&&_(),f.cmd.do("insertHTML",'<a href="'+O+'" target="_blank">'+I+"</a>")}function C(){if(u.default(f)){_();var I=v.text();f.cmd.do("insertHTML","<span>"+I+"</span>")}}function T(I,O){var F=f.config.linkCheck(I,O);if(F!==void 0){if(F===!0)return!0;f.config.customAlert(F,"warning")}return!1}var k={width:300,height:0,tabs:[{title:f.i18next.t("menus.panelMenus.link.\u94FE\u63A5"),tpl:`<div> |
|
738 |
<input |
|
739 |
id="`+b+`" |
|
740 |
type="text" |
|
741 |
class="block" |
|
742 |
value="`+p+`" |
|
743 |
placeholder="`+f.i18next.t("menus.panelMenus.link.\u94FE\u63A5\u6587\u5B57")+`"/> |
|
744 |
</td> |
|
745 |
<input |
|
746 |
id="`+g+`" |
|
747 |
type="text" |
|
748 |
class="block" |
|
749 |
value="`+m+`" |
|
750 |
placeholder="`+f.i18next.t("\u5982")+` https://..."/> |
|
751 |
</td> |
|
752 |
<div class="w-e-button-container"> |
|
753 |
<button type="button" id="`+y+`" class="right"> |
|
754 |
`+f.i18next.t("\u63D2\u5165")+` |
|
755 |
</button> |
|
756 |
<button type="button" id="`+w+'" class="gray right" style="display:'+x+`"> |
|
757 |
`+f.i18next.t("menus.panelMenus.link.\u53D6\u6D88\u94FE\u63A5")+` |
|
758 |
</button> |
|
759 |
</div> |
|
760 |
</div>`,events:[{selector:"#"+y,type:"click",fn:function(){var I,O,F,N;f.selection.restoreSelection();var B=f.selection.getSelectionRangeTopNodes()[0].getNode(),L=window.getSelection(),V=s.default("#"+g),P=s.default("#"+b),H=(0,i.default)(I=V.val()).call(I),U=(0,i.default)(O=P.val()).call(O),G="";L&&(L==null||!L.isCollapsed)&&(G=(F=c.insertHtml(L,B))===null||F===void 0?void 0:(0,i.default)(F).call(F));var z=G==null?void 0:G.replace(/<.*?>/g,""),$=(N=z==null?void 0:z.length)!==null&&N!==void 0?N:0;if($<=U.length){var W=U.substring(0,$),K=U.substring($);z===W&&(U=G+K)}if(H&&(U||(U=H),T(U,H)))return E(U,H),!0},bindEnter:!0},{selector:"#"+w,type:"click",fn:function(){return C(),!0}}]}]};return k}t.default=d},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));function a(f,p){var m=f,v=f;do{if(m.textContent===p)break;v=m,m.parentNode&&(m=m==null?void 0:m.parentNode)}while((m==null?void 0:m.nodeName)!=="P");return v}function l(f,p){var m=f.nodeName,v="";if(f.nodeType===3||/^(h|H)[1-6]$/.test(m))return p;if(f.nodeType===1){var g=f.getAttribute("style"),b=f.getAttribute("face"),y=f.getAttribute("color");g&&(v=v+' style="'+g+'"'),b&&(v=v+' face="'+b+'"'),y&&(v=v+' color="'+y+'"')}return"<"+(m=m.toLowerCase())+v+">"+p+"</"+m+">"}function s(f,p,m,v){var g,b=(g=p.textContent)===null||g===void 0?void 0:g.substring(m,v),y=p,w="";do b=w=l(y,b??""),y=y==null?void 0:y.parentElement;while(y&&y.textContent!==f);return w}function u(f,p){var m,v,g,b,y,w=f.anchorNode,x=f.focusNode,_=f.anchorOffset,E=f.focusOffset,C=(m=p.textContent)!==null&&m!==void 0?m:"",T=c(p),k="",I="",O="",F=w,N=x,B=w;if(w!=null&&w.isEqualNode(x??null)){var L=s(C,w,_,E);return L=d(T,L)}for(w&&(k=s(C,w,_??0)),x&&(O=s(C,x,0,E)),w&&(F=a(w,C)),x&&(N=a(x,C)),B=(v=F==null?void 0:F.nextSibling)!==null&&v!==void 0?v:w;B==null||!B.isEqualNode(N??null);){if((B==null?void 0:B.nodeName)==="#text")I+=B==null?void 0:B.textContent;else{var V=(b=(g=B==null?void 0:B.firstChild)===null||g===void 0?void 0:g.parentElement)===null||b===void 0?void 0:b.innerHTML;B&&(I+=l(B,V??""))}var P=(y=B==null?void 0:B.nextSibling)!==null&&y!==void 0?y:B;if(P===B)break;B=P}return d(T,""+k+I+O)}function c(f){for(var p,m=(p=f.textContent)!==null&&p!==void 0?p:"",v=[];(f==null?void 0:f.textContent)===m;)f.nodeName!=="P"&&f.nodeName!=="TABLE"&&v.push(f),f=f.childNodes[0];return v}function d(f,p){return(0,i.default)(f).call(f,function(m){p=l(m,p)}),p}(0,o.default)(t,"__esModule",{value:!0}),t.insertHtml=t.createPartHtml=t.makeHtmlString=t.getTopNode=void 0,t.getTopNode=a,t.makeHtmlString=l,t.createPartHtml=s,t.insertHtml=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(325));function o(i){r.default(i)}t.default=o},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(38));function a(s){var u;function c(f){var p=[{$elem:o.default("<span>"+s.i18next.t("menus.panelMenus.link.\u67E5\u770B\u94FE\u63A5")+"</span>"),onClick:function(m,v){var g=v.attr("href");return window.open(g,"_target"),!0}},{$elem:o.default("<span>"+s.i18next.t("menus.panelMenus.link.\u53D6\u6D88\u94FE\u63A5")+"</span>"),onClick:function(m,v){var g,b;m.selection.createRangeByElem(v),m.selection.restoreSelection();var y=v.childNodes();if((y==null?void 0:y.getNodeName())==="IMG"){var w=(b=(g=m.selection.getSelectionContainerElem())===null||g===void 0?void 0:g.children())===null||b===void 0?void 0:b.elems[0].children[0];m.cmd.do("insertHTML",`<img |
|
761 |
src=`+(w==null?void 0:w.getAttribute("src"))+` |
|
762 |
style=`+(w==null?void 0:w.getAttribute("style"))+">")}else{var x=v.text();m.cmd.do("insertHTML","<span>"+x+"</span>")}return!0}}];(u=new i.default(s,f,p)).create()}function d(){u&&(u.remove(),u=null)}return{showLinkTooltip:c,hideLinkTooltip:d}}function l(s){var u=a(s),c=u.showLinkTooltip,d=u.hideLinkTooltip;s.txt.eventHooks.linkClickEvents.push(c),s.txt.eventHooks.clickEvents.push(d),s.txt.eventHooks.keyupEvents.push(d),s.txt.eventHooks.toolbarClickEvents.push(d),s.txt.eventHooks.menuClickEvents.push(d),s.txt.eventHooks.textScrollEvents.push(d)}t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(23)),i=r.__importDefault(n(3)),a=function(l){function s(u){var c=i.default(`<div class="w-e-menu" data-title="\u659C\u4F53"> |
|
763 |
<i class="w-e-icon-italic"></i> |
|
764 |
</div>`);return l.call(this,c,u)||this}return r.__extends(s,l),s.prototype.clickHandler=function(){var u=this.editor,c=u.selection.isSelectionEmpty();c&&u.selection.createEmptyRange(),u.cmd.do("italic"),c&&(u.selection.collapseRange(),u.selection.restoreSelection())},s.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("italic")?this.active():this.unActive()},s}(o.default);t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(23)),i=r.__importDefault(n(3)),a=function(l){function s(u){var c=i.default(`<div class="w-e-menu" data-title="\u4E0B\u5212\u7EBF"> |
|
765 |
<i class="w-e-icon-underline"></i> |
|
766 |
</div>`);return l.call(this,c,u)||this}return r.__extends(s,l),s.prototype.clickHandler=function(){var u=this.editor,c=u.selection.isSelectionEmpty();c&&u.selection.createEmptyRange(),u.cmd.do("underline"),c&&(u.selection.collapseRange(),u.selection.restoreSelection())},s.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("underline")?this.active():this.unActive()},s}(o.default);t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(23)),i=r.__importDefault(n(3)),a=function(l){function s(u){var c=i.default(`<div class="w-e-menu" data-title="\u5220\u9664\u7EBF"> |
|
767 |
<i class="w-e-icon-strikethrough"></i> |
|
768 |
</div>`);return l.call(this,c,u)||this}return r.__extends(s,l),s.prototype.clickHandler=function(){var u=this.editor,c=u.selection.isSelectionEmpty();c&&u.selection.createEmptyRange(),u.cmd.do("strikeThrough"),c&&(u.selection.collapseRange(),u.selection.restoreSelection())},s.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("strikeThrough")?this.active():this.unActive()},s}(o.default);t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(24)),i=r.__importDefault(n(3)),a=r.__importDefault(n(330)),l=function(s){function u(c){var d=this,f=i.default(`<div class="w-e-menu" data-title="\u5B57\u4F53"> |
|
769 |
<i class="w-e-icon-font"></i> |
|
770 |
</div>`),p={width:100,title:"\u8BBE\u7F6E\u5B57\u4F53",type:"list",list:new a.default(c.config.fontNames).getItemList(),clickHandler:function(m){d.command(m)}};return d=s.call(this,f,c,p)||this}return r.__extends(u,s),u.prototype.command=function(c){var d,f=this.editor,p=f.selection.isSelectionEmpty(),m=(d=f.selection.getSelectionContainerElem())===null||d===void 0?void 0:d.elems[0];if(m!=null){var v=(m==null?void 0:m.nodeName.toLowerCase())!=="p",g=(m==null?void 0:m.getAttribute("face"))===c;if(p){if(v&&!g){var b=f.selection.getSelectionRangeTopNodes();f.selection.createRangeByElem(b[0]),f.selection.moveCursor(b[0].elems[0])}f.selection.setRangeToElem(m),f.selection.createEmptyRange()}f.cmd.do("fontName",c),p&&(f.selection.collapseRange(),f.selection.restoreSelection())}},u.prototype.tryChangeActive=function(){},u}(o.default);t.default=l},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3)),l=function(){function s(u){var c=this;this.itemList=[],(0,i.default)(u).call(u,function(d){var f=typeof d=="string"?d:d.value,p=typeof d=="string"?d:d.name;c.itemList.push({$elem:a.default(`<p style="font-family:'`+f+`'">`+p+"</p>"),value:p})})}return s.prototype.getItemList=function(){return this.itemList},s}();t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(24)),i=r.__importDefault(n(3)),a=r.__importDefault(n(332)),l=function(s){function u(c){var d=this,f=i.default(`<div class="w-e-menu" data-title="\u5B57\u53F7"> |
|
771 |
<i class="w-e-icon-text-heigh"></i> |
|
772 |
</div>`),p={width:160,title:"\u8BBE\u7F6E\u5B57\u53F7",type:"list",list:new a.default(c.config.fontSizes).getItemList(),clickHandler:function(m){d.command(m)}};return d=s.call(this,f,c,p)||this}return r.__extends(u,s),u.prototype.command=function(c){var d,f=this.editor,p=f.selection.isSelectionEmpty();((d=f.selection.getSelectionContainerElem())===null||d===void 0?void 0:d.elems[0])!=null&&(f.cmd.do("fontSize",c),p&&(f.selection.collapseRange(),f.selection.restoreSelection()))},u.prototype.tryChangeActive=function(){},u}(o.default);t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3)),o=function(){function i(a){for(var l in this.itemList=[],a){var s=a[l];this.itemList.push({$elem:r.default('<p style="font-size:'+l+'">'+s.name+"</p>"),value:s.value})}}return i.prototype.getItemList=function(){return this.itemList},i}();t.default=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(27));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(24)),u=l.__importDefault(n(3)),c=["LI"],d=["UL","BLOCKQUOTE"],f=function(p){function m(v){var g=this,b=u.default('<div class="w-e-menu" data-title="\u5BF9\u9F50"><i class="w-e-icon-paragraph-left"></i></div>'),y={width:100,title:"\u5BF9\u9F50\u65B9\u5F0F",type:"list",list:[{$elem:u.default(`<p> |
|
773 |
<i class="w-e-icon-paragraph-left w-e-drop-list-item"></i> |
|
774 |
`+v.i18next.t("menus.dropListMenu.justify.\u9760\u5DE6")+` |
|
775 |
</p>`),value:"left"},{$elem:u.default(`<p> |
|
776 |
<i class="w-e-icon-paragraph-center w-e-drop-list-item"></i> |
|
777 |
`+v.i18next.t("menus.dropListMenu.justify.\u5C45\u4E2D")+` |
|
778 |
</p>`),value:"center"},{$elem:u.default(`<p> |
|
779 |
<i class="w-e-icon-paragraph-right w-e-drop-list-item"></i> |
|
780 |
`+v.i18next.t("menus.dropListMenu.justify.\u9760\u53F3")+` |
|
781 |
</p>`),value:"right"},{$elem:u.default(`<p> |
|
782 |
<i class="w-e-icon-paragraph-justify w-e-drop-list-item"></i> |
|
783 |
`+v.i18next.t("menus.dropListMenu.justify.\u4E24\u7AEF")+` |
|
784 |
</p>`),value:"justify"}],clickHandler:function(w){g.command(w)}};return g=p.call(this,b,v,y)||this}return l.__extends(m,p),m.prototype.command=function(v){var g=this.editor,b=g.selection,y=b.getSelectionContainerElem();b.saveRange();var w=g.selection.getSelectionRangeTopNodes();if(y!=null&&y.length)if(this.isSpecialNode(y,w[0])||this.isSpecialTopNode(w[0])){var x=this.getSpecialNodeUntilTop(y,w[0]);if(x==null)return;u.default(x).css("text-align",v)}else(0,i.default)(w).call(w,function(_){_.css("text-align",v)});b.restoreSelection()},m.prototype.getSpecialNodeUntilTop=function(v,g){for(var b=v.elems[0],y=g.elems[0];b!=null;){if((0,a.default)(c).call(c,b==null?void 0:b.nodeName)!==-1||b.parentNode===y)return b;b=b.parentNode}return b},m.prototype.isSpecialNode=function(v,g){var b=this.getSpecialNodeUntilTop(v,g);return b!=null&&(0,a.default)(c).call(c,b.nodeName)!==-1},m.prototype.isSpecialTopNode=function(v){var g;return v!=null&&(0,a.default)(d).call(d,(g=v.elems[0])===null||g===void 0?void 0:g.nodeName)!==-1},m.prototype.tryChangeActive=function(){},m}(s.default);t.default=f},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=a.__importDefault(n(23)),u=a.__importDefault(n(335)),c=a.__importDefault(n(336)),d=n(7),f=function(p){function m(v){var g=this,b=l.default(`<div class="w-e-menu" data-title="\u5F15\u7528"> |
|
785 |
<i class="w-e-icon-quotes-left"></i> |
|
786 |
</div>`);return g=p.call(this,b,v)||this,u.default(v),g}return a.__extends(m,p),m.prototype.clickHandler=function(){var v,g,b=this.editor,y=b.selection.isSelectionEmpty(),w=b.selection.getSelectionRangeTopNodes(),x=w[w.length-1];if(this.getTopNodeName()!=="BLOCKQUOTE"){var _=c.default(w);if(b.$textElem.equal(x)){var E=(v=b.selection.getSelectionContainerElem())===null||v===void 0?void 0:v.elems[0];b.selection.createRangeByElems(E.children[0],E.children[0]),w=b.selection.getSelectionRangeTopNodes(),_=c.default(w),x.append(_)}else _.insertAfter(x);this.delSelectNode(w);var C=(g=_.childNodes())===null||g===void 0?void 0:g.last().getNode();return C==null?void 0:(C.textContent?b.selection.moveCursor(C):b.selection.moveCursor(C,0),this.tryChangeActive(),void l.default(d.EMPTY_P).insertAfter(_))}var T=l.default(x.childNodes()),k=T.length,I=x;(0,i.default)(T).call(T,function(O){var F=l.default(O);F.insertAfter(I),I=F}),x.remove(),b.selection.moveCursor(T.elems[k-1]),this.tryChangeActive(),y&&(b.selection.collapseRange(),b.selection.restoreSelection())},m.prototype.tryChangeActive=function(){var v;((v=this.editor.selection.getSelectionRangeTopNodes()[0])===null||v===void 0?void 0:v.getNodeName())==="BLOCKQUOTE"?this.active():this.unActive()},m.prototype.getTopNodeName=function(){var v=this.editor.selection.getSelectionRangeTopNodes()[0];return v==null?void 0:v.getNodeName()},m.prototype.delSelectNode=function(v){(0,i.default)(v).call(v,function(g){g.remove()})},m}(s.default);t.default=f},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=n(7),i=r.__importDefault(n(3));function a(l){function s(u){var c,d=l.selection.getSelectionContainerElem(),f=l.selection.getSelectionRangeTopNodes()[0];if((f==null?void 0:f.getNodeName())==="BLOCKQUOTE"){if(d.getNodeName()==="BLOCKQUOTE"){var p=(c=d.childNodes())===null||c===void 0?void 0:c.getNode();l.selection.moveCursor(p)}if(d.text()===""){u.preventDefault(),d.remove();var m=i.default(o.EMPTY_P);m.insertAfter(f),l.selection.moveCursor(m.getNode(),0)}f.text()===""&&f.remove()}}l.txt.eventHooks.enterDownEvents.push(s)}t.default=a},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(s){var u=a.default("<blockquote></blockquote>");return(0,i.default)(s).call(s,function(c){u.append(c.clone(!0))}),u}t.default=l},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(24)),s=a.__importDefault(n(3)),u=n(6),c=function(d){function f(p){var m,v=this,g=s.default(`<div class="w-e-menu" data-title="\u80CC\u666F\u8272"> |
|
787 |
<i class="w-e-icon-paint-brush"></i> |
|
788 |
</div>`),b={width:120,title:"\u80CC\u666F\u989C\u8272",type:"inline-block",list:(0,i.default)(m=p.config.colors).call(m,function(y){return{$elem:s.default('<i style="color:'+y+';" class="w-e-icon-paint-brush"></i>'),value:y}}),clickHandler:function(y){v.command(y)}};return v=d.call(this,g,p,b)||this}return a.__extends(f,d),f.prototype.command=function(p){var m,v=this.editor,g=v.selection.isSelectionEmpty(),b=(m=v.selection.getSelectionContainerElem())===null||m===void 0?void 0:m.elems[0];if(b!=null){var y=(b==null?void 0:b.nodeName.toLowerCase())!=="p",w=b==null?void 0:b.style.backgroundColor,x=u.hexToRgb(p)===w;if(g){if(y&&!x){var _=v.selection.getSelectionRangeTopNodes();v.selection.createRangeByElem(_[0]),v.selection.moveCursor(_[0].elems[0])}v.selection.createEmptyRange()}v.cmd.do("backColor",p),g&&(v.selection.collapseRange(),v.selection.restoreSelection())}},f.prototype.tryChangeActive=function(){},f}(l.default);t.default=c},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(24)),s=a.__importDefault(n(3)),u=function(c){function d(f){var p,m=this,v=s.default(`<div class="w-e-menu" data-title="\u6587\u5B57\u989C\u8272"> |
|
789 |
<i class="w-e-icon-pencil2"></i> |
|
790 |
</div>`),g={width:120,title:"\u6587\u5B57\u989C\u8272",type:"inline-block",list:(0,i.default)(p=f.config.colors).call(p,function(b){return{$elem:s.default('<i style="color:'+b+';" class="w-e-icon-pencil2"></i>'),value:b}}),clickHandler:function(b){m.command(b)}};return m=c.call(this,v,f,g)||this}return a.__extends(d,c),d.prototype.command=function(f){var p,m=this.editor,v=m.selection.isSelectionEmpty(),g=(p=m.selection.getSelectionContainerElem())===null||p===void 0?void 0:p.elems[0];if(g!=null){var b=m.selection.getSelectionText();if(g.nodeName==="A"&&g.textContent===b){var y=s.default("<span>​</span>").getNode();g.appendChild(y)}m.cmd.do("foreColor",f),v&&(m.selection.collapseRange(),m.selection.restoreSelection())}},d.prototype.tryChangeActive=function(){},d}(l.default);t.default=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(32)),a=r.__importDefault(n(37)),l=r.__importDefault(n(340)),s=r.__importDefault(n(346)),u=function(c){function d(f){var p=this,m=o.default(`<div class="w-e-menu" data-title="\u89C6\u9891"> |
|
791 |
<i class="w-e-icon-play"></i> |
|
792 |
</div>`);return p=c.call(this,m,f)||this,s.default(f),p}return r.__extends(d,c),d.prototype.clickHandler=function(){this.createPanel("")},d.prototype.createPanel=function(f){var p=l.default(this.editor,f);new i.default(this,p).create()},d.prototype.tryChangeActive=function(){},d}(a.default);t.default=u},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3)),u=a.__importDefault(n(341)),c=n(7);function d(f,p){var m=f.config,v=new u.default(f),g=l.getRandom("input-iframe"),b=l.getRandom("btn-ok"),y=l.getRandom("input-upload"),w=l.getRandom("btn-local-ok");function x(T){f.cmd.do("insertHTML",T+c.EMPTY_P),f.config.onlineVideoCallback(T)}function _(T){var k=f.config.onlineVideoCheck(T);return k===!0||(typeof k=="string"&&f.config.customAlert(k,"error"),!1)}var E=[{title:f.i18next.t("menus.panelMenus.video.\u4E0A\u4F20\u89C6\u9891"),tpl:`<div class="w-e-up-video-container"> |
|
793 |
<div id="`+w+`" class="w-e-up-btn"> |
|
794 |
<i class="w-e-icon-upload2"></i> |
|
795 |
</div> |
|
796 |
<div style="display:none;"> |
|
797 |
<input id="`+y+`" type="file" accept="video/*"/> |
|
798 |
</div> |
|
799 |
</div>`,events:[{selector:"#"+w,type:"click",fn:function(){var T=s.default("#"+y).elems[0];if(!T)return!0;T.click()}},{selector:"#"+y,type:"change",fn:function(){var T=s.default("#"+y).elems[0];if(!T)return!0;var k=T.files;return k.length&&v.uploadVideo(k),!0}}]},{title:f.i18next.t("menus.panelMenus.video.\u63D2\u5165\u89C6\u9891"),tpl:`<div> |
|
800 |
<input |
|
801 |
id="`+g+`" |
|
802 |
type="text" |
|
803 |
class="block" |
|
804 |
placeholder="`+f.i18next.t("\u5982")+`\uFF1A<iframe src=... ></iframe>"/> |
|
805 |
</td> |
|
806 |
<div class="w-e-button-container"> |
|
807 |
<button type="button" id="`+b+`" class="right"> |
|
808 |
`+f.i18next.t("\u63D2\u5165")+` |
|
809 |
</button> |
|
810 |
</div> |
|
811 |
</div>`,events:[{selector:"#"+b,type:"click",fn:function(){var T,k=s.default("#"+g),I=(0,i.default)(T=k.val()).call(T);if(I&&_(I))return x(I),!0},bindEnter:!0}]}],C={width:300,height:0,tabs:[]};return window.FileReader&&(m.uploadVideoServer||m.customUploadVideo)&&C.tabs.push(E[0]),m.showLinkVideo&&C.tabs.push(E[1]),C}t.default=d},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(132)),a=r(n(57)),l=r(n(4)),s=r(n(27));(0,o.default)(t,"__esModule",{value:!0});var u=n(2),c=n(6),d=u.__importDefault(n(135)),f=u.__importDefault(n(136)),p=n(7),m=n(6),v=function(){function g(b){this.editor=b}return g.prototype.uploadVideo=function(b){var y=this;if(b.length){var w,x=this.editor,_=x.config,E="validate.",C=function(X){return x.i18next.t(E+X)},T=_.uploadVideoServer,k=_.uploadVideoMaxSize/1024,I=_.uploadVideoName,O=_.uploadVideoParams,F=_.uploadVideoParamsWithUrl,N=_.uploadVideoHeaders,B=_.uploadVideoHooks,L=_.uploadVideoTimeout,V=_.withVideoCredentials,P=_.customUploadVideo,H=_.uploadVideoAccept,U=[],G=[];if(c.arrForEach(b,function(X){var te=X.name,ne=X.size/1024/1024;if(te&&ne){if(!(H instanceof Array))return void G.push("\u3010"+H+"\u3011"+C("uploadVideoAccept \u4E0D\u662FArray"));if(!(0,i.default)(H).call(H,function(se){return se===te.split(".")[te.split(".").length-1]}))return void G.push("\u3010"+te+"\u3011"+C("\u4E0D\u662F\u89C6\u9891"));if(k<ne)return void G.push("\u3010"+te+"\u3011"+C("\u5927\u4E8E")+" "+k+"M");U.push(X)}}),G.length)return void _.customAlert(C("\u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7")+`: |
|
812 |
`+G.join(` |
|
813 |
`),"warning");if(U.length===0)return void _.customAlert(C("\u4F20\u5165\u7684\u6587\u4EF6\u4E0D\u5408\u6CD5"),"warning");if(P&&typeof P=="function")return void P(U,(0,a.default)(w=this.insertVideo).call(w,this));var z=new FormData;if((0,l.default)(U).call(U,function(X,te){var ne=I||X.name;U.length>1&&(ne+=te+1),z.append(ne,X)}),T){var $=T.split("#");T=$[0];var W=$[1]||"";(0,l.default)(c).call(c,O,function(X,te){F&&((0,s.default)(T).call(T,"?")>0?T+="&":T+="?",T=T+X+"="+te),z.append(X,te)}),W&&(T+="#"+W);var K=d.default(T,{timeout:L,formData:z,headers:N,withCredentials:!!V,beforeSend:function(X){if(B.before)return B.before(X,x,U)},onTimeout:function(X){_.customAlert(C("\u4E0A\u4F20\u89C6\u9891\u8D85\u65F6"),"error"),B.timeout&&B.timeout(X,x)},onProgress:function(X,te){var ne=new f.default(x);te.lengthComputable&&(X=te.loaded/te.total,ne.show(X))},onError:function(X){_.customAlert(C("\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF"),"error",C("\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF")+"\uFF0C"+C("\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001")+": "+X.status),B.error&&B.error(X,x)},onFail:function(X,te){_.customAlert(C("\u4E0A\u4F20\u89C6\u9891\u5931\u8D25"),"error",C("\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+"\uFF0C"+C("\u8FD4\u56DE\u7ED3\u679C")+": "+te),B.fail&&B.fail(X,x,te)},onSuccess:function(X,te){if(B.customInsert){var ne;B.customInsert((0,a.default)(ne=y.insertVideo).call(ne,y),te,x)}else{if(te.errno!="0")return _.customAlert(C("\u4E0A\u4F20\u89C6\u9891\u5931\u8D25"),"error",C("\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+"\uFF0C"+C("\u8FD4\u56DE\u7ED3\u679C")+" errno="+te.errno),void(B.fail&&B.fail(X,x,te));var se=te.data;y.insertVideo(se.url),B.success&&B.success(X,x,te)}}});typeof K=="string"&&_.customAlert(K,"error")}}},g.prototype.insertVideo=function(b){var y=this.editor,w=y.config,x="validate.",_=function(C,T){return T===void 0&&(T=x),y.i18next.t(T+C)};if(w.customInsertVideo)w.customInsertVideo(b);else{m.UA.isFirefox?y.cmd.do("insertHTML",'<p data-we-video-p="true"><video src="'+b+'" controls="controls" style="max-width:100%"></video></p><p>​</p>'):y.cmd.do("insertHTML",'<video src="'+b+'" controls="controls" style="max-width:100%"></video>'+p.EMPTY_P);var E=document.createElement("video");E.onload=function(){E=null},E.onerror=function(){w.customAlert(_("\u63D2\u5165\u89C6\u9891\u9519\u8BEF"),"error","wangEditor: "+_("\u63D2\u5165\u89C6\u9891\u9519\u8BEF")+"\uFF0C"+_("\u89C6\u9891\u94FE\u63A5")+' "'+b+'"\uFF0C'+_("\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25")),E=null},E.onabort=function(){return E=null},E.src=b}},g}();t.default=v},function(e,t,n){e.exports=n(343)},function(e,t,n){var r=n(344);e.exports=r},function(e,t,n){n(345);var r=n(9);e.exports=r.Date.now},function(e,t,n){n(5)({target:"Date",stat:!0},{now:function(){return new Date().getTime()}})},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(347)),i=r.__importDefault(n(349));function a(l){o.default(l),i.default(l)}t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(38)),a=r.__importDefault(n(348));function l(u){var c,d=function(m,v){return v===void 0&&(v=""),u.i18next.t(v+m)};function f(m){var v=[{$elem:o.default("<span class='w-e-icon-trash-o'></span>"),onClick:function(g,b){return b.remove(),!0}},{$elem:o.default("<span>100%</span>"),onClick:function(g,b){return b.attr("width","100%"),b.removeAttr("height"),!0}},{$elem:o.default("<span>50%</span>"),onClick:function(g,b){return b.attr("width","50%"),b.removeAttr("height"),!0}},{$elem:o.default("<span>30%</span>"),onClick:function(g,b){return b.attr("width","30%"),b.removeAttr("height"),!0}},{$elem:o.default("<span>"+d("\u91CD\u7F6E")+"</span>"),onClick:function(g,b){return b.removeAttr("width"),b.removeAttr("height"),!0}},{$elem:o.default("<span>"+d("menus.justify.\u9760\u5DE6")+"</span>"),onClick:function(g,b){return a.default(b,"left"),!0}},{$elem:o.default("<span>"+d("menus.justify.\u5C45\u4E2D")+"</span>"),onClick:function(g,b){return a.default(b,"center"),!0}},{$elem:o.default("<span>"+d("menus.justify.\u9760\u53F3")+"</span>"),onClick:function(g,b){return a.default(b,"right"),!0}}];(c=new i.default(u,m,v)).create()}function p(){c&&(c.remove(),c=null)}return{showVideoTooltip:f,hideVideoTooltip:p}}function s(u){var c=l(u),d=c.showVideoTooltip,f=c.hideVideoTooltip;u.txt.eventHooks.videoClickEvents.push(d),u.txt.eventHooks.clickEvents.push(f),u.txt.eventHooks.keyupEvents.push(f),u.txt.eventHooks.toolbarClickEvents.push(f),u.txt.eventHooks.menuClickEvents.push(f),u.txt.eventHooks.textScrollEvents.push(f),u.txt.eventHooks.changeEvents.push(f)}t.createShowHideFn=l,t.default=s},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(44));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(u,c){var d=s(u,["P"]);d&&a.default(d).css("text-align",c)}function s(u,c){for(var d,f=u.elems[0];f!=null;){if((0,i.default)(c).call(c,f==null?void 0:f.nodeName))return f;if(((d=f==null?void 0:f.parentNode)===null||d===void 0?void 0:d.nodeName)==="BODY")return null;f=f.parentNode}return f}t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(6);function o(i){if(r.UA.isFirefox){var a=i.txt,l=i.selection;a.eventHooks.keydownEvents.push(function(s){var u=l.getSelectionContainerElem();if(u){var c=u.getNodeTop(i),d=c.length&&c.prev().length?c.prev():null;d&&d.attr("data-we-video-p")&&l.getCursorPos()===0&&s.keyCode===8&&d.remove()}})}}t.default=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(7),s=a.__importDefault(n(3)),u=a.__importDefault(n(32)),c=a.__importDefault(n(37)),d=a.__importDefault(n(351)),f=a.__importDefault(n(364)),p=function(m){function v(g){var b,y=this,w=s.default('<div class="w-e-menu" data-title="\u56FE\u7247"><i class="w-e-icon-image"></i></div>'),x=f.default(g);return x.onlyUploadConf&&(w=x.onlyUploadConf.$elem,(0,i.default)(b=x.onlyUploadConf.events).call(b,function(_){var E=_.type,C=_.fn||l.EMPTY_FN;w.on(E,function(T){T.stopPropagation(),C(T)})})),(y=m.call(this,w,g)||this).imgPanelConfig=x,d.default(g),y}return a.__extends(v,m),v.prototype.clickHandler=function(){this.imgPanelConfig.onlyUploadConf||this.createPanel()},v.prototype.createPanel=function(){var g=this.imgPanelConfig,b=new u.default(this,g);this.setPanel(b),b.create()},v.prototype.tryChangeActive=function(){},v}(c.default);t.default=p},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(352)),i=r.__importDefault(n(353)),a=r.__importDefault(n(354)),l=r.__importDefault(n(362)),s=r.__importDefault(n(363));function u(c){o.default(c),i.default(c),a.default(c),l.default(c),s.default(c)}t.default=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=n(130),i=r.__importDefault(n(96));function a(c,d){var f=c.config,p=f.pasteFilterStyle,m=f.pasteIgnoreImg;return!!o.getPasteHtml(d,p,m)||!!o.getPasteText(d)}function l(c,d){for(var f,p=((f=d.clipboardData)===null||f===void 0?void 0:f.types)||[],m=0;m<p.length;m++)if(p[m]==="Files")return!0;return!1}function s(c,d){if(l(d,c)||!a(d,c)){var f=o.getPasteImgs(c);f.length&&new i.default(d).uploadImg(f)}}function u(c){c.txt.eventHooks.pasteEvents.unshift(function(d){s(d,c)})}t.default=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(96));function o(i){function a(l){var s=l.dataTransfer&&l.dataTransfer.files;s&&s.length&&new r.default(i).uploadImg(s)}i.txt.eventHooks.dropEvents.push(a)}t.default=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(31)),a=r(n(355));(0,o.default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var l=n(2).__importDefault(n(3));n(360);var s=n(6);function u(m,v,g,b,y){m.attr("style","width:"+v+"px; height:"+g+"px; left:"+b+"px; top:"+y+"px;")}function c(m,v){var g=l.default(`<div class="w-e-img-drag-mask"> |
|
814 |
<div class="w-e-img-drag-show-size"></div> |
|
815 |
<div class="w-e-img-drag-rb"></div> |
|
816 |
</div>`);return g.hide(),v.append(g),g}function d(m,v,g){var b=m.getBoundingClientRect(),y=g.getBoundingClientRect(),w=y.width.toFixed(2),x=y.height.toFixed(2);(0,i.default)(v).call(v,".w-e-img-drag-show-size").text(w+"px * "+x+"px"),u(v,(0,a.default)(w),(0,a.default)(x),y.left-b.left,y.top-b.top),v.show()}function f(m){var v,g=m.$textContainerElem,b=c(m,g);function y(_,E){_.on("click",function(C){C.stopPropagation()}),_.on("mousedown",".w-e-img-drag-rb",function(C){if(C.preventDefault(),v){var T=C.clientX,k=C.clientY,I=E.getBoundingClientRect(),O=v.getBoundingClientRect(),F=O.width,N=O.height,B=O.left-I.left,L=O.top-I.top,V=F/N,P=F,H=N,U=l.default(document);U.on("mousemove",z),U.on("mouseup",$),U.on("mouseleave",G)}function G(){U.off("mousemove",z),U.off("mouseup",$)}function z(W){W.stopPropagation(),W.preventDefault(),P=F+(W.clientX-T),H=N+(W.clientY-k),P/H!=V&&(H=P/V),P=(0,a.default)(P.toFixed(2)),H=(0,a.default)(H.toFixed(2)),(0,i.default)(_).call(_,".w-e-img-drag-show-size").text(P.toFixed(2).replace(".00","")+"px * "+H.toFixed(2).replace(".00","")+"px"),u(_,P,H,B,L)}function $(){v.attr("width",P+""),v.attr("height",H+"");var W=v.getBoundingClientRect();u(_,P,H,W.left-I.left,W.top-I.top),G()}})}function w(_){if(s.UA.isIE())return!1;_&&d(g,b,v=_)}function x(){(0,i.default)(g).call(g,".w-e-img-drag-mask").hide()}return y(b,g),l.default(document).on("click",x),m.beforeDestroy(function(){l.default(document).off("click",x)}),{showDrag:w,hideDrag:x}}function p(m){var v=f(m),g=v.showDrag,b=v.hideDrag;m.txt.eventHooks.imgClickEvents.push(g),m.txt.eventHooks.textScrollEvents.push(b),m.txt.eventHooks.keyupEvents.push(b),m.txt.eventHooks.toolbarClickEvents.push(b),m.txt.eventHooks.menuClickEvents.push(b),m.txt.eventHooks.changeEvents.push(b)}t.createShowHideFn=f,t.default=p},function(e,t,n){e.exports=n(356)},function(e,t,n){var r=n(357);e.exports=r},function(e,t,n){n(358);var r=n(9);e.exports=r.parseFloat},function(e,t,n){var r=n(5),o=n(359);r({global:!0,forced:parseFloat!=o},{parseFloat:o})},function(e,t,n){var r=n(8),o=n(90).trim,i=n(68),a=r.parseFloat,l=1/a(i+"-0")!=-1/0;e.exports=l?function(s){var u=o(String(s)),c=a(u);return c===0&&u.charAt(0)=="-"?-0:c}:a},function(e,t,n){var r=n(20),o=n(361);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-text-container { |
|
817 |
overflow: hidden; |
|
818 |
} |
|
819 |
.w-e-img-drag-mask { |
|
820 |
position: absolute; |
|
821 |
z-index: 1; |
|
822 |
border: 1px dashed #ccc; |
|
823 |
box-sizing: border-box; |
|
824 |
} |
|
825 |
.w-e-img-drag-mask .w-e-img-drag-rb { |
|
826 |
position: absolute; |
|
827 |
right: -5px; |
|
828 |
bottom: -5px; |
|
829 |
width: 16px; |
|
830 |
height: 16px; |
|
831 |
border-radius: 50%; |
|
832 |
background: #ccc; |
|
833 |
cursor: se-resize; |
|
834 |
} |
|
835 |
.w-e-img-drag-mask .w-e-img-drag-show-size { |
|
836 |
min-width: 110px; |
|
837 |
height: 22px; |
|
838 |
line-height: 22px; |
|
839 |
font-size: 14px; |
|
840 |
color: #999; |
|
841 |
position: absolute; |
|
842 |
left: 0; |
|
843 |
top: 0; |
|
844 |
background-color: #999; |
|
845 |
color: #fff; |
|
846 |
border-radius: 2px; |
|
847 |
padding: 0 5px; |
|
848 |
} |
|
849 |
`,""]),e.exports=t},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(38));function a(s){var u,c=function(p,m){return m===void 0&&(m=""),s.i18next.t(m+p)};function d(p){var m=[{$elem:o.default("<span class='w-e-icon-trash-o'></span>"),onClick:function(v,g){return v.selection.createRangeByElem(g),v.selection.restoreSelection(),v.cmd.do("delete"),!0}},{$elem:o.default("<span>30%</span>"),onClick:function(v,g){return g.attr("width","30%"),g.removeAttr("height"),!0}},{$elem:o.default("<span>50%</span>"),onClick:function(v,g){return g.attr("width","50%"),g.removeAttr("height"),!0}},{$elem:o.default("<span>100%</span>"),onClick:function(v,g){return g.attr("width","100%"),g.removeAttr("height"),!0}}];m.push({$elem:o.default("<span>"+c("\u91CD\u7F6E")+"</span>"),onClick:function(v,g){return g.removeAttr("width"),g.removeAttr("height"),!0}}),p.attr("data-href")&&m.push({$elem:o.default("<span>"+c("\u67E5\u770B\u94FE\u63A5")+"</span>"),onClick:function(v,g){var b=g.attr("data-href");return b&&(b=decodeURIComponent(b),window.open(b,"_target")),!0}}),(u=new i.default(s,p,m)).create()}function f(){u&&(u.remove(),u=null)}return{showImgTooltip:d,hideImgTooltip:f}}function l(s){var u=a(s),c=u.showImgTooltip,d=u.hideImgTooltip;s.txt.eventHooks.imgClickEvents.push(c),s.txt.eventHooks.clickEvents.push(d),s.txt.eventHooks.keyupEvents.push(d),s.txt.eventHooks.toolbarClickEvents.push(d),s.txt.eventHooks.menuClickEvents.push(d),s.txt.eventHooks.textScrollEvents.push(d),s.txt.eventHooks.imgDragBarMouseDownEvents.push(d),s.txt.eventHooks.changeEvents.push(d)}t.createShowHideFn=a,t.default=l},function(e,t,n){function r(o){var i=o.txt,a=o.selection;i.eventHooks.keydownEvents.push(function(l){var s=a.getSelectionContainerElem(),u=a.getRange();if(u&&s&&l.keyCode===8&&a.isSelectionEmpty()){var c=u.startContainer,d=u.startOffset,f=null;if(d===0)for(;c!==s.elems[0]&&s.elems[0].contains(c)&&c.parentNode&&!f;){if(c.previousSibling){f=c.previousSibling;break}c=c.parentNode}else c.nodeType!==3&&(f=c.childNodes[d-1]);if(f){for(var p=f;p.childNodes.length;)p=p.childNodes[p.childNodes.length-1];p instanceof HTMLElement&&p.tagName==="IMG"&&(p.remove(),l.preventDefault())}}})}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(26)),a=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(3)),u=n(6),c=l.__importDefault(n(96));function d(f){var p,m=f.config,v=new c.default(f),g=u.getRandom("up-trigger-id"),b=u.getRandom("up-file-id"),y=u.getRandom("input-link-url"),w=u.getRandom("input-link-url-alt"),x=u.getRandom("input-link-url-href"),_=u.getRandom("btn-link"),E="menus.panelMenus.image.",C=function(V,P){return P===void 0&&(P=E),f.i18next.t(P+V)};function T(V,P,H){var U=m.linkImgCheck(V);return U===!0||(typeof U=="string"&&m.customAlert(U,"error"),!1)}var k=m.uploadImgMaxLength===1?"":'multiple="multiple"',I=(0,i.default)(p=m.uploadImgAccept).call(p,function(V){return"image/"+V}).join(","),O=function(V,P,H){return'<div class="'+V+'" data-title="'+H+`"> |
|
850 |
<div id="`+g+`" class="w-e-up-btn"> |
|
851 |
<i class="`+P+`"></i> |
|
852 |
</div> |
|
853 |
<div style="display:none;"> |
|
854 |
<input id="`+b+'" type="file" '+k+' accept="'+I+`"/> |
|
855 |
</div> |
|
856 |
</div>`},F=[{selector:"#"+g,type:"click",fn:function(){var V=m.uploadImgFromMedia;if(V&&typeof V=="function")return V(),!0;var P=s.default("#"+b).elems[0];if(!P)return!0;P.click()}},{selector:"#"+b,type:"change",fn:function(){var V=s.default("#"+b).elems[0];if(!V)return!0;var P=V.files;return P!=null&&P.length&&v.uploadImg(P),V&&(V.value=""),!0}}],N=[`<input |
|
857 |
id="`+y+`" |
|
858 |
type="text" |
|
859 |
class="block" |
|
860 |
placeholder="`+C("\u56FE\u7247\u5730\u5740")+'"/>'];m.showLinkImgAlt&&N.push(` |
|
861 |
<input |
|
862 |
id="`+w+`" |
|
863 |
type="text" |
|
864 |
class="block" |
|
865 |
placeholder="`+C("\u56FE\u7247\u6587\u5B57\u8BF4\u660E")+'"/>'),m.showLinkImgHref&&N.push(` |
|
866 |
<input |
|
867 |
id="`+x+`" |
|
868 |
type="text" |
|
869 |
class="block" |
|
870 |
placeholder="`+C("\u8DF3\u8F6C\u94FE\u63A5")+'"/>');var B=[{title:C("\u4E0A\u4F20\u56FE\u7247"),tpl:O("w-e-up-img-container","w-e-icon-upload2",""),events:F},{title:C("\u7F51\u7EDC\u56FE\u7247"),tpl:`<div> |
|
871 |
`+N.join("")+` |
|
872 |
<div class="w-e-button-container"> |
|
873 |
<button type="button" id="`+_+'" class="right">'+C("\u63D2\u5165","")+`</button> |
|
874 |
</div> |
|
875 |
</div>`,events:[{selector:"#"+_,type:"click",fn:function(){var V,P,H,U,G,z=s.default("#"+y),$=(0,a.default)(V=z.val()).call(V);if($&&(m.showLinkImgAlt&&(P=(0,a.default)(H=s.default("#"+w).val()).call(H)),m.showLinkImgHref&&(U=(0,a.default)(G=s.default("#"+x).val()).call(G)),T($)))return v.insertImg($,P,U),!0},bindEnter:!0}]}],L={width:300,height:0,tabs:[],onlyUploadConf:{$elem:s.default(O("w-e-menu","w-e-icon-image","\u56FE\u7247")),events:F}};return window.FileReader&&(m.uploadImgShowBase64||m.uploadImgServer||m.customUploadImg||m.uploadImgFromMedia)&&L.tabs.push(B[0]),m.showLinkImg&&(L.tabs.push(B[1]),L.onlyUploadConf=void 0),L}t.default=d},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=a.__importDefault(n(24)),u=a.__importDefault(n(366)),c=function(d){function f(p){var m=this,v=l.default(`<div class="w-e-menu" data-title="\u7F29\u8FDB"> |
|
876 |
<i class="w-e-icon-indent-increase"></i> |
|
877 |
</div>`),g={width:130,title:"\u8BBE\u7F6E\u7F29\u8FDB",type:"list",list:[{$elem:l.default(`<p> |
|
878 |
<i class="w-e-icon-indent-increase w-e-drop-list-item"></i> |
|
879 |
`+p.i18next.t("menus.dropListMenu.indent.\u589E\u52A0\u7F29\u8FDB")+` |
|
880 |
<p>`),value:"increase"},{$elem:l.default(`<p> |
|
881 |
<i class="w-e-icon-indent-decrease w-e-drop-list-item"></i> |
|
882 |
`+p.i18next.t("menus.dropListMenu.indent.\u51CF\u5C11\u7F29\u8FDB")+` |
|
883 |
<p>`),value:"decrease"}],clickHandler:function(b){m.command(b)}};return m=d.call(this,v,p,g)||this}return a.__extends(f,d),f.prototype.command=function(p){var m=this.editor,v=m.selection.getSelectionContainerElem();if(v&&m.$textElem.equal(v)){var g=m.selection.getSelectionRangeTopNodes();g.length>0&&(0,i.default)(g).call(g,function(b){u.default(l.default(b),p,m)})}else v&&v.length>0&&(0,i.default)(v).call(v,function(b){u.default(l.default(b),p,m)});m.selection.restoreSelection(),this.tryChangeActive()},f.prototype.tryChangeActive=function(){var p=this.editor,m=p.selection.getSelectionStartElem(),v=l.default(m).getNodeTop(p);v.length<=0||(v.elems[0].style.paddingLeft!=""?this.active():this.unActive())},f}(s.default);t.default=c},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(45)),a=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(367)),u=l.__importDefault(n(368)),c=/^(\d+)(\w+)$/,d=/^(\d+)%$/;function f(m){var v=m.config.indentation;if(typeof v=="string"){if(c.test(v)){var g,b=(0,i.default)(g=(0,a.default)(v).call(v).match(c)).call(g,1,3),y=b[0],w=b[1];return{value:Number(y),unit:w}}if(d.test(v))return{value:Number((0,a.default)(v).call(v).match(d)[1]),unit:"%"}}else if(v.value!==void 0&&v.unit)return v;return{value:2,unit:"em"}}function p(m,v,g){var b=m.getNodeTop(g);/^(P|H[0-9]*)$/.test(b.getNodeName())&&(v==="increase"?s.default(b,f(g)):v==="decrease"&&u.default(b,f(g)))}t.default=p},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(45));function a(l,s){var u=l.elems[0];if(u.style.paddingLeft==="")l.css("padding-left",s.value+s.unit);else{var c=u.style.paddingLeft,d=(0,i.default)(c).call(c,0,c.length-s.unit.length),f=Number(d)+s.value;l.css("padding-left",""+f+s.unit)}}(0,o.default)(t,"__esModule",{value:!0}),t.default=a},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(45));function a(l,s){var u=l.elems[0];if(u.style.paddingLeft!==""){var c=u.style.paddingLeft,d=(0,i.default)(c).call(c,0,c.length-s.unit.length),f=Number(d)-s.value;f>0?l.css("padding-left",""+f+s.unit):l.css("padding-left","")}}(0,o.default)(t,"__esModule",{value:!0}),t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(37)),a=r.__importDefault(n(32)),l=r.__importDefault(n(370)),s=function(u){function c(d){var f=o.default(`<div class="w-e-menu" data-title="\u8868\u60C5"> |
|
884 |
<i class="w-e-icon-happy"></i> |
|
885 |
</div>`);return u.call(this,f,d)||this}return r.__extends(c,u),c.prototype.createPanel=function(){var d=l.default(this.editor);new a.default(this,d).create()},c.prototype.clickHandler=function(){this.createPanel()},c.prototype.tryChangeActive=function(){},c}(i.default);t.default=s},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(26)),a=r(n(70)),l=r(n(17));(0,o.default)(t,"__esModule",{value:!0});var s=n(2).__importDefault(n(3));function u(c){var d=c.config.emotions;function f(m){var v,g,b=[];return m.type=="image"?(b=(0,i.default)(v=m.content).call(v,function(y){return typeof y=="string"?"":'<span title="'+y.alt+`"> |
|
886 |
<img class="eleImg" data-emoji="`+y.alt+'" style src="'+y.src+'" alt="['+y.alt+`]"> |
|
887 |
</span>`}),b=(0,a.default)(b).call(b,function(y){return y!==""})):b=(0,i.default)(g=m.content).call(g,function(y){return'<span class="eleImg" title="'+y+'">'+y+"</span>"}),b.join("").replace(/ /g,"")}var p=(0,i.default)(d).call(d,function(m){return{title:c.i18next.t("menus.panelMenus.emoticon."+m.title),tpl:"<div>"+f(m)+"</div>",events:[{selector:".eleImg",type:"click",fn:function(v){var g,b,y=s.default(v.target);return g=y.getNodeName()==="IMG"?(0,l.default)(b=y.parent().html()).call(b):"<span>"+y.html()+"</span>",c.cmd.do("insertHTML",g),!0}}]}});return{width:300,height:230,tabs:p}}t.default=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createListHandle=t.ClassType=void 0;var r,o=n(2),i=o.__importDefault(n(3)),a=o.__importDefault(n(372)),l=o.__importDefault(n(374)),s=o.__importDefault(n(375)),u=o.__importDefault(n(376)),c=o.__importDefault(n(377));(function(m){m.Wrap="WrapListHandle",m.Join="JoinListHandle",m.StartJoin="StartJoinListHandle",m.EndJoin="EndJoinListHandle",m.Other="OtherListHandle"})(r=t.ClassType||(t.ClassType={}));var d={WrapListHandle:a.default,JoinListHandle:l.default,StartJoinListHandle:s.default,EndJoinListHandle:u.default,OtherListHandle:c.default};function f(m,v,g){if(m===r.Other&&g===void 0)throw new Error("other \u7C7B\u9700\u8981\u4F20\u5165 range");return m!==r.Other?new d[m](v):new d[m](v,g)}t.createListHandle=f;var p=function(){function m(v){this.handle=v,this.handle.exec()}return m.prototype.getSelectionRangeElem=function(){return i.default(this.handle.selectionRangeElem.get())},m}();t.default=p},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),u=n(47),c=function(d){function f(p){return d.call(this,p)||this}return a.__extends(f,d),f.prototype.exec=function(){var p,m=this.options,v=m.listType,g=m.listTarget,b=m.$selectionElem,y=m.$startElem,w=m.$endElem,x=[],_=b==null?void 0:b.getNodeName(),E=y.prior,C=w.prior;if((y.prior||w.prior)&&(E!=null&&E.prev().length||C!=null&&C.next().length)){for(var T=E;T.length;)x.push(T),T=C!=null&&C.equal(T)?l.default(void 0):T.next();var k=E.prev(),I=C.next();if(_===v?p=u.createElementFragment(x,u.createDocumentFragment(),"p"):(p=u.createElement(g),(0,i.default)(x).call(x,function(L){p.append(L.elems[0])})),k.length&&I.length){for(var O=[];I.length;)O.push(I),I=I.next();var F=u.createElement(_);(0,i.default)(O).call(O,function(L){F.append(L.elems[0])}),l.default(F).insertAfter(b),this.selectionRangeElem.set(p),(N=b.next()).length?u.insertBefore(b,p,N.elems[0]):b.parent().elems[0].append(p)}else if(k.length){var N;this.selectionRangeElem.set(p),(N=b.next()).length?u.insertBefore(b,p,N.elems[0]):b.parent().elems[0].append(p)}else this.selectionRangeElem.set(p),u.insertBefore(b,p,b.elems[0])}else{var B;(0,i.default)(B=b==null?void 0:b.children()).call(B,function(L){x.push(l.default(L))}),_===v?p=u.createElementFragment(x,u.createDocumentFragment(),"p"):(p=u.createElement(g),(0,i.default)(x).call(x,function(L){p.appendChild(L.elems[0])})),this.selectionRangeElem.set(p),u.insertBefore(b,p,b.elems[0]),b.remove()}},f}(s.ListHandle);t.default=c},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=function(){function l(){this._element=null}return l.prototype.set=function(s){if(s instanceof DocumentFragment){var u,c=[];(0,i.default)(u=s.childNodes).call(u,function(d){c.push(d)}),s=c}this._element=s},l.prototype.get=function(){return this._element},l.prototype.clear=function(){this._element=null},l}();t.default=a},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),u=n(47),c=function(d){function f(p){return d.call(this,p)||this}return a.__extends(f,d),f.prototype.exec=function(){var p,m,v,g,b,y,w,x,_=this.options,E=_.editor,C=_.listType,T=_.listTarget,k=_.$startElem,I=_.$endElem,O=E.selection.getSelectionRangeTopNodes(),F=k==null?void 0:k.getNodeName();if(F===(I==null?void 0:I.getNodeName()))if(O.length>2)if(O.shift(),O.pop(),x=u.createElementFragment(u.filterSelectionNodes(O),u.createDocumentFragment()),F===C)(p=I.children())===null||p===void 0||(0,i.default)(p).call(p,function(W){x.append(W)}),I.remove(),this.selectionRangeElem.set(x),k.elems[0].append(x);else{for(var N=document.createDocumentFragment(),B=document.createDocumentFragment(),L=u.getStartPoint(k);L.length;){var V=L.elems[0];L=L.next(),N.append(V)}for(var P=u.getEndPoint(I),H=[];P.length;)H.unshift(P.elems[0]),P=P.prev();(0,i.default)(H).call(H,function(W){B.append(W)});var U=u.createElement(T);U.append(N),U.append(x),U.append(B),x=U,this.selectionRangeElem.set(x),l.default(U).insertAfter(k),!((m=k.children())!==null&&m!==void 0&&m.length)&&k.remove(),((v=I.children())===null||v===void 0||!v.length)&&I.remove()}else{for(O.length=0,L=u.getStartPoint(k);L.length;)O.push(L),L=L.next();for(P=u.getEndPoint(I),H=[];P.length;)H.unshift(P),P=P.prev();O.push.apply(O,H),F===C?(x=u.createElementFragment(O,u.createDocumentFragment(),"p"),this.selectionRangeElem.set(x),u.insertBefore(k,x,I.elems[0])):(x=u.createElement(T),(0,i.default)(O).call(O,function(W){x.append(W.elems[0])}),this.selectionRangeElem.set(x),l.default(x).insertAfter(k)),!((g=k.children())!==null&&g!==void 0&&g.length)&&I.remove(),((b=I.children())===null||b===void 0||!b.length)&&I.remove()}else{var G=[];for(P=u.getEndPoint(I);P.length;)G.unshift(P),P=P.prev();var z=[];for(L=u.getStartPoint(k);L.length;)z.push(L),L=L.next();if(x=u.createDocumentFragment(),O.shift(),O.pop(),(0,i.default)(z).call(z,function(W){return x.append(W.elems[0])}),x=u.createElementFragment(u.filterSelectionNodes(O),x),(0,i.default)(G).call(G,function(W){return x.append(W.elems[0])}),this.selectionRangeElem.set(x),F===C)k.elems[0].append(x),((y=I.children())===null||y===void 0||!y.length)&&I.remove();else if((w=I.children())!==null&&w!==void 0&&w.length){var $=I.children();u.insertBefore($,x,$.elems[0])}else I.elems[0].append(x)}},f}(s.ListHandle);t.default=c},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),u=n(47),c=function(d){function f(p){return d.call(this,p)||this}return a.__extends(f,d),f.prototype.exec=function(){var p,m,v=this.options,g=v.editor,b=v.listType,y=v.listTarget,w=v.$startElem,x=g.selection.getSelectionRangeTopNodes(),_=w==null?void 0:w.getNodeName();x.shift();for(var E=[],C=u.getStartPoint(w);C.length;)E.push(C),C=C.next();_===b?(m=u.createDocumentFragment(),(0,i.default)(E).call(E,function(T){return m.append(T.elems[0])}),m=u.createElementFragment(u.filterSelectionNodes(x),m),this.selectionRangeElem.set(m),w.elems[0].append(m)):(m=u.createElement(y),(0,i.default)(E).call(E,function(T){return m.append(T.elems[0])}),m=u.createElementFragment(u.filterSelectionNodes(x),m),this.selectionRangeElem.set(m),l.default(m).insertAfter(w),((p=w.children())===null||p===void 0||!p.length)&&w.remove())},f}(s.ListHandle);t.default=c},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),u=n(47),c=function(d){function f(p){return d.call(this,p)||this}return a.__extends(f,d),f.prototype.exec=function(){var p,m,v,g=this.options,b=g.editor,y=g.listType,w=g.listTarget,x=g.$endElem,_=b.selection.getSelectionRangeTopNodes(),E=x==null?void 0:x.getNodeName();_.pop();for(var C=[],T=u.getEndPoint(x);T.length;)C.unshift(T),T=T.prev();if(E===y)if(v=u.createElementFragment(u.filterSelectionNodes(_),u.createDocumentFragment()),(0,i.default)(C).call(C,function(O){return v.append(O.elems[0])}),this.selectionRangeElem.set(v),(p=x.children())!==null&&p!==void 0&&p.length){var k=x.children();u.insertBefore(k,v,k.elems[0])}else x.elems[0].append(v);else{var I=u.filterSelectionNodes(_);I.push.apply(I,C),v=u.createElementFragment(I,u.createElement(w)),this.selectionRangeElem.set(v),l.default(v).insertBefore(x),((m=x.children())===null||m===void 0||!m.length)&&x.remove()}},f}(s.ListHandle);t.default=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=n(58),i=n(47),a=function(l){function s(u,c){var d=l.call(this,u)||this;return d.range=c,d}return r.__extends(s,l),s.prototype.exec=function(){var u=this.options,c=u.editor,d=u.listTarget,f=c.selection.getSelectionRangeTopNodes(),p=i.createElementFragment(i.filterSelectionNodes(f),i.createElement(d));this.selectionRangeElem.set(p),this.range.insertNode(p)},s}(o.ListHandle);t.default=a},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(27));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(24)),u=l.__importDefault(n(3)),c=l.__importDefault(n(379)),d=n(6),f=function(p){function m(v){var g=this,b=u.default(`<div class="w-e-menu" data-title="\u884C\u9AD8"> |
|
888 |
<i class="w-e-icon-row-height"></i> |
|
889 |
</div>`),y={width:100,title:"\u8BBE\u7F6E\u884C\u9AD8",type:"list",list:new c.default(v,v.config.lineHeights).getItemList(),clickHandler:function(w){v.selection.saveRange(),g.command(w)}};return g=p.call(this,b,v,y)||this}return l.__extends(m,p),m.prototype.command=function(v){var g,b=this,y=window.getSelection?window.getSelection():document.getSelection(),w=["P"],x=this.editor,_="";x.selection.restoreSelection();var E=u.default(x.selection.getSelectionContainerElem());if(E!=null&&E.length){var C=u.default(x.selection.getSelectionContainerElem()),T=u.default(x.selection.getSelectionStartElem()).elems[0],k="",I=[],O="";if(E&&x.$textElem.equal(E)){var F=d.UA.isIE(),N=[],B=[],L=[],V=u.default(x.selection.getSelectionStartElem()),P=u.default(x.selection.getSelectionEndElem()),H=(g=x.selection.getRange())===null||g===void 0?void 0:g.commonAncestorContainer.childNodes;B.push(this.getDom(V.elems[0])),H==null||(0,i.default)(H).call(H,function(W,K){W===b.getDom(V.elems[0])&&N.push(K),W===b.getDom(P.elems[0])&&N.push(K)});var U=0,G=void 0;for(L.push(this.getDom(V.elems[0]));B[U]!==this.getDom(P.elems[0]);)G=u.default(B[U].nextElementSibling).elems[0],(0,a.default)(w).call(w,u.default(G).getNodeName())!==-1&&L.push(G),B.push(G),U++;if(u.default(B[0]).getNodeName()!=="P"){U=0;for(var z=0;z<B.length;z++)if(u.default(B[z]).getNodeName()==="P"){U=z;break}if(U===0)return;for(var $=0;$!==U;)B.shift(),$++}return this.setRange(B[0],B[B.length-1]),(0,i.default)(B).call(B,function(W){k=W.getAttribute("style"),I=k?k.split(";"):[],O=b.styleProcessing(I),u.default(W).getNodeName()==="P"&&v&&(O+=v?"line-height:"+v+";":""),F?u.default(W).css("line-height",v):_+="<"+u.default(W).getNodeName().toLowerCase()+' style="'+O+'">'+W.innerHTML+"</"+u.default(W).getNodeName().toLowerCase()+">"}),_&&this.action(_,x),T=C.elems[0],void this.setRange(T.children[N[0]],T.children[N[1]])}if(T=this.getDom(T),(0,a.default)(w).call(w,u.default(T).getNodeName())!==-1){if(k=T.getAttribute("style"),I=k?k.split(";"):[],y==null||y.selectAllChildren(T),x.selection.saveRange(),!v)return void(k&&(O=this.styleProcessing(I),_=O===""?"<"+u.default(T).getNodeName().toLowerCase()+">"+T.innerHTML+"</"+u.default(T).getNodeName().toLowerCase()+">":"<"+u.default(T).getNodeName().toLowerCase()+' style="'+O+'">'+T.innerHTML+"</"+u.default(T).getNodeName().toLowerCase()+">",this.action(_,x)));O=k?this.styleProcessing(I)+"line-height:"+v+";":"line-height:"+v+";",_="<"+u.default(T).getNodeName().toLowerCase()+' style="'+O+'">'+T.innerHTML+"</"+u.default(T).getNodeName().toLowerCase()+">",u.default(T).getNodeName()==="BLOCKQUOTE"||d.UA.isIE()?u.default(T).css("line-height",v):this.action(_,x)}}},m.prototype.getDom=function(v){var g=u.default(v).elems[0];if(!g.parentNode)return g;function b(y,w){var x=u.default(y.parentNode);return w.$textElem.equal(x)?y:b(x.elems[0],w)}return g=b(g,this.editor)},m.prototype.action=function(v,g){g.cmd.do("insertHTML",v)},m.prototype.styleProcessing=function(v){var g="";return(0,i.default)(v).call(v,function(b){b!==""&&(0,a.default)(b).call(b,"line-height")===-1&&(g=g+b+";")}),g},m.prototype.setRange=function(v,g){var b=this.editor,y=window.getSelection?window.getSelection():document.getSelection();y==null||y.removeAllRanges();var w=document.createRange(),x=v,_=g;w.setStart(x,0),w.setEnd(_,1),y==null||y.addRange(w),b.selection.saveRange(),y==null||y.removeAllRanges(),b.selection.restoreSelection()},m.prototype.tryChangeActive=function(){var v=this.editor,g=v.selection.getSelectionContainerElem();if(!g||!v.$textElem.equal(g)){var b=u.default(v.selection.getSelectionStartElem());if(b.length!==0){var y=(b=this.getDom(b.elems[0])).getAttribute("style")?b.getAttribute("style"):"";y&&(0,a.default)(y).call(y,"line-height")!==-1?this.active():this.unActive()}}},m}(s.default);t.default=f},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3)),l=function(){function s(u,c){var d=this;this.itemList=[{$elem:a.default("<span>"+u.i18next.t("\u9ED8\u8BA4")+"</span>"),value:""}],(0,i.default)(c).call(c,function(f){d.itemList.push({$elem:a.default("<span>"+f+"</span>"),value:f})})}return s.prototype.getItemList=function(){return this.itemList},s}();t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(3)),i=function(a){function l(s){var u=o.default(`<div class="w-e-menu" data-title="\u64A4\u9500"> |
|
890 |
<i class="w-e-icon-undo"></i> |
|
891 |
</div>`);return a.call(this,u,s)||this}return r.__extends(l,a),l.prototype.clickHandler=function(){var s=this.editor;s.history.revoke();var u=s.$textElem.children();if(u!=null&&u.length){var c=u.last();s.selection.createRangeByElem(c,!1,!0),s.selection.restoreSelection()}},l.prototype.tryChangeActive=function(){this.editor.isCompatibleMode||(this.editor.history.size[0]?this.active():this.unActive())},l}(r.__importDefault(n(23)).default);t.default=i},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(3)),i=function(a){function l(s){var u=o.default(`<div class="w-e-menu" data-title="\u6062\u590D"> |
|
892 |
<i class="w-e-icon-redo"></i> |
|
893 |
</div>`);return a.call(this,u,s)||this}return r.__extends(l,a),l.prototype.clickHandler=function(){var s=this.editor;s.history.restore();var u=s.$textElem.children();if(u!=null&&u.length){var c=u.last();s.selection.createRangeByElem(c,!1,!0),s.selection.restoreSelection()}},l.prototype.tryChangeActive=function(){this.editor.isCompatibleMode||(this.editor.history.size[1]?this.active():this.unActive())},l}(r.__importDefault(n(23)).default);t.default=i},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(37)),i=r.__importDefault(n(3)),a=r.__importDefault(n(383)),l=r.__importDefault(n(32)),s=r.__importDefault(n(392)),u=function(c){function d(f){var p=this,m=i.default('<div class="w-e-menu" data-title="\u8868\u683C"><i class="w-e-icon-table2"></i></div>');return p=c.call(this,m,f)||this,s.default(f),p}return r.__extends(d,c),d.prototype.clickHandler=function(){this.createPanel()},d.prototype.createPanel=function(){var f=a.default(this.editor);new l.default(this,f).create()},d.prototype.tryChangeActive=function(){},d}(o.default);t.default=u},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(384));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3));n(389);var u=a.__importDefault(n(391));function c(f){return f>0&&(0,i.default)(f)}function d(f){var p=new u.default(f),m=l.getRandom("w-col-id"),v=l.getRandom("w-row-id"),g=l.getRandom("btn-link"),b="menus.panelMenus.table.",y=function(_){return f.i18next.t(_)},w=[{title:y(b+"\u63D2\u5165\u8868\u683C"),tpl:`<div> |
|
894 |
<div class="w-e-table"> |
|
895 |
<span>`+y("\u521B\u5EFA")+`</span> |
|
896 |
<input id="`+v+`" type="text" class="w-e-table-input" value="5"/></td> |
|
897 |
<span>`+y(b+"\u884C")+`</span> |
|
898 |
<input id="`+m+`" type="text" class="w-e-table-input" value="5"/></td> |
|
899 |
<span>`+(y(b+"\u5217")+y(b+"\u7684")+y(b+"\u8868\u683C"))+`</span> |
|
900 |
</div> |
|
901 |
<div class="w-e-button-container"> |
|
902 |
<button type="button" id="`+g+'" class="right">'+y("\u63D2\u5165")+`</button> |
|
903 |
</div> |
|
904 |
</div>`,events:[{selector:"#"+g,type:"click",fn:function(){var _=Number(s.default("#"+m).val()),E=Number(s.default("#"+v).val());return c(E)&&c(_)?(p.createAction(E,_),!0):(f.config.customAlert("\u8868\u683C\u884C\u5217\u8BF7\u8F93\u5165\u6B63\u6574\u6570","warning"),!1)},bindEnter:!0}]}],x={width:330,height:0,tabs:[]};return x.tabs.push(w[0]),x}t.default=d},function(e,t,n){e.exports=n(385)},function(e,t,n){var r=n(386);e.exports=r},function(e,t,n){n(387);var r=n(9);e.exports=r.Number.isInteger},function(e,t,n){n(5)({target:"Number",stat:!0},{isInteger:n(388)})},function(e,t,n){var r=n(13),o=Math.floor;e.exports=function(i){return!r(i)&&isFinite(i)&&o(i)===i}},function(e,t,n){var r=n(20),o=n(390);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-table { |
|
905 |
display: flex; |
|
906 |
} |
|
907 |
.w-e-table .w-e-table-input { |
|
908 |
width: 40px; |
|
909 |
text-align: center!important; |
|
910 |
margin: 0 5px; |
|
911 |
} |
|
912 |
`,""]),e.exports=t},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=n(7),i=r.__importDefault(n(3)),a=function(){function l(s){this.editor=s}return l.prototype.createAction=function(s,u){var c=this.editor,d=i.default(c.selection.getSelectionContainerElem()),f=i.default(d.elems[0]).parentUntilEditor("UL",c),p=i.default(d.elems[0]).parentUntilEditor("OL",c);if(!f&&!p){var m=this.createTableHtml(s,u);c.cmd.do("insertHTML",m)}},l.prototype.createTableHtml=function(s,u){for(var c="",d="",f=0;f<s;f++){d="";for(var p=0;p<u;p++)d+=f===0?"<th></th>":"<td></td>";c=c+"<tr>"+d+"</tr>"}return'<table border="0" width="100%" cellpadding="0" cellspacing="0"><tbody>'+c+"</tbody></table>"+o.EMPTY_P},l}();t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(393)),o=n(400);function i(a){r.default(a),o.bindEventKeyboardEvent(a),o.bindClickEvent(a)}t.default=i},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(38)),a=r.__importDefault(n(394)),l=r.__importDefault(n(399)),s=n(7);function u(p){var m;function v(b){var y=new l.default(p),w="menus.panelMenus.table.",x=function(E,C){return C===void 0&&(C=w),p.i18next.t(C+E)},_=[{$elem:o.default("<span>"+x("\u5220\u9664\u8868\u683C")+"</span>"),onClick:function(E,C){return E.selection.createRangeByElem(C),E.selection.restoreSelection(),E.cmd.do("insertHTML",s.EMPTY_P),!0}},{$elem:o.default("<span>"+x("\u6DFB\u52A0\u884C")+"</span>"),onClick:function(E,C){if(c(E))return!0;var T=o.default(E.selection.getSelectionStartElem()),k=y.getRowNode(T.elems[0]);if(!k)return!0;var I=Number(y.getCurrentRowIndex(C.elems[0],k)),O=y.getTableHtml(C.elems[0]),F=y.getTableHtml(a.default.ProcessingRow(o.default(O),I).elems[0]);return F=f(C,F),E.selection.createRangeByElem(C),E.selection.restoreSelection(),E.cmd.do("insertHTML",F),!0}},{$elem:o.default("<span>"+x("\u5220\u9664\u884C")+"</span>"),onClick:function(E,C){if(c(E))return!0;var T=o.default(E.selection.getSelectionStartElem()),k=y.getRowNode(T.elems[0]);if(!k)return!0;var I=Number(y.getCurrentRowIndex(C.elems[0],k)),O=y.getTableHtml(C.elems[0]),F=a.default.DeleteRow(o.default(O),I).elems[0].children[0].children.length,N="";return E.selection.createRangeByElem(C),E.selection.restoreSelection(),N=f(C,N=F===0?s.EMPTY_P:y.getTableHtml(a.default.DeleteRow(o.default(O),I).elems[0])),E.cmd.do("insertHTML",N),!0}},{$elem:o.default("<span>"+x("\u6DFB\u52A0\u5217")+"</span>"),onClick:function(E,C){if(c(E))return!0;var T=o.default(E.selection.getSelectionStartElem()),k=y.getCurrentColIndex(T.elems[0]),I=y.getTableHtml(C.elems[0]),O=y.getTableHtml(a.default.ProcessingCol(o.default(I),k).elems[0]);return O=f(C,O),E.selection.createRangeByElem(C),E.selection.restoreSelection(),E.cmd.do("insertHTML",O),!0}},{$elem:o.default("<span>"+x("\u5220\u9664\u5217")+"</span>"),onClick:function(E,C){if(c(E))return!0;var T=o.default(E.selection.getSelectionStartElem()),k=y.getCurrentColIndex(T.elems[0]),I=y.getTableHtml(C.elems[0]),O=a.default.DeleteCol(o.default(I),k),F=O.elems[0].children[0].children[0].children.length,N="";return E.selection.createRangeByElem(C),E.selection.restoreSelection(),N=f(C,N=F===0?s.EMPTY_P:y.getTableHtml(O.elems[0])),E.cmd.do("insertHTML",N),!0}},{$elem:o.default("<span>"+x("\u8BBE\u7F6E\u8868\u5934")+"</span>"),onClick:function(E,C){if(c(E))return!0;var T=o.default(E.selection.getSelectionStartElem()),k=y.getRowNode(T.elems[0]);if(!k)return!0;var I=Number(y.getCurrentRowIndex(C.elems[0],k));I!==0&&(I=0);var O=y.getTableHtml(C.elems[0]),F=y.getTableHtml(a.default.setTheHeader(o.default(O),I,"th").elems[0]);return F=f(C,F),E.selection.createRangeByElem(C),E.selection.restoreSelection(),E.cmd.do("insertHTML",F),!0}},{$elem:o.default("<span>"+x("\u53D6\u6D88\u8868\u5934")+"</span>"),onClick:function(E,C){var T=o.default(E.selection.getSelectionStartElem()),k=y.getRowNode(T.elems[0]);if(!k)return!0;var I=Number(y.getCurrentRowIndex(C.elems[0],k));I!==0&&(I=0);var O=y.getTableHtml(C.elems[0]),F=y.getTableHtml(a.default.setTheHeader(o.default(O),I,"td").elems[0]);return F=f(C,F),E.selection.createRangeByElem(C),E.selection.restoreSelection(),E.cmd.do("insertHTML",F),!0}}];(m=new i.default(p,b,_)).create()}function g(){m&&(m.remove(),m=null)}return{showTableTooltip:v,hideTableTooltip:g}}function c(p){var m=p.selection.getSelectionStartElem(),v=p.selection.getSelectionEndElem();return(m==null?void 0:m.elems[0])!==(v==null?void 0:v.elems[0])}function d(p){var m=u(p),v=m.showTableTooltip,g=m.hideTableTooltip;p.txt.eventHooks.tableClickEvents.push(v),p.txt.eventHooks.clickEvents.push(g),p.txt.eventHooks.keyupEvents.push(g),p.txt.eventHooks.toolbarClickEvents.push(g),p.txt.eventHooks.menuClickEvents.push(g),p.txt.eventHooks.textScrollEvents.push(g)}function f(p,m){var v=p.elems[0].nextSibling;return(!v||v.innerHTML==="<br>")&&(m+=""+s.EMPTY_P),m}t.default=d},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(45)),a=r(n(91)),l=r(n(4)),s=r(n(138));(0,o.default)(t,"__esModule",{value:!0});var u=n(2).__importDefault(n(3));function c(b,y){for(var w=g(b),x=(0,i.default)(Array.prototype).apply(w.children),_=x[0].children.length,E=document.createElement("tr"),C=0;C<_;C++){var T=document.createElement("td");E.appendChild(T)}return(0,a.default)(x).call(x,y+1,0,E),v(w,x),u.default(w.parentNode)}function d(b,y){for(var w=g(b),x=(0,i.default)(Array.prototype).apply(w.children),_=function(C){var T,k=[];for((0,l.default)(T=(0,s.default)(x[C].children)).call(T,function(F){k.push(F)});x[C].children.length!==0;)x[C].removeChild(x[C].children[0]);var I=u.default(k[0]).getNodeName()!=="TH"?document.createElement("td"):document.createElement("th");(0,a.default)(k).call(k,y+1,0,I);for(var O=0;O<k.length;O++)x[C].appendChild(k[O])},E=0;E<x.length;E++)_(E);return v(w,x),u.default(w.parentNode)}function f(b,y){var w=g(b),x=(0,i.default)(Array.prototype).apply(w.children);return(0,a.default)(x).call(x,y,1),v(w,x),u.default(w.parentNode)}function p(b,y){for(var w=g(b),x=(0,i.default)(Array.prototype).apply(w.children),_=function(C){var T,k=[];for((0,l.default)(T=(0,s.default)(x[C].children)).call(T,function(O){k.push(O)});x[C].children.length!==0;)x[C].removeChild(x[C].children[0]);(0,a.default)(k).call(k,y,1);for(var I=0;I<k.length;I++)x[C].appendChild(k[I])},E=0;E<x.length;E++)_(E);return v(w,x),u.default(w.parentNode)}function m(b,y,w){for(var x=g(b),_=(0,i.default)(Array.prototype).apply(x.children),E=_[y].children,C=document.createElement("tr"),T=function(I){var O,F=document.createElement(w),N=E[I];(0,l.default)(O=(0,s.default)(N.childNodes)).call(O,function(B){F.appendChild(B)}),C.appendChild(F)},k=0;k<E.length;k++)T(k);return(0,a.default)(_).call(_,y,1,C),v(x,_),u.default(x.parentNode)}function v(b,y){for(;b.children.length!==0;)b.removeChild(b.children[0]);for(var w=0;w<y.length;w++)b.appendChild(y[w])}function g(b){var y=b.elems[0].children[0];return y.nodeName==="COLGROUP"&&(y=b.elems[0].children[b.elems[0].children.length-1]),y}t.default={ProcessingRow:c,ProcessingCol:d,DeleteRow:f,DeleteCol:p,setTheHeader:m}},function(e,t,n){var r=n(396);e.exports=r},function(e,t,n){n(50),n(397);var r=n(9);e.exports=r.Array.from},function(e,t,n){var r=n(5),o=n(398),i=!n(114)(function(a){Array.from(a)});r({target:"Array",stat:!0,forced:i},{from:o})},function(e,t,n){var r=n(39),o=n(29),i=n(113),a=n(111),l=n(34),s=n(69),u=n(112);e.exports=function(c){var d,f,p,m,v,g,b=o(c),y=typeof this=="function"?this:Array,w=arguments.length,x=w>1?arguments[1]:void 0,_=x!==void 0,E=u(b),C=0;if(_&&(x=r(x,w>2?arguments[2]:void 0,2)),E==null||y==Array&&a(E))for(f=new y(d=l(b.length));d>C;C++)g=_?x(b[C],C):b[C],s(f,C,g);else for(v=(m=E.call(b)).next,f=new y;!(p=v.call(m)).done;C++)g=_?i(m,x,[p.value,C],!0):p.value,s(f,C,g);return f.length=C,f}},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(138));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=function(){function u(c){this.editor=c}return u.prototype.getRowNode=function(c){var d,f=l.default(c).elems[0];return f.parentNode&&(f=(d=l.default(f).parentUntil("TR",f))===null||d===void 0?void 0:d.elems[0]),f},u.prototype.getCurrentRowIndex=function(c,d){var f,p=0,m=c.children[0];return m.nodeName==="COLGROUP"&&(m=c.children[c.children.length-1]),(0,i.default)(f=(0,a.default)(m.children)).call(f,function(v,g){v===d&&(p=g)}),p},u.prototype.getCurrentColIndex=function(c){var d,f,p=0,m=l.default(c).getNodeName()==="TD"||l.default(c).getNodeName()==="TH"?c:(f=l.default(c).parentUntil("TD",c))===null||f===void 0?void 0:f.elems[0],v=l.default(m).parent();return(0,i.default)(d=(0,a.default)(v.elems[0].children)).call(d,function(g,b){g===m&&(p=b)}),p},u.prototype.getTableHtml=function(c){return'<table border="0" width="100%" cellpadding="0" cellspacing="0">'+l.default(c).html()+"</table>"},u}();t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.bindEventKeyboardEvent=t.bindClickEvent=void 0;var r=n(2).__importDefault(n(3));function o(l){if(!l.length)return!1;var s=l.elems[0];return s.nodeName==="P"&&s.innerHTML==="<br>"}function i(l){function s(u,c){if(c.detail>=3){var d=window.getSelection();if(d){var f=d.focusNode,p=d.anchorNode,m=r.default(p==null?void 0:p.parentElement);if(!u.isContain(r.default(f))){var v=m.elems[0].tagName==="TD"?m:m.parentUntilEditor("td",l);if(v){var g=l.selection.getRange();g==null||g.setEnd(v.elems[0],v.elems[0].childNodes.length),l.selection.restoreSelection()}}}}}l.txt.eventHooks.tableClickEvents.push(s)}function a(l){var s=l.txt,u=l.selection;s.eventHooks.keydownEvents.push(function(c){l.selection.saveRange();var d=u.getSelectionContainerElem();if(d){var f=d.getNodeTop(l),p=f.length&&f.prev().length?f.prev():null;if(p&&p.getNodeName()==="TABLE"&&u.isSelectionEmpty()&&u.getCursorPos()===0&&c.keyCode===8){var m=f.next();m.length&&o(f)&&(f.remove(),l.selection.setRangeToElem(m.elems[0])),c.preventDefault()}}})}t.bindClickEvent=i,t.bindEventKeyboardEvent=a},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(26));(0,o.default)(t,"__esModule",{value:!0}),t.formatCodeHtml=void 0;var a=n(2),l=a.__importDefault(n(37)),s=a.__importDefault(n(3)),u=n(6),c=a.__importDefault(n(402)),d=a.__importDefault(n(139)),f=a.__importDefault(n(32)),p=a.__importDefault(n(403));function m(g,b){return b&&(b=y(b=w(b)),b=u.replaceSpecialSymbol(b));function y(x){var _=x.match(/<pre[\s|\S]+?\/pre>/g);return _===null||(0,i.default)(_).call(_,function(E){x=x.replace(E,E.replace(/<\/code><code>/g,` |
|
913 |
`).replace(/<br>/g,""))}),x}function w(x){var _,E=x.match(/<span\sclass="hljs[\s|\S]+?\/span>/gm);if(!E||!E.length)return x;for(var C=(0,i.default)(_=u.deepClone(E)).call(_,function(k){return(k=k.replace(/<span\sclass="hljs[^>]+>/,"")).replace(/<\/span>/,"")}),T=0;T<E.length;T++)x=x.replace(E[T],C[T]);return w(x)}}t.formatCodeHtml=m;var v=function(g){function b(y){var w=this,x=s.default('<div class="w-e-menu" data-title="\u4EE3\u7801"><i class="w-e-icon-terminal"></i></div>');return w=g.call(this,x,y)||this,p.default(y),w}return a.__extends(b,g),b.prototype.insertLineCode=function(y){var w=this.editor,x=s.default("<code>"+y+"</code>");w.cmd.do("insertElem",x),w.selection.createRangeByElem(x,!1),w.selection.restoreSelection()},b.prototype.clickHandler=function(){var y=this.editor,w=y.selection.getSelectionText();this.isActive||(y.selection.isSelectionEmpty()?this.createPanel("",""):this.insertLineCode(w))},b.prototype.createPanel=function(y,w){var x=c.default(this.editor,y,w);new f.default(this,x).create()},b.prototype.tryChangeActive=function(){var y=this.editor;d.default(y)?this.active():this.unActive()},b}(l.default);t.default=v},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3)),u=a.__importDefault(n(139)),c=n(7);function d(f,p,m){var v,g=l.getRandom("input-iframe"),b=l.getRandom("select"),y=l.getRandom("btn-ok");function w(C){var T;u.default(f)&&x(),!((T=f.selection.getSelectionStartElem())===null||T===void 0)&&T.elems[0].innerHTML&&f.cmd.do("insertHTML",c.EMPTY_P),f.cmd.do("insertHTML",C);var k=f.selection.getSelectionStartElem(),I=k==null?void 0:k.getNodeTop(f);(I==null?void 0:I.getNextSibling().elems.length)===0&&s.default(c.EMPTY_P).insertAfter(I)}function x(){if(u.default(f)){var C=f.selection.getSelectionStartElem(),T=C==null?void 0:C.getNodeTop(f);!T||(f.selection.createRangeByElem(T),f.selection.restoreSelection())}}var _=function(C){return f.i18next.t(C)},E={width:500,height:0,tabs:[{title:_("menus.panelMenus.code.\u63D2\u5165\u4EE3\u7801"),tpl:`<div> |
|
914 |
<select name="" id="`+b+`"> |
|
915 |
`+(0,i.default)(v=f.config.languageType).call(v,function(C){return"<option "+(m==C?"selected":"")+' value ="'+C+'">'+C+"</option>"})+` |
|
916 |
</select> |
|
917 |
<textarea id="`+g+'" type="text" class="wang-code-textarea" placeholder="" style="height: 160px">'+p.replace(/"/g,'"')+`</textarea> |
|
918 |
<div class="w-e-button-container"> |
|
919 |
<button type="button" id="`+y+'" class="right">'+(u.default(f)?_("\u4FEE\u6539"):_("\u63D2\u5165"))+`</button> |
|
920 |
</div> |
|
921 |
</div>`,events:[{selector:"#"+y,type:"click",fn:function(){var C,T=document.getElementById(g),k=s.default("#"+b).val(),I=T.value;if(C=f.highlight?f.highlight.highlightAuto(I).value:"<xmp>"+I+"</xmp>",I)return!u.default(f)&&(w('<pre><code class="'+k+'">'+C+"</code></pre>"),!0)}}]}]};return E}t.default=d},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(404)),i=r.__importDefault(n(405));function a(l){o.default(l),i.default(l)}t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(38));function a(s){var u;function c(f){var p="menus.panelMenus.code.",m=function(g,b){return b===void 0&&(b=p),s.i18next.t(b+g)},v=[{$elem:o.default("<span>"+m("\u5220\u9664\u4EE3\u7801")+"</span>"),onClick:function(g,b){return b.remove(),!0}}];(u=new i.default(s,f,v)).create()}function d(){u&&(u.remove(),u=null)}return{showCodeTooltip:c,hideCodeTooltip:d}}function l(s){var u=a(s),c=u.showCodeTooltip,d=u.hideCodeTooltip;s.txt.eventHooks.codeClickEvents.push(c),s.txt.eventHooks.clickEvents.push(d),s.txt.eventHooks.toolbarClickEvents.push(d),s.txt.eventHooks.menuClickEvents.push(d),s.txt.eventHooks.textScrollEvents.push(d)}t.createShowHideFn=a,t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=n(7),i=r.__importDefault(n(3));function a(l){var s=l.$textElem,u=l.selection,c=l.txt.eventHooks.keydownEvents;c.push(function(d){var f;if(d.keyCode===40){var p=u.getSelectionContainerElem(),m=(f=s.children())===null||f===void 0?void 0:f.last();if((p==null?void 0:p.elems[0].tagName)==="XMP"&&(m==null?void 0:m.elems[0].tagName)==="PRE"){var v=i.default(o.EMPTY_P);s.append(v)}}}),c.push(function(d){l.selection.saveRange();var f=u.getSelectionContainerElem();if(f){var p=f.getNodeTop(l),m=p==null?void 0:p.prev(),v=p==null?void 0:p.getNextSibling();if(m.length&&(m==null?void 0:m.getNodeName())==="PRE"&&v.length===0&&u.getCursorPos()===0&&d.keyCode===8){var g=i.default(o.EMPTY_P);s.append(g)}}})}t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(23)),i=r.__importDefault(n(3)),a=r.__importDefault(n(407)),l=n(6),s=n(7),u=function(c){function d(f){var p=this,m=i.default('<div class="w-e-menu" data-title="\u5206\u5272\u7EBF"><i class="w-e-icon-split-line"></i></div>');return p=c.call(this,m,f)||this,a.default(f),p}return r.__extends(d,c),d.prototype.clickHandler=function(){var f=this.editor,p=f.selection.getRange(),m=f.selection.getSelectionContainerElem();if(m!=null&&m.length){var v=i.default(m.elems[0]),g=v.parentUntil("TABLE",m.elems[0]),b=v.children();v.getNodeName()!=="CODE"&&(g&&i.default(g.elems[0]).getNodeName()==="TABLE"||b&&b.length!==0&&i.default(b.elems[0]).getNodeName()==="IMG"&&(p==null||!p.collapsed)||this.createSplitLine())}},d.prototype.createSplitLine=function(){var f="<hr/>"+s.EMPTY_P;l.UA.isFirefox&&(f="<hr/><p></p>"),this.editor.cmd.do("insertHTML",f)},d.prototype.tryChangeActive=function(){},d}(o.default);t.default=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(408));function o(i){r.default(i)}t.default=o},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(3)),i=r.__importDefault(n(38));function a(s){var u;function c(f){var p=[{$elem:o.default("<span>"+s.i18next.t("menus.panelMenus.\u5220\u9664")+"</span>"),onClick:function(m,v){return m.selection.createRangeByElem(v),m.selection.restoreSelection(),m.cmd.do("delete"),!0}}];(u=new i.default(s,f,p)).create()}function d(){u&&(u.remove(),u=null)}return{showSplitLineTooltip:c,hideSplitLineTooltip:d}}function l(s){var u=a(s),c=u.showSplitLineTooltip,d=u.hideSplitLineTooltip;s.txt.eventHooks.splitLineEvents.push(c),s.txt.eventHooks.clickEvents.push(d),s.txt.eventHooks.keyupEvents.push(d),s.txt.eventHooks.toolbarClickEvents.push(d),s.txt.eventHooks.menuClickEvents.push(d),s.txt.eventHooks.textScrollEvents.push(d)}t.default=l},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=a.__importDefault(n(23)),u=n(97),c=a.__importDefault(n(415)),d=a.__importDefault(n(140)),f=function(p){function m(v){var g=this,b=l.default(`<div class="w-e-menu" data-title="\u5F85\u529E\u4E8B\u9879"> |
|
922 |
<i class="w-e-icon-checkbox-checked"></i> |
|
923 |
</div>`);return g=p.call(this,b,v)||this,c.default(v),g}return a.__extends(m,p),m.prototype.clickHandler=function(){var v=this.editor;u.isAllTodo(v)?(this.cancelTodo(),this.tryChangeActive()):this.setTodo()},m.prototype.tryChangeActive=function(){u.isAllTodo(this.editor)?this.active():this.unActive()},m.prototype.setTodo=function(){var v=this.editor,g=v.selection.getSelectionRangeTopNodes();(0,i.default)(g).call(g,function(b){var y;if((b==null?void 0:b.getNodeName())==="P"){var w=d.default(b).getTodo(),x=(y=w.children())===null||y===void 0?void 0:y.getNode();w.insertAfter(b),v.selection.moveCursor(x),b.remove()}}),this.tryChangeActive()},m.prototype.cancelTodo=function(){var v=this.editor,g=v.selection.getSelectionRangeTopNodes();(0,i.default)(g).call(g,function(b){var y,w,x,_=(w=(y=b.childNodes())===null||y===void 0?void 0:y.childNodes())===null||w===void 0?void 0:w.clone(!0),E=l.default("<p></p>");E.append(_),E.insertAfter(b),(x=E.childNodes())===null||x===void 0||x.get(0).remove(),v.selection.moveCursor(E.getNode()),b.remove()})},m}(s.default);t.default=f},function(e,t,n){e.exports=n(411)},function(e,t,n){var r=n(412);e.exports=r},function(e,t,n){var r=n(413),o=Array.prototype;e.exports=function(i){var a=i.every;return i===o||i instanceof Array&&a===o.every?r:a}},function(e,t,n){n(414);var r=n(15);e.exports=r("Array").every},function(e,t,n){var r=n(5),o=n(30).every,i=n(67),a=n(22),l=i("every"),s=a("every");r({target:"Array",proto:!0,forced:!l||!s},{every:function(u){return o(this,u,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(97),u=a.__importDefault(n(140)),c=n(97),d=n(7);function f(p){function m(y){var w,x;if(s.isAllTodo(p)){y.preventDefault();var _=p.selection,E=_.getSelectionRangeTopNodes()[0],C=(w=E.childNodes())===null||w===void 0?void 0:w.get(0),T=(x=window.getSelection())===null||x===void 0?void 0:x.anchorNode,k=_.getRange();if(k==null||!k.collapsed){var I=k==null?void 0:k.commonAncestorContainer.childNodes,O=k==null?void 0:k.startContainer,F=k==null?void 0:k.endContainer,N=k==null?void 0:k.startOffset,B=k==null?void 0:k.endOffset,L=0,V=0,P=[];I==null||(0,i.default)(I).call(I,function(te,ne){te.contains(O)&&(L=ne),te.contains(F)&&(V=ne)}),V-L>1&&(I==null||(0,i.default)(I).call(I,function(te,ne){ne<=L||ne>=V||P.push(te)}),(0,i.default)(P).call(P,function(te){te.remove()})),c.dealTextNode(O,N),c.dealTextNode(F,B,!1),p.selection.moveCursor(F,0)}if(E.text()===""){var H=l.default(d.EMPTY_P);return H.insertAfter(E),_.moveCursor(H.getNode()),void E.remove()}var U=_.getCursorPos(),G=s.getCursorNextNode(C==null?void 0:C.getNode(),T,U),z=u.default(l.default(G)),$=z.getInputContainer(),W=$.parent().getNode(),K=z.getTodo(),X=$.getNode().nextSibling;(C==null?void 0:C.text())===""&&(C==null||C.append(l.default("<br>"))),K.insertAfter(E),X&&(X==null?void 0:X.textContent)!==""?_.moveCursor(W):((X==null?void 0:X.nodeName)!=="BR"&&l.default("<br>").insertAfter($),_.moveCursor(W,1))}}function v(y){var w,x;if(s.isAllTodo(p)){var _,E=p.selection,C=E.getSelectionRangeTopNodes()[0],T=(w=C.childNodes())===null||w===void 0?void 0:w.getNode(),k=l.default("<p></p>"),I=k.getNode(),O=(x=window.getSelection())===null||x===void 0?void 0:x.anchorNode,F=E.getCursorPos(),N=O.previousSibling;if(C.text()===""){y.preventDefault();var B=l.default(d.EMPTY_P);return B.insertAfter(C),C.remove(),void E.moveCursor(B.getNode(),0)}(N==null?void 0:N.nodeName)==="SPAN"&&N.childNodes[0].nodeName==="INPUT"&&F===0&&(y.preventDefault(),T==null||(0,i.default)(_=T.childNodes).call(_,function(L,V){V!==0&&I.appendChild(L.cloneNode(!0))}),k.insertAfter(C),C.remove())}}function g(){var y=p.selection.getSelectionRangeTopNodes()[0];y&&c.isTodo(y)&&y.text()===""&&(l.default(d.EMPTY_P).insertAfter(y),y.remove())}function b(y){y&&y.target instanceof HTMLInputElement&&y.target.type==="checkbox"&&(y.target.checked?y.target.setAttribute("checked","true"):y.target.removeAttribute("checked"))}p.txt.eventHooks.enterDownEvents.push(m),p.txt.eventHooks.deleteUpEvents.push(g),p.txt.eventHooks.deleteDownEvents.push(v),p.txt.eventHooks.clickEvents.push(b)}t.default=f},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.selectorValidator=void 0;var r=n(2),o=r.__importDefault(n(3)),i=n(6),a=n(7),l=r.__importDefault(n(129)),s={border:"1px solid #c9d8db",toolbarBgColor:"#FFF",toolbarBottomBorder:"1px solid #EEE"};function u(d){var f,p,m=d.toolbarSelector,v=o.default(m),g=d.textSelector,b=d.config.height,y=d.i18next,w=o.default("<div></div>"),x=o.default("<div></div>"),_=null;g==null?(p=v.children(),v.append(w).append(x),w.css("background-color",s.toolbarBgColor).css("border",s.border).css("border-bottom",s.toolbarBottomBorder),x.css("border",s.border).css("border-top","none").css("height",b+"px")):(v.append(w),_=o.default(g).children(),o.default(g).append(x),p=x.children()),(f=o.default("<div></div>")).attr("contenteditable","true").css("width","100%").css("height","100%");var E,C=d.config.placeholder;(E=C!==l.default.placeholder?o.default("<div>"+C+"</div>"):o.default("<div>"+y.t(C)+"</div>")).addClass("placeholder"),p&&p.length?(f.append(p),E.hide()):f.append(o.default(a.EMPTY_P)),_&&_.length&&(f.append(_),E.hide()),x.append(f),x.append(E),w.addClass("w-e-toolbar").css("z-index",d.zIndex.get("toolbar")),x.addClass("w-e-text-container"),x.css("z-index",d.zIndex.get()),f.addClass("w-e-text");var T=i.getRandom("toolbar-elem");w.attr("id",T);var k=i.getRandom("text-elem");f.attr("id",k);var I=x.getBoundingClientRect().height;I!==f.getBoundingClientRect().height&&f.css("min-height",I+"px"),d.$toolbarElem=w,d.$textContainerElem=x,d.$textElem=f,d.toolbarElemId=T,d.textElemId=k}function c(d){var f="data-we-id",p=/^wangEditor-\d+$/,m=d.textSelector,v=d.toolbarSelector,g={bar:o.default("<div></div>"),text:o.default("<div></div>")};if(v==null)throw new Error("\u9519\u8BEF\uFF1A\u521D\u59CB\u5316\u7F16\u8F91\u5668\u65F6\u5019\u672A\u4F20\u5165\u4EFB\u4F55\u53C2\u6570\uFF0C\u8BF7\u67E5\u9605\u6587\u6863");if(g.bar=o.default(v),!g.bar.elems.length)throw new Error("\u65E0\u6548\u7684\u8282\u70B9\u9009\u62E9\u5668\uFF1A"+v);if(p.test(g.bar.attr(f)))throw new Error("\u521D\u59CB\u5316\u8282\u70B9\u5DF2\u5B58\u5728\u7F16\u8F91\u5668\u5B9E\u4F8B\uFF0C\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\u7F16\u8F91\u5668");if(m){if(g.text=o.default(m),!g.text.elems.length)throw new Error("\u65E0\u6548\u7684\u8282\u70B9\u9009\u62E9\u5668\uFF1A"+m);if(p.test(g.text.attr(f)))throw new Error("\u521D\u59CB\u5316\u8282\u70B9\u5DF2\u5B58\u5728\u7F16\u8F91\u5668\u5B9E\u4F8B\uFF0C\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\u7F16\u8F91\u5668")}g.bar.attr(f,d.id),g.text.attr(f,d.id),d.beforeDestroy(function(){g.bar.removeAttr(f),g.text.removeAttr(f)})}t.default=u,t.selectorValidator=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3)),o=n(7);function i(a,l){var s=a.$textElem,u=s.children();if(!u||!u.length)return s.append(r.default(o.EMPTY_P)),void i(a);var c=u.last();if(l){var d=c.html().toLowerCase(),f=c.getNodeName();if(d!=="<br>"&&d!=="<br/>"||f!=="P")return s.append(r.default(o.EMPTY_P)),void i(a)}a.selection.createRangeByElem(c,!1,!0),a.config.focus?a.selection.restoreSelection():a.selection.clearWindowSelectionRange()}t.default=i},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(p){s(p),u(p),c(p)}function s(p){p.txt.eventHooks.changeEvents.push(function(){var m=p.config.onchange;if(m){var v=p.txt.html()||"";p.isFocus=!0,m(v)}p.txt.togglePlaceholder()})}function u(p){function m(v){var g=v.target,b=a.default(g),y=p.$textElem,w=p.$toolbarElem,x=y.isContain(b),_=w.isContain(b),E=w.elems[0]==v.target;if(x)p.isFocus||f(p),p.isFocus=!0;else{if(_&&!E||!p.isFocus)return;d(p),p.isFocus=!1}}p.isFocus=!1,document.activeElement===p.$textElem.elems[0]&&p.config.focus&&(f(p),p.isFocus=!0),a.default(document).on("click",m),p.beforeDestroy(function(){a.default(document).off("click",m)})}function c(p){p.$textElem.on("compositionstart",function(){p.isComposing=!0,p.txt.togglePlaceholder()}).on("compositionend",function(){p.isComposing=!1,p.txt.togglePlaceholder()})}function d(p){var m,v=p.config.onblur,g=p.txt.html()||"";(0,i.default)(m=p.txt.eventHooks.onBlurEvents).call(m,function(b){return b()}),v(g)}function f(p){(0,p.config.onfocus)(p.txt.html()||"")}t.default=l},function(e,t,n){function r(o){var i=o.config,a=i.lang,l=i.languages;if(o.i18next==null)o.i18next={t:function(s){var u=s.split(".");return u[u.length-1]}};else try{o.i18next.init({ns:"wangEditor",lng:a,defaultNS:"wangEditor",resources:l})}catch(s){throw new Error("i18next:"+s)}}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(31));(0,o.default)(t,"__esModule",{value:!0}),t.setUnFullScreen=t.setFullScreen=void 0;var a=n(2).__importDefault(n(3));n(421);var l="w-e-icon-fullscreen",s="w-e-icon-fullscreen_exit",u="w-e-full-screen-editor";t.setFullScreen=function(d){var f=a.default(d.toolbarSelector),p=d.$textContainerElem,m=d.$toolbarElem,v=(0,i.default)(m).call(m,"i."+l),g=d.config;v.removeClass(l),v.addClass(s),f.addClass(u),f.css("z-index",g.zIndexFullScreen);var b=m.getBoundingClientRect();p.css("height","calc(100% - "+b.height+"px)")},t.setUnFullScreen=function(d){var f=a.default(d.toolbarSelector),p=d.$textContainerElem,m=d.$toolbarElem,v=(0,i.default)(m).call(m,"i."+s),g=d.config;v.removeClass(s),v.addClass(l),f.removeClass(u),f.css("z-index","auto"),p.css("height",g.height+"px")};var c=function(d){if(!d.textSelector&&d.config.showFullScreen){var f=d.$toolbarElem,p=a.default(`<div class="w-e-menu" data-title="\u5168\u5C4F"> |
|
924 |
<i class="`+l+`"></i> |
|
925 |
</div>`);p.on("click",function(m){var v;(0,i.default)(v=a.default(m.currentTarget)).call(v,"i").hasClass(l)?(p.attr("data-title","\u53D6\u6D88\u5168\u5C4F"),t.setFullScreen(d)):(p.attr("data-title","\u5168\u5C4F"),t.setUnFullScreen(d))}),f.append(p)}};t.default=c},function(e,t,n){var r=n(20),o=n(422);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-full-screen-editor { |
|
926 |
position: fixed; |
|
927 |
width: 100%!important; |
|
928 |
height: 100%!important; |
|
929 |
left: 0; |
|
930 |
top: 0; |
|
931 |
} |
|
932 |
`,""]),e.exports=t},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(31));(0,o.default)(t,"__esModule",{value:!0});var a=function(l,s){var u,c=l.isEnable?l.$textElem:(0,i.default)(u=l.$textContainerElem).call(u,".w-e-content-mantle"),d=(0,i.default)(c).call(c,"[id='"+s+"']").getOffsetData().top;c.scrollTop(d)};t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(128)),o={menu:2,panel:2,toolbar:1,tooltip:1,textContainer:1},i=function(){function a(){this.tier=o,this.baseZIndex=r.default.zIndex}return a.prototype.get=function(l){return l&&this.tier[l]?this.baseZIndex+this.tier[l]:this.baseZIndex},a.prototype.init=function(l){this.baseZIndex==r.default.zIndex&&(this.baseZIndex=l.config.zIndex)},a}();t.default=i},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(70)),a=r(n(4));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(426)),u=n(6),c=n(7);function d(p,m){return(0,i.default)(p).call(p,function(v){var g=v.type,b=v.target,y=v.attributeName;return g!="attributes"||g=="attributes"&&(y=="contenteditable"||b!=m)})}var f=function(p){function m(v){var g=p.call(this,function(b,y){var w;if(b=d(b,y.target),(w=g.data).push.apply(w,b),v.isCompatibleMode)g.asyncSave();else if(!v.isComposing)return g.asyncSave()})||this;return g.editor=v,g.data=[],g.asyncSave=c.EMPTY_FN,g}return l.__extends(m,p),m.prototype.save=function(){this.data.length&&(this.editor.history.save(this.data),this.data.length=0,this.emit())},m.prototype.emit=function(){var v;(0,a.default)(v=this.editor.txt.eventHooks.changeEvents).call(v,function(g){return g()})},m.prototype.observe=function(){var v=this;p.prototype.observe.call(this,this.editor.$textElem.elems[0]);var g=this.editor.config.onchangeTimeout;this.asyncSave=u.debounce(function(){v.save()},g),this.editor.isCompatibleMode||this.editor.$textElem.on("compositionend",function(){v.asyncSave()})},m}(s.default);t.default=f},function(e,t,n){var r=n(0)(n(1));(0,r.default)(t,"__esModule",{value:!0});var o=function(){function i(a,l){var s=this;this.options={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0},this.callback=function(u){a(u,s)},this.observer=new MutationObserver(this.callback),l&&(this.options=l)}return(0,r.default)(i.prototype,"target",{get:function(){return this.node},enumerable:!1,configurable:!0}),i.prototype.observe=function(a){this.node instanceof Node||(this.node=a,this.connect())},i.prototype.connect=function(){if(this.node)return this.observer.observe(this.node,this.options),this;throw new Error("\u8FD8\u672A\u521D\u59CB\u5316\u7ED1\u5B9A\uFF0C\u8BF7\u60A8\u5148\u7ED1\u5B9A\u6709\u6548\u7684 Node \u8282\u70B9")},i.prototype.disconnect=function(){var a=this.observer.takeRecords();a.length&&this.callback(a),this.observer.disconnect()},i}();t.default=o},function(e,t,n){var r=n(0)(n(1));(0,r.default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(428)),a=o.__importDefault(n(435)),l=o.__importDefault(n(436)),s=function(){function u(c){this.editor=c,this.content=new i.default(c),this.scroll=new a.default(c),this.range=new l.default(c)}return(0,r.default)(u.prototype,"size",{get:function(){return this.scroll.size},enumerable:!1,configurable:!0}),u.prototype.observe=function(){this.content.observe(),this.scroll.observe(),!this.editor.isCompatibleMode&&this.range.observe()},u.prototype.save=function(c){c.length&&(this.content.save(c),this.scroll.save(),!this.editor.isCompatibleMode&&this.range.save())},u.prototype.revoke=function(){this.editor.change.disconnect();var c=this.content.revoke();c&&(this.scroll.revoke(),this.editor.isCompatibleMode||(this.range.revoke(),this.editor.$textElem.focus())),this.editor.change.connect(),c&&this.editor.change.emit()},u.prototype.restore=function(){this.editor.change.disconnect();var c=this.content.restore();c&&(this.scroll.restore(),this.editor.isCompatibleMode||(this.range.restore(),this.editor.$textElem.focus())),this.editor.change.connect(),c&&this.editor.change.emit()},u}();t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(429)),i=r.__importDefault(n(433)),a=function(){function l(s){this.editor=s}return l.prototype.observe=function(){this.editor.isCompatibleMode?this.cache=new i.default(this.editor):this.cache=new o.default(this.editor),this.cache.observe()},l.prototype.save=function(s){this.editor.isCompatibleMode?this.cache.save():this.cache.compile(s)},l.prototype.revoke=function(){var s;return(s=this.cache)===null||s===void 0?void 0:s.revoke()},l.prototype.restore=function(){var s;return(s=this.cache)===null||s===void 0?void 0:s.restore()},l}();t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=r.__importDefault(n(98)),i=r.__importDefault(n(431)),a=n(432),l=function(s){function u(c){var d=s.call(this,c.config.historyMaxSize)||this;return d.editor=c,d}return r.__extends(u,s),u.prototype.observe=function(){this.resetMaxSize(this.editor.config.historyMaxSize)},u.prototype.compile=function(c){return this.save(i.default(c)),this},u.prototype.revoke=function(){return s.prototype.revoke.call(this,function(c){a.revoke(c)})},u.prototype.restore=function(){return s.prototype.restore.call(this,function(c){a.restore(c)})},u}(o.default);t.default=l},function(e,t,n){var r=n(0)(n(1));(0,r.default)(t,"__esModule",{value:!0}),t.CeilStack=void 0;var o=function(){function i(a){a===void 0&&(a=0),this.data=[],this.max=0,this.reset=!1,(a=Math.abs(a))&&(this.max=a)}return i.prototype.resetMax=function(a){a=Math.abs(a),!this.reset&&!isNaN(a)&&(this.max=a,this.reset=!0)},(0,r.default)(i.prototype,"size",{get:function(){return this.data.length},enumerable:!1,configurable:!0}),i.prototype.instack=function(a){return this.data.unshift(a),this.max&&this.size>this.max&&(this.data.length=this.max),this},i.prototype.outstack=function(){return this.data.shift()},i.prototype.clear=function(){return this.data.length=0,this},i}();t.CeilStack=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(27));(0,o.default)(t,"__esModule",{value:!0}),t.compliePosition=t.complieNodes=t.compileValue=t.compileType=void 0;var l=n(6);function s(v){switch(v){case"childList":return"node";case"attributes":return"attr";default:return"text"}}function u(v){switch(v.type){case"attributes":return v.target.getAttribute(v.attributeName)||"";case"characterData":return v.target.textContent;default:return""}}function c(v){var g={};return v.addedNodes.length&&(g.add=l.toArray(v.addedNodes)),v.removedNodes.length&&(g.remove=l.toArray(v.removedNodes)),g}function d(v){return v.previousSibling?{type:"before",target:v.previousSibling}:v.nextSibling?{type:"after",target:v.nextSibling}:{type:"parent",target:v.target}}t.compileType=s,t.compileValue=u,t.complieNodes=c,t.compliePosition=d;var f=["UL","OL","H1","H2","H3","H4","H5","H6"];function p(v){var g=[],b=!1,y=[];return(0,i.default)(v).call(v,function(w,x){var _={type:s(w.type),target:w.target,attr:w.attributeName||"",value:u(w)||"",oldValue:w.oldValue||"",nodes:c(w),position:d(w)};if(g.push(_),l.UA.isFirefox){if(b&&w.addedNodes.length&&w.addedNodes[0].nodeType==1){var E=w.addedNodes[0],C={type:"node",target:E,attr:"",value:"",oldValue:"",nodes:{add:[b]},position:{type:"parent",target:E}};(0,a.default)(f).call(f,E.nodeName)!=-1?(C.nodes.add=l.toArray(E.childNodes),g.push(C)):b.nodeType==3?(m(E,y)&&(C.nodes.add=l.toArray(E.childNodes)),g.push(C)):(0,a.default)(f).call(f,w.target.nodeName)==-1&&m(E,y)&&(C.nodes.add=l.toArray(E.childNodes),g.push(C))}_.type=="node"&&w.removedNodes.length==1?(b=w.removedNodes[0],y.push(b)):(b=!1,y.length=0)}}),g}function m(v,g){for(var b=0,y=g.length-1;y>0&&v.contains(g[y]);y--)b++;return b}t.default=p},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(4)),a=r(n(94));function l(y,w){var x=y.position.target;switch(y.position.type){case"before":x.nextSibling?(x=x.nextSibling,(0,i.default)(w).call(w,function(_){y.target.insertBefore(_,x)})):(0,i.default)(w).call(w,function(_){y.target.appendChild(_)});break;case"after":(0,i.default)(w).call(w,function(_){y.target.insertBefore(_,x)});break;default:(0,i.default)(w).call(w,function(_){x.appendChild(_)})}}function s(y){for(var w=0,x=(0,a.default)(y.nodes);w<x.length;w++){var _=x[w],E=_[0],C=_[1];E==="add"?(0,i.default)(C).call(C,function(T){y.target.removeChild(T)}):l(y,C)}}function u(y){var w=y.target;y.oldValue==null?w.removeAttribute(y.attr):w.setAttribute(y.attr,y.oldValue)}function c(y){y.target.textContent=y.oldValue}(0,o.default)(t,"__esModule",{value:!0}),t.restore=t.revoke=void 0;var d={node:s,text:c,attr:u};function f(y){for(var w=y.length-1;w>-1;w--){var x=y[w];d[x.type](x)}}function p(y){for(var w=0,x=(0,a.default)(y.nodes);w<x.length;w++){var _=x[w],E=_[0],C=_[1];E==="add"?l(y,C):(0,i.default)(C).call(C,function(T){T.parentNode.removeChild(T)})}}function m(y){y.target.textContent=y.value}function v(y){y.target.setAttribute(y.attr,y.value)}t.revoke=f;var g={node:p,text:m,attr:v};function b(y){for(var w=0,x=y;w<x.length;w++){var _=x[w];g[_.type](_)}}t.restore=b},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(434),o=function(){function i(a){this.editor=a,this.data=new r.TailChain}return i.prototype.observe=function(){this.data.resetMax(this.editor.config.historyMaxSize),this.data.insertLast(this.editor.$textElem.html())},i.prototype.save=function(){return this.data.insertLast(this.editor.$textElem.html()),this},i.prototype.revoke=function(){var a=this.data.prev();return!!a&&(this.editor.$textElem.html(a),!0)},i.prototype.restore=function(){var a=this.data.next();return!!a&&(this.editor.$textElem.html(a),!0)},i}();t.default=o},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(91));(0,o.default)(t,"__esModule",{value:!0}),t.TailChain=void 0;var a=function(){function l(){this.data=[],this.max=0,this.point=0,this.isRe=!1}return l.prototype.resetMax=function(s){(s=Math.abs(s))&&(this.max=s)},(0,o.default)(l.prototype,"size",{get:function(){return this.data.length},enumerable:!1,configurable:!0}),l.prototype.insertLast=function(s){var u;for(this.isRe&&((0,i.default)(u=this.data).call(u,this.point+1),this.isRe=!1),this.data.push(s);this.max&&this.size>this.max;)this.data.shift();return this.point=this.size-1,this},l.prototype.current=function(){return this.data[this.point]},l.prototype.prev=function(){if(!this.isRe&&(this.isRe=!0),this.point--,!(this.point<0))return this.current();this.point=0},l.prototype.next=function(){if(!this.isRe&&(this.isRe=!0),this.point++,!(this.point>=this.size))return this.current();this.point=this.size-1},l}();t.TailChain=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=n(2),o=function(i){function a(l){var s=i.call(this,l.config.historyMaxSize)||this;return s.editor=l,s.last=0,s.target=l.$textElem.elems[0],s}return r.__extends(a,i),a.prototype.observe=function(){var l=this;this.target=this.editor.$textElem.elems[0],this.editor.$textElem.on("scroll",function(){l.last=l.target.scrollTop}),this.resetMaxSize(this.editor.config.historyMaxSize)},a.prototype.save=function(){return i.prototype.save.call(this,[this.last,this.target.scrollTop]),this},a.prototype.revoke=function(){var l=this;return i.prototype.revoke.call(this,function(s){l.target.scrollTop=s[0]})},a.prototype.restore=function(){var l=this;return i.prototype.restore.call(this,function(s){l.target.scrollTop=s[1]})},a}(r.__importDefault(n(98)).default);t.default=o},function(e,t,n){var r=n(0)(n(1));(0,r.default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(98)),a=o.__importDefault(n(3)),l=n(6);function s(c){return{start:[c.startContainer,c.startOffset],end:[c.endContainer,c.endOffset],root:c.commonAncestorContainer,collapsed:c.collapsed}}var u=function(c){function d(f){var p=c.call(this,f.config.historyMaxSize)||this;return p.editor=f,p.lastRange=s(document.createRange()),p.root=f.$textElem.elems[0],p.updateLastRange=l.debounce(function(){p.lastRange=s(p.rangeHandle)},f.config.onchangeTimeout),p}return o.__extends(d,c),(0,r.default)(d.prototype,"rangeHandle",{get:function(){var f=document.getSelection();return f&&f.rangeCount?f.getRangeAt(0):document.createRange()},enumerable:!1,configurable:!0}),d.prototype.observe=function(){var f=this;function p(){var v=f.rangeHandle;(f.root===v.commonAncestorContainer||f.root.contains(v.commonAncestorContainer))&&(f.editor.isComposing||f.updateLastRange())}function m(v){(v.key=="Backspace"||v.key=="Delete")&&f.updateLastRange()}this.root=this.editor.$textElem.elems[0],this.resetMaxSize(this.editor.config.historyMaxSize),a.default(document).on("selectionchange",p),this.editor.beforeDestroy(function(){a.default(document).off("selectionchange",p)}),f.editor.$textElem.on("keydown",m)},d.prototype.save=function(){var f=s(this.rangeHandle);return c.prototype.save.call(this,[this.lastRange,f]),this.lastRange=f,this},d.prototype.set=function(f){try{if(f){var p=this.rangeHandle;return p.setStart.apply(p,f.start),p.setEnd.apply(p,f.end),this.editor.menus.changeActive(),!0}}catch{return!1}return!1},d.prototype.revoke=function(){var f=this;return c.prototype.revoke.call(this,function(p){f.set(p[0])})},d.prototype.restore=function(){var f=this;return c.prototype.restore.call(this,function(p){f.set(p[1])})},d}(i.default);t.default=u},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(31));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(s){var u,c,d=!1;function f(){if(!d){s.$textElem.hide();var m=s.zIndex.get("textContainer"),v=s.txt.html();u=a.default('<div class="w-e-content-mantle" style="z-index:'+m+`"> |
|
933 |
<div class="w-e-content-preview w-e-text">`+v+`</div> |
|
934 |
</div>`),s.$textContainerElem.append(u);var g=s.zIndex.get("menu");c=a.default('<div class="w-e-menue-mantle" style="z-index:'+g+'"></div>'),s.$toolbarElem.append(c),d=!0,s.isEnable=!1}}function p(){!d||(u.remove(),c.remove(),s.$textElem.show(),d=!1,s.isEnable=!0)}return s.txt.eventHooks.changeEvents.push(function(){d&&(0,i.default)(u).call(u,".w-e-content-preview").html(s.$textElem.html())}),{disable:f,enable:p}}n(438),t.default=l},function(e,t,n){var r=n(20),o=n(439);typeof(o=o.__esModule?o.default:o)=="string"&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,`.w-e-content-mantle { |
|
935 |
width: 100%; |
|
936 |
height: 100%; |
|
937 |
overflow-y: auto; |
|
938 |
} |
|
939 |
.w-e-content-mantle .w-e-content-preview { |
|
940 |
width: 100%; |
|
941 |
min-height: 100%; |
|
942 |
padding: 0 10px; |
|
943 |
line-height: 1.5; |
|
944 |
} |
|
945 |
.w-e-content-mantle .w-e-content-preview img { |
|
946 |
cursor: default; |
|
947 |
} |
|
948 |
.w-e-content-mantle .w-e-content-preview img:hover { |
|
949 |
box-shadow: none; |
|
950 |
} |
|
951 |
.w-e-menue-mantle { |
|
952 |
position: absolute; |
|
953 |
height: 100%; |
|
954 |
width: 100%; |
|
955 |
top: 0; |
|
956 |
left: 0; |
|
957 |
} |
|
958 |
`,""]),e.exports=t},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var r=function(){function o(i){var a=this;this.editor=i;var l=function(){document.activeElement===i.$textElem.elems[0]&&a.emit()};window.document.addEventListener("selectionchange",l),this.editor.beforeDestroy(function(){window.document.removeEventListener("selectionchange",l)})}return o.prototype.emit=function(){var i,a=this.editor.config.onSelectionChange;if(a){var l=this.editor.selection;l.saveRange(),l.isSelectionEmpty()||a({text:l.getSelectionText(),html:(i=l.getSelectionContainerElem())===null||i===void 0?void 0:i.elems[0].innerHTML,selection:l})}},o}();t.default=r},function(e,t,n){var r=n(0),o=r(n(1)),i=r(n(127)),a=r(n(94)),l=r(n(4));(0,o.default)(t,"__esModule",{value:!0}),t.registerPlugin=void 0;var s=n(2).__importDefault(n(87)),u=n(6);function c(f,p,m){if(!f)throw new TypeError("name is not define");if(!p)throw new TypeError("options is not define");if(!p.intention)throw new TypeError("options.intention is not define");if(p.intention&&typeof p.intention!="function")throw new TypeError("options.intention is not function");m[f]&&console.warn("plugin "+f+" \u5DF2\u5B58\u5728\uFF0C\u5DF2\u8986\u76D6\u3002"),m[f]=p}function d(f){var p=(0,i.default)({},u.deepClone(s.default.globalPluginsFunctionList),u.deepClone(f.pluginsFunctionList)),m=(0,a.default)(p);(0,l.default)(m).call(m,function(v){var g=v[0],b=v[1];console.info("plugin "+g+" initializing");var y=b.intention,w=b.config;y(f,w),console.info("plugin "+g+" initialization complete")})}t.registerPlugin=c,t.default=d},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0})}]).default;var Tqe=Oqe(ype.exports),Mqe=1,Nqe=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Fqe=Te({name:"fcEditor",props:{modelValue:String,init:Function,disabled:Boolean,config:Object},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{editor:{},uni:Mqe++}},watch:{disabled:function(){this.enable()},modelValue:function(e){e!==this.editor.txt.html()&&this.editor.txt.html(e)}},methods:{enable:function(){this.disabled?this.editor.disable():this.editor.enable()},result:function(){this.$emit("update:modelValue",this.editor.txt.html())}},mounted:function(){var e=this;this.$nextTick(function(){e.editor=new Tqe("#editor".concat(e.uni)),e.editor.config.zIndex=2,e.config&&Nqe(e.editor.config,e.config),e.init&&e.init(e.editor),e.editor.create(),e.enable(),e.editor.txt.html(e.modelValue)})},render:function(){var e=function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?gpe(Object(r),!0).forEach(function(o){Dqe(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gpe(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}({},this.$attrs);return delete e.id,ie("div",Un(e,{onInput:this.result,id:"editor".concat(this.uni),style:"line-height: normal;"}),null)},beforeDestroy:function(){this.editor&&this.editor.destroy(),this.editor=null}});const Jx=(e,t,n)=>{Br.component(e,n||t),Ux.component(e,t)};Br.component("draggable",dB),Br.component("DragTool",vpe),Br.component("DragBox",mpe),Br.component("Validate",YGe),Br.component("Struct",uGe),Br.component("HtmlEditor",hGe),Br.component("FetchConfig",wGe),Br.component("FnEditor",Gx),Br.component("Required",JGe),Br.component("TableOptions",iqe),Br.component("TreeOptions",vqe),Br.component("TableFormColumn",kqe),Br.component("EventConfig",jfe),Br.component("ColorInput",EGe),Br.component("SizeInput",kGe),Br.component("FieldInput",TGe),Br.component("FnConfig",RGe),Br.component("FcRow",cGe),Jx("FcEditor",Fqe),Jx("TableForm",_qe,Aqe),Jx("FcTable",qGe,UGe);function Rqe(e){e.useApp((t,n)=>{n.component(_O.name)||n.use(_O),n.component(Sa.name)||n.use(Sa),n.component(SO.name)||n.use(SO),n.component(CO.name)||n.use(CO),n.component(ua.name)||n.use(ua),n.component(Bw.name)||n.use(Bw),n.component(FO.name)||n.use(FO),n.component(kO.name)||n.use(kO),n.component(Al.name)||n.use(Al),n.component(NO.name)||n.use(NO),n.component(C3.name)||n.use(C3),n.component(VO.name)||n.use(VO),n.component(Ow.name)||n.use(Ow),n.component(jO.name)||n.use(jO),n.component(k3.name)||n.use(k3),n.component(Mw.name)||n.use(Mw),n.component(bl.name)||n.use(bl),n.component(w3.name)||n.use(w3),n.component(HO.name)||n.use(HO),n.component(Am.name)||n.use(Am),n.component(IO.name)||n.use(IO),n.component(LO.name)||n.use(LO),n.component(PO.name)||n.use(PO),n.component(RO.name)||n.use(RO),n.component(xO.name)||n.use(xO),n.component(Ft.name)||n.use(Ft),n.component(BO.name)||n.use(BO),n.component(wR.name)||n.use(wR)})}mc.install=function(e){e.component("FcDesigner",mc)},mc.makeOptionsRule=kx,mc.formCreate=Ux,mc.designerForm=Br,mc.component=Jx,mc.useLocale=Rfe,mc.t=fB,function(e,t){const n=e.split("."),r=t.split("."),o=Math.min(n.length,r.length);for(var i=0;i<o;i++){var a=parseInt(n[i],10)-parseInt(r[i],10);if(a>0)return 1;if(a<0)return-1}return n.length===r.length?0:n.length<r.length?-1:1}("3.1.27",Ux.version)===1&&console.warn("Please use FormCreate version 3.1.27 or greater, see https://github.com/xaboy/form-create."),zDe=e=>e?e.replace(/\-(\w)/g,(t,n)=>n.toUpperCase()):"",zw=(e,t,n=document.documentElement)=>{n.style.setProperty(e,t)},cOe=(e,t)=>{if(e.findIndex)return e.findIndex(t);let n=-1;return e.some((r,o,i)=>{const a=t(r,o,i);if(a)return n=o,a}),n},HOe=e=>e.replace(/(^\s*)|(\s*$)/g,""),ZQ=()=>{if(typeof crypto=="object"){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();if(typeof crypto.getRandomValues=="function"&&typeof Uint8Array=="function"){const n=r=>{const o=Number(r);return(o^crypto.getRandomValues(new Uint8Array(1))[0]&15>>o/4).toString(16)};return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n)}}let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{let r=16*Math.random();return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n==="x"?r:3&r|8).toString(16)})},SOe=(e,t,n)=>{const r=parseFloat(n),o=Math.floor(Math.log(r)/Math.log(1024));return(r/Math.pow(1024,o)).toFixed(2)+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][o]};let bpe,Ape,Zx,wpe,xpe;bpe=Te({name:"ImageViewer",__name:"ImageViewer",props:{urlList:{type:Array,default:()=>[]},zIndex:Xn.number.def(200),initialIndex:Xn.number.def(0),infinite:Xn.bool.def(!0),hideOnClickModal:Xn.bool.def(!1),teleported:Xn.bool.def(!1),show:Xn.bool.def(!1)},setup(e){const t=e,n=ee(()=>{const i={...t};return delete i.show,i}),r=de(t.show),o=()=>{r.value=!1};return(i,a)=>{const l=qO;return M(r)?(Y(),Pe(l,Un({key:0},M(n),{onClose:o}),null,16)):Fe("",!0)}}}),Ape=Object.prototype.toString,Zx=(e,t)=>Ape.call(e)===`[object ${t}]`,x3=e=>e===null||(wpe(e)||E3(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:!!(t=>t!==null&&Zx(t,"Object"))(e)&&Object.keys(e).length===0),EQ=e=>Zx(e,"Number"),E3=e=>Zx(e,"String"),gOe=e=>typeof e=="function",wpe=e=>e&&Array.isArray(e),xpe=!(typeof window>"u"),YO=e=>/(((^https?:(?:\/\/)?)(?:[-:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&%@.\w_]*)#?(?:[\w]*))?)$/.test(e);let _pe=null;QQ=function(e){if(!xpe)return;const{urlList:t,initialIndex:n=0,infinite:r=!0,hideOnClickModal:o=!1,teleported:i=!1,zIndex:a=2e3,show:l=!0}=e,s={},u=document.createElement("div");s.urlList=t,s.initialIndex=n,s.infinite=r,s.hideOnClickModal=o,s.teleported=i,s.zIndex=a,s.show=l,document.body.appendChild(u),_pe=ie(bpe,s),qs(_pe,u)};function Epe(e,t){return function(){return e.apply(t,arguments)}}const{toString:Iqe}=Object.prototype,{getPrototypeOf:gB}=Object,e_=(e=>t=>{const n=Iqe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Vu=e=>(e=e.toLowerCase(),t=>e_(t)===e),t_=e=>t=>typeof t===e,{isArray:Rg}=Array,M4=t_("undefined"),Cpe=Vu("ArrayBuffer"),Bqe=t_("string"),bs=t_("function"),Spe=t_("number"),n_=e=>e!==null&&typeof e=="object",r_=e=>{if(e_(e)!=="object")return!1;const t=gB(e);return!(t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.toStringTag in e||Symbol.iterator in e)},Lqe=Vu("Date"),Pqe=Vu("File"),jqe=Vu("Blob"),Vqe=Vu("FileList"),zqe=Vu("URLSearchParams"),[Hqe,$qe,Uqe,Wqe]=["ReadableStream","Request","Response","Headers"].map(Vu);function N4(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,o;if(typeof e!="object"&&(e=[e]),Rg(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let l;for(r=0;r<a;r++)l=i[r],t.call(null,e[l],l,e)}}function kpe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const A1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Dpe=e=>!M4(e)&&e!==A1,Gqe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&gB(Uint8Array)),qqe=Vu("HTMLFormElement"),Ope=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kqe=Vu("RegExp"),Tpe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};N4(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},yB="abcdefghijklmnopqrstuvwxyz",Mpe="0123456789",Npe={DIGIT:Mpe,ALPHA:yB,ALPHA_DIGIT:yB+yB.toUpperCase()+Mpe},Yqe=Vu("AsyncFunction"),Fpe=(Rpe=typeof setImmediate=="function",Ipe=bs(A1.postMessage),Rpe?setImmediate:Ipe?(bB=`axios@${Math.random()}`,o_=[],A1.addEventListener("message",({source:e,data:t})=>{e===A1&&t===bB&&o_.length&&o_.shift()()},!1),e=>{o_.push(e),A1.postMessage(bB,"*")}):e=>setTimeout(e));var Rpe,Ipe,bB,o_;const Xqe=typeof queueMicrotask<"u"?queueMicrotask.bind(A1):typeof process<"u"&&process.nextTick||Fpe,pt={isArray:Rg,isArrayBuffer:Cpe,isBuffer:function(e){return e!==null&&!M4(e)&&e.constructor!==null&&!M4(e.constructor)&&bs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bs(e.append)&&((t=e_(e))==="formdata"||t==="object"&&bs(e.toString)&&e.toString()==="[object FormData]"))},isArrayBufferView:function(e){let t;return t=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Cpe(e.buffer),t},isString:Bqe,isNumber:Spe,isBoolean:e=>e===!0||e===!1,isObject:n_,isPlainObject:r_,isReadableStream:Hqe,isRequest:$qe,isResponse:Uqe,isHeaders:Wqe,isUndefined:M4,isDate:Lqe,isFile:Pqe,isBlob:jqe,isRegExp:Kqe,isFunction:bs,isStream:e=>n_(e)&&bs(e.pipe),isURLSearchParams:zqe,isTypedArray:Gqe,isFileList:Vqe,forEach:N4,merge:function e(){const{caseless:t}=Dpe(this)&&this||{},n={},r=(o,i)=>{const a=t&&kpe(n,i)||i;r_(n[a])&&r_(o)?n[a]=e(n[a],o):r_(o)?n[a]=e({},o):Rg(o)?n[a]=o.slice():n[a]=o};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&N4(arguments[o],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(N4(t,(o,i)=>{n&&bs(o)?e[i]=Epe(o,n):e[i]=o},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=n!==!1&&gB(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:e_,kindOfTest:Vu,endsWith:(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},toArray:e=>{if(!e)return null;if(Rg(e))return e;let t=e.length;if(!Spe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const o=r.value;t.call(e,o[0],o[1])}},matchAll:(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm:qqe,hasOwnProperty:Ope,hasOwnProp:Ope,reduceDescriptors:Tpe,freezeMethods:e=>{Tpe(e,(t,n)=>{if(bs(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];bs(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Rg(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,findKey:kpe,global:A1,isContextDefined:Dpe,ALPHABET:Npe,generateString:(e=16,t=Npe.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&bs(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(n_(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Rg(r)?[]:{};return N4(r,(a,l)=>{const s=n(a,o+1);!M4(s)&&(i[l]=s)}),t[o]=void 0,i}}return r};return n(e,0)},isAsyncFn:Yqe,isThenable:e=>e&&(n_(e)||bs(e))&&bs(e.then)&&bs(e.catch),setImmediate:Fpe,asap:Xqe};function tr(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}pt.inherits(tr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:pt.toJSONObject(this.config),code:this.code,status:this.status}}});const Bpe=tr.prototype,Lpe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Lpe[e]={value:e}}),Object.defineProperties(tr,Lpe),Object.defineProperty(Bpe,"isAxiosError",{value:!0}),tr.from=(e,t,n,r,o,i)=>{const a=Object.create(Bpe);return pt.toFlatObject(e,a,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),tr.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function AB(e){return pt.isPlainObject(e)||pt.isArray(e)}function Ppe(e){return pt.endsWith(e,"[]")?e.slice(0,-2):e}function jpe(e,t,n){return e?e.concat(t).map(function(r,o){return r=Ppe(r),!n&&o?"["+r+"]":r}).join(n?".":""):t}const Qqe=pt.toFlatObject(pt,{},null,function(e){return/^is[A-Z]/.test(e)});function i_(e,t,n){if(!pt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=pt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!pt.isUndefined(p[f])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&pt.isSpecCompliantForm(t);if(!pt.isFunction(o))throw new TypeError("visitor must be a function");function s(f){if(f===null)return"";if(pt.isDate(f))return f.toISOString();if(!l&&pt.isBlob(f))throw new tr("Blob is not supported. Use a Buffer instead.");return pt.isArrayBuffer(f)||pt.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,p,m){let v=f;if(f&&!m&&typeof f=="object"){if(pt.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=JSON.stringify(f);else if(pt.isArray(f)&&function(g){return pt.isArray(g)&&!g.some(AB)}(f)||(pt.isFileList(f)||pt.endsWith(p,"[]"))&&(v=pt.toArray(f)))return p=Ppe(p),v.forEach(function(g,b){!pt.isUndefined(g)&&g!==null&&t.append(a===!0?jpe([p],b,i):a===null?p:p+"[]",s(g))}),!1}return!!AB(f)||(t.append(jpe(m,p,i),s(f)),!1)}const c=[],d=Object.assign(Qqe,{defaultVisitor:u,convertValue:s,isVisitable:AB});if(!pt.isObject(e))throw new TypeError("data must be an object");return function f(p,m){if(!pt.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(p),pt.forEach(p,function(v,g){(!(pt.isUndefined(v)||v===null)&&o.call(t,v,pt.isString(g)?g.trim():g,m,d))===!0&&f(v,m?m.concat(g):[g])}),c.pop()}}(e),t}function Vpe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function wB(e,t){this._pairs=[],e&&i_(e,this,t)}const zpe=wB.prototype;function Jqe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hpe(e,t,n){if(!t)return e;const r=n&&n.encode||Jqe,o=n&&n.serialize;let i;if(i=o?o(t,n):pt.isURLSearchParams(t)?t.toString():new wB(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}zpe.append=function(e,t){this._pairs.push([e,t])},zpe.toString=function(e){const t=e?function(n){return e.call(this,n,Vpe)}:Vpe;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};class $pe{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){pt.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Upe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zqe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:wB,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},xB=typeof window<"u"&&typeof document<"u",_B=typeof navigator=="object"&&navigator||void 0,eKe=xB&&(!_B||["ReactNative","NativeScript","NS"].indexOf(_B.product)<0),tKe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nKe=xB&&window.location.href||"http://localhost",Il={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xB,hasStandardBrowserEnv:eKe,hasStandardBrowserWebWorkerEnv:tKe,navigator:_B,origin:nKe},Symbol.toStringTag,{value:"Module"})),...Zqe};function Wpe(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),s=i>=n.length;return a=!a&&pt.isArray(o)?o.length:a,s?(pt.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!l):(o[a]&&pt.isObject(o[a])||(o[a]=[]),t(n,r,o[a],i)&&pt.isArray(o[a])&&(o[a]=function(u){const c={},d=Object.keys(u);let f;const p=d.length;let m;for(f=0;f<p;f++)m=d[f],c[m]=u[m];return c}(o[a])),!l)}if(pt.isFormData(e)&&pt.isFunction(e.entries)){const n={};return pt.forEachEntry(e,(r,o)=>{t(function(i){return pt.matchAll(/\w+|\[(\w*)]/g,i).map(a=>a[0]==="[]"?"":a[1]||a[0])}(r),o,n,0)}),n}return null}const F4={transitional:Upe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=pt.isObject(e);if(o&&pt.isHTMLForm(e)&&(e=new FormData(e)),pt.isFormData(e))return r?JSON.stringify(Wpe(e)):e;if(pt.isArrayBuffer(e)||pt.isBuffer(e)||pt.isStream(e)||pt.isFile(e)||pt.isBlob(e)||pt.isReadableStream(e))return e;if(pt.isArrayBufferView(e))return e.buffer;if(pt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(a,l){return i_(a,new Il.classes.URLSearchParams,Object.assign({visitor:function(s,u,c,d){return Il.isNode&&pt.isBuffer(s)?(this.append(u,s.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},l))}(e,this.formSerializer).toString();if((i=pt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return i_(i?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(a,l,s){if(pt.isString(a))try{return(l||JSON.parse)(a),pt.trim(a)}catch(u){if(u.name!=="SyntaxError")throw u}return(s||JSON.stringify)(a)}(e)):e}],transformResponse:[function(e){const t=this.transitional||F4.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(pt.isResponse(e)||pt.isReadableStream(e))return e;if(e&&pt.isString(e)&&(n&&!this.responseType||r)){const o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(i){if(o)throw i.name==="SyntaxError"?tr.from(i,tr.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Il.classes.FormData,Blob:Il.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pt.forEach(["delete","get","head","post","put","patch"],e=>{F4.headers[e]={}});const rKe=pt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gpe=Symbol("internals");function R4(e){return e&&String(e).trim().toLowerCase()}function a_(e){return e===!1||e==null?e:pt.isArray(e)?e.map(a_):String(e)}function EB(e,t,n,r,o){return pt.isFunction(r)?r.call(this,t,n):(o&&(t=n),pt.isString(t)?pt.isString(r)?t.indexOf(r)!==-1:pt.isRegExp(r)?r.test(t):void 0:void 0)}class Bl{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(l,s,u){const c=R4(s);if(!c)throw new Error("header name must be a non-empty string");const d=pt.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||s]=a_(l))}const a=(l,s)=>pt.forEach(l,(u,c)=>i(u,c,s));if(pt.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(pt.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))a((l=>{const s={};let u,c,d;return l&&l.split(` |
|
959 |
`).forEach(function(f){d=f.indexOf(":"),u=f.substring(0,d).trim().toLowerCase(),c=f.substring(d+1).trim(),!u||s[u]&&rKe[u]||(u==="set-cookie"?s[u]?s[u].push(c):s[u]=[c]:s[u]=s[u]?s[u]+", "+c:c)}),s})(t),n);else if(pt.isHeaders(t))for(const[l,s]of t.entries())i(s,l,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=R4(t)){const r=pt.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return function(i){const a=Object.create(null),l=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=l.exec(i);)a[s[1]]=s[2];return a}(o);if(pt.isFunction(n))return n.call(this,o,r);if(pt.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=R4(t)){const r=pt.findKey(this,t);return!(!r||this[r]===void 0||n&&!EB(0,this[r],r,n))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=R4(a)){const l=pt.findKey(r,a);!l||n&&!EB(0,r[l],l,n)||(delete r[l],o=!0)}}return pt.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];t&&!EB(0,this[i],i,t,!0)||(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return pt.forEach(this,(o,i)=>{const a=pt.findKey(r,i);if(a)return n[a]=a_(o),void delete n[i];const l=t?function(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(u,c,d)=>c.toUpperCase()+d)}(i):String(i).trim();l!==i&&delete n[i],n[l]=a_(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return pt.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&pt.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` |
|
960 |
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const n=(this[Gpe]=this[Gpe]={accessors:{}}).accessors,r=this.prototype;function o(i){const a=R4(i);n[a]||(function(l,s){const u=pt.toCamelCase(" "+s);["get","set","has"].forEach(c=>{Object.defineProperty(l,c+u,{value:function(d,f,p){return this[c].call(this,s,d,f,p)},configurable:!0})})}(r,i),n[a]=!0)}return pt.isArray(t)?t.forEach(o):o(t),this}}function CB(e,t){const n=this||F4,r=t||n,o=Bl.from(r.headers);let i=r.data;return pt.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function qpe(e){return!(!e||!e.__CANCEL__)}function Ig(e,t,n){tr.call(this,e??"canceled",tr.ERR_CANCELED,t,n),this.name="CanceledError"}function Kpe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new tr("Request failed with status code "+n.status,[tr.ERR_BAD_REQUEST,tr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Bl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),pt.reduceDescriptors(Bl.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),pt.freezeMethods(Bl),pt.inherits(Ig,tr,{__CANCEL__:!0});const l_=(e,t,n=3)=>{let r=0;const o=function(i,a){i=i||10;const l=new Array(i),s=new Array(i);let u,c=0,d=0;return a=a!==void 0?a:1e3,function(f){const p=Date.now(),m=s[d];u||(u=p),l[c]=f,s[c]=p;let v=d,g=0;for(;v!==c;)g+=l[v++],v%=i;if(c=(c+1)%i,c===d&&(d=(d+1)%i),p-u<a)return;const b=m&&p-m;return b?Math.round(1e3*g/b):void 0}}(50,250);return function(i,a){let l,s,u=0,c=1e3/a;const d=(f,p=Date.now())=>{u=p,l=null,s&&(clearTimeout(s),s=null),i.apply(null,f)};return[(...f)=>{const p=Date.now(),m=p-u;m>=c?d(f,p):(l=f,s||(s=setTimeout(()=>{s=null,d(l)},c-m)))},()=>l&&d(l)]}(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,s=a-r,u=o(s);r=a,e({loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&a<=l?(l-a)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0})},n)},Ype=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Xpe=e=>(...t)=>pt.asap(()=>e(...t)),oKe=Il.hasStandardBrowserEnv?function(){const e=Il.navigator&&/(msie|trident)/i.test(Il.navigator.userAgent),t=document.createElement("a");let n;function r(o){let i=o;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(o){const i=pt.isString(o)?r(o):o;return i.protocol===n.protocol&&i.host===n.host}}():function(){return!0},iKe=Il.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];pt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),pt.isString(r)&&a.push("path="+r),pt.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Qpe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(n,r){return r?n.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):n}(e,t):t}const Jpe=e=>e instanceof Bl?{...e}:e;function w1(e,t){t=t||{};const n={};function r(u,c,d){return pt.isPlainObject(u)&&pt.isPlainObject(c)?pt.merge.call({caseless:d},u,c):pt.isPlainObject(c)?pt.merge({},c):pt.isArray(c)?c.slice():c}function o(u,c,d){return pt.isUndefined(c)?pt.isUndefined(u)?void 0:r(void 0,u,d):r(u,c,d)}function i(u,c){if(!pt.isUndefined(c))return r(void 0,c)}function a(u,c){return pt.isUndefined(c)?pt.isUndefined(u)?void 0:r(void 0,u):r(void 0,c)}function l(u,c,d){return d in t?r(u,c):d in e?r(void 0,u):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,c)=>o(Jpe(u),Jpe(c),!0)};return pt.forEach(Object.keys(Object.assign({},e,t)),function(u){const c=s[u]||o,d=c(e[u],t[u],u);pt.isUndefined(d)&&c!==l||(n[u]=d)}),n}const Zpe=e=>{const t=w1({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:l,auth:s}=t;if(t.headers=l=Bl.from(l),t.url=Hpe(Qpe(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),pt.isFormData(r)){if(Il.hasStandardBrowserEnv||Il.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((n=l.getContentType())!==!1){const[u,...c]=n?n.split(";").map(d=>d.trim()).filter(Boolean):[];l.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Il.hasStandardBrowserEnv&&(o&&pt.isFunction(o)&&(o=o(t)),o||o!==!1&&oKe(t.url))){const u=i&&a&&iKe.read(a);u&&l.set(i,u)}return t},aKe=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,n){const r=Zpe(e);let o=r.data;const i=Bl.from(r.headers).normalize();let a,l,s,u,c,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function m(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let v=new XMLHttpRequest;function g(){if(!v)return;const y=Bl.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());Kpe(function(w){t(w),m()},function(w){n(w),m()},{data:d&&d!=="text"&&d!=="json"?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:y,config:e,request:v}),v=null}v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout,"onloadend"in v?v.onloadend=g:v.onreadystatechange=function(){v&&v.readyState===4&&(v.status!==0||v.responseURL&&v.responseURL.indexOf("file:")===0)&&setTimeout(g)},v.onabort=function(){v&&(n(new tr("Request aborted",tr.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new tr("Network Error",tr.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const w=r.transitional||Upe;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),n(new tr(y,w.clarifyTimeoutError?tr.ETIMEDOUT:tr.ECONNABORTED,e,v)),v=null},o===void 0&&i.setContentType(null),"setRequestHeader"in v&&pt.forEach(i.toJSON(),function(y,w){v.setRequestHeader(w,y)}),pt.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),d&&d!=="json"&&(v.responseType=r.responseType),p&&([s,c]=l_(p,!0),v.addEventListener("progress",s)),f&&v.upload&&([l,u]=l_(f),v.upload.addEventListener("progress",l),v.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=y=>{v&&(n(!y||y.type?new Ig(null,e,v):y),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const b=function(y){const w=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y);return w&&w[1]||""}(r.url);b&&Il.protocols.indexOf(b)===-1?n(new tr("Unsupported protocol "+b+":",tr.ERR_BAD_REQUEST,e)):v.send(o||null)})},lKe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r,o=new AbortController;const i=function(u){if(!r){r=!0,l();const c=u instanceof Error?u:this.reason;o.abort(c instanceof tr?c:new Ig(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,i(new tr(`timeout ${t} of ms exceeded`,tr.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:s}=o;return s.unsubscribe=()=>pt.asap(l),s}},sKe=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},uKe=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ehe=(e,t,n,r)=>{const o=async function*(s,u){for await(const c of uKe(s))yield*sKe(c,u)}(e,t);let i,a=0,l=s=>{i||(i=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:u,value:c}=await o.next();if(u)return l(),void s.close();let d=c.byteLength;if(n){let f=a+=d;n(f)}s.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel:s=>(l(s),o.return())},{highWaterMark:2})},s_=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",the=s_&&typeof ReadableStream=="function",cKe=s_&&(typeof TextEncoder=="function"?(nhe=new TextEncoder,e=>nhe.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var nhe;const rhe=(e,...t)=>{try{return!!e(...t)}catch{return!1}},dKe=the&&rhe(()=>{let e=!1;const t=new Request(Il.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),SB=the&&rhe(()=>pt.isReadableStream(new Response("").body)),u_={stream:SB&&(e=>e.body)};var ohe;s_&&(ohe=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!u_[e]&&(u_[e]=pt.isFunction(ohe[e])?t=>t[e]():(t,n)=>{throw new tr(`Response type '${e}' is not supported`,tr.ERR_NOT_SUPPORT,n)})}));const fKe=async(e,t)=>{const n=pt.toFiniteNumber(e.getContentLength());return n??(async r=>r==null?0:pt.isBlob(r)?r.size:pt.isSpecCompliantForm(r)?(await new Request(Il.origin,{method:"POST",body:r}).arrayBuffer()).byteLength:pt.isArrayBufferView(r)||pt.isArrayBuffer(r)?r.byteLength:(pt.isURLSearchParams(r)&&(r+=""),pt.isString(r)?(await cKe(r)).byteLength:void 0))(t)},pKe=s_&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:s,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=Zpe(e);u=u?(u+"").toLowerCase():"text";let p,m=lKe([o,i&&i.toAbortSignal()],a);const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(s&&dKe&&n!=="get"&&n!=="head"&&(g=await fKe(c,r))!==0){let _,E=new Request(t,{method:"POST",body:r,duplex:"half"});if(pt.isFormData(r)&&(_=E.headers.get("content-type"))&&c.setContentType(_),E.body){const[C,T]=Ype(g,l_(Xpe(s)));r=ehe(E.body,65536,C,T)}}pt.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;p=new Request(t,{...f,signal:m,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let y=await fetch(p);const w=SB&&(u==="stream"||u==="response");if(SB&&(l||w&&v)){const _={};["status","statusText","headers"].forEach(k=>{_[k]=y[k]});const E=pt.toFiniteNumber(y.headers.get("content-length")),[C,T]=l&&Ype(E,l_(Xpe(l),!0))||[];y=new Response(ehe(y.body,65536,C,()=>{T&&T(),v&&v()}),_)}u=u||"text";let x=await u_[pt.findKey(u_,u)||"text"](y,e);return!w&&v&&v(),await new Promise((_,E)=>{Kpe(_,E,{data:x,headers:Bl.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(b){throw v&&v(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new tr("Network Error",tr.ERR_NETWORK,e,p),{cause:b.cause||b}):tr.from(b,b&&b.code,e,p)}}),ihe={http:null,xhr:aKe,fetch:pKe};pt.forEach(ihe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ahe=e=>`- ${e}`,hKe=e=>pt.isFunction(e)||e===null||e===!1,lhe=e=>{e=pt.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let a;if(n=e[i],r=n,!hKe(n)&&(r=ihe[(a=String(n)).toLowerCase()],r===void 0))throw new tr(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));throw new tr("There is no suitable adapter to dispatch the request "+(t?i.length>1?`since : |
|
961 |
`+i.map(ahe).join(` |
|
962 |
`):" "+ahe(i[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function kB(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ig(null,e)}function she(e){return kB(e),e.headers=Bl.from(e.headers),e.data=CB.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lhe(e.adapter||F4.adapter)(e).then(function(t){return kB(e),t.data=CB.call(e,e.transformResponse,t),t.headers=Bl.from(t.headers),t},function(t){return qpe(t)||(kB(e),t&&t.response&&(t.response.data=CB.call(e,e.transformResponse,t.response),t.response.headers=Bl.from(t.response.headers))),Promise.reject(t)})}const vKe="1.7.7",DB={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{DB[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const uhe={};DB.transitional=function(e,t,n){function r(o,i){return"[Axios v1.7.7] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,a)=>{if(e===!1)throw new tr(r(i," has been removed"+(t?" in "+t:"")),tr.ERR_DEPRECATED);return t&&!uhe[i]&&(uhe[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(o,i,a)}};const OB={assertOptions:function(e,t,n){if(typeof e!="object")throw new tr("options must be an object",tr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const l=e[i],s=l===void 0||a(l,i,e);if(s!==!0)throw new tr("option "+i+" must be "+s,tr.ERR_BAD_OPTION_VALUE)}else if(n!==!0)throw new tr("Unknown option "+i,tr.ERR_BAD_OPTION)}},validators:DB},yp=OB.validators;class x1{constructor(t){this.defaults=t,this.interceptors={request:new $pe,response:new $pe}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` |
|
963 |
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{}).url=t:n=t||{},n=w1(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&OB.assertOptions(r,{silentJSONParsing:yp.transitional(yp.boolean),forcedJSONParsing:yp.transitional(yp.boolean),clarifyTimeoutError:yp.transitional(yp.boolean)},!1),o!=null&&(pt.isFunction(o)?n.paramsSerializer={serialize:o}:OB.assertOptions(o,{encode:yp.function,serialize:yp.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&pt.merge(i.common,i[n.method]);i&&pt.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Bl.concat(a,i);const l=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];let c;this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0;if(!s){const m=[she.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,u),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=l.length;let p=n;for(f=0;f<d;){const m=l[f++],v=l[f++];try{p=m(p)}catch(g){v.call(this,g);break}}try{c=she.call(this,p)}catch(m){return Promise.reject(m)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(t){return Hpe(Qpe((t=w1(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}pt.forEach(["delete","get","head","options"],function(e){x1.prototype[e]=function(t,n){return this.request(w1(n||{},{method:e,url:t,data:(n||{}).data}))}}),pt.forEach(["post","put","patch"],function(e){function t(n){return function(r,o,i){return this.request(w1(i||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}x1.prototype[e]=t(),x1.prototype[e+"Form"]=t(!0)});class TB{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(o,i,a){r.reason||(r.reason=new Ig(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new TB(function(r){t=r}),cancel:t}}}const MB={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(MB).forEach(([e,t])=>{MB[t]=e});const Vo=function e(t){const n=new x1(t),r=Epe(x1.prototype.request,n);return pt.extend(r,x1.prototype,n,{allOwnKeys:!0}),pt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(o){return e(w1(t,o))},r}(F4);Vo.Axios=x1,Vo.CanceledError=Ig,Vo.CancelToken=TB,Vo.isCancel=qpe,Vo.VERSION=vKe,Vo.toFormData=i_,Vo.AxiosError=tr,Vo.Cancel=Vo.CanceledError,Vo.all=function(e){return Promise.all(e)},Vo.spread=function(e){return function(t){return e.apply(null,t)}},Vo.isAxiosError=function(e){return pt.isObject(e)&&e.isAxiosError===!0},Vo.mergeConfig=w1,Vo.AxiosHeaders=Bl,Vo.formToJSON=e=>Wpe(pt.isHTMLForm(e)?new FormData(e):e),Vo.getAdapter=lhe,Vo.HttpStatusCode=MB,Vo.default=Vo;var Sr,mKe=Error,gKe=EvalError,yKe=RangeError,bKe=ReferenceError,che=SyntaxError,I4=TypeError,AKe=URIError,dhe=typeof Symbol<"u"&&Symbol,wKe=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;for(t in e[t]=42,e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==42||o.enumerable!==!0)return!1}return!0},NB={__proto__:null,foo:{}},xKe=Object,_Ke=Object.prototype.toString,EKe=Math.max,fhe=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},CKe=function(e){var t=this;if(typeof t!="function"||_Ke.apply(t)!=="[object Function]")throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,r=function(s,u){for(var c=[],d=u,f=0;d<s.length;d+=1,f+=1)c[f]=s[d];return c}(arguments,1),o=EKe(0,t.length-r.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(n=Function("binder","return function ("+function(s,u){for(var c="",d=0;d<s.length;d+=1)c+=s[d],d+1<s.length&&(c+=u);return c}(i,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var s=t.apply(this,fhe(r,arguments));return Object(s)===s?s:this}return t.apply(e,fhe(r,arguments))}),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n},FB=Function.prototype.bind||CKe,SKe=Function.prototype.call,kKe=Object.prototype.hasOwnProperty,DKe=FB.call(SKe,kKe),OKe=mKe,TKe=gKe,MKe=yKe,NKe=bKe,Bg=che,Lg=I4,FKe=AKe,phe=Function,RB=function(e){try{return phe('"use strict"; return ('+e+").constructor;")()}catch{}},_1=Object.getOwnPropertyDescriptor;if(_1)try{_1({},"")}catch{_1=null}var IB=function(){throw new Lg},RKe=_1?function(){try{return IB}catch{try{return _1(arguments,"callee").get}catch{return IB}}}():IB,Pg=typeof dhe=="function"&&typeof Symbol=="function"&&typeof dhe("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&wKe(),IKe={__proto__:NB}.foo===NB.foo&&!(NB instanceof xKe),Ji=Object.getPrototypeOf||(IKe?function(e){return e.__proto__}:null),jg={},BKe=typeof Uint8Array<"u"&&Ji?Ji(Uint8Array):Sr,E1={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Sr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Sr:ArrayBuffer,"%ArrayIteratorPrototype%":Pg&&Ji?Ji([][Symbol.iterator]()):Sr,"%AsyncFromSyncIteratorPrototype%":Sr,"%AsyncFunction%":jg,"%AsyncGenerator%":jg,"%AsyncGeneratorFunction%":jg,"%AsyncIteratorPrototype%":jg,"%Atomics%":typeof Atomics>"u"?Sr:Atomics,"%BigInt%":typeof BigInt>"u"?Sr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Sr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Sr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Sr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":OKe,"%eval%":eval,"%EvalError%":TKe,"%Float32Array%":typeof Float32Array>"u"?Sr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Sr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Sr:FinalizationRegistry,"%Function%":phe,"%GeneratorFunction%":jg,"%Int8Array%":typeof Int8Array>"u"?Sr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Sr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Sr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Pg&&Ji?Ji(Ji([][Symbol.iterator]())):Sr,"%JSON%":typeof JSON=="object"?JSON:Sr,"%Map%":typeof Map>"u"?Sr:Map,"%MapIteratorPrototype%":typeof Map<"u"&&Pg&&Ji?Ji(new Map()[Symbol.iterator]()):Sr,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Sr:Promise,"%Proxy%":typeof Proxy>"u"?Sr:Proxy,"%RangeError%":MKe,"%ReferenceError%":NKe,"%Reflect%":typeof Reflect>"u"?Sr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Sr:Set,"%SetIteratorPrototype%":typeof Set<"u"&&Pg&&Ji?Ji(new Set()[Symbol.iterator]()):Sr,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Sr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Pg&&Ji?Ji(""[Symbol.iterator]()):Sr,"%Symbol%":Pg?Symbol:Sr,"%SyntaxError%":Bg,"%ThrowTypeError%":RKe,"%TypedArray%":BKe,"%TypeError%":Lg,"%Uint8Array%":typeof Uint8Array>"u"?Sr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Sr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Sr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Sr:Uint32Array,"%URIError%":FKe,"%WeakMap%":typeof WeakMap>"u"?Sr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Sr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Sr:WeakSet};if(Ji)try{null.error}catch(e){var LKe=Ji(Ji(e));E1["%Error.prototype%"]=LKe}var hhe,vhe,PKe=function e(t){var n;if(t==="%AsyncFunction%")n=RB("async function () {}");else if(t==="%GeneratorFunction%")n=RB("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=RB("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Ji&&(n=Ji(o.prototype))}return E1[t]=n,n},mhe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B4=FB,c_=DKe,jKe=B4.call(Function.call,Array.prototype.concat),VKe=B4.call(Function.apply,Array.prototype.splice),ghe=B4.call(Function.call,String.prototype.replace),d_=B4.call(Function.call,String.prototype.slice),zKe=B4.call(Function.call,RegExp.prototype.exec),HKe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$Ke=/\\(\\)?/g,UKe=function(e,t){var n,r=e;if(c_(mhe,r)&&(r="%"+(n=mhe[r])[0]+"%"),c_(E1,r)){var o=E1[r];if(o===jg&&(o=PKe(r)),o===void 0&&!t)throw new Lg("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new Bg("intrinsic "+e+" does not exist!")},Vg=function(e,t){if(typeof e!="string"||e.length===0)throw new Lg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Lg('"allowMissing" argument must be a boolean');if(zKe(/^%?[^%]*%?$/,e)===null)throw new Bg("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(v){var g=d_(v,0,1),b=d_(v,-1);if(g==="%"&&b!=="%")throw new Bg("invalid intrinsic syntax, expected closing `%`");if(b==="%"&&g!=="%")throw new Bg("invalid intrinsic syntax, expected opening `%`");var y=[];return ghe(v,HKe,function(w,x,_,E){y[y.length]=_?ghe(E,$Ke,"$1"):x||w}),y}(e),r=n.length>0?n[0]:"",o=UKe("%"+r+"%",t),i=o.name,a=o.value,l=!1,s=o.alias;s&&(r=s[0],VKe(n,jKe([0,1],s)));for(var u=1,c=!0;u<n.length;u+=1){var d=n[u],f=d_(d,0,1),p=d_(d,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new Bg("property names with quotes must have matching quotes");if(d!=="constructor"&&c||(l=!0),c_(E1,i="%"+(r+="."+d)+"%"))a=E1[i];else if(a!=null){if(!(d in a)){if(!t)throw new Lg("base intrinsic for "+e+" exists, but the property is not available.");return}if(_1&&u+1>=n.length){var m=_1(a,d);a=(c=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else c=c_(a,d),a=a[d];c&&!l&&(E1[i]=a)}}return a},yhe={exports:{}};function BB(){if(vhe)return hhe;vhe=1;var e=Vg("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return hhe=e}var f_=Vg("%Object.getOwnPropertyDescriptor%",!0);if(f_)try{f_([],"length")}catch{f_=null}var bhe=f_,Ahe=BB(),WKe=che,zg=I4,whe=bhe,LB=BB(),xhe=function(){return!!LB};xhe.hasArrayLengthDefineBug=function(){if(!LB)return null;try{return LB([],"length",{value:1}).length!==1}catch{return!0}};var GKe=Vg,_he=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new zg("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new zg("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new zg("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new zg("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new zg("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new zg("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6&&arguments[6],l=!!whe&&whe(e,t);if(Ahe)Ahe(e,t,{configurable:i===null&&l?l.configurable:!i,enumerable:r===null&&l?l.enumerable:!r,value:n,writable:o===null&&l?l.writable:!o});else{if(!a&&(r||o||i))throw new WKe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}},qKe=xhe(),Ehe=bhe,Che=I4,KKe=GKe("%Math.floor%"),YKe=function(e,t){if(typeof e!="function")throw new Che("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||KKe(t)!==t)throw new Che("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,o=!0;if("length"in e&&Ehe){var i=Ehe(e,"length");i&&!i.configurable&&(r=!1),i&&!i.writable&&(o=!1)}return(r||o||!n)&&(qKe?_he(e,"length",t,!0,!0):_he(e,"length",t)),e};(function(e){var t=FB,n=Vg,r=YKe,o=I4,i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||t.call(a,i),s=BB(),u=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new o("a function is required");var f=l(t,a,arguments);return r(f,1+u(0,d.length-(arguments.length-1)),!0)};var c=function(){return l(t,i,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(yhe);var She=Vg,khe=yhe.exports,XKe=khe(She("String.prototype.indexOf"));const Dhe=B3(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var PB=typeof Map=="function"&&Map.prototype,jB=Object.getOwnPropertyDescriptor&&PB?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,p_=PB&&jB&&typeof jB.get=="function"?jB.get:null,Ohe=PB&&Map.prototype.forEach,VB=typeof Set=="function"&&Set.prototype,zB=Object.getOwnPropertyDescriptor&&VB?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,h_=VB&&zB&&typeof zB.get=="function"?zB.get:null,The=VB&&Set.prototype.forEach,L4=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,P4=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,Mhe=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,QKe=Boolean.prototype.valueOf,JKe=Object.prototype.toString,ZKe=Function.prototype.toString,eYe=String.prototype.match,HB=String.prototype.slice,bp=String.prototype.replace,tYe=String.prototype.toUpperCase,Nhe=String.prototype.toLowerCase,Fhe=RegExp.prototype.test,Rhe=Array.prototype.concat,Vc=Array.prototype.join,nYe=Array.prototype.slice,Ihe=Math.floor,$B=typeof BigInt=="function"?BigInt.prototype.valueOf:null,UB=Object.getOwnPropertySymbols,WB=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Hg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ma=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Hg||!0)?Symbol.toStringTag:null,Bhe=Object.prototype.propertyIsEnumerable,Lhe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Phe(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Fhe.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Ihe(-e):Ihe(e);if(r!==e){var o=String(r),i=HB.call(t,o.length+1);return bp.call(o,n,"$&_")+"."+bp.call(bp.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return bp.call(t,n,"$&_")}var GB=Dhe,jhe=GB.custom,Vhe=$he(jhe)?jhe:null;function zhe(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function rYe(e){return bp.call(String(e),/"/g,""")}function qB(e){return!(wp(e)!=="[object Array]"||Ma&&typeof e=="object"&&Ma in e)}function Hhe(e){return!(wp(e)!=="[object RegExp]"||Ma&&typeof e=="object"&&Ma in e)}function $he(e){if(Hg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!WB)return!1;try{return WB.call(e),!0}catch{}return!1}var oYe=Object.prototype.hasOwnProperty||function(e){return e in this};function Ap(e,t){return oYe.call(e,t)}function wp(e){return JKe.call(e)}function Uhe(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Whe(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Whe(HB.call(e,0,t.maxStringLength),t)+r}return zhe(bp.call(bp.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,iYe),"single",t)}function iYe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+tYe.call(t.toString(16))}function j4(e){return"Object("+e+")"}function KB(e){return e+" { ? }"}function Ghe(e,t,n,r){return e+" ("+t+") {"+(r?YB(n,r):Vc.call(n,", "))+"}"}function YB(e,t){if(e.length===0)return"";var n=` |
|
964 |
`+t.prev+t.base;return n+Vc.call(e,","+n)+` |
|
965 |
`+t.prev}function v_(e,t){var n=qB(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Ap(e,o)?t(e[o],e):""}var i,a=typeof UB=="function"?UB(e):[];if(Hg){i={};for(var l=0;l<a.length;l++)i["$"+a[l]]=a[l]}for(var s in e)Ap(e,s)&&(n&&String(Number(s))===s&&s<e.length||Hg&&i["$"+s]instanceof Symbol||(Fhe.call(/[^\w$]/,s)?r.push(t(s,e)+": "+t(e[s],e)):r.push(s+": "+t(e[s],e))));if(typeof UB=="function")for(var u=0;u<a.length;u++)Bhe.call(e,a[u])&&r.push("["+t(a[u])+"]: "+t(e[a[u]],e));return r}var qhe=Vg,$g=function(e,t){var n=She(e,!!t);return typeof n=="function"&&XKe(e,".prototype.")>-1?khe(n):n},aYe=function e(t,n,r,o){var i=n||{};if(Ap(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ap(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Ap(i,"customInspect")||i.customInspect;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ap(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ap(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Whe(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return l?Phe(t,s):s}if(typeof t=="bigint"){var u=String(t)+"n";return l?Phe(t,u):u}var c=i.depth===void 0?5:i.depth;if(r===void 0&&(r=0),r>=c&&c>0&&typeof t=="object")return qB(t)?"[Array]":"[Object]";var d=function(F,N){var B;if(F.indent===" ")B=" ";else{if(!(typeof F.indent=="number"&&F.indent>0))return null;B=Vc.call(Array(F.indent+1)," ")}return{base:B,prev:Vc.call(Array(N+1),B)}}(i,r);if(o===void 0)o=[];else if(Uhe(o,t)>=0)return"[Circular]";function f(F,N,B){if(N&&(o=nYe.call(o)).push(N),B){var L={depth:i.depth};return Ap(i,"quoteStyle")&&(L.quoteStyle=i.quoteStyle),e(F,L,r+1,o)}return e(F,i,r+1,o)}if(typeof t=="function"&&!Hhe(t)){var p=function(F){if(F.name)return F.name;var N=eYe.call(ZKe.call(F),/^function\s*([\w$]+)/);return N?N[1]:null}(t),m=v_(t,f);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(m.length>0?" { "+Vc.call(m,", ")+" }":"")}if($he(t)){var v=Hg?bp.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):WB.call(t);return typeof t!="object"||Hg?v:j4(v)}if(function(F){return!F||typeof F!="object"?!1:typeof HTMLElement<"u"&&F instanceof HTMLElement?!0:typeof F.nodeName=="string"&&typeof F.getAttribute=="function"}(t)){for(var g="<"+Nhe.call(String(t.nodeName)),b=t.attributes||[],y=0;y<b.length;y++)g+=" "+b[y].name+"="+zhe(rYe(b[y].value),"double",i);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Nhe.call(String(t.nodeName))+">"}if(qB(t)){if(t.length===0)return"[]";var w=v_(t,f);return d&&!function(F){for(var N=0;N<F.length;N++)if(Uhe(F[N],` |
|
966 |
`)>=0)return!1;return!0}(w)?"["+YB(w,d)+"]":"[ "+Vc.call(w,", ")+" ]"}if(function(F){return!(wp(F)!=="[object Error]"||Ma&&typeof F=="object"&&Ma in F)}(t)){var x=v_(t,f);return"cause"in Error.prototype||!("cause"in t)||Bhe.call(t,"cause")?x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Vc.call(x,", ")+" }":"{ ["+String(t)+"] "+Vc.call(Rhe.call("[cause]: "+f(t.cause),x),", ")+" }"}if(typeof t=="object"&&a){if(Vhe&&typeof t[Vhe]=="function"&&GB)return GB(t,{depth:c-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(function(F){if(!p_||!F||typeof F!="object")return!1;try{p_.call(F);try{h_.call(F)}catch{return!0}return F instanceof Map}catch{}return!1}(t)){var _=[];return Ohe&&Ohe.call(t,function(F,N){_.push(f(N,t,!0)+" => "+f(F,t))}),Ghe("Map",p_.call(t),_,d)}if(function(F){if(!h_||!F||typeof F!="object")return!1;try{h_.call(F);try{p_.call(F)}catch{return!0}return F instanceof Set}catch{}return!1}(t)){var E=[];return The&&The.call(t,function(F){E.push(f(F,t))}),Ghe("Set",h_.call(t),E,d)}if(function(F){if(!L4||!F||typeof F!="object")return!1;try{L4.call(F,L4);try{P4.call(F,P4)}catch{return!0}return F instanceof WeakMap}catch{}return!1}(t))return KB("WeakMap");if(function(F){if(!P4||!F||typeof F!="object")return!1;try{P4.call(F,P4);try{L4.call(F,L4)}catch{return!0}return F instanceof WeakSet}catch{}return!1}(t))return KB("WeakSet");if(function(F){if(!Mhe||!F||typeof F!="object")return!1;try{return Mhe.call(F),!0}catch{}return!1}(t))return KB("WeakRef");if(function(F){return!(wp(F)!=="[object Number]"||Ma&&typeof F=="object"&&Ma in F)}(t))return j4(f(Number(t)));if(function(F){if(!F||typeof F!="object"||!$B)return!1;try{return $B.call(F),!0}catch{}return!1}(t))return j4(f($B.call(t)));if(function(F){return!(wp(F)!=="[object Boolean]"||Ma&&typeof F=="object"&&Ma in F)}(t))return j4(QKe.call(t));if(function(F){return!(wp(F)!=="[object String]"||Ma&&typeof F=="object"&&Ma in F)}(t))return j4(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||_m!==void 0&&t===_m)return"{ [object globalThis] }";if(!function(F){return!(wp(F)!=="[object Date]"||Ma&&typeof F=="object"&&Ma in F)}(t)&&!Hhe(t)){var C=v_(t,f),T=Lhe?Lhe(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",I=!T&&Ma&&Object(t)===t&&Ma in t?HB.call(wp(t),8,-1):k?"Object":"",O=(T||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"")+(I||k?"["+Vc.call(Rhe.call([],I||[],k||[]),": ")+"] ":"");return C.length===0?O+"{}":d?O+"{"+YB(C,d)+"}":O+"{ "+Vc.call(C,", ")+" }"}return String(t)},lYe=I4,m_=qhe("%WeakMap%",!0),g_=qhe("%Map%",!0),sYe=$g("WeakMap.prototype.get",!0),uYe=$g("WeakMap.prototype.set",!0),cYe=$g("WeakMap.prototype.has",!0),dYe=$g("Map.prototype.get",!0),fYe=$g("Map.prototype.set",!0),pYe=$g("Map.prototype.has",!0),XB=function(e,t){for(var n,r=e;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},hYe=String.prototype.replace,vYe=/%20/g,Khe="RFC3986",QB={default:Khe,formatters:{RFC1738:function(e){return hYe.call(e,vYe,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Khe},mYe=QB,JB=Object.prototype.hasOwnProperty,C1=Array.isArray,zc=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Yhe=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},ZB=1024,Xhe={arrayToObject:Yhe,assign:function(e,t){return Object.keys(t).reduce(function(n,r){return n[r]=t[r],n},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),l=0;l<a.length;++l){var s=a[l],u=i[s];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(t.push({obj:i,prop:s}),n.push(u))}return function(c){for(;c.length>1;){var d=c.pop(),f=d.obj[d.prop];if(C1(f)){for(var p=[],m=0;m<f.length;++m)f[m]!==void 0&&p.push(f[m]);d.obj[d.prop]=p}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},encode:function(e,t,n,r,o){if(e.length===0)return e;var i=e;if(typeof e=="symbol"?i=Symbol.prototype.toString.call(e):typeof e!="string"&&(i=String(e)),n==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=ZB){for(var s=i.length>=ZB?i.slice(l,l+ZB):i,u=[],c=0;c<s.length;++c){var d=s.charCodeAt(c);d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===mYe.RFC1738&&(d===40||d===41)?u[u.length]=s.charAt(c):d<128?u[u.length]=zc[d]:d<2048?u[u.length]=zc[192|d>>6]+zc[128|63&d]:d<55296||d>=57344?u[u.length]=zc[224|d>>12]+zc[128|d>>6&63]+zc[128|63&d]:(c+=1,d=65536+((1023&d)<<10|1023&s.charCodeAt(c)),u[u.length]=zc[240|d>>18]+zc[128|d>>12&63]+zc[128|d>>6&63]+zc[128|63&d])}a+=u.join("")}return a},isBuffer:function(e){return!(!e||typeof e!="object")&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},maybeMap:function(e,t){if(C1(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(C1(t))t.push(n);else{if(!t||typeof t!="object")return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!JB.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return C1(t)&&!C1(n)&&(o=Yhe(t,r)),C1(t)&&C1(n)?(n.forEach(function(i,a){if(JB.call(t,a)){var l=t[a];l&&typeof l=="object"&&i&&typeof i=="object"?t[a]=e(l,i,r):t.push(i)}else t[a]=i}),t):Object.keys(n).reduce(function(i,a){var l=n[a];return JB.call(i,a)?i[a]=e(i[a],l,r):i[a]=l,i},o)}},Qhe=function(){var e,t,n,r={assert:function(o){if(!r.has(o))throw new lYe("Side channel does not contain "+aYe(o))},get:function(o){if(m_&&o&&(typeof o=="object"||typeof o=="function")){if(e)return sYe(e,o)}else if(g_){if(t)return dYe(t,o)}else if(n)return function(i,a){var l=XB(i,a);return l&&l.value}(n,o)},has:function(o){if(m_&&o&&(typeof o=="object"||typeof o=="function")){if(e)return cYe(e,o)}else if(g_){if(t)return pYe(t,o)}else if(n)return function(i,a){return!!XB(i,a)}(n,o);return!1},set:function(o,i){m_&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new m_),uYe(e,o,i)):g_?(t||(t=new g_),fYe(t,o,i)):(n||(n={key:{},next:null}),function(a,l,s){var u=XB(a,l);u?u.value=s:a.next={key:l,next:a.next,value:s}}(n,o,i))}};return r},y_=Xhe,V4=QB,gYe=Object.prototype.hasOwnProperty,Jhe={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Hc=Array.isArray,yYe=Array.prototype.push,Zhe=function(e,t){yYe.apply(e,Hc(t)?t:[t])},bYe=Date.prototype.toISOString,e0e=V4.default,Fi={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:y_.encode,encodeValuesOnly:!1,format:e0e,formatter:V4.formatters[e0e],indices:!1,serializeDate:function(e){return bYe.call(e)},skipNulls:!1,strictNullHandling:!1},eL={},AYe=function e(t,n,r,o,i,a,l,s,u,c,d,f,p,m,v,g,b,y){for(var w=t,x=y,_=0,E=!1;(x=x.get(eL))!==void 0&&!E;){var C=x.get(t);if(_+=1,C!==void 0){if(C===_)throw new RangeError("Cyclic object value");E=!0}x.get(eL)===void 0&&(_=0)}if(typeof c=="function"?w=c(n,w):w instanceof Date?w=p(w):r==="comma"&&Hc(w)&&(w=y_.maybeMap(w,function(U){return U instanceof Date?p(U):U})),w===null){if(a)return u&&!g?u(n,Fi.encoder,b,"key",m):n;w=""}if(function(U){return typeof U=="string"||typeof U=="number"||typeof U=="boolean"||typeof U=="symbol"||typeof U=="bigint"}(w)||y_.isBuffer(w))return u?[v(g?n:u(n,Fi.encoder,b,"key",m))+"="+v(u(w,Fi.encoder,b,"value",m))]:[v(n)+"="+v(String(w))];var T,k=[];if(w===void 0)return k;if(r==="comma"&&Hc(w))g&&u&&(w=y_.maybeMap(w,u)),T=[{value:w.length>0?w.join(",")||null:void 0}];else if(Hc(c))T=c;else{var I=Object.keys(w);T=d?I.sort(d):I}var O=s?n.replace(/\./g,"%2E"):n,F=o&&Hc(w)&&w.length===1?O+"[]":O;if(i&&Hc(w)&&w.length===0)return F+"[]";for(var N=0;N<T.length;++N){var B=T[N],L=typeof B=="object"&&B.value!==void 0?B.value:w[B];if(!l||L!==null){var V=f&&s?B.replace(/\./g,"%2E"):B,P=Hc(w)?typeof r=="function"?r(F,V):F:F+(f?"."+V:"["+V+"]");y.set(t,_);var H=Qhe();H.set(eL,y),Zhe(k,e(L,P,r,o,i,a,l,s,r==="comma"&&g&&Hc(w)?null:u,c,d,f,p,m,v,g,b,H))}}return k},Ug=Xhe,tL=Object.prototype.hasOwnProperty,wYe=Array.isArray,zo={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ug.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},xYe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},t0e=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},_Ye=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),l=a?o.slice(0,a.index):o,s=[];if(l){if(!n.plainObjects&&tL.call(Object.prototype,l)&&!n.allowPrototypes)return;s.push(l)}for(var u=0;n.depth>0&&(a=i.exec(o))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&tL.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(a[1])}if(a){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");s.push("["+o.slice(a.index)+"]")}return function(c,d,f,p){for(var m=p?d:t0e(d,f),v=c.length-1;v>=0;--v){var g,b=c[v];if(b==="[]"&&f.parseArrays)g=f.allowEmptyArrays&&(m===""||f.strictNullHandling&&m===null)?[]:[].concat(m);else{g=f.plainObjects?Object.create(null):{};var y=b.charAt(0)==="["&&b.charAt(b.length-1)==="]"?b.slice(1,-1):b,w=f.decodeDotInKeys?y.replace(/%2E/g,"."):y,x=parseInt(w,10);f.parseArrays||w!==""?!isNaN(x)&&b!==w&&String(x)===w&&x>=0&&f.parseArrays&&x<=f.arrayLimit?(g=[])[x]=m:w!=="__proto__"&&(g[w]=m):g={0:m}}m=g}return m}(s,t,n,r)}},EYe=function(e,t){var n,r=e,o=function(p){if(!p)return Fi;if(p.allowEmptyArrays!==void 0&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(p.encodeDotInKeys!==void 0&&typeof p.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(p.encoder!==null&&p.encoder!==void 0&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var m=p.charset||Fi.charset;if(p.charset!==void 0&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=V4.default;if(p.format!==void 0){if(!gYe.call(V4.formatters,p.format))throw new TypeError("Unknown format option provided.");v=p.format}var g,b=V4.formatters[v],y=Fi.filter;if((typeof p.filter=="function"||Hc(p.filter))&&(y=p.filter),g=p.arrayFormat in Jhe?p.arrayFormat:"indices"in p?p.indices?"indices":"repeat":Fi.arrayFormat,"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var w=p.allowDots===void 0?p.encodeDotInKeys===!0||Fi.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:Fi.addQueryPrefix,allowDots:w,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:Fi.allowEmptyArrays,arrayFormat:g,charset:m,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:Fi.charsetSentinel,commaRoundTrip:p.commaRoundTrip,delimiter:p.delimiter===void 0?Fi.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:Fi.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:Fi.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:Fi.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:Fi.encodeValuesOnly,filter:y,format:v,formatter:b,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:Fi.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:Fi.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:Fi.strictNullHandling}}(t);typeof o.filter=="function"?r=(0,o.filter)("",r):Hc(o.filter)&&(n=o.filter);var i=[];if(typeof r!="object"||r===null)return"";var a=Jhe[o.arrayFormat],l=a==="comma"&&o.commaRoundTrip;n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var s=Qhe(),u=0;u<n.length;++u){var c=n[u];o.skipNulls&&r[c]===null||Zhe(i,AYe(r[c],c,a,l,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,s))}var d=i.join(o.delimiter),f=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),d.length>0?f+d:""},CYe=function(e,t){var n=function(u){if(!u)return zo;if(u.allowEmptyArrays!==void 0&&typeof u.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(u.decodeDotInKeys!==void 0&&typeof u.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(u.decoder!==null&&u.decoder!==void 0&&typeof u.decoder!="function")throw new TypeError("Decoder has to be a function.");if(u.charset!==void 0&&u.charset!=="utf-8"&&u.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var c=u.charset===void 0?zo.charset:u.charset,d=u.duplicates===void 0?zo.duplicates:u.duplicates;if(d!=="combine"&&d!=="first"&&d!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:u.allowDots===void 0?u.decodeDotInKeys===!0||zo.allowDots:!!u.allowDots,allowEmptyArrays:typeof u.allowEmptyArrays=="boolean"?!!u.allowEmptyArrays:zo.allowEmptyArrays,allowPrototypes:typeof u.allowPrototypes=="boolean"?u.allowPrototypes:zo.allowPrototypes,allowSparse:typeof u.allowSparse=="boolean"?u.allowSparse:zo.allowSparse,arrayLimit:typeof u.arrayLimit=="number"?u.arrayLimit:zo.arrayLimit,charset:c,charsetSentinel:typeof u.charsetSentinel=="boolean"?u.charsetSentinel:zo.charsetSentinel,comma:typeof u.comma=="boolean"?u.comma:zo.comma,decodeDotInKeys:typeof u.decodeDotInKeys=="boolean"?u.decodeDotInKeys:zo.decodeDotInKeys,decoder:typeof u.decoder=="function"?u.decoder:zo.decoder,delimiter:typeof u.delimiter=="string"||Ug.isRegExp(u.delimiter)?u.delimiter:zo.delimiter,depth:typeof u.depth=="number"||u.depth===!1?+u.depth:zo.depth,duplicates:d,ignoreQueryPrefix:u.ignoreQueryPrefix===!0,interpretNumericEntities:typeof u.interpretNumericEntities=="boolean"?u.interpretNumericEntities:zo.interpretNumericEntities,parameterLimit:typeof u.parameterLimit=="number"?u.parameterLimit:zo.parameterLimit,parseArrays:u.parseArrays!==!1,plainObjects:typeof u.plainObjects=="boolean"?u.plainObjects:zo.plainObjects,strictDepth:typeof u.strictDepth=="boolean"?!!u.strictDepth:zo.strictDepth,strictNullHandling:typeof u.strictNullHandling=="boolean"?u.strictNullHandling:zo.strictNullHandling}}(t);if(e===""||e==null)return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?function(u,c){var d={__proto__:null},f=c.ignoreQueryPrefix?u.replace(/^\?/,""):u;f=f.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var p,m=c.parameterLimit===1/0?void 0:c.parameterLimit,v=f.split(c.delimiter,m),g=-1,b=c.charset;if(c.charsetSentinel)for(p=0;p<v.length;++p)v[p].indexOf("utf8=")===0&&(v[p]==="utf8=%E2%9C%93"?b="utf-8":v[p]==="utf8=%26%2310003%3B"&&(b="iso-8859-1"),g=p,p=v.length);for(p=0;p<v.length;++p)if(p!==g){var y,w,x=v[p],_=x.indexOf("]="),E=_===-1?x.indexOf("="):_+1;E===-1?(y=c.decoder(x,zo.decoder,b,"key"),w=c.strictNullHandling?null:""):(y=c.decoder(x.slice(0,E),zo.decoder,b,"key"),w=Ug.maybeMap(t0e(x.slice(E+1),c),function(T){return c.decoder(T,zo.decoder,b,"value")})),w&&c.interpretNumericEntities&&b==="iso-8859-1"&&(w=xYe(w)),x.indexOf("[]=")>-1&&(w=wYe(w)?[w]:w);var C=tL.call(d,y);C&&c.duplicates==="combine"?d[y]=Ug.combine(d[y],w):C&&c.duplicates!=="last"||(d[y]=w)}return d}(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var l=i[a],s=_Ye(l,r[l],n,typeof e=="string");o=Ug.merge(o,s,n)}return n.allowSparse===!0?o:Ug.compact(o)};let nL;Tw=_l({formats:QB,parse:CYe,stringify:EYe}),nL={base_url:"http://localhost:48080/admin-api",result_code:200,request_timeout:3e4,default_headers:"application/json"};var SYe="0123456789abcdefghijklmnopqrstuvwxyz";function Yd(e){return SYe.charAt(e)}function kYe(e,t){return e&t}function b_(e,t){return e|t}function n0e(e,t){return e^t}function r0e(e,t){return e&~t}function DYe(e){if(e==0)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function OYe(e){for(var t=0;e!=0;)e&=e-1,++t;return t}var Wg,Gg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function A_(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=Gg.charAt(n>>6)+Gg.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=Gg.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=Gg.charAt(n>>2)+Gg.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function o0e(e){var t,n="",r=0,o=0;for(t=0;t<e.length&&e.charAt(t)!="=";++t){var i=Gg.indexOf(e.charAt(t));i<0||(r==0?(n+=Yd(i>>2),o=3&i,r=1):r==1?(n+=Yd(o<<2|i>>4),o=15&i,r=2):r==2?(n+=Yd(o),n+=Yd(i>>2),o=3&i,r=3):(n+=Yd(o<<2|i>>4),n+=Yd(15&i),r=0))}return r==1&&(n+=Yd(o<<2)),n}var S1,TYe=function(e){var t;if(Wg===void 0){var n="0123456789ABCDEF",r=` \f |
|
967 |
\r \xA0\u2028\u2029`;for(Wg={},t=0;t<16;++t)Wg[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)Wg[n.charAt(t)]=t;for(t=0;t<8;++t)Wg[r.charAt(t)]=-1}var o=[],i=0,a=0;for(t=0;t<e.length;++t){var l=e.charAt(t);if(l=="=")break;if((l=Wg[l])!=-1){if(l===void 0)throw new Error("Illegal character at offset "+t);i|=l,++a>=2?(o[o.length]=i,i=0,a=0):i<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return o},rL={decode:function(e){var t;if(S1===void 0){var n=`= \f |
|
968 |
\r \xA0\u2028\u2029`;for(S1=Object.create(null),t=0;t<64;++t)S1["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(S1["-"]=62,S1._=63,t=0;t<9;++t)S1[n.charAt(t)]=-1}var r=[],o=0,i=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if(a=="=")break;if((a=S1[a])!=-1){if(a===void 0)throw new Error("Illegal character at offset "+t);o|=a,++i>=4?(r[r.length]=o>>16,r[r.length]=o>>8&255,r[r.length]=255&o,o=0,i=0):o<<=6}}switch(i){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=o>>10;break;case 3:r[r.length]=o>>16,r[r.length]=o>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=rL.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return rL.decode(e)}},qg=1e13,z4=function(){function e(t){this.buf=[+t||0]}return e.prototype.mulAdd=function(t,n){var r,o,i=this.buf,a=i.length;for(r=0;r<a;++r)(o=i[r]*t+n)<qg?n=0:o-=(n=0|o/qg)*qg,i[r]=o;n>0&&(i[r]=n)},e.prototype.sub=function(t){var n,r,o=this.buf,i=o.length;for(n=0;n<i;++n)(r=o[n]-t)<0?(r+=qg,t=1):t=0,o[n]=r;for(;o[o.length-1]===0;)o.pop()},e.prototype.toString=function(t){if((t||10)!=10)throw new Error("only base 10 is supported");for(var n=this.buf,r=n[n.length-1].toString(),o=n.length-2;o>=0;--o)r+=(qg+n[o]).toString().substring(1);return r},e.prototype.valueOf=function(){for(var t=this.buf,n=0,r=t.length-1;r>=0;--r)n=n*qg+t[r];return n},e.prototype.simplify=function(){var t=this.buf;return t.length==1?t[0]:this},e}(),MYe=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,NYe=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function Kg(e,t){return e.length>t&&(e=e.substring(0,t)+"\u2026"),e}var xp,oL=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(t){if(t===void 0&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(t):this.enc[t]},e.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},e.prototype.hexDump=function(t,n,r){for(var o="",i=t;i<n;++i)if(o+=this.hexByte(this.get(i)),r!==!0)switch(15&i){case 7:o+=" ";break;case 15:o+=` |
|
969 |
`;break;default:o+=" "}return o},e.prototype.isASCII=function(t,n){for(var r=t;r<n;++r){var o=this.get(r);if(o<32||o>176)return!1}return!0},e.prototype.parseStringISO=function(t,n){for(var r="",o=t;o<n;++o)r+=String.fromCharCode(this.get(o));return r},e.prototype.parseStringUTF=function(t,n){for(var r="",o=t;o<n;){var i=this.get(o++);r+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(o++)):String.fromCharCode((15&i)<<12|(63&this.get(o++))<<6|63&this.get(o++))}return r},e.prototype.parseStringBMP=function(t,n){for(var r,o,i="",a=t;a<n;)r=this.get(a++),o=this.get(a++),i+=String.fromCharCode(r<<8|o);return i},e.prototype.parseTime=function(t,n,r){var o=this.parseStringISO(t,n),i=(r?MYe:NYe).exec(o);return i?(r&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),o=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(o+=":"+i[5],i[6]&&(o+=":"+i[6],i[7]&&(o+="."+i[7]))),i[8]&&(o+=" UTC",i[8]!="Z"&&(o+=i[8],i[9]&&(o+=":"+i[9]))),o):"Unrecognized time: "+o},e.prototype.parseInteger=function(t,n){for(var r,o=this.get(t),i=o>127,a=i?255:0,l="";o==a&&++t<n;)o=this.get(t);if((r=n-t)===0)return i?-1:0;if(r>4){for(l=o,r<<=3;!(128&(+l^a));)l=+l<<1,--r;l="("+r+` bit) |
|
970 |
`}i&&(o-=256);for(var s=new z4(o),u=t+1;u<n;++u)s.mulAdd(256,this.get(u));return l+s.toString()},e.prototype.parseBitString=function(t,n,r){for(var o=this.get(t),i="("+((n-t-1<<3)-o)+` bit) |
|
971 |
`,a="",l=t+1;l<n;++l){for(var s=this.get(l),u=l==n-1?o:0,c=7;c>=u;--c)a+=s>>c&1?"1":"0";if(a.length>r)return i+Kg(a,r)}return i+a},e.prototype.parseOctetString=function(t,n,r){if(this.isASCII(t,n))return Kg(this.parseStringISO(t,n),r);var o=n-t,i="("+o+` byte) |
|
972 |
`;o>(r/=2)&&(n=t+r);for(var a=t;a<n;++a)i+=this.hexByte(this.get(a));return o>r&&(i+="\u2026"),i},e.prototype.parseOID=function(t,n,r){for(var o="",i=new z4,a=0,l=t;l<n;++l){var s=this.get(l);if(i.mulAdd(128,127&s),a+=7,!(128&s)){if(o==="")if((i=i.simplify())instanceof z4)i.sub(80),o="2."+i.toString();else{var u=i<80?i<40?0:1:2;o=u+"."+(i-40*u)}else o+="."+i.toString();if(o.length>r)return Kg(o,r);i=new z4,a=0}}return a>0&&(o+=".incomplete"),o},e}(),FYe=function(){function e(t,n,r,o,i){if(!(o instanceof i0e))throw new Error("Invalid tag value.");this.stream=t,this.header=n,this.length=r,this.tag=o,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(t){if(this.tag===void 0)return null;t===void 0&&(t=1/0);var n=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(n,n+r,t);switch(this.tag.tagNumber){case 1:return this.stream.get(n)===0?"false":"true";case 2:return this.stream.parseInteger(n,n+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(n,n+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(n,n+r,t);case 6:return this.stream.parseOID(n,n+r,t);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return Kg(this.stream.parseStringUTF(n,n+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return Kg(this.stream.parseStringISO(n,n+r),t);case 30:return Kg(this.stream.parseStringBMP(n,n+r),t);case 23:case 24:return this.stream.parseTime(n,n+r,this.tag.tagNumber==23)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(t){t===void 0&&(t="");var n=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(n+="+"),n+=this.length,this.tag.tagConstructed?n+=" (constructed)":!this.tag.isUniversal()||this.tag.tagNumber!=3&&this.tag.tagNumber!=4||this.sub===null||(n+=" (encapsulates)"),n+=` |
|
973 |
`,this.sub!==null){t+=" ";for(var r=0,o=this.sub.length;r<o;++r)n+=this.sub[r].toPrettyString(t)}return n},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(t){var n=t.get(),r=127&n;if(r==n)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(r===0)return null;n=0;for(var o=0;o<r;++o)n=256*n+t.get();return n},e.prototype.getHexStringValue=function(){var t=this.toHexString(),n=2*this.header,r=2*this.length;return t.substr(n,r)},e.decode=function(t){var n;n=t instanceof oL?t:new oL(t,0);var r=new oL(n),o=new i0e(n),i=e.decodeLength(n),a=n.pos,l=a-r.pos,s=null,u=function(){var d=[];if(i!==null){for(var f=a+i;n.pos<f;)d[d.length]=e.decode(n);if(n.pos!=f)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var p=e.decode(n);if(p.tag.isEOC())break;d[d.length]=p}i=a-n.pos}catch(m){throw new Error("Exception while decoding undefined length content: "+m)}return d};if(o.tagConstructed)s=u();else if(o.isUniversal()&&(o.tagNumber==3||o.tagNumber==4))try{if(o.tagNumber==3&&n.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=u();for(var c=0;c<s.length;++c)if(s[c].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{s=null}if(s===null){if(i===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(i)}return new e(r,l,i,o,s)},e}(),i0e=function(){function e(t){var n=t.get();if(this.tagClass=n>>6,this.tagConstructed=!!(32&n),this.tagNumber=31&n,this.tagNumber==31){var r=new z4;do n=t.get(),r.mulAdd(128,127&n);while(128&n);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return this.tagClass===0},e.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},e}(),al=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],RYe=(1<<26)/al[al.length-1],ar=function(){function e(t,n,r){t!=null&&(typeof t=="number"?this.fromNumber(t,n,r):n==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,n))}return e.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var n;if(t==16)n=4;else if(t==8)n=3;else if(t==2)n=1;else if(t==32)n=5;else{if(t!=4)return this.toRadix(t);n=2}var r,o=(1<<n)-1,i=!1,a="",l=this.t,s=this.DB-l*this.DB%n;if(l-- >0)for(s<this.DB&&(r=this[l]>>s)>0&&(i=!0,a=Yd(r));l>=0;)s<n?(r=(this[l]&(1<<s)-1)<<n-s,r|=this[--l]>>(s+=this.DB-n)):(r=this[l]>>(s-=n)&o,s<=0&&(s+=this.DB,--l)),r>0&&(i=!0),i&&(a+=Yd(r));return i?a:"0"},e.prototype.negate=function(){var t=yr();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(t){var n=this.s-t.s;if(n!=0)return n;var r=this.t;if((n=r-t.t)!=0)return this.s<0?-n:n;for(;--r>=0;)if((n=this[r]-t[r])!=0)return n;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+x_(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=yr();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(t,n){var r;return r=t<256||n.isEven()?new a0e(n):new l0e(n),this.exp(t,r)},e.prototype.clone=function(){var t=yr();return this.copyTo(t),t},e.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var t=this.t,n=[];n[0]=this.s;var r,o=this.DB-t*this.DB%8,i=0;if(t-- >0)for(o<this.DB&&(r=this[t]>>o)!=(this.s&this.DM)>>o&&(n[i++]=r|this.s<<this.DB-o);t>=0;)o<8?(r=(this[t]&(1<<o)-1)<<8-o,r|=this[--t]>>(o+=this.DB-8)):(r=this[t]>>(o-=8)&255,o<=0&&(o+=this.DB,--t)),128&r&&(r|=-256),i==0&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(n[i++]=r);return n},e.prototype.equals=function(t){return this.compareTo(t)==0},e.prototype.min=function(t){return this.compareTo(t)<0?this:t},e.prototype.max=function(t){return this.compareTo(t)>0?this:t},e.prototype.and=function(t){var n=yr();return this.bitwiseTo(t,kYe,n),n},e.prototype.or=function(t){var n=yr();return this.bitwiseTo(t,b_,n),n},e.prototype.xor=function(t){var n=yr();return this.bitwiseTo(t,n0e,n),n},e.prototype.andNot=function(t){var n=yr();return this.bitwiseTo(t,r0e,n),n},e.prototype.not=function(){for(var t=yr(),n=0;n<this.t;++n)t[n]=this.DM&~this[n];return t.t=this.t,t.s=~this.s,t},e.prototype.shiftLeft=function(t){var n=yr();return t<0?this.rShiftTo(-t,n):this.lShiftTo(t,n),n},e.prototype.shiftRight=function(t){var n=yr();return t<0?this.lShiftTo(-t,n):this.rShiftTo(t,n),n},e.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(this[t]!=0)return t*this.DB+DYe(this[t]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var t=0,n=this.s&this.DM,r=0;r<this.t;++r)t+=OYe(this[r]^n);return t},e.prototype.testBit=function(t){var n=Math.floor(t/this.DB);return n>=this.t?this.s!=0:!!(this[n]&1<<t%this.DB)},e.prototype.setBit=function(t){return this.changeBit(t,b_)},e.prototype.clearBit=function(t){return this.changeBit(t,r0e)},e.prototype.flipBit=function(t){return this.changeBit(t,n0e)},e.prototype.add=function(t){var n=yr();return this.addTo(t,n),n},e.prototype.subtract=function(t){var n=yr();return this.subTo(t,n),n},e.prototype.multiply=function(t){var n=yr();return this.multiplyTo(t,n),n},e.prototype.divide=function(t){var n=yr();return this.divRemTo(t,n,null),n},e.prototype.remainder=function(t){var n=yr();return this.divRemTo(t,null,n),n},e.prototype.divideAndRemainder=function(t){var n=yr(),r=yr();return this.divRemTo(t,n,r),[n,r]},e.prototype.modPow=function(t,n){var r,o,i=t.bitLength(),a=_p(1);if(i<=0)return a;r=i<18?1:i<48?3:i<144?4:i<768?5:6,o=i<8?new a0e(n):n.isEven()?new BYe(n):new l0e(n);var l=[],s=3,u=r-1,c=(1<<r)-1;if(l[1]=o.convert(this),r>1){var d=yr();for(o.sqrTo(l[1],d);s<=c;)l[s]=yr(),o.mulTo(d,l[s-2],l[s]),s+=2}var f,p,m=t.t-1,v=!0,g=yr();for(i=x_(t[m])-1;m>=0;){for(i>=u?f=t[m]>>i-u&c:(f=(t[m]&(1<<i+1)-1)<<u-i,m>0&&(f|=t[m-1]>>this.DB+i-u)),s=r;!(1&f);)f>>=1,--s;if((i-=s)<0&&(i+=this.DB,--m),v)l[f].copyTo(a),v=!1;else{for(;s>1;)o.sqrTo(a,g),o.sqrTo(g,a),s-=2;s>0?o.sqrTo(a,g):(p=a,a=g,g=p),o.mulTo(g,l[f],a)}for(;m>=0&&!(t[m]&1<<i);)o.sqrTo(a,g),p=a,a=g,g=p,--i<0&&(i=this.DB-1,--m)}return o.revert(a)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||t.signum()==0)return e.ZERO;for(var r=t.clone(),o=this.clone(),i=_p(1),a=_p(0),l=_p(0),s=_p(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),n?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(t,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;o.isEven();)o.rShiftTo(1,o),n?(l.isEven()&&s.isEven()||(l.addTo(this,l),s.subTo(t,s)),l.rShiftTo(1,l)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);r.compareTo(o)>=0?(r.subTo(o,r),n&&i.subTo(l,i),a.subTo(s,a)):(o.subTo(r,o),n&&l.subTo(i,l),s.subTo(a,s))}return o.compareTo(e.ONE)!=0?e.ZERO:s.compareTo(t)>=0?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},e.prototype.pow=function(t){return this.exp(t,new IYe)},e.prototype.gcd=function(t){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(n.compareTo(r)<0){var o=n;n=r,r=o}var i=n.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return n;for(i<a&&(a=i),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));n.signum()>0;)(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},e.prototype.isProbablePrime=function(t){var n,r=this.abs();if(r.t==1&&r[0]<=al[al.length-1]){for(n=0;n<al.length;++n)if(r[0]==al[n])return!0;return!1}if(r.isEven())return!1;for(n=1;n<al.length;){for(var o=al[n],i=n+1;i<al.length&&o<RYe;)o*=al[i++];for(o=r.modInt(o);n<i;)if(o%al[n++]==0)return!1}return r.millerRabin(t)},e.prototype.copyTo=function(t){for(var n=this.t-1;n>=0;--n)t[n]=this[n];t.t=this.t,t.s=this.s},e.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(n==16)r=4;else if(n==8)r=3;else if(n==256)r=8;else if(n==2)r=1;else if(n==32)r=5;else{if(n!=4)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var o=t.length,i=!1,a=0;--o>=0;){var l=r==8?255&+t[o]:u0e(t,o);l<0?t.charAt(o)=="-"&&(i=!0):(i=!1,a==0?this[this.t++]=l:a+r>this.DB?(this[this.t-1]|=(l&(1<<this.DB-a)-1)<<a,this[this.t++]=l>>this.DB-a):this[this.t-1]|=l<<a,(a+=r)>=this.DB&&(a-=this.DB))}r==8&&128&+t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},e.prototype.dlShiftTo=function(t,n){var r;for(r=this.t-1;r>=0;--r)n[r+t]=this[r];for(r=t-1;r>=0;--r)n[r]=0;n.t=this.t+t,n.s=this.s},e.prototype.drShiftTo=function(t,n){for(var r=t;r<this.t;++r)n[r-t]=this[r];n.t=Math.max(this.t-t,0),n.s=this.s},e.prototype.lShiftTo=function(t,n){for(var r=t%this.DB,o=this.DB-r,i=(1<<o)-1,a=Math.floor(t/this.DB),l=this.s<<r&this.DM,s=this.t-1;s>=0;--s)n[s+a+1]=this[s]>>o|l,l=(this[s]&i)<<r;for(s=a-1;s>=0;--s)n[s]=0;n[a]=l,n.t=this.t+a+1,n.s=this.s,n.clamp()},e.prototype.rShiftTo=function(t,n){n.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)n.t=0;else{var o=t%this.DB,i=this.DB-o,a=(1<<o)-1;n[0]=this[r]>>o;for(var l=r+1;l<this.t;++l)n[l-r-1]|=(this[l]&a)<<i,n[l-r]=this[l]>>o;o>0&&(n[this.t-r-1]|=(this.s&a)<<i),n.t=this.t-r,n.clamp()}},e.prototype.subTo=function(t,n){for(var r=0,o=0,i=Math.min(t.t,this.t);r<i;)o+=this[r]-t[r],n[r++]=o&this.DM,o>>=this.DB;if(t.t<this.t){for(o-=t.s;r<this.t;)o+=this[r],n[r++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;r<t.t;)o-=t[r],n[r++]=o&this.DM,o>>=this.DB;o-=t.s}n.s=o<0?-1:0,o<-1?n[r++]=this.DV+o:o>0&&(n[r++]=o),n.t=r,n.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),o=t.abs(),i=r.t;for(n.t=i+o.t;--i>=0;)n[i]=0;for(i=0;i<o.t;++i)n[i+r.t]=r.am(0,o[i],n,i,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(t){for(var n=this.abs(),r=t.t=2*n.t;--r>=0;)t[r]=0;for(r=0;r<n.t-1;++r){var o=n.am(r,n[r],t,2*r,0,1);(t[r+n.t]+=n.am(r+1,2*n[r],t,2*r+1,o,n.t-r-1))>=n.DV&&(t[r+n.t]-=n.DV,t[r+n.t+1]=1)}t.t>0&&(t[t.t-1]+=n.am(r,n[r],t,2*r,0,1)),t.s=0,t.clamp()},e.prototype.divRemTo=function(t,n,r){var o=t.abs();if(!(o.t<=0)){var i=this.abs();if(i.t<o.t)return n!=null&&n.fromInt(0),void(r!=null&&this.copyTo(r));r==null&&(r=yr());var a=yr(),l=this.s,s=t.s,u=this.DB-x_(o[o.t-1]);u>0?(o.lShiftTo(u,a),i.lShiftTo(u,r)):(o.copyTo(a),i.copyTo(r));var c=a.t,d=a[c-1];if(d!=0){var f=d*(1<<this.F1)+(c>1?a[c-2]>>this.F2:0),p=this.FV/f,m=(1<<this.F1)/f,v=1<<this.F2,g=r.t,b=g-c,y=n??yr();for(a.dlShiftTo(b,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),e.ONE.dlShiftTo(c,y),y.subTo(a,a);a.t<c;)a[a.t++]=0;for(;--b>=0;){var w=r[--g]==d?this.DM:Math.floor(r[g]*p+(r[g-1]+v)*m);if((r[g]+=a.am(0,w,r,b,0,c))<w)for(a.dlShiftTo(b,y),r.subTo(y,r);r[g]<--w;)r.subTo(y,r)}n!=null&&(r.drShiftTo(c,n),l!=s&&e.ZERO.subTo(n,n)),r.t=c,r.clamp(),u>0&&r.rShiftTo(u,r),l<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var n=3&t;return(n=(n=(n=(n=n*(2-(15&t)*n)&15)*(2-(255&t)*n)&255)*(2-((65535&t)*n&65535))&65535)*(2-t*n%this.DV)%this.DV)>0?this.DV-n:-n},e.prototype.isEven=function(){return(this.t>0?1&this[0]:this.s)==0},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=yr(),o=yr(),i=n.convert(this),a=x_(t)-1;for(i.copyTo(r);--a>=0;)if(n.sqrTo(r,o),(t&1<<a)>0)n.mulTo(o,i,r);else{var l=r;r=o,o=l}return n.revert(r)},e.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},e.prototype.toRadix=function(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var n=this.chunkSize(t),r=Math.pow(t,n),o=_p(r),i=yr(),a=yr(),l="";for(this.divRemTo(o,i,a);i.signum()>0;)l=(r+a.intValue()).toString(t).substr(1)+l,i.divRemTo(o,i,a);return a.intValue().toString(t)+l},e.prototype.fromRadix=function(t,n){this.fromInt(0),n==null&&(n=10);for(var r=this.chunkSize(n),o=Math.pow(n,r),i=!1,a=0,l=0,s=0;s<t.length;++s){var u=u0e(t,s);u<0?t.charAt(s)=="-"&&this.signum()==0&&(i=!0):(l=n*l+u,++a>=r&&(this.dMultiply(o),this.dAddOffset(l,0),a=0,l=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(l,0)),i&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if(typeof n=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),b_,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var o=[],i=7&t;o.length=1+(t>>3),n.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},e.prototype.bitwiseTo=function(t,n,r){var o,i,a=Math.min(t.t,this.t);for(o=0;o<a;++o)r[o]=n(this[o],t[o]);if(t.t<this.t){for(i=t.s&this.DM,o=a;o<this.t;++o)r[o]=n(this[o],i);r.t=this.t}else{for(i=this.s&this.DM,o=a;o<t.t;++o)r[o]=n(i,t[o]);r.t=t.t}r.s=n(this.s,t.s),r.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(t,n){for(var r=0,o=0,i=Math.min(t.t,this.t);r<i;)o+=this[r]+t[r],n[r++]=o&this.DM,o>>=this.DB;if(t.t<this.t){for(o+=t.s;r<this.t;)o+=this[r],n[r++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;r<t.t;)o+=t[r],n[r++]=o&this.DM,o>>=this.DB;o+=t.s}n.s=o<0?-1:0,o>0?n[r++]=o:o<-1&&(n[r++]=this.DV+o),n.t=r,n.clamp()},e.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(t,n){if(t!=0){for(;this.t<=n;)this[this.t++]=0;for(this[n]+=t;this[n]>=this.DV;)this[n]-=this.DV,++n>=this.t&&(this[this.t++]=0),++this[n]}},e.prototype.multiplyLowerTo=function(t,n,r){var o=Math.min(this.t+t.t,n);for(r.s=0,r.t=o;o>0;)r[--o]=0;for(var i=r.t-this.t;o<i;++o)r[o+this.t]=this.am(0,t[o],r,o,0,this.t);for(i=Math.min(t.t,n);o<i;++o)this.am(0,t[o],r,o,0,n-o);r.clamp()},e.prototype.multiplyUpperTo=function(t,n,r){--n;var o=r.t=this.t+t.t-n;for(r.s=0;--o>=0;)r[o]=0;for(o=Math.max(n-this.t,0);o<t.t;++o)r[this.t+o-n]=this.am(n-o,t[o],r,0,0,this.t+o-n);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(t){if(t<=0)return 0;var n=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(n==0)r=this[0]%t;else for(var o=this.t-1;o>=0;--o)r=(n*r+this[o])%t;return r},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var o=n.shiftRight(r);(t=t+1>>1)>al.length&&(t=al.length);for(var i=yr(),a=0;a<t;++a){i.fromInt(al[Math.floor(Math.random()*al.length)]);var l=i.modPow(o,this);if(l.compareTo(e.ONE)!=0&&l.compareTo(n)!=0){for(var s=1;s++<r&&l.compareTo(n)!=0;)if((l=l.modPowInt(2,this)).compareTo(e.ONE)==0)return!1;if(l.compareTo(n)!=0)return!1}}return!0},e.prototype.square=function(){var t=yr();return this.squareTo(t),t},e.prototype.gcda=function(t,n){var r=this.s<0?this.negate():this.clone(),o=t.s<0?t.negate():t.clone();if(r.compareTo(o)<0){var i=r;r=o,o=i}var a=r.getLowestSetBit(),l=o.getLowestSetBit();if(l<0)n(r);else{a<l&&(l=a),l>0&&(r.rShiftTo(l,r),o.rShiftTo(l,o));var s=function(){(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),(a=o.getLowestSetBit())>0&&o.rShiftTo(a,o),r.compareTo(o)>=0?(r.subTo(o,r),r.rShiftTo(1,r)):(o.subTo(r,o),o.rShiftTo(1,o)),r.signum()>0?setTimeout(s,0):(l>0&&o.lShiftTo(l,o),setTimeout(function(){n(o)},0))};setTimeout(s,10)}},e.prototype.fromNumberAsync=function(t,n,r,o){if(typeof n=="number")if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),b_,this),this.isEven()&&this.dAddOffset(1,0);var i=this,a=function(){i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(e.ONE.shiftLeft(t-1),i),i.isProbablePrime(n)?setTimeout(function(){o()},0):setTimeout(a,0)};setTimeout(a,0)}else{var l=[],s=7&t;l.length=1+(t>>3),n.nextBytes(l),s>0?l[0]&=(1<<s)-1:l[0]=0,this.fromString(l,256)}},e}(),IYe=function(){function e(){}return e.prototype.convert=function(t){return t},e.prototype.revert=function(t){return t},e.prototype.mulTo=function(t,n,r){t.multiplyTo(n,r)},e.prototype.sqrTo=function(t,n){t.squareTo(n)},e}(),a0e=function(){function e(t){this.m=t}return e.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},e.prototype.revert=function(t){return t},e.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},e.prototype.mulTo=function(t,n,r){t.multiplyTo(n,r),this.reduce(r)},e.prototype.sqrTo=function(t,n){t.squareTo(n),this.reduce(n)},e}(),l0e=function(){function e(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return e.prototype.convert=function(t){var n=yr();return t.abs().dlShiftTo(this.m.t,n),n.divRemTo(this.m,null,n),t.s<0&&n.compareTo(ar.ZERO)>0&&this.m.subTo(n,n),n},e.prototype.revert=function(t){var n=yr();return t.copyTo(n),this.reduce(n),n},e.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var n=0;n<this.m.t;++n){var r=32767&t[n],o=r*this.mpl+((r*this.mph+(t[n]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=n+this.m.t]+=this.m.am(0,o,t,n,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},e.prototype.mulTo=function(t,n,r){t.multiplyTo(n,r),this.reduce(r)},e.prototype.sqrTo=function(t,n){t.squareTo(n),this.reduce(n)},e}(),BYe=function(){function e(t){this.m=t,this.r2=yr(),this.q3=yr(),ar.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return e.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var n=yr();return t.copyTo(n),this.reduce(n),n},e.prototype.revert=function(t){return t},e.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},e.prototype.mulTo=function(t,n,r){t.multiplyTo(n,r),this.reduce(r)},e.prototype.sqrTo=function(t,n){t.squareTo(n),this.reduce(n)},e}();function yr(){return new ar(null)}function Ho(e,t){return new ar(e,t)}var s0e=typeof navigator<"u";s0e&&navigator.appName=="Microsoft Internet Explorer"?(ar.prototype.am=function(e,t,n,r,o,i){for(var a=32767&t,l=t>>15;--i>=0;){var s=32767&this[e],u=this[e++]>>15,c=l*s+u*a;o=((s=a*s+((32767&c)<<15)+n[r]+(1073741823&o))>>>30)+(c>>>15)+l*u+(o>>>30),n[r++]=1073741823&s}return o},xp=30):s0e&&navigator.appName!="Netscape"?(ar.prototype.am=function(e,t,n,r,o,i){for(;--i>=0;){var a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o},xp=26):(ar.prototype.am=function(e,t,n,r,o,i){for(var a=16383&t,l=t>>14;--i>=0;){var s=16383&this[e],u=this[e++]>>14,c=l*s+u*a;o=((s=a*s+((16383&c)<<14)+n[r]+o)>>28)+(c>>14)+l*u,n[r++]=268435455&s}return o},xp=28),ar.prototype.DB=xp,ar.prototype.DM=(1<<xp)-1,ar.prototype.DV=1<<xp,ar.prototype.FV=Math.pow(2,52),ar.prototype.F1=52-xp,ar.prototype.F2=2*xp-52;var Yg,ru,w_=[];for(Yg=48,ru=0;ru<=9;++ru)w_[Yg++]=ru;for(Yg=97,ru=10;ru<36;++ru)w_[Yg++]=ru;for(Yg=65,ru=10;ru<36;++ru)w_[Yg++]=ru;function u0e(e,t){var n=w_[e.charCodeAt(t)];return n??-1}function _p(e){var t=yr();return t.fromInt(e),t}function x_(e){var t,n=1;return(t=e>>>16)!=0&&(e=t,n+=16),(t=e>>8)!=0&&(e=t,n+=8),(t=e>>4)!=0&&(e=t,n+=4),(t=e>>2)!=0&&(e=t,n+=2),(t=e>>1)!=0&&(e=t,n+=1),n}ar.ZERO=_p(0),ar.ONE=_p(1);var LYe=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(t){var n,r,o;for(n=0;n<256;++n)this.S[n]=n;for(r=0,n=0;n<256;++n)r=r+this.S[n]+t[n%t.length]&255,o=this.S[n],this.S[n]=this.S[r],this.S[r]=o;this.i=0,this.j=0},e.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},e}(),__,zu,Ep=null;if(Ep==null){Ep=[],zu=0;var E_=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var iL=new Uint32Array(256);for(window.crypto.getRandomValues(iL),E_=0;E_<iL.length;++E_)Ep[zu++]=255&iL[E_]}var aL=0,C_=function(e){if((aL=aL||0)>=256||zu>=256)window.removeEventListener?window.removeEventListener("mousemove",C_,!1):window.detachEvent&&window.detachEvent("onmousemove",C_);else try{var t=e.x+e.y;Ep[zu++]=255&t,aL+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",C_,!1):window.attachEvent&&window.attachEvent("onmousemove",C_))}function PYe(){if(__==null){for(__=new LYe;zu<256;){var e=Math.floor(65536*Math.random());Ep[zu++]=255&e}for(__.init(Ep),zu=0;zu<Ep.length;++zu)Ep[zu]=0;zu=0}return __.next()}var lL=function(){function e(){}return e.prototype.nextBytes=function(t){for(var n=0;n<t.length;++n)t[n]=PYe()},e}(),jYe=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(t){if(this.p==null||this.q==null)return t.modPow(this.d,this.n);for(var n=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);n.compareTo(r)<0;)n=n.add(this.p);return n.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(t,n){t!=null&&n!=null&&t.length>0&&n.length>0?(this.n=Ho(t,16),this.e=parseInt(n,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(t){var n=this.n.bitLength()+7>>3,r=function(s,u){if(u<s.length+11)return console.error("Message too long for RSA"),null;for(var c=[],d=s.length-1;d>=0&&u>0;){var f=s.charCodeAt(d--);f<128?c[--u]=f:f>127&&f<2048?(c[--u]=63&f|128,c[--u]=f>>6|192):(c[--u]=63&f|128,c[--u]=f>>6&63|128,c[--u]=f>>12|224)}c[--u]=0;for(var p=new lL,m=[];u>2;){for(m[0]=0;m[0]==0;)p.nextBytes(m);c[--u]=m[0]}return c[--u]=2,c[--u]=0,new ar(c)}(t,n);if(r==null)return null;var o=this.doPublic(r);if(o==null)return null;for(var i=o.toString(16),a=i.length,l=0;l<2*n-a;l++)i="0"+i;return i},e.prototype.setPrivate=function(t,n,r){t!=null&&n!=null&&t.length>0&&n.length>0?(this.n=Ho(t,16),this.e=parseInt(n,16),this.d=Ho(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(t,n,r,o,i,a,l,s){t!=null&&n!=null&&t.length>0&&n.length>0?(this.n=Ho(t,16),this.e=parseInt(n,16),this.d=Ho(r,16),this.p=Ho(o,16),this.q=Ho(i,16),this.dmp1=Ho(a,16),this.dmq1=Ho(l,16),this.coeff=Ho(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(t,n){var r=new lL,o=t>>1;this.e=parseInt(n,16);for(var i=new ar(n,16);;){for(;this.p=new ar(t-o,1,r),this.p.subtract(ar.ONE).gcd(i).compareTo(ar.ONE)!=0||!this.p.isProbablePrime(10););for(;this.q=new ar(o,1,r),this.q.subtract(ar.ONE).gcd(i).compareTo(ar.ONE)!=0||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var l=this.p.subtract(ar.ONE),s=this.q.subtract(ar.ONE),u=l.multiply(s);if(u.gcd(i).compareTo(ar.ONE)==0){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(l),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(t){var n=Ho(t,16),r=this.doPrivate(n);return r==null?null:function(o,i){for(var a=o.toByteArray(),l=0;l<a.length&&a[l]==0;)++l;if(a.length-l!=i-1||a[l]!=2)return null;for(++l;a[l]!=0;)if(++l>=a.length)return null;for(var s="";++l<a.length;){var u=255&a[l];u<128?s+=String.fromCharCode(u):u>191&&u<224?(s+=String.fromCharCode((31&u)<<6|63&a[l+1]),++l):(s+=String.fromCharCode((15&u)<<12|(63&a[l+1])<<6|63&a[l+2]),l+=2)}return s}(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(t,n,r){var o=new lL,i=t>>1;this.e=parseInt(n,16);var a=new ar(n,16),l=this,s=function(){var u=function(){if(l.p.compareTo(l.q)<=0){var f=l.p;l.p=l.q,l.q=f}var p=l.p.subtract(ar.ONE),m=l.q.subtract(ar.ONE),v=p.multiply(m);v.gcd(a).compareTo(ar.ONE)==0?(l.n=l.p.multiply(l.q),l.d=a.modInverse(v),l.dmp1=l.d.mod(p),l.dmq1=l.d.mod(m),l.coeff=l.q.modInverse(l.p),setTimeout(function(){r()},0)):setTimeout(s,0)},c=function(){l.q=yr(),l.q.fromNumberAsync(i,1,o,function(){l.q.subtract(ar.ONE).gcda(a,function(f){f.compareTo(ar.ONE)==0&&l.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)})})},d=function(){l.p=yr(),l.p.fromNumberAsync(t-i,1,o,function(){l.p.subtract(ar.ONE).gcda(a,function(f){f.compareTo(ar.ONE)==0&&l.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(d,0)})})};setTimeout(d,0)};setTimeout(s,0)},e.prototype.sign=function(t,n,r){var o=function(s){return S_[s]||""}(r),i=function(s,u){if(u<s.length+22)return console.error("Message too long for RSA"),null;for(var c=u-s.length-6,d="",f=0;f<c;f+=2)d+="ff";return Ho("0001"+d+"00"+s,16)}(o+n(t).toString(),this.n.bitLength()/4);if(i==null)return null;var a=this.doPrivate(i);if(a==null)return null;var l=a.toString(16);return 1&l.length?"0"+l:l},e.prototype.verify=function(t,n,r){var o=Ho(n,16),i=this.doPublic(o);return i==null?null:function(a){for(var l in S_)if(S_.hasOwnProperty(l)){var s=S_[l],u=s.length;if(a.substr(0,u)==s)return a.substr(u)}return a}(i.toString(16).replace(/^1f+00/,""))==r(t).toString()},e}(),S_={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},ei={};ei.lang={extend:function(e,t,n){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),n){var o;for(o in n)e.prototype[o]=n[o];var i=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(i=function(l,s){for(o=0;o<a.length;o+=1){var u=a[o],c=s[u];typeof c=="function"&&c!=Object.prototype[u]&&(l[u]=c)}})}catch{}i(e.prototype,n)}}};var wt={};wt.asn1!==void 0&&wt.asn1||(wt.asn1={}),wt.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if(t.substr(0,1)!="-")t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",o=0;o<n;o++)r+="f";t=new ar(r,16).xor(e).add(ar.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=wt.asn1,n=t.DERBoolean,r=t.DERInteger,o=t.DERBitString,i=t.DEROctetString,a=t.DERNull,l=t.DERObjectIdentifier,s=t.DEREnumerated,u=t.DERUTF8String,c=t.DERNumericString,d=t.DERPrintableString,f=t.DERTeletexString,p=t.DERIA5String,m=t.DERUTCTime,v=t.DERGeneralizedTime,g=t.DERSequence,b=t.DERSet,y=t.DERTaggedObject,w=t.ASN1Util.newObject,x=Object.keys(e);if(x.length!=1)throw"key of param shall be only one.";var _=x[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+_+":")==-1)throw"undefined key: "+_;if(_=="bool")return new n(e[_]);if(_=="int")return new r(e[_]);if(_=="bitstr")return new o(e[_]);if(_=="octstr")return new i(e[_]);if(_=="null")return new a(e[_]);if(_=="oid")return new l(e[_]);if(_=="enum")return new s(e[_]);if(_=="utf8str")return new u(e[_]);if(_=="numstr")return new c(e[_]);if(_=="prnstr")return new d(e[_]);if(_=="telstr")return new f(e[_]);if(_=="ia5str")return new p(e[_]);if(_=="utctime")return new m(e[_]);if(_=="gentime")return new v(e[_]);if(_=="seq"){for(var E=e[_],C=[],T=0;T<E.length;T++){var k=w(E[T]);C.push(k)}return new g({array:C})}if(_=="set"){for(E=e[_],C=[],T=0;T<E.length;T++)k=w(E[T]),C.push(k);return new b({array:C})}if(_=="tag"){var I=e[_];if(Object.prototype.toString.call(I)==="[object Array]"&&I.length==3){var O=w(I[2]);return new y({tag:I[0],explicit:I[1],obj:O})}var F={};if(I.explicit!==void 0&&(F.explicit=I.explicit),I.tag!==void 0&&(F.tag=I.tag),I.obj===void 0)throw"obj shall be specified for 'tag'.";return F.obj=w(I.obj),new y(F)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},wt.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),o=2;o<e.length;o+=2){var i=("00000000"+parseInt(e.substr(o,2),16).toString(2)).slice(-8);r+=i.substr(1,7),i.substr(0,1)=="0"&&(t=t+"."+new ar(r,2).toString(10),r="")}return t},wt.asn1.ASN1Util.oidIntToHex=function(e){var t=function(l){var s=l.toString(16);return s.length==1&&(s="0"+s),s},n=function(l){var s="",u=new ar(l,10).toString(2),c=7-u.length%7;c==7&&(c=0);for(var d="",f=0;f<c;f++)d+="0";for(u=d+u,f=0;f<u.length-1;f+=7){var p=u.substr(f,7);f!=u.length-7&&(p="1"+p),s+=t(parseInt(p,2))}return s};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),i=40*parseInt(o[0])+parseInt(o[1]);r+=t(i),o.splice(0,2);for(var a=0;a<o.length;a++)r+=n(o[a]);return r},wt.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(this.hV===void 0||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},wt.asn1.DERAbstractString=function(e){wt.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(typeof e=="string"?this.setString(e):e.str!==void 0?this.setString(e.str):e.hex!==void 0&&this.setStringHex(e.hex))},ei.lang.extend(wt.asn1.DERAbstractString,wt.asn1.ASN1Object),wt.asn1.DERAbstractTime=function(e){wt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,n,r){var o=this.zeroPadding,i=this.localDateToUTC(t),a=String(i.getFullYear());n=="utc"&&(a=a.substr(2,2));var l=a+o(String(i.getMonth()+1),2)+o(String(i.getDate()),2)+o(String(i.getHours()),2)+o(String(i.getMinutes()),2)+o(String(i.getSeconds()),2);if(r===!0){var s=i.getMilliseconds();if(s!=0){var u=o(String(s),3);l=l+"."+(u=u.replace(/[0]+$/,""))}}return l+"Z"},this.zeroPadding=function(t,n){return t.length>=n?t:new Array(n-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,n,r,o,i,a){var l=new Date(Date.UTC(t,n-1,r,o,i,a,0));this.setByDate(l)},this.getFreshValueHex=function(){return this.hV}},ei.lang.extend(wt.asn1.DERAbstractTime,wt.asn1.ASN1Object),wt.asn1.DERAbstractStructured=function(e){wt.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,e!==void 0&&e.array!==void 0&&(this.asn1Array=e.array)},ei.lang.extend(wt.asn1.DERAbstractStructured,wt.asn1.ASN1Object),wt.asn1.DERBoolean=function(){wt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},ei.lang.extend(wt.asn1.DERBoolean,wt.asn1.ASN1Object),wt.asn1.DERInteger=function(e){wt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=wt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var n=new ar(String(t),10);this.setByBigInteger(n)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(e.bigint!==void 0?this.setByBigInteger(e.bigint):e.int!==void 0?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):e.hex!==void 0&&this.setValueHex(e.hex))},ei.lang.extend(wt.asn1.DERInteger,wt.asn1.ASN1Object),wt.asn1.DERBitString=function(e){if(e!==void 0&&e.obj!==void 0){var t=wt.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}wt.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(n){this.hTLV=null,this.isModified=!0,this.hV=n},this.setUnusedBitsAndHexValue=function(n,r){if(n<0||7<n)throw"unused bits shall be from 0 to 7: u = "+n;var o="0"+n;this.hTLV=null,this.isModified=!0,this.hV=o+r},this.setByBinaryString=function(n){var r=8-(n=n.replace(/0+$/,"")).length%8;r==8&&(r=0);for(var o=0;o<=r;o++)n+="0";var i="";for(o=0;o<n.length-1;o+=8){var a=n.substr(o,8),l=parseInt(a,2).toString(16);l.length==1&&(l="0"+l),i+=l}this.hTLV=null,this.isModified=!0,this.hV="0"+r+i},this.setByBooleanArray=function(n){for(var r="",o=0;o<n.length;o++)n[o]==1?r+="1":r+="0";this.setByBinaryString(r)},this.newFalseArray=function(n){for(var r=new Array(n),o=0;o<n;o++)r[o]=!1;return r},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(typeof e=="string"&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):e.hex!==void 0?this.setHexValueIncludingUnusedBits(e.hex):e.bin!==void 0?this.setByBinaryString(e.bin):e.array!==void 0&&this.setByBooleanArray(e.array))},ei.lang.extend(wt.asn1.DERBitString,wt.asn1.ASN1Object),wt.asn1.DEROctetString=function(e){if(e!==void 0&&e.obj!==void 0){var t=wt.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}wt.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},ei.lang.extend(wt.asn1.DEROctetString,wt.asn1.DERAbstractString),wt.asn1.DERNull=function(){wt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},ei.lang.extend(wt.asn1.DERNull,wt.asn1.ASN1Object),wt.asn1.DERObjectIdentifier=function(e){var t=function(r){var o=r.toString(16);return o.length==1&&(o="0"+o),o},n=function(r){var o="",i=new ar(r,10).toString(2),a=7-i.length%7;a==7&&(a=0);for(var l="",s=0;s<a;s++)l+="0";for(i=l+i,s=0;s<i.length-1;s+=7){var u=i.substr(s,7);s!=i.length-7&&(u="1"+u),o+=t(parseInt(u,2))}return o};wt.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueOidString=function(r){if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var o="",i=r.split("."),a=40*parseInt(i[0])+parseInt(i[1]);o+=t(a),i.splice(0,2);for(var l=0;l<i.length;l++)o+=n(i[l]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=o},this.setValueName=function(r){var o=wt.asn1.x509.OID.name2oid(r);if(o==="")throw"DERObjectIdentifier oidName undefined: "+r;this.setValueOidString(o)},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(typeof e=="string"?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):e.oid!==void 0?this.setValueOidString(e.oid):e.hex!==void 0?this.setValueHex(e.hex):e.name!==void 0&&this.setValueName(e.name))},ei.lang.extend(wt.asn1.DERObjectIdentifier,wt.asn1.ASN1Object),wt.asn1.DEREnumerated=function(e){wt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=wt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var n=new ar(String(t),10);this.setByBigInteger(n)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(e.int!==void 0?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):e.hex!==void 0&&this.setValueHex(e.hex))},ei.lang.extend(wt.asn1.DEREnumerated,wt.asn1.ASN1Object),wt.asn1.DERUTF8String=function(e){wt.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},ei.lang.extend(wt.asn1.DERUTF8String,wt.asn1.DERAbstractString),wt.asn1.DERNumericString=function(e){wt.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},ei.lang.extend(wt.asn1.DERNumericString,wt.asn1.DERAbstractString),wt.asn1.DERPrintableString=function(e){wt.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},ei.lang.extend(wt.asn1.DERPrintableString,wt.asn1.DERAbstractString),wt.asn1.DERTeletexString=function(e){wt.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},ei.lang.extend(wt.asn1.DERTeletexString,wt.asn1.DERAbstractString),wt.asn1.DERIA5String=function(e){wt.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},ei.lang.extend(wt.asn1.DERIA5String,wt.asn1.DERAbstractString),wt.asn1.DERUTCTime=function(e){wt.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{12}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date))},ei.lang.extend(wt.asn1.DERUTCTime,wt.asn1.DERAbstractTime),wt.asn1.DERGeneralizedTime=function(e){wt.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{14}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date),e.millis===!0&&(this.withMillis=!0))},ei.lang.extend(wt.asn1.DERGeneralizedTime,wt.asn1.DERAbstractTime),wt.asn1.DERSequence=function(e){wt.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var t="",n=0;n<this.asn1Array.length;n++)t+=this.asn1Array[n].getEncodedHex();return this.hV=t,this.hV}},ei.lang.extend(wt.asn1.DERSequence,wt.asn1.DERAbstractStructured),wt.asn1.DERSet=function(e){wt.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,n=0;n<this.asn1Array.length;n++){var r=this.asn1Array[n];t.push(r.getEncodedHex())}return this.sortFlag==1&&t.sort(),this.hV=t.join(""),this.hV},e!==void 0&&e.sortflag!==void 0&&e.sortflag==0&&(this.sortFlag=!1)},ei.lang.extend(wt.asn1.DERSet,wt.asn1.DERAbstractStructured),wt.asn1.DERTaggedObject=function(e){wt.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,n,r){this.hT=n,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,n),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(e.tag!==void 0&&(this.hT=e.tag),e.explicit!==void 0&&(this.isExplicit=e.explicit),e.obj!==void 0&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},ei.lang.extend(wt.asn1.DERTaggedObject,wt.asn1.ASN1Object);var k_,sL,VYe=(k_=function(e,t){return k_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},k_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}k_(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}),c0e=function(e){function t(n){var r=e.call(this)||this;return n&&(typeof n=="string"?r.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return VYe(t,e),t.prototype.parseKey=function(n){try{var r=0,o=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(n)?TYe(n):rL.unarmor(n),a=FYe.decode(i);if(a.sub.length===3&&(a=a.sub[2].sub[0]),a.sub.length===9){r=a.sub[1].getHexStringValue(),this.n=Ho(r,16),o=a.sub[2].getHexStringValue(),this.e=parseInt(o,16);var l=a.sub[3].getHexStringValue();this.d=Ho(l,16);var s=a.sub[4].getHexStringValue();this.p=Ho(s,16);var u=a.sub[5].getHexStringValue();this.q=Ho(u,16);var c=a.sub[6].getHexStringValue();this.dmp1=Ho(c,16);var d=a.sub[7].getHexStringValue();this.dmq1=Ho(d,16);var f=a.sub[8].getHexStringValue();this.coeff=Ho(f,16)}else{if(a.sub.length!==2)return!1;if(a.sub[0].sub){var p=a.sub[1].sub[0];r=p.sub[0].getHexStringValue(),this.n=Ho(r,16),o=p.sub[1].getHexStringValue(),this.e=parseInt(o,16)}else r=a.sub[0].getHexStringValue(),this.n=Ho(r,16),o=a.sub[1].getHexStringValue(),this.e=parseInt(o,16)}return!0}catch{return!1}},t.prototype.getPrivateBaseKey=function(){var n={array:[new wt.asn1.DERInteger({int:0}),new wt.asn1.DERInteger({bigint:this.n}),new wt.asn1.DERInteger({int:this.e}),new wt.asn1.DERInteger({bigint:this.d}),new wt.asn1.DERInteger({bigint:this.p}),new wt.asn1.DERInteger({bigint:this.q}),new wt.asn1.DERInteger({bigint:this.dmp1}),new wt.asn1.DERInteger({bigint:this.dmq1}),new wt.asn1.DERInteger({bigint:this.coeff})]};return new wt.asn1.DERSequence(n).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return A_(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var n=new wt.asn1.DERSequence({array:[new wt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new wt.asn1.DERNull]}),r=new wt.asn1.DERSequence({array:[new wt.asn1.DERInteger({bigint:this.n}),new wt.asn1.DERInteger({int:this.e})]}),o=new wt.asn1.DERBitString({hex:"00"+r.getEncodedHex()});return new wt.asn1.DERSequence({array:[n,o]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return A_(this.getPublicBaseKey())},t.wordwrap=function(n,r){if(!n)return n;var o="(.{1,"+(r=r||64)+`})( +|$ |
|
974 |
?)|(.{1,`+r+"})";return n.match(RegExp(o,"g")).join(` |
|
975 |
`)},t.prototype.getPrivateKey=function(){var n=`-----BEGIN RSA PRIVATE KEY----- |
|
976 |
`;return n+=t.wordwrap(this.getPrivateBaseKeyB64())+` |
|
977 |
`,n+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var n=`-----BEGIN PUBLIC KEY----- |
|
978 |
`;return n+=t.wordwrap(this.getPublicBaseKeyB64())+` |
|
979 |
`,n+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(n){return(n=n||{}).hasOwnProperty("n")&&n.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(n){return(n=n||{}).hasOwnProperty("n")&&n.hasOwnProperty("e")&&n.hasOwnProperty("d")&&n.hasOwnProperty("p")&&n.hasOwnProperty("q")&&n.hasOwnProperty("dmp1")&&n.hasOwnProperty("dmq1")&&n.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(n){this.n=n.n,this.e=n.e,n.hasOwnProperty("d")&&(this.d=n.d,this.p=n.p,this.q=n.q,this.dmp1=n.dmp1,this.dmq1=n.dmq1,this.coeff=n.coeff)},t}(jYe),zYe=typeof process<"u"?(sL={})===null||sL===void 0?void 0:sL.npm_package_version:void 0,d0e=function(){function e(t){t===void 0&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return e.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new c0e(t)},e.prototype.setPrivateKey=function(t){this.setKey(t)},e.prototype.setPublicKey=function(t){this.setKey(t)},e.prototype.decrypt=function(t){try{return this.getKey().decrypt(o0e(t))}catch{return!1}},e.prototype.encrypt=function(t){try{return A_(this.getKey().encrypt(t))}catch{return!1}},e.prototype.sign=function(t,n,r){try{return A_(this.getKey().sign(t,n,r))}catch{return!1}},e.prototype.verify=function(t,n,r){try{return this.getKey().verify(t,o0e(n),r)}catch{return!1}},e.prototype.getKey=function(t){if(!this.key){if(this.key=new c0e,t&&{}.toString.call(t)==="[object Function]")return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=zYe,e}();let Ll,H4,D_,uL,cL,k1;({wsCache:Ll}=ku()),H4="ACCESS_TOKEN",D_="REFRESH_TOKEN",Cd=()=>Ll.get(H4)?Ll.get(H4):Ll.get("ACCESS_TOKEN"),XO=()=>Ll.get(D_),mQ=e=>{Ll.set(D_,e.refreshToken),Ll.set(H4,e.accessToken)},uL=()=>{Ll.delete(H4),Ll.delete(D_)},WOe=()=>{const e=Ll.get(Nr.LoginForm);return e&&(e.password=(t=>{const n=new d0e;return n.setPrivateKey(`MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY |
|
980 |
7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN |
|
981 |
PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA |
|
982 |
kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow |
|
983 |
cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv |
|
984 |
DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh |
|
985 |
YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3 |
|
986 |
UP8iWi1Qw0Y=`),n.decrypt(t)})(e.password)),e},QDe=e=>{e.password=(t=>{const n=new d0e;return n.setPublicKey(`MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH |
|
987 |
nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==`),n.encrypt(t)})(e.password),Ll.set(Nr.LoginForm,e,{exp:2592e3})},JDe=()=>{Ll.delete(Nr.LoginForm)},_3=()=>Ll.get(Nr.TenantId),eOe=e=>{Ll.set(Nr.TenantId,e)},cL={401:"\u8BA4\u8BC1\u5931\u8D25\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u7CFB\u7EDF\u8D44\u6E90",403:"\u5F53\u524D\u64CD\u4F5C\u6CA1\u6709\u6743\u9650",404:"\u8BBF\u95EE\u8D44\u6E90\u4E0D\u5B58\u5728",default:"\u7CFB\u7EDF\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u53CD\u9988\u7ED9\u7BA1\u7406\u5458"},k1=typeof document<"u";const qr=Object.assign;function dL(e,t){const n={};for(const r in t){const o=t[r];n[r]=Hu(o)?o.map(e):e(o)}return n}const $4=()=>{},Hu=Array.isArray,f0e=/#/g,HYe=/&/g,$Ye=/\//g,UYe=/=/g,WYe=/\?/g,p0e=/\+/g,GYe=/%5B/g,qYe=/%5D/g,h0e=/%5E/g,KYe=/%60/g,v0e=/%7B/g,YYe=/%7C/g,m0e=/%7D/g,XYe=/%20/g;function fL(e){return encodeURI(""+e).replace(YYe,"|").replace(GYe,"[").replace(qYe,"]")}function QYe(e){return fL(e).replace(v0e,"{").replace(m0e,"}").replace(h0e,"^")}function pL(e){return fL(e).replace(p0e,"%2B").replace(XYe,"+").replace(f0e,"%23").replace(HYe,"%26").replace(KYe,"`").replace(v0e,"{").replace(m0e,"}").replace(h0e,"^")}function JYe(e){return pL(e).replace(UYe,"%3D")}function ZYe(e){return e==null?"":function(t){return fL(t).replace(f0e,"%23").replace(WYe,"%3F")}(e).replace($Ye,"%2F")}function U4(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const eXe=/\/$/,tXe=e=>e.replace(eXe,"");function hL(e,t,n="/"){let r,o={},i="",a="";const l=t.indexOf("#");let s=t.indexOf("?");return l<s&&l>=0&&(s=-1),s>-1&&(r=t.slice(0,s),i=t.slice(s+1,l>-1?l:t.length),o=e(i)),l>-1&&(r=r||t.slice(0,l),a=t.slice(l,t.length)),r=function(u,c){if(u.startsWith("/"))return u;if(!u)return c;const d=c.split("/"),f=u.split("/"),p=f[f.length-1];p!==".."&&p!=="."||f.push("");let m,v,g=d.length-1;for(m=0;m<f.length;m++)if(v=f[m],v!=="."){if(v!=="..")break;g>1&&g--}return d.slice(0,g).join("/")+"/"+f.slice(m).join("/")}(r??t,n),{fullPath:r+(i&&"?")+i+a,path:r,query:o,hash:U4(a)}}function g0e(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function Xg(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function y0e(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!nXe(e[n],t[n]))return!1;return!0}function nXe(e,t){return Hu(e)?b0e(e,t):Hu(t)?b0e(t,e):e===t}function b0e(e,t){return Hu(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}const Cp={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var W4,A0e,G4,vL;(A0e=W4||(W4={})).pop="pop",A0e.push="push",(vL=G4||(G4={})).back="back",vL.forward="forward",vL.unknown="";const rXe=/^[^#]+#/;function oXe(e,t){return e.replace(rXe,"#")+t}const O_=()=>({left:window.scrollX,top:window.scrollY});function iXe(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=function(i,a){const l=document.documentElement.getBoundingClientRect(),s=i.getBoundingClientRect();return{behavior:a.behavior,left:s.left-l.left-(a.left||0),top:s.top-l.top-(a.top||0)}}(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function w0e(e,t){return(history.state?history.state.position-t:-1)+e}const mL=new Map;let aXe=()=>location.protocol+"//"+location.host;function x0e(e,t){const{pathname:n,search:r,hash:o}=t,i=e.indexOf("#");if(i>-1){let a=o.includes(e.slice(i))?e.slice(i).length:1,l=o.slice(a);return l[0]!=="/"&&(l="/"+l),g0e(l,"")}return g0e(n,e)+r+o}function _0e(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?O_():null}}function E0e(e){const t=function(o){const{history:i,location:a}=window,l={value:x0e(o,a)},s={value:i.state};function u(c,d,f){const p=o.indexOf("#"),m=p>-1?(a.host&&document.querySelector("base")?o:o.slice(p))+c:aXe()+o+c;try{i[f?"replaceState":"pushState"](d,"",m),s.value=d}catch(v){console.error(v),a[f?"replace":"assign"](m)}}return s.value||u(l.value,{back:null,current:l.value,forward:null,position:i.length-1,replaced:!0,scroll:null},!0),{location:l,state:s,push:function(c,d){const f=qr({},s.value,i.state,{forward:c,scroll:O_()});u(f.current,f,!0),u(c,qr({},_0e(l.value,c,null),{position:f.position+1},d),!1),l.value=c},replace:function(c,d){u(c,qr({},i.state,_0e(s.value.back,c,s.value.forward,!0),d,{position:s.value.position}),!0),l.value=c}}}(e=function(o){if(!o)if(k1){const i=document.querySelector("base");o=(o=i&&i.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else o="/";return o[0]!=="/"&&o[0]!=="#"&&(o="/"+o),tXe(o)}(e)),n=function(o,i,a,l){let s=[],u=[],c=null;const d=({state:p})=>{const m=x0e(o,location),v=a.value,g=i.value;let b=0;if(p){if(a.value=m,i.value=p,c&&c===v)return void(c=null);b=g?p.position-g.position:0}else l(m);s.forEach(y=>{y(a.value,v,{delta:b,type:W4.pop,direction:b?b>0?G4.forward:G4.back:G4.unknown})})};function f(){const{history:p}=window;p.state&&p.replaceState(qr({},p.state,{scroll:O_()}),"")}return window.addEventListener("popstate",d),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:function(){c=a.value},listen:function(p){s.push(p);const m=()=>{const v=s.indexOf(p);v>-1&&s.splice(v,1)};return u.push(m),m},destroy:function(){for(const p of u)p();u=[],window.removeEventListener("popstate",d),window.removeEventListener("beforeunload",f)}}}(e,t.state,t.location,t.replace),r=qr({location:"",base:e,go:function(o,i=!0){i||n.pauseListeners(),history.go(o)},createHref:oXe.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function C0e(e){return typeof e=="string"||typeof e=="symbol"}const S0e=Symbol("");var k0e,Qg;function Jg(e,t){return qr(new Error,{type:e,[S0e]:!0},t)}function Xd(e,t){return e instanceof Error&&S0e in e&&(t==null||!!(e.type&t))}(Qg=k0e||(k0e={}))[Qg.aborted=4]="aborted",Qg[Qg.cancelled=8]="cancelled",Qg[Qg.duplicated=16]="duplicated";const D0e="[^/]+?",lXe={sensitive:!1,strict:!1,start:!0,end:!0},sXe=/[.+*?^${}()[\]/\\]/g;function uXe(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function O0e(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const i=uXe(r[n],o[n]);if(i)return i;n++}if(Math.abs(o.length-r.length)===1){if(T0e(r))return 1;if(T0e(o))return-1}return o.length-r.length}function T0e(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const cXe={type:0,value:""},dXe=/[a-zA-Z0-9_]/;function fXe(e,t,n){const r=function(i,a){const l=qr({},lXe,a),s=[];let u=l.start?"^":"";const c=[];for(const f of i){const p=f.length?[]:[90];l.strict&&!f.length&&(u+="/");for(let m=0;m<f.length;m++){const v=f[m];let g=40+(l.sensitive?.25:0);if(v.type===0)m||(u+="/"),u+=v.value.replace(sXe,"\\$&"),g+=40;else if(v.type===1){const{value:b,repeatable:y,optional:w,regexp:x}=v;c.push({name:b,repeatable:y,optional:w});const _=x||D0e;if(_!==D0e){g+=10;try{new RegExp(`(${_})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${b}" (${_}): `+C.message)}}let E=y?`((?:${_})(?:/(?:${_}))*)`:`(${_})`;m||(E=w&&f.length<2?`(?:/${E})`:"/"+E),w&&(E+="?"),u+=E,g+=20,w&&(g+=-8),y&&(g+=-20),_===".*"&&(g+=-50)}p.push(g)}s.push(p)}if(l.strict&&l.end){const f=s.length-1;s[f][s[f].length-1]+=.7000000000000001}l.strict||(u+="/?"),l.end?u+="$":l.strict&&(u+="(?:/|$)");const d=new RegExp(u,l.sensitive?"":"i");return{re:d,score:s,keys:c,parse:function(f){const p=f.match(d),m={};if(!p)return null;for(let v=1;v<p.length;v++){const g=p[v]||"",b=c[v-1];m[b.name]=g&&b.repeatable?g.split("/"):g}return m},stringify:function(f){let p="",m=!1;for(const v of i){m&&p.endsWith("/")||(p+="/"),m=!1;for(const g of v)if(g.type===0)p+=g.value;else if(g.type===1){const{value:b,repeatable:y,optional:w}=g,x=b in f?f[b]:"";if(Hu(x)&&!y)throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);const _=Hu(x)?x.join("/"):x;if(!_){if(!w)throw new Error(`Missing required param "${b}"`);v.length<2&&(p.endsWith("/")?p=p.slice(0,-1):m=!0)}p+=_}}return p||"/"}}}(function(i){if(!i)return[[]];if(i==="/")return[[cXe]];if(!i.startsWith("/"))throw new Error(`Invalid path "${i}"`);function a(y){throw new Error(`ERR (${l})/"${m}": ${y}`)}let l=0,s=l;const u=[];let c;function d(){c&&u.push(c),c=[]}let f,p=0,m="",v="";function g(){m&&(l===0?c.push({type:0,value:m}):l===1||l===2||l===3?(c.length>1&&(f==="*"||f==="+")&&a(`A repeatable param (${m}) must be alone in its segment. eg: '/:ids+.`),c.push({type:1,value:m,regexp:v,repeatable:f==="*"||f==="+",optional:f==="*"||f==="?"})):a("Invalid state to consume buffer"),m="")}function b(){m+=f}for(;p<i.length;)if(f=i[p++],f!=="\\"||l===2)switch(l){case 0:f==="/"?(m&&g(),d()):f===":"?(g(),l=1):b();break;case 4:b(),l=s;break;case 1:f==="("?l=2:dXe.test(f)?b():(g(),l=0,f!=="*"&&f!=="?"&&f!=="+"&&p--);break;case 2:f===")"?v[v.length-1]=="\\"?v=v.slice(0,-1)+f:l=3:v+=f;break;case 3:g(),l=0,f!=="*"&&f!=="?"&&f!=="+"&&p--,v="";break;default:a("Unknown state")}else s=l,l=4;return l===2&&a(`Unfinished custom RegExp for param "${m}"`),g(),d(),u}(e.path),n),o=qr(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function pXe(e,t){const n=[],r=new Map;function o(l,s,u){const c=!u,d=function(g){return{path:g.path,redirect:g.redirect,name:g.name,meta:g.meta||{},aliasOf:void 0,beforeEnter:g.beforeEnter,props:hXe(g),children:g.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in g?g.components||null:g.component&&{default:g.component}}}(l);d.aliasOf=u&&u.record;const f=F0e(t,l),p=[d];if("alias"in l){const g=typeof l.alias=="string"?[l.alias]:l.alias;for(const b of g)p.push(qr({},d,{components:u?u.record.components:d.components,path:b,aliasOf:u?u.record:d}))}let m,v;for(const g of p){const{path:b}=g;if(s&&b[0]!=="/"){const y=s.record.path,w=y[y.length-1]==="/"?"":"/";g.path=s.record.path+(b&&w+b)}if(m=fXe(g,s,f),u?u.alias.push(m):(v=v||m,v!==m&&v.alias.push(m),c&&l.name&&!N0e(m)&&i(l.name)),R0e(m)&&a(m),d.children){const y=d.children;for(let w=0;w<y.length;w++)o(y[w],m,u&&u.children[w])}u=u||m}return v?()=>{i(v)}:$4}function i(l){if(C0e(l)){const s=r.get(l);s&&(r.delete(l),n.splice(n.indexOf(s),1),s.children.forEach(i),s.alias.forEach(i))}else{const s=n.indexOf(l);s>-1&&(n.splice(s,1),l.record.name&&r.delete(l.record.name),l.children.forEach(i),l.alias.forEach(i))}}function a(l){const s=function(u,c){let d=0,f=c.length;for(;d!==f;){const m=d+f>>1;O0e(u,c[m])<0?f=m:d=m+1}const p=function(m){let v=m;for(;v=v.parent;)if(R0e(v)&&O0e(m,v)===0)return v}(u);return p&&(f=c.lastIndexOf(p,f-1)),f}(l,n);n.splice(s,0,l),l.record.name&&!N0e(l)&&r.set(l.record.name,l)}return t=F0e({strict:!1,end:!0,sensitive:!1},t),e.forEach(l=>o(l)),{addRoute:o,resolve:function(l,s){let u,c,d,f={};if("name"in l&&l.name){if(u=r.get(l.name),!u)throw Jg(1,{location:l});d=u.record.name,f=qr(M0e(s.params,u.keys.filter(v=>!v.optional).concat(u.parent?u.parent.keys.filter(v=>v.optional):[]).map(v=>v.name)),l.params&&M0e(l.params,u.keys.map(v=>v.name))),c=u.stringify(f)}else if(l.path!=null)c=l.path,u=n.find(v=>v.re.test(c)),u&&(f=u.parse(c),d=u.record.name);else{if(u=s.name?r.get(s.name):n.find(v=>v.re.test(s.path)),!u)throw Jg(1,{location:l,currentLocation:s});d=u.record.name,f=qr({},s.params,l.params),c=u.stringify(f)}const p=[];let m=u;for(;m;)p.unshift(m.record),m=m.parent;return{name:d,path:c,params:f,matched:p,meta:vXe(p)}},removeRoute:i,clearRoutes:function(){n.length=0,r.clear()},getRoutes:function(){return n},getRecordMatcher:function(l){return r.get(l)}}}function M0e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function hXe(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function N0e(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function vXe(e){return e.reduce((t,n)=>qr(t,n.meta),{})}function F0e(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function R0e({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function mXe(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const o=n[r].replace(p0e," "),i=o.indexOf("="),a=U4(i<0?o:o.slice(0,i)),l=i<0?null:U4(o.slice(i+1));if(a in t){let s=t[a];Hu(s)||(s=t[a]=[s]),s.push(l)}else t[a]=l}return t}function I0e(e){let t="";for(let n in e){const r=e[n];if(n=JYe(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Hu(r)?r.map(i=>i&&pL(i)):[r&&pL(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function gXe(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Hu(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const yXe=Symbol(""),B0e=Symbol(""),T_=Symbol(""),gL=Symbol(""),yL=Symbol("");function q4(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function Sp(e,t,n,r,o,i=a=>a()){const a=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((l,s)=>{const u=f=>{var p;f===!1?s(Jg(4,{from:n,to:t})):f instanceof Error?s(f):typeof(p=f)=="string"||p&&typeof p=="object"?s(Jg(2,{from:t,to:f})):(a&&r.enterCallbacks[o]===a&&typeof f=="function"&&a.push(f),l())},c=i(()=>e.call(r&&r.instances[o],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>s(f))})}function bL(e,t,n,r,o=i=>i()){const i=[];for(const l of e)for(const s in l.components){let u=l.components[s];if(t==="beforeRouteEnter"||l.instances[s])if(typeof(a=u)=="object"||"displayName"in a||"props"in a||"__vccOpts"in a){const c=(u.__vccOpts||u)[t];c&&i.push(Sp(c,n,r,l,s,o))}else{let c=u();i.push(()=>c.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${s}" at "${l.path}"`));const f=(p=d).__esModule||p[Symbol.toStringTag]==="Module"?d.default:d;var p;l.components[s]=f;const m=(f.__vccOpts||f)[t];return m&&Sp(m,n,r,l,s,o)()}))}}var a;return i}function L0e(e){const t=Rt(T_),n=Rt(gL),r=ee(()=>{const l=M(e.to);return t.resolve(l)}),o=ee(()=>{const{matched:l}=r.value,{length:s}=l,u=l[s-1],c=n.matched;if(!u||!c.length)return-1;const d=c.findIndex(Xg.bind(null,u));if(d>-1)return d;const f=P0e(l[s-2]);return s>1&&P0e(u)===f&&c[c.length-1].path!==f?c.findIndex(Xg.bind(null,l[s-2])):d}),i=ee(()=>o.value>-1&&function(l,s){for(const u in s){const c=s[u],d=l[u];if(typeof c=="string"){if(c!==d)return!1}else if(!Hu(d)||d.length!==c.length||c.some((f,p)=>f!==d[p]))return!1}return!0}(n.params,r.value.params)),a=ee(()=>o.value>-1&&o.value===n.matched.length-1&&y0e(n.params,r.value.params));return{route:r,href:ee(()=>r.value.href),isActive:i,isExactActive:a,navigate:function(l={}){return function(s){if(!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)&&!s.defaultPrevented&&!(s.button!==void 0&&s.button!==0)){if(s.currentTarget&&s.currentTarget.getAttribute){const u=s.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(u))return}return s.preventDefault&&s.preventDefault(),!0}}(l)?t[M(e.replace)?"replace":"push"](M(e.to)).catch($4):Promise.resolve()}}}const bXe=Te({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:L0e,setup(e,{slots:t}){const n=Qn(L0e(e)),{options:r}=Rt(T_),o=ee(()=>({[j0e(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[j0e(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:pn("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},i)}}});function P0e(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const j0e=(e,t,n)=>e??t??n,AXe=Te({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Rt(yL),o=ee(()=>e.route||r.value),i=Rt(B0e,0),a=ee(()=>{let u=M(i);const{matched:c}=o.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),l=ee(()=>o.value.matched[a.value]);qn(B0e,ee(()=>a.value+1)),qn(yXe,l),qn(yL,o);const s=de();return Je(()=>[s.value,l.value,e.name],([u,c,d],[f,p,m])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),!u||!c||p&&Xg(c,p)&&f||(c.enterCallbacks[d]||[]).forEach(v=>v(u))},{flush:"post"}),()=>{const u=o.value,c=e.name,d=l.value,f=d&&d.components[c];if(!f)return V0e(n.default,{Component:f,route:u});const p=d.props[c],m=p?p===!0?u.params:typeof p=="function"?p(u):p:null,v=pn(f,qr({},m,t,{onVnodeUnmounted:g=>{g.component.isUnmounted&&(d.instances[c]=null)},ref:s}));return V0e(n.default,{Component:v,route:u})||v}}});function V0e(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const wXe=AXe;function z0e(e){const t=pXe(e.routes,e),n=e.parseQuery||mXe,r=e.stringifyQuery||I0e,o=e.history,i=q4(),a=q4(),l=q4(),s=Qo(Cp);let u=Cp;k1&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=dL.bind(null,z=>""+z),d=dL.bind(null,ZYe),f=dL.bind(null,U4);function p(z,$){if($=qr({},$||s.value),typeof z=="string"){const se=hL(n,z,$.path),le=t.resolve({path:se.path},$),J=o.createHref(se.fullPath);return qr(se,le,{params:f(le.params),hash:U4(se.hash),redirectedFrom:void 0,href:J})}let W;if(z.path!=null)W=qr({},z,{path:hL(n,z.path,$.path).path});else{const se=qr({},z.params);for(const le in se)se[le]==null&&delete se[le];W=qr({},z,{params:d(se)}),$.params=d($.params)}const K=t.resolve(W,$),X=z.hash||"";K.params=c(f(K.params));const te=function(se,le){const J=le.query?se(le.query):"";return le.path+(J&&"?")+J+(le.hash||"")}(r,qr({},z,{hash:QYe(X),path:K.path})),ne=o.createHref(te);return qr({fullPath:te,hash:X,query:r===I0e?gXe(z.query):z.query||{}},K,{redirectedFrom:void 0,href:ne})}function m(z){return typeof z=="string"?hL(n,z,s.value.path):qr({},z)}function v(z,$){if(u!==z)return Jg(8,{from:$,to:z})}function g(z){return y(z)}function b(z){const $=z.matched[z.matched.length-1];if($&&$.redirect){const{redirect:W}=$;let K=typeof W=="function"?W(z):W;return typeof K=="string"&&(K=K.includes("?")||K.includes("#")?K=m(K):{path:K},K.params={}),qr({query:z.query,hash:z.hash,params:K.path!=null?{}:z.params},K)}}function y(z,$){const W=u=p(z),K=s.value,X=z.state,te=z.force,ne=z.replace===!0,se=b(W);if(se)return y(qr(m(se),{state:typeof se=="object"?qr({},X,se.state):X,force:te,replace:ne}),$||W);const le=W;let J;return le.redirectedFrom=$,!te&&function(Z,ye,be){const ve=ye.matched.length-1,Ae=be.matched.length-1;return ve>-1&&ve===Ae&&Xg(ye.matched[ve],be.matched[Ae])&&y0e(ye.params,be.params)&&Z(ye.query)===Z(be.query)&&ye.hash===be.hash}(r,K,W)&&(J=Jg(16,{to:le,from:K}),L(K,K,!0,!1)),(J?Promise.resolve(J):_(le,K)).catch(Z=>Xd(Z)?Xd(Z,2)?Z:B(Z):N(Z,le,K)).then(Z=>{if(Z){if(Xd(Z,2))return y(qr({replace:ne},m(Z.to),{state:typeof Z.to=="object"?qr({},X,Z.to.state):X,force:te}),$||le)}else Z=C(le,K,!0,ne,X);return E(le,K,Z),Z})}function w(z,$){const W=v(z,$);return W?Promise.reject(W):Promise.resolve()}function x(z){const $=H.values().next().value;return $&&typeof $.runWithContext=="function"?$.runWithContext(z):z()}function _(z,$){let W;const[K,X,te]=function(se,le){const J=[],Z=[],ye=[],be=Math.max(le.matched.length,se.matched.length);for(let ve=0;ve<be;ve++){const Ae=le.matched[ve];Ae&&(se.matched.find(_e=>Xg(_e,Ae))?Z.push(Ae):J.push(Ae));const Ce=se.matched[ve];Ce&&(le.matched.find(_e=>Xg(_e,Ce))||ye.push(Ce))}return[J,Z,ye]}(z,$);W=bL(K.reverse(),"beforeRouteLeave",z,$);for(const se of K)se.leaveGuards.forEach(le=>{W.push(Sp(le,z,$))});const ne=w.bind(null,z,$);return W.push(ne),G(W).then(()=>{W=[];for(const se of i.list())W.push(Sp(se,z,$));return W.push(ne),G(W)}).then(()=>{W=bL(X,"beforeRouteUpdate",z,$);for(const se of X)se.updateGuards.forEach(le=>{W.push(Sp(le,z,$))});return W.push(ne),G(W)}).then(()=>{W=[];for(const se of te)if(se.beforeEnter)if(Hu(se.beforeEnter))for(const le of se.beforeEnter)W.push(Sp(le,z,$));else W.push(Sp(se.beforeEnter,z,$));return W.push(ne),G(W)}).then(()=>(z.matched.forEach(se=>se.enterCallbacks={}),W=bL(te,"beforeRouteEnter",z,$,x),W.push(ne),G(W))).then(()=>{W=[];for(const se of a.list())W.push(Sp(se,z,$));return W.push(ne),G(W)}).catch(se=>Xd(se,8)?se:Promise.reject(se))}function E(z,$,W){l.list().forEach(K=>x(()=>K(z,$,W)))}function C(z,$,W,K,X){const te=v(z,$);if(te)return te;const ne=$===Cp,se=k1?history.state:{};W&&(K||ne?o.replace(z.fullPath,qr({scroll:ne&&se&&se.scroll},X)):o.push(z.fullPath,X)),s.value=z,L(z,$,W,ne),B()}let T;function k(){T||(T=o.listen((z,$,W)=>{if(!U.listening)return;const K=p(z),X=b(K);if(X)return void y(qr(X,{replace:!0}),K).catch($4);u=K;const te=s.value;var ne,se;k1&&(ne=w0e(te.fullPath,W.delta),se=O_(),mL.set(ne,se)),_(K,te).catch(le=>Xd(le,12)?le:Xd(le,2)?(y(le.to,K).then(J=>{Xd(J,20)&&!W.delta&&W.type===W4.pop&&o.go(-1,!1)}).catch($4),Promise.reject()):(W.delta&&o.go(-W.delta,!1),N(le,K,te))).then(le=>{(le=le||C(K,te,!1))&&(W.delta&&!Xd(le,8)?o.go(-W.delta,!1):W.type===W4.pop&&Xd(le,20)&&o.go(-1,!1)),E(K,te,le)}).catch($4)}))}let I,O=q4(),F=q4();function N(z,$,W){B(z);const K=F.list();return K.length?K.forEach(X=>X(z,$,W)):console.error(z),Promise.reject(z)}function B(z){return I||(I=!z,k(),O.list().forEach(([$,W])=>z?W(z):$()),O.reset()),z}function L(z,$,W,K){const{scrollBehavior:X}=e;if(!k1||!X)return Promise.resolve();const te=!W&&function(ne){const se=mL.get(ne);return mL.delete(ne),se}(w0e(z.fullPath,0))||(K||!W)&&history.state&&history.state.scroll||null;return St().then(()=>X(z,$,te)).then(ne=>ne&&iXe(ne)).catch(ne=>N(ne,z,$))}const V=z=>o.go(z);let P;const H=new Set,U={currentRoute:s,listening:!0,addRoute:function(z,$){let W,K;return C0e(z)?(W=t.getRecordMatcher(z),K=$):K=z,t.addRoute(K,W)},removeRoute:function(z){const $=t.getRecordMatcher(z);$&&t.removeRoute($)},clearRoutes:t.clearRoutes,hasRoute:function(z){return!!t.getRecordMatcher(z)},getRoutes:function(){return t.getRoutes().map(z=>z.record)},resolve:p,options:e,push:g,replace:function(z){return g(qr(m(z),{replace:!0}))},go:V,back:()=>V(-1),forward:()=>V(1),beforeEach:i.add,beforeResolve:a.add,afterEach:l.add,onError:F.add,isReady:function(){return I&&s.value!==Cp?Promise.resolve():new Promise((z,$)=>{O.add([z,$])})},install(z){z.component("RouterLink",bXe),z.component("RouterView",wXe),z.config.globalProperties.$router=this,Object.defineProperty(z.config.globalProperties,"$route",{enumerable:!0,get:()=>M(s)}),k1&&!P&&s.value===Cp&&(P=!0,g(o.location).catch(K=>{}));const $={};for(const K in Cp)Object.defineProperty($,K,{get:()=>s.value[K],enumerable:!0});z.provide(T_,this),z.provide(gL,x7($)),z.provide(yL,s);const W=z.unmount;H.add(z),z.unmount=function(){H.delete(z),H.size<1&&(u=Cp,T&&T(),T=null,s.value=Cp,P=!1,I=!1),W()}}};function G(z){return z.reduce(($,W)=>$.then(()=>x(W)),Promise.resolve())}return U}aJ=function(){return Rt(T_)},LDe=function(e){return Rt(gL)};let Zg,$u,AL,wL,H0e,$0e,U0e,xL,M_,_L,e2,EL,W0e,CL,G0e,q0e,t2;Zg=Object.assign({"../views/Error/403.vue":()=>qe(()=>import("./403-C3njrW1B.js"),__vite__mapDeps([0,1])),"../views/Error/404.vue":()=>qe(()=>import("./404-Df4057FR.js"),__vite__mapDeps([2,1])),"../views/Error/500.vue":()=>qe(()=>import("./500-BeG3Ja1t.js"),__vite__mapDeps([3,1])),"../views/Home/Index.vue":()=>qe(()=>import("./Index-D80BL6lE.js"),__vite__mapDeps([])),"../views/Home/Index2.vue":()=>qe(()=>import("./Index2-BrXgvzlQ.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),"../views/Login/Login.vue":()=>qe(()=>import("./Login-eIV7ELhl.js"),__vite__mapDeps([24,25,26,27,28,29,20,13,14,21,30,31,32,7,8,33,34,35,36,37,38,39,40,41,42,43,44,45,18,46,47,48,49,50])),"../views/Login/SocialLogin.vue":()=>qe(()=>import("./SocialLogin-BnFjod1I.js"),__vite__mapDeps([51,31,32,7,8,25,26,28,27,29,20,13,14,21,33,34,52])),"../views/Login/components/LoginForm.vue":()=>qe(()=>import("./LoginForm-DmQqCWC8.js"),__vite__mapDeps([30,31,32,7,8,33,28,34,35])),"../views/Login/components/LoginFormTitle.vue":()=>qe(()=>import("./LoginFormTitle-Dj_rO8Yu.js"),__vite__mapDeps([53,33])),"../views/Login/components/MobileForm.vue":()=>qe(()=>import("./MobileForm-BwD5BqYs.js"),__vite__mapDeps([36,7,8,28,33,34,37])),"../views/Login/components/QrCodeForm.vue":()=>qe(()=>import("./QrCodeForm-fybGn-E-.js"),__vite__mapDeps([54,46,7,8,47,48,25,33,49])),"../views/Login/components/RegisterForm.vue":()=>qe(()=>import("./RegisterForm-Cmvb3GJh.js"),__vite__mapDeps([55,56,38,39,40,41,42,43,44,45,7,8,57,18,33])),"../views/Login/components/SSOLogin.vue":()=>qe(()=>import("./SSOLogin-Cyi_kSmX.js"),__vite__mapDeps([58,33])),"../views/Profile/Index.vue":()=>qe(()=>import("./Index-C58mdRyU.js"),__vite__mapDeps([59,47,48,60,7,8,56,38,39,40,41,42,43,44,45,61,62,11,63,9,10,16,17,64,65,66,67,68,69,70,71])),"../views/Profile/components/BasicInfo.vue":()=>qe(()=>import("./BasicInfo-D50vTdBQ.js"),__vite__mapDeps([72,60,7,8,56,38,39,40,41,42,43,44,45,61])),"../views/Profile/components/ProfileUser.vue":()=>qe(()=>import("./ProfileUser-Xh59PtIz.js"),__vite__mapDeps([62,11,63,61,9,10,16,17,7,8,64,65])),"../views/Profile/components/ResetPwd.vue":()=>qe(()=>import("./ResetPwd-CmgEQAbi.js"),__vite__mapDeps([73,66,7,8,43,44,61])),"../views/Profile/components/UserAvatar.vue":()=>qe(()=>import("./UserAvatar-C0MdBRR4.js"),__vite__mapDeps([63,61,9,10,16,17,7,8,64])),"../views/Profile/components/UserSocial.vue":()=>qe(()=>import("./UserSocial-aZof3tVi.js"),__vite__mapDeps([74,67,68,69,70,61])),"../views/Redirect/Redirect.vue":()=>qe(()=>import("./Redirect-BoUzsAg_.js"),__vite__mapDeps([])),"../views/bpm/category/CategoryForm.vue":()=>qe(()=>import("./CategoryForm-Dap-RjEt.js"),__vite__mapDeps([75,76,16,17,77])),"../views/bpm/category/index.vue":()=>qe(()=>import("./index-97lRpI6I.js"),__vite__mapDeps([78,79,80,81,82,83,47,48,11,77,76,16,17])),"../views/bpm/definition/index.vue":()=>qe(()=>import("./index-DIodGfFA.js"),__vite__mapDeps([84,16,17,83,47,48,79,80,11,85,68,69,7,8,86,41,42,19,87,88,89,90,91,70,92,93,94,81,82,95,96,21,97,98])),"../views/bpm/form/editor/index.vue":()=>qe(()=>import("./index-C4SO0Kfq.js"),__vite__mapDeps([99,16,17,83,47,48,70,86,98,15,100,101])),"../views/bpm/form/index.vue":()=>qe(()=>import("./index-CuLYrEPr.js"),__vite__mapDeps([102,16,17,79,80,81,82,83,47,48,11,86,98])),"../views/bpm/group/UserGroupForm.vue":()=>qe(()=>import("./UserGroupForm-CVKcJY4c.js"),__vite__mapDeps([103,104,16,17,70,91,90])),"../views/bpm/group/index.vue":()=>qe(()=>import("./index-I-u8UXfO.js"),__vite__mapDeps([105,79,80,81,82,83,47,48,11,91,90,104,16,17,70])),"../views/bpm/model/ModelForm.vue":()=>qe(()=>import("./ModelForm-_zTE2K7u.js"),__vite__mapDeps([106,107,16,17,108,86,77])),"../views/bpm/model/ModelImportForm.vue":()=>qe(()=>import("./ModelImportForm-Bmlfai10.js"),__vite__mapDeps([109,110,16,17])),"../views/bpm/model/editor/index.vue":()=>qe(()=>import("./index-hhUeFszk.js"),__vite__mapDeps([111,83,47,48,85,16,17,68,69,7,8,86,41,42,19,87,88,89,90,91,79,80,70,92,93,94,81,82,95,11,96,21,108,112])),"../views/bpm/model/index.vue":()=>qe(()=>import("./index-vvdfOLXR.js"),__vite__mapDeps([113,16,17,79,80,114,115,83,47,48,11,85,68,69,7,8,86,41,42,19,87,88,89,90,91,70,92,93,94,81,82,95,96,21,108,107,77,110,98])),"../views/bpm/oa/leave/create.vue":()=>qe(()=>import("./create-YDTdFbew.js"),__vite__mapDeps([116,47,48,117,15,97,90])),"../views/bpm/oa/leave/detail.vue":()=>qe(()=>import("./detail-D4luXcIi.js"),__vite__mapDeps([118,83,47,48,119,120,81,82,11,117])),"../views/bpm/oa/leave/index.vue":()=>qe(()=>import("./index-CAJBdJt5.js"),__vite__mapDeps([121,79,80,81,82,83,47,48,11,117,122])),"../views/bpm/processExpression/ProcessExpressionForm.vue":()=>qe(()=>import("./ProcessExpressionForm-C0si1nWr.js"),__vite__mapDeps([123,124,16,17,92,70])),"../views/bpm/processExpression/index.vue":()=>qe(()=>import("./index-BUi65MjA.js"),__vite__mapDeps([125,79,80,81,82,83,47,48,11,92,124,16,17,70])),"../views/bpm/processInstance/create/index.vue":()=>qe(()=>import("./index-CiJ6gEhw.js"),__vite__mapDeps([126,83,47,48,114,115,97,122,98,127,85,16,17,68,69,7,8,86,41,42,19,87,88,89,90,91,79,80,70,92,93,94,81,82,95,11,96,21,128,77,15,129])),"../views/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue":()=>qe(()=>import("./ProcessInstanceBpmnViewer-BCabhZMF.js"),__vite__mapDeps([130,127,47,48,85,16,17,68,69,7,8,86,41,42,19,87,88,89,90,91,83,79,80,70,92,93,94,81,82,95,11,96,21,128])),"../views/bpm/processInstance/detail/ProcessInstanceTaskList.vue":()=>qe(()=>import("./ProcessInstanceTaskList-BAXlq3-T.js"),__vite__mapDeps([131,132,16,17,133,134,47,48,81,82,11,135,93,94,136,137,98])),"../views/bpm/processInstance/detail/dialog/TaskDelegateForm.vue":()=>qe(()=>import("./TaskDelegateForm-DfEbXqRR.js"),__vite__mapDeps([138,139,16,17,137,90])),"../views/bpm/processInstance/detail/dialog/TaskReturnForm.vue":()=>qe(()=>import("./TaskReturnForm-C44r83kJ.js"),__vite__mapDeps([140,141,16,17,137])),"../views/bpm/processInstance/detail/dialog/TaskSignCreateForm.vue":()=>qe(()=>import("./TaskSignCreateForm-CTFYhv9M.js"),__vite__mapDeps([142,143,16,17,137,90])),"../views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue":()=>qe(()=>import("./TaskSignDeleteForm-Bqrfw94u.js"),__vite__mapDeps([144,136,16,17,137])),"../views/bpm/processInstance/detail/dialog/TaskSignList.vue":()=>qe(()=>import("./TaskSignList-BjpTApU7.js"),__vite__mapDeps([145,135,93,94,81,82,11,136,16,17,137])),"../views/bpm/processInstance/detail/dialog/TaskTransferForm.vue":()=>qe(()=>import("./TaskTransferForm-DB9nNZVa.js"),__vite__mapDeps([146,147,16,17,137,90])),"../views/bpm/processInstance/detail/index.vue":()=>qe(()=>import("./index-DQD4RNFA.js"),__vite__mapDeps([148,83,47,48,98,97,122,137,127,85,16,17,68,69,7,8,86,41,42,19,87,88,89,90,91,79,80,70,92,93,94,81,82,95,11,96,21,128,132,133,134,135,136,141,139,147,143])),"../views/bpm/processInstance/index.vue":()=>qe(()=>import("./index-DTO4W-Dl.js"),__vite__mapDeps([149,79,80,81,82,83,47,48,11,122,77,97])),"../views/bpm/processInstance/manager/index.vue":()=>qe(()=>import("./index-rza34a39.js"),__vite__mapDeps([150,79,80,81,82,83,47,48,11,122,77,90])),"../views/bpm/processListener/ProcessListenerForm.vue":()=>qe(()=>import("./ProcessListenerForm-CKzhloSV.js"),__vite__mapDeps([151,152,16,17,95,70])),"../views/bpm/processListener/index.vue":()=>qe(()=>import("./index-D-GqyCS0.js"),__vite__mapDeps([153,79,80,81,82,83,47,48,11,95,152,16,17,70])),"../views/bpm/simpleWorkflow/index.vue":()=>qe(()=>import("./index-8Av-n9mU.js"),__vite__mapDeps([154,155])),"../views/bpm/task/copy/index.vue":()=>qe(()=>import("./index-DhNrfIGz.js"),__vite__mapDeps([156,79,80,83,47,48,11,122])),"../views/bpm/task/done/index.vue":()=>qe(()=>import("./index-BP0jixUN.js"),__vite__mapDeps([157,79,80,81,82,83,47,48,11,137])),"../views/bpm/task/manager/index.vue":()=>qe(()=>import("./index-Du6jOj90.js"),__vite__mapDeps([158,79,80,81,82,83,47,48,11,137])),"../views/bpm/task/todo/index.vue":()=>qe(()=>import("./index-C9J_2f2c.js"),__vite__mapDeps([159,79,80,83,47,48,11,137])),"../views/data/channel/modbus/ModBusDeviceForm.vue":()=>qe(()=>import("./ModBusDeviceForm-Bdr5fm2X.js"),__vite__mapDeps([160,161,16,17])),"../views/data/channel/modbus/index.vue":()=>qe(()=>import("./index-cayQWHiR.js"),__vite__mapDeps([162,79,80,83,47,48,161,16,17])),"../views/data/job/ScheduleJobForm.vue":()=>qe(()=>import("./ScheduleJobForm-qWCds9nR.js"),__vite__mapDeps([163,164,16,17])),"../views/data/job/index.vue":()=>qe(()=>import("./index-TlhH24JX.js"),__vite__mapDeps([165,79,80,83,47,48,164,16,17])),"../views/demo/DemoForm.vue":()=>qe(()=>import("./DemoForm-DeYLW7Bx.js"),__vite__mapDeps([166,167,16,17,70])),"../views/demo/index.vue":()=>qe(()=>import("./index-D1B9ZO92.js"),__vite__mapDeps([168,79,80,83,47,48,11,169,167,16,17,70])),"../views/infra/apiAccessLog/ApiAccessLogDetail.vue":()=>qe(()=>import("./ApiAccessLogDetail-Ce-42Zwf.js"),__vite__mapDeps([170,171,16,17,119,120,81,82,11])),"../views/infra/apiAccessLog/index.vue":()=>qe(()=>import("./index-5Ca2gdiz.js"),__vite__mapDeps([172,79,80,81,82,83,47,48,169,11,171,16,17,119,120])),"../views/infra/apiErrorLog/ApiErrorLogDetail.vue":()=>qe(()=>import("./ApiErrorLogDetail-DBlutMU6.js"),__vite__mapDeps([173,174,16,17,119,120,81,82,11])),"../views/infra/apiErrorLog/index.vue":()=>qe(()=>import("./index-FNjJ7Ifl.js"),__vite__mapDeps([175,79,80,81,82,83,47,48,11,169,174,16,17,119,120,70])),"../views/infra/build/index.vue":()=>qe(()=>import("./index-C5cbiYhU.js"),__vite__mapDeps([176,16,17,83,47,48,100,101,177,178])),"../views/infra/codegen/EditTable.vue":()=>qe(()=>import("./EditTable-PVnEl7F7.js"),__vite__mapDeps([179,83,47,48,15,180,34,181,101,182,13,14,41,42,19,183,184,21])),"../views/infra/codegen/ImportTable.vue":()=>qe(()=>import("./ImportTable-Q_4XyVyA.js"),__vite__mapDeps([185,186,16,17,183,187])),"../views/infra/codegen/PreviewCode.vue":()=>qe(()=>import("./PreviewCode-C63Jj1wc.js"),__vite__mapDeps([188,189,16,17,47,48,19,183,177,178,190])),"../views/infra/codegen/components/BasicInfoForm.vue":()=>qe(()=>import("./BasicInfoForm-BujhGjNv.js"),__vite__mapDeps([191,180,34])),"../views/infra/codegen/components/ColumInfoForm.vue":()=>qe(()=>import("./ColumInfoForm-D-VPUIWa.js"),__vite__mapDeps([192,181,101])),"../views/infra/codegen/components/GenerateInfoForm.vue":()=>qe(()=>import("./GenerateInfoForm-BYU9x5XP.js"),__vite__mapDeps([193,182,13,14,41,42,19,183,184,34,21])),"../views/infra/codegen/index.vue":()=>qe(()=>import("./index-CjU98Foc.js"),__vite__mapDeps([194,79,80,83,47,48,11,169,183,187,186,16,17,189,19,177,178,190])),"../views/infra/config/ConfigForm.vue":()=>qe(()=>import("./ConfigForm-CcQy9uwF.js"),__vite__mapDeps([195,196,16,17,197])),"../views/infra/config/index.vue":()=>qe(()=>import("./index-B6-AS63z.js"),__vite__mapDeps([198,79,80,81,82,83,47,48,11,169,197,196,16,17])),"../views/infra/dataSourceConfig/DataSourceConfigForm.vue":()=>qe(()=>import("./DataSourceConfigForm-Cc3UO513.js"),__vite__mapDeps([199,200,16,17,187])),"../views/infra/dataSourceConfig/index.vue":()=>qe(()=>import("./index-CS--F4H0.js"),__vite__mapDeps([201,83,47,48,11,187,200,16,17])),"../views/infra/druid/index.vue":()=>qe(()=>import("./index-Ci_k-M0y.js"),__vite__mapDeps([202,83,47,48,203,197])),"../views/infra/file/FileForm.vue":()=>qe(()=>import("./FileForm-vdWktgSq.js"),__vite__mapDeps([204,205,16,17])),"../views/infra/file/index.vue":()=>qe(()=>import("./index-DZOqyKkh.js"),__vite__mapDeps([206,79,80,114,115,83,47,48,11,205,16,17])),"../views/infra/fileConfig/FileConfigForm.vue":()=>qe(()=>import("./FileConfigForm-BTauTe0f.js"),__vite__mapDeps([207,208,16,17])),"../views/infra/fileConfig/index.vue":()=>qe(()=>import("./index-DhdwKmIZ.js"),__vite__mapDeps([209,79,80,81,82,83,47,48,208,16,17,11])),"../views/infra/job/JobDetail.vue":()=>qe(()=>import("./JobDetail-bxPwHyhP.js"),__vite__mapDeps([210,211,16,17,119,120,133,134,81,82,11,212])),"../views/infra/job/JobForm.vue":()=>qe(()=>import("./JobForm-CP4qQl-3.js"),__vite__mapDeps([213,214,16,17,212,215])),"../views/infra/job/index.vue":()=>qe(()=>import("./index-Bp3JsZ7W.js"),__vite__mapDeps([216,79,80,13,14,81,82,83,47,48,217,214,16,17,212,215,211,119,120,133,134,11,169,70,21])),"../views/infra/job/logger/JobLogDetail.vue":()=>qe(()=>import("./JobLogDetail-BrFH-XZw.js"),__vite__mapDeps([218,219,16,17,119,120,81,82,11])),"../views/infra/job/logger/index.vue":()=>qe(()=>import("./index-Bi1gRqfn.js"),__vite__mapDeps([220,79,80,81,82,83,47,48,11,169,219,16,17,119,120])),"../views/infra/redis/index.vue":()=>qe(()=>import("./index-wEL30NBu.js"),__vite__mapDeps([221,222,47,48,119,120])),"../views/infra/server/index.vue":()=>qe(()=>import("./index-dGATVPtG.js"),__vite__mapDeps([223,83,47,48,203,197])),"../views/infra/skywalking/index.vue":()=>qe(()=>import("./index-CGucII1E.js"),__vite__mapDeps([224,83,47,48,203,197])),"../views/infra/storage/index_rec.vue":()=>qe(()=>import("./index_rec-CHIgIcZf.js"),__vite__mapDeps([225,47,48,222])),"../views/infra/swagger/index.vue":()=>qe(()=>import("./index-JP535Zng.js"),__vite__mapDeps([226,83,47,48,203,197])),"../views/infra/webSocket/index.vue":()=>qe(()=>import("./index-9PZasrrd.js"),__vite__mapDeps([227,47,48,11,90])),"../views/report/goview/index.vue":()=>qe(()=>import("./index--F_kuFHY.js"),__vite__mapDeps([228,83,47,48,203])),"../views/report/jmreport/index.vue":()=>qe(()=>import("./index-C-vYbcvV.js"),__vite__mapDeps([229,83,47,48,203])),"../views/system/app/AppForm.vue":()=>qe(()=>import("./AppForm-BjUegUCd.js"),__vite__mapDeps([230,231,16,17,5,70,232,233])),"../views/system/app/index.vue":()=>qe(()=>import("./index-Cw4tru0C.js"),__vite__mapDeps([234,79,80,81,82,83,47,48,11,169,5,231,16,17,70,232,233])),"../views/system/appgroup/AppGroupForm.vue":()=>qe(()=>import("./AppGroupForm-D7PyvT_H.js"),__vite__mapDeps([235,236,16,17,233])),"../views/system/appgroup/index.vue":()=>qe(()=>import("./index-CXr9GbPn.js"),__vite__mapDeps([237,79,80,83,47,48,11,233,236,16,17])),"../views/system/appmenu/AppMenuForm.vue":()=>qe(()=>import("./AppMenuForm-CzSPXAxX.js"),__vite__mapDeps([238,239,16,17,240,80,41,42,184,70,19])),"../views/system/appmenu/index.vue":()=>qe(()=>import("./index-BEzAzG9Z.js"),__vite__mapDeps([241,81,82,83,47,48,19,184,239,16,17,240,80,41,42,70])),"../views/system/area/AreaForm.vue":()=>qe(()=>import("./AreaForm-B-ZrMlwU.js"),__vite__mapDeps([242,243,16,17])),"../views/system/area/index.vue":()=>qe(()=>import("./index-CcrUXSJq.js"),__vite__mapDeps([244,39,40,83,47,48,243,16,17,245])),"../views/system/dept/DeptForm.vue":()=>qe(()=>import("./DeptForm-JDfZ5LXs.js"),__vite__mapDeps([246,247,16,17,41,42,19,88,90,70])),"../views/system/dept/index.vue":()=>qe(()=>import("./index-ClFq84Dt.js"),__vite__mapDeps([248,81,82,83,47,48,11,19,88,247,16,17,41,42,90,70])),"../views/system/dict/DictTypeForm.vue":()=>qe(()=>import("./DictTypeForm-Cy99RhwM.js"),__vite__mapDeps([249,250,16,17,101,70])),"../views/system/dict/data/DictDataForm.vue":()=>qe(()=>import("./DictDataForm-ClnzEbt5.js"),__vite__mapDeps([251,252,16,17,70])),"../views/system/dict/data/index.vue":()=>qe(()=>import("./index-D_26zh9S.js"),__vite__mapDeps([253,79,80,81,82,83,47,48,11,169,101,252,16,17,70])),"../views/system/dict/index.vue":()=>qe(()=>import("./index-BK6Fgvl7.js"),__vite__mapDeps([254,79,80,81,82,83,47,48,11,101,250,16,17,70,169])),"../views/system/loginlog/LoginLogDetail.vue":()=>qe(()=>import("./LoginLogDetail-DPwXgsGH.js"),__vite__mapDeps([255,256,16,17,119,120,81,82,11])),"../views/system/loginlog/index.vue":()=>qe(()=>import("./index-CFtJXhGu.js"),__vite__mapDeps([257,79,80,81,82,83,47,48,11,169,256,16,17,119,120])),"../views/system/mail/account/MailAccountDetail.vue":()=>qe(()=>import("./MailAccountDetail-D7EyLrUT.js"),__vite__mapDeps([258,259,16,17,260,119,120,81,82,261,262,19,263,11,34])),"../views/system/mail/account/MailAccountForm.vue":()=>qe(()=>import("./MailAccountForm-BpWCS-fR.js"),__vite__mapDeps([264,265,16,17,56,38,39,40,41,42,43,44,45,262,19,81,82,263,11,34])),"../views/system/mail/account/index.vue":()=>qe(()=>import("./index-Bvzmwz0j.js"),__vite__mapDeps([266,267,38,39,40,41,42,43,44,45,80,56,57,169,268,83,47,48,263,11,34,262,19,81,82,265,16,17,259,260,119,120,261])),"../views/system/mail/log/MailLogDetail.vue":()=>qe(()=>import("./MailLogDetail-DVEturGS.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([269,270,16,17,260,119,120,81,82,261,11,262,19])),"../views/system/mail/log/index.vue":()=>qe(()=>import("./index--7wnyo3e.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([271,267,38,39,40,41,42,43,44,45,80,56,57,169,268,83,47,48,270,16,17,260,119,120,81,82,261,11,262,19])),"../views/system/mail/template/MailTemplateForm.vue":()=>qe(()=>import("./MailTemplateForm-DxfUXL4x.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([272,273,16,17,56,38,39,40,41,42,43,44,45,274,11,262,19,81,82,34])),"../views/system/mail/template/MailTemplateSendForm.vue":()=>qe(()=>import("./MailTemplateSendForm-CzFuNq6T.js"),__vite__mapDeps([275,276,16,17,274])),"../views/system/mail/template/index.vue":()=>qe(()=>import("./index-CFWheoIY.js").then(async e=>(await e.__tla,e)),__vite__mapDeps([277,267,38,39,40,41,42,43,44,45,80,56,57,169,268,83,47,48,273,16,17,274,11,262,19,81,82,34,276])),"../views/system/menu/MenuForm.vue":()=>qe(()=>import("./MenuForm-5PeXOZ0h.js"),__vite__mapDeps([278,279,16,17,240,80,41,42,184,70,19])),"../views/system/menu/index.vue":()=>qe(()=>import("./index-DpGFnJCN.js"),__vite__mapDeps([280,81,82,83,47,48,19,184,279,16,17,240,80,41,42,70])),"../views/system/notice/NoticeForm.vue":()=>qe(()=>import("./NoticeForm-Bc6Jj63Q.js"),__vite__mapDeps([281,282,16,17,70])),"../views/system/notice/index.vue":()=>qe(()=>import("./index--BL1Tj1G.js"),__vite__mapDeps([283,79,80,81,82,83,47,48,11,282,16,17,70])),"../views/system/notify/message/NotifyMessageDetail.vue":()=>qe(()=>import("./NotifyMessageDetail-BHrMdrGO.js"),__vite__mapDeps([284,285,16,17,119,120,81,82,11])),"../views/system/notify/message/index.vue":()=>qe(()=>import("./index-CRpGGJIy.js"),__vite__mapDeps([286,79,80,81,82,83,47,48,11,12,285,16,17,119,120])),"../views/system/notify/my/MyNotifyMessageDetail.vue":()=>qe(()=>import("./MyNotifyMessageDetail-B8WGLlXB.js"),__vite__mapDeps([287,288,16,17,119,120,81,82,11])),"../views/system/notify/my/index.vue":()=>qe(()=>import("./index-Ds3WEynp.js"),__vite__mapDeps([289,79,80,81,82,83,47,48,11,12,288,16,17,119,120])),"../views/system/notify/template/NotifyTemplateForm.vue":()=>qe(()=>import("./NotifyTemplateForm-DQ3VwKU3.js"),__vite__mapDeps([290,291,16,17,292,70])),"../views/system/notify/template/NotifyTemplateSendForm.vue":()=>qe(()=>import("./NotifyTemplateSendForm-gytSnt5S.js"),__vite__mapDeps([293,294,16,17,90,292])),"../views/system/notify/template/index.vue":()=>qe(()=>import("./index-BO-PBizS.js"),__vite__mapDeps([295,79,80,81,82,83,47,48,11,292,291,16,17,70,294,90])),"../views/system/oauth2/client/ClientForm.vue":()=>qe(()=>import("./ClientForm-CQIXgd22.js"),__vite__mapDeps([296,297,16,17,70])),"../views/system/oauth2/client/index.vue":()=>qe(()=>import("./index-CZ0FAmsS.js"),__vite__mapDeps([298,79,80,81,82,83,47,48,11,297,16,17,70])),"../views/system/oauth2/token/index.vue":()=>qe(()=>import("./index-BlGrx8zO.js"),__vite__mapDeps([299,79,80,81,82,83,47,48,11])),"../views/system/operatelog/OperateLogDetail.vue":()=>qe(()=>import("./OperateLogDetail-C9fTkDkI.js"),__vite__mapDeps([300,301,16,17,119,120,11])),"../views/system/operatelog/index.vue":()=>qe(()=>import("./index-Cn7uhldH.js"),__vite__mapDeps([302,79,80,83,47,48,11,169,301,16,17,119,120,90])),"../views/system/post/PostForm.vue":()=>qe(()=>import("./PostForm-DAtTERGI.js"),__vite__mapDeps([303,304,16,17,70,89])),"../views/system/post/index.vue":()=>qe(()=>import("./index-BkadTgAv.js"),__vite__mapDeps([305,79,80,81,82,83,47,48,11,169,89,304,16,17,70])),"../views/system/role/RoleAssignMenuForm.vue":()=>qe(()=>import("./RoleAssignMenuForm-DCm5byhF.js"),__vite__mapDeps([306,16,17,47,48,19,184,307,308])),"../views/system/role/RoleDataPermissionForm.vue":()=>qe(()=>import("./RoleDataPermissionForm-CnHp3M8L.js"),__vite__mapDeps([309,310,16,17,47,48,19,70,88,307])),"../views/system/role/RoleForm.vue":()=>qe(()=>import("./RoleForm-Cy5sLDMY.js"),__vite__mapDeps([311,312,16,17,70,87])),"../views/system/role/index.vue":()=>qe(()=>import("./index-vYfiymmM.js"),__vite__mapDeps([313,79,80,81,82,83,47,48,11,169,87,312,16,17,70,306,19,184,307,308,310,88])),"../views/system/sms/channel/SmsChannelForm.vue":()=>qe(()=>import("./SmsChannelForm-ZZ6ETlc9.js"),__vite__mapDeps([314,315,16,17,316,70])),"../views/system/sms/channel/index.vue":()=>qe(()=>import("./index-BceOdX1M.js"),__vite__mapDeps([317,79,80,81,82,83,47,48,11,316,315,16,17,70])),"../views/system/sms/log/SmsLogDetail.vue":()=>qe(()=>import("./SmsLogDetail-wgR5LTbI.js"),__vite__mapDeps([318,319,16,17,119,120,81,82,11,316])),"../views/system/sms/log/index.vue":()=>qe(()=>import("./index-Dw-KWMro.js"),__vite__mapDeps([320,79,80,81,82,83,47,48,11,169,316,319,16,17,119,120])),"../views/system/sms/template/SmsTemplateForm.vue":()=>qe(()=>import("./SmsTemplateForm-DXCZAlzx.js"),__vite__mapDeps([321,322,16,17,323,316,70])),"../views/system/sms/template/SmsTemplateSendForm.vue":()=>qe(()=>import("./SmsTemplateSendForm-kdOnxoKf.js"),__vite__mapDeps([324,325,16,17,323])),"../views/system/sms/template/index.vue":()=>qe(()=>import("./index-C7ONju3p.js"),__vite__mapDeps([326,79,80,81,82,83,47,48,11,323,316,169,322,16,17,70,325])),"../views/system/social/client/SocialClientForm.vue":()=>qe(()=>import("./SocialClientForm-6W-mO7_N.js"),__vite__mapDeps([327,328,16,17])),"../views/system/social/client/index.vue":()=>qe(()=>import("./index-D2nMxQrn.js"),__vite__mapDeps([329,79,80,81,82,83,47,48,11,328,16,17])),"../views/system/social/user/SocialUserDetail.vue":()=>qe(()=>import("./SocialUserDetail-BKVRMSso.js"),__vite__mapDeps([330,331,16,17,119,120,114,115,81,82])),"../views/system/social/user/index.vue":()=>qe(()=>import("./index-Df3SSbk6.js"),__vite__mapDeps([332,79,80,114,115,81,82,83,47,48,11,331,16,17,119,120])),"../views/system/tenant/TenantForm.vue":()=>qe(()=>import("./TenantForm-BJTYSfTQ.js"),__vite__mapDeps([333,334,16,17,232,70,335,187])),"../views/system/tenant/index.vue":()=>qe(()=>import("./index-B9gBYVdL.js"),__vite__mapDeps([336,79,80,81,82,83,47,48,11,169,232,335,334,16,17,70,187])),"../views/system/tenantPackage/TenantPackageForm.vue":()=>qe(()=>import("./TenantPackageForm-C6XNQn_6.js"),__vite__mapDeps([337,16,17,47,48,70,19,335,184,338])),"../views/system/tenantPackage/index.vue":()=>qe(()=>import("./index-CdBBzK-d.js"),__vite__mapDeps([339,79,80,81,82,83,47,48,11,335,337,16,17,70,19,184,338])),"../views/system/user/DeptTree.vue":()=>qe(()=>import("./DeptTree-_PYgjqJ9.js"),__vite__mapDeps([340,341,88,19])),"../views/system/user/UserAssignRoleForm.vue":()=>qe(()=>import("./UserAssignRoleForm-DbuijVRv.js"),__vite__mapDeps([342,343,16,17,307,87])),"../views/system/user/UserForm.vue":()=>qe(()=>import("./UserForm-BC4rWABp.js"),__vite__mapDeps([344,345,16,17,41,42,70,19,89,88,90])),"../views/system/user/UserImportForm.vue":()=>qe(()=>import("./UserImportForm-Cdv4dJce.js"),__vite__mapDeps([346,347,16,17,90,169])),"../views/system/user/index.vue":()=>qe(()=>import("./index-BEJHajxs.js"),__vite__mapDeps([348,79,80,13,14,83,47,48,217,11,169,70,90,345,16,17,41,42,19,89,88,347,343,307,87,341,21]))}),HDe=e=>{for(const t in Zg)if(t.includes(e))return Uee(Zg[t])},$u=()=>qe(()=>import("./Layout-CQGQ8vsG.js"),__vite__mapDeps([349,93,94,82,27,28,29,19,15,13,14,25,6,7,8,9,10,11,12,16,17,18,20,21,22,350])),uOe=e=>{if(!e)return e;const{matched:t,...n}=e;return{...n,matched:t?t.map(r=>({meta:r.meta,name:r.name,path:r.path})):void 0}},AL=e=>{const t=[],n=Object.keys(Zg);for(const r of e){const o={title:r.name,icon:r.icon,hidden:!r.visible,noCache:!r.keepAlive,alwaysShow:r.children&&r.children.length===1&&(r.alwaysShow===void 0||r.alwaysShow)};if(r.component&&r.component.indexOf("?")>-1){const a=r.component.split("?")[1];r.component=r.component.split("?")[0],o.query=Tw.parse(a)}let i={path:r.path.indexOf("?")>-1?r.path.split("?")[0]:r.path,name:r.componentName&&r.componentName.length>0?r.componentName:M_(r.path),redirect:r.redirect,meta:o};if(!r.children&&r.parentId==0&&r.component){i.component=$u,i.meta={},i.name=M_(r.path)+"Parent",i.redirect="",o.alwaysShow=!0;const a={path:"",name:r.componentName&&r.componentName.length>0?r.componentName:M_(r.path),redirect:r.redirect,meta:o},l=r!=null&&r.component?n.findIndex(s=>s.includes(r.component)):n.findIndex(s=>s.includes(r.path));a.component=Zg[n[l]],i.children=[a]}else{if(r.children)i.component=$u,i.redirect=wL(r.path,r.children);else if(YO(r.path))i={path:"/external-link",component:$u,meta:{name:r.name},children:[i]};else{const a=r!=null&&r.component?n.findIndex(l=>l.includes(r.component)):n.findIndex(l=>l.includes(r.path));i.component=Zg[n[a]]}r.children&&(i.children=AL(r.children))}t.push(i)}return t},wL=(e,t)=>{if(!t||t.length==0)return e;const n=H0e(e,t[0].path);return t[0].children?wL(n,t[0].children):void 0},H0e=(e,t)=>(e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")||(t="/"+t),e+t),pOe=(e,t)=>YO(t)?t:`${e}${t.startsWith("/")||!t?t:`/${t}`}`.replace(/\/\//g,"/"),$0e=e=>{var r,o;if(!e||!Reflect.has(e,"children")||!((r=e.children)!=null&&r.length))return!1;const t=e.children;let n=!1;for(let i=0;i<t.length;i++)if((o=t[i].children)!=null&&o.length){n=!0;break}return n},U0e=e=>{var o;let t=z0e({routes:[e],history:((n=location.host?n||location.pathname+location.search:"").includes("#")||(n+="#"),E0e(n))});var n;const r=t.getRoutes();xL(r,e.children||[],e),t=null,e.children=(o=e.children)==null?void 0:o.map(i=>SIe(i,"children"))},xL=(e,t,n)=>{var r,o;for(let i=0;i<t.length;i++){const a=t[i],l=e.find(s=>s.name===a.name);l&&(n.children=n.children||[],n.children.find(s=>s.name===l.name)||((r=n.children)==null||r.push(l)),(o=a.children)!=null&&o.length&&xL(e,a.children,n))}},M_=(e,t)=>((e=(e||"").replace(/-(.)/g,function(n){return n.toUpperCase()}).replaceAll("-",""))&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e),_L=(e,t)=>t,hc=e=>{if(!Nw)return{t:r=>_L(0,r)};const{t,...n}=Nw.global;return{...n,t:(r,...o)=>r?r.includes(".")||e?t(_L(0,r),...o):r:""}},{t:e2}=hc(),EL=[{path:"/redirect",component:$u,name:"Redirect",children:[{path:"/redirect/:path(.*)",name:"Redirect",component:()=>qe(()=>import("./Redirect-BoUzsAg_.js"),__vite__mapDeps([])),meta:{}}],meta:{hidden:!0,noTagsView:!0}},{path:"/home2",component:()=>qe(()=>import("./Index2-BrXgvzlQ.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),name:"Home2",meta:{hidden:!0,noTagsView:!0}},{path:"/",component:$u,name:"Home",meta:{hidden:!0,noTagsView:!0},children:[{path:"index",component:()=>qe(()=>import("./Index-D80BL6lE.js"),__vite__mapDeps([])),name:"Index",meta:{title:e2("router.home"),icon:"ep:home-filled",noCache:!1,affix:!0}}]},{path:"/user",component:$u,name:"UserInfo",meta:{hidden:!0},children:[{path:"profile",component:()=>qe(()=>import("./Index-C58mdRyU.js"),__vite__mapDeps([59,47,48,60,7,8,56,38,39,40,41,42,43,44,45,61,62,11,63,9,10,16,17,64,65,66,67,68,69,70,71])),name:"Profile",meta:{canTo:!0,hidden:!0,noTagsView:!1,icon:"ep:user",title:e2("common.profile")}},{path:"notify-message",component:()=>qe(()=>import("./index-Ds3WEynp.js"),__vite__mapDeps([289,79,80,81,82,83,47,48,11,12,288,16,17,119,120])),name:"MyNotifyMessage",meta:{canTo:!0,hidden:!0,noTagsView:!1,icon:"ep:message",title:"\u6211\u7684\u7AD9\u5185\u4FE1"}}]},{path:"/dict",component:$u,name:"dict",meta:{hidden:!0},children:[{path:"type/data/:dictType",component:()=>qe(()=>import("./index-D_26zh9S.js"),__vite__mapDeps([253,79,80,81,82,83,47,48,11,169,101,252,16,17,70])),name:"SystemDictData",meta:{title:"\u5B57\u5178\u6570\u636E",noCache:!0,hidden:!0,canTo:!0,icon:"",activeMenu:"/system/dict"}}]},{path:"/codegen",component:$u,name:"CodegenEdit",meta:{hidden:!0},children:[{path:"edit",component:()=>qe(()=>import("./EditTable-PVnEl7F7.js"),__vite__mapDeps([179,83,47,48,15,180,34,181,101,182,13,14,41,42,19,183,184,21])),name:"InfraCodegenEditTable",meta:{noCache:!0,hidden:!0,canTo:!0,icon:"ep:edit",title:"\u4FEE\u6539\u751F\u6210\u914D\u7F6E",activeMenu:"infra/codegen/index"}}]},{path:"/job",component:$u,name:"JobL",meta:{hidden:!0},children:[{path:"job-log",component:()=>qe(()=>import("./index-Bi1gRqfn.js"),__vite__mapDeps([220,79,80,81,82,83,47,48,11,169,219,16,17,119,120])),name:"InfraJobLog",meta:{noCache:!0,hidden:!0,canTo:!0,icon:"ep:edit",title:"\u8C03\u5EA6\u65E5\u5FD7",activeMenu:"infra/job/index"}}]},{path:"/login",component:()=>qe(()=>import("./Login-eIV7ELhl.js"),__vite__mapDeps([24,25,26,27,28,29,20,13,14,21,30,31,32,7,8,33,34,35,36,37,38,39,40,41,42,43,44,45,18,46,47,48,49,50])),name:"Login",meta:{hidden:!0,title:e2("router.login"),noTagsView:!0}},{path:"/sso",component:()=>qe(()=>import("./Login-eIV7ELhl.js"),__vite__mapDeps([24,25,26,27,28,29,20,13,14,21,30,31,32,7,8,33,34,35,36,37,38,39,40,41,42,43,44,45,18,46,47,48,49,50])),name:"SSOLogin",meta:{hidden:!0,title:e2("router.login"),noTagsView:!0}},{path:"/social-login",component:()=>qe(()=>import("./SocialLogin-BnFjod1I.js"),__vite__mapDeps([51,31,32,7,8,25,26,28,27,29,20,13,14,21,33,34,52])),name:"SocialLogin",meta:{hidden:!0,title:e2("router.socialLogin"),noTagsView:!0}},{path:"/403",component:()=>qe(()=>import("./403-C3njrW1B.js"),__vite__mapDeps([0,1])),name:"NoAccess",meta:{hidden:!0,title:"403",noTagsView:!0}},{path:"/404",component:()=>qe(()=>import("./404-Df4057FR.js"),__vite__mapDeps([2,1])),name:"NoFound",meta:{hidden:!0,title:"404",noTagsView:!0}},{path:"/500",component:()=>qe(()=>import("./500-BeG3Ja1t.js"),__vite__mapDeps([3,1])),name:"Error",meta:{hidden:!0,title:"500",noTagsView:!0}},{path:"/bpm",component:$u,name:"bpm",meta:{hidden:!0},children:[{path:"manager/form/edit",component:()=>qe(()=>import("./index-C4SO0Kfq.js"),__vite__mapDeps([99,16,17,83,47,48,70,86,98,15,100,101])),name:"BpmFormEditor",meta:{noCache:!0,hidden:!0,canTo:!0,title:"\u8BBE\u8BA1\u6D41\u7A0B\u8868\u5355",activeMenu:"/bpm/manager/form"}},{path:"manager/model/edit",component:()=>qe(()=>import("./index-hhUeFszk.js"),__vite__mapDeps([111,83,47,48,85,16,17,68,69,7,8,86,41,42,19,87,88,89,90,91,79,80,70,92,93,94,81,82,95,11,96,21,108,112])),name:"BpmModelEditor",meta:{noCache:!0,hidden:!0,canTo:!0,title:"\u8BBE\u8BA1\u6D41\u7A0B",activeMenu:"/bpm/manager/model"}},{path:"manager/simple/workflow/model/edit",component:()=>qe(()=>import("./index-8Av-n9mU.js"),__vite__mapDeps([154,155])),name:"SimpleWorkflowDesignEditor",meta:{noCache:!0,hidden:!0,canTo:!0,title:"\u4EFF\u9489\u9489\u8BBE\u8BA1\u6D41\u7A0B",activeMenu:"/bpm/manager/model"}},{path:"manager/definition",component:()=>qe(()=>import("./index-DIodGfFA.js"),__vite__mapDeps([84,16,17,83,47,48,79,80,11,85,68,69,7,8,86,41,42,19,87,88,89,90,91,70,92,93,94,81,82,95,96,21,97,98])),name:"BpmProcessDefinition",meta:{noCache:!0,hidden:!0,canTo:!0,title:"\u6D41\u7A0B\u5B9A\u4E49",activeMenu:"/bpm/manager/model"}},{path:"process-instance/detail",component:()=>qe(()=>import("./index-DQD4RNFA.js"),__vite__mapDeps([148,83,47,48,98,97,122,137,127,85,16,17,68,69,7,8,86,41,42,19,87,88,89,90,91,79,80,70,92,93,94,81,82,95,11,96,21,128,132,133,134,135,136,141,139,147,143])),name:"BpmProcessInstanceDetail",meta:{noCache:!0,hidden:!0,canTo:!0,title:"\u6D41\u7A0B\u8BE6\u60C5",activeMenu:"/bpm/task/my"}},{path:"oa/leave/create",component:()=>qe(()=>import("./create-YDTdFbew.js"),__vite__mapDeps([116,47,48,117,15,97,90])),name:"OALeaveCreate",meta:{noCache:!0,hidden:!0,canTo:!0,title:"\u53D1\u8D77 OA \u8BF7\u5047",activeMenu:"/bpm/oa/leave"}},{path:"oa/leave/detail",component:()=>qe(()=>import("./detail-D4luXcIi.js"),__vite__mapDeps([118,83,47,48,119,120,81,82,11,117])),name:"OALeaveDetail",meta:{noCache:!0,hidden:!0,canTo:!0,title:"\u67E5\u770B OA \u8BF7\u5047",activeMenu:"/bpm/oa/leave"}}]}],vc=z0e({history:E0e(),strict:!0,routes:EL,scrollBehavior:()=>({left:0,top:0})}),{result_code:W0e,base_url:CL,request_timeout:G0e}=nL,q0e=["\u65E0\u6548\u7684\u5237\u65B0\u4EE4\u724C","\u5237\u65B0\u4EE4\u724C\u5DF2\u8FC7\u671F"],t2={show:!1};let K4=[],SL=!1;const xXe=["/login","/refresh-token"],Y4=Vo.create({baseURL:CL,timeout:G0e,withCredentials:!1});Y4.interceptors.request.use(e=>{var o,i;let t=(e.headers||{}).isToken===!1;xXe.some(a=>{if(e.url)return e.url.indexOf(a),t=!1}),Cd()&&!t&&(e.headers.Authorization="Bearer "+Cd());{const a=_3();a&&(e.headers["tenant-id"]=a)}const n=e.params||{},r=e.data||!1;if(((o=e.method)==null?void 0:o.toUpperCase())==="POST"&&e.headers["Content-Type"]==="application/x-www-form-urlencoded"&&(e.data=Tw.stringify(r)),((i=e.method)==null?void 0:i.toUpperCase())==="GET"&&n){e.params={};const a=Tw.stringify(n,{allowDots:!0});a&&(e.url=e.url+"?"+a)}return e},e=>(console.log(e),Promise.reject(e))),Y4.interceptors.response.use(async e=>{let{data:t}=e;const n=e.config;if(!t)throw new Error;const{t:r}=hc();if(e.request.responseType==="blob"||e.request.responseType==="arraybuffer"){if(e.data.type!=="application/json")return e.data;t=await new Response(e.data).json()}const o=t.code||W0e,i=t.msg||cL[o]||cL.default;if(q0e.indexOf(i)!==-1)return Promise.reject(i);if(o!==401)return o===500?(El.error(r("sys.api.errMsg500")),Promise.reject(new Error(i))):o===901?(El.error({offset:300,dangerouslyUseHTMLString:!0,message:"<div>"+r("sys.api.errMsg901")+"</div><div> </div><div>\u53C2\u8003 https://xxxx/ \u6559\u7A0B</div><div> </div><div>5 \u5206\u949F\u642D\u5EFA\u672C\u5730\u73AF\u5883</div>"}),Promise.reject(new Error(i))):o!==200?i==="\u65E0\u6548\u7684\u5237\u65B0\u4EE4\u724C"?(console.log(i),N_()):($d.error({title:i}),Promise.reject("error")):t;if(SL)return new Promise(a=>{K4.push(()=>{n.headers.Authorization="Bearer "+Cd(),a(Y4(n))})});if(SL=!0,!XO())return N_();try{const a=await K0e();return mQ((await a).data.data),n.headers.Authorization="Bearer "+Cd(),K4.forEach(l=>{l()}),K4=[],Y4(n)}catch{return K4.forEach(l=>{l()}),N_()}finally{K4=[],SL=!1}},e=>{console.log("err"+e);let{message:t}=e;const{t:n}=hc();return t==="Network Error"?t=n("sys.api.errorMessage"):t.includes("timeout")?t=n("sys.api.apiTimeoutMessage"):t.includes("Request failed with status code")&&(t=n("sys.api.apiRequestFailed")+t.substr(t.length-3)),El.error(t),Promise.reject(e)});let K0e,N_,Y0e,kp;K0e=async()=>(Vo.defaults.headers.common["tenant-id"]=_3(),await Vo.post(CL+"/system/auth/refresh-token?refreshToken="+XO())),N_=()=>{const{t:e}=hc();if(!t2.show){if(window.location.href.includes("login?redirect="))return;t2.show=!0,gc.confirm(e("sys.api.timeoutMessage"),e("common.confirmTitle"),{showCancelButton:!1,closeOnClickModal:!1,showClose:!1,confirmButtonText:e("login.relogin"),type:"warning"}).then(()=>{(()=>{const t=["Redirect","Login","NoFind","Root"];vc.getRoutes().forEach(n=>{const{name:r}=n;r&&!t.includes(r)&&vc.hasRoute(r)&&vc.removeRoute(r)})})(),DO(),uL(),t2.show=!1,window.location.href=window.location.href})}return Promise.reject(e("sys.api.timeoutMessage"))},{default_headers:Y0e}=nL,kp=e=>{const{url:t,method:n,params:r,data:o,headersType:i,responseType:a,...l}=e;return Y4({url:t,method:n,params:r,data:o,...l,responseType:a,headers:{"Content-Type":i||Y0e}})},No={get:async e=>(await kp({method:"GET",...e})).data,post:async e=>(await kp({method:"POST",...e})).data,postOriginal:async e=>await kp({method:"POST",...e}),delete:async e=>(await kp({method:"DELETE",...e})).data,put:async e=>(await kp({method:"PUT",...e})).data,download:async e=>await kp({method:"GET",responseType:"blob",...e}),upload:async e=>(e.headersType="multipart/form-data",await kp({method:"POST",...e}))},kOe=e=>No.get({url:"/infra/file/page",params:e}),DOe=e=>No.delete({url:"/infra/file/delete?id="+e});var X0e={exports:{}},Q0e,J0e={exports:{}};function kr(){return Q0e||(Q0e=1,J0e.exports=function(){var e=e||function(t,n){var r;if(typeof window<"u"&&window.crypto&&(r=window.crypto),typeof self<"u"&&self.crypto&&(r=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<"u"&&window.msCrypto&&(r=window.msCrypto),!r&&_m!==void 0&&_m.crypto&&(r=_m.crypto),!r)try{r=Dhe}catch{}var o=function(){if(r){if(typeof r.getRandomValues=="function")try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes=="function")try{return r.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function g(){}return function(b){var y;return g.prototype=b,y=new g,g.prototype=null,y}}(),a={},l=a.lib={},s=l.Base={extend:function(g){var b=i(this);return g&&b.mixIn(g),b.hasOwnProperty("init")&&this.init!==b.init||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var b in g)g.hasOwnProperty(b)&&(this[b]=g[b]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}},u=l.WordArray=s.extend({init:function(g,b){g=this.words=g||[],this.sigBytes=b!=n?b:4*g.length},toString:function(g){return(g||d).stringify(this)},concat:function(g){var b=this.words,y=g.words,w=this.sigBytes,x=g.sigBytes;if(this.clamp(),w%4)for(var _=0;_<x;_++){var E=y[_>>>2]>>>24-_%4*8&255;b[w+_>>>2]|=E<<24-(w+_)%4*8}else for(var C=0;C<x;C+=4)b[w+C>>>2]=y[C>>>2];return this.sigBytes+=x,this},clamp:function(){var g=this.words,b=this.sigBytes;g[b>>>2]&=4294967295<<32-b%4*8,g.length=t.ceil(b/4)},clone:function(){var g=s.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var b=[],y=0;y<g;y+=4)b.push(o());return new u.init(b,g)}}),c=a.enc={},d=c.Hex={stringify:function(g){for(var b=g.words,y=g.sigBytes,w=[],x=0;x<y;x++){var _=b[x>>>2]>>>24-x%4*8&255;w.push((_>>>4).toString(16)),w.push((15&_).toString(16))}return w.join("")},parse:function(g){for(var b=g.length,y=[],w=0;w<b;w+=2)y[w>>>3]|=parseInt(g.substr(w,2),16)<<24-w%8*4;return new u.init(y,b/2)}},f=c.Latin1={stringify:function(g){for(var b=g.words,y=g.sigBytes,w=[],x=0;x<y;x++){var _=b[x>>>2]>>>24-x%4*8&255;w.push(String.fromCharCode(_))}return w.join("")},parse:function(g){for(var b=g.length,y=[],w=0;w<b;w++)y[w>>>2]|=(255&g.charCodeAt(w))<<24-w%4*8;return new u.init(y,b)}},p=c.Utf8={stringify:function(g){try{return decodeURIComponent(escape(f.stringify(g)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(g){return f.parse(unescape(encodeURIComponent(g)))}},m=l.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=p.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var b,y=this._data,w=y.words,x=y.sigBytes,_=this.blockSize,E=x/(4*_),C=(E=g?t.ceil(E):t.max((0|E)-this._minBufferSize,0))*_,T=t.min(4*C,x);if(C){for(var k=0;k<C;k+=_)this._doProcessBlock(w,k);b=w.splice(0,C),y.sigBytes-=T}return new u.init(b,T)},clone:function(){var g=s.clone.call(this);return g._data=this._data.clone(),g},_minBufferSize:0});l.Hasher=m.extend({cfg:s.extend(),init:function(g){this.cfg=this.cfg.extend(g),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(g){return this._append(g),this._process(),this},finalize:function(g){return g&&this._append(g),this._doFinalize()},blockSize:16,_createHelper:function(g){return function(b,y){return new g.init(y).finalize(b)}},_createHmacHelper:function(g){return function(b,y){return new v.HMAC.init(g,y).finalize(b)}}});var v=a.algo={};return a}(Math);return e}()),J0e.exports}var Z0e,e1e={exports:{}};function F_(){return Z0e||(Z0e=1,e1e.exports=function(e){return function(t){var n=e,r=n.lib,o=r.Base,i=r.WordArray,a=n.x64={};a.Word=o.extend({init:function(l,s){this.high=l,this.low=s}}),a.WordArray=o.extend({init:function(l,s){l=this.words=l||[],this.sigBytes=s!=t?s:8*l.length},toX32:function(){for(var l=this.words,s=l.length,u=[],c=0;c<s;c++){var d=l[c];u.push(d.high),u.push(d.low)}return i.create(u,this.sigBytes)},clone:function(){for(var l=o.clone.call(this),s=l.words=this.words.slice(0),u=s.length,c=0;c<u;c++)s[c]=s[c].clone();return l}})}(),e}(kr())),e1e.exports}var t1e,n1e={exports:{}};function _Xe(){return t1e||(t1e=1,n1e.exports=function(e){return function(){if(typeof ArrayBuffer=="function"){var t=e.lib.WordArray,n=t.init,r=t.init=function(o){if(o instanceof ArrayBuffer&&(o=new Uint8Array(o)),(o instanceof Int8Array||typeof Uint8ClampedArray<"u"&&o instanceof Uint8ClampedArray||o instanceof Int16Array||o instanceof Uint16Array||o instanceof Int32Array||o instanceof Uint32Array||o instanceof Float32Array||o instanceof Float64Array)&&(o=new Uint8Array(o.buffer,o.byteOffset,o.byteLength)),o instanceof Uint8Array){for(var i=o.byteLength,a=[],l=0;l<i;l++)a[l>>>2]|=o[l]<<24-l%4*8;n.call(this,a,i)}else n.apply(this,arguments)};r.prototype=t}}(),e.lib.WordArray}(kr())),n1e.exports}var r1e,o1e={exports:{}};function EXe(){return r1e||(r1e=1,o1e.exports=function(e){return function(){var t=e,n=t.lib.WordArray,r=t.enc;function o(i){return i<<8&4278255360|i>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(i){for(var a=i.words,l=i.sigBytes,s=[],u=0;u<l;u+=2){var c=a[u>>>2]>>>16-u%4*8&65535;s.push(String.fromCharCode(c))}return s.join("")},parse:function(i){for(var a=i.length,l=[],s=0;s<a;s++)l[s>>>1]|=i.charCodeAt(s)<<16-s%2*16;return n.create(l,2*a)}},r.Utf16LE={stringify:function(i){for(var a=i.words,l=i.sigBytes,s=[],u=0;u<l;u+=2){var c=o(a[u>>>2]>>>16-u%4*8&65535);s.push(String.fromCharCode(c))}return s.join("")},parse:function(i){for(var a=i.length,l=[],s=0;s<a;s++)l[s>>>1]|=o(i.charCodeAt(s)<<16-s%2*16);return n.create(l,2*a)}}}(),e.enc.Utf16}(kr())),o1e.exports}var i1e,a1e={exports:{}};function D1(){return i1e||(i1e=1,a1e.exports=function(e){return function(){var t=e,n=t.lib.WordArray;function r(o,i,a){for(var l=[],s=0,u=0;u<i;u++)if(u%4){var c=a[o.charCodeAt(u-1)]<<u%4*2|a[o.charCodeAt(u)]>>>6-u%4*2;l[s>>>2]|=c<<24-s%4*8,s++}return n.create(l,s)}t.enc.Base64={stringify:function(o){var i=o.words,a=o.sigBytes,l=this._map;o.clamp();for(var s=[],u=0;u<a;u+=3)for(var c=(i[u>>>2]>>>24-u%4*8&255)<<16|(i[u+1>>>2]>>>24-(u+1)%4*8&255)<<8|i[u+2>>>2]>>>24-(u+2)%4*8&255,d=0;d<4&&u+.75*d<a;d++)s.push(l.charAt(c>>>6*(3-d)&63));var f=l.charAt(64);if(f)for(;s.length%4;)s.push(f);return s.join("")},parse:function(o){var i=o.length,a=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var s=0;s<a.length;s++)l[a.charCodeAt(s)]=s}var u=a.charAt(64);if(u){var c=o.indexOf(u);c!==-1&&(i=c)}return r(o,i,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(kr())),a1e.exports}var l1e,s1e={exports:{}};function CXe(){return l1e||(l1e=1,s1e.exports=function(e){return function(){var t=e,n=t.lib.WordArray;function r(o,i,a){for(var l=[],s=0,u=0;u<i;u++)if(u%4){var c=a[o.charCodeAt(u-1)]<<u%4*2|a[o.charCodeAt(u)]>>>6-u%4*2;l[s>>>2]|=c<<24-s%4*8,s++}return n.create(l,s)}t.enc.Base64url={stringify:function(o,i){i===void 0&&(i=!0);var a=o.words,l=o.sigBytes,s=i?this._safe_map:this._map;o.clamp();for(var u=[],c=0;c<l;c+=3)for(var d=(a[c>>>2]>>>24-c%4*8&255)<<16|(a[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|a[c+2>>>2]>>>24-(c+2)%4*8&255,f=0;f<4&&c+.75*f<l;f++)u.push(s.charAt(d>>>6*(3-f)&63));var p=s.charAt(64);if(p)for(;u.length%4;)u.push(p);return u.join("")},parse:function(o,i){i===void 0&&(i=!0);var a=o.length,l=i?this._safe_map:this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var u=0;u<l.length;u++)s[l.charCodeAt(u)]=u}var c=l.charAt(64);if(c){var d=o.indexOf(c);d!==-1&&(a=d)}return r(o,a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url}(kr())),s1e.exports}var u1e,c1e={exports:{}};function O1(){return u1e||(u1e=1,c1e.exports=function(e){return function(t){var n=e,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.algo,l=[];(function(){for(var p=0;p<64;p++)l[p]=4294967296*t.abs(t.sin(p+1))|0})();var s=a.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,m){for(var v=0;v<16;v++){var g=m+v,b=p[g];p[g]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8)}var y=this._hash.words,w=p[m+0],x=p[m+1],_=p[m+2],E=p[m+3],C=p[m+4],T=p[m+5],k=p[m+6],I=p[m+7],O=p[m+8],F=p[m+9],N=p[m+10],B=p[m+11],L=p[m+12],V=p[m+13],P=p[m+14],H=p[m+15],U=y[0],G=y[1],z=y[2],$=y[3];U=u(U,G,z,$,w,7,l[0]),$=u($,U,G,z,x,12,l[1]),z=u(z,$,U,G,_,17,l[2]),G=u(G,z,$,U,E,22,l[3]),U=u(U,G,z,$,C,7,l[4]),$=u($,U,G,z,T,12,l[5]),z=u(z,$,U,G,k,17,l[6]),G=u(G,z,$,U,I,22,l[7]),U=u(U,G,z,$,O,7,l[8]),$=u($,U,G,z,F,12,l[9]),z=u(z,$,U,G,N,17,l[10]),G=u(G,z,$,U,B,22,l[11]),U=u(U,G,z,$,L,7,l[12]),$=u($,U,G,z,V,12,l[13]),z=u(z,$,U,G,P,17,l[14]),U=c(U,G=u(G,z,$,U,H,22,l[15]),z,$,x,5,l[16]),$=c($,U,G,z,k,9,l[17]),z=c(z,$,U,G,B,14,l[18]),G=c(G,z,$,U,w,20,l[19]),U=c(U,G,z,$,T,5,l[20]),$=c($,U,G,z,N,9,l[21]),z=c(z,$,U,G,H,14,l[22]),G=c(G,z,$,U,C,20,l[23]),U=c(U,G,z,$,F,5,l[24]),$=c($,U,G,z,P,9,l[25]),z=c(z,$,U,G,E,14,l[26]),G=c(G,z,$,U,O,20,l[27]),U=c(U,G,z,$,V,5,l[28]),$=c($,U,G,z,_,9,l[29]),z=c(z,$,U,G,I,14,l[30]),U=d(U,G=c(G,z,$,U,L,20,l[31]),z,$,T,4,l[32]),$=d($,U,G,z,O,11,l[33]),z=d(z,$,U,G,B,16,l[34]),G=d(G,z,$,U,P,23,l[35]),U=d(U,G,z,$,x,4,l[36]),$=d($,U,G,z,C,11,l[37]),z=d(z,$,U,G,I,16,l[38]),G=d(G,z,$,U,N,23,l[39]),U=d(U,G,z,$,V,4,l[40]),$=d($,U,G,z,w,11,l[41]),z=d(z,$,U,G,E,16,l[42]),G=d(G,z,$,U,k,23,l[43]),U=d(U,G,z,$,F,4,l[44]),$=d($,U,G,z,L,11,l[45]),z=d(z,$,U,G,H,16,l[46]),U=f(U,G=d(G,z,$,U,_,23,l[47]),z,$,w,6,l[48]),$=f($,U,G,z,I,10,l[49]),z=f(z,$,U,G,P,15,l[50]),G=f(G,z,$,U,T,21,l[51]),U=f(U,G,z,$,L,6,l[52]),$=f($,U,G,z,E,10,l[53]),z=f(z,$,U,G,N,15,l[54]),G=f(G,z,$,U,x,21,l[55]),U=f(U,G,z,$,O,6,l[56]),$=f($,U,G,z,H,10,l[57]),z=f(z,$,U,G,k,15,l[58]),G=f(G,z,$,U,V,21,l[59]),U=f(U,G,z,$,C,6,l[60]),$=f($,U,G,z,B,10,l[61]),z=f(z,$,U,G,_,15,l[62]),G=f(G,z,$,U,F,21,l[63]),y[0]=y[0]+U|0,y[1]=y[1]+G|0,y[2]=y[2]+z|0,y[3]=y[3]+$|0},_doFinalize:function(){var p=this._data,m=p.words,v=8*this._nDataBytes,g=8*p.sigBytes;m[g>>>5]|=128<<24-g%32;var b=t.floor(v/4294967296),y=v;m[15+(g+64>>>9<<4)]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),m[14+(g+64>>>9<<4)]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),p.sigBytes=4*(m.length+1),this._process();for(var w=this._hash,x=w.words,_=0;_<4;_++){var E=x[_];x[_]=16711935&(E<<8|E>>>24)|4278255360&(E<<24|E>>>8)}return w},clone:function(){var p=i.clone.call(this);return p._hash=this._hash.clone(),p}});function u(p,m,v,g,b,y,w){var x=p+(m&v|~m&g)+b+w;return(x<<y|x>>>32-y)+m}function c(p,m,v,g,b,y,w){var x=p+(m&g|v&~g)+b+w;return(x<<y|x>>>32-y)+m}function d(p,m,v,g,b,y,w){var x=p+(m^v^g)+b+w;return(x<<y|x>>>32-y)+m}function f(p,m,v,g,b,y,w){var x=p+(v^(m|~g))+b+w;return(x<<y|x>>>32-y)+m}n.MD5=i._createHelper(s),n.HmacMD5=i._createHmacHelper(s)}(Math),e.MD5}(kr())),c1e.exports}var d1e,f1e={exports:{}};function p1e(){return d1e||(d1e=1,f1e.exports=function(e){return function(){var t=e,n=t.lib,r=n.WordArray,o=n.Hasher,i=t.algo,a=[],l=i.SHA1=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,u){for(var c=this._hash.words,d=c[0],f=c[1],p=c[2],m=c[3],v=c[4],g=0;g<80;g++){if(g<16)a[g]=0|s[u+g];else{var b=a[g-3]^a[g-8]^a[g-14]^a[g-16];a[g]=b<<1|b>>>31}var y=(d<<5|d>>>27)+v+a[g];y+=g<20?1518500249+(f&p|~f&m):g<40?1859775393+(f^p^m):g<60?(f&p|f&m|p&m)-1894007588:(f^p^m)-899497514,v=m,m=p,p=f<<30|f>>>2,f=d,d=y}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+p|0,c[3]=c[3]+m|0,c[4]=c[4]+v|0},_doFinalize:function(){var s=this._data,u=s.words,c=8*this._nDataBytes,d=8*s.sigBytes;return u[d>>>5]|=128<<24-d%32,u[14+(d+64>>>9<<4)]=Math.floor(c/4294967296),u[15+(d+64>>>9<<4)]=c,s.sigBytes=4*u.length,this._process(),this._hash},clone:function(){var s=o.clone.call(this);return s._hash=this._hash.clone(),s}});t.SHA1=o._createHelper(l),t.HmacSHA1=o._createHmacHelper(l)}(),e.SHA1}(kr())),f1e.exports}var h1e,v1e={exports:{}};function kL(){return h1e||(h1e=1,v1e.exports=function(e){return function(t){var n=e,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.algo,l=[],s=[];(function(){function d(v){for(var g=t.sqrt(v),b=2;b<=g;b++)if(!(v%b))return!1;return!0}function f(v){return 4294967296*(v-(0|v))|0}for(var p=2,m=0;m<64;)d(p)&&(m<8&&(l[m]=f(t.pow(p,.5))),s[m]=f(t.pow(p,.3333333333333333)),m++),p++})();var u=[],c=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(l.slice(0))},_doProcessBlock:function(d,f){for(var p=this._hash.words,m=p[0],v=p[1],g=p[2],b=p[3],y=p[4],w=p[5],x=p[6],_=p[7],E=0;E<64;E++){if(E<16)u[E]=0|d[f+E];else{var C=u[E-15],T=(C<<25|C>>>7)^(C<<14|C>>>18)^C>>>3,k=u[E-2],I=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;u[E]=T+u[E-7]+I+u[E-16]}var O=m&v^m&g^v&g,F=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),N=_+((y<<26|y>>>6)^(y<<21|y>>>11)^(y<<7|y>>>25))+(y&w^~y&x)+s[E]+u[E];_=x,x=w,w=y,y=b+N|0,b=g,g=v,v=m,m=N+(F+O)|0}p[0]=p[0]+m|0,p[1]=p[1]+v|0,p[2]=p[2]+g|0,p[3]=p[3]+b|0,p[4]=p[4]+y|0,p[5]=p[5]+w|0,p[6]=p[6]+x|0,p[7]=p[7]+_|0},_doFinalize:function(){var d=this._data,f=d.words,p=8*this._nDataBytes,m=8*d.sigBytes;return f[m>>>5]|=128<<24-m%32,f[14+(m+64>>>9<<4)]=t.floor(p/4294967296),f[15+(m+64>>>9<<4)]=p,d.sigBytes=4*f.length,this._process(),this._hash},clone:function(){var d=i.clone.call(this);return d._hash=this._hash.clone(),d}});n.SHA256=i._createHelper(c),n.HmacSHA256=i._createHmacHelper(c)}(Math),e.SHA256}(kr())),v1e.exports}var m1e,SXe={exports:{}},g1e,y1e={exports:{}};function b1e(){return g1e||(g1e=1,y1e.exports=function(e){return function(){var t=e,n=t.lib.Hasher,r=t.x64,o=r.Word,i=r.WordArray,a=t.algo;function l(){return o.create.apply(o,arguments)}var s=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var d=0;d<80;d++)u[d]=l()})();var c=a.SHA512=n.extend({_doReset:function(){this._hash=new i.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(d,f){for(var p=this._hash.words,m=p[0],v=p[1],g=p[2],b=p[3],y=p[4],w=p[5],x=p[6],_=p[7],E=m.high,C=m.low,T=v.high,k=v.low,I=g.high,O=g.low,F=b.high,N=b.low,B=y.high,L=y.low,V=w.high,P=w.low,H=x.high,U=x.low,G=_.high,z=_.low,$=E,W=C,K=T,X=k,te=I,ne=O,se=F,le=N,J=B,Z=L,ye=V,be=P,ve=H,Ae=U,Ce=G,_e=z,ke=0;ke<80;ke++){var Be,$e,rt=u[ke];if(ke<16)$e=rt.high=0|d[f+2*ke],Be=rt.low=0|d[f+2*ke+1];else{var ge=u[ke-15],We=ge.high,st=ge.low,At=(We>>>1|st<<31)^(We>>>8|st<<24)^We>>>7,Ve=(st>>>1|We<<31)^(st>>>8|We<<24)^(st>>>7|We<<25),it=u[ke-2],dt=it.high,ot=it.low,je=(dt>>>19|ot<<13)^(dt<<3|ot>>>29)^dt>>>6,we=(ot>>>19|dt<<13)^(ot<<3|dt>>>29)^(ot>>>6|dt<<26),ze=u[ke-7],me=ze.high,Me=ze.low,Ie=u[ke-16],ht=Ie.high,gt=Ie.low;$e=($e=($e=At+me+((Be=Ve+Me)>>>0<Ve>>>0?1:0))+je+((Be+=we)>>>0<we>>>0?1:0))+ht+((Be+=gt)>>>0<gt>>>0?1:0),rt.high=$e,rt.low=Be}var vt,qt=J&ye^~J&ve,mn=Z&be^~Z&Ae,Zt=$&K^$&te^K&te,rn=W&X^W&ne^X&ne,zn=($>>>28|W<<4)^($<<30|W>>>2)^($<<25|W>>>7),tt=(W>>>28|$<<4)^(W<<30|$>>>2)^(W<<25|$>>>7),kt=(J>>>14|Z<<18)^(J>>>18|Z<<14)^(J<<23|Z>>>9),An=(Z>>>14|J<<18)^(Z>>>18|J<<14)^(Z<<23|J>>>9),_n=s[ke],po=_n.high,Qr=_n.low,Ar=Ce+kt+((vt=_e+An)>>>0<_e>>>0?1:0),Jr=tt+rn;Ce=ve,_e=Ae,ve=ye,Ae=be,ye=J,be=Z,J=se+(Ar=(Ar=(Ar=Ar+qt+((vt+=mn)>>>0<mn>>>0?1:0))+po+((vt+=Qr)>>>0<Qr>>>0?1:0))+$e+((vt+=Be)>>>0<Be>>>0?1:0))+((Z=le+vt|0)>>>0<le>>>0?1:0)|0,se=te,le=ne,te=K,ne=X,K=$,X=W,$=Ar+(zn+Zt+(Jr>>>0<tt>>>0?1:0))+((W=vt+Jr|0)>>>0<vt>>>0?1:0)|0}C=m.low=C+W,m.high=E+$+(C>>>0<W>>>0?1:0),k=v.low=k+X,v.high=T+K+(k>>>0<X>>>0?1:0),O=g.low=O+ne,g.high=I+te+(O>>>0<ne>>>0?1:0),N=b.low=N+le,b.high=F+se+(N>>>0<le>>>0?1:0),L=y.low=L+Z,y.high=B+J+(L>>>0<Z>>>0?1:0),P=w.low=P+be,w.high=V+ye+(P>>>0<be>>>0?1:0),U=x.low=U+Ae,x.high=H+ve+(U>>>0<Ae>>>0?1:0),z=_.low=z+_e,_.high=G+Ce+(z>>>0<_e>>>0?1:0)},_doFinalize:function(){var d=this._data,f=d.words,p=8*this._nDataBytes,m=8*d.sigBytes;return f[m>>>5]|=128<<24-m%32,f[30+(m+128>>>10<<5)]=Math.floor(p/4294967296),f[31+(m+128>>>10<<5)]=p,d.sigBytes=4*f.length,this._process(),this._hash.toX32()},clone:function(){var d=n.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:32});t.SHA512=n._createHelper(c),t.HmacSHA512=n._createHmacHelper(c)}(),e.SHA512}(kr(),F_())),y1e.exports}var A1e,kXe={exports:{}},w1e,x1e={exports:{}};function DXe(){return w1e||(w1e=1,x1e.exports=function(e){return function(t){var n=e,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.x64.Word,l=n.algo,s=[],u=[],c=[];(function(){for(var p=1,m=0,v=0;v<24;v++){s[p+5*m]=(v+1)*(v+2)/2%64;var g=(2*p+3*m)%5;p=m%5,m=g}for(p=0;p<5;p++)for(m=0;m<5;m++)u[p+5*m]=m+(2*p+3*m)%5*5;for(var b=1,y=0;y<24;y++){for(var w=0,x=0,_=0;_<7;_++){if(1&b){var E=(1<<_)-1;E<32?x^=1<<E:w^=1<<E-32}128&b?b=b<<1^113:b<<=1}c[y]=a.create(w,x)}})();var d=[];(function(){for(var p=0;p<25;p++)d[p]=a.create()})();var f=l.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var p=this._state=[],m=0;m<25;m++)p[m]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(p,m){for(var v=this._state,g=this.blockSize/2,b=0;b<g;b++){var y=p[m+2*b],w=p[m+2*b+1];y=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),w=16711935&(w<<8|w>>>24)|4278255360&(w<<24|w>>>8),(z=v[b]).high^=w,z.low^=y}for(var x=0;x<24;x++){for(var _=0;_<5;_++){for(var E=0,C=0,T=0;T<5;T++)E^=(z=v[_+5*T]).high,C^=z.low;var k=d[_];k.high=E,k.low=C}for(_=0;_<5;_++){var I=d[(_+4)%5],O=d[(_+1)%5],F=O.high,N=O.low;for(E=I.high^(F<<1|N>>>31),C=I.low^(N<<1|F>>>31),T=0;T<5;T++)(z=v[_+5*T]).high^=E,z.low^=C}for(var B=1;B<25;B++){var L=(z=v[B]).high,V=z.low,P=s[B];P<32?(E=L<<P|V>>>32-P,C=V<<P|L>>>32-P):(E=V<<P-32|L>>>64-P,C=L<<P-32|V>>>64-P);var H=d[u[B]];H.high=E,H.low=C}var U=d[0],G=v[0];for(U.high=G.high,U.low=G.low,_=0;_<5;_++)for(T=0;T<5;T++){var z=v[B=_+5*T],$=d[B],W=d[(_+1)%5+5*T],K=d[(_+2)%5+5*T];z.high=$.high^~W.high&K.high,z.low=$.low^~W.low&K.low}z=v[0];var X=c[x];z.high^=X.high,z.low^=X.low}},_doFinalize:function(){var p=this._data,m=p.words;this._nDataBytes;var v=8*p.sigBytes,g=32*this.blockSize;m[v>>>5]|=1<<24-v%32,m[(t.ceil((v+1)/g)*g>>>5)-1]|=128,p.sigBytes=4*m.length,this._process();for(var b=this._state,y=this.cfg.outputLength/8,w=y/8,x=[],_=0;_<w;_++){var E=b[_],C=E.high,T=E.low;C=16711935&(C<<8|C>>>24)|4278255360&(C<<24|C>>>8),T=16711935&(T<<8|T>>>24)|4278255360&(T<<24|T>>>8),x.push(T),x.push(C)}return new o.init(x,y)},clone:function(){for(var p=i.clone.call(this),m=p._state=this._state.slice(0),v=0;v<25;v++)m[v]=m[v].clone();return p}});n.SHA3=i._createHelper(f),n.HmacSHA3=i._createHmacHelper(f)}(Math),e.SHA3}(kr(),F_())),x1e.exports}var _1e,OXe={exports:{}},E1e,C1e={exports:{}};function DL(){return E1e||(E1e=1,C1e.exports=function(e){(function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(o,i){o=this._hasher=new o.init,typeof i=="string"&&(i=r.parse(i));var a=o.blockSize,l=4*a;i.sigBytes>l&&(i=o.finalize(i)),i.clamp();for(var s=this._oKey=i.clone(),u=this._iKey=i.clone(),c=s.words,d=u.words,f=0;f<a;f++)c[f]^=1549556828,d[f]^=909522486;s.sigBytes=u.sigBytes=l,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var i=this._hasher,a=i.finalize(o);return i.reset(),i.finalize(this._oKey.clone().concat(a))}})})()}(kr())),C1e.exports}var S1e,TXe={exports:{}},k1e,D1e={exports:{}};function Dp(){return k1e||(k1e=1,D1e.exports=function(e){return function(){var t=e,n=t.lib,r=n.Base,o=n.WordArray,i=t.algo,a=i.MD5,l=i.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,u){for(var c,d=this.cfg,f=d.hasher.create(),p=o.create(),m=p.words,v=d.keySize,g=d.iterations;m.length<v;){c&&f.update(c),c=f.update(s).finalize(u),f.reset();for(var b=1;b<g;b++)c=f.finalize(c),f.reset();p.concat(c)}return p.sigBytes=4*v,p}});t.EvpKDF=function(s,u,c){return l.create(c).compute(s,u)}}(),e.EvpKDF}(kr(),p1e(),DL())),D1e.exports}var O1e,T1e={exports:{}};function Zi(){return O1e||(O1e=1,T1e.exports=function(e){e.lib.Cipher||function(t){var n=e,r=n.lib,o=r.Base,i=r.WordArray,a=r.BufferedBlockAlgorithm,l=n.enc;l.Utf8;var s=l.Base64,u=n.algo.EvpKDF,c=r.Cipher=a.extend({cfg:o.extend(),createEncryptor:function(x,_){return this.create(this._ENC_XFORM_MODE,x,_)},createDecryptor:function(x,_){return this.create(this._DEC_XFORM_MODE,x,_)},init:function(x,_,E){this.cfg=this.cfg.extend(E),this._xformMode=x,this._key=_,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(x){return this._append(x),this._process()},finalize:function(x){return x&&this._append(x),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function x(_){return typeof _=="string"?w:b}return function(_){return{encrypt:function(E,C,T){return x(C).encrypt(_,E,C,T)},decrypt:function(E,C,T){return x(C).decrypt(_,E,C,T)}}}}()});r.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var d=n.mode={},f=r.BlockCipherMode=o.extend({createEncryptor:function(x,_){return this.Encryptor.create(x,_)},createDecryptor:function(x,_){return this.Decryptor.create(x,_)},init:function(x,_){this._cipher=x,this._iv=_}}),p=d.CBC=function(){var x=f.extend();function _(E,C,T){var k,I=this._iv;I?(k=I,this._iv=t):k=this._prevBlock;for(var O=0;O<T;O++)E[C+O]^=k[O]}return x.Encryptor=x.extend({processBlock:function(E,C){var T=this._cipher,k=T.blockSize;_.call(this,E,C,k),T.encryptBlock(E,C),this._prevBlock=E.slice(C,C+k)}}),x.Decryptor=x.extend({processBlock:function(E,C){var T=this._cipher,k=T.blockSize,I=E.slice(C,C+k);T.decryptBlock(E,C),_.call(this,E,C,k),this._prevBlock=I}}),x}(),m=(n.pad={}).Pkcs7={pad:function(x,_){for(var E=4*_,C=E-x.sigBytes%E,T=C<<24|C<<16|C<<8|C,k=[],I=0;I<C;I+=4)k.push(T);var O=i.create(k,C);x.concat(O)},unpad:function(x){var _=255&x.words[x.sigBytes-1>>>2];x.sigBytes-=_}};r.BlockCipher=c.extend({cfg:c.cfg.extend({mode:p,padding:m}),reset:function(){var x;c.reset.call(this);var _=this.cfg,E=_.iv,C=_.mode;this._xformMode==this._ENC_XFORM_MODE?x=C.createEncryptor:(x=C.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==x?this._mode.init(this,E&&E.words):(this._mode=x.call(C,this,E&&E.words),this._mode.__creator=x)},_doProcessBlock:function(x,_){this._mode.processBlock(x,_)},_doFinalize:function(){var x,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),x=this._process(!0)):(x=this._process(!0),_.unpad(x)),x},blockSize:4});var v=r.CipherParams=o.extend({init:function(x){this.mixIn(x)},toString:function(x){return(x||this.formatter).stringify(this)}}),g=(n.format={}).OpenSSL={stringify:function(x){var _=x.ciphertext,E=x.salt;return(E?i.create([1398893684,1701076831]).concat(E).concat(_):_).toString(s)},parse:function(x){var _,E=s.parse(x),C=E.words;return C[0]==1398893684&&C[1]==1701076831&&(_=i.create(C.slice(2,4)),C.splice(0,4),E.sigBytes-=16),v.create({ciphertext:E,salt:_})}},b=r.SerializableCipher=o.extend({cfg:o.extend({format:g}),encrypt:function(x,_,E,C){C=this.cfg.extend(C);var T=x.createEncryptor(E,C),k=T.finalize(_),I=T.cfg;return v.create({ciphertext:k,key:E,iv:I.iv,algorithm:x,mode:I.mode,padding:I.padding,blockSize:x.blockSize,formatter:C.format})},decrypt:function(x,_,E,C){return C=this.cfg.extend(C),_=this._parse(_,C.format),x.createDecryptor(E,C).finalize(_.ciphertext)},_parse:function(x,_){return typeof x=="string"?_.parse(x,this):x}}),y=(n.kdf={}).OpenSSL={execute:function(x,_,E,C,T){if(C||(C=i.random(8)),T)k=u.create({keySize:_+E,hasher:T}).compute(x,C);else var k=u.create({keySize:_+E}).compute(x,C);var I=i.create(k.words.slice(_),4*E);return k.sigBytes=4*_,v.create({key:k,iv:I,salt:C})}},w=r.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:y}),encrypt:function(x,_,E,C){var T=(C=this.cfg.extend(C)).kdf.execute(E,x.keySize,x.ivSize,C.salt,C.hasher);C.iv=T.iv;var k=b.encrypt.call(this,x,_,T.key,C);return k.mixIn(T),k},decrypt:function(x,_,E,C){C=this.cfg.extend(C),_=this._parse(_,C.format);var T=C.kdf.execute(E,x.keySize,x.ivSize,_.salt,C.hasher);return C.iv=T.iv,b.decrypt.call(this,x,_,T.key,C)}})}()}(kr(),Dp())),T1e.exports}var M1e,N1e={exports:{}};function MXe(){return M1e||(M1e=1,N1e.exports=function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function n(r,o,i,a){var l,s=this._iv;s?(l=s.slice(0),this._iv=void 0):l=this._prevBlock,a.encryptBlock(l,0);for(var u=0;u<i;u++)r[o+u]^=l[u]}return t.Encryptor=t.extend({processBlock:function(r,o){var i=this._cipher,a=i.blockSize;n.call(this,r,o,a,i),this._prevBlock=r.slice(o,o+a)}}),t.Decryptor=t.extend({processBlock:function(r,o){var i=this._cipher,a=i.blockSize,l=r.slice(o,o+a);n.call(this,r,o,a,i),this._prevBlock=l}}),t}(),e.mode.CFB}(kr(),Zi())),N1e.exports}var F1e,R1e={exports:{}};function NXe(){return F1e||(F1e=1,R1e.exports=function(e){return e.mode.CTR=(t=e.lib.BlockCipherMode.extend(),n=t.Encryptor=t.extend({processBlock:function(r,o){var i=this._cipher,a=i.blockSize,l=this._iv,s=this._counter;l&&(s=this._counter=l.slice(0),this._iv=void 0);var u=s.slice(0);i.encryptBlock(u,0),s[a-1]=s[a-1]+1|0;for(var c=0;c<a;c++)r[o+c]^=u[c]}}),t.Decryptor=n,t),e.mode.CTR;var t,n}(kr(),Zi())),R1e.exports}var I1e,B1e={exports:{}};function FXe(){return I1e||(I1e=1,B1e.exports=function(e){return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function n(i){if(255&~(i>>24))i+=16777216;else{var a=i>>16&255,l=i>>8&255,s=255&i;a===255?(a=0,l===255?(l=0,s===255?s=0:++s):++l):++a,i=0,i+=a<<16,i+=l<<8,i+=s}return i}function r(i){return(i[0]=n(i[0]))===0&&(i[1]=n(i[1])),i}var o=t.Encryptor=t.extend({processBlock:function(i,a){var l=this._cipher,s=l.blockSize,u=this._iv,c=this._counter;u&&(c=this._counter=u.slice(0),this._iv=void 0),r(c);var d=c.slice(0);l.encryptBlock(d,0);for(var f=0;f<s;f++)i[a+f]^=d[f]}});return t.Decryptor=o,t}(),e.mode.CTRGladman}(kr(),Zi())),B1e.exports}var L1e,P1e={exports:{}};function RXe(){return L1e||(L1e=1,P1e.exports=function(e){return e.mode.OFB=(t=e.lib.BlockCipherMode.extend(),n=t.Encryptor=t.extend({processBlock:function(r,o){var i=this._cipher,a=i.blockSize,l=this._iv,s=this._keystream;l&&(s=this._keystream=l.slice(0),this._iv=void 0),i.encryptBlock(s,0);for(var u=0;u<a;u++)r[o+u]^=s[u]}}),t.Decryptor=n,t),e.mode.OFB;var t,n}(kr(),Zi())),P1e.exports}var j1e,IXe={exports:{}},V1e,BXe={exports:{}},z1e,LXe={exports:{}},H1e,PXe={exports:{}},$1e,jXe={exports:{}},U1e,VXe={exports:{}},W1e,zXe={exports:{}},G1e,HXe={exports:{}},q1e,K1e={exports:{}};function $Xe(){return q1e||(q1e=1,K1e.exports=function(e){return function(){var t=e,n=t.lib,r=n.WordArray,o=n.BlockCipher,i=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=i.DES=o.extend({_doReset:function(){for(var v=this._key.words,g=[],b=0;b<56;b++){var y=a[b]-1;g[b]=v[y>>>5]>>>31-y%32&1}for(var w=this._subKeys=[],x=0;x<16;x++){var _=w[x]=[],E=s[x];for(b=0;b<24;b++)_[b/6|0]|=g[(l[b]-1+E)%28]<<31-b%6,_[4+(b/6|0)]|=g[28+(l[b+24]-1+E)%28]<<31-b%6;for(_[0]=_[0]<<1|_[0]>>>31,b=1;b<7;b++)_[b]=_[b]>>>4*(b-1)+3;_[7]=_[7]<<5|_[7]>>>27}var C=this._invSubKeys=[];for(b=0;b<16;b++)C[b]=w[15-b]},encryptBlock:function(v,g){this._doCryptBlock(v,g,this._subKeys)},decryptBlock:function(v,g){this._doCryptBlock(v,g,this._invSubKeys)},_doCryptBlock:function(v,g,b){this._lBlock=v[g],this._rBlock=v[g+1],f.call(this,4,252645135),f.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),f.call(this,1,1431655765);for(var y=0;y<16;y++){for(var w=b[y],x=this._lBlock,_=this._rBlock,E=0,C=0;C<8;C++)E|=u[C][((_^w[C])&c[C])>>>0];this._lBlock=_,this._rBlock=x^E}var T=this._lBlock;this._lBlock=this._rBlock,this._rBlock=T,f.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),v[g]=this._lBlock,v[g+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(v,g){var b=(this._lBlock>>>v^this._rBlock)&g;this._rBlock^=b,this._lBlock^=b<<v}function p(v,g){var b=(this._rBlock>>>v^this._lBlock)&g;this._lBlock^=b,this._rBlock^=b<<v}t.DES=o._createHelper(d);var m=i.TripleDES=o.extend({_doReset:function(){var v=this._key.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var g=v.slice(0,2),b=v.length<4?v.slice(0,2):v.slice(2,4),y=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=d.createEncryptor(r.create(g)),this._des2=d.createEncryptor(r.create(b)),this._des3=d.createEncryptor(r.create(y))},encryptBlock:function(v,g){this._des1.encryptBlock(v,g),this._des2.decryptBlock(v,g),this._des3.encryptBlock(v,g)},decryptBlock:function(v,g){this._des3.decryptBlock(v,g),this._des2.encryptBlock(v,g),this._des1.decryptBlock(v,g)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=o._createHelper(m)}(),e.TripleDES}(kr(),D1(),O1(),Dp(),Zi())),K1e.exports}var Y1e,UXe={exports:{}},X1e,WXe={exports:{}},Q1e,GXe={exports:{}},J1e,Z1e={exports:{}};function qXe(){return J1e||(J1e=1,Z1e.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo;const o=16,i=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function s(p,m){let v=m>>24&255,g=m>>16&255,b=m>>8&255,y=255&m,w=p.sbox[0][v]+p.sbox[1][g];return w^=p.sbox[2][b],w+=p.sbox[3][y],w}function u(p,m,v){let g,b=m,y=v;for(let w=0;w<o;++w)b^=p.pbox[w],y=s(p,b)^y,g=b,b=y,y=g;return g=b,b=y,y=g,y^=p.pbox[o],b^=p.pbox[o+1],{left:b,right:y}}function c(p,m,v){let g,b=m,y=v;for(let w=o+1;w>1;--w)b^=p.pbox[w],y=s(p,b)^y,g=b,b=y,y=g;return g=b,b=y,y=g,y^=p.pbox[1],b^=p.pbox[0],{left:b,right:y}}function d(p,m,v){for(let x=0;x<4;x++){p.sbox[x]=[];for(let _=0;_<256;_++)p.sbox[x][_]=a[x][_]}let g=0;for(let x=0;x<o+2;x++)p.pbox[x]=i[x]^m[g],g++,g>=v&&(g=0);let b=0,y=0,w=0;for(let x=0;x<o+2;x+=2)w=u(p,b,y),b=w.left,y=w.right,p.pbox[x]=b,p.pbox[x+1]=y;for(let x=0;x<4;x++)for(let _=0;_<256;_+=2)w=u(p,b,y),b=w.left,y=w.right,p.sbox[x][_]=b,p.sbox[x][_+1]=y;return!0}var f=r.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var p=this._keyPriorReset=this._key,m=p.words,v=p.sigBytes/4;d(l,m,v)}},encryptBlock:function(p,m){var v=u(l,p[m],p[m+1]);p[m]=v.left,p[m+1]=v.right},decryptBlock:function(p,m){var v=c(l,p[m],p[m+1]);p[m]=v.left,p[m+1]=v.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=n._createHelper(f)}(),e.Blowfish}(kr(),D1(),O1(),Dp(),Zi())),Z1e.exports}X0e.exports=function(e){return e}(kr(),F_(),_Xe(),EXe(),D1(),CXe(),O1(),p1e(),kL(),m1e||(m1e=1,SXe.exports=function(e){return function(){var t=e,n=t.lib.WordArray,r=t.algo,o=r.SHA256,i=r.SHA224=o.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=o._doFinalize.call(this);return a.sigBytes-=4,a}});t.SHA224=o._createHelper(i),t.HmacSHA224=o._createHmacHelper(i)}(),e.SHA224}(kr(),kL())),b1e(),A1e||(A1e=1,kXe.exports=function(e){return function(){var t=e,n=t.x64,r=n.Word,o=n.WordArray,i=t.algo,a=i.SHA512,l=i.SHA384=a.extend({_doReset:function(){this._hash=new o.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var s=a._doFinalize.call(this);return s.sigBytes-=16,s}});t.SHA384=a._createHelper(l),t.HmacSHA384=a._createHmacHelper(l)}(),e.SHA384}(kr(),F_(),b1e())),DXe(),_1e||(_1e=1,OXe.exports=function(e){return function(){var t=e,n=t.lib,r=n.WordArray,o=n.Hasher,i=t.algo,a=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),s=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),c=r.create([0,1518500249,1859775393,2400959708,2840853838]),d=r.create([1352829926,1548603684,1836072691,2053994217,0]),f=i.RIPEMD160=o.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,x){for(var _=0;_<16;_++){var E=x+_,C=w[E];w[E]=16711935&(C<<8|C>>>24)|4278255360&(C<<24|C>>>8)}var T,k,I,O,F,N,B,L,V,P,H,U=this._hash.words,G=c.words,z=d.words,$=a.words,W=l.words,K=s.words,X=u.words;for(N=T=U[0],B=k=U[1],L=I=U[2],V=O=U[3],P=F=U[4],_=0;_<80;_+=1)H=T+w[x+$[_]]|0,H+=_<16?p(k,I,O)+G[0]:_<32?m(k,I,O)+G[1]:_<48?v(k,I,O)+G[2]:_<64?g(k,I,O)+G[3]:b(k,I,O)+G[4],H=(H=y(H|=0,K[_]))+F|0,T=F,F=O,O=y(I,10),I=k,k=H,H=N+w[x+W[_]]|0,H+=_<16?b(B,L,V)+z[0]:_<32?g(B,L,V)+z[1]:_<48?v(B,L,V)+z[2]:_<64?m(B,L,V)+z[3]:p(B,L,V)+z[4],H=(H=y(H|=0,X[_]))+P|0,N=P,P=V,V=y(L,10),L=B,B=H;H=U[1]+I+V|0,U[1]=U[2]+O+P|0,U[2]=U[3]+F+N|0,U[3]=U[4]+T+B|0,U[4]=U[0]+k+L|0,U[0]=H},_doFinalize:function(){var w=this._data,x=w.words,_=8*this._nDataBytes,E=8*w.sigBytes;x[E>>>5]|=128<<24-E%32,x[14+(E+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),w.sigBytes=4*(x.length+1),this._process();for(var C=this._hash,T=C.words,k=0;k<5;k++){var I=T[k];T[k]=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8)}return C},clone:function(){var w=o.clone.call(this);return w._hash=this._hash.clone(),w}});function p(w,x,_){return w^x^_}function m(w,x,_){return w&x|~w&_}function v(w,x,_){return(w|~x)^_}function g(w,x,_){return w&_|x&~_}function b(w,x,_){return w^(x|~_)}function y(w,x){return w<<x|w>>>32-x}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),e.RIPEMD160}(kr())),DL(),S1e||(S1e=1,TXe.exports=function(e){return function(){var t=e,n=t.lib,r=n.Base,o=n.WordArray,i=t.algo,a=i.SHA256,l=i.HMAC,s=i.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:25e4}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,c){for(var d=this.cfg,f=l.create(d.hasher,u),p=o.create(),m=o.create([1]),v=p.words,g=m.words,b=d.keySize,y=d.iterations;v.length<b;){var w=f.update(c).finalize(m);f.reset();for(var x=w.words,_=x.length,E=w,C=1;C<y;C++){E=f.finalize(E),f.reset();for(var T=E.words,k=0;k<_;k++)x[k]^=T[k]}p.concat(w),g[0]++}return p.sigBytes=4*b,p}});t.PBKDF2=function(u,c,d){return s.create(d).compute(u,c)}}(),e.PBKDF2}(kr(),kL(),DL())),Dp(),Zi(),MXe(),NXe(),FXe(),RXe(),j1e||(j1e=1,IXe.exports=function(e){return e.mode.ECB=((t=e.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(n,r){this._cipher.encryptBlock(n,r)}}),t.Decryptor=t.extend({processBlock:function(n,r){this._cipher.decryptBlock(n,r)}}),t),e.mode.ECB;var t}(kr(),Zi())),V1e||(V1e=1,BXe.exports=function(e){return e.pad.AnsiX923={pad:function(t,n){var r=t.sigBytes,o=4*n,i=o-r%o,a=r+i-1;t.clamp(),t.words[a>>>2]|=i<<24-a%4*8,t.sigBytes+=i},unpad:function(t){var n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}},e.pad.Ansix923}(kr(),Zi())),z1e||(z1e=1,LXe.exports=function(e){return e.pad.Iso10126={pad:function(t,n){var r=4*n,o=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(t){var n=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=n}},e.pad.Iso10126}(kr(),Zi())),H1e||(H1e=1,PXe.exports=function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}(kr(),Zi())),$1e||($1e=1,jXe.exports=function(e){return e.pad.ZeroPadding={pad:function(t,n){var r=4*n;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var n=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;r>=0;r--)if(n[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},e.pad.ZeroPadding}(kr(),Zi())),U1e||(U1e=1,VXe.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(kr(),Zi())),W1e||(W1e=1,zXe.exports=function(e){return function(){var t=e,n=t.lib.CipherParams,r=t.enc.Hex;t.format.Hex={stringify:function(o){return o.ciphertext.toString(r)},parse:function(o){var i=r.parse(o);return n.create({ciphertext:i})}}}(),e.format.Hex}(kr(),Zi())),G1e||(G1e=1,HXe.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,o=[],i=[],a=[],l=[],s=[],u=[],c=[],d=[],f=[],p=[];(function(){for(var g=[],b=0;b<256;b++)g[b]=b<128?b<<1:b<<1^283;var y=0,w=0;for(b=0;b<256;b++){var x=w^w<<1^w<<2^w<<3^w<<4;x=x>>>8^255&x^99,o[y]=x,i[x]=y;var _=g[y],E=g[_],C=g[E],T=257*g[x]^16843008*x;a[y]=T<<24|T>>>8,l[y]=T<<16|T>>>16,s[y]=T<<8|T>>>24,u[y]=T,T=16843009*C^65537*E^257*_^16843008*y,c[x]=T<<24|T>>>8,d[x]=T<<16|T>>>16,f[x]=T<<8|T>>>24,p[x]=T,y?(y=_^g[g[g[C^_]]],w^=g[g[w]]):y=w=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],v=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var g=this._keyPriorReset=this._key,b=g.words,y=g.sigBytes/4,w=4*((this._nRounds=y+6)+1),x=this._keySchedule=[],_=0;_<w;_++)_<y?x[_]=b[_]:(T=x[_-1],_%y?y>6&&_%y==4&&(T=o[T>>>24]<<24|o[T>>>16&255]<<16|o[T>>>8&255]<<8|o[255&T]):(T=o[(T=T<<8|T>>>24)>>>24]<<24|o[T>>>16&255]<<16|o[T>>>8&255]<<8|o[255&T],T^=m[_/y|0]<<24),x[_]=x[_-y]^T);for(var E=this._invKeySchedule=[],C=0;C<w;C++){if(_=w-C,C%4)var T=x[_];else T=x[_-4];E[C]=C<4||_<=4?T:c[o[T>>>24]]^d[o[T>>>16&255]]^f[o[T>>>8&255]]^p[o[255&T]]}}},encryptBlock:function(g,b){this._doCryptBlock(g,b,this._keySchedule,a,l,s,u,o)},decryptBlock:function(g,b){var y=g[b+1];g[b+1]=g[b+3],g[b+3]=y,this._doCryptBlock(g,b,this._invKeySchedule,c,d,f,p,i),y=g[b+1],g[b+1]=g[b+3],g[b+3]=y},_doCryptBlock:function(g,b,y,w,x,_,E,C){for(var T=this._nRounds,k=g[b]^y[0],I=g[b+1]^y[1],O=g[b+2]^y[2],F=g[b+3]^y[3],N=4,B=1;B<T;B++){var L=w[k>>>24]^x[I>>>16&255]^_[O>>>8&255]^E[255&F]^y[N++],V=w[I>>>24]^x[O>>>16&255]^_[F>>>8&255]^E[255&k]^y[N++],P=w[O>>>24]^x[F>>>16&255]^_[k>>>8&255]^E[255&I]^y[N++],H=w[F>>>24]^x[k>>>16&255]^_[I>>>8&255]^E[255&O]^y[N++];k=L,I=V,O=P,F=H}L=(C[k>>>24]<<24|C[I>>>16&255]<<16|C[O>>>8&255]<<8|C[255&F])^y[N++],V=(C[I>>>24]<<24|C[O>>>16&255]<<16|C[F>>>8&255]<<8|C[255&k])^y[N++],P=(C[O>>>24]<<24|C[F>>>16&255]<<16|C[k>>>8&255]<<8|C[255&I])^y[N++],H=(C[F>>>24]<<24|C[k>>>16&255]<<16|C[I>>>8&255]<<8|C[255&O])^y[N++],g[b]=L,g[b+1]=V,g[b+2]=P,g[b+3]=H},keySize:8});t.AES=n._createHelper(v)}(),e.AES}(kr(),D1(),O1(),Dp(),Zi())),$Xe(),Y1e||(Y1e=1,UXe.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=r.RC4=n.extend({_doReset:function(){for(var l=this._key,s=l.words,u=l.sigBytes,c=this._S=[],d=0;d<256;d++)c[d]=d;d=0;for(var f=0;d<256;d++){var p=d%u,m=s[p>>>2]>>>24-p%4*8&255;f=(f+c[d]+m)%256;var v=c[d];c[d]=c[f],c[f]=v}this._i=this._j=0},_doProcessBlock:function(l,s){l[s]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var l=this._S,s=this._i,u=this._j,c=0,d=0;d<4;d++){u=(u+l[s=(s+1)%256])%256;var f=l[s];l[s]=l[u],l[u]=f,c|=l[(l[s]+l[u])%256]<<24-8*d}return this._i=s,this._j=u,c}t.RC4=n._createHelper(o);var a=r.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)i.call(this)}});t.RC4Drop=n._createHelper(a)}(),e.RC4}(kr(),D1(),O1(),Dp(),Zi())),X1e||(X1e=1,WXe.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=[],i=[],a=[],l=r.Rabbit=n.extend({_doReset:function(){for(var u=this._key.words,c=this.cfg.iv,d=0;d<4;d++)u[d]=16711935&(u[d]<<8|u[d]>>>24)|4278255360&(u[d]<<24|u[d]>>>8);var f=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],p=this._C=[u[2]<<16|u[2]>>>16,4294901760&u[0]|65535&u[1],u[3]<<16|u[3]>>>16,4294901760&u[1]|65535&u[2],u[0]<<16|u[0]>>>16,4294901760&u[2]|65535&u[3],u[1]<<16|u[1]>>>16,4294901760&u[3]|65535&u[0]];for(this._b=0,d=0;d<4;d++)s.call(this);for(d=0;d<8;d++)p[d]^=f[d+4&7];if(c){var m=c.words,v=m[0],g=m[1],b=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),y=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),w=b>>>16|4294901760&y,x=y<<16|65535&b;for(p[0]^=b,p[1]^=w,p[2]^=y,p[3]^=x,p[4]^=b,p[5]^=w,p[6]^=y,p[7]^=x,d=0;d<4;d++)s.call(this)}},_doProcessBlock:function(u,c){var d=this._X;s.call(this),o[0]=d[0]^d[5]>>>16^d[3]<<16,o[1]=d[2]^d[7]>>>16^d[5]<<16,o[2]=d[4]^d[1]>>>16^d[7]<<16,o[3]=d[6]^d[3]>>>16^d[1]<<16;for(var f=0;f<4;f++)o[f]=16711935&(o[f]<<8|o[f]>>>24)|4278255360&(o[f]<<24|o[f]>>>8),u[c+f]^=o[f]},blockSize:4,ivSize:2});function s(){for(var u=this._X,c=this._C,d=0;d<8;d++)i[d]=c[d];for(c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<i[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<i[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<i[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<i[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<i[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<i[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<i[6]>>>0?1:0)|0,this._b=c[7]>>>0<i[7]>>>0?1:0,d=0;d<8;d++){var f=u[d]+c[d],p=65535&f,m=f>>>16,v=((p*p>>>17)+p*m>>>15)+m*m,g=((4294901760&f)*f|0)+((65535&f)*f|0);a[d]=v^g}u[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,u[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,u[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,u[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,u[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,u[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,u[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,u[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=n._createHelper(l)}(),e.Rabbit}(kr(),D1(),O1(),Dp(),Zi())),Q1e||(Q1e=1,GXe.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,o=[],i=[],a=[],l=r.RabbitLegacy=n.extend({_doReset:function(){var u=this._key.words,c=this.cfg.iv,d=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],f=this._C=[u[2]<<16|u[2]>>>16,4294901760&u[0]|65535&u[1],u[3]<<16|u[3]>>>16,4294901760&u[1]|65535&u[2],u[0]<<16|u[0]>>>16,4294901760&u[2]|65535&u[3],u[1]<<16|u[1]>>>16,4294901760&u[3]|65535&u[0]];this._b=0;for(var p=0;p<4;p++)s.call(this);for(p=0;p<8;p++)f[p]^=d[p+4&7];if(c){var m=c.words,v=m[0],g=m[1],b=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),y=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),w=b>>>16|4294901760&y,x=y<<16|65535&b;for(f[0]^=b,f[1]^=w,f[2]^=y,f[3]^=x,f[4]^=b,f[5]^=w,f[6]^=y,f[7]^=x,p=0;p<4;p++)s.call(this)}},_doProcessBlock:function(u,c){var d=this._X;s.call(this),o[0]=d[0]^d[5]>>>16^d[3]<<16,o[1]=d[2]^d[7]>>>16^d[5]<<16,o[2]=d[4]^d[1]>>>16^d[7]<<16,o[3]=d[6]^d[3]>>>16^d[1]<<16;for(var f=0;f<4;f++)o[f]=16711935&(o[f]<<8|o[f]>>>24)|4278255360&(o[f]<<24|o[f]>>>8),u[c+f]^=o[f]},blockSize:4,ivSize:2});function s(){for(var u=this._X,c=this._C,d=0;d<8;d++)i[d]=c[d];for(c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<i[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<i[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<i[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<i[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<i[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<i[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<i[6]>>>0?1:0)|0,this._b=c[7]>>>0<i[7]>>>0?1:0,d=0;d<8;d++){var f=u[d]+c[d],p=65535&f,m=f>>>16,v=((p*p>>>17)+p*m>>>15)+m*m,g=((4294901760&f)*f|0)+((65535&f)*f|0);a[d]=v^g}u[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,u[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,u[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,u[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,u[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,u[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,u[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,u[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=n._createHelper(l)}(),e.RabbitLegacy}(kr(),D1(),O1(),Dp(),Zi())),qXe());let eve,tve,nve,rve,ove,ive,ave,lve,OL,sve,uve,cve,dve,fve,pve,hve,vve,mve,gve,yve,bve,Ave,wve,xve,_ve,Eve,Cve;UDe=_l(X0e.exports),Hw=()=>({uploadUrl:"http://localhost:48080/admin-api/infra/file/upload",httpRequest:async e=>new Promise((t,n)=>{var r;(r={file:e.file},No.upload({url:"/infra/file/upload",data:r})).then(o=>{o.code===0?t(o):n(o)}).catch(o=>{n(o)})})}),Cw=()=>{const{t:e}=hc();return{info(t){El.info(t)},error(t){El.error(t)},success(t){El.success(t)},warning(t){El.warning(t)},alert(t){gc.alert(t,e("common.confirmTitle"))},alertError(t){gc.alert(t,e("common.confirmTitle"),{type:"error"})},alertSuccess(t){gc.alert(t,e("common.confirmTitle"),{type:"success"})},alertWarning(t){gc.alert(t,e("common.confirmTitle"),{type:"warning"})},notify(t){$d.info(t)},notifyError(t){$d.error(t)},notifySuccess(t){$d.success(t)},notifyWarning(t){$d.warning(t)},confirm:(t,n)=>gc.confirm(t,n||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"}),delConfirm:(t,n)=>gc.confirm(t||e("common.delMessage"),n||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"}),exportConfirm:(t,n)=>gc.confirm(t||e("common.exportMessage"),n||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"}),prompt:(t,n)=>gc.prompt(t,n,{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})}},eve={class:"upload-box"},tve=["src"],nve={key:0},rve={key:0},ove={key:0},ive={key:1,class:"upload-empty"},ave={class:"el-upload__tip"},lve=Te({name:"UploadImg",__name:"UploadImg",props:{modelValue:Xn.string.def(""),drag:Xn.bool.def(!0),disabled:Xn.bool.def(!1),fileSize:Xn.number.def(5),fileType:Xn.array.def(["image/jpeg","image/png","image/gif"]),height:Xn.string.def("150px"),width:Xn.string.def("150px"),borderradius:Xn.string.def("8px"),showDelete:Xn.bool.def(!0),showBtnText:Xn.bool.def(!0)},emits:["update:modelValue"],setup(e,{emit:t}){IM(m=>({"6d5e56db":e.width,"249d8ab2":e.height,"020e7509":e.borderradius}));const n=e,{t:r}=hc(),o=Cw(),i=de("id-"+ZQ()),a=t,l=()=>{a("update:modelValue","")},{uploadUrl:s,httpRequest:u}=Hw(),c=()=>{const m=document.querySelector(`#${i.value} .el-upload__input`);m&&m.dispatchEvent(new MouseEvent("click"))},d=m=>{const v=m.size/1024/1024<n.fileSize,g=n.fileType;return g.includes(m.type)||o.notifyWarning("\u4E0A\u4F20\u56FE\u7247\u4E0D\u7B26\u5408\u6240\u9700\u7684\u683C\u5F0F\uFF01"),v||o.notifyWarning(`\u4E0A\u4F20\u56FE\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7 ${n.fileSize}M\uFF01`),g.includes(m.type)&&v},f=m=>{o.success("\u4E0A\u4F20\u6210\u529F"),a("update:modelValue",m.data)},p=()=>{o.notifyError("\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u60A8\u91CD\u65B0\u4E0A\u4F20\uFF01")};return(m,v)=>{const g=mm,b=Am;return Y(),fe("div",eve,[ie(b,{id:M(i),accept:e.fileType.join(","),action:M(s),"before-upload":d,class:oe(["upload",e.drag?"no-border":""]),disabled:e.disabled,drag:e.drag,"http-request":M(u),multiple:!1,"on-error":p,"on-success":f,"show-file-list":!1},{default:he(()=>[e.modelValue?(Y(),fe(bt,{key:0},[ce("img",{src:e.modelValue,class:"upload-image"},null,8,tve),ce("div",{class:"upload-handle",onClick:v[1]||(v[1]=Gt(()=>{},["stop"]))},[e.disabled?Fe("",!0):(Y(),fe("div",{key:0,class:"handle-icon",onClick:c},[ie(g,{icon:"ep:edit"}),e.showBtnText?(Y(),fe("span",nve,Ye(M(r)("action.edit")),1)):Fe("",!0)])),ce("div",{class:"handle-icon",onClick:v[0]||(v[0]=y=>{QQ({zIndex:9999999,urlList:[e.modelValue]})})},[ie(g,{icon:"ep:zoom-in"}),e.showBtnText?(Y(),fe("span",rve,Ye(M(r)("action.detail")),1)):Fe("",!0)]),e.showDelete&&!e.disabled?(Y(),fe("div",{key:1,class:"handle-icon",onClick:l},[ie(g,{icon:"ep:delete"}),e.showBtnText?(Y(),fe("span",ove,Ye(M(r)("action.del")),1)):Fe("",!0)])):Fe("",!0)])],64)):(Y(),fe("div",ive,[ft(m.$slots,"empty",{},()=>[ie(g,{icon:"ep:plus"})],!0)]))]),_:3},8,["id","accept","action","class","disabled","drag","http-request"]),ce("div",ave,[ft(m.$slots,"tip",{},void 0,!0)])])}}}),LQ=Ew(lve,[["__scopeId","data-v-a1738e95"]]),OL=e=>(xw("data-v-4f29753c"),e=e(),_w(),e),sve={class:"upload-box"},uve={class:"upload-empty"},cve=["src"],dve=["onClick"],fve=OL(()=>ce("span",null,"\u67E5\u770B",-1)),pve=["onClick"],hve=OL(()=>ce("span",null,"\u5220\u9664",-1)),vve={class:"el-upload__tip"},mve=Te({name:"UploadImgs",__name:"UploadImgs",props:{modelValue:Xn.oneOfType([String,Array]).isRequired,drag:Xn.bool.def(!0),disabled:Xn.bool.def(!1),limit:Xn.number.def(5),fileSize:Xn.number.def(5),fileType:Xn.array.def(["image/jpeg","image/png","image/gif"]),height:Xn.string.def("150px"),width:Xn.string.def("150px"),borderradius:Xn.string.def("8px")},emits:["update:modelValue"],setup(e,{emit:t}){IM(b=>({"7cb317ca":e.borderradius,"28096fee":e.width,"799ebf44":e.height}));const n=Cw(),r=e,{uploadUrl:o,httpRequest:i}=Hw(),a=de([]),l=de(0),s=de([]),u=b=>{const y=b.size/1024/1024<r.fileSize,w=r.fileType;return w.includes(b.type)||$d({title:"\u6E29\u99A8\u63D0\u793A",message:"\u4E0A\u4F20\u56FE\u7247\u4E0D\u7B26\u5408\u6240\u9700\u7684\u683C\u5F0F\uFF01",type:"warning"}),y||$d({title:"\u6E29\u99A8\u63D0\u793A",message:`\u4E0A\u4F20\u56FE\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7 ${r.fileSize}M\uFF01`,type:"warning"}),l.value++,w.includes(b.type)&&y},c=t,d=b=>{n.success("\u4E0A\u4F20\u6210\u529F");const y=a.value.findIndex(w=>{var x;return((x=w.response)==null?void 0:x.data)===b.data});a.value.splice(y,1),s.value.push({name:b.data,url:b.data}),s.value.length==l.value&&(a.value.push(...s.value),s.value=[],l.value=0,f())};Je(()=>r.modelValue,b=>{b?(a.value=[],a.value.push(...b.map(y=>({name:y.substring(y.lastIndexOf("/")+1),url:y})))):a.value=[]},{immediate:!0,deep:!0});const f=()=>{let b=a.value.map(y=>y.url);c("update:modelValue",b)},p=()=>{$d({title:"\u6E29\u99A8\u63D0\u793A",message:"\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u60A8\u91CD\u65B0\u4E0A\u4F20\uFF01",type:"error"})},m=()=>{$d({title:"\u6E29\u99A8\u63D0\u793A",message:`\u5F53\u524D\u6700\u591A\u53EA\u80FD\u4E0A\u4F20 ${r.limit} \u5F20\u56FE\u7247\uFF0C\u8BF7\u79FB\u9664\u540E\u4E0A\u4F20\uFF01`,type:"warning"})},v=de(""),g=de(!1);return(b,y)=>{const w=mm,x=Am,_=qO;return Y(),fe("div",sve,[ie(x,{"file-list":M(a),"onUpdate:fileList":y[1]||(y[1]=E=>Jn(a)?a.value=E:null),accept:e.fileType.join(","),action:M(o),"before-upload":u,class:oe(["upload",e.drag?"no-border":""]),disabled:e.disabled,drag:e.drag,"http-request":M(i),limit:e.limit,multiple:!0,"on-error":p,"on-exceed":m,"on-success":d,"list-type":"picture-card"},{file:he(({file:E})=>[ce("img",{src:E.url,class:"upload-image"},null,8,cve),ce("div",{class:"upload-handle",onClick:y[0]||(y[0]=Gt(()=>{},["stop"]))},[ce("div",{class:"handle-icon",onClick:C=>{return T=E,v.value=T.url,void(g.value=!0);var T}},[ie(w,{icon:"ep:zoom-in"}),fve],8,dve),e.disabled?Fe("",!0):(Y(),fe("div",{key:0,class:"handle-icon",onClick:C=>{return T=E,a.value=a.value.filter(k=>k.url!==T.url||k.name!==T.name),void c("update:modelValue",a.value.map(k=>k.url));var T}},[ie(w,{icon:"ep:delete"}),hve],8,pve))])]),default:he(()=>[ce("div",uve,[ft(b.$slots,"empty",{},()=>[ie(w,{icon:"ep:plus"})],!0)])]),_:3},8,["file-list","accept","action","class","disabled","drag","http-request","limit"]),ce("div",vve,[ft(b.$slots,"tip",{},void 0,!0)]),M(g)?(Y(),Pe(_,{key:0,"url-list":[M(v)],onClose:y[2]||(y[2]=E=>g.value=!1)},null,8,["url-list"])):Fe("",!0)])}}}),PQ=Ew(mve,[["__scopeId","data-v-4f29753c"]]),gve={class:"upload-file"},yve={style:{"font-size":"8px"}},bve={style:{color:"#f56c6c"}},Ave={style:{"font-size":"8px"}},wve={style:{color:"#f56c6c"}},xve={class:"flex items-center"},_ve={class:"ml-10px"},Eve={class:"ml-10px"},Cve=Te({name:"UploadFile",__name:"UploadFile",props:{modelValue:Xn.oneOfType([String,Array]).isRequired,fileType:Xn.array.def(["doc","xls","ppt","txt","pdf"]),fileSize:Xn.number.def(5),limit:Xn.number.def(5),autoUpload:Xn.bool.def(!0),drag:Xn.bool.def(!1),isShowTip:Xn.bool.def(!0),disabled:Xn.bool.def(!1)},emits:["update:modelValue"],setup(e,{emit:t}){const n=Cw(),r=t,o=e,i=de(),a=de([]),l=de([]),s=de(0),{uploadUrl:u,httpRequest:c}=Hw(),d=y=>{if(l.value.length>=o.limit)return n.error(`\u4E0A\u4F20\u6587\u4EF6\u6570\u91CF\u4E0D\u80FD\u8D85\u8FC7${o.limit}\u4E2A!`),!1;let w="";y.name.lastIndexOf(".")>-1&&(w=y.name.slice(y.name.lastIndexOf(".")+1));const x=o.fileType.some(E=>y.type.indexOf(E)>-1||!!(w&&w.indexOf(E)>-1)),_=y.size<1024*o.fileSize*1024;return x?_?(n.success("\u6B63\u5728\u4E0A\u4F20\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u5019..."),void s.value++):(n.error(`\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7${o.fileSize}MB!`),!1):(n.error(`\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E, \u8BF7\u4E0A\u4F20${o.fileType.join("/")}\u683C\u5F0F!`),!1)},f=y=>{n.success("\u4E0A\u4F20\u6210\u529F");const w=l.value.findIndex(x=>{var _;return((_=x.response)==null?void 0:_.data)===y.data});l.value.splice(w,1),a.value.push({name:y.data,url:y.data}),a.value.length==s.value&&(l.value.push(...a.value),a.value=[],s.value=0,b())},p=()=>{n.error(`\u4E0A\u4F20\u6587\u4EF6\u6570\u91CF\u4E0D\u80FD\u8D85\u8FC7${o.limit}\u4E2A!`)},m=()=>{n.error("\u5BFC\u5165\u6570\u636E\u5931\u8D25\uFF0C\u8BF7\u60A8\u91CD\u65B0\u4E0A\u4F20\uFF01")},v=y=>{const w=l.value.map(x=>x.name).indexOf(y.name);w>-1&&(l.value.splice(w,1),b())},g=y=>{console.log(y)};Je(()=>o.modelValue,y=>{y?(l.value=[],E3(y)?l.value.push(...y.split(",").map(w=>({name:w.substring(w.lastIndexOf("/")+1),url:w}))):l.value.push(...y.map(w=>({name:w.substring(w.lastIndexOf("/")+1),url:w})))):l.value=[]},{immediate:!0,deep:!0});const b=()=>{let y=l.value.map(w=>w.url);(o.limit===1||E3(o.modelValue))&&(y=y.join(",")),r("update:modelValue",y)};return(y,w)=>{const x=mm,_=Sa,E=yQ,C=Am;return Y(),fe("div",gve,[ie(C,{ref_key:"uploadRef",ref:i,"file-list":M(l),"onUpdate:fileList":w[0]||(w[0]=T=>Jn(l)?l.value=T:null),action:M(u),"auto-upload":e.autoUpload,"before-upload":d,disabled:e.disabled,drag:e.drag,"http-request":M(c),limit:o.limit,multiple:o.limit>1,"on-error":m,"on-exceed":p,"on-preview":g,"on-remove":v,"on-success":f,"show-file-list":!0,class:"upload-file-uploader",name:"file"},Ff({file:he(T=>[ce("div",xve,[ce("span",null,Ye(T.file.name),1),ce("div",_ve,[ie(E,{href:T.file.url,underline:!1,download:"",target:"_blank",type:"primary"},{default:he(()=>[Dt(" \u4E0B\u8F7D ")]),_:2},1032,["href"])]),ce("div",Eve,[ie(_,{link:"",type:"danger",onClick:k=>v(T.file)},{default:he(()=>[Dt(" \u5220\u9664")]),_:2},1032,["onClick"])])])]),default:he(()=>[e.disabled?Fe("",!0):(Y(),Pe(_,{key:0,type:"primary"},{default:he(()=>[ie(x,{icon:"ep:upload-filled"}),Dt(" \u9009\u53D6\u6587\u4EF6 ")]),_:1}))]),_:2},[e.isShowTip&&!e.disabled?{name:"tip",fn:he(()=>[ce("div",yve,[Dt(" \u5927\u5C0F\u4E0D\u8D85\u8FC7 "),ce("b",bve,Ye(e.fileSize)+"MB",1)]),ce("div",Ave,[Dt(" \u683C\u5F0F\u4E3A "),ce("b",wve,Ye(e.fileType.join("/")),1),Dt(" \u7684\u6587\u4EF6 ")])]),key:"0"}:void 0]),1032,["file-list","action","auto-upload","disabled","drag","http-request","limit","multiple"])])}}}),jQ=Ew(Cve,[["__scopeId","data-v-8d835371"]]);function R_(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!oo(e)}const TL=e=>Te({name:e.name,props:{labelField:{type:String,default:()=>e.labelField??"label"},valueField:{type:String,default:()=>e.valueField??"value"},url:{type:String,default:()=>e.url??""},method:{type:String,default:"GET"},parseFunc:{type:String,default:""},data:{type:String,default:""},selectType:{type:String,default:"select"},multiple:{type:Boolean,default:!1},remote:{type:Boolean,default:!1},remoteField:{type:String,default:"label"}},setup(t){const n=yc(),r=de([]),o=de(!1),i=de(),a=async()=>{if(r.value=[],!x3(t.url))switch(t.method){case"GET":let m=t.url;t.remote&&(m=`${m}?${t.remoteField}=${i.value}`),l(await No.get({url:m}));break;case"POST":const v=function(g){try{return JSON.parse(g)}catch{return console.error(`str[${g}] \u4E0D\u662F\u4E00\u4E2A JSON \u5B57\u7B26\u4E32`),""}}(t.data);t.remote&&(v[t.remoteField]=i.value),l(await No.post({url:t.url,data:v}))}};function l(m){var v;x3(t.parseFunc)?Array.isArray(m)||(m=m.list)&&Array.isArray(m)?s(m):console.warn(`\u63A5\u53E3[${t.url}] \u8FD4\u56DE\u7ED3\u679C\u4E0D\u662F iailab-plat \u6807\u51C6\u8FD4\u56DE\u5EFA\u8BAE\u91C7\u7528\u81EA\u5B9A\u4E49\u89E3\u6790\u51FD\u6570\u5904\u7406`):r.value=(v=function(){let g=null;return t.parseFunc&&(g=new Function(`return ${t.parseFunc}`)()),g}())==null?void 0:v(m)}function s(m){Array.isArray(m)?r.value=m.map(v=>({label:u(v,t.labelField),value:u(v,t.valueField)})):console.warn(`\u63A5\u53E3[${t.url}] \u8FD4\u56DE\u7ED3\u679C\u4E0D\u662F\u4E00\u4E2A\u6570\u7EC4`)}function u(m,v){return v.indexOf("${")===-1?m[v]:v.replace(/\$\{([^}]*)}/g,(g,b)=>{const y=m[b.trim()];return y||console.warn(`\u63A5\u53E3\u9009\u62E9\u5668\u9009\u9879\u6A21\u7248[${v}][${b.trim()}] \u89E3\u6790\u503C\u5931\u8D25\u7ED3\u679C\u4E3A[${y}], \u8BF7\u68C0\u67E5\u5C5E\u6027\u540D\u79F0\u662F\u5426\u5B58\u5728\u4E8E\u63A5\u53E3\u8FD4\u56DE\u503C\u4E2D,\u5B58\u5728\u5219\u5FFD\u7565\u6B64\u6761\uFF01\uFF01\uFF01`),y})}const c=async m=>{if(m){o.value=!0;try{i.value=m,await a()}finally{o.value=!1}}};yn(async()=>{await a()});const d=()=>{let m;if(t.multiple){let v;return ie(Qe("el-select"),Un({class:"w-1/1",multiple:!0,loading:o.value},n,{remote:t.remote},t.remote&&{remoteMethod:c}),R_(v=r.value.map((g,b)=>ie(Qe("el-option"),{key:b,label:g.label,value:g.value},null)))?v:{default:()=>[v]})}return ie(Qe("el-select"),Un({class:"w-1/1",loading:o.value},n,{remote:t.remote},t.remote&&{remoteMethod:c}),R_(m=r.value.map((v,g)=>ie(Qe("el-option"),{key:g,label:v.label,value:v.value},null)))?m:{default:()=>[m]})},f=()=>{let m;return x3(r.value)&&(r.value=[{label:"\u9009\u98791",value:"\u9009\u98791"},{label:"\u9009\u98792",value:"\u9009\u98792"}]),ie(Qe("el-checkbox-group"),Un({class:"w-1/1"},n),R_(m=r.value.map((v,g)=>ie(Qe("el-checkbox"),{key:g,label:v.label,value:v.value},null)))?m:{default:()=>[m]})},p=()=>{let m;return x3(r.value)&&(r.value=[{label:"\u9009\u98791",value:"\u9009\u98791"},{label:"\u9009\u98792",value:"\u9009\u98792"}]),ie(Qe("el-radio-group"),Un({class:"w-1/1"},n),R_(m=r.value.map((v,g)=>ie(Qe("el-radio"),{key:g,value:v.value},{default:()=>[v.label]})))?m:{default:()=>[m]})};return()=>ie(bt,null,[t.selectType==="select"?d():t.selectType==="radio"?p():t.selectType==="checkbox"?f():d()])}});var eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T1(e){var t={exports:{}};return e(t,t.exports),t.exports}var Op,I_,B_=function(e){return e&&e.Math==Math&&e},Yn=B_(typeof globalThis=="object"&&globalThis)||B_(typeof window=="object"&&window)||B_(typeof self=="object"&&self)||B_(typeof eo=="object"&&eo)||function(){return this}()||Function("return this")(),ML=Function.prototype,Sve=ML.apply,KXe=ML.bind,kve=ML.call,Dve=typeof Reflect=="object"&&Reflect.apply||(KXe?kve.bind(Sve):function(){return kve.apply(Sve,arguments)}),Ove=Function.prototype,NL=Ove.bind,FL=Ove.call,YXe=NL&&NL.bind(FL),so=NL?function(e){return e&&YXe(FL,e)}:function(e){return e&&function(){return FL.apply(e,arguments)}},Aa=function(e){return typeof e=="function"},Pl=function(e){try{return!!e()}catch{return!0}},jl=!Pl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),X4=Function.prototype.call,As=X4.bind?X4.bind(X4):function(){return X4.apply(X4,arguments)},Tve={}.propertyIsEnumerable,Mve=Object.getOwnPropertyDescriptor,XXe=Mve&&!Tve.call({1:2},1)?function(e){var t=Mve(this,e);return!!t&&t.enumerable}:Tve,RL={f:XXe},Uu=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},QXe=so({}.toString),JXe=so("".slice),M1=function(e){return JXe(QXe(e),8,-1)},IL=Yn.Object,ZXe=so("".split),Nve=Pl(function(){return!IL("z").propertyIsEnumerable(0)})?function(e){return M1(e)=="String"?ZXe(e,""):IL(e)}:IL,eQe=Yn.TypeError,BL=function(e){if(e==null)throw eQe("Can't call method on "+e);return e},$c=function(e){return Nve(BL(e))},ou=function(e){return typeof e=="object"?e!==null:Aa(e)},ws={},Fve=function(e){return Aa(e)?e:void 0},n2=function(e,t){return arguments.length<2?Fve(ws[e])||Fve(Yn[e]):ws[e]&&ws[e][t]||Yn[e]&&Yn[e][t]},Q4=so({}.isPrototypeOf),LL=n2("navigator","userAgent")||"",Rve=Yn.process,Ive=Yn.Deno,Bve=Rve&&Rve.versions||Ive&&Ive.version,Lve=Bve&&Bve.v8;Lve&&(I_=(Op=Lve.split("."))[0]>0&&Op[0]<4?1:+(Op[0]+Op[1])),!I_&&LL&&(!(Op=LL.match(/Edge\/(\d+)/))||Op[1]>=74)&&(Op=LL.match(/Chrome\/(\d+)/))&&(I_=+Op[1]);var L_,P_=I_,Uc=!!Object.getOwnPropertySymbols&&!Pl(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&P_&&P_<41}),PL=Uc&&!Symbol.sham&&typeof Symbol.iterator=="symbol",tQe=Yn.Object,r2=PL?function(e){return typeof e=="symbol"}:function(e){var t=n2("Symbol");return Aa(t)&&Q4(t.prototype,tQe(e))},nQe=Yn.String,jL=function(e){try{return nQe(e)}catch{return"Object"}},rQe=Yn.TypeError,VL=function(e){if(Aa(e))return e;throw rQe(jL(e)+" is not a function")},j_=function(e,t){var n=e[t];return n==null?void 0:VL(n)},oQe=Yn.TypeError,iQe=Object.defineProperty,Tp=Yn["__core-js_shared__"]||function(e,t){try{iQe(Yn,e,{value:t,configurable:!0,writable:!0})}catch{Yn[e]=t}return t}("__core-js_shared__",{}),N1=T1(function(e){(e.exports=function(t,n){return Tp[t]||(Tp[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),aQe=Yn.Object,J4=function(e){return aQe(BL(e))},lQe=so({}.hasOwnProperty),_r=Object.hasOwn||function(e,t){return lQe(J4(e),t)},sQe=0,uQe=Math.random(),cQe=so(1 .toString),V_=function(e){return"Symbol("+(e===void 0?"":e)+")_"+cQe(++sQe+uQe,36)},Z4=N1("wks"),F1=Yn.Symbol,Pve=F1&&F1.for,dQe=PL?F1:F1&&F1.withoutSetter||V_,Na=function(e){if(!_r(Z4,e)||!Uc&&typeof Z4[e]!="string"){var t="Symbol."+e;Uc&&_r(F1,e)?Z4[e]=F1[e]:Z4[e]=PL&&Pve?Pve(t):dQe(t)}return Z4[e]},fQe=Yn.TypeError,pQe=Na("toPrimitive"),o2=function(e){var t=function(n,r){if(!ou(n)||r2(n))return n;var o,i=j_(n,pQe);if(i){if(o=As(i,n,r),!ou(o)||r2(o))return o;throw fQe("Can't convert object to primitive value")}return function(a){var l,s;if(Aa(l=a.toString)&&!ou(s=As(l,a))||Aa(l=a.valueOf)&&!ou(s=As(l,a)))return s;throw oQe("Can't convert object to primitive value")}(n)}(e,"string");return r2(t)?t:t+""},zL=Yn.document,hQe=ou(zL)&&ou(zL.createElement),jve=function(e){return hQe?zL.createElement(e):{}},Vve=!jl&&!Pl(function(){return Object.defineProperty(jve("div"),"a",{get:function(){return 7}}).a!=7}),zve=Object.getOwnPropertyDescriptor,vQe=jl?zve:function(e,t){if(e=$c(e),t=o2(t),Vve)try{return zve(e,t)}catch{}if(_r(e,t))return Uu(!As(RL.f,e,t),e[t])},z_={f:vQe},mQe=/#|\.prototype\./,e6=function(e,t){var n=yQe[gQe(e)];return n==AQe||n!=bQe&&(Aa(t)?Pl(t):!!t)},gQe=e6.normalize=function(e){return String(e).replace(mQe,".").toLowerCase()},yQe=e6.data={},bQe=e6.NATIVE="N",AQe=e6.POLYFILL="P",wQe=e6,Hve=so(so.bind),HL=function(e,t){return VL(e),t===void 0?e:Hve?Hve(e,t):function(){return e.apply(t,arguments)}},xQe=Yn.String,_Qe=Yn.TypeError,xs=function(e){if(ou(e))return e;throw _Qe(xQe(e)+" is not an object")},EQe=Yn.TypeError,$ve=Object.defineProperty,CQe=jl?$ve:function(e,t,n){if(xs(e),t=o2(t),xs(n),Vve)try{return $ve(e,t,n)}catch{}if("get"in n||"set"in n)throw EQe("Accessors not supported");return"value"in n&&(e[t]=n.value),e},Mp={f:CQe},ll=jl?function(e,t,n){return Mp.f(e,t,Uu(1,n))}:function(e,t,n){return e[t]=n,e},SQe=z_.f,kQe=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return Dve(e,this,arguments)};return t.prototype=e.prototype,t},Qd=function(e,t){var n,r,o,i,a,l,s,u,c=e.target,d=e.global,f=e.stat,p=e.proto,m=d?Yn:f?Yn[c]:(Yn[c]||{}).prototype,v=d?ws:ws[c]||ll(ws,c,{})[c],g=v.prototype;for(o in t)n=!wQe(d?o:c+(f?".":"#")+o,e.forced)&&m&&_r(m,o),a=v[o],n&&(l=e.noTargetGet?(u=SQe(m,o))&&u.value:m[o]),i=n&&l?l:t[o],n&&typeof a==typeof i||(s=e.bind&&n?HL(i,Yn):e.wrap&&n?kQe(i):p&&Aa(i)?so(i):i,(e.sham||i&&i.sham||a&&a.sham)&&ll(s,"sham",!0),ll(v,o,s),p&&(_r(ws,r=c+"Prototype")||ll(ws,r,{}),ll(ws[r],o,i),e.real&&g&&!g[o]&&ll(g,o,i)))},Uve=N1("keys"),H_=function(e){return Uve[e]||(Uve[e]=V_(e))},DQe=!Pl(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Wve=H_("IE_PROTO"),$L=Yn.Object,OQe=$L.prototype,$_=DQe?$L.getPrototypeOf:function(e){var t=J4(e);if(_r(t,Wve))return t[Wve];var n=t.constructor;return Aa(n)&&t instanceof n?n.prototype:t instanceof $L?OQe:null},TQe=Yn.String,MQe=Yn.TypeError,U_=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=so(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,o){return xs(r),function(i){if(typeof i=="object"||Aa(i))return i;throw MQe("Can't set "+TQe(i)+" as a prototype")}(o),t?e(r,o):r.__proto__=o,r}}():void 0),NQe=Math.ceil,FQe=Math.floor,UL=function(e){var t=+e;return t!=t||t===0?0:(t>0?FQe:NQe)(t)},RQe=Math.max,IQe=Math.min,WL=function(e,t){var n=UL(e);return n<0?RQe(n+t,0):IQe(n,t)},BQe=Math.min,t6=function(e){return(t=e.length)>0?BQe(UL(t),9007199254740991):0;var t},Gve=function(e){return function(t,n,r){var o,i=$c(t),a=t6(i),l=WL(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},LQe={includes:Gve(!0),indexOf:Gve(!1)},n6={},PQe=LQe.indexOf,qve=so([].push),Kve=function(e,t){var n,r=$c(e),o=0,i=[];for(n in r)!_r(n6,n)&&_r(r,n)&&qve(i,n);for(;t.length>o;)_r(r,n=t[o++])&&(~PQe(i,n)||qve(i,n));return i},W_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jQe=W_.concat("length","prototype"),VQe=Object.getOwnPropertyNames||function(e){return Kve(e,jQe)},GL={f:VQe},G_={f:Object.getOwnPropertySymbols},zQe=so([].concat),HQe=n2("Reflect","ownKeys")||function(e){var t=GL.f(xs(e)),n=G_.f;return n?zQe(t,n(e)):t},qL=Object.keys||function(e){return Kve(e,W_)},$Qe=jl?Object.defineProperties:function(e,t){xs(e);for(var n,r=$c(t),o=qL(t),i=o.length,a=0;i>a;)Mp.f(e,n=o[a++],r[n]);return e},UQe=n2("document","documentElement"),Yve=H_("IE_PROTO"),KL=function(){},Xve=function(e){return"<script>"+e+"<\/script>"},Qve=function(e){e.write(Xve("")),e.close();var t=e.parentWindow.Object;return e=null,t},q_=function(){try{L_=new ActiveXObject("htmlfile")}catch{}var e,t;q_=typeof document<"u"?document.domain&&L_?Qve(L_):((t=jve("iframe")).style.display="none",UQe.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(Xve("document.F=Object")),e.close(),e.F):Qve(L_);for(var n=W_.length;n--;)delete q_.prototype[W_[n]];return q_()};n6[Yve]=!0;var Jd=Object.create||function(e,t){var n;return e!==null?(KL.prototype=xs(e),n=new KL,KL.prototype=null,n[Yve]=e):n=q_(),t===void 0?n:$Qe(n,t)},YL=function(e,t,n){var r=o2(t);r in e?Mp.f(e,r,Uu(0,n)):e[r]=n},WQe=Yn.Array,GQe=Math.max,Jve=function(e,t,n){for(var r=t6(e),o=WL(t,r),i=WL(r,r),a=WQe(GQe(i-o,0)),l=0;o<i;o++,l++)YL(a,l,e[o]);return a.length=l,a},qQe=so("".replace),KQe=so("".split),YQe=so([].join),XL=String(Error("zxcasd").stack),Zve=/\n\s*at [^:]*:[^\n]*/,XQe=Zve.test(XL),QQe=/@[^\n]*\n/.test(XL)&&!/zxcasd/.test(XL),Zd={},JQe=Na("iterator"),ZQe=Array.prototype,eme={};eme[Na("toStringTag")]="z";var QL=String(eme)==="[object z]",eJe=Na("toStringTag"),tJe=Yn.Object,nJe=M1(function(){return arguments}())=="Arguments",r6=QL?M1:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=tJe(e),eJe))=="string"?n:nJe?M1(t):(r=M1(t))=="Object"&&Aa(t.callee)?"Arguments":r},rJe=Na("iterator"),tme=function(e){if(e!=null)return j_(e,rJe)||j_(e,"@@iterator")||Zd[r6(e)]},oJe=Yn.TypeError,nme=function(e,t,n){var r,o;xs(e);try{if(!(r=j_(e,"return"))){if(t==="throw")throw n;return n}r=As(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return xs(r),n},iJe=Yn.TypeError,K_=function(e,t){this.stopped=e,this.result=t},rme=K_.prototype,aJe=Yn.String,o6=function(e){if(r6(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return aJe(e)},lJe=!Pl(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Uu(1,7)),e.stack!==7)}),sJe=Na("toStringTag"),Y_=Yn.Error,uJe=[].push,i6=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,o=Q4(JL,this);U_?n=U_(new Y_(void 0),o?$_(this):JL):(n=o?this:Jd(JL),ll(n,sJe,"Error")),ll(n,"message",function(a,l){return a===void 0?arguments.length<2?"":l:o6(a)}(t,"")),lJe&&ll(n,"stack",function(a,l){if(typeof a!="string")return a;if(XQe)for(;l--;)a=qQe(a,Zve,"");else if(QQe)return YQe(Jve(KQe(a,` |
|
988 |
`),l),` |
|
989 |
`);return a}(n.stack,1)),function(a,l){ou(l)&&"cause"in l&&ll(a,"cause",l.cause)}(n,r);var i=[];return function(a,l,s){var u,c,d,f,p,m,v,g=s&&s.that,b=!(!s||!s.AS_ENTRIES),y=!(!s||!s.IS_ITERATOR),w=!(!s||!s.INTERRUPTED),x=HL(l,g),_=function(C){return u&&nme(u,"normal",C),new K_(!0,C)},E=function(C){return b?(xs(C),w?x(C[0],C[1],_):x(C[0],C[1])):w?x(C,_):x(C)};if(y)u=a;else{if(!(c=tme(a)))throw iJe(jL(a)+" is not iterable");if(function(C){return C!==void 0&&(Zd.Array===C||ZQe[JQe]===C)}(c)){for(d=0,f=t6(a);f>d;d++)if((p=E(a[d]))&&Q4(rme,p))return p;return new K_(!1)}u=function(C,T){var k=arguments.length<2?tme(C):T;if(VL(k))return xs(As(k,C));throw oJe(jL(C)+" is not iterable")}(a,c)}for(m=u.next;!(v=As(m,u)).done;){try{p=E(v.value)}catch(C){nme(u,"throw",C)}if(typeof p=="object"&&p&&Q4(rme,p))return p}new K_(!1)}(e,uJe,{that:i}),ll(n,"errors",i),n};U_?U_(i6,Y_):function(e,t){for(var n=HQe(t),r=Mp.f,o=z_.f,i=0;i<n.length;i++){var a=n[i];_r(e,a)||r(e,a,o(t,a))}}(i6,Y_);var JL=i6.prototype=Jd(Y_.prototype,{constructor:Uu(1,i6),message:Uu(1,""),name:Uu(1,"AggregateError")});Qd({global:!0},{AggregateError:i6});var cJe=so(Function.toString);Aa(Tp.inspectSource)||(Tp.inspectSource=function(e){return cJe(e)});var X_,a6,Q_,ome=Tp.inspectSource,ime=Yn.WeakMap,dJe=Aa(ime)&&/native code/.test(ome(ime)),ZL=Yn.TypeError,fJe=Yn.WeakMap;if(dJe||Tp.state){var R1=Tp.state||(Tp.state=new fJe),pJe=so(R1.get),ame=so(R1.has),hJe=so(R1.set);X_=function(e,t){if(ame(R1,e))throw new ZL("Object already initialized");return t.facade=e,hJe(R1,e,t),t},a6=function(e){return pJe(R1,e)||{}},Q_=function(e){return ame(R1,e)}}else{var i2=H_("state");n6[i2]=!0,X_=function(e,t){if(_r(e,i2))throw new ZL("Object already initialized");return t.facade=e,ll(e,i2,t),t},a6=function(e){return _r(e,i2)?e[i2]:{}},Q_=function(e){return _r(e,i2)}}var Np,lme,sme,a2={set:X_,get:a6,has:Q_,enforce:function(e){return Q_(e)?a6(e):X_(e,{})},getterFor:function(e){return function(t){var n;if(!ou(t)||(n=a6(t)).type!==e)throw ZL("Incompatible receiver, "+e+" required");return n}}},ume=Function.prototype,vJe=jl&&Object.getOwnPropertyDescriptor,eP=_r(ume,"name"),mJe={EXISTS:eP,PROPER:eP&&(function(){}).name==="something",CONFIGURABLE:eP&&(!jl||jl&&vJe(ume,"name").configurable)},J_=function(e,t,n,r){ll(e,t,n)},tP=Na("iterator"),cme=!1;[].keys&&("next"in(sme=[].keys())?(lme=$_($_(sme)))!==Object.prototype&&(Np=lme):cme=!0);var gJe=Np==null||Pl(function(){var e={};return Np[tP].call(e)!==e});Np=gJe?{}:Jd(Np),Aa(Np[tP])||J_(Np,tP,function(){return this});var dme={IteratorPrototype:Np,BUGGY_SAFARI_ITERATORS:cme},yJe=QL?{}.toString:function(){return"[object "+r6(this)+"]"},bJe=Mp.f,fme=Na("toStringTag"),Z_=function(e,t,n,r){if(e){var o=n?e:e.prototype;_r(o,fme)||bJe(o,fme,{configurable:!0,value:t}),r&&!QL&&ll(o,"toString",yJe)}},AJe=dme.IteratorPrototype,wJe=function(){return this},xJe=mJe.PROPER,nP=dme.BUGGY_SAFARI_ITERATORS,_Je=Na("iterator"),EJe=function(){return this},pme=function(e,t,n,r,o,i,a){(function(g,b,y){var w=b+" Iterator";g.prototype=Jd(AJe,{next:Uu(1,y)}),Z_(g,w,!1,!0),Zd[w]=wJe})(n,t,r);var l,s,u=function(g){if(g===o&&m)return m;if(!nP&&g in f)return f[g];switch(g){case"keys":case"values":case"entries":return function(){return new n(this,g)}}return function(){return new n(this)}},c=t+" Iterator",d=!1,f=e.prototype,p=f[_Je]||f["@@iterator"]||o&&f[o],m=!nP&&p||u(o),v=t=="Array"&&f.entries||p;return v&&(l=$_(v.call(new e)))!==Object.prototype&&l.next&&(Z_(l,c,!0,!0),Zd[c]=EJe),xJe&&o=="values"&&p&&p.name!=="values"&&(d=!0,m=function(){return As(p,this)}),o&&(s={values:u("values"),keys:u("keys"),entries:u("entries")},a||Qd({target:t,proto:!0,forced:nP||d},s)),Zd[t]=m,s},CJe=a2.set,SJe=a2.getterFor("Array Iterator");pme(Array,"Array",function(e,t){CJe(this,{type:"Array Iterator",target:$c(e),index:0,kind:t})},function(){var e=SJe(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),Zd.Arguments=Zd.Array;var kJe=so("".charAt),hme=so("".charCodeAt),DJe=so("".slice),vme=function(e){return function(t,n){var r,o,i=o6(BL(t)),a=UL(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=hme(i,a))<55296||r>56319||a+1===l||(o=hme(i,a+1))<56320||o>57343?e?kJe(i,a):r:e?DJe(i,a,a+2):o-56320+(r-55296<<10)+65536}},OJe=(vme(!1),vme(!0)),TJe=a2.set,MJe=a2.getterFor("String Iterator");pme(String,"String",function(e){TJe(this,{type:"String Iterator",string:o6(e),index:0})},function(){var e,t=MJe(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=OJe(n,r),t.index+=e.length,{value:e,done:!1})});var NJe=ws.AggregateError,mme=Na("toStringTag");for(var rP in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var gme=Yn[rP],oP=gme&&gme.prototype;oP&&r6(oP)!==mme&&ll(oP,mme,rP),Zd[rP]=Zd.Array}var Fp,eE,FJe=NJe,tE=function(e){return e&&e.Math==Math&&e},Ln=tE(typeof globalThis=="object"&&globalThis)||tE(typeof window=="object"&&window)||tE(typeof self=="object"&&self)||tE(typeof eo=="object"&&eo)||function(){return this}()||Function("return this")(),ea=function(e){try{return!!e()}catch{return!0}},Wc=!ea(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),l6=Function.prototype.call,wa=l6.bind?l6.bind(l6):function(){return l6.apply(l6,arguments)},yme={}.propertyIsEnumerable,bme=Object.getOwnPropertyDescriptor,RJe=bme&&!yme.call({1:2},1)?function(e){var t=bme(this,e);return!!t&&t.enumerable}:yme,IJe={f:RJe},Rp=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Ame=Function.prototype,iP=Ame.bind,aP=Ame.call,BJe=iP&&iP.bind(aP),Kr=iP?function(e){return e&&BJe(aP,e)}:function(e){return e&&function(){return aP.apply(e,arguments)}},LJe=Kr({}.toString),PJe=Kr("".slice),I1=function(e){return PJe(LJe(e),8,-1)},lP=Ln.Object,jJe=Kr("".split),wme=ea(function(){return!lP("z").propertyIsEnumerable(0)})?function(e){return I1(e)=="String"?jJe(e,""):lP(e)}:lP,VJe=Ln.TypeError,nE=function(e){if(e==null)throw VJe("Can't call method on "+e);return e},l2=function(e){return wme(nE(e))},Ri=function(e){return typeof e=="function"},Gc=function(e){return typeof e=="object"?e!==null:Ri(e)},s6=function(e,t){return arguments.length<2?function(n){return Ri(n)?n:void 0}(Ln[e]):Ln[e]&&Ln[e][t]},rE=Kr({}.isPrototypeOf),sP=s6("navigator","userAgent")||"",xme=Ln.process,_me=Ln.Deno,Eme=xme&&xme.versions||_me&&_me.version,Cme=Eme&&Eme.v8;Cme&&(eE=(Fp=Cme.split("."))[0]>0&&Fp[0]<4?1:+(Fp[0]+Fp[1])),!eE&&sP&&(!(Fp=sP.match(/Edge\/(\d+)/))||Fp[1]>=74)&&(Fp=sP.match(/Chrome\/(\d+)/))&&(eE=+Fp[1]);var Sme=eE,uP=!!Object.getOwnPropertySymbols&&!ea(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Sme&&Sme<41}),cP=uP&&!Symbol.sham&&typeof Symbol.iterator=="symbol",zJe=Ln.Object,dP=cP?function(e){return typeof e=="symbol"}:function(e){var t=s6("Symbol");return Ri(t)&&rE(t.prototype,zJe(e))},HJe=Ln.String,fP=function(e){try{return HJe(e)}catch{return"Object"}},$Je=Ln.TypeError,pP=function(e){if(Ri(e))return e;throw $Je(fP(e)+" is not a function")},u6=function(e,t){var n=e[t];return n==null?void 0:pP(n)},UJe=Ln.TypeError,WJe=Object.defineProperty,hP=function(e,t){try{WJe(Ln,e,{value:t,configurable:!0,writable:!0})}catch{Ln[e]=t}return t},Ip=Ln["__core-js_shared__"]||hP("__core-js_shared__",{}),vP=T1(function(e){(e.exports=function(t,n){return Ip[t]||(Ip[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),GJe=Ln.Object,mP=function(e){return GJe(nE(e))},qJe=Kr({}.hasOwnProperty),Vl=Object.hasOwn||function(e,t){return qJe(mP(e),t)},KJe=0,YJe=Math.random(),XJe=Kr(1 .toString),kme=function(e){return"Symbol("+(e===void 0?"":e)+")_"+XJe(++KJe+YJe,36)},c6=vP("wks"),B1=Ln.Symbol,Dme=B1&&B1.for,QJe=cP?B1:B1&&B1.withoutSetter||kme,sl=function(e){if(!Vl(c6,e)||!uP&&typeof c6[e]!="string"){var t="Symbol."+e;uP&&Vl(B1,e)?c6[e]=B1[e]:c6[e]=cP&&Dme?Dme(t):QJe(t)}return c6[e]},JJe=Ln.TypeError,ZJe=sl("toPrimitive"),gP=function(e){var t=function(n,r){if(!Gc(n)||dP(n))return n;var o,i=u6(n,ZJe);if(i){if(o=wa(i,n,r),!Gc(o)||dP(o))return o;throw JJe("Can't convert object to primitive value")}return function(a){var l,s;if(Ri(l=a.toString)&&!Gc(s=wa(l,a))||Ri(l=a.valueOf)&&!Gc(s=wa(l,a)))return s;throw UJe("Can't convert object to primitive value")}(n)}(e,"string");return dP(t)?t:t+""},yP=Ln.document,eZe=Gc(yP)&&Gc(yP.createElement),bP=function(e){return eZe?yP.createElement(e):{}},Ome=!Wc&&!ea(function(){return Object.defineProperty(bP("div"),"a",{get:function(){return 7}}).a!=7}),Tme=Object.getOwnPropertyDescriptor,tZe=Wc?Tme:function(e,t){if(e=l2(e),t=gP(t),Ome)try{return Tme(e,t)}catch{}if(Vl(e,t))return Rp(!wa(IJe.f,e,t),e[t])},AP={f:tZe},nZe=Ln.String,rZe=Ln.TypeError,_s=function(e){if(Gc(e))return e;throw rZe(nZe(e)+" is not an object")},oZe=Ln.TypeError,Mme=Object.defineProperty,iZe=Wc?Mme:function(e,t,n){if(_s(e),t=gP(t),_s(n),Ome)try{return Mme(e,t,n)}catch{}if("get"in n||"set"in n)throw oZe("Accessors not supported");return"value"in n&&(e[t]=n.value),e},s2={f:iZe},zl=Wc?function(e,t,n){return s2.f(e,t,Rp(1,n))}:function(e,t,n){return e[t]=n,e},aZe=Kr(Function.toString);Ri(Ip.inspectSource)||(Ip.inspectSource=function(e){return aZe(e)});var oE,d6,iE,wP=Ip.inspectSource,Nme=Ln.WeakMap,lZe=Ri(Nme)&&/native code/.test(wP(Nme)),Fme=vP("keys"),xP=function(e){return Fme[e]||(Fme[e]=kme(e))},_P={},EP=Ln.TypeError,sZe=Ln.WeakMap;if(lZe||Ip.state){var L1=Ip.state||(Ip.state=new sZe),uZe=Kr(L1.get),Rme=Kr(L1.has),cZe=Kr(L1.set);oE=function(e,t){if(Rme(L1,e))throw new EP("Object already initialized");return t.facade=e,cZe(L1,e,t),t},d6=function(e){return uZe(L1,e)||{}},iE=function(e){return Rme(L1,e)}}else{var u2=xP("state");_P[u2]=!0,oE=function(e,t){if(Vl(e,u2))throw new EP("Object already initialized");return t.facade=e,zl(e,u2,t),t},d6=function(e){return Vl(e,u2)?e[u2]:{}},iE=function(e){return Vl(e,u2)}}var P1={set:oE,get:d6,has:iE,enforce:function(e){return iE(e)?d6(e):oE(e,{})},getterFor:function(e){return function(t){var n;if(!Gc(t)||(n=d6(t)).type!==e)throw EP("Incompatible receiver, "+e+" required");return n}}},Ime=Function.prototype,dZe=Wc&&Object.getOwnPropertyDescriptor,CP=Vl(Ime,"name"),SP={EXISTS:CP,PROPER:CP&&(function(){}).name==="something",CONFIGURABLE:CP&&(!Wc||Wc&&dZe(Ime,"name").configurable)},j1=T1(function(e){var t=SP.CONFIGURABLE,n=P1.get,r=P1.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;Ri(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Vl(l,"name")||t&&l.name!==p)&&zl(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==Ln?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:zl(i,a,l)):d?i[a]=l:hP(a,l)})(Function.prototype,"toString",function(){return Ri(this)&&n(this).source||wP(this)})}),fZe=Math.ceil,pZe=Math.floor,kP=function(e){var t=+e;return t!=t||t===0?0:(t>0?pZe:fZe)(t)},hZe=Math.max,vZe=Math.min,DP=function(e,t){var n=kP(e);return n<0?hZe(n+t,0):vZe(n,t)},mZe=Math.min,Bme=function(e){return e>0?mZe(kP(e),9007199254740991):0},aE=function(e){return Bme(e.length)},Lme=function(e){return function(t,n,r){var o,i=l2(t),a=aE(i),l=DP(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},gZe=(Lme(!0),Lme(!1)),Pme=Kr([].push),jme=function(e,t){var n,r=l2(e),o=0,i=[];for(n in r)!Vl(_P,n)&&Vl(r,n)&&Pme(i,n);for(;t.length>o;)Vl(r,n=t[o++])&&(~gZe(i,n)||Pme(i,n));return i},lE=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yZe=lE.concat("length","prototype"),bZe=Object.getOwnPropertyNames||function(e){return jme(e,yZe)},AZe={f:bZe},wZe={f:Object.getOwnPropertySymbols},xZe=Kr([].concat),_Ze=s6("Reflect","ownKeys")||function(e){var t=AZe.f(_s(e)),n=wZe.f;return n?xZe(t,n(e)):t},Vme=function(e,t){for(var n=_Ze(t),r=s2.f,o=AP.f,i=0;i<n.length;i++){var a=n[i];Vl(e,a)||r(e,a,o(t,a))}},EZe=/#|\.prototype\./,f6=function(e,t){var n=SZe[CZe(e)];return n==DZe||n!=kZe&&(Ri(t)?ea(t):!!t)},CZe=f6.normalize=function(e){return String(e).replace(EZe,".").toLowerCase()},SZe=f6.data={},kZe=f6.NATIVE="N",DZe=f6.POLYFILL="P",OZe=f6,TZe=AP.f,p6=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?Ln:u?Ln[l]||hP(l,{}):(Ln[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=TZe(n,r))&&a.value:n[r],!OZe(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;Vme(i,o)}(e.sham||o&&o.sham)&&zl(i,"sham",!0),j1(n,r,i,e)}},zme={};zme[sl("toStringTag")]="z";var sE,OP=String(zme)==="[object z]",MZe=sl("toStringTag"),NZe=Ln.Object,FZe=I1(function(){return arguments}())=="Arguments",uE=OP?I1:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=NZe(e),MZe))=="string"?n:FZe?I1(t):(r=I1(t))=="Object"&&Ri(t.callee)?"Arguments":r},RZe=Ln.String,V1=function(e){if(uE(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return RZe(e)},IZe=function(){var e=_s(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},TP=Ln.RegExp,MP=ea(function(){var e=TP("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),BZe=MP||ea(function(){return!TP("a","y").sticky}),LZe=MP||ea(function(){var e=TP("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),PZe={BROKEN_CARET:LZe,MISSED_STICKY:BZe,UNSUPPORTED_Y:MP},jZe=Object.keys||function(e){return jme(e,lE)},VZe=Wc?Object.defineProperties:function(e,t){_s(e);for(var n,r=l2(t),o=jZe(t),i=o.length,a=0;i>a;)s2.f(e,n=o[a++],r[n]);return e},zZe=s6("document","documentElement"),Hme=xP("IE_PROTO"),NP=function(){},$me=function(e){return"<script>"+e+"<\/script>"},Ume=function(e){e.write($me("")),e.close();var t=e.parentWindow.Object;return e=null,t},cE=function(){try{sE=new ActiveXObject("htmlfile")}catch{}var e,t;cE=typeof document<"u"?document.domain&&sE?Ume(sE):((t=bP("iframe")).style.display="none",zZe.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write($me("document.F=Object")),e.close(),e.F):Ume(sE);for(var n=lE.length;n--;)delete cE.prototype[lE[n]];return cE()};_P[Hme]=!0;var Wme,FP,h6=Object.create||function(e,t){var n;return e!==null?(NP.prototype=_s(e),n=new NP,NP.prototype=null,n[Hme]=e):n=cE(),t===void 0?n:VZe(n,t)},HZe=Ln.RegExp,$Ze=ea(function(){var e=HZe(".","s");return!(e.dotAll&&e.exec(` |
|
990 |
`)&&e.flags==="s")}),UZe=Ln.RegExp,WZe=ea(function(){var e=UZe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),GZe=P1.get,qZe=vP("native-string-replace",String.prototype.replace),dE=RegExp.prototype.exec,RP=dE,KZe=Kr("".charAt),YZe=Kr("".indexOf),XZe=Kr("".replace),IP=Kr("".slice),BP=(FP=/b*/g,wa(dE,Wme=/a/,"a"),wa(dE,FP,"a"),Wme.lastIndex!==0||FP.lastIndex!==0),Gme=PZe.BROKEN_CARET,LP=/()??/.exec("")[1]!==void 0;(BP||LP||Gme||$Ze||WZe)&&(RP=function(e){var t,n,r,o,i,a,l,s=this,u=GZe(s),c=V1(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=wa(RP,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=Gme&&s.sticky,m=wa(IZe,s),v=s.source,g=0,b=c;if(p&&(m=XZe(m,"y",""),YZe(m,"g")===-1&&(m+="g"),b=IP(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&KZe(c,s.lastIndex-1)!==` |
|
991 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),LP&&(n=new RegExp("^"+v+"$(?!\\s)",m)),BP&&(r=s.lastIndex),o=wa(dE,p?n:s,b),p?o?(o.input=IP(o.input,g),o[0]=IP(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:BP&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),LP&&o&&o.length>1&&wa(qZe,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=h6(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var fE=RP;p6({target:"RegExp",proto:!0,forced:/./.exec!==fE},{exec:fE}),sl("species");var qme=RegExp.prototype,QZe=Kr("".charAt),Kme=Kr("".charCodeAt),JZe=Kr("".slice),Yme=function(e){return function(t,n){var r,o,i=V1(nE(t)),a=kP(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=Kme(i,a))<55296||r>56319||a+1===l||(o=Kme(i,a+1))<56320||o>57343?e?QZe(i,a):r:e?JZe(i,a,a+2):o-56320+(r-55296<<10)+65536}},Xme={codeAt:Yme(!1),charAt:Yme(!0)},ZZe=Xme.charAt,eet=function(e,t,n){return t+(n?ZZe(e,t).length:1)},tet=Ln.TypeError,Qme=function(e,t){var n=e.exec;if(Ri(n)){var r=wa(n,e,t);return r!==null&&_s(r),r}if(I1(e)==="RegExp")return wa(fE,e,t);throw tet("RegExp#exec called on incompatible receiver")};(function(e){var t=sl(e),n=!ea(function(){var a={};return a[t]=function(){return 7},""[e](a)!=7}),r=n&&!ea(function(){var a=!1,l=/a/;return l.exec=function(){return a=!0,null},l[t](""),!a});if(!n||!r){var o=Kr(/./[t]),i=function(a,l,s){return[function(u){var c=nE(this),d=u==null?void 0:u6(u,a);return d?wa(d,u,c):new RegExp(u)[a](V1(c))},function(u){var c=_s(this),d=V1(u),f=s(l,c,d);if(f.done)return f.value;if(!c.global)return Qme(c,d);var p=c.unicode;c.lastIndex=0;for(var m,v=[],g=0;(m=Qme(c,d))!==null;){var b=V1(m[0]);v[g]=b,b===""&&(c.lastIndex=eet(d,Bme(c.lastIndex),p)),g++}return g===0?null:v}]}(t,""[e],function(a,l,s,u,c){var d=Kr(a),f=l.exec;return f===fE||f===qme.exec?n&&!c?{done:!0,value:o(l,s,u)}:{done:!0,value:d(s,l,u)}:{done:!1}});j1(String.prototype,e,i[0]),j1(qme,t,i[1])}})("match"),p6({global:!0},{globalThis:Ln});var net=!ea(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Jme=xP("IE_PROTO"),PP=Ln.Object,ret=PP.prototype,v6=net?PP.getPrototypeOf:function(e){var t=mP(e);if(Vl(t,Jme))return t[Jme];var n=t.constructor;return Ri(n)&&t instanceof n?n.prototype:t instanceof PP?ret:null},oet=Ln.String,iet=Ln.TypeError,c2=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Kr(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,o){return _s(r),function(i){if(typeof i=="object"||Ri(i))return i;throw iet("Can't set "+oet(i)+" as a prototype")}(o),t?e(r,o):r.__proto__=o,r}}():void 0),aet=Ln.Array,set=Math.max,uet=Kr("".replace),cet=Kr("".split),det=Kr([].join),jP=String(Error("zxcasd").stack),Zme=/\n\s*at [^:]*:[^\n]*/,fet=Zme.test(jP),pet=/@[^\n]*\n/.test(jP)&&!/zxcasd/.test(jP),ege=Kr(Kr.bind),tge=function(e,t){return pP(e),t===void 0?e:ege?ege(e,t):function(){return e.apply(t,arguments)}},d2={},het=sl("iterator"),vet=Array.prototype,met=sl("iterator"),nge=function(e){if(e!=null)return u6(e,met)||u6(e,"@@iterator")||d2[uE(e)]},get=Ln.TypeError,rge=function(e,t,n){var r,o;_s(e);try{if(!(r=u6(e,"return"))){if(t==="throw")throw n;return n}r=wa(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return _s(r),n},yet=Ln.TypeError,pE=function(e,t){this.stopped=e,this.result=t},oge=pE.prototype,bet=!ea(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Rp(1,7)),e.stack!==7)}),Aet=sl("toStringTag"),hE=Ln.Error,wet=[].push,m6=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,o=rE(VP,this);c2?n=c2(new hE(void 0),o?v6(this):VP):(n=o?this:h6(VP),zl(n,Aet,"Error")),zl(n,"message",function(a,l){return a===void 0?arguments.length<2?"":l:V1(a)}(t,"")),bet&&zl(n,"stack",function(a,l){if(typeof a!="string")return a;if(fet)for(;l--;)a=uet(a,Zme,"");else if(pet)return det(function(s,u){for(var c,d,f,p,m=aE(s),v=DP(u,m),g=DP(m,m),b=aet(set(g-v,0)),y=0;v<g;v++,y++)c=b,d=y,f=s[v],(p=gP(d))in c?s2.f(c,p,Rp(0,f)):c[p]=f;return b.length=y,b}(cet(a,` |
|
992 |
`),l),` |
|
993 |
`);return a}(n.stack,1)),function(a,l){Gc(l)&&"cause"in l&&zl(a,"cause",l.cause)}(n,r);var i=[];return function(a,l,s){var u,c,d,f,p,m,v,g=s&&s.that,b=!(!s||!s.AS_ENTRIES),y=!(!s||!s.IS_ITERATOR),w=!(!s||!s.INTERRUPTED),x=tge(l,g),_=function(C){return u&&rge(u,"normal",C),new pE(!0,C)},E=function(C){return b?(_s(C),w?x(C[0],C[1],_):x(C[0],C[1])):w?x(C,_):x(C)};if(y)u=a;else{if(!(c=nge(a)))throw yet(fP(a)+" is not iterable");if(function(C){return C!==void 0&&(d2.Array===C||vet[het]===C)}(c)){for(d=0,f=aE(a);f>d;d++)if((p=E(a[d]))&&rE(oge,p))return p;return new pE(!1)}u=function(C,T){var k=arguments.length<2?nge(C):T;if(pP(k))return _s(wa(k,C));throw get(fP(C)+" is not iterable")}(a,c)}for(m=u.next;!(v=wa(m,u)).done;){try{p=E(v.value)}catch(C){rge(u,"throw",C)}if(typeof p=="object"&&p&&rE(oge,p))return p}new pE(!1)}(e,wet,{that:i}),zl(n,"errors",i),n};c2?c2(m6,hE):Vme(m6,hE);var VP=m6.prototype=h6(hE.prototype,{constructor:Rp(1,m6),message:Rp(1,""),name:Rp(1,"AggregateError")});p6({global:!0},{AggregateError:m6});var zP=sl("unscopables"),HP=Array.prototype;HP[zP]==null&&s2.f(HP,zP,{configurable:!0,value:h6(null)});var z1,ige,age,$P=function(e){HP[zP][e]=!0},UP=sl("iterator"),lge=!1;[].keys&&("next"in(age=[].keys())?(ige=v6(v6(age)))!==Object.prototype&&(z1=ige):lge=!0);var xet=z1==null||ea(function(){var e={};return z1[UP].call(e)!==e});xet&&(z1={}),Ri(z1[UP])||j1(z1,UP,function(){return this});var WP={IteratorPrototype:z1,BUGGY_SAFARI_ITERATORS:lge},_et=s2.f,sge=sl("toStringTag"),uge=function(e,t,n){e&&!Vl(e=n?e:e.prototype,sge)&&_et(e,sge,{configurable:!0,value:t})},Eet=WP.IteratorPrototype,Cet=function(){return this},ket=SP.PROPER,Det=SP.CONFIGURABLE,cge=WP.IteratorPrototype,GP=WP.BUGGY_SAFARI_ITERATORS,g6=sl("iterator"),Oet=function(){return this},dge=function(e,t,n,r,o,i,a){(function(g,b,y){var w=b+" Iterator";g.prototype=h6(Eet,{next:Rp(1,y)}),uge(g,w,!1),d2[w]=Cet})(n,t,r);var l,s,u=function(g){if(g===o&&m)return m;if(!GP&&g in f)return f[g];switch(g){case"keys":case"values":case"entries":return function(){return new n(this,g)}}return function(){return new n(this)}},c=t+" Iterator",d=!1,f=e.prototype,p=f[g6]||f["@@iterator"]||o&&f[o],m=!GP&&p||u(o),v=t=="Array"&&f.entries||p;return v&&(l=v6(v.call(new e)))!==Object.prototype&&l.next&&(v6(l)!==cge&&(c2?c2(l,cge):Ri(l[g6])||j1(l,g6,Oet)),uge(l,c,!0)),ket&&o=="values"&&p&&p.name!=="values"&&(Det?zl(f,"name","values"):(d=!0,m=function(){return wa(p,this)})),o&&(s={values:u("values"),keys:u("keys"),entries:u("entries")},a||p6({target:t,proto:!0,forced:GP||d},s)),f[g6]!==m&&j1(f,g6,m,{name:o}),d2[t]=m,s},Tet=P1.set,Met=P1.getterFor("Array Iterator"),y6=dge(Array,"Array",function(e,t){Tet(this,{type:"Array Iterator",target:l2(e),index:0,kind:t})},function(){var e=Met(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");d2.Arguments=d2.Array,$P("keys"),$P("values"),$P("entries");var Net=Xme.charAt,Fet=P1.set,Ret=P1.getterFor("String Iterator");dge(String,"String",function(e){Fet(this,{type:"String Iterator",string:V1(e),index:0})},function(){var e,t=Ret(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Net(n,r),t.index+=e.length,{value:e,done:!1})});var qP,vE={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},KP=bP("span").classList,fge=KP&&KP.constructor&&KP.constructor.prototype,pge=fge===Object.prototype?void 0:fge,YP=sl("iterator"),hge=sl("toStringTag"),XP=y6.values,vge=function(e,t){if(e){if(e[YP]!==XP)try{zl(e,YP,XP)}catch{e[YP]=XP}if(e[hge]||zl(e,hge,t),vE[t]){for(var n in y6)if(e[n]!==y6[n])try{zl(e,n,y6[n])}catch{e[n]=y6[n]}}}};for(var QP in vE)vge(Ln[QP]&&Ln[QP].prototype,QP);function mge(){typeof globalThis>"u"&&(window.globalThis=window)}function gge(){FJe===void 0&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}vge(pge,"DOMTokenList"),typeof global>"u"?("ActiveXObject"in window&&console.error(`\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668 |
|
994 |
Sorry, wangEditor V5+ versions do not support IE browser.`),mge(),gge()):global&&(!((qP=global.navigator)===null||qP===void 0)&&qP.userAgent.match("QQBrowser"))&&(mge(),gge());var mE=Array.isArray||function(e){return M1(e)=="Array"},yge=function(){},Iet=[],bge=n2("Reflect","construct"),JP=/^\s*(?:class|function)\b/,Bet=so(JP.exec),Let=!JP.exec(yge),b6=function(e){if(!Aa(e))return!1;try{return bge(yge,Iet,e),!0}catch{return!1}},Pet=!bge||Pl(function(){var e;return b6(b6.call)||!b6(Object)||!b6(function(){e=!0})||e})?function(e){if(!Aa(e))return!1;switch(r6(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Let||!!Bet(JP,ome(e))}:b6,jet=Na("species"),Age=Yn.Array,wge=function(e,t){return new(function(n){var r;return mE(n)&&(r=n.constructor,(Pet(r)&&(r===Age||mE(r.prototype))||ou(r)&&(r=r[jet])===null)&&(r=void 0)),r===void 0?Age:r}(e))(t===0?0:t)},Vet=Na("species"),xge=Na("isConcatSpreadable"),_ge=Yn.TypeError,zet=P_>=51||!Pl(function(){var e=[];return e[xge]=!1,e.concat()[0]!==e}),Het=P_>=51||!Pl(function(){var e=[];return(e.constructor={})[Vet]=function(){return{foo:1}},e.concat(Boolean).foo!==1}),$et=function(e){if(!ou(e))return!1;var t=e[xge];return t!==void 0?!!t:mE(e)};Qd({target:"Array",proto:!0,forced:!zet||!Het},{concat:function(e){var t,n,r,o,i,a=J4(this),l=wge(a,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if($et(i=t===-1?a:arguments[t])){if(s+(o=t6(i))>9007199254740991)throw _ge("Maximum allowed index exceeded");for(n=0;n<o;n++,s++)n in i&&YL(l,s,i[n])}else{if(s>=9007199254740991)throw _ge("Maximum allowed index exceeded");YL(l,s++,i)}return l.length=s,l}});var Ege=GL.f,Cge=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Sge={f:function(e){return Cge&&M1(e)=="Window"?function(t){try{return Ege(t)}catch{return Jve(Cge)}}(e):Ege($c(e))}},Uet=so([].slice),ZP={f:Na},Wet=Mp.f,ti=function(e){var t=ws.Symbol||(ws.Symbol={});_r(t,e)||Wet(t,e,{value:ZP.f(e)})},kge=so([].push),Bp=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=J4(s),v=Nve(m),g=HL(u,c),b=t6(v),y=0,w=d||wge,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:kge(x,f)}else switch(e){case 4:return!1;case 7:kge(x,f)}return i?-1:r||o?o:x}},gE=[Bp(0),Bp(1),Bp(2),Bp(3),Bp(4),Bp(5),Bp(6),Bp(7)][0],Hl=H_("hidden"),Dge=Na("toPrimitive"),Get=a2.set,Oge=a2.getterFor("Symbol"),Wu=Object.prototype,Lp=Yn.Symbol,Pp=Lp&&Lp.prototype,Tge=Yn.TypeError,ej=Yn.QObject,A6=n2("JSON","stringify"),Mge=z_.f,jp=Mp.f,Nge=Sge.f,qet=RL.f,Fge=so([].push),ef=N1("symbols"),w6=N1("op-symbols"),tj=N1("string-to-symbol-registry"),nj=N1("symbol-to-string-registry"),Ket=N1("wks"),rj=!ej||!ej.prototype||!ej.prototype.findChild,oj=jl&&Pl(function(){return Jd(jp({},"a",{get:function(){return jp(this,"a",{value:7}).a}})).a!=7})?function(e,t,n){var r=Mge(Wu,t);r&&delete Wu[t],jp(e,t,n),r&&e!==Wu&&jp(Wu,t,r)}:jp,ij=function(e,t){var n=ef[e]=Jd(Pp);return Get(n,{type:"Symbol",tag:e,description:t}),jl||(n.description=t),n},yE=function(e,t,n){e===Wu&&yE(w6,t,n),xs(e);var r=o2(t);return xs(n),_r(ef,r)?(n.enumerable?(_r(e,Hl)&&e[Hl][r]&&(e[Hl][r]=!1),n=Jd(n,{enumerable:Uu(0,!1)})):(_r(e,Hl)||jp(e,Hl,Uu(1,{})),e[Hl][r]=!0),oj(e,r,n)):jp(e,r,n)},Rge=function(e,t){xs(e);var n=$c(t),r=qL(n).concat(aj(n));return gE(r,function(o){jl&&!As(Ige,n,o)||yE(e,o,n[o])}),e},Ige=function(e){var t=o2(e),n=As(qet,this,t);return!(this===Wu&&_r(ef,t)&&!_r(w6,t))&&(!(n||!_r(this,t)||!_r(ef,t)||_r(this,Hl)&&this[Hl][t])||n)},Bge=function(e,t){var n=$c(e),r=o2(t);if(n!==Wu||!_r(ef,r)||_r(w6,r)){var o=Mge(n,r);return!o||!_r(ef,r)||_r(n,Hl)&&n[Hl][r]||(o.enumerable=!0),o}},Lge=function(e){var t=Nge($c(e)),n=[];return gE(t,function(r){_r(ef,r)||_r(n6,r)||Fge(n,r)}),n},aj=function(e){var t=e===Wu,n=Nge(t?w6:$c(e)),r=[];return gE(n,function(o){!_r(ef,o)||t&&!_r(Wu,o)||Fge(r,ef[o])}),r};if(Uc||(Pp=(Lp=function(){if(Q4(Pp,this))throw Tge("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==void 0?o6(arguments[0]):void 0,t=V_(e),n=function(r){this===Wu&&As(n,w6,r),_r(this,Hl)&&_r(this[Hl],t)&&(this[Hl][t]=!1),oj(this,t,Uu(1,r))};return jl&&rj&&oj(Wu,t,{configurable:!0,set:n}),ij(t,e)}).prototype,J_(Pp,"toString",function(){return Oge(this).tag}),J_(Lp,"withoutSetter",function(e){return ij(V_(e),e)}),RL.f=Ige,Mp.f=yE,z_.f=Bge,GL.f=Sge.f=Lge,G_.f=aj,ZP.f=function(e){return ij(Na(e),e)},jl&&jp(Pp,"description",{configurable:!0,get:function(){return Oge(this).description}})),Qd({global:!0,wrap:!0,forced:!Uc,sham:!Uc},{Symbol:Lp}),gE(qL(Ket),function(e){ti(e)}),Qd({target:"Symbol",stat:!0,forced:!Uc},{for:function(e){var t=o6(e);if(_r(tj,t))return tj[t];var n=Lp(t);return tj[t]=n,nj[n]=t,n},keyFor:function(e){if(!r2(e))throw Tge(e+" is not a symbol");if(_r(nj,e))return nj[e]},useSetter:function(){rj=!0},useSimple:function(){rj=!1}}),Qd({target:"Object",stat:!0,forced:!Uc,sham:!jl},{create:function(e,t){return t===void 0?Jd(e):Rge(Jd(e),t)},defineProperty:yE,defineProperties:Rge,getOwnPropertyDescriptor:Bge}),Qd({target:"Object",stat:!0,forced:!Uc},{getOwnPropertyNames:Lge,getOwnPropertySymbols:aj}),Qd({target:"Object",stat:!0,forced:Pl(function(){G_.f(1)})},{getOwnPropertySymbols:function(e){return G_.f(J4(e))}}),A6){var Yet=!Uc||Pl(function(){var e=Lp();return A6([e])!="[null]"||A6({a:e})!="{}"||A6(Object(e))!="{}"});Qd({target:"JSON",stat:!0,forced:Yet},{stringify:function(e,t,n){var r=Uet(arguments),o=t;if((ou(t)||e!==void 0)&&!r2(e))return mE(t)||(t=function(i,a){if(Aa(o)&&(a=As(o,this,i,a)),!r2(a))return a}),r[1]=t,Dve(A6,null,r)}})}if(!Pp[Dge]){var Xet=Pp.valueOf;J_(Pp,Dge,function(e){return As(Xet,this)})}Z_(Lp,"Symbol"),n6[Hl]=!0,ti("asyncIterator"),ti("hasInstance"),ti("isConcatSpreadable"),ti("iterator"),ti("match"),ti("matchAll"),ti("replace"),ti("search"),ti("species"),ti("split"),ti("toPrimitive"),ti("toStringTag"),ti("unscopables"),Z_(Yn.JSON,"JSON",!0);var Qet=ws.Symbol;ti("asyncDispose"),ti("dispose"),ti("matcher"),ti("metadata"),ti("observable"),ti("patternMatch"),ti("replaceAll");var bE=Qet,Jet=ZP.f("iterator"),Zet=T1(function(e){function t(n){return typeof bE=="function"&&typeof Jet=="symbol"?(e.exports=t=function(r){return typeof r},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(r){return r&&typeof bE=="function"&&r.constructor===bE&&r!==bE.prototype?"symbol":typeof r},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),ett=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Zet),Pge=AP.f,ttt=ea(function(){Pge(1)});if(p6({target:"Object",stat:!0,forced:!Wc||ttt,sham:!Wc},{getOwnPropertyDescriptor:function(e,t){return Pge(l2(e),t)}}),(typeof global>"u"?"undefined":ett(global))==="object"){var ntt=Object.getOwnPropertyDescriptor(global,"window");global.window&&!ntt.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}function jge(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fa(e){var t,n;return jge(e)!==!1&&((t=e.constructor)===void 0||jge(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1)}function Gu(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function H1(e){return!!e&&!!e[Es]}function $1(e){return!!e&&(function(t){if(!t||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);if(n===null)return!0;var r=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return r===Object||typeof r=="function"&&Function.toString.call(r)===ltt}(e)||Array.isArray(e)||!!e[Yge]||!!e.constructor[Yge]||sj(e)||uj(e))}function x6(e,t,n){n===void 0&&(n=!1),f2(e)===0?(n?Object.keys:wj)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function f2(e){var t=e[Es];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:sj(e)?2:uj(e)?3:0}function lj(e,t){return f2(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Vge(e,t,n){var r=f2(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function sj(e){return itt&&e instanceof Map}function uj(e){return att&&e instanceof Set}function U1(e){return e.o||e.t}function cj(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=stt(e);delete t[Es];for(var n=wj(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function dj(e,t){return t===void 0&&(t=!1),fj(e)||H1(e)||!$1(e)||(f2(e)>1&&(e.set=e.add=e.clear=e.delete=rtt),Object.freeze(e),t&&x6(e,function(n,r){return dj(r,!0)},!0)),e}function rtt(){Gu(2)}function fj(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tf(e){var t=utt[e];return t||Gu(18,e),t}function zge(){return _6}function pj(e,t){t&&(tf("Patches"),e.u=[],e.s=[],e.v=t)}function AE(e){hj(e),e.p.forEach(ott),e.p=null}function hj(e){e===_6&&(_6=e.l)}function Hge(e){return _6={p:[],l:_6,h:e,m:!0,_:0}}function ott(e){var t=e[Es];t.i===0||t.i===1?t.j():t.O=!0}function vj(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||tf("ES5").S(t,e,r),r?(n[Es].P&&(AE(t),Gu(4)),$1(e)&&(e=wE(t,e),t.l||xE(t,e)),t.u&&tf("Patches").M(n[Es],e,t.u,t.s)):e=wE(t,n,[]),AE(t),t.u&&t.v(t.u,t.s),e!==Kge?e:void 0}function wE(e,t,n){if(fj(t))return t;var r=t[Es];if(!r)return x6(t,function(i,a){return $ge(e,r,t,i,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return xE(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=cj(r.k):r.o;x6(r.i===3?new Set(o):o,function(i,a){return $ge(e,r,o,i,a,n)}),xE(e,o,!1),n&&e.u&&tf("Patches").R(r,n,e.u,e.s)}return r.o}function $ge(e,t,n,r,o,i){if(H1(o)){var a=wE(e,o,i&&t&&t.i!==3&&!lj(t.D,r)?i.concat(r):void 0);if(Vge(n,r,a),!H1(a))return;e.m=!1}if($1(o)&&!fj(o)){if(!e.h.F&&e._<1)return;wE(e,o),t&&t.A.l||xE(e,o)}}function xE(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&dj(t,n)}function mj(e,t){var n=e[Es];return(n?U1(n):e)[t]}function Uge(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function gj(e){e.P||(e.P=!0,e.l&&gj(e.l))}function yj(e){e.o||(e.o=cj(e.t))}function bj(e,t,n){var r=sj(t)?tf("MapSet").N(t,n):uj(t)?tf("MapSet").T(t,n):e.g?function(o,i){var a=Array.isArray(o),l={i:a?1:0,A:i?i.A:zge(),P:!1,I:!1,D:{},l:i,t:o,k:null,o:null,j:null,C:!1},s=l,u=_E;a&&(s=[l],u=EE);var c=Proxy.revocable(s,u),d=c.revoke,f=c.proxy;return l.k=f,l.j=d,f}(t,n):tf("ES5").J(t,n);return(n?n.A:zge()).p.push(r),r}function Wge(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return cj(e)}var Gge,_6,Aj=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",itt=typeof Map<"u",att=typeof Set<"u",qge=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Kge=Aj?Symbol.for("immer-nothing"):((Gge={})["immer-nothing"]=!0,Gge),Yge=Aj?Symbol.for("immer-draftable"):"__$immer_draftable",Es=Aj?Symbol.for("immer-state"):"__$immer_state",ltt=""+Object.prototype.constructor,wj=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,stt=Object.getOwnPropertyDescriptors||function(e){var t={};return wj(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},utt={},_E={get:function(e,t){if(t===Es)return e;var n=U1(e);if(!lj(n,t))return function(o,i,a){var l,s=Uge(i,a);return s?"value"in s?s.value:(l=s.get)===null||l===void 0?void 0:l.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!$1(r)?r:r===mj(e.t,t)?(yj(e),e.o[t]=bj(e.A.h,r,e)):r},has:function(e,t){return t in U1(e)},ownKeys:function(e){return Reflect.ownKeys(U1(e))},set:function(e,t,n){var r=Uge(U1(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=mj(U1(e),t),i=o==null?void 0:o[Es];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(a,l){return a===l?a!==0||1/a==1/l:a!=a&&l!=l}(n,o)&&(n!==void 0||lj(e.t,t)))return!0;yj(e),gj(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return mj(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,yj(e),gj(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=U1(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Gu(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Gu(12)}},EE={};x6(_E,function(e,t){EE[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),EE.deleteProperty=function(e,t){return _E.deleteProperty.call(this,e[0],t)},EE.set=function(e,t,n){return _E.set.call(this,e[0],t,n,e[0])};var ctt=function(){function e(n){var r=this;this.g=qge,this.F=!0,this.produce=function(o,i,a){if(typeof o=="function"&&typeof i!="function"){var l=i;i=o;var s=r;return function(p){var m=this;p===void 0&&(p=l);for(var v=arguments.length,g=Array(v>1?v-1:0),b=1;b<v;b++)g[b-1]=arguments[b];return s.produce(p,function(y){var w;return(w=i).call.apply(w,[m,y].concat(g))})}}var u;if(typeof i!="function"&&Gu(6),a!==void 0&&typeof a!="function"&&Gu(7),$1(o)){var c=Hge(r),d=bj(r,o,void 0),f=!0;try{u=i(d),f=!1}finally{f?AE(c):hj(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return pj(c,a),vj(p,c)},function(p){throw AE(c),p}):(pj(c,a),vj(u,c))}if(!o||typeof o!="object")return(u=i(o))===Kge?void 0:(u===void 0&&(u=o),r.F&&dj(u,!0),u);Gu(21,o)},this.produceWithPatches=function(o,i){return typeof o=="function"?function(s){for(var u=arguments.length,c=Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];return r.produceWithPatches(s,function(f){return o.apply(void 0,[f].concat(c))})}:[r.produce(o,i,function(s,u){a=s,l=u}),a,l];var a,l},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){$1(n)||Gu(8),H1(n)&&(n=function(i){return H1(i)||Gu(22,i),function a(l){if(!$1(l))return l;var s,u=l[Es],c=f2(l);if(u){if(!u.P&&(u.i<4||!tf("ES5").K(u)))return u.t;u.I=!0,s=Wge(l,c),u.I=!1}else s=Wge(l,c);return x6(s,function(d,f){u&&function(p,m){return f2(p)===2?p.get(m):p[m]}(u.t,d)===f||Vge(s,d,a(f))}),c===3?new Set(s):s}(i)}(n));var r=Hge(this),o=bj(this,n,void 0);return o[Es].C=!0,hj(r),o},t.finishDraft=function(n,r){var o=(n&&n[Es]).A;return pj(o,r),vj(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!qge&&Gu(20),this.g=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var a=tf("Patches").$;return H1(n)?a(n,r):this.produce(n,function(l){return a(l,r)})},e}(),Cs=new ctt,CE=Cs.produce;Cs.produceWithPatches.bind(Cs),Cs.setAutoFreeze.bind(Cs),Cs.setUseProxies.bind(Cs),Cs.applyPatches.bind(Cs);var Xge=Cs.createDraft.bind(Cs),Qge=Cs.finishDraft.bind(Cs);function qc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SE=new WeakMap,E6=new WeakMap,Jge=new WeakMap,Zge=new WeakMap,e2e=new WeakMap,t2e=new WeakMap;function n2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var dtt=()=>{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of ue.pathRefs(e))ztt.transform(n,t);for(var r of ue.pointRefs(e))Htt.transform(r,t);for(var o of ue.rangeRefs(e))Utt.transform(o,t);var i=new Set,a=[],l=f=>{if(f){var p=f.join(",");i.has(p)||(i.add(p),a.push(f))}},s=SE.get(e)||[],u=ftt(t);for(var c of s)l(Ke.transform(c,t));for(var d of u)l(d);SE.set(e,a),et.transform(e,t),e.operations.push(t),ue.normalize(e),t.type==="set_selection"&&(e.marks=null),E6.get(e)||(E6.set(e,!0),Promise.resolve().then(()=>{E6.set(e,!1),e.onChange(),e.operations=[]}))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(ct.isExpanded(r))et.setNodes(e,{[t]:n},{match:Qt.isText,split:!0});else{var o=kE(kE({},ue.marks(e)||{}),{},{[t]:n});e.marks=o,E6.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&ct.isCollapsed(n)&&et.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&ct.isCollapsed(n)&&et.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&ct.isExpanded(n)&&et.delete(e,{reverse:t==="backward"})},getFragment:()=>{var{selection:t}=e;return t?Pt.fragment(e,t):[]},insertBreak:()=>{et.splitNodes(e,{always:!0})},insertFragment:t=>{et.insertFragment(e,t)},insertNode:t=>{et.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var o=kE({text:t},r);et.insertNodes(e,o)}else et.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!Qt.isText(n))if(sn.isElement(n)&&n.children.length===0)et.insertNodes(e,{text:""},{at:r.concat(0),voids:!0});else for(var o=!ue.isEditor(n)&&sn.isElement(n)&&(e.isInline(n)||n.children.length===0||Qt.isText(n.children[0])||e.isInline(n.children[0])),i=0,a=0;a<n.children.length;a++,i++){var l=Pt.get(e,r);if(!Qt.isText(l)){var s=n.children[a],u=l.children[i-1],c=a===n.children.length-1;(Qt.isText(s)||sn.isElement(s)&&e.isInline(s))!==o?(et.removeNodes(e,{at:r.concat(i),voids:!0}),i--):sn.isElement(s)?e.isInline(s)&&(u!=null&&Qt.isText(u)?c&&(et.insertNodes(e,{text:""},{at:r.concat(i+1),voids:!0}),i++):(et.insertNodes(e,{text:""},{at:r.concat(i),voids:!0}),i++)):u!=null&&Qt.isText(u)&&(Qt.equals(s,u,{loose:!0})?(et.mergeNodes(e,{at:r.concat(i),voids:!0}),i--):u.text===""?(et.removeNodes(e,{at:r.concat(i-1),voids:!0}),i--):s.text===""&&(et.removeNodes(e,{at:r.concat(i),voids:!0}),i--))}}},removeMark:t=>{var{selection:n}=e;if(n)if(ct.isExpanded(n))et.unsetNodes(e,t,{match:Qt.isText,split:!0});else{var r=kE({},ue.marks(e)||{});delete r[t],e.marks=r,E6.get(e)||e.onChange()}}};return e},ftt=e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":var{path:t}=e;return Ke.levels(t);case"insert_node":var{node:n,path:r}=e,o=Ke.levels(r),i=Qt.isText(n)?[]:Array.from(Pt.nodes(n),x=>{var[,_]=x;return r.concat(_)});return[...o,...i];case"merge_node":var{path:a}=e;return[...Ke.ancestors(a),Ke.previous(a)];case"move_node":var{path:l,newPath:s}=e;if(Ke.equals(l,s))return[];var u=[],c=[];for(var d of Ke.ancestors(l)){var f=Ke.transform(d,e);u.push(f)}for(var p of Ke.ancestors(s)){var m=Ke.transform(p,e);c.push(m)}var v=c[c.length-1],g=s[s.length-1],b=v.concat(g);return[...u,...c,b];case"remove_node":var{path:y}=e;return[...Ke.ancestors(y)];case"split_node":var{path:w}=e;return[...Ke.levels(w),Ke.next(w)];default:return[]}};function nf(e,t){if(e==null)return{};var n,r,o=function(a,l){if(a==null)return{};var s,u,c={},d=Object.keys(a);for(u=0;u<d.length;u++)s=d[u],l.indexOf(s)>=0||(c[s]=a[s]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wn,xj=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=!t,r=t?gtt(e):e,o=Wn.None,i=Wn.None,a=0,l=null;for(var s of r){var u=s.codePointAt(0);if(!u)break;var c=Ott(s,u);if([o,i]=n?[i,c]:[c,o],p2(o,Wn.ZWJ)&&p2(i,Wn.ExtPict)&&!Ftt(n?e.substring(0,a):e.substring(0,e.length-a))||p2(o,Wn.RI)&&p2(i,Wn.RI)&&!(l=l!==null?!l:!!n||Itt(e.substring(0,e.length-a)))||o!==Wn.None&&i!==Wn.None&&Mtt(o,i))break;a+=s.length}return a||1},ptt=/\s/,htt=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,vtt=/['\u2018\u2019]/,_j=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},mtt=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(ptt.test(t))return!1;if(vtt.test(t)){var o=xj(n,r),[i,a]=_j(n,o,r);if(e(i,a,r))return!0}return!htt.test(t)},gtt=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(btt(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(ytt(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},ytt=e=>e>=55296&&e<=56319,btt=e=>e>=56320&&e<=57343;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(Wn||(Wn={}));var Att=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\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uDC20-\uDC7F\uDD00-\uDDEF])$/,wtt=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,xtt=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,_tt=/^[\u1100-\u115F\uA960-\uA97C]$/,Ett=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Ctt=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Stt=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,ktt=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Dtt=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Ott=(e,t)=>{var n=Wn.Any;return e.search(Att)!==-1&&(n|=Wn.Extend),t===8205&&(n|=Wn.ZWJ),t>=127462&&t<=127487&&(n|=Wn.RI),e.search(wtt)!==-1&&(n|=Wn.Prepend),e.search(xtt)!==-1&&(n|=Wn.SpacingMark),e.search(_tt)!==-1&&(n|=Wn.L),e.search(Ett)!==-1&&(n|=Wn.V),e.search(Ctt)!==-1&&(n|=Wn.T),e.search(Stt)!==-1&&(n|=Wn.LV),e.search(ktt)!==-1&&(n|=Wn.LVT),e.search(Dtt)!==-1&&(n|=Wn.ExtPict),n};function p2(e,t){return!!(e&t)}var Ttt=[[Wn.L,Wn.L|Wn.V|Wn.LV|Wn.LVT],[Wn.LV|Wn.V,Wn.V|Wn.T],[Wn.LVT|Wn.T,Wn.T],[Wn.Any,Wn.Extend|Wn.ZWJ],[Wn.Any,Wn.SpacingMark],[Wn.Prepend,Wn.Any],[Wn.ZWJ,Wn.ExtPict],[Wn.RI,Wn.RI]];function Mtt(e,t){return Ttt.findIndex(n=>p2(e,n[0])&&p2(t,n[1]))===-1}var Ntt=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\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838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Ftt=e=>e.search(Ntt)!==-1,Rtt=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Itt=e=>{var t=e.match(Rtt);return t!==null&&t[0].length/2%2==1},r2e=e=>Fa(e)&&Pt.isNodeList(e.children)&&!ue.isEditor(e),sn={isAncestor:e=>Fa(e)&&Pt.isNodeList(e.children),isElement:r2e,isElementList:e=>Array.isArray(e)&&e.every(t=>sn.isElement(t)),isElementProps:e=>e.children!==void 0,isElementType:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return r2e(e)&&e[n]===t},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},Btt=["text"],Ltt=["text"];function o2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function h2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var i2e=new WeakMap,ue={above(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:o=e.selection,match:i}=t;if(o){var a=ue.path(e,o),l=r==="lowest";for(var[s,u]of ue.levels(e,{at:a,voids:n,match:i,reverse:l}))if(!Qt.isText(s)&&!Ke.equals(a,u))return[s,u]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o={anchor:ue.point(e,t,{edge:"end"}),focus:ue.end(e,[])},{distance:i=1}=r,a=0;for(var l of ue.positions(e,h2(h2({},r),{},{at:o}))){if(a>i)break;a!==0&&(n=l),a++}return n},before(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o={anchor:ue.start(e,[]),focus:ue.point(e,t,{edge:"start"})},{distance:i=1}=r,a=0;for(var l of ue.positions(e,h2(h2({},r),{},{at:o,reverse:!0}))){if(a>i)break;a!==0&&(n=l),a++}return n},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges:(e,t)=>[ue.start(e,t),ue.end(e,t)],end:(e,t)=>ue.point(e,t,{edge:"end"}),first(e,t){var n=ue.path(e,t,{edge:"start"});return ue.node(e,n)},fragment(e,t){var n=ue.range(e,t);return Pt.fragment(e,n)},hasBlocks:(e,t)=>t.children.some(n=>ue.isBlock(e,n)),hasInlines:(e,t)=>t.children.some(n=>Qt.isText(n)||ue.isInline(e,n)),hasTexts:(e,t)=>t.children.every(n=>Qt.isText(n)),insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>sn.isElement(t)&&!e.isInline(t),isEditor(e){if(!Fa(e))return!1;var t=i2e.get(e);if(t!==void 0)return t;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteBackward=="function"&&typeof e.deleteForward=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isInline=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&(e.marks===null||Fa(e.marks))&&(e.selection===null||ct.isRange(e.selection))&&Pt.isNodeList(e.children)&&Vp.isOperationList(e.operations);return i2e.set(e,n),n},isEnd(e,t,n){var r=ue.end(e,n);return nr.equals(t,r)},isEdge:(e,t,n)=>ue.isStart(e,t,n)||ue.isEnd(e,t,n),isEmpty(e,t){var{children:n}=t,[r]=n;return n.length===0||n.length===1&&Qt.isText(r)&&r.text===""&&!e.isVoid(t)},isInline:(e,t)=>sn.isElement(t)&&e.isInline(t),isNormalizing(e){var t=Jge.get(e);return t===void 0||t},isStart(e,t,n){if(t.offset!==0)return!1;var r=ue.start(e,n);return nr.equals(t,r)},isVoid:(e,t)=>sn.isElement(t)&&e.isVoid(t),last(e,t){var n=ue.path(e,t,{edge:"end"});return ue.node(e,n)},leaf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=ue.path(e,t,n);return[Pt.leaf(e,r),r]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:o=!1}=t,{match:i}=t;if(i==null&&(i=()=>!0),n){var a=[],l=ue.path(e,n);for(var[s,u]of Pt.levels(e,l))if(i(s,u)&&(a.push([s,u]),!o&&ue.isVoid(e,s)))break;r&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(ct.isExpanded(n)){var[r]=ue.nodes(e,{match:Qt.isText});if(r){var[o]=r;return nf(o,Btt)}return{}}var{anchor:i}=n,{path:a}=i,[l]=ue.leaf(e,a);if(i.offset===0){var s=ue.previous(e,{at:a,match:Qt.isText}),u=ue.above(e,{match:p=>ue.isBlock(e,p)});if(s&&u){var[c,d]=s,[,f]=u;Ke.isAncestor(f,d)&&(l=c)}}return nf(l,Ltt)},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=ue.after(e,i,{voids:r});if(a){var[,l]=ue.last(e,[]),s=[a.path,l];if(Ke.isPath(i)&&i.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(Ke.isPath(i)){var[u]=ue.parent(e,i);o=d=>u.children.includes(d)}else o=()=>!0;var[c]=ue.nodes(e,{at:s,match:o,mode:n,voids:r});return c}}},node(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=ue.path(e,t,n);return[Pt.get(e,r),r]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:o=!1,reverse:i=!1,voids:a=!1}=t,{match:l}=t;if(l||(l=()=>!0),n){var s,u;if(Ptt.isSpan(n))s=n[0],u=n[1];else{var c=ue.path(e,n,{edge:"start"}),d=ue.path(e,n,{edge:"end"});s=i?d:c,u=i?c:d}var f,p=Pt.nodes(e,{reverse:i,from:s,to:u,pass:w=>{var[x]=w;return!a&&ue.isVoid(e,x)}}),m=[];for(var[v,g]of p){var b=f&&Ke.compare(g,f[1])===0;if(r!=="highest"||!b){if(l(v,g))if(r==="lowest"&&b)f=[v,g];else{var y=r==="lowest"?f:[v,g];y&&(o?m.push(y):yield y),f=[v,g]}else if(o&&!b&&Qt.isText(v))return}}r==="lowest"&&f&&(o?m.push(f):yield f),o&&(yield*m)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1}=t,r=i=>SE.get(i)||[];if(ue.isNormalizing(e)){if(n){var o=Array.from(Pt.nodes(e),i=>{var[,a]=i;return a});SE.set(e,o)}r(e).length!==0&&ue.withoutNormalizing(e,()=>{for(var i of r(e))if(Pt.has(e,i)){var a=ue.node(e,i),[l,s]=a;sn.isElement(l)&&l.children.length===0&&e.normalizeNode(a)}for(var u=42*r(e).length,c=0;r(e).length!==0;){if(c>u)throw new Error(` |
|
995 |
Could not completely normalize the editor after `.concat(u,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state. |
|
996 |
`));var d=r(e).pop();if(Pt.has(e,d)){var f=ue.node(e,d);e.normalizeNode(f)}c++}})}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=ue.path(e,t,n),o=Ke.parent(r);return ue.node(e,o)},path(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:o}=n;if(Ke.isPath(t)){if(o==="start"){var[,i]=Pt.first(e,t);t=i}else if(o==="end"){var[,a]=Pt.last(e,t);t=a}}return ct.isRange(t)&&(t=o==="start"?ct.start(t):o==="end"?ct.end(t):Ke.common(t.anchor.path,t.focus.path)),nr.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath:(e,t)=>Pt.has(e,t),pathRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:i}=o;return ue.pathRefs(e).delete(o),o.current=null,i}};return ue.pathRefs(e).add(o),o},pathRefs(e){var t=Zge.get(e);return t||(t=new Set,Zge.set(e,t)),t},point(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r="start"}=n;if(Ke.isPath(t)){var o;if(r==="end"){var[,i]=Pt.last(e,t);o=i}else{var[,a]=Pt.first(e,t);o=a}var l=Pt.get(e,o);if(!Qt.isText(l))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:r==="end"?l.text.length:0}}if(ct.isRange(t)){var[s,u]=ct.edges(t);return r==="start"?s:u}return t},pointRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:i}=o;return ue.pointRefs(e).delete(o),o.current=null,i}};return ue.pointRefs(e).add(o),o},pointRefs(e){var t=e2e.get(e);return t||(t=new Set,e2e.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:o=!1,voids:i=!1}=t;if(n){var a=ue.range(e,n),[l,s]=ct.edges(a),u=o?s:l,c=!1,d="",f=0,p=0,m=0;for(var[v,g]of ue.nodes(e,{at:n,reverse:o,voids:i})){if(sn.isElement(v)){if(!i&&e.isVoid(v)){yield ue.start(e,g);continue}if(e.isInline(v))continue;if(ue.hasInlines(e,v)){var b=Ke.isAncestor(g,s.path)?s:ue.end(e,g),y=Ke.isAncestor(g,l.path)?l:ue.start(e,g);d=ue.string(e,{anchor:y,focus:b},{voids:i}),c=!0}}if(Qt.isText(v)){var w=Ke.equals(g,u.path);for(w?(p=o?u.offset:v.text.length-u.offset,m=u.offset):(p=v.text.length,m=o?p:0),(w||c||r==="offset")&&(yield{path:g,offset:m},c=!1);;){if(f===0){if(d==="")break;f=x(d,r,o),d=_j(d,f,o)[1]}if(m=o?m-f:m+f,(p-=f)<0){f=-p;break}f=0,yield{path:g,offset:m}}}}}function x(_,E,C){return E==="character"?xj(_,C):E==="word"?function(T){for(var k=arguments.length>1&&arguments[1]!==void 0&&arguments[1],I=0,O=!1;T.length>0;){var F=xj(T,k),[N,B]=_j(T,F,k);if(mtt(N,B,k))O=!0,I+=F;else{if(O)break;I+=F}T=B}return I}(_,C):E==="line"||E==="block"?_.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=ue.before(e,i,{voids:r});if(a){var[,l]=ue.first(e,[]),s=[a.path,l];if(Ke.isPath(i)&&i.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(Ke.isPath(i)){var[u]=ue.parent(e,i);o=d=>u.children.includes(d)}else o=()=>!0;var[c]=ue.nodes(e,{reverse:!0,at:s,match:o,mode:n,voids:r});return c}}},range:(e,t,n)=>ct.isRange(t)&&!n?t:{anchor:ue.start(e,t),focus:ue.end(e,n||t)},rangeRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:i}=o;return ue.rangeRefs(e).delete(o),o.current=null,i}};return ue.rangeRefs(e).add(o),o},rangeRefs(e){var t=t2e.get(e);return t||(t=new Set,t2e.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){Jge.set(e,t)},start:(e,t)=>ue.point(e,t,{edge:"start"}),string(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,o=ue.range(e,t),[i,a]=ct.edges(o),l="";for(var[s,u]of ue.nodes(e,{at:o,match:Qt.isText,voids:r})){var c=s.text;Ke.equals(u,a.path)&&(c=c.slice(0,a.offset)),Ke.equals(u,i.path)&&(c=c.slice(i.offset)),l+=c}return l},unhangRange(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[o,i]=ct.edges(t);if(o.offset!==0||i.offset!==0||ct.isCollapsed(t))return t;var a=ue.above(e,{at:i,match:f=>ue.isBlock(e,f)}),l=a?a[1]:[],s={anchor:ue.start(e,[]),focus:i},u=!0;for(var[c,d]of ue.nodes(e,{at:s,match:Qt.isText,reverse:!0,voids:r}))if(u)u=!1;else if(c.text!==""||Ke.isBefore(d,l)){i={path:d,offset:c.text.length};break}return{anchor:o,focus:i}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ue.above(e,h2(h2({},t),{},{match:n=>ue.isVoid(e,n)}))},withoutNormalizing(e,t){var n=ue.isNormalizing(e);ue.setNormalizing(e,!1);try{t()}finally{ue.setNormalizing(e,n)}ue.normalize(e)}},Ptt={isSpan:e=>Array.isArray(e)&&e.length===2&&e.every(Ke.isPath)},jtt=["children"],Vtt=["text"],a2e=new WeakMap,Pt={ancestor(e,t){var n=Pt.get(e,t);if(Qt.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of Ke.ancestors(t,n)){var o=[Pt.ancestor(e,r),r];yield o}},child(e,t){if(Qt.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:r=!1}=n,o=Pt.ancestor(e,t),{children:i}=o,a=r?i.length-1:0;r?a>=0:a<i.length;){var l=Pt.child(o,a),s=t.concat(a);yield[l,s],a=r?a-1:a+1}},common(e,t,n){var r=Ke.common(t,n);return[Pt.get(e,r),r]},descendant(e,t){var n=Pt.get(e,t);if(ue.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(n));return n},*descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of Pt.nodes(e,t))r.length!==0&&(yield[n,r])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of Pt.nodes(e,t))sn.isElement(n)&&(yield[n,r])},extractProps:e=>sn.isAncestor(e)?nf(e,jtt):nf(e,Vtt),first(e,t){for(var n=t.slice(),r=Pt.get(e,n);r&&!Qt.isText(r)&&r.children.length!==0;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(Qt.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var n=CE({children:e.children},r=>{var[o,i]=ct.edges(t),a=Pt.nodes(r,{reverse:!0,pass:f=>{var[,p]=f;return!ct.includes(t,p)}});for(var[,l]of a){if(!ct.includes(t,l)){var s=Pt.parent(r,l),u=l[l.length-1];s.children.splice(u,1)}if(Ke.equals(l,i.path)){var c=Pt.leaf(r,l);c.text=c.text.slice(0,i.offset)}if(Ke.equals(l,o.path)){var d=Pt.leaf(r,l);d.text=d.text.slice(o.offset)}}ue.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Qt.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));n=n.children[o]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Qt.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode:e=>Qt.isText(e)||sn.isElement(e)||ue.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=a2e.get(e);if(t!==void 0)return t;var n=e.every(r=>Pt.isNode(r));return a2e.set(e,n),n},last(e,t){for(var n=t.slice(),r=Pt.get(e,n);r&&!Qt.isText(r)&&r.children.length!==0;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(e,t){var n=Pt.get(e,t);if(!Qt.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of Ke.levels(t,n)){var o=Pt.get(e,r);yield[o,r]}},matches:(e,t)=>sn.isElement(e)&&sn.isElementProps(t)&&sn.matches(e,t)||Qt.isText(e)&&Qt.isTextProps(t)&&Qt.matches(e,t),*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:o=[],to:i}=t,a=new Set,l=[],s=e;!i||!(r?Ke.isBefore(l,i):Ke.isAfter(l,i));)if(a.has(s)||(yield[s,l]),a.has(s)||Qt.isText(s)||s.children.length===0||n!=null&&n([s,l])!==!1){if(l.length===0)break;if(!r){var u=Ke.next(l);if(Pt.has(e,u)){l=u,s=Pt.get(e,l);continue}}r&&l[l.length-1]!==0?(l=Ke.previous(l),s=Pt.get(e,l)):(l=Ke.parent(l),s=Pt.get(e,l),a.add(s))}else{a.add(s);var c=r?s.children.length-1:0;Ke.isAncestor(l,o)&&(c=o[l.length]),l=l.concat(c),s=Pt.get(e,l)}},parent(e,t){var n=Ke.parent(t),r=Pt.get(e,n);if(Qt.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:e=>Qt.isText(e)?e.text:e.children.map(Pt.string).join(""),*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of Pt.nodes(e,t))Qt.isText(n)&&(yield[n,r])}};function l2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Vp={isNodeOperation:e=>Vp.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!Fa(e))return!1;switch(e.type){case"insert_node":case"remove_node":return Ke.isPath(e.path)&&Pt.isNode(e.node);case"insert_text":case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&Ke.isPath(e.path);case"merge_node":return typeof e.position=="number"&&Ke.isPath(e.path)&&Fa(e.properties);case"move_node":return Ke.isPath(e.path)&&Ke.isPath(e.newPath);case"set_node":return Ke.isPath(e.path)&&Fa(e.properties)&&Fa(e.newProperties);case"set_selection":return e.properties===null&&ct.isRange(e.newProperties)||e.newProperties===null&&ct.isRange(e.properties)||Fa(e.properties)&&Fa(e.newProperties);case"split_node":return Ke.isPath(e.path)&&typeof e.position=="number"&&Fa(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(t=>Vp.isOperation(t)),isSelectionOperation:e=>Vp.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>Vp.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return gi(gi({},e),{},{type:"remove_node"});case"insert_text":return gi(gi({},e),{},{type:"remove_text"});case"merge_node":return gi(gi({},e),{},{type:"split_node",path:Ke.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(Ke.equals(t,n))return e;if(Ke.isSibling(n,t))return gi(gi({},e),{},{path:t,newPath:n});var r=Ke.transform(n,e),o=Ke.transform(Ke.next(n),e);return gi(gi({},e),{},{path:r,newPath:o});case"remove_node":return gi(gi({},e),{},{type:"insert_node"});case"remove_text":return gi(gi({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return gi(gi({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:l,newProperties:s}=e;return gi(gi({},e),{},l==null?{properties:s,newProperties:null}:s==null?{properties:null,newProperties:l}:{properties:s,newProperties:l});case"split_node":return gi(gi({},e),{},{type:"merge_node",path:Ke.next(e.path)})}}},Ke={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=Ke.levels(e,t);return n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Ke.equals(r,o)&&i>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return Ke.equals(r,o)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Ke.equals(r,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((n,r)=>n===t[r]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>Ke.compare(e,t)===1,isAncestor:(e,t)=>e.length<t.length&&Ke.compare(e,t)===0,isBefore:(e,t)=>Ke.compare(e,t)===-1,isChild:(e,t)=>e.length===t.length+1&&Ke.compare(e,t)===0,isCommon:(e,t)=>e.length<=t.length&&Ke.compare(e,t)===0,isDescendant:(e,t)=>e.length>t.length&&Ke.compare(e,t)===0,isParent:(e,t)=>e.length+1===t.length&&Ke.compare(e,t)===0,isPath:e=>Array.isArray(e)&&(e.length===0||typeof e[0]=="number"),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&Ke.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!Ke.isAncestor(t,e)&&!Ke.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return CE(e,r=>{var{affinity:o="forward"}=n;if(e&&(e==null?void 0:e.length)!==0){if(r===null)return null;switch(t.type){case"insert_node":var{path:i}=t;(Ke.equals(i,r)||Ke.endsBefore(i,r)||Ke.isAncestor(i,r))&&(r[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(Ke.equals(a,r)||Ke.isAncestor(a,r))return null;Ke.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:l,position:s}=t;Ke.equals(l,r)||Ke.endsBefore(l,r)?r[l.length-1]-=1:Ke.isAncestor(l,r)&&(r[l.length-1]-=1,r[l.length]+=s);break;case"split_node":var{path:u,position:c}=t;if(Ke.equals(u,r)){if(o==="forward")r[r.length-1]+=1;else if(o!=="backward")return null}else Ke.endsBefore(u,r)?r[u.length-1]+=1:Ke.isAncestor(u,r)&&e[u.length]>=c&&(r[u.length-1]+=1,r[u.length]-=c);break;case"move_node":var{path:d,newPath:f}=t;if(Ke.equals(d,f))return;if(Ke.isAncestor(d,r)||Ke.equals(d,r)){var p=f.slice();return Ke.endsBefore(d,f)&&d.length<f.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}Ke.isSibling(d,f)&&(Ke.isAncestor(f,r)||Ke.equals(f,r))?Ke.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:Ke.endsBefore(f,r)||Ke.equals(f,r)||Ke.isAncestor(f,r)?(Ke.endsBefore(d,r)&&(r[d.length-1]-=1),r[f.length-1]+=1):Ke.endsBefore(d,r)&&(Ke.equals(f,r)&&(r[f.length-1]+=1),r[d.length-1]-=1)}}})}},ztt={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var o=Ke.transform(n,t,{affinity:r});e.current=o,o==null&&e.unref()}}};function s2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function u2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var nr={compare(e,t){var n=Ke.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:(e,t)=>nr.compare(e,t)===1,isBefore:(e,t)=>nr.compare(e,t)===-1,equals:(e,t)=>e.offset===t.offset&&Ke.equals(e.path,t.path),isPoint:e=>Fa(e)&&typeof e.offset=="number"&&Ke.isPath(e.path),transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return CE(e,r=>{if(r===null)return null;var{affinity:o="forward"}=n,{path:i,offset:a}=r;switch(t.type){case"insert_node":case"move_node":r.path=Ke.transform(i,t,n);break;case"insert_text":Ke.equals(t.path,i)&&t.offset<=a&&(r.offset+=t.text.length);break;case"merge_node":Ke.equals(t.path,i)&&(r.offset+=t.position),r.path=Ke.transform(i,t,n);break;case"remove_text":Ke.equals(t.path,i)&&t.offset<=a&&(r.offset-=Math.min(a-t.offset,t.text.length));break;case"remove_node":if(Ke.equals(t.path,i)||Ke.isAncestor(t.path,i))return null;r.path=Ke.transform(i,t,n);break;case"split_node":if(Ke.equals(t.path,i)){if(t.position===a&&o==null)return null;(t.position<a||t.position===a&&o==="forward")&&(r.offset-=t.position,r.path=Ke.transform(i,t,u2e(u2e({},n),{},{affinity:"forward"})))}else r.path=Ke.transform(i,t,n)}})}},Htt={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var o=nr.transform(n,t,{affinity:r});e.current=o,o==null&&e.unref()}}},$tt=["anchor","focus"];function c2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}var ct={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:o}=e;return ct.isBackward(e)===n?[r,o]:[o,r]},end(e){var[,t]=ct.edges(e);return t},equals:(e,t)=>nr.equals(e.anchor,t.anchor)&&nr.equals(e.focus,t.focus),includes(e,t){if(ct.isRange(t)){if(ct.includes(e,t.anchor)||ct.includes(e,t.focus))return!0;var[n,r]=ct.edges(e),[o,i]=ct.edges(t);return nr.isBefore(n,o)&&nr.isAfter(r,i)}var[a,l]=ct.edges(e),s=!1,u=!1;return nr.isPoint(t)?(s=nr.compare(t,a)>=0,u=nr.compare(t,l)<=0):(s=Ke.compare(t,a.path)>=0,u=Ke.compare(t,l.path)<=0),s&&u},intersection(e,t){var n=nf(e,$tt),[r,o]=ct.edges(e),[i,a]=ct.edges(t),l=nr.isBefore(r,i)?i:r,s=nr.isBefore(o,a)?o:a;return nr.isBefore(s,l)?null:function(u){for(var c=1;c<arguments.length;c++){var d=arguments[c]!=null?arguments[c]:{};c%2?c2e(Object(d),!0).forEach(function(f){qc(u,f,d[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(d)):c2e(Object(d)).forEach(function(f){Object.defineProperty(u,f,Object.getOwnPropertyDescriptor(d,f))})}return u}({anchor:l,focus:s},n)},isBackward(e){var{anchor:t,focus:n}=e;return nr.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return nr.equals(t,n)},isExpanded:e=>!ct.isCollapsed(e),isForward:e=>!ct.isBackward(e),isRange:e=>Fa(e)&&nr.isPoint(e.anchor)&&nr.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=ct.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return CE(e,r=>{if(r===null)return null;var o,i,{affinity:a="inward"}=n;if(a==="inward"){var l=ct.isCollapsed(r);ct.isForward(r)?(o="forward",i=l?o:"backward"):(o="backward",i=l?o:"forward")}else a==="outward"?ct.isForward(r)?(o="backward",i="forward"):(o="forward",i="backward"):(o=a,i=a);var s=nr.transform(r.anchor,t,{affinity:o}),u=nr.transform(r.focus,t,{affinity:i});if(!s||!u)return null;r.anchor=s,r.focus=u})}},Utt={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var o=ct.transform(n,t,{affinity:r});e.current=o,o==null&&e.unref()}}},d2e=(e,t)=>{for(var n in e){var r=e[n],o=t[n];if(Fa(r)&&Fa(o)){if(!d2e(r,o))return!1}else if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==o[i])return!1}else if(r!==o)return!1}for(var a in t)if(e[a]===void 0&&t[a]!==void 0)return!1;return!0},Wtt=["text"],Gtt=["anchor","focus"];function f2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Qt={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function o(i){return nf(i,Wtt)}return d2e(r?o(e):e,r?o(t):t)},isText:e=>Fa(e)&&typeof e.text=="string",isTextList:e=>Array.isArray(e)&&e.every(t=>Qt.isText(t)),isTextProps:e=>e.text!==void 0,matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[rf({},e)];for(var r of t){var o=nf(r,Gtt),[i,a]=ct.edges(r),l=[],s=0;for(var u of n){var{length:c}=u.text,d=s;if(s+=c,i.offset<=d&&a.offset>=s)Object.assign(u,o),l.push(u);else if(i.offset!==a.offset&&(i.offset===s||a.offset===d)||i.offset>s||a.offset<d||a.offset===d&&d!==0)l.push(u);else{var f=u,p=void 0,m=void 0;if(a.offset<s){var v=a.offset-d;m=rf(rf({},f),{},{text:f.text.slice(v)}),f=rf(rf({},f),{},{text:f.text.slice(0,v)})}if(i.offset>d){var g=i.offset-d;p=rf(rf({},f),{},{text:f.text.slice(0,g)}),f=rf(rf({},f),{},{text:f.text.slice(g)})}Object.assign(f,o),p&&l.push(p),l.push(f),m&&l.push(m)}}n=l}return n}};function p2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function C6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var qtt={transform(e,t){e.children=Xge(e.children);var n=e.selection&&Xge(e.selection);try{n=((r,o,i)=>{switch(i.type){case"insert_node":var{path:a,node:l}=i,s=Pt.parent(r,a),u=a[a.length-1];if(u>s.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(a,"] because the destination is past the end of the node."));if(s.children.splice(u,0,l),o)for(var[c,d]of ct.points(o))o[d]=nr.transform(c,i);break;case"insert_text":var{path:f,offset:p,text:m}=i;if(m.length===0)break;var v=Pt.leaf(r,f),g=v.text.slice(0,p),b=v.text.slice(p);if(v.text=g+m+b,o)for(var[y,w]of ct.points(o))o[w]=nr.transform(y,i);break;case"merge_node":var{path:x}=i,_=Pt.get(r,x),E=Ke.previous(x),C=Pt.get(r,E),T=Pt.parent(r,x),k=x[x.length-1];if(Qt.isText(_)&&Qt.isText(C))C.text+=_.text;else{if(Qt.isText(_)||Qt.isText(C))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(x,"] to nodes of different interfaces: ").concat(_," ").concat(C));C.children.push(..._.children)}if(T.children.splice(k,1),o)for(var[I,O]of ct.points(o))o[O]=nr.transform(I,i);break;case"move_node":var{path:F,newPath:N}=i;if(Ke.isAncestor(F,N))throw new Error("Cannot move a path [".concat(F,"] to new path [").concat(N,"] because the destination is inside itself."));var B=Pt.get(r,F),L=Pt.parent(r,F),V=F[F.length-1];L.children.splice(V,1);var P=Ke.transform(F,i),H=Pt.get(r,Ke.parent(P)),U=P[P.length-1];if(H.children.splice(U,0,B),o)for(var[G,z]of ct.points(o))o[z]=nr.transform(G,i);break;case"remove_node":var{path:$}=i,W=$[$.length-1];if(Pt.parent(r,$).children.splice(W,1),o)for(var[K,X]of ct.points(o)){var te=nr.transform(K,i);if(o!=null&&te!=null)o[X]=te;else{var ne=void 0,se=void 0;for(var[le,J]of Pt.texts(r)){if(Ke.compare(J,$)!==-1){se=[le,J];break}ne=[le,J]}var Z=!1;ne&&se&&(Z=Ke.equals(se[1],$)?!Ke.hasPrevious(se[1]):Ke.common(ne[1],$).length<Ke.common(se[1],$).length),ne&&!Z?(K.path=ne[1],K.offset=ne[0].text.length):se?(K.path=se[1],K.offset=0):o=null}}break;case"remove_text":var{path:ye,offset:be,text:ve}=i;if(ve.length===0)break;var Ae=Pt.leaf(r,ye),Ce=Ae.text.slice(0,be),_e=Ae.text.slice(be+ve.length);if(Ae.text=Ce+_e,o)for(var[ke,Be]of ct.points(o))o[Be]=nr.transform(ke,i);break;case"set_node":var{path:$e,properties:rt,newProperties:ge}=i;if($e.length===0)throw new Error("Cannot set properties on the root node!");var We=Pt.get(r,$e);for(var st in ge){if(st==="children"||st==="text")throw new Error('Cannot set the "'.concat(st,'" property of nodes!'));var At=ge[st];At==null?delete We[st]:We[st]=At}for(var Ve in rt)ge.hasOwnProperty(Ve)||delete We[Ve];break;case"set_selection":var{newProperties:it}=i;if(it==null)o=it;else{if(o==null){if(!ct.isRange(it))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(it)," when there is no current selection."));o=C6({},it)}for(var dt in it){var ot=it[dt];if(ot==null){if(dt==="anchor"||dt==="focus")throw new Error('Cannot remove the "'.concat(dt,'" selection property'));delete o[dt]}else o[dt]=ot}}break;case"split_node":var{path:je,position:we,properties:ze}=i;if(je.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(je,"] because the root node cannot be split."));var me,Me=Pt.get(r,je),Ie=Pt.parent(r,je),ht=je[je.length-1];if(Qt.isText(Me)){var gt=Me.text.slice(0,we),vt=Me.text.slice(we);Me.text=gt,me=C6(C6({},ze),{},{text:vt})}else{var qt=Me.children.slice(0,we),mn=Me.children.slice(we);Me.children=qt,me=C6(C6({},ze),{},{children:mn})}if(Ie.children.splice(ht+1,0,me),o)for(var[Zt,rn]of ct.points(o))o[rn]=nr.transform(Zt,i)}return o})(e,n,t)}finally{e.children=Qge(e.children),e.selection=n?H1(n)?Qge(n):n:null}}},Ktt=["text"],Ytt=["children"];function h2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function v2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Xtt={insertNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ue.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest"}=n,{at:a,match:l,select:s}=n;if(Pt.isNode(t)&&(t=[t]),t.length!==0){var[u]=t;if(a||(a=e.selection?e.selection:e.children.length>0?ue.end(e,[]):[0],s=!0),s==null&&(s=!1),ct.isRange(a))if(r||(a=ue.unhangRange(e,a)),ct.isCollapsed(a))a=a.anchor;else{var[,c]=ct.edges(a),d=ue.pointRef(e,c);et.delete(e,{at:a}),a=d.unref()}if(nr.isPoint(a)){l==null&&(l=Qt.isText(u)?E=>Qt.isText(E):e.isInline(u)?E=>Qt.isText(E)||ue.isInline(e,E):E=>ue.isBlock(e,E));var[f]=ue.nodes(e,{at:a.path,match:l,mode:i,voids:o});if(!f)return;var[,p]=f,m=ue.pathRef(e,p),v=ue.isEnd(e,a,p);et.splitNodes(e,{at:a,match:l,mode:i,voids:o});var g=m.unref();a=v?Ke.next(g):g}var b=Ke.parent(a),y=a[a.length-1];if(o||!ue.void(e,{at:b})){for(var w of t){var x=b.concat(y);y++,e.apply({type:"insert_node",path:x,node:w}),a=Ke.next(a)}if(a=Ke.previous(a),s){var _=ue.end(e,a);_&&et.select(e,_)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:o=!1}=t,{match:i}=t;if(i==null&&(i=Ke.isPath(n)?v2(e,n):w=>ue.isBlock(e,w)),n){var a=ue.nodes(e,{at:n,match:i,mode:r,voids:o}),l=Array.from(a,w=>{var[,x]=w;return ue.pathRef(e,x)});for(var s of l){var u=s.unref();if(u.length<2)throw new Error("Cannot lift node at a path [".concat(u,"] because it has a depth of less than `2`."));var c=ue.node(e,Ke.parent(u)),[d,f]=c,p=u[u.length-1],{length:m}=d.children;if(m===1){var v=Ke.next(f);et.moveNodes(e,{at:u,to:v,voids:o}),et.removeNodes(e,{at:f,voids:o})}else if(p===0)et.moveNodes(e,{at:u,to:f,voids:o});else if(p===m-1){var g=Ke.next(f);et.moveNodes(e,{at:u,to:g,voids:o})}else{var b=Ke.next(u),y=Ke.next(f);et.splitNodes(e,{at:b,voids:o}),et.moveNodes(e,{at:u,to:y,voids:o})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:o=!1,voids:i=!1,mode:a="lowest"}=t;if(r){if(n==null)if(Ke.isPath(r)){var[l]=ue.parent(e,r);n=k=>l.children.includes(k)}else n=k=>ue.isBlock(e,k);if(!o&&ct.isRange(r)&&(r=ue.unhangRange(e,r)),ct.isRange(r))if(ct.isCollapsed(r))r=r.anchor;else{var[,s]=ct.edges(r),u=ue.pointRef(e,s);et.delete(e,{at:r}),r=u.unref(),t.at==null&&et.select(e,r)}var[c]=ue.nodes(e,{at:r,match:n,voids:i,mode:a}),d=ue.previous(e,{at:r,match:n,voids:i,mode:a});if(c&&d){var[f,p]=c,[m,v]=d;if(p.length!==0&&v.length!==0){var g,b,y=Ke.next(v),w=Ke.common(p,v),x=Ke.isSibling(p,v),_=Array.from(ue.levels(e,{at:p}),k=>{var[I]=k;return I}).slice(w.length).slice(0,-1),E=ue.above(e,{at:p,mode:"highest",match:k=>_.includes(k)&&m2e(e,k)}),C=E&&ue.pathRef(e,E[1]);if(Qt.isText(f)&&Qt.isText(m)){var T=nf(f,Ktt);b=m.text.length,g=T}else{if(!sn.isElement(f)||!sn.isElement(m))throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(f)," ").concat(JSON.stringify(m)));T=nf(f,Ytt),b=m.children.length,g=T}x||et.moveNodes(e,{at:p,to:y,voids:i}),C&&et.removeNodes(e,{at:C.current,voids:i}),sn.isElement(m)&&ue.isEmpty(e,m)||Qt.isText(m)&&m.text===""&&v[v.length-1]!==0?et.removeNodes(e,{at:v,voids:i}):e.apply({type:"merge_node",path:y,position:b,properties:g}),C&&C.unref()}}}})},moveNodes(e,t){ue.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:o="lowest",voids:i=!1}=t,{match:a}=t;if(r){a==null&&(a=Ke.isPath(r)?v2(e,r):p=>ue.isBlock(e,p));var l=ue.pathRef(e,n),s=ue.nodes(e,{at:r,match:a,mode:o,voids:i}),u=Array.from(s,p=>{var[,m]=p;return ue.pathRef(e,m)});for(var c of u){var d=c.unref(),f=l.current;d.length!==0&&e.apply({type:"move_node",path:d,newPath:f}),l.current&&Ke.isSibling(f,d)&&Ke.isAfter(f,d)&&(l.current=Ke.next(l.current))}l.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:o="lowest"}=t,{at:i=e.selection,match:a}=t;if(i){a==null&&(a=Ke.isPath(i)?v2(e,i):f=>ue.isBlock(e,f)),!n&&ct.isRange(i)&&(i=ue.unhangRange(e,i));var l=ue.nodes(e,{at:i,match:a,mode:o,voids:r}),s=Array.from(l,f=>{var[,p]=f;return ue.pathRef(e,p)});for(var u of s){var c=u.unref();if(c){var[d]=ue.node(e,c);e.apply({type:"remove_node",path:c,node:d})}}}})},setNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ue.withoutNormalizing(e,()=>{var{match:r,at:o=e.selection}=n,{hanging:i=!1,mode:a="lowest",split:l=!1,voids:s=!1}=n;if(o){if(r==null&&(r=Ke.isPath(o)?v2(e,o):_=>ue.isBlock(e,_)),!i&&ct.isRange(o)&&(o=ue.unhangRange(e,o)),l&&ct.isRange(o)){if(ct.isCollapsed(o)&&ue.leaf(e,o.anchor)[0].text.length>0)return;var u=ue.rangeRef(e,o,{affinity:"inward"}),[c,d]=ct.edges(o),f=a==="lowest"?"lowest":"highest",p=ue.isEnd(e,d,d.path);et.splitNodes(e,{at:d,match:r,mode:f,voids:s,always:!p});var m=ue.isStart(e,c,c.path);et.splitNodes(e,{at:c,match:r,mode:f,voids:s,always:!m}),o=u.unref(),n.at==null&&et.select(e,o)}for(var[v,g]of ue.nodes(e,{at:o,match:r,mode:a,voids:s})){var b={},y={};if(g.length!==0){var w=!1;for(var x in t)x!=="children"&&x!=="text"&&t[x]!==v[x]&&(w=!0,v.hasOwnProperty(x)&&(b[x]=v[x]),t[x]!=null&&(y[x]=t[x]));w&&e.apply({type:"set_node",path:g,properties:b,newProperties:y})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection,height:a=0,always:l=!1}=t;if(o==null&&(o=B=>ue.isBlock(e,B)),ct.isRange(i)&&(i=Qtt(e,i)),Ke.isPath(i)){var s=i,u=ue.point(e,s),[c]=ue.parent(e,s);o=B=>B===c,a=u.path.length-s.length+1,i=u,l=!0}if(i){var d=ue.pointRef(e,i,{affinity:"backward"}),[f]=ue.nodes(e,{at:i,match:o,mode:n,voids:r});if(f){var p=ue.void(e,{at:i,mode:"highest"});if(!r&&p){var[m,v]=p;if(sn.isElement(m)&&e.isInline(m)){var g=ue.after(e,v);if(!g){var b=Ke.next(v);et.insertNodes(e,{text:""},{at:b,voids:r}),g=ue.point(e,b)}i=g,l=!0}a=i.path.length-v.length+1,l=!0}var y=ue.pointRef(e,i),w=i.path.length-a,[,x]=f,_=i.path.slice(0,w),E=a===0?i.offset:i.path[w]+0;for(var[C,T]of ue.levels(e,{at:_,reverse:!0,voids:r})){var k=!1;if(T.length<x.length||T.length===0||!r&&ue.isVoid(e,C))break;var I=d.current,O=ue.isEnd(e,I,T);if(l||!d||!ue.isEdge(e,I,T)){k=!0;var F=Pt.extractProps(C);e.apply({type:"split_node",path:T,position:E,properties:F})}E=T[T.length-1]+(k||O?1:0)}if(t.at==null){var N=y.current||ue.end(e,[]);et.select(e,N)}d.unref(),y.unref()}}})},unsetNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var o of t)r[o]=null;et.setNodes(e,r,n)},unwrapNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:o=!1}=t,{at:i=e.selection,match:a}=t;if(i){a==null&&(a=Ke.isPath(i)?v2(e,i):f=>ue.isBlock(e,f)),Ke.isPath(i)&&(i=ue.range(e,i));var l=ct.isRange(i)?ue.rangeRef(e,i):null,s=ue.nodes(e,{at:i,match:a,mode:n,voids:o}),u=Array.from(s,f=>{var[,p]=f;return ue.pathRef(e,p)}).reverse(),c=function(f){var p=f.unref(),[m]=ue.node(e,p),v=ue.range(e,p);r&&l&&(v=ct.intersection(l.current,v)),et.liftNodes(e,{at:v,match:g=>sn.isAncestor(m)&&m.children.includes(g),voids:o})};for(var d of u)c(d);l&&l.unref()}})},wrapNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ue.withoutNormalizing(e,()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{match:a,at:l=e.selection}=n;if(l){if(a==null&&(a=Ke.isPath(l)?v2(e,l):e.isInline(t)?g=>ue.isInline(e,g)||Qt.isText(g):g=>ue.isBlock(e,g)),o&&ct.isRange(l)){var[s,u]=ct.edges(l),c=ue.rangeRef(e,l,{affinity:"inward"});et.splitNodes(e,{at:u,match:a,voids:i}),et.splitNodes(e,{at:s,match:a,voids:i}),l=c.unref(),n.at==null&&et.select(e,l)}var d=Array.from(ue.nodes(e,{at:l,match:e.isInline(t)?g=>ue.isBlock(e,g):g=>ue.isEditor(g),mode:"lowest",voids:i}));for(var[,f]of d){var p=ct.isRange(l)?ct.intersection(l,ue.range(e,f)):l;if(p){var m=Array.from(ue.nodes(e,{at:p,match:a,mode:r,voids:i}));if(m.length>0){var v=function(){var[g]=m,b=m[m.length-1],[,y]=g,[,w]=b;if(y.length===0&&w.length===0)return"continue";var x=Ke.equals(y,w)?Ke.parent(y):Ke.common(y,w),_=ue.range(e,y,w),E=ue.node(e,x),[C]=E,T=x.length+1,k=Ke.next(w.slice(0,T)),I=v2e(v2e({},t),{},{children:[]});et.insertNodes(e,I,{at:k,voids:i}),et.moveNodes(e,{at:_,match:O=>sn.isAncestor(C)&&C.children.includes(O),to:k.concat(0),voids:i})}();if(v==="continue")continue}}}}})}},m2e=(e,t)=>{if(sn.isElement(t)){var n=t;return!!ue.isVoid(e,t)||n.children.length===1&&m2e(e,n.children[0])}return!ue.isEditor(t)},Qtt=(e,t)=>{if(ct.isCollapsed(t))return t.anchor;var[,n]=ct.edges(t),r=ue.pointRef(e,n);return et.delete(e,{at:t}),r.unref()},v2=(e,t)=>{var[n]=ue.node(e,t);return r=>r===n};function g2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function y2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Jtt={collapse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r){if(n==="anchor")et.select(e,r.anchor);else if(n==="focus")et.select(e,r.focus);else if(n==="start"){var[o]=ct.edges(r);et.select(e,o)}else if(n==="end"){var[,i]=ct.edges(r);et.select(e,i)}}},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:o="character",reverse:i=!1}=t,{edge:a=null}=t;if(n){a==="start"&&(a=ct.isBackward(n)?"focus":"anchor"),a==="end"&&(a=ct.isBackward(n)?"anchor":"focus");var{anchor:l,focus:s}=n,u={distance:r,unit:o},c={};if(a==null||a==="anchor"){var d=i?ue.before(e,l,u):ue.after(e,l,u);d&&(c.anchor=d)}if(a==null||a==="focus"){var f=i?ue.before(e,s,u):ue.after(e,s,u);f&&(c.focus=f)}et.setSelection(e,c)}},select(e,t){var{selection:n}=e;if(t=ue.range(e,t),n)et.setSelection(e,t);else{if(!ct.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:r}=e,{edge:o="both"}=n;if(r){o==="start"&&(o=ct.isBackward(r)?"focus":"anchor"),o==="end"&&(o=ct.isBackward(r)?"anchor":"focus");var{anchor:i,focus:a}=r,l=o==="anchor"?i:a;et.setSelection(e,{[o==="anchor"?"anchor":"focus"]:y2e(y2e({},l),t)})}},setSelection(e,t){var{selection:n}=e,r={},o={};if(n){for(var i in t)(i==="anchor"&&t.anchor!=null&&!nr.equals(t.anchor,n.anchor)||i==="focus"&&t.focus!=null&&!nr.equals(t.focus,n.focus)||i!=="anchor"&&i!=="focus"&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}}},Ztt={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r="character",distance:o=1,voids:i=!1}=t,{at:a=e.selection,hanging:l=!1}=t;if(a){if(ct.isRange(a)&&ct.isCollapsed(a)&&(a=a.anchor),nr.isPoint(a)){var s=ue.void(e,{at:a,mode:"highest"});if(!i&&s){var[,u]=s;a=u}else{var c={unit:r,distance:o};a={anchor:a,focus:n?ue.before(e,a,c)||ue.start(e,[]):ue.after(e,a,c)||ue.end(e,[])},l=!0}}if(Ke.isPath(a))et.removeNodes(e,{at:a,voids:i});else if(!ct.isCollapsed(a)){if(!l){var[,d]=ct.edges(a),f=ue.end(e,[]);nr.equals(d,f)||(a=ue.unhangRange(e,a,{voids:i}))}var[p,m]=ct.edges(a),v=ue.above(e,{match:se=>ue.isBlock(e,se),at:p,voids:i}),g=ue.above(e,{match:se=>ue.isBlock(e,se),at:m,voids:i}),b=v&&g&&!Ke.equals(v[1],g[1]),y=Ke.equals(p.path,m.path),w=i?null:ue.void(e,{at:p,mode:"highest"}),x=i?null:ue.void(e,{at:m,mode:"highest"});if(w){var _=ue.before(e,p);_&&v&&Ke.isAncestor(v[1],_.path)&&(p=_)}if(x){var E=ue.after(e,m);E&&g&&Ke.isAncestor(g[1],E.path)&&(m=E)}var C,T=[];for(var k of ue.nodes(e,{at:a,voids:i})){var[I,O]=k;C&&Ke.compare(O,C)===0||(!i&&ue.isVoid(e,I)||!Ke.isCommon(O,p.path)&&!Ke.isCommon(O,m.path))&&(T.push(k),C=O)}var F=Array.from(T,se=>{var[,le]=se;return ue.pathRef(e,le)}),N=ue.pointRef(e,p),B=ue.pointRef(e,m);if(!y&&!w){var L=N.current,[V]=ue.leaf(e,L),{path:P}=L,{offset:H}=p,U=V.text.slice(H);U.length>0&&e.apply({type:"remove_text",path:P,offset:H,text:U})}for(var G of F){var z=G.unref();et.removeNodes(e,{at:z,voids:i})}if(!x){var $=B.current,[W]=ue.leaf(e,$),{path:K}=$,X=y?p.offset:0,te=W.text.slice(X,m.offset);te.length>0&&e.apply({type:"remove_text",path:K,offset:X,text:te})}!y&&b&&B.current&&N.current&&et.mergeNodes(e,{at:B.current,hanging:!0,voids:i});var ne=n?N.unref()||B.unref():B.unref()||N.unref();t.at==null&&ne&&et.select(e,ne)}}})},insertFragment(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ue.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1}=n,{at:i=e.selection}=n;if(t.length&&i){if(ct.isRange(i))if(r||(i=ue.unhangRange(e,i)),ct.isCollapsed(i))i=i.anchor;else{var[,a]=ct.edges(i);if(!o&&ue.void(e,{at:a}))return;var l=ue.pointRef(e,a);et.delete(e,{at:i}),i=l.unref()}else Ke.isPath(i)&&(i=ue.start(e,i));if(o||!ue.void(e,{at:i})){var s=ue.above(e,{at:i,match:$=>ue.isInline(e,$),mode:"highest",voids:o});if(s){var[,u]=s;ue.isEnd(e,i,u)?i=ue.after(e,u):ue.isStart(e,i,u)&&(i=ue.before(e,u))}var c=ue.above(e,{match:$=>ue.isBlock(e,$),at:i,voids:o}),[,d]=c,f=ue.isStart(e,i,d),p=ue.isEnd(e,i,d),m=f&&p,v=!f||f&&p,g=!p,[,b]=Pt.first({children:t},[]),[,y]=Pt.last({children:t},[]),w=[],x=$=>{var[W,K]=$;return!(K.length===0||!m&&(v&&Ke.isAncestor(K,b)&&sn.isElement(W)&&!e.isVoid(W)&&!e.isInline(W)||g&&Ke.isAncestor(K,y)&&sn.isElement(W)&&!e.isVoid(W)&&!e.isInline(W)))};for(var _ of Pt.nodes({children:t},{pass:x}))x(_)&&w.push(_);var E=[],C=[],T=[],k=!0,I=!1;for(var[O]of w)sn.isElement(O)&&!e.isInline(O)?(k=!1,I=!0,C.push(O)):k?E.push(O):T.push(O);var[F]=ue.nodes(e,{at:i,match:$=>Qt.isText($)||ue.isInline(e,$),mode:"highest",voids:o}),[,N]=F,B=ue.isStart(e,i,N),L=ue.isEnd(e,i,N),V=ue.pathRef(e,p?Ke.next(d):d),P=ue.pathRef(e,L?Ke.next(N):N),H=ue.pathRef(e,d);et.splitNodes(e,{at:i,match:$=>I?ue.isBlock(e,$):Qt.isText($)||ue.isInline(e,$),mode:I?"lowest":"highest",voids:o});var U=ue.pathRef(e,!B||B&&L?Ke.next(N):N);if(et.insertNodes(e,E,{at:U.current,match:$=>Qt.isText($)||ue.isInline(e,$),mode:"highest",voids:o}),m&&C.length&&et.delete(e,{at:H.unref(),voids:o}),et.insertNodes(e,C,{at:V.current,match:$=>ue.isBlock(e,$),mode:"lowest",voids:o}),et.insertNodes(e,T,{at:P.current,match:$=>Qt.isText($)||ue.isInline(e,$),mode:"highest",voids:o}),!n.at){var G;G=T.length>0?Ke.previous(P.current):C.length>0?Ke.previous(V.current):Ke.previous(U.current);var z=ue.end(e,G);et.select(e,z)}U.unref(),V.unref(),P.unref()}}})},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ue.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:o=e.selection}=n;if(o){if(Ke.isPath(o)&&(o=ue.range(e,o)),ct.isRange(o))if(ct.isCollapsed(o))o=o.anchor;else{var i=ct.end(o);if(!r&&ue.void(e,{at:i}))return;var a=ue.pointRef(e,i);et.delete(e,{at:o,voids:r}),o=a.unref(),et.setSelection(e,{anchor:o,focus:o})}if(r||!ue.void(e,{at:o})){var{path:l,offset:s}=o;t.length>0&&e.apply({type:"insert_text",path:l,offset:s,text:t})}}})}};function b2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function DE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b2e(Object(n),!0).forEach(function(r){qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b2e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var et=DE(DE(DE(DE({},qtt),Xtt),Jtt),Ztt),Ej="[object Map]",Cj="[object Set]",ent=/^\[object .+?Constructor\]$/,tnt=/^(?:0|[1-9]\d*)$/,Sj="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",kj="\uD83C[\uDFFB-\uDFFF]",A2e="[^\uD800-\uDFFF]",w2e="(?:\uD83C[\uDDE6-\uDDFF]){2}",x2e="[\uD800-\uDBFF][\uDC00-\uDFFF]",_2e="(?:"+Sj+"|"+kj+")?",nnt="[\\ufe0e\\ufe0f]?"+_2e+"(?:\\u200d(?:"+[A2e,w2e,x2e].join("|")+")[\\ufe0e\\ufe0f]?"+_2e+")*",rnt="(?:"+[A2e+Sj+"?",Sj,w2e,x2e,"[\uD800-\uDFFF]"].join("|")+")",ont=RegExp(kj+"(?="+kj+")|"+rnt+nnt,"g"),int=RegExp("[\\u200d\uD800-\uDFFF\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),ant=typeof eo=="object"&&eo&&eo.Object===Object&&eo,lnt=typeof self=="object"&&self&&self.Object===Object&&self,W1=ant||lnt||Function("return this")();function snt(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function unt(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var E2e,C2e,cnt=Function.prototype,OE=Object.prototype,Dj=W1["__core-js_shared__"],S2e=function(){var e=/[^.]+$/.exec(Dj&&Dj.keys&&Dj.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),k2e=cnt.toString,TE=OE.hasOwnProperty,S6=OE.toString,dnt=RegExp("^"+k2e.call(TE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D2e=W1.Symbol,Oj=D2e?D2e.iterator:void 0,fnt=OE.propertyIsEnumerable,pnt=(E2e=Object.keys,C2e=Object,function(e){return E2e(C2e(e))}),Tj=k6(W1,"DataView"),Mj=k6(W1,"Map"),Nj=k6(W1,"Promise"),Fj=k6(W1,"Set"),Rj=k6(W1,"WeakMap"),hnt=q1(Tj),vnt=q1(Mj),mnt=q1(Nj),gnt=q1(Fj),ynt=q1(Rj);function k6(e,t){var n=function(r,o){return r==null?void 0:r[o]}(e,t);return function(r){if(!M2e(r)||function(i){return!!S2e&&S2e in i}(r))return!1;var o=T2e(r)||function(i){var a=!1;if(i!=null&&typeof i.toString!="function")try{a=!!(i+"")}catch{}return a}(r)?dnt:ent;return o.test(q1(r))}(n)?n:void 0}var G1=function(e){return S6.call(e)};function bnt(e,t){return!!(t=t??9007199254740991)&&(typeof e=="number"||tnt.test(e))&&e>-1&&e%1==0&&e<t}function q1(e){if(e!=null){try{return k2e.call(e)}catch{}try{return e+""}catch{}}return""}(Tj&&G1(new Tj(new ArrayBuffer(1)))!="[object DataView]"||Mj&&G1(new Mj)!=Ej||Nj&&G1(Nj.resolve())!="[object Promise]"||Fj&&G1(new Fj)!=Cj||Rj&&G1(new Rj)!="[object WeakMap]")&&(G1=function(e){var t=S6.call(e),n=t=="[object Object]"?e.constructor:void 0,r=n?q1(n):void 0;if(r)switch(r){case hnt:return"[object DataView]";case vnt:return Ej;case mnt:return"[object Promise]";case gnt:return Cj;case ynt:return"[object WeakMap]"}return t});var O2e=Array.isArray;function Ij(e){return e!=null&&function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991}(e.length)&&!T2e(e)}function T2e(e){var t=M2e(e)?S6.call(e):"";return t=="[object Function]"||t=="[object GeneratorFunction]"}function M2e(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function N2e(e){return!!e&&typeof e=="object"}function Ant(e){return e?function(t,n){return function(r,o){for(var i=-1,a=r?r.length:0,l=Array(a);++i<a;)l[i]=o(r[i]);return l}(n,function(r){return t[r]})}(e,function(t){return Ij(t)?function(n){var r=O2e(n)||function(l){return function(s){return N2e(s)&&Ij(s)}(l)&&TE.call(l,"callee")&&(!fnt.call(l,"callee")||S6.call(l)=="[object Arguments]")}(n)?function(l,s){for(var u=-1,c=Array(l);++u<l;)c[u]=s(u);return c}(n.length,String):[],o=r.length,i=!!o;for(var a in n)!TE.call(n,a)||i&&(a=="length"||bnt(a,o))||r.push(a);return r}(t):function(n){if(o=(r=n)&&r.constructor,r!==(typeof o=="function"&&o.prototype||OE))return pnt(n);var r,o,i=[];for(var a in Object(n))TE.call(n,a)&&a!="constructor"&&i.push(a);return i}(t)}(e)):[]}var F2e=function(e){if(!e)return[];if(Ij(e))return function(n){return typeof n=="string"||!O2e(n)&&N2e(n)&&S6.call(n)=="[object String]"}(e)?function(n){return function(r){return int.test(r)}(n)?function(r){return r.match(ont)||[]}(n):function(r){return r.split("")}(n)}(e):function(n,r){var o=-1,i=n.length;for(r||(r=Array(i));++o<i;)r[o]=n[o];return r}(e);if(Oj&&e[Oj])return function(n){for(var r,o=[];!(r=n.next()).done;)o.push(r.value);return o}(e[Oj]());var t=G1(e);return(t==Ej?snt:t==Cj?unt:Ant)(e)};function R2e(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Bj(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(n){e[n]===void 0?e[n]=t[n]:R2e(t[n])&&R2e(e[n])&&Object.keys(t[n]).length>0&&Bj(e[n],t[n])})}var I2e={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function D6(){var e=typeof document<"u"?document:{};return Bj(e,I2e),e}var wnt={document:I2e,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){typeof setTimeout<"u"&&clearTimeout(e)}};function K1(){var e=typeof window<"u"?window:{};return Bj(e,wnt),e}function Lj(e){return Lj=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Lj(e)}function ME(e,t){return ME=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ME(e,t)}function Pj(e,t,n){return Pj=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(r,o,i){var a=[null];a.push.apply(a,o);var l=new(Function.bind.apply(r,a));return i&&ME(l,i.prototype),l},Pj.apply(null,arguments)}function jj(e){var t=typeof Map=="function"?new Map:void 0;return jj=function(n){if(n===null||!function(o){return Function.toString.call(o).indexOf("[native code]")!==-1}(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return Pj(n,arguments,Lj(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ME(r,n)},jj(e)}var zp=function(e){var t,n;function r(o){var i,a,l;return a=function(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}(i=e.call.apply(e,[this].concat(o))||this),l=a.__proto__,Object.defineProperty(a,"__proto__",{get:function(){return l},set:function(s){l.__proto__=s}}),i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(jj(Array));function NE(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(n){Array.isArray(n)?t.push.apply(t,NE(n)):t.push(n)}),t}function B2e(e,t){return Array.prototype.filter.call(e,t)}function Le(e,t){var n=K1(),r=D6(),o=[];if(!t&&e instanceof zp)return e;if(!e)return new zp(o);if(typeof e=="string"){var i=e.trim();if(i.indexOf("<")>=0&&i.indexOf(">")>=0){var a="div";i.indexOf("<li")===0&&(a="ul"),i.indexOf("<tr")===0&&(a="tbody"),i.indexOf("<td")!==0&&i.indexOf("<th")!==0||(a="tr"),i.indexOf("<tbody")===0&&(a="table"),i.indexOf("<option")===0&&(a="select");var l=r.createElement(a);l.innerHTML=i;for(var s=0;s<l.childNodes.length;s+=1)o.push(l.childNodes[s])}else o=function(u,c){if(typeof u!="string")return[u];for(var d=[],f=c.querySelectorAll(u),p=0;p<f.length;p+=1)d.push(f[p]);return d}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof zp)return e;o=e}return new zp(function(u){for(var c=[],d=0;d<u.length;d+=1)c.indexOf(u[d])===-1&&c.push(u[d]);return c}(o))}function m2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=NE(t.map(function(o){return o.split(" ")}));return this.forEach(function(o){var i;(i=o.classList).add.apply(i,r)}),this}function g2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=NE(t.map(function(o){return o.split(" ")}));return this.forEach(function(o){var i;(i=o.classList).remove.apply(i,r)}),this}function y2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=NE(t.map(function(o){return o.split(" ")}));return B2e(this,function(o){return r.filter(function(i){return o.classList.contains(i)}).length>0}).length>0}function iu(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n+=1)if(arguments.length===2)this[n].setAttribute(e,t);else for(var r in e)this[n][r]=e[r],this[n].setAttribute(r,e[r]);return this}function FE(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function b2(){var e=this[0];if(e){var t,n={};if(e.dataset)for(var r in e.dataset)n[r]=e.dataset[r];else for(var o=0;o<e.attributes.length;o+=1){var i=e.attributes[o];i.name.indexOf("data-")>=0&&(n[t=i.name.split("data-")[1],t.toLowerCase().replace(/-(.)/g,function(l,s){return s.toUpperCase()})]=i.value)}for(var a in n)n[a]==="false"?n[a]=!1:n[a]==="true"?n[a]=!0:parseFloat(n[a])===1*n[a]&&(n[a]*=1);return n}}function Kc(e){if(e===void 0){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var n=[],r=0;r<t.selectedOptions.length;r+=1)n.push(t.selectedOptions[r].value);return n}return t.value}for(var o=0;o<this.length;o+=1){var i=this[o];if(Array.isArray(e)&&i.multiple&&i.nodeName.toLowerCase()==="select")for(var a=0;a<i.options.length;a+=1)i.options[a].selected=e.indexOf(i.options[a].value)>=0;else i.value=e}return this}function Yc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];function l(v){var g=v.target;if(g){var b=v.target.dom7EventData||[];if(b.indexOf(v)<0&&b.unshift(v),Le(g).is(o))i.apply(g,b);else for(var y=Le(g).parents(),w=0;w<y.length;w+=1)Le(y[w]).is(o)&&i.apply(y[w],b)}}function s(v){var g=v&&v.target&&v.target.dom7EventData||[];g.indexOf(v)<0&&g.unshift(v),i.apply(this,g)}typeof t[1]=="function"&&(r=t[0],i=t[1],a=t[2],o=void 0),a||(a=!1);for(var u,c=r.split(" "),d=0;d<this.length;d+=1){var f=this[d];if(o)for(u=0;u<c.length;u+=1){var p=c[u];f.dom7LiveListeners||(f.dom7LiveListeners={}),f.dom7LiveListeners[p]||(f.dom7LiveListeners[p]=[]),f.dom7LiveListeners[p].push({listener:i,proxyListener:l}),f.addEventListener(p,l,a)}else for(u=0;u<c.length;u+=1){var m=c[u];f.dom7Listeners||(f.dom7Listeners={}),f.dom7Listeners[m]||(f.dom7Listeners[m]=[]),f.dom7Listeners[m].push({listener:i,proxyListener:s}),f.addEventListener(m,s,a)}}return this}function L2e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];typeof t[1]=="function"&&(r=t[0],i=t[1],a=t[2],o=void 0),a||(a=!1);for(var l=r.split(" "),s=0;s<l.length;s+=1)for(var u=l[s],c=0;c<this.length;c+=1){var d=this[c],f=void 0;if(!o&&d.dom7Listeners?f=d.dom7Listeners[u]:o&&d.dom7LiveListeners&&(f=d.dom7LiveListeners[u]),f&&f.length)for(var p=f.length-1;p>=0;p-=1){var m=f[p];i&&m.listener===i||i&&m.listener&&m.listener.dom7proxy&&m.listener.dom7proxy===i?(d.removeEventListener(u,m.proxyListener,a),f.splice(p,1)):i||(d.removeEventListener(u,m.proxyListener,a),f.splice(p,1))}}return this}function RE(){var e=K1();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function IE(){var e=K1();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function P2e(){if(this.length>0){var e=K1(),t=D6(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,l=n===e?e.scrollY:n.scrollTop,s=n===e?e.scrollX:n.scrollLeft;return{top:r.top+l-i,left:r.left+s-a}}return null}function A2(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this}function BE(){for(var e=K1(),t=0;t<this.length;t+=1){var n=this[t];n.style.display==="none"&&(n.style.display=""),e.getComputedStyle(n,null).getPropertyValue("display")==="none"&&(n.style.display="block")}return this}function LE(e,t){var n,r=K1();if(arguments.length===1){if(typeof e!="string"){for(n=0;n<this.length;n+=1)for(var o in e)this[n].style[o]=e[o];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}if(arguments.length===2&&typeof e=="string"){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this}function PE(e){return e?(this.forEach(function(t,n){e.apply(t,[t,n])}),this):this}function j2e(e){return Le(B2e(this,e))}function Hp(e){if(e===void 0)return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function jE(e){if(e===void 0)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function V2e(e){var t,n,r=K1(),o=D6(),i=this[0];if(!i||e===void 0)return!1;if(typeof e=="string"){if(i.matches)return i.matches(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);for(t=Le(e),n=0;n<t.length;n+=1)if(t[n]===i)return!0;return!1}if(e===o)return i===o;if(e===r)return i===r;if(e.nodeType||e instanceof zp){for(t=e.nodeType?[e]:e,n=0;n<t.length;n+=1)if(t[n]===i)return!0;return!1}return!1}function au(){for(var e,t=D6(),n=0;n<arguments.length;n+=1){e=n<0||arguments.length<=n?void 0:arguments[n];for(var r=0;r<this.length;r+=1)if(typeof e=="string"){var o=t.createElement("div");for(o.innerHTML=e;o.firstChild;)this[r].appendChild(o.firstChild)}else if(e instanceof zp)for(var i=0;i<e.length;i+=1)this[r].appendChild(e[i]);else this[r].appendChild(e)}return this}function z2e(e){var t,n,r=D6();for(t=0;t<this.length;t+=1)if(typeof e=="string"){var o=r.createElement("div");for(o.innerHTML=e,n=o.childNodes.length-1;n>=0;n-=1)this[t].insertBefore(o.childNodes[n],this[t].childNodes[0])}else if(e instanceof zp)for(n=0;n<e.length;n+=1)this[t].insertBefore(e[n],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this}function w2(e){for(var t=[],n=0;n<this.length;n+=1)this[n].parentNode!==null&&(e?Le(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return Le(t)}function VE(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)e?Le(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return Le(t)}function x2(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(e),o=0;o<r.length;o+=1)t.push(r[o]);return Le(t)}function _2(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].children,o=0;o<r.length;o+=1)e&&!Le(r[o]).is(e)||t.push(r[o]);return Le(t)}function E2(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function C2(){for(var e=0;e<this.length;e+=1){var t=this[e];if(t.nodeType===1){for(var n=0;n<t.childNodes.length;n+=1)t.childNodes[n].parentNode&&t.childNodes[n].parentNode.removeChild(t.childNodes[n]);t.textContent=""}}return this}Le.fn=zp.prototype;var xnt="resize scroll".split(" ");function H2e(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n[0]===void 0){for(var o=0;o<this.length;o+=1)xnt.indexOf(e)<0&&(e in this[o]?this[o][e]():Le(this[o]).trigger(e));return this}return this.on.apply(this,[e].concat(n))}}var $2e=H2e("click"),$p=H2e("focus"),_nt="[object GeneratorFunction]",Ent=/^(?:0|[1-9]\d*)$/;function Cnt(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}var zE=Object.prototype,Vj=zE.hasOwnProperty,U2e=zE.toString,Snt=zE.propertyIsEnumerable,knt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),W2e,Dnt=(W2e=function(e,t){return e&&Ont(e,t,Mnt)},function(e,t){if(e==null)return e;if(!zj(e))return W2e(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&t(o[r],r,o)!==!1;);return e}),Ont=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var l=i[++r];if(t(o[l],l,o)===!1)break}return e};function Tnt(e,t){return!!(t=t??9007199254740991)&&(typeof e=="number"||Ent.test(e))&&e>-1&&e%1==0&&e<t}var G2e=Array.isArray;function zj(e){return e!=null&&function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991}(e.length)&&!function(t){var n=function(r){var o=typeof r;return!!r&&(o=="object"||o=="function")}(t)?U2e.call(t):"";return n=="[object Function]"||n==_nt}(e)}function Mnt(e){return zj(e)?function(t){var n=G2e(t)||function(a){return function(l){return function(s){return!!s&&typeof s=="object"}(l)&&zj(l)}(a)&&Vj.call(a,"callee")&&(!Snt.call(a,"callee")||U2e.call(a)=="[object Arguments]")}(t)?function(a,l){for(var s=-1,u=Array(a);++s<a;)u[s]=l(s);return u}(t.length,String):[],r=n.length,o=!!r;for(var i in t)!Vj.call(t,i)||o&&(i=="length"||Tnt(i,r))||n.push(i);return n}(e):function(t){if(r=(n=t)&&n.constructor,n!==(typeof r=="function"&&r.prototype||zE))return knt(t);var n,r,o=[];for(var i in Object(t))Vj.call(t,i)&&i!="constructor"&&o.push(i);return o}(e)}function Nnt(e){return e}var Hj=function(e,t){return(G2e(e)?Cnt:Dnt)(e,typeof t=="function"?t:Nnt)};let q2e=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t};var Fnt=/^\s+|\s+$/g,Rnt=/^[-+]0x[0-9a-f]+$/i,Int=/^0b[01]+$/i,Bnt=/^0o[0-7]+$/i,Lnt=parseInt,Pnt=typeof eo=="object"&&eo&&eo.Object===Object&&eo,jnt=typeof self=="object"&&self&&self.Object===Object&&self,Vnt=Pnt||jnt||Function("return this")(),znt=Object.prototype.toString,Hnt=Math.max,$nt=Math.min,$j=function(){return Vnt.Date.now()};function Unt(e,t,n){var r,o,i,a,l,s,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError("Expected a function");function p(y){var w=r,x=o;return r=o=void 0,u=y,a=e.apply(x,w)}function m(y){var w=y-s;return s===void 0||w>=t||w<0||d&&y-u>=i}function v(){var y=$j();if(m(y))return g(y);l=setTimeout(v,function(w){var x=t-(w-s);return d?$nt(x,i-(w-u)):x}(y))}function g(y){return l=void 0,f&&r?p(y):(r=o=void 0,a)}function b(){var y=$j(),w=m(y);if(r=arguments,o=this,s=y,w){if(l===void 0)return function(x){return u=x,l=setTimeout(v,t),c?p(x):a}(s);if(d)return l=setTimeout(v,t),p(s)}return l===void 0&&(l=setTimeout(v,t)),a}return t=K2e(t)||0,HE(n)&&(c=!!n.leading,i=(d="maxWait"in n)?Hnt(K2e(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),b.cancel=function(){l!==void 0&&clearTimeout(l),u=0,r=s=o=l=void 0},b.flush=function(){return l===void 0?a:g($j())},b}function HE(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function K2e(e){if(typeof e=="number")return e;if(function(r){return typeof r=="symbol"||function(o){return!!o&&typeof o=="object"}(r)&&znt.call(r)=="[object Symbol]"}(e))return NaN;if(HE(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=HE(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Fnt,"");var n=Int.test(e);return n||Bnt.test(e)?Lnt(e.slice(2),n?2:8):Rnt.test(e)?NaN:+e}var Y1=function(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError("Expected a function");return HE(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Unt(e,t,{leading:r,maxWait:t,trailing:o})};const Wnt={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return e.nodeType===1},isText:function(e){return e.nodeType===3},isComment:function(e){return e.nodeType===8}};function O6(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:t===void 0?void 0:t.key}}const Uj=Array.isArray;function $E(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}function Wj(e){return e===void 0}function Ss(e){return e!==void 0}const Y2e=O6("",{},[],void 0,void 0);function T6(e,t){var n,r;const o=e.key===t.key,i=((n=e.data)===null||n===void 0?void 0:n.is)===((r=t.data)===null||r===void 0?void 0:r.is);return e.sel===t.sel&&o&&i}function Gnt(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const a=(r=e[i])===null||r===void 0?void 0:r.key;a!==void 0&&(o[a]=i)}return o}const qnt=["create","update","remove","destroy","pre","post"];function Knt(e,t){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=Wnt;for(const c of qnt)for(const d of e){const f=d[c];f!==void 0&&n[c].push(f)}function o(c,d){return function(){if(--d==0){const f=r.parentNode(c);r.removeChild(f,c)}}}function i(c,d){var f,p;let m,v=c.data;if(v!==void 0){const y=(f=v.hook)===null||f===void 0?void 0:f.init;Ss(y)&&(y(c),v=c.data)}const g=c.children,b=c.sel;if(b==="!")Wj(c.text)&&(c.text=""),c.elm=r.createComment(c.text);else if(b!==void 0){const y=b.indexOf("#"),w=b.indexOf(".",y),x=y>0?y:b.length,_=w>0?w:b.length,E=y!==-1||w!==-1?b.slice(0,Math.min(x,_)):b,C=c.elm=Ss(v)&&Ss(m=v.ns)?r.createElementNS(m,E,v):r.createElement(E,v);for(x<_&&C.setAttribute("id",b.slice(x+1,_)),w>0&&C.setAttribute("class",b.slice(_+1).replace(/\./g," ")),m=0;m<n.create.length;++m)n.create[m](Y2e,c);if(Uj(g))for(m=0;m<g.length;++m){const k=g[m];k!=null&&r.appendChild(C,i(k,d))}else $E(c.text)&&r.appendChild(C,r.createTextNode(c.text));const T=c.data.hook;Ss(T)&&((p=T.create)===null||p===void 0||p.call(T,Y2e,c),T.insert&&d.push(c))}else c.elm=r.createTextNode(c.text);return c.elm}function a(c,d,f,p,m,v){for(;p<=m;++p){const g=f[p];g!=null&&r.insertBefore(c,i(g,v),d)}}function l(c){var d,f;const p=c.data;if(p!==void 0){(f=(d=p==null?void 0:p.hook)===null||d===void 0?void 0:d.destroy)===null||f===void 0||f.call(d,c);for(let m=0;m<n.destroy.length;++m)n.destroy[m](c);if(c.children!==void 0)for(let m=0;m<c.children.length;++m){const v=c.children[m];v!=null&&typeof v!="string"&&l(v)}}}function s(c,d,f,p){for(var m,v;f<=p;++f){let g,b;const y=d[f];if(y!=null)if(Ss(y.sel)){l(y),g=n.remove.length+1,b=o(y.elm,g);for(let x=0;x<n.remove.length;++x)n.remove[x](y,b);const w=(v=(m=y==null?void 0:y.data)===null||m===void 0?void 0:m.hook)===null||v===void 0?void 0:v.remove;Ss(w)?w(y,b):b()}else r.removeChild(c,y.elm)}}function u(c,d,f){var p,m,v,g,b;const y=(p=d.data)===null||p===void 0?void 0:p.hook;(m=y==null?void 0:y.prepatch)===null||m===void 0||m.call(y,c,d);const w=d.elm=c.elm,x=c.children,_=d.children;if(c!==d){if(d.data!==void 0){for(let E=0;E<n.update.length;++E)n.update[E](c,d);(g=(v=d.data.hook)===null||v===void 0?void 0:v.update)===null||g===void 0||g.call(v,c,d)}Wj(d.text)?Ss(x)&&Ss(_)?x!==_&&function(E,C,T,k){let I,O,F,N,B=0,L=0,V=C.length-1,P=C[0],H=C[V],U=T.length-1,G=T[0],z=T[U];for(;B<=V&&L<=U;)P==null?P=C[++B]:H==null?H=C[--V]:G==null?G=T[++L]:z==null?z=T[--U]:T6(P,G)?(u(P,G,k),P=C[++B],G=T[++L]):T6(H,z)?(u(H,z,k),H=C[--V],z=T[--U]):T6(P,z)?(u(P,z,k),r.insertBefore(E,P.elm,r.nextSibling(H.elm)),P=C[++B],z=T[--U]):T6(H,G)?(u(H,G,k),r.insertBefore(E,H.elm,P.elm),H=C[--V],G=T[++L]):(I===void 0&&(I=Gnt(C,B,V)),O=I[G.key],Wj(O)?r.insertBefore(E,i(G,k),P.elm):(F=C[O],F.sel!==G.sel?r.insertBefore(E,i(G,k),P.elm):(u(F,G,k),C[O]=void 0,r.insertBefore(E,F.elm,P.elm))),G=T[++L]);(B<=V||L<=U)&&(B>V?(N=T[U+1]==null?null:T[U+1].elm,a(E,N,T,L,U,k)):s(E,C,B,V))}(w,x,_,f):Ss(_)?(Ss(c.text)&&r.setTextContent(w,""),a(w,null,_,0,_.length-1,f)):Ss(x)?s(w,x,0,x.length-1):Ss(c.text)&&r.setTextContent(w,""):c.text!==d.text&&(Ss(x)&&s(w,x,0,x.length-1),r.setTextContent(w,d.text)),(b=y==null?void 0:y.postpatch)===null||b===void 0||b.call(y,c,d)}}return function(c,d){let f,p,m;const v=[];for(f=0;f<n.pre.length;++f)n.pre[f]();for(function(g){return g.sel!==void 0}(c)||(c=function(g){const b=g.id?"#"+g.id:"",y=g.getAttribute("class"),w=y?"."+y.split(" ").join("."):"";return O6(r.tagName(g).toLowerCase()+b+w,{},[],void 0,g)}(c)),T6(c,d)?u(c,d,v):(p=c.elm,m=r.parentNode(p),i(d,v),m!==null&&(r.insertBefore(m,d.elm,r.nextSibling(p)),s(m,[c],0,0))),f=0;f<v.length;++f)v[f].data.hook.insert(v[f]);for(f=0;f<n.post.length;++f)n.post[f]();return d}}function X2e(e,t,n){if(e.ns="http://www.w3.org/2000/svg",n!=="foreignObject"&&t!==void 0)for(let r=0;r<t.length;++r){const o=t[r].data;o!==void 0&&X2e(o,t[r].children,t[r].sel)}}function S2(e,t,n){let r,o,i,a={};if(n!==void 0?(t!==null&&(a=t),Uj(n)?r=n:$E(n)?o=n.toString():n&&n.sel&&(r=[n])):t!=null&&(Uj(t)?r=t:$E(t)?o=t.toString():t&&t.sel?r=[t]:a=t),r!==void 0)for(i=0;i<r.length;++i)$E(r[i])&&(r[i]=O6(void 0,void 0,void 0,r[i],void 0));return e[0]!=="s"||e[1]!=="v"||e[2]!=="g"||e.length!==3&&e[3]!=="."&&e[3]!=="#"||X2e(a,r,e),O6(e,a,r,o,void 0)}function Q2e(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const a=i[n];o[n]!==a&&(a===!0?r.setAttribute(n,""):a===!1?r.removeAttribute(n):n.charCodeAt(0)!==120?r.setAttribute(n,a):n.charCodeAt(3)===58?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):n.charCodeAt(5)===58?r.setAttributeNS("http://www.w3.org/1999/xlink",n,a):r.setAttribute(n,a))}for(n in o)n in i||r.removeAttribute(n)}}const Ynt={create:Q2e,update:Q2e};function J2e(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const Xnt={create:J2e,update:J2e},Z2e=/[A-Z]/g;function eye(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i||o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)i[r]||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(Z2e,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(Z2e,"-$&").toLowerCase(),i[r]))}const Qnt={create:eye,update:eye};function tye(e,t,n){if(typeof e=="function")e.call(t,n,t);else if(typeof e=="object")for(let r=0;r<e.length;r++)tye(e[r],t,n)}function Jnt(e,t){const n=e.type,r=t.data.on;r&&r[n]&&tye(r[n],t,e)}function Gj(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let l;if(n!==i){if(n&&r)if(i)for(l in n)i[l]||o.removeEventListener(l,r,!1);else for(l in n)o.removeEventListener(l,r,!1);if(i){const s=t.listener=e.listener||function u(c){Jnt(c,u.vnode)};if(s.vnode=t,n)for(l in i)n[l]||a.addEventListener(l,s,!1);else for(l in i)a.addEventListener(l,s,!1)}}}const Znt={create:Gj,update:Gj,destroy:Gj};function nye(e,t){let n,r,o;const i=t.elm;let a=e.data.props,l=t.data.props;if((a||l)&&a!==l)for(n in a=a||{},l=l||{},l)r=l[n],o=a[n],o===r||n==="value"&&i[n]===r||(i[n]=r)}const ert={create:nye,update:nye},rye=typeof window<"u"&&window.requestAnimationFrame.bind(window)||setTimeout;let qj=!1;function trt(e,t,n){(function(r){rye(function(){rye(r)})})(function(){e[t]=n})}function oye(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a||i===a)return;i=i||{},a=a||{};const l="delayed"in i;for(r in i)a[r]||(r[0]==="-"&&r[1]==="-"?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],r==="delayed"&&a.delayed)for(const s in a.delayed)n=a.delayed[s],l&&n===i.delayed[s]||trt(o.style,s,n);else r!=="remove"&&n!==i[r]&&(r[0]==="-"&&r[1]==="-"?o.style.setProperty(r,n):o.style[r]=n)}const nrt={pre:function(){qj=!1},create:oye,update:oye,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;qj||(e.elm.offsetLeft,qj=!0);const o=e.elm;let i=0;const a=n.remove;let l=0;const s=[];for(r in a)s.push(r),o.style[r]=a[r];const u=getComputedStyle(o)["transition-property"].split(", ");for(;i<u.length;++i)s.indexOf(u[i])!==-1&&l++;o.addEventListener("transitionend",function(c){c.target===o&&--l,l===0&&t()})}};function iye(e,t){for(const n of e)n!=null&&n!==!1&&n!==""&&(Array.isArray(n)?iye(n,t):typeof n=="string"||typeof n=="number"||typeof n=="boolean"?t.push(O6(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function Mn(e,t,...n){const r=iye(n,[]);return typeof e=="function"?e(t,r):r.length===1&&!r[0].sel&&r[0].text?S2(e,t,r[0].text):S2(e,t,r)}Mn||(Mn={});var Kj,rrt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ort=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,aye="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lye="["+aye+"]",UE="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",sye="\\d+",uye="[a-z\\xdf-\\xf6\\xf8-\\xff]",cye="[^\uD800-\uDFFF"+aye+sye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Yj="\uD83C[\uDFFB-\uDFFF]",dye="[^\uD800-\uDFFF]",Xj="(?:\uD83C[\uDDE6-\uDDFF]){2}",Qj="[\uD800-\uDBFF][\uDC00-\uDFFF]",k2="[A-Z\\xc0-\\xd6\\xd8-\\xde]",fye="(?:"+uye+"|"+cye+")",irt="(?:"+k2+"|"+cye+")",pye="(?:"+UE+"|"+Yj+")?",hye="[\\ufe0e\\ufe0f]?"+pye+"(?:\\u200d(?:"+[dye,Xj,Qj].join("|")+")[\\ufe0e\\ufe0f]?"+pye+")*",art="(?:"+["[\\u2700-\\u27bf]",Xj,Qj].join("|")+")"+hye,lrt="(?:"+[dye+UE+"?",UE,Xj,Qj,"[\uD800-\uDFFF]"].join("|")+")",srt=RegExp("['\u2019]","g"),urt=RegExp(UE,"g"),crt=RegExp(Yj+"(?="+Yj+")|"+lrt+hye,"g"),drt=RegExp([k2+"?"+uye+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[lye,k2,"$"].join("|")+")",irt+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[lye,k2+fye,"$"].join("|")+")",k2+"?"+fye+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",k2+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",sye,art].join("|"),"g"),frt=RegExp("[\\u200d\uD800-\uDFFF\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),prt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hrt=typeof eo=="object"&&eo&&eo.Object===Object&&eo,vrt=typeof self=="object"&&self&&self.Object===Object&&self,mrt=hrt||vrt||Function("return this")(),grt=(Kj={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},function(e){return Kj==null?void 0:Kj[e]});function vye(e){return frt.test(e)}var yrt=Object.prototype.toString,mye=mrt.Symbol,gye=mye?mye.prototype:void 0,yye=gye?gye.toString:void 0;function WE(e){return e==null?"":function(t){if(typeof t=="string")return t;if(function(r){return typeof r=="symbol"||function(o){return!!o&&typeof o=="object"}(r)&&yrt.call(r)=="[object Symbol]"}(t))return yye?yye.call(t):"";var n=t+"";return n=="0"&&1/t==-1/0?"-0":n}(e)}for(var bye,brt=(bye=function(e,t,n){return t=t.toLowerCase(),e+(n?Art(WE(t).toLowerCase()):t)},function(e){return function(t,n,r){for(var o=-1,i=t?t.length:0;++o<i;)r=n(r,t[o],o,t);return r}(function(t,n){return t=WE(t),n===void 0?function(r){return prt.test(r)}(t)?function(r){return r.match(drt)||[]}(t):function(r){return r.match(rrt)||[]}(t):t.match(n)||[]}(function(t){return(t=WE(t))&&t.replace(ort,grt).replace(urt,"")}(e).replace(srt,"")),bye,"")}),Art=function(e){var t=vye(e=WE(e))?function(o){return vye(o)?function(i){return i.match(crt)||[]}(o):function(i){return i.split("")}(o)}(e):void 0,n=t?t[0]:e.charAt(0),r=t?function(o,i,a){var l=o.length;return a=a===void 0?l:a,!i&&a>=l?o:function(s,u,c){var d=-1,f=s.length;u<0&&(u=-u>f?0:f+u),(c=c>f?f:c)<0&&(c+=f),f=u>c?0:c-u>>>0,u>>>=0;for(var p=Array(f);++d<f;)p[d]=s[d+u];return p}(o,i,a)}(t,1).join(""):e.slice(1);return n.toUpperCase()+r},wrt=brt,xrt=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Jj={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Aye={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:xrt?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Zj={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},GE=1;GE<20;GE++)Zj["f"+GE]=111+GE;function wye(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(i){return function(a,l){var s=l&&l.byKey,u={},c=(a=a.replace("++","+add")).split("+"),d=c.length;for(var f in Jj)u[Jj[f]]=!1;var p=!0,m=!1,v=void 0;try{for(var g,b=c[Symbol.iterator]();!(p=(g=b.next()).done);p=!0){var y=g.value,w=y.endsWith("?")&&y.length>1;w&&(y=y.slice(0,-1));var x=xye(y),_=Jj[x];if(y.length>1&&!_&&!Aye[y]&&!Zj[x])throw new TypeError('Unknown modifier: "'+y+'"');d!==1&&_||(s?u.key=x:u.which=_rt(y)),_&&(u[_]=!w||null)}}catch(E){m=!0,v=E}finally{try{!p&&b.return&&b.return()}finally{if(m)throw v}}return u}(i,t)}),o=function(i){return r.some(function(a){return function(l,s){for(var u in l){var c=l[u],d=void 0;if(c!=null&&((d=u==="key"&&s.key!=null?s.key.toLowerCase():u==="which"?c===91&&s.which===93?91:s.which:s[u])!=null||c!==!1)&&d!==c)return!1}return!0}(a,i)})};return n==null?o:o(n)}function _rt(e){return e=xye(e),Zj[e]||e.toUpperCase().charCodeAt(0)}function xye(e){return e=e.toLowerCase(),Aye[e]||e}var Ert=wye,eV=function(e,t){return wye(e,{byKey:!0},t)},Crt=/^\s+|\s+$/g,Srt=/^[-+]0x[0-9a-f]+$/i,krt=/^0b[01]+$/i,Drt=/^0o[0-7]+$/i,Ort=parseInt,Trt=typeof eo=="object"&&eo&&eo.Object===Object&&eo,Mrt=typeof self=="object"&&self&&self.Object===Object&&self,Nrt=Trt||Mrt||Function("return this")(),Frt=Object.prototype.toString,Rrt=Math.max,Irt=Math.min,tV=function(){return Nrt.Date.now()};function nV(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function _ye(e){if(typeof e=="number")return e;if(function(r){return typeof r=="symbol"||function(o){return!!o&&typeof o=="object"}(r)&&Frt.call(r)=="[object Symbol]"}(e))return NaN;if(nV(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nV(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Crt,"");var n=krt.test(e);return n||Drt.test(e)?Ort(e.slice(2),n?2:8):Srt.test(e)?NaN:+e}var D2,Eye=function(e,t,n){var r,o,i,a,l,s,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError("Expected a function");function p(y){var w=r,x=o;return r=o=void 0,u=y,a=e.apply(x,w)}function m(y){var w=y-s;return s===void 0||w>=t||w<0||d&&y-u>=i}function v(){var y=tV();if(m(y))return g(y);l=setTimeout(v,function(w){var x=t-(w-s);return d?Irt(x,i-(w-u)):x}(y))}function g(y){return l=void 0,f&&r?p(y):(r=o=void 0,a)}function b(){var y=tV(),w=m(y);if(r=arguments,o=this,s=y,w){if(l===void 0)return function(x){return u=x,l=setTimeout(v,t),c?p(x):a}(s);if(d)return l=setTimeout(v,t),p(s)}return l===void 0&&(l=setTimeout(v,t)),a}return t=_ye(t)||0,nV(n)&&(c=!!n.leading,i=(d="maxWait"in n)?Rrt(_ye(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),b.cancel=function(){l!==void 0&&clearTimeout(l),u=0,r=s=o=l=void 0},b.flush=function(){return l===void 0?a:g(tV())},b},Cye=T1(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",l="[object Function]",s="[object GeneratorFunction]",u="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",m="[object Set]",v="[object String]",g="[object Symbol]",b="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",_="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",T="[object Int32Array]",k="[object Uint8Array]",I="[object Uint8ClampedArray]",O="[object Uint16Array]",F="[object Uint32Array]",N=/\w*$/,B=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,V={};V[o]=V["[object Array]"]=V[y]=V[w]=V[i]=V[a]=V[x]=V[_]=V[E]=V[C]=V[T]=V[u]=V[c]=V[d]=V[p]=V[m]=V[v]=V[g]=V[k]=V[I]=V[O]=V[F]=!0,V["[object Error]"]=V[l]=V[b]=!1;var P=typeof eo=="object"&&eo&&eo.Object===Object&&eo,H=typeof self=="object"&&self&&self.Object===Object&&self,U=P||H||Function("return this")(),G=t&&!t.nodeType&&t,z=G&&e&&!e.nodeType&&e,$=z&&z.exports===G;function W(Oe,nt){return Oe.set(nt[0],nt[1]),Oe}function K(Oe,nt){return Oe.add(nt),Oe}function X(Oe,nt,ut,xt){for(var En=-1,ln=Oe?Oe.length:0;++En<ln;)ut=nt(ut,Oe[En],En,Oe);return ut}function te(Oe){var nt=!1;if(Oe!=null&&typeof Oe.toString!="function")try{nt=!!(Oe+"")}catch{}return nt}function ne(Oe){var nt=-1,ut=Array(Oe.size);return Oe.forEach(function(xt,En){ut[++nt]=[En,xt]}),ut}function se(Oe,nt){return function(ut){return Oe(nt(ut))}}function le(Oe){var nt=-1,ut=Array(Oe.size);return Oe.forEach(function(xt){ut[++nt]=xt}),ut}var J=Array.prototype,Z=Function.prototype,ye=Object.prototype,be=U["__core-js_shared__"],ve=function(){var Oe=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return Oe?"Symbol(src)_1."+Oe:""}(),Ae=Z.toString,Ce=ye.hasOwnProperty,_e=ye.toString,ke=RegExp("^"+Ae.call(Ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=$?U.Buffer:void 0,$e=U.Symbol,rt=U.Uint8Array,ge=se(Object.getPrototypeOf,Object),We=Object.create,st=ye.propertyIsEnumerable,At=J.splice,Ve=Object.getOwnPropertySymbols,it=Be?Be.isBuffer:void 0,dt=se(Object.keys,Object),ot=Ao(U,"DataView"),je=Ao(U,"Map"),we=Ao(U,"Promise"),ze=Ao(U,"Set"),me=Ao(U,"WeakMap"),Me=Ao(Object,"create"),Ie=He(ot),ht=He(je),gt=He(we),vt=He(ze),qt=He(me),mn=$e?$e.prototype:void 0,Zt=mn?mn.valueOf:void 0;function rn(Oe){var nt=-1,ut=Oe?Oe.length:0;for(this.clear();++nt<ut;){var xt=Oe[nt];this.set(xt[0],xt[1])}}function zn(Oe){var nt=-1,ut=Oe?Oe.length:0;for(this.clear();++nt<ut;){var xt=Oe[nt];this.set(xt[0],xt[1])}}function tt(Oe){var nt=-1,ut=Oe?Oe.length:0;for(this.clear();++nt<ut;){var xt=Oe[nt];this.set(xt[0],xt[1])}}function kt(Oe){this.__data__=new zn(Oe)}function An(Oe,nt,ut){var xt=Oe[nt];Ce.call(Oe,nt)&<(xt,ut)&&(ut!==void 0||nt in Oe)||(Oe[nt]=ut)}function _n(Oe,nt){for(var ut=Oe.length;ut--;)if(lt(Oe[ut][0],nt))return ut;return-1}function po(Oe,nt,ut,xt,En,ln,Ct){var Fn;if(xt&&(Fn=ln?xt(Oe,En,ln,Ct):xt(Oe)),Fn!==void 0)return Fn;if(!Ne(Oe))return Oe;var Mo=Et(Oe);if(Mo){if(Fn=function(xe){var Ee=xe.length,Ze=xe.constructor(Ee);return Ee&&typeof xe[0]=="string"&&Ce.call(xe,"index")&&(Ze.index=xe.index,Ze.input=xe.input),Ze}(Oe),!nt)return function(xe,Ee){var Ze=-1,Vt=xe.length;for(Ee||(Ee=Array(Vt));++Ze<Vt;)Ee[Ze]=xe[Ze];return Ee}(Oe,Fn)}else{var jr=Go(Oe),cr=jr==l||jr==s;if(gr(Oe))return function(xe,Ee){if(Ee)return xe.slice();var Ze=new xe.constructor(xe.length);return xe.copy(Ze),Ze}(Oe,nt);if(jr==d||jr==o||cr&&!ln){if(te(Oe))return ln?Oe:{};if(Fn=function(xe){return typeof xe.constructor!="function"||sa(xe)?{}:Ne(Ee=ge(xe))?We(Ee):{};var Ee}(cr?{}:Oe),!nt)return function(xe,Ee){return Ar(xe,pl(xe),Ee)}(Oe,function(xe,Ee){return xe&&Ar(Ee,Tt(Ee),xe)}(Fn,Oe))}else{if(!V[jr])return ln?Oe:{};Fn=function(xe,Ee,Ze,Vt){var Cn=xe.constructor;switch(Ee){case y:return Qr(xe);case i:case a:return new Cn(+xe);case w:return function(on,Pn){var Mr=Pn?Qr(on.buffer):on.buffer;return new on.constructor(Mr,on.byteOffset,on.byteLength)}(xe,Vt);case x:case _:case E:case C:case T:case k:case I:case O:case F:return function(on,Pn){var Mr=Pn?Qr(on.buffer):on.buffer;return new on.constructor(Mr,on.byteOffset,on.length)}(xe,Vt);case u:return function(on,Pn,Mr){return X(Pn?Mr(ne(on),!0):ne(on),W,new on.constructor)}(xe,Vt,Ze);case c:case v:return new Cn(xe);case p:return function(on){var Pn=new on.constructor(on.source,N.exec(on));return Pn.lastIndex=on.lastIndex,Pn}(xe);case m:return function(on,Pn,Mr){return X(Pn?Mr(le(on),!0):le(on),K,new on.constructor)}(xe,Vt,Ze);case g:return function(on){return Zt?Object(Zt.call(on)):{}}(xe)}}(Oe,jr,po,nt)}}Ct||(Ct=new kt);var Ha=Ct.get(Oe);if(Ha)return Ha;if(Ct.set(Oe,Fn),!Mo)var pe=ut?function(xe){return function(Ee,Ze,Vt){var Cn=Ze(Ee);return Et(Ee)?Cn:function(on,Pn){for(var Mr=-1,gn=Pn.length,Ef=on.length;++Mr<gn;)on[Ef+Mr]=Pn[Mr];return on}(Cn,Vt(Ee))}(xe,Tt,pl)}(Oe):Tt(Oe);return function(xe,Ee){for(var Ze=-1,Vt=xe?xe.length:0;++Ze<Vt&&Ee(xe[Ze],Ze)!==!1;);}(pe||Oe,function(xe,Ee){pe&&(xe=Oe[Ee=xe]),An(Fn,Ee,po(xe,nt,ut,xt,Ee,Oe,Ct))}),Fn}function Qr(Oe){var nt=new Oe.constructor(Oe.byteLength);return new rt(nt).set(new rt(Oe)),nt}function Ar(Oe,nt,ut,xt){ut||(ut={});for(var En=-1,ln=nt.length;++En<ln;){var Ct=nt[En];An(ut,Ct,Oe[Ct])}return ut}function Jr(Oe,nt){var ut,xt,En=Oe.__data__;return((xt=typeof(ut=nt))=="string"||xt=="number"||xt=="symbol"||xt=="boolean"?ut!=="__proto__":ut===null)?En[typeof nt=="string"?"string":"hash"]:En.map}function Ao(Oe,nt){var ut=function(xt,En){return xt==null?void 0:xt[En]}(Oe,nt);return function(xt){return!(!Ne(xt)||function(En){return!!ve&&ve in En}(xt))&&(Bn(xt)||te(xt)?ke:B).test(He(xt))}(ut)?ut:void 0}rn.prototype.clear=function(){this.__data__=Me?Me(null):{}},rn.prototype.delete=function(Oe){return this.has(Oe)&&delete this.__data__[Oe]},rn.prototype.get=function(Oe){var nt=this.__data__;if(Me){var ut=nt[Oe];return ut===n?void 0:ut}return Ce.call(nt,Oe)?nt[Oe]:void 0},rn.prototype.has=function(Oe){var nt=this.__data__;return Me?nt[Oe]!==void 0:Ce.call(nt,Oe)},rn.prototype.set=function(Oe,nt){return this.__data__[Oe]=Me&&nt===void 0?n:nt,this},zn.prototype.clear=function(){this.__data__=[]},zn.prototype.delete=function(Oe){var nt=this.__data__,ut=_n(nt,Oe);return!(ut<0||(ut==nt.length-1?nt.pop():At.call(nt,ut,1),0))},zn.prototype.get=function(Oe){var nt=this.__data__,ut=_n(nt,Oe);return ut<0?void 0:nt[ut][1]},zn.prototype.has=function(Oe){return _n(this.__data__,Oe)>-1},zn.prototype.set=function(Oe,nt){var ut=this.__data__,xt=_n(ut,Oe);return xt<0?ut.push([Oe,nt]):ut[xt][1]=nt,this},tt.prototype.clear=function(){this.__data__={hash:new rn,map:new(je||zn),string:new rn}},tt.prototype.delete=function(Oe){return Jr(this,Oe).delete(Oe)},tt.prototype.get=function(Oe){return Jr(this,Oe).get(Oe)},tt.prototype.has=function(Oe){return Jr(this,Oe).has(Oe)},tt.prototype.set=function(Oe,nt){return Jr(this,Oe).set(Oe,nt),this},kt.prototype.clear=function(){this.__data__=new zn},kt.prototype.delete=function(Oe){return this.__data__.delete(Oe)},kt.prototype.get=function(Oe){return this.__data__.get(Oe)},kt.prototype.has=function(Oe){return this.__data__.has(Oe)},kt.prototype.set=function(Oe,nt){var ut=this.__data__;if(ut instanceof zn){var xt=ut.__data__;if(!je||xt.length<199)return xt.push([Oe,nt]),this;ut=this.__data__=new tt(xt)}return ut.set(Oe,nt),this};var pl=Ve?se(Ve,Object):function(){return[]},Go=function(Oe){return _e.call(Oe)};function za(Oe,nt){return!!(nt=nt??r)&&(typeof Oe=="number"||L.test(Oe))&&Oe>-1&&Oe%1==0&&Oe<nt}function sa(Oe){var nt=Oe&&Oe.constructor;return Oe===(typeof nt=="function"&&nt.prototype||ye)}function He(Oe){if(Oe!=null){try{return Ae.call(Oe)}catch{}try{return Oe+""}catch{}}return""}function lt(Oe,nt){return Oe===nt||Oe!=Oe&&nt!=nt}(ot&&Go(new ot(new ArrayBuffer(1)))!=w||je&&Go(new je)!=u||we&&Go(we.resolve())!=f||ze&&Go(new ze)!=m||me&&Go(new me)!=b)&&(Go=function(Oe){var nt=_e.call(Oe),ut=nt==d?Oe.constructor:void 0,xt=ut?He(ut):void 0;if(xt)switch(xt){case Ie:return w;case ht:return u;case gt:return f;case vt:return m;case qt:return b}return nt});var Et=Array.isArray;function Kt(Oe){return Oe!=null&&function(nt){return typeof nt=="number"&&nt>-1&&nt%1==0&&nt<=r}(Oe.length)&&!Bn(Oe)}var gr=it||function(){return!1};function Bn(Oe){var nt=Ne(Oe)?_e.call(Oe):"";return nt==l||nt==s}function Ne(Oe){var nt=typeof Oe;return!!Oe&&(nt=="object"||nt=="function")}function Tt(Oe){return Kt(Oe)?function(nt){var ut=Et(nt)||function(Ct){return function(Fn){return function(Mo){return!!Mo&&typeof Mo=="object"}(Fn)&&Kt(Fn)}(Ct)&&Ce.call(Ct,"callee")&&(!st.call(Ct,"callee")||_e.call(Ct)==o)}(nt)?function(Ct,Fn){for(var Mo=-1,jr=Array(Ct);++Mo<Ct;)jr[Mo]=Fn(Mo);return jr}(nt.length,String):[],xt=ut.length,En=!!xt;for(var ln in nt)!Ce.call(nt,ln)||En&&(ln=="length"||za(ln,xt))||ut.push(ln);return ut}(Oe):function(nt){if(!sa(nt))return dt(nt);var ut=[];for(var xt in Object(nt))Ce.call(nt,xt)&&xt!="constructor"&&ut.push(xt);return ut}(Oe)}e.exports=function(Oe){return po(Oe,!0,!0)}});function Sye(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Brt=0;function Lrt(e,t,n){const r=[];return e.forEach(o=>typeof o!="string"?r.push(o):t[Symbol.split](o).forEach((i,a,l)=>{i!==""&&r.push(i),a<l.length-1&&r.push(n)})),r}function kye(e,t){const n=/\$/g;let r=[e];if(t==null)return r;for(const o of Object.keys(t))if(o!=="_"){let i=t[o];typeof i=="string"&&(i=n[Symbol.replace](i,"$$$$")),r=Lrt(r,new RegExp(`%\\{${o}\\}`,"g"),i)}return r}var Dye=(D2=function(e){return"__private_"+Brt+++"_"+e}("apply"),class{constructor(e){Object.defineProperty(this,D2,{value:Prt}),this.locale={strings:{},pluralize:t=>t===1?0:1},Array.isArray(e)?e.forEach(Sye(this,D2)[D2],this):Sye(this,D2)[D2](e)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!function(r,o){return Object.prototype.hasOwnProperty.call(r,o)}(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if(typeof n=="object"){if(t&&t.smart_count!==void 0)return kye(n[this.locale.pluralize(t.smart_count)],t);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return kye(n,t)}});function Prt(e){if(e==null||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var Oye=function(){var e={},t=e._fns={};return e.emit=function(n,r,o,i,a,l,s){var u=function(c){for(var d=t[c]?t[c]:[],f=c.indexOf(":"),p=f===-1?[c]:[c.substring(0,f),c.substring(f+1)],m=Object.keys(t),v=0,g=m.length;v<g;v++){var b=m[v];if(b==="*"&&(d=d.concat(t[b])),p.length===2&&p[0]===b){d=d.concat(t[b]);break}}return d}(n);u.length&&function(c,d,f){for(var p=0,m=d.length;p<m&&d[p];p++)d[p].event=c,d[p].apply(d[p],f)}(n,u,[r,o,i,a,l,s])},e.on=function(n,r){t[n]||(t[n]=[]),t[n].push(r)},e.once=function(n,r){this.on(n,function o(){r.apply(this,arguments),e.off(n,o)})},e.off=function(n,r){var o=[];if(n&&r)for(var i=this._fns[n],a=0,l=i?i.length:0;a<l;a++)i[a]!==r&&o.push(i[a]);o.length?this._fns[n]=o:delete this._fns[n]},e};let{urlAlphabet:jrt}={urlAlphabet:"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"},Tye=e=>crypto.getRandomValues(new Uint8Array(e)),Mye=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,o=-~(1.6*r*t/e.length);return()=>{let i="";for(;;){let a=n(o),l=o;for(;l--;)if(i+=e[a[l]&r]||"",i.length===t)return i}}};var Vrt={nanoid:(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t},customAlphabet:(e,t)=>Mye(e,t,Tye),customRandom:Mye,urlAlphabet:jrt,random:Tye},rV=function(e){if(typeof e!="number"||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o};function Nye(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}Nye.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if(typeof e=="string"||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)o[t]!=="*"&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if(typeof e.splice=="function")for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if(typeof e=="object")for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r};var zrt=/[\/\+\.]/,Hrt=0,oV=function(e){return"__private_"+Hrt+++"_"+e}("publish");class Fye{constructor(){Object.defineProperty(this,oV,{value:$rt}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const n={...this.state},r={...this.state,...t};this.state=r,function(o,i){if(!Object.prototype.hasOwnProperty.call(o,i))throw new TypeError("attempted to use private field on non-instance");return o}(this,oV)[oV](n,r,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}}function $rt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach(r=>{r(...t)})}Fye.VERSION="2.0.3";var Rye=function(e){const t=e.lastIndexOf(".");return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}},Iye={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function Bye(e){let t="";return e.replace(/[^A-Z0-9]/gi,n=>(t+=`-${function(r){return r.charCodeAt(0).toString(32)}(n)}`,"/"))+t}var Urt=function(e){if(e==null&&(e=typeof navigator<"u"?navigator.userAgent:null),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||r===15&&o<15063||r>18||r===18&&o>=18218};function iV(e){return e<10?`0${e}`:e.toString()}var qE=function(){const e=new Date;return`${iV(e.getHours())}:${iV(e.getMinutes())}:${iV(e.getSeconds())}`},Lye={justErrorsLogger:{debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${qE()}]`,...t)}},debugLogger:{debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${qE()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${qE()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${qE()}]`,...t)}}},Wrt={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",backToSearch:"Back to Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}},Pye=Vrt;let jye,Vye;function un(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Grt=0;function yi(e){return"__private_"+Grt+++"_"+e}const{nanoid:qrt}=Pye,{justErrorsLogger:Krt,debugLogger:Yrt}=Lye;class Xc extends Error{constructor(){super(...arguments),this.isRestriction=!0}}typeof AggregateError>"u"&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});class Xrt extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}}var xa=yi("plugins"),M6=yi("storeUnsubscribe"),of=yi("emitter"),X1=yi("preProcessors"),Q1=yi("uploaders"),af=yi("postProcessors"),N6=yi("checkRestrictions"),aV=yi("checkMinNumberOfFiles"),F6=yi("checkRequiredMetaFieldsOnFile"),lV=yi("checkRequiredMetaFields"),Ii=yi("showOrLogErrorAndThrow"),R6=yi("assertNewUploadAllowed"),I6=yi("checkAndCreateFileStateObject"),B6=yi("startIfAutoProceed"),sV=yi("addListeners"),qu=yi("updateOnlineStatus"),lf=yi("createUpload"),uV=yi("getUpload"),J1=yi("removeUpload"),sf=yi("runUpload");jye=Symbol.for("uppy test: getPlugins"),Vye=Symbol.for("uppy test: createUpload");class zye{constructor(t){Object.defineProperty(this,sf,{value:uot}),Object.defineProperty(this,J1,{value:sot}),Object.defineProperty(this,uV,{value:lot}),Object.defineProperty(this,lf,{value:aot}),Object.defineProperty(this,sV,{value:iot}),Object.defineProperty(this,B6,{value:oot}),Object.defineProperty(this,I6,{value:rot}),Object.defineProperty(this,R6,{value:not}),Object.defineProperty(this,Ii,{value:tot}),Object.defineProperty(this,lV,{value:eot}),Object.defineProperty(this,F6,{value:Zrt}),Object.defineProperty(this,aV,{value:Jrt}),Object.defineProperty(this,N6,{value:Qrt}),Object.defineProperty(this,xa,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,M6,{writable:!0,value:void 0}),Object.defineProperty(this,of,{writable:!0,value:Oye()}),Object.defineProperty(this,X1,{writable:!0,value:new Set}),Object.defineProperty(this,Q1,{writable:!0,value:new Set}),Object.defineProperty(this,af,{writable:!0,value:new Set}),Object.defineProperty(this,qu,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=Wrt;const n={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},meta:{},onBeforeFileAdded:r=>r,onBeforeUpload:r=>r,store:new Fye,logger:Krt,infoTimeout:5e3};if(this.opts={...n,...t,restrictions:{...n.restrictions,...t&&t.restrictions}},t&&t.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t&&t.debug&&(this.opts.logger=Yrt),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&this.opts.restrictions.allowedFileTypes!==null&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=Y1(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:Urt(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),un(this,M6)[M6]=this.store.subscribe((r,o,i)=>{this.emit("state-update",r,o,i),this.updateAll(o)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),un(this,sV)[sV]()}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];un(this,of)[of].emit(t,...r)}on(t,n){return un(this,of)[of].on(t,n),this}once(t,n){return un(this,of)[of].once(t,n),this}off(t,n){return un(this,of)[of].off(t,n),this}updateAll(t){this.iteratePlugins(n=>{n.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,n){if(!this.getState().files[t])throw new Error(`Can\u2019t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...n}}})}i18nInit(){const t=new Dye([this.defaultLocale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t&&t.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins(n=>{n.setOptions()}),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},n={...this.getState().files},r={};Object.keys(n).forEach(o=>{const i={...n[o]};i.progress={...i.progress,...t},r[o]=i}),this.setState({files:r,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){un(this,X1)[X1].add(t)}removePreProcessor(t){return un(this,X1)[X1].delete(t)}addPostProcessor(t){un(this,af)[af].add(t)}removePostProcessor(t){return un(this,af)[af].delete(t)}addUploader(t){un(this,Q1)[Q1].add(t)}removeUploader(t){return un(this,Q1)[Q1].delete(t)}setMeta(t){const n={...this.getState().meta,...t},r={...this.getState().files};Object.keys(r).forEach(o=>{r[o]={...r[o],meta:{...r[o].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:n,files:r})}setFileMeta(t,n){const r={...this.getState().files};if(!r[t])return void this.log("Was trying to set metadata for a file that has been removed: ",t);const o={...r[t].meta,...n};r[t]={...r[t],meta:o},this.setState({files:r})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:n,error:r}=this.getState(),o=Object.values(t),i=o.filter(m=>{let{progress:v}=m;return!v.uploadComplete&&v.uploadStarted}),a=o.filter(m=>!m.progress.uploadStarted),l=o.filter(m=>m.progress.uploadStarted||m.progress.preprocess||m.progress.postprocess),s=o.filter(m=>m.progress.uploadStarted),u=o.filter(m=>m.isPaused),c=o.filter(m=>m.progress.uploadComplete),d=o.filter(m=>m.error),f=i.filter(m=>!m.isPaused),p=o.filter(m=>m.progress.preprocess||m.progress.postprocess);return{newFiles:a,startedFiles:l,uploadStartedFiles:s,pausedFiles:u,completeFiles:c,erroredFiles:d,inProgressFiles:i,inProgressNotPausedFiles:f,processingFiles:p,isUploadStarted:s.length>0,isAllComplete:n===100&&c.length===o.length&&p.length===0,isAllErrored:!!r&&d.length===o.length,isAllPaused:i.length!==0&&u.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:o.some(m=>m.isGhost)}}validateRestrictions(t,n){try{return un(this,N6)[N6](t,n),{result:!0}}catch(r){return{result:!1,reason:r.message}}}checkIfFileAlreadyExists(t){const{files:n}=this.getState();return!(!n[t]||n[t].isGhost)}addFile(t){un(this,R6)[R6](t);const{files:n}=this.getState();let r=un(this,I6)[I6](n,t);return n[r.id]&&n[r.id].isGhost&&(r={...n[r.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${r.name}, ${r.id}`)),this.setState({files:{...n,[r.id]:r}}),this.emit("file-added",r),this.emit("files-added",[r]),this.log(`Added file: ${r.name}, ${r.id}, mime type: ${r.type}`),un(this,B6)[B6](),r.id}addFiles(t){un(this,R6)[R6]();const n={...this.getState().files},r=[],o=[];for(let i=0;i<t.length;i++)try{let a=un(this,I6)[I6](n,t[i]);n[a.id]&&n[a.id].isGhost&&(a={...n[a.id],data:t[i].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${a.name}, ${a.id}`)),n[a.id]=a,r.push(a)}catch(a){a.isRestriction||o.push(a)}if(this.setState({files:n}),r.forEach(i=>{this.emit("file-added",i)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.keys(r).forEach(i=>{this.log(`Added file: ${r[i].name} |
|
997 |
id: ${r[i].id} |
|
998 |
type: ${r[i].type}`)}),r.length>0&&un(this,B6)[B6](),o.length>0){let i=`Multiple errors occurred while adding files: |
|
999 |
`;if(o.forEach(a=>{i+=` |
|
1000 |
* ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:i},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(o,i);{const a=new Error(i);throw a.errors=o,a}}}removeFiles(t,n){const{files:r,currentUploads:o}=this.getState(),i={...r},a={...o},l=Object.create(null);function s(d){return l[d]===void 0}t.forEach(d=>{r[d]&&(l[d]=r[d],delete i[d])}),Object.keys(a).forEach(d=>{const f=o[d].fileIDs.filter(s);f.length!==0?a[d]={...o[d],fileIDs:f}:delete a[d]});const u={currentUploads:a,files:i};Object.keys(i).length===0&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();const c=Object.keys(l);c.forEach(d=>{this.emit("file-removed",l[d],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(t,n){n===void 0&&(n=null),this.removeFiles([t],n)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const n=!this.getFile(t).isPaused;return this.setFileState(t,{isPaused:n}),this.emit("upload-pause",t,n),n}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const r={...t[n],isPaused:!0};t[n]=r}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const r={...t[n],isPaused:!1,error:null};t[n]=r}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},n=Object.keys(t).filter(o=>t[o].error);if(n.forEach(o=>{const i={...t[o],isPaused:!1,error:null};t[o]=i}),this.setState({files:t,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=un(this,lf)[lf](n,{forceAllowNewUpload:!0});return un(this,sf)[sf](r)}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const n=un(this,lf)[lf]([t],{forceAllowNewUpload:!0});return un(this,sf)[sf](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,n){if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const t=this.getFiles().filter(s=>s.progress.uploadStarted||s.progress.preprocess||s.progress.postprocess);if(t.length===0)return this.emit("progress",0),void this.setState({totalProgress:0});const n=t.filter(s=>s.progress.bytesTotal!=null),r=t.filter(s=>s.progress.bytesTotal==null);if(n.length===0){const s=100*t.length,u=r.reduce((d,f)=>d+f.progress.percentage,0),c=Math.round(u/s*100);return void this.setState({totalProgress:c})}let o=n.reduce((s,u)=>s+u.progress.bytesTotal,0);const i=o/n.length;o+=i*r.length;let a=0;n.forEach(s=>{a+=s.progress.bytesUploaded}),r.forEach(s=>{a+=i*(s.progress.percentage||0)/100});let l=o===0?0:Math.round(a/o*100);l>100&&(l=100),this.setState({totalProgress:l}),this.emit("progress",l)}updateOnlineStatus(){window.navigator.onLine===void 0||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,n){if(typeof t!="function")throw new TypeError(`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`);const r=new t(this,n),o=r.id;if(!o)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const i=this.getPlugin(o);if(i){const a=`Already found a plugin named '${i.id}'. Tried to use: '${o}'. |
|
1001 |
Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return t.VERSION&&this.log(`Using ${o} v${t.VERSION}`),r.type in un(this,xa)[xa]?un(this,xa)[xa][r.type].push(r):un(this,xa)[xa][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(un(this,xa)[xa])){const r=n.find(o=>o.id===t);if(r!=null)return r}}[jye](t){return un(this,xa)[xa][t]}iteratePlugins(t){Object.values(un(this,xa)[xa]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=un(this,xa)[xa][t.type],r=n.findIndex(i=>i.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),un(this,M6)[M6](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",un(this,qu)[qu]),window.removeEventListener("offline",un(this,qu)[qu]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const o=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:o?t.message:t,details:o?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t)}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?un(this,sf)[sf](t):(un(this,J1)[J1](t),Promise.reject(new Error("Nonexistent upload")))}[Vye](){return un(this,lf)[lf](...arguments)}addResultData(t,n){if(!un(this,uV)[uV](t))return void this.log(`Not setting result for an upload that has been removed: ${t}`);const{currentUploads:r}=this.getState(),o={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:o}})}upload(){var t;(t=un(this,xa)[xa].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:n}=this.getState();const r=this.opts.onBeforeUpload(n);return r===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&typeof r=="object"&&(n=r,this.setState({files:n})),Promise.resolve().then(()=>{un(this,aV)[aV](n),un(this,lV)[lV](n)}).catch(o=>{un(this,Ii)[Ii](o)}).then(()=>{const{currentUploads:o}=this.getState(),i=Object.values(o).flatMap(s=>s.fileIDs),a=[];Object.keys(n).forEach(s=>{const u=this.getFile(s);u.progress.uploadStarted||i.indexOf(s)!==-1||a.push(u.id)});const l=un(this,lf)[lf](a);return un(this,sf)[sf](l)}).catch(o=>{un(this,Ii)[Ii](o,{showInformer:!1})}))}}function Qrt(e,t){t===void 0&&(t=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:o,maxNumberOfFiles:i,allowedFileTypes:a}=this.opts.restrictions;if(i&&t.length+1>i)throw new Xc(`${this.i18n("youCanOnlyUploadX",{smart_count:i})}`);if(a&&!a.some(l=>l.indexOf("/")>-1?!!e.type&&function(s,u){function c(d){var f=function(p,m){var v=new Nye(p,zrt||/[\/\.]/);return m!==void 0?v.match(m):v}(d,s);return f&&f.length>=2}return u?c(u.split(";")[0]):c}(e.type.replace(/;.*?$/,""),l):!(l[0]!=="."||!e.extension)&&e.extension.toLowerCase()===l.substr(1).toLowerCase())){const l=a.join(", ");throw new Xc(this.i18n("youCanOnlyUploadFileTypes",{types:l}))}if(o&&e.size!=null){let l=0;if(l+=e.size,t.forEach(s=>{l+=s.size}),l>o)throw new Xc(this.i18n("exceedsSize",{size:rV(o),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new Xc(this.i18n("exceedsSize",{size:rV(n),file:e.name}));if(r&&e.size!=null&&e.size<r)throw new Xc(this.i18n("inferiorSize",{size:rV(r)}))}function Jrt(e){const{minNumberOfFiles:t}=this.opts.restrictions;if(Object.keys(e).length<t)throw new Xc(`${this.i18n("youHaveToAtLeastSelectX",{smart_count:t})}`)}function Zrt(e){const{requiredMetaFields:t}=this.opts.restrictions,{hasOwnProperty:n}=Object.prototype,r=[],o=[];for(let i=0;i<t.length;i++)if(!n.call(e.meta,t[i])||e.meta[t[i]]===""){const a=new Xc(`${this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})}`);r.push(a),o.push(t[i]),un(this,Ii)[Ii](a,{file:e,showInformer:!1,throwErr:!1})}return this.setFileState(e.id,{missingRequiredMetaFields:o}),r}function eot(e){const t=Object.keys(e).flatMap(n=>{const r=this.getFile(n);return un(this,F6)[F6](r)});if(t.length)throw new Xrt(t,`${this.i18n("missingRequiredMetaField")}`)}function tot(e,t){let{showInformer:n=!0,file:r=null,throwErr:o=!0}=t===void 0?{}:t;const i=typeof e=="object"?e.message:e,a=typeof e=="object"&&e.details?e.details:"";let l=i;if(a&&(l+=` ${a}`),e.isRestriction?(this.log(l),this.emit("restriction-failed",r,e)):this.log(l,"error"),n&&this.info({message:i,details:a},"error",this.opts.infoTimeout),o)throw typeof e=="object"?e:new Error(e)}function not(e){const{allowNewUpload:t}=this.getState();t===!1&&un(this,Ii)[Ii](new Xc(this.i18n("noMoreFilesAllowed")),{file:e})}function rot(e,t){const n=function(d){var f;if(d.type)return d.type;const p=d.name?(f=Rye(d.name).extension)==null?void 0:f.toLowerCase():null;return p&&p in Iye?Iye[p]:"application/octet-stream"}(t),r=function(d,f){return f.name?f.name:d.split("/")[0]==="image"?`${d.split("/")[0]}.${d.split("/")[1]}`:"noname"}(n,t),o=Rye(r).extension,i=!!t.isRemote,a=function(d){let f="uppy";return typeof d.name=="string"&&(f+=`-${Bye(d.name.toLowerCase())}`),d.type!==void 0&&(f+=`-${d.type}`),d.meta&&typeof d.meta.relativePath=="string"&&(f+=`-${Bye(d.meta.relativePath.toLowerCase())}`),d.data.size!==void 0&&(f+=`-${d.data.size}`),d.data.lastModified!==void 0&&(f+=`-${d.data.lastModified}`),f}({...t,type:n});if(this.checkIfFileAlreadyExists(a)){const d=new Xc(this.i18n("noDuplicates",{fileName:r}));un(this,Ii)[Ii](d,{file:t})}const l=t.meta||{};l.name=r,l.type=n;const s=Number.isFinite(t.data.size)?t.data.size:null;let u={source:t.source||"",id:a,name:r,extension:o||"",meta:{...this.getState().meta,...l},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:s,uploadComplete:!1,uploadStarted:null},size:s,isRemote:i,remote:t.remote||"",preview:t.preview};const c=this.opts.onBeforeFileAdded(u,e);c===!1?un(this,Ii)[Ii](new Xc("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:t}):typeof c=="object"&&c!==null&&(u=c);try{const d=Object.keys(e).map(f=>e[f]);un(this,N6)[N6](u,d)}catch(d){un(this,Ii)[Ii](d,{file:u})}return u}function oot(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function iot(){const e=(t,n,r)=>{let o=t.message||"Unknown error";t.details&&(o+=` ${t.details}`),this.setState({error:o}),n!=null&&n.id in this.getState().files&&this.setFileState(n.id,{error:o,response:r})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),typeof n=="object"&&n.message){const o=new Error(n.message);o.details=n.message,n.details&&(o.details+=` ${n.details}`),o.message=this.i18n("failedToUpload",{file:t.name}),un(this,Ii)[Ii](o,{throwErr:!1})}else un(this,Ii)[Ii](n,{throwErr:!1})}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",t=>{this.getFile(t.id)?this.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}}):this.log(`Not setting progress for a file that has been removed: ${t.id}`)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(t,n)=>{if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const r=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...r,postprocess:un(this,af)[af].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:r.bytesTotal},response:n,uploadURL:n.uploadURL,isPaused:!1}),t.size==null&&this.setFileState(t.id,{size:n.bytesUploaded||r.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(t,n)=>{this.getFile(t.id)?this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:n}}):this.log(`Not setting progress for a file that has been removed: ${t.id}`)}),this.on("preprocess-complete",t=>{if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.preprocess,this.setState({files:n})}),this.on("postprocess-progress",(t,n)=>{this.getFile(t.id)?this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:n}}):this.log(`Not setting progress for a file that has been removed: ${t.id}`)}),this.on("postprocess-complete",t=>{if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.postprocess,this.setState({files:n})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",t=>{t&&un(this,F6)[F6](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",un(this,qu)[qu]),window.addEventListener("offline",un(this,qu)[qu]),setTimeout(un(this,qu)[qu],3e3))}function aot(e,t){t===void 0&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:o}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const i=qrt();return this.emit("upload",{id:i,fileIDs:e}),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...o,[i]:{fileIDs:e,step:0,result:{}}}}),i}function lot(e){const{currentUploads:t}=this.getState();return t[e]}function sot(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function uot(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...un(this,X1)[X1],...un(this,Q1)[Q1],...un(this,af)[af]];try{for(let a=r;a<o.length&&n;a++){const l=o[a],s={...n,step:a};this.setState({currentUploads:{...t,[e]:s}}),await l(s.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(a){throw this.emit("error",a),un(this,J1)[J1](e),a}if(n){n.fileIDs.forEach(u=>{const c=this.getFile(u);c&&c.progress.postprocess&&this.emit("postprocess-complete",c)});const a=n.fileIDs.map(u=>this.getFile(u)),l=a.filter(u=>!u.error),s=a.filter(u=>u.error);await this.addResultData(e,{successful:l,failed:s,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let i;return n&&(i=n.result,this.emit("complete",i),un(this,J1)[J1](e)),i==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),i}zye.VERSION="2.1.3";var Hye=zye,cot=T1(function(e,t){var n,r,o,i,a,l,s,u,c={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(z,$){for(var W in $)z[W]=$[W];return z}function m(z){var $=z.parentNode;$&&$.removeChild(z)}function v(z,$,W){var K,X,te,ne={};for(te in $)te=="key"?K=$[te]:te=="ref"?X=$[te]:ne[te]=$[te];if(arguments.length>2&&(ne.children=arguments.length>3?n.call(arguments,2):W),typeof z=="function"&&z.defaultProps!=null)for(te in z.defaultProps)ne[te]===void 0&&(ne[te]=z.defaultProps[te]);return g(z,ne,K,X,null)}function g(z,$,W,K,X){var te={type:z,props:$,key:W,ref:K,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:X??++o};return X==null&&r.vnode!=null&&r.vnode(te),te}function b(z){return z.children}function y(z,$){this.props=z,this.context=$}function w(z,$){if($==null)return z.__?w(z.__,z.__.__k.indexOf(z)+1):null;for(var W;$<z.__k.length;$++)if((W=z.__k[$])!=null&&W.__e!=null)return W.__e;return typeof z.type=="function"?w(z):null}function x(z){var $,W;if((z=z.__)!=null&&z.__c!=null){for(z.__e=z.__c.base=null,$=0;$<z.__k.length;$++)if((W=z.__k[$])!=null&&W.__e!=null){z.__e=z.__c.base=W.__e;break}return x(z)}}function _(z){(!z.__d&&(z.__d=!0)&&a.push(z)&&!E.__r++||s!==r.debounceRendering)&&((s=r.debounceRendering)||l)(E)}function E(){for(var z;E.__r=a.length;)z=a.sort(function($,W){return $.__v.__b-W.__v.__b}),a=[],z.some(function($){var W,K,X,te,ne,se;$.__d&&(ne=(te=(W=$).__v).__e,(se=W.__P)&&(K=[],(X=p({},te)).__v=te.__v+1,B(se,te,X,W.__n,se.ownerSVGElement!==void 0,te.__h!=null?[ne]:null,K,ne??w(te),te.__h),L(K,te),te.__e!=ne&&x(te)))})}function C(z,$,W,K,X,te,ne,se,le,J){var Z,ye,be,ve,Ae,Ce,_e,ke=K&&K.__k||d,Be=ke.length;for(W.__k=[],Z=0;Z<$.length;Z++)if((ve=W.__k[Z]=(ve=$[Z])==null||typeof ve=="boolean"?null:typeof ve=="string"||typeof ve=="number"||typeof ve=="bigint"?g(null,ve,null,null,ve):Array.isArray(ve)?g(b,{children:ve},null,null,null):ve.__b>0?g(ve.type,ve.props,ve.key,null,ve.__v):ve)!=null){if(ve.__=W,ve.__b=W.__b+1,(be=ke[Z])===null||be&&ve.key==be.key&&ve.type===be.type)ke[Z]=void 0;else for(ye=0;ye<Be;ye++){if((be=ke[ye])&&ve.key==be.key&&ve.type===be.type){ke[ye]=void 0;break}be=null}B(z,ve,be=be||c,X,te,ne,se,le,J),Ae=ve.__e,(ye=ve.ref)&&be.ref!=ye&&(_e||(_e=[]),be.ref&&_e.push(be.ref,null,ve),_e.push(ye,ve.__c||Ae,ve)),Ae!=null?(Ce==null&&(Ce=Ae),typeof ve.type=="function"&&ve.__k===be.__k?ve.__d=le=T(ve,le,z):le=k(z,ve,be,ke,Ae,le),typeof W.type=="function"&&(W.__d=le)):le&&be.__e==le&&le.parentNode!=z&&(le=w(be))}for(W.__e=Ce,Z=Be;Z--;)ke[Z]!=null&&(typeof W.type=="function"&&ke[Z].__e!=null&&ke[Z].__e==W.__d&&(W.__d=w(K,Z+1)),H(ke[Z],ke[Z]));if(_e)for(Z=0;Z<_e.length;Z++)P(_e[Z],_e[++Z],_e[++Z])}function T(z,$,W){for(var K,X=z.__k,te=0;X&&te<X.length;te++)(K=X[te])&&(K.__=z,$=typeof K.type=="function"?T(K,$,W):k(W,K,K,X,K.__e,$));return $}function k(z,$,W,K,X,te){var ne,se,le;if($.__d!==void 0)ne=$.__d,$.__d=void 0;else if(W==null||X!=te||X.parentNode==null)e:if(te==null||te.parentNode!==z)z.appendChild(X),ne=null;else{for(se=te,le=0;(se=se.nextSibling)&&le<K.length;le+=2)if(se==X)break e;z.insertBefore(X,te),ne=te}return ne!==void 0?ne:X.nextSibling}function I(z,$,W){$[0]==="-"?z.setProperty($,W):z[$]=W==null?"":typeof W!="number"||f.test($)?W:W+"px"}function O(z,$,W,K,X){var te;e:if($==="style")if(typeof W=="string")z.style.cssText=W;else{if(typeof K=="string"&&(z.style.cssText=K=""),K)for($ in K)W&&$ in W||I(z.style,$,"");if(W)for($ in W)K&&W[$]===K[$]||I(z.style,$,W[$])}else if($[0]==="o"&&$[1]==="n")te=$!==($=$.replace(/Capture$/,"")),$=$.toLowerCase()in z?$.toLowerCase().slice(2):$.slice(2),z.l||(z.l={}),z.l[$+te]=W,W?K||z.addEventListener($,te?N:F,te):z.removeEventListener($,te?N:F,te);else if($!=="dangerouslySetInnerHTML"){if(X)$=$.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if($!=="href"&&$!=="list"&&$!=="form"&&$!=="tabIndex"&&$!=="download"&&$ in z)try{z[$]=W??"";break e}catch{}typeof W=="function"||(W!=null&&(W!==!1||$[0]==="a"&&$[1]==="r")?z.setAttribute($,W):z.removeAttribute($))}}function F(z){this.l[z.type+!1](r.event?r.event(z):z)}function N(z){this.l[z.type+!0](r.event?r.event(z):z)}function B(z,$,W,K,X,te,ne,se,le){var J,Z,ye,be,ve,Ae,Ce,_e,ke,Be,$e,rt=$.type;if($.constructor!==void 0)return null;W.__h!=null&&(le=W.__h,se=$.__e=W.__e,$.__h=null,te=[se]),(J=r.__b)&&J($);try{e:if(typeof rt=="function"){if(_e=$.props,ke=(J=rt.contextType)&&K[J.__c],Be=J?ke?ke.props.value:J.__:K,W.__c?Ce=(Z=$.__c=W.__c).__=Z.__E:("prototype"in rt&&rt.prototype.render?$.__c=Z=new rt(_e,Be):($.__c=Z=new y(_e,Be),Z.constructor=rt,Z.render=U),ke&&ke.sub(Z),Z.props=_e,Z.state||(Z.state={}),Z.context=Be,Z.__n=K,ye=Z.__d=!0,Z.__h=[]),Z.__s==null&&(Z.__s=Z.state),rt.getDerivedStateFromProps!=null&&(Z.__s==Z.state&&(Z.__s=p({},Z.__s)),p(Z.__s,rt.getDerivedStateFromProps(_e,Z.__s))),be=Z.props,ve=Z.state,ye)rt.getDerivedStateFromProps==null&&Z.componentWillMount!=null&&Z.componentWillMount(),Z.componentDidMount!=null&&Z.__h.push(Z.componentDidMount);else{if(rt.getDerivedStateFromProps==null&&_e!==be&&Z.componentWillReceiveProps!=null&&Z.componentWillReceiveProps(_e,Be),!Z.__e&&Z.shouldComponentUpdate!=null&&Z.shouldComponentUpdate(_e,Z.__s,Be)===!1||$.__v===W.__v){Z.props=_e,Z.state=Z.__s,$.__v!==W.__v&&(Z.__d=!1),Z.__v=$,$.__e=W.__e,$.__k=W.__k,$.__k.forEach(function(ge){ge&&(ge.__=$)}),Z.__h.length&&ne.push(Z);break e}Z.componentWillUpdate!=null&&Z.componentWillUpdate(_e,Z.__s,Be),Z.componentDidUpdate!=null&&Z.__h.push(function(){Z.componentDidUpdate(be,ve,Ae)})}Z.context=Be,Z.props=_e,Z.state=Z.__s,(J=r.__r)&&J($),Z.__d=!1,Z.__v=$,Z.__P=z,J=Z.render(Z.props,Z.state,Z.context),Z.state=Z.__s,Z.getChildContext!=null&&(K=p(p({},K),Z.getChildContext())),ye||Z.getSnapshotBeforeUpdate==null||(Ae=Z.getSnapshotBeforeUpdate(be,ve)),$e=J!=null&&J.type===b&&J.key==null?J.props.children:J,C(z,Array.isArray($e)?$e:[$e],$,W,K,X,te,ne,se,le),Z.base=$.__e,$.__h=null,Z.__h.length&&ne.push(Z),Ce&&(Z.__E=Z.__=null),Z.__e=!1}else te==null&&$.__v===W.__v?($.__k=W.__k,$.__e=W.__e):$.__e=V(W.__e,$,W,K,X,te,ne,le);(J=r.diffed)&&J($)}catch(ge){$.__v=null,(le||te!=null)&&($.__e=se,$.__h=!!le,te[te.indexOf(se)]=null),r.__e(ge,$,W)}}function L(z,$){r.__c&&r.__c($,z),z.some(function(W){try{z=W.__h,W.__h=[],z.some(function(K){K.call(W)})}catch(K){r.__e(K,W.__v)}})}function V(z,$,W,K,X,te,ne,se){var le,J,Z,ye=W.props,be=$.props,ve=$.type,Ae=0;if(ve==="svg"&&(X=!0),te!=null){for(;Ae<te.length;Ae++)if((le=te[Ae])&&"setAttribute"in le==!!ve&&(ve?le.localName===ve:le.nodeType===3)){z=le,te[Ae]=null;break}}if(z==null){if(ve===null)return document.createTextNode(be);z=X?document.createElementNS("http://www.w3.org/2000/svg",ve):document.createElement(ve,be.is&&be),te=null,se=!1}if(ve===null)ye===be||se&&z.data===be||(z.data=be);else{if(te=te&&n.call(z.childNodes),J=(ye=W.props||c).dangerouslySetInnerHTML,Z=be.dangerouslySetInnerHTML,!se){if(te!=null)for(ye={},Ae=0;Ae<z.attributes.length;Ae++)ye[z.attributes[Ae].name]=z.attributes[Ae].value;(Z||J)&&(Z&&(J&&Z.__html==J.__html||Z.__html===z.innerHTML)||(z.innerHTML=Z&&Z.__html||""))}if(function(Ce,_e,ke,Be,$e){var rt;for(rt in ke)rt==="children"||rt==="key"||rt in _e||O(Ce,rt,null,ke[rt],Be);for(rt in _e)$e&&typeof _e[rt]!="function"||rt==="children"||rt==="key"||rt==="value"||rt==="checked"||ke[rt]===_e[rt]||O(Ce,rt,_e[rt],ke[rt],Be)}(z,be,ye,X,se),Z)$.__k=[];else if(Ae=$.props.children,C(z,Array.isArray(Ae)?Ae:[Ae],$,W,K,X&&ve!=="foreignObject",te,ne,te?te[0]:W.__k&&w(W,0),se),te!=null)for(Ae=te.length;Ae--;)te[Ae]!=null&&m(te[Ae]);se||("value"in be&&(Ae=be.value)!==void 0&&(Ae!==ye.value||Ae!==z.value||ve==="progress"&&!Ae)&&O(z,"value",Ae,ye.value,!1),"checked"in be&&(Ae=be.checked)!==void 0&&Ae!==z.checked&&O(z,"checked",Ae,ye.checked,!1))}return z}function P(z,$,W){try{typeof z=="function"?z($):z.current=$}catch(K){r.__e(K,W)}}function H(z,$,W){var K,X;if(r.unmount&&r.unmount(z),(K=z.ref)&&(K.current&&K.current!==z.__e||P(K,null,$)),(K=z.__c)!=null){if(K.componentWillUnmount)try{K.componentWillUnmount()}catch(te){r.__e(te,$)}K.base=K.__P=null}if(K=z.__k)for(X=0;X<K.length;X++)K[X]&&H(K[X],$,typeof z.type!="function");W||z.__e==null||m(z.__e),z.__e=z.__d=void 0}function U(z,$,W){return this.constructor(z,W)}function G(z,$,W){var K,X,te;r.__&&r.__(z,$),X=(K=typeof W=="function")?null:W&&W.__k||$.__k,te=[],B($,z=(!K&&W||$).__k=v(b,null,[z]),X||c,c,$.ownerSVGElement!==void 0,!K&&W?[W]:X?null:$.firstChild?n.call($.childNodes):null,te,!K&&W?W:X?X.__e:$.firstChild,K),L(te,z)}n=d.slice,r={__e:function(z,$){for(var W,K,X;$=$.__;)if((W=$.__c)&&!W.__)try{if((K=W.constructor)&&K.getDerivedStateFromError!=null&&(W.setState(K.getDerivedStateFromError(z)),X=W.__d),W.componentDidCatch!=null&&(W.componentDidCatch(z),X=W.__d),X)return W.__E=W}catch(te){z=te}throw z}},o=0,i=function(z){return z!=null&&z.constructor===void 0},y.prototype.setState=function(z,$){var W;W=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=p({},this.state),typeof z=="function"&&(z=z(p({},W),this.props)),z&&p(W,z),z!=null&&this.__v&&($&&this.__h.push($),_(this))},y.prototype.forceUpdate=function(z){this.__v&&(this.__e=!0,z&&this.__h.push(z),_(this))},y.prototype.render=b,a=[],l=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,E.__r=0,u=0,t.Component=y,t.Fragment=b,t.cloneElement=function(z,$,W){var K,X,te,ne=p({},z.props);for(te in $)te=="key"?K=$[te]:te=="ref"?X=$[te]:ne[te]=$[te];return arguments.length>2&&(ne.children=arguments.length>3?n.call(arguments,2):W),g(z.type,ne,K||z.key,X||z.ref,null)},t.createContext=function(z,$){var W={__c:$="__cC"+u++,__:z,Consumer:function(K,X){return K.children(X)},Provider:function(K){var X,te;return this.getChildContext||(X=[],(te={})[$]=this,this.getChildContext=function(){return te},this.shouldComponentUpdate=function(ne){this.props.value!==ne.value&&X.some(_)},this.sub=function(ne){X.push(ne);var se=ne.componentWillUnmount;ne.componentWillUnmount=function(){X.splice(X.indexOf(ne),1),se&&se.call(ne)}}),K.children}};return W.Provider.__=W.Consumer.contextType=W},t.createElement=v,t.createRef=function(){return{current:null}},t.h=v,t.hydrate=function z($,W){G($,W,z)},t.isValidElement=i,t.options=r,t.render=G,t.toChildArray=function z($,W){return W=W||[],$==null||typeof $=="boolean"||(Array.isArray($)?$.some(function(K){z(K,W)}):W.push($)),W}}),cV=class{constructor(e,t){t===void 0&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const e=new Dye([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};function $ye(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var dot=0;const{render:Uye}=cot;var L6=function(e){return"__private_"+dot+++"_"+e}("updateUI");class dV extends cV{constructor(){super(...arguments),Object.defineProperty(this,L6,{writable:!0,value:void 0})}mount(t,n){const r=n.id,o=function(l,s){return s===void 0&&(s=document),typeof l=="string"?s.querySelector(l):((u=l)==null?void 0:u.nodeType)===Node.ELEMENT_NODE?l:null;var u}(t);if(o){this.isTargetDOMEl=!0;const l=document.createDocumentFragment();return $ye(this,L6)[L6]=function(s){let u=null,c=null;return function(){for(var d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];return c=f,u||(u=Promise.resolve().then(()=>(u=null,s(...c)))),u}}(s=>{this.uppy.getPlugin(this.id)&&(Uye(this.render(s),l),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(o.innerHTML=""),Uye(this.render(this.uppy.getState()),l),this.el=l.firstElementChild,o.appendChild(l),this.onMount(),this.el}let i;if(typeof t=="object"&&t instanceof dV)i=t;else if(typeof t=="function"){const l=t;this.uppy.iteratePlugins(s=>{if(s instanceof l)return i=s,!1})}if(i)return this.uppy.log(`Installing ${r} to ${i.id}`),this.parent=i,this.el=i.addTarget(n),this.onMount(),this.el;this.uppy.log(`Not installing ${r}`);let a=`Invalid target option given to ${r}.`;throw a+=typeof t=="function"?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(a)}update(t){var n,r;this.el!=null&&((n=(r=$ye(this,L6))[L6])==null||n.call(r,t))}unmount(){var t;this.isTargetDOMEl&&((t=this.el)==null||t.remove()),this.onUnmount()}onMount(){}onUnmount(){}}var fot=dV;const{debugLogger:pot}=Lye;var P6=Hye,hot=Hye,vot=fot,mot=cV,got=pot;P6.Uppy=hot,P6.UIPlugin=vot,P6.BasePlugin=mot,P6.debugLogger=got;class yot extends Error{constructor(t,n){n===void 0&&(n=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=n}}var fV=yot,pV=function(){return fetch(...arguments).catch(e=>{throw e.name==="AbortError"?e:new fV(e)})};class bot extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}var KE,Up,Qc,Wp,Wye,Aot=bot;function Jc(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var wot=0;function hV(e){return"__private_"+wot+++"_"+e}async function vV(e){if(e.status===401)throw new Aot;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const r=await t;n=r.message?`${n} message: ${r.message}`:n,n=r.requestId?`${n} request-Id: ${r.requestId}`:n}finally{throw new Error(n)}}return t}var mV=(Up=hV("getPostResponseFunc"),Qc=hV("getUrl"),Wp=hV("errorHandler"),Wye=KE=class qOe{constructor(t,n){Object.defineProperty(this,Wp,{value:_ot}),Object.defineProperty(this,Qc,{value:xot}),Object.defineProperty(this,Up,{writable:!0,value:r=>o=>r?o:this.onReceiveResponse(o)}),this.uppy=t,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1}get hostname(){const{companion:t}=this.uppy.getState(),n=this.opts.companionUrl;return(t&&t[n]?t[n]:n).replace(/\/$/,"")}headers(){const t=this.opts.companionHeaders||{};return Promise.resolve({...qOe.defaultHeaders,...t})}onReceiveResponse(t){const n=this.uppy.getState().companion||{},r=this.opts.companionUrl,{headers:o}=t;return o.has("i-am")&&o.get("i-am")!==n[r]&&this.uppy.setState({companion:{...n,[r]:o.get("i-am")}}),t}preflight(t){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(Jc(this,Qc)[Qc](t),{method:"OPTIONS"}).then(n=>(n.headers.has("access-control-allow-headers")&&(this.allowedHeaders=n.headers.get("access-control-allow-headers").split(",").map(r=>r.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(n=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${n}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(t){return Promise.all([this.preflight(t),this.headers()]).then(n=>{let[r,o]=n;return Object.keys(o).forEach(i=>{r.includes(i.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${i}`),delete o[i])}),o})}get(t,n){return this.preflightAndHeaders(t).then(r=>pV(Jc(this,Qc)[Qc](t),{method:"get",headers:r,credentials:this.opts.companionCookiesRule||"same-origin"})).then(Jc(this,Up)[Up](n)).then(vV).catch(Jc(this,Wp)[Wp]("get",t))}post(t,n,r){const o="post";return this.preflightAndHeaders(t).then(i=>pV(Jc(this,Qc)[Qc](t),{method:o,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)})).then(Jc(this,Up)[Up](r)).then(vV).catch(Jc(this,Wp)[Wp](o,t))}delete(t,n,r){const o="delete";return this.preflightAndHeaders(t).then(i=>pV(`${this.hostname}/${t}`,{method:o,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null})).then(Jc(this,Up)[Up](r)).then(vV).catch(Jc(this,Wp)[Wp](o,t))}},KE.VERSION="2.0.4",KE.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${KE.VERSION}`},Wye);function xot(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function _ot(e,t){return n=>{var r;if((r=n)==null||!r.isAuthError){const o=new Error(`Could not ${e} ${Jc(this,Qc)[Qc](t)}`);o.cause=n,n=o}return Promise.reject(n)}}var Zc,Gp,lu,Ra,YE,Eot={setItem:(e,t)=>new Promise(n=>{localStorage.setItem(e,t),n()}),getItem:e=>Promise.resolve(localStorage.getItem(e)),removeItem:e=>new Promise(t=>{localStorage.removeItem(e),t()})};let Gye,qye;function bi(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Cot=0;function j6(e){return"__private_"+Cot+++"_"+e}var qp,O2,Sot=(Zc=j6("queued"),Gp=j6("emitter"),lu=j6("isOpen"),Ra=j6("socket"),YE=j6("handleMessage"),Gye=Symbol.for("uppy test: getSocket"),qye=Symbol.for("uppy test: getQueued"),class{constructor(e){Object.defineProperty(this,Zc,{writable:!0,value:[]}),Object.defineProperty(this,Gp,{writable:!0,value:Oye()}),Object.defineProperty(this,lu,{writable:!0,value:!1}),Object.defineProperty(this,Ra,{writable:!0,value:void 0}),Object.defineProperty(this,YE,{writable:!0,value:t=>{try{const n=JSON.parse(t.data);this.emit(n.action,n.payload)}catch(n){console.log(n)}}}),this.opts=e,e&&e.autoOpen===!1||this.open()}get isOpen(){return bi(this,lu)[lu]}[Gye](){return bi(this,Ra)[Ra]}[qye](){return bi(this,Zc)[Zc]}open(){bi(this,Ra)[Ra]=new WebSocket(this.opts.target),bi(this,Ra)[Ra].onopen=()=>{for(bi(this,lu)[lu]=!0;bi(this,Zc)[Zc].length>0&&bi(this,lu)[lu];){const e=bi(this,Zc)[Zc].shift();this.send(e.action,e.payload)}},bi(this,Ra)[Ra].onclose=()=>{bi(this,lu)[lu]=!1},bi(this,Ra)[Ra].onmessage=bi(this,YE)[YE]}close(){var e;(e=bi(this,Ra)[Ra])==null||e.close()}send(e,t){bi(this,lu)[lu]?bi(this,Ra)[Ra].send(JSON.stringify({action:e,payload:t})):bi(this,Zc)[Zc].push({action:e,payload:t})}on(e,t){bi(this,Gp)[Gp].on(e,t)}emit(e,t){bi(this,Gp)[Gp].emit(e,t)}once(e,t){bi(this,Gp)[Gp].once(e,t)}}),kot={RequestClient:mV,Provider:class extends mV{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}})}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?e.status!==401:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}authUrl(e){return e===void 0&&(e={}),this.preAuthToken&&(e.uppyPreAuthToken=this.preAuthToken),`${this.hostname}/${this.id}/connect?${new URLSearchParams(e)}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}fetchPreAuthToken(){return this.companionKeysParams?this.post(`${this.id}/preauth/`,{params:this.companionKeysParams}).then(e=>{this.preAuthToken=e.token}).catch(e=>{this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}):Promise.resolve()}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then(e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(e=>{let[t]=e;return t})}static initPlugin(e,t,n){if(e.type="acquirer",e.files=[],n&&(e.opts={...n,...t}),t.serverUrl||t.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(t.companionAllowedHosts){const r=t.companionAllowedHosts;if(!(typeof r=="string"||Array.isArray(r)||r instanceof RegExp))throw new TypeError(`${e.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);e.opts.companionAllowedHosts=r}else/^(?!https?:\/\/).*$/i.test(t.companionUrl)?e.opts.companionAllowedHosts=`https://${t.companionUrl.replace(/^\/\//,"")}`:e.opts.companionAllowedHosts=new URL(t.companionUrl).origin;e.storage=e.opts.storage||Eot}},SearchProvider:class extends mV{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return t=t?`&${t}`:"",this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t}`)}},Socket:Sot},Dot=Y1(function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))},300,{leading:!0,trailing:!0});function V6(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Oot=0;function Kye(e){return"__private_"+Oot+++"_"+e}var Yye=(qp=Kye("emitter"),O2=Kye("events"),class{constructor(e){Object.defineProperty(this,qp,{writable:!0,value:void 0}),Object.defineProperty(this,O2,{writable:!0,value:[]}),V6(this,qp)[qp]=e}on(e,t){return V6(this,O2)[O2].push([e,t]),V6(this,qp)[qp].on(e,t)}remove(){for(const[e,t]of V6(this,O2)[O2].splice(0))V6(this,qp)[qp].off(e,t)}});function su(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Tot=0;function XE(e){return"__private_"+Tot+++"_"+e}var uf=XE("aliveTimer"),Z1=XE("isDone"),z6=XE("onTimedOut"),ev=XE("timeout"),Xye=class{constructor(e,t){Object.defineProperty(this,uf,{writable:!0,value:void 0}),Object.defineProperty(this,Z1,{writable:!0,value:!1}),Object.defineProperty(this,z6,{writable:!0,value:void 0}),Object.defineProperty(this,ev,{writable:!0,value:void 0}),su(this,ev)[ev]=e,su(this,z6)[z6]=t}progress(){su(this,Z1)[Z1]||su(this,ev)[ev]>0&&(clearTimeout(su(this,uf)[uf]),su(this,uf)[uf]=setTimeout(su(this,z6)[z6],su(this,ev)[ev]))}done(){su(this,Z1)[Z1]||(clearTimeout(su(this,uf)[uf]),su(this,uf)[uf]=null,su(this,Z1)[Z1]=!0)}};function Ai(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Mot=0;function tv(e){return"__private_"+Mot+++"_"+e}var ks=tv("activeRequests"),ul=tv("queuedHandlers"),H6=tv("call"),$6=tv("queueNext"),gV=tv("next"),yV=tv("queue"),bV=tv("dequeue");function Not(e){Ai(this,ks)[ks]+=1;let t,n=!1;try{t=e()}catch(r){throw Ai(this,ks)[ks]-=1,r}return{abort:()=>{n||(n=!0,Ai(this,ks)[ks]-=1,t(),Ai(this,$6)[$6]())},done:()=>{n||(n=!0,Ai(this,ks)[ks]-=1,Ai(this,$6)[$6]())}}}function Fot(){queueMicrotask(()=>Ai(this,gV)[gV]())}function Rot(){if(Ai(this,ks)[ks]>=this.limit||Ai(this,ul)[ul].length===0)return;const e=Ai(this,ul)[ul].shift(),t=Ai(this,H6)[H6](e.fn);e.abort=t.abort,e.done=t.done}function Iot(e,t){t===void 0&&(t={});const n={fn:e,priority:t.priority||0,abort:()=>{Ai(this,bV)[bV](n)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=Ai(this,ul)[ul].findIndex(o=>n.priority>o.priority);return r===-1?Ai(this,ul)[ul].push(n):Ai(this,ul)[ul].splice(r,0,n),n}function Bot(e){const t=Ai(this,ul)[ul].indexOf(e);t!==-1&&Ai(this,ul)[ul].splice(t,1)}var Qye,Jye,Lot={RateLimitedQueue:class{constructor(e){Object.defineProperty(this,bV,{value:Bot}),Object.defineProperty(this,yV,{value:Iot}),Object.defineProperty(this,gV,{value:Rot}),Object.defineProperty(this,$6,{value:Fot}),Object.defineProperty(this,H6,{value:Not}),Object.defineProperty(this,ks,{writable:!0,value:0}),Object.defineProperty(this,ul,{writable:!0,value:[]}),this.limit=typeof e!="number"||e===0?1/0:e}run(e,t){return Ai(this,ks)[ks]<this.limit?Ai(this,H6)[H6](e):Ai(this,yV)[yV](e,t)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let a;const l=new Promise((s,u)=>{a=n.run(()=>{let c,d;try{d=Promise.resolve(e(...o))}catch(f){d=Promise.reject(f)}return d.then(f=>{c?u(c):(a.done(),s(f))},f=>{c?u(c):(a.done(),u(f))}),()=>{c=new Error("Cancelled")}},t)});return l.abort=()=>{a.abort()},l}}},internalRateLimitedQueue:Symbol("__queue")},Zye=function(e){return!!e&&(e.readyState!==0&&e.readyState!==4||e.status===0)},Pot={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}};const{nanoid:jot}=Pye,{Provider:Vot,RequestClient:zot,Socket:Hot}=kot,{RateLimitedQueue:$ot,internalRateLimitedQueue:AV}=Lot;function e3e(e,t){let n=t;return n||(n=new Error("Upload error")),typeof n=="string"&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),Zye(e)?(n=new fV(n,e),n):(n.request=e,n)}function t3e(e){return e.data.slice(0,e.data.size,e.meta.type)}var Uot=(Jye=Qye=class extends cV{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=Pot;const n={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(r){let o={};try{o=JSON.parse(r)}catch(i){e.log(i)}return o},getResponseError(r,o){let i=new Error("Upload error");return Zye(o)&&(i=new fV(i,o)),i},validateStatus:r=>r>=200&&r<300};if(this.opts={...n,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),AV in this.opts?this.requests=this.opts[AV]:this.requests=new $ot(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return typeof n=="function"?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach(r=>{e.append(r,t[r])})}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=t3e(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach(o=>{const i=this.getOptions(o),a=t3e(o);o.name?n.append(i.fieldName,a,o.name):n.append(i.fieldName,a)}),n}upload(e,t,n){const r=this.getOptions(e);return this.uppy.log(`uploading ${t} of ${n}`),new Promise((o,i)=>{this.uppy.emit("upload-started",e);const a=r.formData?this.createFormDataUpload(e,r):e.data,l=new XMLHttpRequest;this.uploaderEvents[e.id]=new Yye(this.uppy);const s=new Xye(r.timeout,()=>{l.abort(),c.done();const d=new Error(this.i18n("timedOut",{seconds:Math.ceil(r.timeout/1e3)}));this.uppy.emit("upload-error",e,d),i(d)}),u=jot();l.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${u} started`)}),l.upload.addEventListener("progress",d=>{this.uppy.log(`[XHRUpload] ${u} progress: ${d.loaded} / ${d.total}`),s.progress(),d.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:d.loaded,bytesTotal:d.total})}),l.addEventListener("load",d=>{if(this.uppy.log(`[XHRUpload] ${u} finished`),s.done(),c.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r.validateStatus(d.target.status,l.responseText,l)){const v=r.getResponseData(l.responseText,l),g=v[r.responseUrlFieldName],b={status:d.target.status,body:v,uploadURL:g};return this.uppy.emit("upload-success",e,b),g&&this.uppy.log(`Download ${e.name} from ${g}`),o(e)}const f=r.getResponseData(l.responseText,l),p=e3e(l,r.getResponseError(l.responseText,l)),m={status:d.target.status,body:f};return this.uppy.emit("upload-error",e,p,m),i(p)}),l.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${u} errored`),s.done(),c.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null);const d=e3e(l,r.getResponseError(l.responseText,l));return this.uppy.emit("upload-error",e,d),i(d)}),l.open(r.method.toUpperCase(),r.endpoint,!0),l.withCredentials=r.withCredentials,r.responseType!==""&&(l.responseType=r.responseType);const c=this.requests.run(()=>{this.uppy.emit("upload-started",e);const d=this.getOptions(e);return Object.keys(d.headers).forEach(f=>{l.setRequestHeader(f,d.headers[f])}),l.send(a),()=>{s.done(),l.abort()}});this.onFileRemove(e.id,()=>{c.abort(),i(new Error("File removed"))}),this.onCancelAll(e.id,()=>{c.abort(),i(new Error("Upload cancelled"))})})}uploadRemote(e){const t=this.getOptions(e);return new Promise((n,r)=>{this.uppy.emit("upload-started",e);const o={};(Array.isArray(t.metaFields)?t.metaFields:Object.keys(e.meta)).forEach(i=>{o[i]=e.meta[i]}),new(e.remote.providerOptions.provider?Vot:zot)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:t.endpoint,size:e.data.size,fieldname:t.fieldName,metadata:o,httpMethod:t.method,useFormData:t.formData,headers:t.headers}).then(i=>{const{token:a}=i,l=function(c){const d=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(c)[1];return`${/^http:\/\//i.test(c)?"ws":"wss"}://${d}`}(e.remote.companionUrl),s=new Hot({target:`${l}/api/${a}`,autoOpen:!1});this.uploaderEvents[e.id]=new Yye(this.uppy),this.onFileRemove(e.id,()=>{s.send("cancel",{}),u.abort(),n(`upload ${e.id} was removed`)}),this.onCancelAll(e.id,()=>{s.send("cancel",{}),u.abort(),n(`upload ${e.id} was canceled`)}),this.onRetry(e.id,()=>{s.send("pause",{}),s.send("resume",{})}),this.onRetryAll(e.id,()=>{s.send("pause",{}),s.send("resume",{})}),s.on("progress",c=>Dot(this,c,e)),s.on("success",c=>{const d=t.getResponseData(c.response.responseText,c.response),f=d[t.responseUrlFieldName],p={status:c.response.status,body:d,uploadURL:f};return this.uppy.emit("upload-success",e,p),u.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),n()}),s.on("error",c=>{const d=c.response,f=d?t.getResponseError(d.responseText,d):Object.assign(new Error(c.error.message),{cause:c.error});this.uppy.emit("upload-error",e,f),u.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r(f)});const u=this.requests.run(()=>(s.open(),e.isPaused&&s.send("pause",{}),()=>s.close()))}).catch(i=>{this.uppy.emit("upload-error",e,i),r(i)})})}uploadBundle(e){return new Promise((t,n)=>{const{endpoint:r}=this.opts,{method:o}=this.opts,i=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,{...this.opts,...i||{}}),l=new XMLHttpRequest,s=new Xye(this.opts.timeout,()=>{l.abort();const c=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));u(c),n(c)}),u=c=>{e.forEach(d=>{this.uppy.emit("upload-error",d,c)})};l.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),s.progress()}),l.upload.addEventListener("progress",c=>{s.progress(),c.lengthComputable&&e.forEach(d=>{this.uppy.emit("upload-progress",d,{uploader:this,bytesUploaded:c.loaded/c.total*d.size,bytesTotal:d.size})})}),l.addEventListener("load",c=>{if(s.done(),this.opts.validateStatus(c.target.status,l.responseText,l)){const f=this.opts.getResponseData(l.responseText,l),p={status:c.target.status,body:f};return e.forEach(m=>{this.uppy.emit("upload-success",m,p)}),t()}const d=this.opts.getResponseError(l.responseText,l)||new Error("Upload error");return d.request=l,u(d),n(d)}),l.addEventListener("error",()=>{s.done();const c=this.opts.getResponseError(l.responseText,l)||new Error("Upload error");return u(c),n(c)}),this.uppy.on("cancel-all",()=>{s.done(),l.abort()}),l.open(o.toUpperCase(),r,!0),l.withCredentials=this.opts.withCredentials,this.opts.responseType!==""&&(l.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(c=>{l.setRequestHeader(c,this.opts.headers[c])}),l.send(a),e.forEach(c=>{this.uppy.emit("upload-started",c)})})}uploadFiles(e){const t=e.map((n,r)=>{const o=parseInt(r,10)+1,i=e.length;return n.error?Promise.reject(new Error(n.error)):n.isRemote?this.uploadRemote(n,o,i):this.upload(n,o,i)});return function(n){const r=[],o=[];function i(l){r.push(l)}function a(l){o.push(l)}return Promise.all(n.map(l=>l.then(i,a))).then(()=>({successful:r,failed:o}))}(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",n=>{e===n.id&&t(n.id)})}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",()=>{this.uppy.getFile(e)&&t()})}onCancelAll(e,t){this.uploaderEvents[e].on("cancel-all",()=>{this.uppy.getFile(e)&&t()})}handleUpload(e){if(e.length===0)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();this.opts.limit!==0||this.opts[AV]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map(n=>this.uppy.getFile(n));if(this.opts.bundle){if(t.some(n=>n.isRemote))throw new Error("Can\u2019t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}},Qye.VERSION="2.0.6",Jye),n3e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function U6(e){var t={exports:{}};return e(t,t.exports),t.exports}var Kp,QE,JE=function(e){return e&&e.Math==Math&&e},Mt=JE(typeof globalThis=="object"&&globalThis)||JE(typeof window=="object"&&window)||JE(typeof self=="object"&&self)||JE(typeof n3e=="object"&&n3e)||function(){return this}()||Function("return this")(),Wot=Object.defineProperty,wV=function(e,t){try{Wot(Mt,e,{value:t,configurable:!0,writable:!0})}catch{Mt[e]=t}return t},Yp=Mt["__core-js_shared__"]||wV("__core-js_shared__",{}),xV=U6(function(e){(e.exports=function(t,n){return Yp[t]||(Yp[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),r3e=Function.prototype,_V=r3e.bind,EV=r3e.call,Got=_V&&_V.bind(EV),cn=_V?function(e){return e&&Got(EV,e)}:function(e){return e&&function(){return EV.apply(e,arguments)}},qot=Mt.TypeError,uu=function(e){if(e==null)throw qot("Can't call method on "+e);return e},Kot=Mt.Object,Xp=function(e){return Kot(uu(e))},Yot=cn({}.hasOwnProperty),ni=Object.hasOwn||function(e,t){return Yot(Xp(e),t)},Xot=0,Qot=Math.random(),Jot=cn(1 .toString),CV=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Jot(++Xot+Qot,36)},Yr=function(e){return typeof e=="function"},nv=function(e,t){return arguments.length<2?function(n){return Yr(n)?n:void 0}(Mt[e]):Mt[e]&&Mt[e][t]},T2=nv("navigator","userAgent")||"",o3e=Mt.process,i3e=Mt.Deno,a3e=o3e&&o3e.versions||i3e&&i3e.version,l3e=a3e&&a3e.v8;l3e&&(QE=(Kp=l3e.split("."))[0]>0&&Kp[0]<4?1:+(Kp[0]+Kp[1])),!QE&&T2&&(!(Kp=T2.match(/Edge\/(\d+)/))||Kp[1]>=74)&&(Kp=T2.match(/Chrome\/(\d+)/))&&(QE=+Kp[1]);var W6=QE,Pr=function(e){try{return!!e()}catch{return!0}},SV=!!Object.getOwnPropertySymbols&&!Pr(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W6&&W6<41}),kV=SV&&!Symbol.sham&&typeof Symbol.iterator=="symbol",G6=xV("wks"),rv=Mt.Symbol,s3e=rv&&rv.for,Zot=kV?rv:rv&&rv.withoutSetter||CV,So=function(e){if(!ni(G6,e)||!SV&&typeof G6[e]!="string"){var t="Symbol."+e;SV&&ni(rv,e)?G6[e]=rv[e]:G6[e]=kV&&s3e?s3e(t):Zot(t)}return G6[e]},u3e={};u3e[So("toStringTag")]="z";var DV=String(u3e)==="[object z]",ta=!Pr(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),uo=function(e){return typeof e=="object"?e!==null:Yr(e)},OV=Mt.document,eit=uo(OV)&&uo(OV.createElement),q6=function(e){return eit?OV.createElement(e):{}},c3e=!ta&&!Pr(function(){return Object.defineProperty(q6("div"),"a",{get:function(){return 7}}).a!=7}),tit=Mt.String,nit=Mt.TypeError,ri=function(e){if(uo(e))return e;throw nit(tit(e)+" is not an object")},K6=Function.prototype.call,Dr=K6.bind?K6.bind(K6):function(){return K6.apply(K6,arguments)},ov=cn({}.isPrototypeOf),rit=Mt.Object,TV=kV?function(e){return typeof e=="symbol"}:function(e){var t=nv("Symbol");return Yr(t)&&ov(t.prototype,rit(e))},oit=Mt.String,ZE=function(e){try{return oit(e)}catch{return"Object"}},iit=Mt.TypeError,Qp=function(e){if(Yr(e))return e;throw iit(ZE(e)+" is not a function")},iv=function(e,t){var n=e[t];return n==null?void 0:Qp(n)},ait=Mt.TypeError,lit=Mt.TypeError,sit=So("toPrimitive"),MV=function(e){var t=function(n){if(!uo(n)||TV(n))return n;var r,o=iv(n,sit);if(o){if(r=Dr(o,n,"string"),!uo(r)||TV(r))return r;throw lit("Can't convert object to primitive value")}return function(i){var a,l;if(Yr(a=i.toString)&&!uo(l=Dr(a,i))||Yr(a=i.valueOf)&&!uo(l=Dr(a,i)))return l;throw ait("Can't convert object to primitive value")}(n)}(e);return TV(t)?t:t+""},uit=Mt.TypeError,d3e=Object.defineProperty,Ku={f:ta?d3e:function(e,t,n){if(ri(e),t=MV(t),ri(n),c3e)try{return d3e(e,t,n)}catch{}if("get"in n||"set"in n)throw uit("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},eC=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Yu=ta?function(e,t,n){return Ku.f(e,t,eC(1,n))}:function(e,t,n){return e[t]=n,e},cit=cn(Function.toString);Yr(Yp.inspectSource)||(Yp.inspectSource=function(e){return cit(e)});var tC,Y6,nC,rC=Yp.inspectSource,f3e=Mt.WeakMap,p3e=Yr(f3e)&&/native code/.test(rC(f3e)),h3e=xV("keys"),NV=function(e){return h3e[e]||(h3e[e]=CV(e))},oC={},FV=Mt.TypeError,dit=Mt.WeakMap;if(p3e||Yp.state){var av=Yp.state||(Yp.state=new dit),fit=cn(av.get),v3e=cn(av.has),pit=cn(av.set);tC=function(e,t){if(v3e(av,e))throw new FV("Object already initialized");return t.facade=e,pit(av,e,t),t},Y6=function(e){return fit(av,e)||{}},nC=function(e){return v3e(av,e)}}else{var M2=NV("state");oC[M2]=!0,tC=function(e,t){if(ni(e,M2))throw new FV("Object already initialized");return t.facade=e,Yu(e,M2,t),t},Y6=function(e){return ni(e,M2)?e[M2]:{}},nC=function(e){return ni(e,M2)}}var Ia={set:tC,get:Y6,has:nC,enforce:function(e){return nC(e)?Y6(e):tC(e,{})},getterFor:function(e){return function(t){var n;if(!uo(t)||(n=Y6(t)).type!==e)throw FV("Incompatible receiver, "+e+" required");return n}}},m3e=Function.prototype,hit=ta&&Object.getOwnPropertyDescriptor,RV=ni(m3e,"name"),N2={EXISTS:RV,PROPER:RV&&(function(){}).name==="something",CONFIGURABLE:RV&&(!ta||ta&&hit(m3e,"name").configurable)},$l=U6(function(e){var t=N2.CONFIGURABLE,n=Ia.get,r=Ia.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;Yr(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ni(l,"name")||t&&l.name!==p)&&Yu(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==Mt?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:Yu(i,a,l)):d?i[a]=l:wV(a,l)})(Function.prototype,"toString",function(){return Yr(this)&&n(this).source||rC(this)})}),vit=cn({}.toString),mit=cn("".slice),Xu=function(e){return mit(vit(e),8,-1)},git=So("toStringTag"),yit=Mt.Object,bit=Xu(function(){return arguments}())=="Arguments",iC=DV?Xu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=yit(e),git))=="string"?n:bit?Xu(t):(r=Xu(t))=="Object"&&Yr(t.callee)?"Arguments":r},Ait=DV?{}.toString:function(){return"[object "+iC(this)+"]"};DV||$l(Object.prototype,"toString",Ait,{unsafe:!0});var aC={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},IV=q6("span").classList,g3e=IV&&IV.constructor&&IV.constructor.prototype,y3e=g3e===Object.prototype?void 0:g3e,b3e=cn(cn.bind),lv=function(e,t){return Qp(e),t===void 0?e:b3e?b3e(e,t):function(){return e.apply(t,arguments)}},BV=Mt.Object,wit=cn("".split),lC=Pr(function(){return!BV("z").propertyIsEnumerable(0)})?function(e){return Xu(e)=="String"?wit(e,""):BV(e)}:BV,xit=Math.ceil,_it=Math.floor,X6=function(e){var t=+e;return t!=t||t===0?0:(t>0?_it:xit)(t)},Eit=Math.min,F2=function(e){return e>0?Eit(X6(e),9007199254740991):0},sv=function(e){return F2(e.length)},sC=Array.isArray||function(e){return Xu(e)=="Array"},A3e=function(){},Cit=[],w3e=nv("Reflect","construct"),LV=/^\s*(?:class|function)\b/,Sit=cn(LV.exec),kit=!LV.exec(A3e),Q6=function(e){if(!Yr(e))return!1;try{return w3e(A3e,Cit,e),!0}catch{return!1}},uC=!w3e||Pr(function(){var e;return Q6(Q6.call)||!Q6(Object)||!Q6(function(){e=!0})||e})?function(e){if(!Yr(e))return!1;switch(iC(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return kit||!!Sit(LV,rC(e))}:Q6,Dit=So("species"),x3e=Mt.Array,_3e=function(e,t){return new(function(n){var r;return sC(n)&&(r=n.constructor,(uC(r)&&(r===x3e||sC(r.prototype))||uo(r)&&(r=r[Dit])===null)&&(r=void 0)),r===void 0?x3e:r}(e))(t===0?0:t)},E3e=cn([].push),Jp=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=Xp(s),v=lC(m),g=lv(u,c),b=sv(v),y=0,w=d||_3e,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:E3e(x,f)}else switch(e){case 4:return!1;case 7:E3e(x,f)}return i?-1:r||o?o:x}},R2={forEach:Jp(0),map:Jp(1),filter:Jp(2),some:Jp(3),every:Jp(4),find:Jp(5),findIndex:Jp(6),filterReject:Jp(7)},C3e=function(e,t){var n=[][e];return!!n&&Pr(function(){n.call(null,t||function(){throw 1},1)})},Oit=R2.forEach,PV=C3e("forEach")?[].forEach:function(e){return Oit(this,e,arguments.length>1?arguments[1]:void 0)},S3e=function(e){if(e&&e.forEach!==PV)try{Yu(e,"forEach",PV)}catch{e.forEach=PV}};for(var jV in aC)aC[jV]&&S3e(Mt[jV]&&Mt[jV].prototype);S3e(y3e);var k3e={}.propertyIsEnumerable,D3e=Object.getOwnPropertyDescriptor,Tit=D3e&&!k3e.call({1:2},1)?function(e){var t=D3e(this,e);return!!t&&t.enumerable}:k3e,O3e={f:Tit},Zp=function(e){return lC(uu(e))},T3e=Object.getOwnPropertyDescriptor,J6={f:ta?T3e:function(e,t){if(e=Zp(e),t=MV(t),c3e)try{return T3e(e,t)}catch{}if(ni(e,t))return eC(!Dr(O3e.f,e,t),e[t])}},Mit=Math.max,Nit=Math.min,I2=function(e,t){var n=X6(e);return n<0?Mit(n+t,0):Nit(n,t)},M3e=function(e){return function(t,n,r){var o,i=Zp(t),a=sv(i),l=I2(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},N3e={includes:M3e(!0),indexOf:M3e(!1)},Fit=N3e.indexOf,F3e=cn([].push),R3e=function(e,t){var n,r=Zp(e),o=0,i=[];for(n in r)!ni(oC,n)&&ni(r,n)&&F3e(i,n);for(;t.length>o;)ni(r,n=t[o++])&&(~Fit(i,n)||F3e(i,n));return i},cC=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Rit=cC.concat("length","prototype"),Z6={f:Object.getOwnPropertyNames||function(e){return R3e(e,Rit)}},I3e={f:Object.getOwnPropertySymbols},Iit=cn([].concat),Bit=nv("Reflect","ownKeys")||function(e){var t=Z6.f(ri(e)),n=I3e.f;return n?Iit(t,n(e)):t},Lit=function(e,t){for(var n=Bit(t),r=Ku.f,o=J6.f,i=0;i<n.length;i++){var a=n[i];ni(e,a)||r(e,a,o(t,a))}},Pit=/#|\.prototype\./,e8=function(e,t){var n=Vit[jit(e)];return n==Hit||n!=zit&&(Yr(t)?Pr(t):!!t)},jit=e8.normalize=function(e){return String(e).replace(Pit,".").toLowerCase()},Vit=e8.data={},zit=e8.NATIVE="N",Hit=e8.POLYFILL="P",t8=e8,$it=J6.f,ko=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?Mt:u?Mt[l]||wV(l,{}):(Mt[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=$it(n,r))&&a.value:n[r],!t8(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;Lit(i,o)}(e.sham||o&&o.sham)&&Yu(i,"sham",!0),$l(n,r,i,e)}},B2=Object.keys||function(e){return R3e(e,cC)},Uit=Pr(function(){B2(1)});function B3e(e){return Object.prototype.toString.call(e)==="[object Object]"}ko({target:"Object",stat:!0,forced:Uit},{keys:function(e){return B2(Xp(e))}});var Wit={isHistory(e){return B3e(t=e)!==!1&&((n=t.constructor)===void 0||B3e(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Vp.isOperationList(e.redos[0]))&&(e.undos.length===0||Vp.isOperationList(e.undos[0]));var t,n,r}},VV=new WeakMap,zV=new WeakMap,L2={isHistoryEditor:e=>Wit.isHistory(e.history)&&ue.isEditor(e),isMerging:e=>zV.get(e),isSaving:e=>VV.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=L2.isMerging(e);zV.set(e,!1),t(),zV.set(e,n)},withoutSaving(e,t){var n=L2.isSaving(e);VV.set(e,!1),t(),VV.set(e,n)}},Git=Mt.String,to=function(e){if(iC(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Git(e)},HV=function(){var e=ri(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},qit=N2.PROPER,$V=RegExp.prototype,L3e=$V.toString,Kit=cn(HV),Yit=Pr(function(){return L3e.call({source:"a",flags:"b"})!="/a/b"}),Xit=qit&&L3e.name!="toString";(Yit||Xit)&&$l(RegExp.prototype,"toString",function(){var e=ri(this),t=to(e.source),n=e.flags;return"/"+t+"/"+to(n===void 0&&ov($V,e)&&!("flags"in $V)?Kit(e):n)},{unsafe:!0});var dC,Qit=ta?Object.defineProperties:function(e,t){ri(e);for(var n,r=Zp(t),o=B2(t),i=o.length,a=0;i>a;)Ku.f(e,n=o[a++],r[n]);return e},UV=nv("document","documentElement"),P3e=NV("IE_PROTO"),WV=function(){},j3e=function(e){return"<script>"+e+"<\/script>"},V3e=function(e){e.write(j3e("")),e.close();var t=e.parentWindow.Object;return e=null,t},fC=function(){try{dC=new ActiveXObject("htmlfile")}catch{}var e,t;fC=typeof document<"u"?document.domain&&dC?V3e(dC):((t=q6("iframe")).style.display="none",UV.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(j3e("document.F=Object")),e.close(),e.F):V3e(dC);for(var n=cC.length;n--;)delete fC.prototype[cC[n]];return fC()};oC[P3e]=!0;var pC=Object.create||function(e,t){var n;return e!==null?(WV.prototype=ri(e),n=new WV,WV.prototype=null,n[P3e]=e):n=fC(),t===void 0?n:Qit(n,t)},GV=So("unscopables"),qV=Array.prototype;qV[GV]==null&&Ku.f(qV,GV,{configurable:!0,value:pC(null)});var n8=function(e){qV[GV][e]=!0},Jit=N3e.includes;ko({target:"Array",proto:!0},{includes:function(e){return Jit(this,e,arguments.length>1?arguments[1]:void 0)}}),n8("includes");var Zit=So("match"),KV=function(e){var t;return uo(e)&&((t=e[Zit])!==void 0?!!t:Xu(e)=="RegExp")},eat=Mt.TypeError,YV=function(e){if(KV(e))throw eat("The method doesn't accept regular expressions");return e},tat=So("match"),XV=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[tat]=!1,"/./"[e](t)}catch{}}return!1},nat=cn("".indexOf);ko({target:"String",proto:!0,forced:!XV("includes")},{includes:function(e){return!!~nat(to(uu(this)),to(YV(e)),arguments.length>1?arguments[1]:void 0)}});var rat=/"/g,oat=cn("".replace);ko({target:"String",proto:!0,forced:Pr(function(){var e="".anchor('"');return e!==e.toLowerCase()||e.split('"').length>3})},{anchor:function(e){return t=e,n=to(uu(this)),r="<a",(r+=' name="'+oat(to(t),rat,""")+'"')+">"+n+"</a>";var t,n,r}});var QV=function(e,t,n){var r,o;ri(e);try{if(!(r=iv(e,"return"))){if(t==="throw")throw n;return n}r=Dr(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return ri(r),n},iat=function(e,t,n,r){try{return r?t(ri(n)[0],n[1]):t(n)}catch(o){QV(e,"throw",o)}},P2={},aat=So("iterator"),lat=Array.prototype,z3e=function(e){return e!==void 0&&(P2.Array===e||lat[aat]===e)},r8=function(e,t,n){var r=MV(t);r in e?Ku.f(e,r,eC(0,n)):e[r]=n},sat=So("iterator"),JV=function(e){if(e!=null)return iv(e,sat)||iv(e,"@@iterator")||P2[iC(e)]},uat=Mt.TypeError,H3e=function(e,t){var n=arguments.length<2?JV(e):t;if(Qp(n))return ri(Dr(n,e));throw uat(ZE(e)+" is not iterable")},$3e=Mt.Array,U3e=So("iterator"),W3e=!1;try{var cat=0,G3e={next:function(){return{done:!!cat++}},return:function(){W3e=!0}};G3e[U3e]=function(){return this},Array.from(G3e,function(){throw 2})}catch{}var ZV=function(e,t){if(!W3e)return!1;var n=!1;try{var r={};r[U3e]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},dat=!ZV(function(e){Array.from(e)});ko({target:"Array",stat:!0,forced:dat},{from:function(e){var t=Xp(e),n=uC(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=o!==void 0;i&&(o=lv(o,r>2?arguments[2]:void 0));var a,l,s,u,c,d,f=JV(t),p=0;if(!f||this==$3e&&z3e(f))for(a=sv(t),l=n?new this(a):$3e(a);a>p;p++)d=i?o(t[p],p):t[p],r8(l,p,d);else for(c=(u=H3e(t,f)).next,l=n?new this:[];!(s=Dr(c,u)).done;p++)d=i?iat(u,o,[s.value,p],!0):s.value,r8(l,p,d);return l.length=p,l}});var uv,q3e,K3e,fat=cn("".charAt),Y3e=cn("".charCodeAt),pat=cn("".slice),X3e=function(e){return function(t,n){var r,o,i=to(uu(t)),a=X6(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=Y3e(i,a))<55296||r>56319||a+1===l||(o=Y3e(i,a+1))<56320||o>57343?e?fat(i,a):r:e?pat(i,a,a+2):o-56320+(r-55296<<10)+65536}},Q3e={codeAt:X3e(!1),charAt:X3e(!0)},hat=!Pr(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),J3e=NV("IE_PROTO"),ez=Mt.Object,vat=ez.prototype,hC=hat?ez.getPrototypeOf:function(e){var t=Xp(e);if(ni(t,J3e))return t[J3e];var n=t.constructor;return Yr(n)&&t instanceof n?n.prototype:t instanceof ez?vat:null},tz=So("iterator"),Z3e=!1;[].keys&&("next"in(K3e=[].keys())?(q3e=hC(hC(K3e)))!==Object.prototype&&(uv=q3e):Z3e=!0);var mat=uv==null||Pr(function(){var e={};return uv[tz].call(e)!==e});mat&&(uv={}),Yr(uv[tz])||$l(uv,tz,function(){return this});var nz={IteratorPrototype:uv,BUGGY_SAFARI_ITERATORS:Z3e},gat=Ku.f,ebe=So("toStringTag"),vC=function(e,t,n){e&&!ni(e=n?e:e.prototype,ebe)&&gat(e,ebe,{configurable:!0,value:t})},yat=nz.IteratorPrototype,bat=function(){return this},Aat=Mt.String,wat=Mt.TypeError,j2=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=cn(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,o){return ri(r),function(i){if(typeof i=="object"||Yr(i))return i;throw wat("Can't set "+Aat(i)+" as a prototype")}(o),t?e(r,o):r.__proto__=o,r}}():void 0),xat=N2.PROPER,_at=N2.CONFIGURABLE,tbe=nz.IteratorPrototype,mC=nz.BUGGY_SAFARI_ITERATORS,o8=So("iterator"),Eat=function(){return this},rz=function(e,t,n,r,o,i,a){(function(b,y,w){var x=y+" Iterator";b.prototype=pC(yat,{next:eC(1,w)}),vC(b,x,!1),P2[x]=bat})(n,t,r);var l,s,u,c=function(b){if(b===o&&v)return v;if(!mC&&b in p)return p[b];switch(b){case"keys":case"values":case"entries":return function(){return new n(this,b)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,p=e.prototype,m=p[o8]||p["@@iterator"]||o&&p[o],v=!mC&&m||c(o),g=t=="Array"&&p.entries||m;if(g&&(l=hC(g.call(new e)))!==Object.prototype&&l.next&&(hC(l)!==tbe&&(j2?j2(l,tbe):Yr(l[o8])||$l(l,o8,Eat)),vC(l,d,!0)),xat&&o=="values"&&m&&m.name!=="values"&&(_at?Yu(p,"name","values"):(f=!0,v=function(){return Dr(m,this)})),o)if(s={values:c("values"),keys:i?v:c("keys"),entries:c("entries")},a)for(u in s)(mC||f||!(u in p))&&$l(p,u,s[u]);else ko({target:t,proto:!0,forced:mC||f},s);return p[o8]!==v&&$l(p,o8,v,{name:o}),P2[t]=v,s},Cat=Q3e.charAt,Sat=Ia.set,kat=Ia.getterFor("String Iterator");rz(String,"String",function(e){Sat(this,{type:"String Iterator",string:to(e),index:0})},function(){var e,t=kat(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Cat(n,r),t.index+=e.length,{value:e,done:!1})});var oz,Dat=J6.f,nbe=cn("".endsWith),Oat=cn("".slice),Tat=Math.min,rbe=XV("endsWith"),Mat=!(rbe||(oz=Dat(String.prototype,"endsWith"),!oz||oz.writable));ko({target:"String",proto:!0,forced:!Mat&&!rbe},{endsWith:function(e){var t=to(uu(this));YV(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=n===void 0?r:Tat(F2(n),r),i=to(e);return nbe?nbe(t,i,o):Oat(t,o-i.length,o)===i}});var Nat=cn([].join),Fat=lC!=Object,Rat=C3e("join",",");ko({target:"Array",proto:!0,forced:Fat||!Rat},{join:function(e){return Nat(Zp(this),e===void 0?",":e)}});var Iat=So("species"),gC=function(e){return W6>=51||!Pr(function(){var t=[];return(t.constructor={})[Iat]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Bat=R2.map,Lat=gC("map");ko({target:"Array",proto:!0,forced:!Lat},{map:function(e){return Bat(this,e,arguments.length>1?arguments[1]:void 0)}});var iz=Mt.RegExp,az=Pr(function(){var e=iz("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Pat=az||Pr(function(){return!iz("a","y").sticky}),yC={BROKEN_CARET:az||Pr(function(){var e=iz("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:Pat,UNSUPPORTED_Y:az},jat=Mt.RegExp,lz=Pr(function(){var e=jat(".","s");return!(e.dotAll&&e.exec(` |
|
1002 |
`)&&e.flags==="s")}),Vat=Mt.RegExp,sz=Pr(function(){var e=Vat("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),zat=Ia.get,Hat=xV("native-string-replace",String.prototype.replace),bC=RegExp.prototype.exec,uz=bC,$at=cn("".charAt),Uat=cn("".indexOf),Wat=cn("".replace),cz=cn("".slice),dz=function(){var e=/a/,t=/b*/g;return Dr(bC,e,"a"),Dr(bC,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),obe=yC.BROKEN_CARET,fz=/()??/.exec("")[1]!==void 0;(dz||fz||obe||lz||sz)&&(uz=function(e){var t,n,r,o,i,a,l,s=this,u=zat(s),c=to(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=Dr(uz,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=obe&&s.sticky,m=Dr(HV,s),v=s.source,g=0,b=c;if(p&&(m=Wat(m,"y",""),Uat(m,"g")===-1&&(m+="g"),b=cz(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&$at(c,s.lastIndex-1)!==` |
|
1003 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),fz&&(n=new RegExp("^"+v+"$(?!\\s)",m)),dz&&(r=s.lastIndex),o=Dr(bC,p?n:s,b),p?o?(o.input=cz(o.input,g),o[0]=cz(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:dz&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),fz&&o&&o.length>1&&Dr(Hat,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=pC(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var i8=uz;ko({target:"RegExp",proto:!0,forced:/./.exec!==i8},{exec:i8});var pz=Function.prototype,ibe=pz.apply,Gat=pz.bind,abe=pz.call,hz=typeof Reflect=="object"&&Reflect.apply||(Gat?abe.bind(ibe):function(){return abe.apply(ibe,arguments)}),qat=So("species"),vz=RegExp.prototype,mz=function(e,t,n,r){var o=So(e),i=!Pr(function(){var u={};return u[o]=function(){return 7},""[e](u)!=7}),a=i&&!Pr(function(){var u=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[qat]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return u=!0,null},c[o](""),!u});if(!i||!a||n){var l=cn(/./[o]),s=t(o,""[e],function(u,c,d,f,p){var m=cn(u),v=c.exec;return v===i8||v===vz.exec?i&&!p?{done:!0,value:l(c,d,f)}:{done:!0,value:m(d,c,f)}:{done:!1}});$l(String.prototype,e,s[0]),$l(vz,o,s[1])}r&&Yu(vz[o],"sham",!0)},Kat=Q3e.charAt,gz=function(e,t,n){return t+(n?Kat(e,t).length:1)},Yat=Math.floor,yz=cn("".charAt),Xat=cn("".replace),bz=cn("".slice),Qat=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Jat=/\$([$&'`]|\d{1,2})/g,Zat=function(e,t,n,r,o,i){var a=n+e.length,l=r.length,s=Jat;return o!==void 0&&(o=Xp(o),s=Qat),Xat(i,s,function(u,c){var d;switch(yz(c,0)){case"$":return"$";case"&":return e;case"`":return bz(t,0,n);case"'":return bz(t,a);case"<":d=o[bz(c,1,-1)];break;default:var f=+c;if(f===0)return u;if(f>l){var p=Yat(f/10);return p===0?u:p<=l?r[p-1]===void 0?yz(c,1):r[p-1]+yz(c,1):u}d=r[f-1]}return d===void 0?"":d})},elt=Mt.TypeError,a8=function(e,t){var n=e.exec;if(Yr(n)){var r=Dr(n,e,t);return r!==null&&ri(r),r}if(Xu(e)==="RegExp")return Dr(i8,e,t);throw elt("RegExp#exec called on incompatible receiver")},Az=So("replace"),tlt=Math.max,nlt=Math.min,rlt=cn([].concat),wz=cn([].push),lbe=cn("".indexOf),sbe=cn("".slice),olt="a".replace(/./,"$0")==="$0",ube=!!/./[Az]&&/./[Az]("a","$0")==="";mz("replace",function(e,t,n){var r=ube?"$":"$0";return[function(o,i){var a=uu(this),l=o==null?void 0:iv(o,Az);return l?Dr(l,o,a,i):Dr(t,to(a),o,i)},function(o,i){var a=ri(this),l=to(o);if(typeof i=="string"&&lbe(i,r)===-1&&lbe(i,"$<")===-1){var s=n(t,a,l,i);if(s.done)return s.value}var u=Yr(i);u||(i=to(i));var c=a.global;if(c){var d=a.unicode;a.lastIndex=0}for(var f=[];;){var p=a8(a,l);if(p===null||(wz(f,p),!c))break;to(p[0])===""&&(a.lastIndex=gz(l,F2(a.lastIndex),d))}for(var m,v="",g=0,b=0;b<f.length;b++){for(var y=to((p=f[b])[0]),w=tlt(nlt(X6(p.index),l.length),0),x=[],_=1;_<p.length;_++)wz(x,(m=p[_])===void 0?m:String(m));var E=p.groups;if(u){var C=rlt([y],x,w,l);E!==void 0&&wz(C,E);var T=to(hz(i,void 0,C))}else T=Zat(y,l,w,x,E,i);w>=g&&(v+=sbe(l,g,w)+T,g=w+y.length)}return v+sbe(l,g)}]},!!Pr(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!olt||ube);var xz=function(e,t){return xz=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},xz(e,t)};function V2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}xz(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var cu=function(){return cu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cu.apply(this,arguments)};function du(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Er(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function _z(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}var ilt=0,cbe=function(){this.id=""+ilt++},alt=Ia.set,llt=Ia.getterFor("Array Iterator"),l8=rz(Array,"Array",function(e,t){alt(this,{type:"Array Iterator",target:Zp(e),index:0,kind:t})},function(){var e=llt(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");P2.Arguments=P2.Array,n8("keys"),n8("values"),n8("entries");var z2=function(e,t,n){for(var r in t)$l(e,r,t[r],n);return e},slt=Mt.Array,ult=Math.max,Ez=function(e,t,n){for(var r=sv(e),o=I2(t,r),i=I2(n===void 0?r:n,r),a=slt(ult(i-o,0)),l=0;o<i;o++,l++)r8(a,l,e[o]);return a.length=l,a},dbe=Z6.f,fbe=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],clt={f:function(e){return fbe&&Xu(e)=="Window"?function(t){try{return dbe(t)}catch{return Ez(fbe)}}(e):dbe(Zp(e))}},pbe=Pr(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),AC=Object.isExtensible,cv=Pr(function(){AC(1)})||pbe?function(e){return!!uo(e)&&(!pbe||Xu(e)!="ArrayBuffer")&&(!AC||AC(e))}:AC,dlt=!Pr(function(){return Object.isExtensible(Object.preventExtensions({}))}),wC=U6(function(e){var t=Ku.f,n=!1,r=CV("meta"),o=0,i=function(l){t(l,r,{value:{objectID:"O"+o++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var l=Z6.f,s=cn([].splice),u={};u[r]=1,l(u).length&&(Z6.f=function(c){for(var d=l(c),f=0,p=d.length;f<p;f++)if(d[f]===r){s(d,f,1);break}return d},ko({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:clt.f}))},fastKey:function(l,s){if(!uo(l))return typeof l=="symbol"?l:(typeof l=="string"?"S":"P")+l;if(!ni(l,r)){if(!cv(l))return"F";if(!s)return"E";i(l)}return l[r].objectID},getWeakData:function(l,s){if(!ni(l,r)){if(!cv(l))return!0;if(!s)return!1;i(l)}return l[r].weakData},onFreeze:function(l){return dlt&&n&&cv(l)&&!ni(l,r)&&i(l),l}};oC[r]=!0}),flt=Mt.TypeError,xC=function(e,t){this.stopped=e,this.result=t},hbe=xC.prototype,s8=function(e,t,n){var r,o,i,a,l,s,u,c=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=lv(t,c),v=function(b){return r&&QV(r,"normal",b),new xC(!0,b)},g=function(b){return d?(ri(b),p?m(b[0],b[1],v):m(b[0],b[1])):p?m(b,v):m(b)};if(f)r=e;else{if(!(o=JV(e)))throw flt(ZE(e)+" is not iterable");if(z3e(o)){for(i=0,a=sv(e);a>i;i++)if((l=g(e[i]))&&ov(hbe,l))return l;return new xC(!1)}r=H3e(e,o)}for(s=r.next;!(u=Dr(s,r)).done;){try{l=g(u.value)}catch(b){QV(r,"throw",b)}if(typeof l=="object"&&l&&ov(hbe,l))return l}return new xC(!1)},plt=Mt.TypeError,_C=function(e,t){if(ov(t,e))return e;throw plt("Incorrect invocation")},vbe=function(e,t,n){var r,o;return j2&&Yr(r=t.constructor)&&r!==n&&uo(o=r.prototype)&&o!==n.prototype&&j2(e,o),e},mbe=function(e,t,n){var r=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=r?"set":"add",a=Mt[e],l=a&&a.prototype,s=a,u={},c=function(g){var b=cn(l[g]);$l(l,g,g=="add"?function(y){return b(this,y===0?0:y),this}:g=="delete"?function(y){return!(o&&!uo(y))&&b(this,y===0?0:y)}:g=="get"?function(y){return o&&!uo(y)?void 0:b(this,y===0?0:y)}:g=="has"?function(y){return!(o&&!uo(y))&&b(this,y===0?0:y)}:function(y,w){return b(this,y===0?0:y,w),this})};if(t8(e,!Yr(a)||!(o||l.forEach&&!Pr(function(){new a().entries().next()}))))s=n.getConstructor(t,e,r,i),wC.enable();else if(t8(e,!0)){var d=new s,f=d[i](o?{}:-0,1)!=d,p=Pr(function(){d.has(1)}),m=ZV(function(g){new a(g)}),v=!o&&Pr(function(){for(var g=new a,b=5;b--;)g[i](b,b);return!g.has(-0)});m||((s=t(function(g,b){_C(g,l);var y=vbe(new a,g,s);return b!=null&&s8(b,y[i],{that:y,AS_ENTRIES:r}),y})).prototype=l,l.constructor=s),(p||v)&&(c("delete"),c("has"),r&&c("get")),(v||f)&&c(i),o&&l.clear&&delete l.clear}return u[e]=s,ko({global:!0,forced:s!=a},u),vC(s,e),o||n.setStrong(s,e,r),s},EC=wC.getWeakData,hlt=Ia.set,vlt=Ia.getterFor,mlt=R2.find,glt=R2.findIndex,ylt=cn([].splice),blt=0,CC=function(e){return e.frozen||(e.frozen=new gbe)},gbe=function(){this.entries=[]},Cz=function(e,t){return mlt(e.entries,function(n){return n[0]===t})};gbe.prototype={get:function(e){var t=Cz(this,e);if(t)return t[1]},has:function(e){return!!Cz(this,e)},set:function(e,t){var n=Cz(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=glt(this.entries,function(n){return n[0]===e});return~t&&ylt(this.entries,t,1),!!~t}};var u8,ybe={getConstructor:function(e,t,n,r){var o=e(function(s,u){_C(s,i),hlt(s,{type:t,id:blt++,frozen:void 0}),u!=null&&s8(u,s[r],{that:s,AS_ENTRIES:n})}),i=o.prototype,a=vlt(t),l=function(s,u,c){var d=a(s),f=EC(ri(u),!0);return f===!0?CC(d).set(u,c):f[d.id]=c,s};return z2(i,{delete:function(s){var u=a(this);if(!uo(s))return!1;var c=EC(s);return c===!0?CC(u).delete(s):c&&ni(c,u.id)&&delete c[u.id]},has:function(s){var u=a(this);if(!uo(s))return!1;var c=EC(s);return c===!0?CC(u).has(s):c&&ni(c,u.id)}}),z2(i,n?{get:function(s){var u=a(this);if(uo(s)){var c=EC(s);return c===!0?CC(u).get(s):c?c[u.id]:void 0}},set:function(s,u){return l(this,s,u)}}:{add:function(s){return l(this,s,!0)}}),o}},SC=Ia.enforce,Alt=!Mt.ActiveXObject&&"ActiveXObject"in Mt,bbe=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},wlt=mbe("WeakMap",bbe,ybe);if(p3e&&Alt){u8=ybe.getConstructor(bbe,"WeakMap",!0),wC.enable();var c8=wlt.prototype,Abe=cn(c8.delete),kC=cn(c8.has),wbe=cn(c8.get),xbe=cn(c8.set);z2(c8,{delete:function(e){if(uo(e)&&!cv(e)){var t=SC(this);return t.frozen||(t.frozen=new u8),Abe(this,e)||t.frozen.delete(e)}return Abe(this,e)},has:function(e){if(uo(e)&&!cv(e)){var t=SC(this);return t.frozen||(t.frozen=new u8),kC(this,e)||t.frozen.has(e)}return kC(this,e)},get:function(e){if(uo(e)&&!cv(e)){var t=SC(this);return t.frozen||(t.frozen=new u8),kC(this,e)?wbe(this,e):t.frozen.get(e)}return wbe(this,e)},set:function(e,t){if(uo(e)&&!cv(e)){var n=SC(this);n.frozen||(n.frozen=new u8),kC(this,e)?xbe(this,e,t):n.frozen.set(e,t)}else xbe(this,e,t);return this}})}var Sz=So("iterator"),_be=So("toStringTag"),kz=l8.values,Ebe=function(e,t){if(e){if(e[Sz]!==kz)try{Yu(e,Sz,kz)}catch{e[Sz]=kz}if(e[_be]||Yu(e,_be,t),aC[t]){for(var n in l8)if(e[n]!==l8[n])try{Yu(e,n,l8[n])}catch{e[n]=l8[n]}}}};for(var Dz in aC)Ebe(Mt[Dz]&&Mt[Dz].prototype,Dz);Ebe(y3e,"DOMTokenList");var Oz=new WeakMap,Tz=new WeakMap,Mz=new WeakMap,DC=new WeakMap,Nz=new WeakMap,OC=new WeakMap,Fz=new WeakMap,Rz=new WeakMap,TC=new WeakMap,Cbe=new WeakMap,Sbe=new WeakMap,kbe=new WeakMap,Dbe=new WeakMap,d8=new WeakMap,H2=new WeakMap,Iz=new WeakMap,MC=new WeakMap,Bz=new WeakMap,NC=new WeakMap,FC=new WeakMap,Obe=new WeakMap,dv=new WeakMap,Lz=new WeakMap,Tbe=new WeakMap,Pz=new WeakMap,xlt=R2.find,Mbe=!0;"find"in[]&&Array(1).find(function(){Mbe=!1}),ko({target:"Array",proto:!0,forced:Mbe},{find:function(e){return xlt(this,e,arguments.length>1?arguments[1]:void 0)}}),n8("find"),ko({global:!0},{globalThis:Mt});const _lt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];LE&&(Le.fn.css=LE),au&&(Le.fn.append=au),m2&&(Le.fn.addClass=m2),g2&&(Le.fn.removeClass=g2),y2&&(Le.fn.hasClass=y2),Yc&&(Le.fn.on=Yc),$p&&(Le.fn.focus=$p),iu&&(Le.fn.attr=iu),FE&&(Le.fn.removeAttr=FE),A2&&(Le.fn.hide=A2),BE&&(Le.fn.show=BE),P2e&&(Le.fn.offset=P2e),RE&&(Le.fn.width=RE),IE&&(Le.fn.height=IE),w2&&(Le.fn.parent=w2),VE&&(Le.fn.parents=VE),V2e&&(Le.fn.is=V2e),b2&&(Le.fn.dataset=b2),Kc&&(Le.fn.val=Kc),jE&&(Le.fn.text=jE),Hp&&(Le.fn.html=Hp),_2&&(Le.fn.children=_2),E2&&(Le.fn.remove=E2),x2&&(Le.fn.find=x2),PE&&(Le.fn.each=PE),C2&&(Le.fn.empty=C2);var ed,Ba,jz=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},Qu=function(e){return fv(e)&&e.nodeType===1},fv=function(e){var t=jz(e);return!!t&&e instanceof t.Node},Nbe=function(e){var t=e&&e.anchorNode&&jz(e.anchorNode);return!!t&&e instanceof t.Selection},Fbe=function(e){return fv(e)&&e.nodeType===3},Vz=function(e){var t,n,r;return(t=window.document.getElementById(e))!==null&&t!==void 0?t:((r=(n=window.document.activeElement)===null||n===void 0?void 0:n.shadowRoot)===null||r===void 0?void 0:r.getElementById(e))||null},Rbe=function(e,t,n){for(var r,o=e.childNodes,i=o[t],a=t,l=!1,s=!1;(fv(r=i)&&r.nodeType===8||Qu(i)&&i.childNodes.length===0||Qu(i)&&i.getAttribute("contenteditable")==="false")&&(!l||!s);)a>=o.length?(l=!0,a=t-1,n="backward"):a<0?(s=!0,a=t+1,n="forward"):(i=o[a],t=a,a+=n==="forward"?1:-1);return[i,t]},Elt=function(e,t,n){return Er(Rbe(e,t,n),1)[0]},Clt=function e(t){var n,r,o="";if(Fbe(t)&&t.nodeValue)return t.nodeValue;if(Qu(t)){try{for(var i=du(Array.from(t.childNodes)),a=i.next();!a.done;a=i.next())o+=e(a.value)}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}var l=getComputedStyle(t).getPropertyValue("display");l!=="block"&&l!=="list"&&l!=="table-row"&&t.tagName!=="BR"||(o+=` |
|
1004 |
`)}return o};function Ibe(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid==="true"))for(var n=e.childNodes,r=n.length;r--;){var o=n[r],i=o.nodeType;i==3?t(o,e):i!=1&&i!=9&&i!=11||Ibe(o,t)}}function Bbe(e){if(e.length===0)return"";var t=e[0];return t.nodeType!==ed.ELEMENT_NODE?"":t.tagName.toLowerCase()}(Ba=ed||(ed={}))[Ba.ELEMENT_NODE=1]="ELEMENT_NODE",Ba[Ba.TEXT_NODE=3]="TEXT_NODE",Ba[Ba.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",Ba[Ba.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",Ba[Ba.COMMENT_NODE=8]="COMMENT_NODE",Ba[Ba.DOCUMENT_NODE=9]="DOCUMENT_NODE",Ba[Ba.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",Ba[Ba.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var zz=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),f8=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),p8=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),Slt=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),klt=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Hz=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),h8=!klt&&!Slt&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Re={getWindow:function(e){var t=Obe.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=FC.get(t);return n||(n=new cbe,FC.set(t,n)),n},setNewKey:function(e){var t=new cbe;FC.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=H2.get(r);if(o==null){if(ue.isEditor(r))return n;break}var i=d8.get(r);if(i==null)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=Re.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&n.getSelection!=null?n:t.ownerDocument},getParentNode:function(e,t){return H2.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&r!=null;){var o=Re.getParentNode(e,r);if(o==null)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[Re.findPath(e,t)[0]];return Pt.get(e,n)},toDOMNode:function(e,t){var n;if(ue.isEditor(t))n=Iz.get(e);else{var r=Re.findKey(e,t);n=Bz.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return n},hasDOMNode:function(e,t,n){n===void 0&&(n={});var r,o=n.editable,i=o!==void 0&&o,a=Re.toDOMNode(e,e);try{r=Qu(t)?t:t.parentElement}catch(l){if(!l.message.includes('Permission denied to access property "nodeType"'))throw l}return!!r&&r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=ct.isBackward(t),i=Re.toDOMPoint(e,n),a=ct.isCollapsed(t)?i:Re.toDOMPoint(e,r),l=Re.getWindow(e).document.createRange(),s=Er(o?a:i,2),u=s[0],c=s[1],d=Er(o?i:a,2),f=d[0],p=d[1],m=!!(Qu(u)?u:u.parentElement).getAttribute("data-slate-zero-width"),v=!!(Qu(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return l.setStart(u,m?1:c),l.setEnd(f,v?1:p),l},toDOMPoint:function(e,t){var n,r,o,i=Er(ue.node(e,t.path),1)[0],a=Re.toDOMNode(e,i);ue.void(e,{at:t})&&(t={path:t.path,offset:0});var l=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),s=0;try{for(var u=du(l),c=u.next();!c.done;c=u.next()){var d=c.value,f=d.childNodes[0];if(f!=null&&f.textContent!=null){var p=f.textContent.length,m=d.getAttribute("data-slate-length"),v=s+(m==null?p:parseInt(m,10));if(t.offset<=v){o=[f,Math.min(p,Math.max(0,t.offset-s))];break}s=v}}}catch(g){n={error:g}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(t));return o},toSlateNode:function(e,t){var n=Qu(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?MC.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: "+n);return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);var i,a=Re.toSlateNode(e,t.target),l=Re.findPath(e,a);if(ue.isVoid(e,a)){var s=o.getBoundingClientRect(),u=e.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,c=ue.point(e,l,{edge:u?"start":"end"}),d=u?ue.before(e,c):ue.after(e,c);if(d)return ue.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);return Re.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,l,s=n.exactMatch,u=n.suppressThrow;if((Nbe(t)?t.anchorNode:t.startContainer)&&(Nbe(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,l=Hz&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,l=t.collapsed)),r==null||i==null||o==null||a==null)throw new Error("Cannot resolve a Slate range from DOM range: "+t);var c=Re.toSlatePoint(e,[r,o],{exactMatch:s,suppressThrow:u});if(!c)return null;var d=l?c:Re.toSlatePoint(e,[i,a],{exactMatch:s,suppressThrow:u});if(!d)return null;var f={anchor:c,focus:d};return ct.isExpanded(f)&&ct.isForward(f)&&Qu(i)&&ue.void(e,{at:f.focus,mode:"highest"})&&(f=ue.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=Er(o?t:function(y){var w,x=Er(y,2),_=x[0],E=x[1];if(Qu(_)&&_.childNodes.length){var C=E===_.childNodes.length,T=C?E-1:E;for(_=(w=Er(Rbe(_,T,C?"backward":"forward"),2))[0],C=(T=w[1])<E;Qu(_)&&_.childNodes.length;){var k=C?_.childNodes.length-1:0;_=Elt(_,k,C?"backward":"forward")}E=C&&_.textContent!=null?_.textContent.length:0}return[_,E]}(t),2),l=a[0],s=a[1],u=l.parentNode,c=null,d=0;if(u){var f=u.closest('[data-slate-void="true"]'),p=u.closest("[data-slate-leaf]"),m=null;if(p){c=p.closest('[data-slate-node="text"]');var v=Re.getWindow(e).document.createRange();v.setStart(c,0),v.setEnd(l,s);var g=v.cloneContents();_z(_z([],Er(F2e(g.querySelectorAll("[data-slate-zero-width]")))),Er(F2e(g.querySelectorAll("[contenteditable=false]")))).forEach(function(y){y.parentNode.removeChild(y)}),d=g.textContent.length,m=c}else f&&((p=f.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),d=(m=p).textContent.length,m.querySelectorAll("[data-slate-zero-width]").forEach(function(y){d-=y.textContent.length})):d=1);m&&d===m.textContent.length&&(u.hasAttribute("data-slate-zero-width")||f8&&(!((r=m.textContent)===null||r===void 0)&&r.endsWith(` |
|
1005 |
`)))&&d--}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var b=Re.toSlateNode(e,c);return{path:Re.findPath(e,b),offset:d}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return ue.hasPath(e,n.path)&&ue.hasPath(e,r.path)},getNodeType:function(e){return sn.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(t){return Pt.string(t)}).join("")},getSelectedElems:function(e){var t,n,r=[],o=ue.nodes(e,{universal:!0});try{for(var i=du(o),a=i.next();!a.done;a=i.next()){var l=Er(a.value,1)[0];sn.isElement(l)&&r.push(l)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Er(ue.nodes(e,{match:function(i){return n.checkNodeType(i,t)},universal:!0}),1),o=r[0];return o==null?null:o[0]},getSelectedTextNode:function(e){var t=Er(ue.nodes(e,{match:function(r){return Qt.isText(r)},universal:!0}),1),n=t[0];return n==null?null:n[0]},isNodeSelected:function(e,t){var n=Er(ue.nodes(e,{match:function(o){return o===t},universal:!0}),1),r=n[0];return r!=null&&Er(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(ue.isEnd(e,n.anchor,t)||ue.isEnd(e,n.focus,t))},getTextarea:function(e){var t=Oz.get(e);if(t==null)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return DC.get(e)||null},getHoverbar:function(e){return OC.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,n){e.normalizeNode([t,[n]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if(typeof n!="number"||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,o,i=Re.getTextarea(e).$textArea,a=i==null?void 0:i[0].childNodes;if(a)try{for(var l=du(Array.from(a)),s=l.next();!s.done;s=l.next()){var u=s.value;if(u.nodeType!==3)break;u.remove()}}catch(v){t={error:v}}finally{try{s&&!s.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}var c=ue.nodes(e,{match:function(v){return!(!sn.isElement(v)||e.isInline(v))},universal:!0});try{for(var d=du(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(p!=null){var m=p[0];Ibe(Re.toDOMNode(e,m),function(v,g){var b=Le(g);b.attr("data-slate-string")||b.attr("data-slate-zero-width")||b.attr("data-w-e-reserve")||g.removeChild(v)})}}}catch(v){r={error:v}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=ue.nodes(e,{match:function(l){return e.isVoid(l)}}),o=0;try{for(var i=du(r),a=i.next();!a.done;a=i.next())a.value,o++}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||ct.isExpanded(t))return!1;var n=Re.getSelectedNodeByType(e,"paragraph");if(n===null)return!1;var r=n.children;return r.length===1&&(r[0].text===""||void 0)},isEmptyPath:function(e,t){var n=ue.node(e,t);if(n==null)return!1;var r=Er(n,1)[0].children;return r.length===1&&r[0].text===""}},Dlt=1,Lbe={},v8={},Olt=R2.filter,Tlt=gC("filter");ko({target:"Array",proto:!0,forced:!Tlt},{filter:function(e){return Olt(this,e,arguments.length>1?arguments[1]:void 0)}});var $z=` |
|
1006 |
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,Pbe=cn("".replace),RC="["+$z+"]",Mlt=RegExp("^"+RC+RC+"*"),Nlt=RegExp(RC+RC+"*$"),Uz=function(e){return function(t){var n=to(uu(t));return 1&e&&(n=Pbe(n,Mlt,"")),2&e&&(n=Pbe(n,Nlt,"")),n}},Flt={start:Uz(1),end:Uz(2),trim:Uz(3)},Rlt=N2.PROPER,Ilt=Flt.trim;ko({target:"String",proto:!0,forced:function(e){return Pr(function(){return!!$z[e]()||"\u200B\x85\u180E"[e]()!=="\u200B\x85\u180E"||Rlt&&$z[e].name!==e})}("trim")},{trim:function(){return Ilt(this)}});var Wz=[],jbe={};function Blt(e,t,n){var r=n.isInline(e)?"span":"div";return"<"+r+">"+t+"</"+r+">"}var m8,$2,Vbe,Gz,IC=Mt.Promise,zbe=So("species"),qz=function(e){var t=nv(e),n=Ku.f;ta&&t&&!t[zbe]&&n(t,zbe,{configurable:!0,get:function(){return this}})},Llt=Mt.TypeError,Plt=So("species"),Hbe=function(e,t){var n,r=ri(e).constructor;return r===void 0||(n=ri(r)[Plt])==null?t:function(o){if(uC(o))return o;throw Llt(ZE(o)+" is not a constructor")}(n)},$be=cn([].slice),Ube=/(?:ipad|iphone|ipod).*applewebkit/i.test(T2),eh=Xu(Mt.process)=="process",Kz=Mt.setImmediate,Yz=Mt.clearImmediate,jlt=Mt.process,Xz=Mt.Dispatch,Vlt=Mt.Function,Wbe=Mt.MessageChannel,zlt=Mt.String,Qz=0,g8={};try{m8=Mt.location}catch{}var Jz=function(e){if(ni(g8,e)){var t=g8[e];delete g8[e],t()}},Zz=function(e){return function(){Jz(e)}},Gbe=function(e){Jz(e.data)},qbe=function(e){Mt.postMessage(zlt(e),m8.protocol+"//"+m8.host)};Kz&&Yz||(Kz=function(e){var t=$be(arguments,1);return g8[++Qz]=function(){hz(Yr(e)?e:Vlt(e),void 0,t)},$2(Qz),Qz},Yz=function(e){delete g8[e]},eh?$2=function(e){jlt.nextTick(Zz(e))}:Xz&&Xz.now?$2=function(e){Xz.now(Zz(e))}:Wbe&&!Ube?(Gz=(Vbe=new Wbe).port2,Vbe.port1.onmessage=Gbe,$2=lv(Gz.postMessage,Gz)):Mt.addEventListener&&Yr(Mt.postMessage)&&!Mt.importScripts&&m8&&m8.protocol!=="file:"&&!Pr(qbe)?($2=qbe,Mt.addEventListener("message",Gbe,!1)):$2="onreadystatechange"in q6("script")?function(e){UV.appendChild(q6("script")).onreadystatechange=function(){UV.removeChild(this),Jz(e)}}:function(e){setTimeout(Zz(e),0)});var y8,pv,b8,U2,eH,tH,nH,Kbe,Ybe={set:Kz,clear:Yz},Hlt=/ipad|iphone|ipod/i.test(T2)&&Mt.Pebble!==void 0,$lt=/web0s(?!.*chrome)/i.test(T2),Ult=J6.f,rH=Ybe.set,Xbe=Mt.MutationObserver||Mt.WebKitMutationObserver,Qbe=Mt.document,Jbe=Mt.process,BC=Mt.Promise,Zbe=Ult(Mt,"queueMicrotask"),e4e=Zbe&&Zbe.value;e4e||(y8=function(){var e,t;for(eh&&(e=Jbe.domain)&&e.exit();pv;){t=pv.fn,pv=pv.next;try{t()}catch(n){throw pv?U2():b8=void 0,n}}b8=void 0,e&&e.enter()},Ube||eh||$lt||!Xbe||!Qbe?!Hlt&&BC&&BC.resolve?((nH=BC.resolve(void 0)).constructor=BC,Kbe=lv(nH.then,nH),U2=function(){Kbe(y8)}):eh?U2=function(){Jbe.nextTick(y8)}:(rH=lv(rH,Mt),U2=function(){rH(y8)}):(eH=!0,tH=Qbe.createTextNode(""),new Xbe(y8).observe(tH,{characterData:!0}),U2=function(){tH.data=eH=!eH}));var oH,t4e,n4e,r4e,o4e=e4e||function(e){var t={fn:e,next:void 0};b8&&(b8.next=t),pv||(pv=t,U2()),b8=t},Wlt=function(e){var t,n;this.promise=new e(function(r,o){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=o}),this.resolve=Qp(t),this.reject=Qp(n)},iH={f:function(e){return new Wlt(e)}},aH=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},Glt=typeof window=="object",i4e=Ybe.set,qlt=So("species"),td="Promise",a4e=Ia.getterFor(td),Klt=Ia.set,Ylt=Ia.getterFor(td),hv=IC&&IC.prototype,nd=IC,A8=hv,l4e=Mt.TypeError,lH=Mt.document,sH=Mt.process,W2=iH.f,Xlt=W2,Qlt=!!(lH&&lH.createEvent&&Mt.dispatchEvent),s4e=Yr(Mt.PromiseRejectionEvent),u4e=!1,w8=t8(td,function(){var e=rC(nd),t=e!==String(nd);if(!t&&W6===66)return!0;if(W6>=51&&/native code/.test(e))return!1;var n=new nd(function(o){o(1)}),r=function(o){o(function(){},function(){})};return(n.constructor={})[qlt]=r,!(u4e=n.then(function(){})instanceof r)||!t&&Glt&&!s4e}),Jlt=w8||!ZV(function(e){nd.all(e).catch(function(){})}),c4e=function(e){var t;return!(!uo(e)||!Yr(t=e.then))&&t},uH=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;o4e(function(){for(var r=e.value,o=e.state==1,i=0;n.length>i;){var a,l,s,u=n[i++],c=o?u.ok:u.fail,d=u.resolve,f=u.reject,p=u.domain;try{c?(o||(e.rejection===2&&est(e),e.rejection=1),c===!0?a=r:(p&&p.enter(),a=c(r),p&&(p.exit(),s=!0)),a===u.promise?f(l4e("Promise-chain cycle")):(l=c4e(a))?Dr(l,a,d,f):d(a)):f(r)}catch(m){p&&!s&&p.exit(),f(m)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Zlt(e)})}},d4e=function(e,t,n){var r,o;Qlt?((r=lH.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Mt.dispatchEvent(r)):r={promise:t,reason:n},!s4e&&(o=Mt["on"+e])?o(r):e==="unhandledrejection"&&function(i,a){var l=Mt.console;l&&l.error&&(arguments.length==1?l.error(i):l.error(i,a))}("Unhandled promise rejection",n)},Zlt=function(e){Dr(i4e,Mt,function(){var t,n=e.facade,r=e.value;if(f4e(e)&&(t=aH(function(){eh?sH.emit("unhandledRejection",r,n):d4e("unhandledrejection",n,r)}),e.rejection=eh||f4e(e)?2:1,t.error))throw t.value})},f4e=function(e){return e.rejection!==1&&!e.parent},est=function(e){Dr(i4e,Mt,function(){var t=e.facade;eh?sH.emit("rejectionHandled",t):d4e("rejectionhandled",t,e.value)})},G2=function(e,t,n){return function(r){e(t,r,n)}},q2=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,uH(e,!0))},cH=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw l4e("Promise can't be resolved itself");var r=c4e(t);r?o4e(function(){var o={done:!1};try{Dr(r,t,G2(cH,o,e),G2(q2,o,e))}catch(i){q2(o,i,e)}}):(e.value=t,e.state=1,uH(e,!1))}catch(o){q2({done:!1},o,e)}}};if(w8&&(A8=(nd=function(e){_C(this,A8),Qp(e),Dr(oH,this);var t=a4e(this);try{e(G2(cH,t),G2(q2,t))}catch(n){q2(t,n)}}).prototype,(oH=function(e){Klt(this,{type:td,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=z2(A8,{then:function(e,t){var n=Ylt(this),r=n.reactions,o=W2(Hbe(this,nd));return o.ok=!Yr(e)||e,o.fail=Yr(t)&&t,o.domain=eh?sH.domain:void 0,n.parent=!0,r[r.length]=o,n.state!=0&&uH(n,!1),o.promise},catch:function(e){return this.then(void 0,e)}}),t4e=function(){var e=new oH,t=a4e(e);this.promise=e,this.resolve=G2(cH,t),this.reject=G2(q2,t)},iH.f=W2=function(e){return e===nd||e===n4e?new t4e(e):Xlt(e)},Yr(IC)&&hv!==Object.prototype)){r4e=hv.then,u4e||($l(hv,"then",function(e,t){var n=this;return new nd(function(r,o){Dr(r4e,n,r,o)}).then(e,t)},{unsafe:!0}),$l(hv,"catch",A8.catch,{unsafe:!0}));try{delete hv.constructor}catch{}j2&&j2(hv,A8)}ko({global:!0,wrap:!0,forced:w8},{Promise:nd}),vC(nd,td,!1),qz(td),n4e=nv(td),ko({target:td,stat:!0,forced:w8},{reject:function(e){var t=W2(this);return Dr(t.reject,void 0,e),t.promise}}),ko({target:td,stat:!0,forced:w8},{resolve:function(e){return function(t,n){if(ri(t),uo(n)&&n.constructor===t)return n;var r=iH.f(t);return(0,r.resolve)(n),r.promise}(this,e)}}),ko({target:td,stat:!0,forced:Jlt},{all:function(e){var t=this,n=W2(t),r=n.resolve,o=n.reject,i=aH(function(){var a=Qp(t.resolve),l=[],s=0,u=1;s8(e,function(c){var d=s++,f=!1;u++,Dr(a,t,c).then(function(p){f||(f=!0,l[d]=p,--u||r(l))},o)}),--u||r(l)});return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=W2(t),r=n.reject,o=aH(function(){var i=Qp(t.resolve);s8(e,function(a){Dr(i,t,a).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}});var K2=yC.UNSUPPORTED_Y,tst=Math.min,p4e=[].push,nst=cn(/./.exec),Y2=cn(p4e),x8=cn("".slice);function fu(e){Promise.resolve().then(e)}function h4e(e,t){return sn.isElement(e)?function(n,r){var o=n.type,i=o===void 0?"":o,a=n.children,l=a===void 0?[]:a,s=ue.isVoid(r,n),u="";s||(u=l.map(function(b){return h4e(b,r)}).join(""));var c=function(b){return jbe[b]||Blt}(i),d=c(n,u,r),f="";if(f=typeof d=="string"?d:d.html||"",s||Wz.forEach(function(b){return f=b(n,f)}),typeof d=="string")return f;var p=d.prefix,m=p===void 0?"":p,v=d.suffix,g=v===void 0?"":v;return m&&(f=m+f),g&&(f+=g),f}(e,t):function(n,r){var o=n.text;if(o==null)throw new Error("Current node is not slate Text "+JSON.stringify(n));var i=o;i=function(s){return s.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(i);var a=Re.getParentsNodes(r,n).some(function(s){return Re.getNodeType(s)==="pre"});if(a||(i=i.replace(/\r\n|\r|\n/g,"<br>")),a&&(i=i.replace(/ /g," ")),i===""){var l=Re.getParentNode(null,n);if(!l||l.children.length!==0)return i;i="<br>"}return Wz.forEach(function(s){return i=s(n,i)}),i}(e,t)}function v4e(e){return"w-e-element-"+e}mz("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(o,i){var a=to(uu(this)),l=i===void 0?4294967295:i>>>0;if(l===0)return[];if(o===void 0)return[a];if(!KV(o))return Dr(t,a,o,l);for(var s,u,c,d=[],f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(o.sticky?"y":""),p=0,m=new RegExp(o.source,f+"g");(s=Dr(i8,m,a))&&!((u=m.lastIndex)>p&&(Y2(d,x8(a,p,s.index)),s.length>1&&s.index<a.length&&hz(p4e,d,Ez(s,1)),c=s[0].length,p=u,d.length>=l));)m.lastIndex===s.index&&m.lastIndex++;return p===a.length?!c&&nst(m,"")||Y2(d,""):Y2(d,x8(a,p)),d.length>l?Ez(d,0,l):d}:"0".split(void 0,0).length?function(o,i){return o===void 0&&i===0?[]:Dr(t,this,o,i)}:t,[function(o,i){var a=uu(this),l=o==null?void 0:iv(o,e);return l?Dr(l,o,a,i):Dr(r,to(a),o,i)},function(o,i){var a=ri(this),l=to(o),s=n(r,a,l,i,r!==t);if(s.done)return s.value;var u=Hbe(a,RegExp),c=a.unicode,d=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(K2?"g":"y"),f=new u(K2?"^(?:"+a.source+")":a,d),p=i===void 0?4294967295:i>>>0;if(p===0)return[];if(l.length===0)return a8(f,l)===null?[l]:[];for(var m=0,v=0,g=[];v<l.length;){f.lastIndex=K2?0:v;var b,y=a8(f,K2?x8(l,v):l);if(y===null||(b=tst(F2(f.lastIndex+(K2?v:0)),l.length))===m)v=gz(l,v,c);else{if(Y2(g,x8(l,m,v)),g.length===p)return g;for(var w=1;w<=y.length-1;w++)if(Y2(g,y[w]),g.length===p)return g;v=m=b}}return Y2(g,x8(l,m)),g}]},!!Pr(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),K2);var m4e=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},g4e=function(e,t,n){var r=Re.toDOMRange(e,t).getBoundingClientRect(),o=Re.toDOMRange(e,n).getBoundingClientRect();return m4e(r,o)&&m4e(o,r)},y4e=["span","b","strong","i","em","s","strike","u","font","sub","sup"],b4e=[],dH=[],LC={},rst=Ku.f,ost=Z6.f,ist=Ia.enforce,ast=So("match"),cf=Mt.RegExp,X2=cf.prototype,lst=Mt.SyntaxError,sst=cn(HV),ust=cn(X2.exec),PC=cn("".charAt),A4e=cn("".replace),w4e=cn("".indexOf),cst=cn("".slice),dst=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,vv=/a/g,fH=/a/g,fst=new cf(vv)!==vv,x4e=yC.MISSED_STICKY,pst=yC.UNSUPPORTED_Y,hst=ta&&(!fst||x4e||lz||sz||Pr(function(){return fH[ast]=!1,cf(vv)!=vv||cf(fH)==fH||cf(vv,"i")!="/a/i"}));if(t8("RegExp",hst)){for(var th=function(e,t){var n,r,o,i,a,l,s=ov(X2,this),u=KV(e),c=t===void 0,d=[],f=e;if(!s&&u&&c&&e.constructor===th)return e;if((u||ov(X2,e))&&(e=e.source,c&&(t="flags"in f?f.flags:sst(f))),e=e===void 0?"":to(e),t=t===void 0?"":to(t),f=e,lz&&"dotAll"in vv&&(r=!!t&&w4e(t,"s")>-1)&&(t=A4e(t,/s/g,"")),n=t,x4e&&"sticky"in vv&&(o=!!t&&w4e(t,"y")>-1)&&pst&&(t=A4e(t,/y/g,"")),sz&&(i=function(p){for(var m,v=p.length,g=0,b="",y=[],w={},x=!1,_=!1,E=0,C="";g<=v;g++){if((m=PC(p,g))==="\\")m+=PC(p,++g);else if(m==="]")x=!1;else if(!x)switch(!0){case m==="[":x=!0;break;case m==="(":ust(dst,cst(p,g+1))&&(g+=2,_=!0),b+=m,E++;continue;case(m===">"&&_):if(C===""||ni(w,C))throw new lst("Invalid capture group name");w[C]=!0,y[y.length]=[C,E],_=!1,C="";continue}_?C+=m:b+=m}return[b,y]}(e),e=i[0],d=i[1]),a=vbe(cf(e,t),s?this:X2,th),(r||o||d.length)&&(l=ist(a),r&&(l.dotAll=!0,l.raw=th(function(p){for(var m,v=p.length,g=0,b="",y=!1;g<=v;g++)(m=PC(p,g))!=="\\"?y||m!=="."?(m==="["?y=!0:m==="]"&&(y=!1),b+=m):b+="[\\s\\S]":b+=m+PC(p,++g);return b}(e),n)),o&&(l.sticky=!0),d.length&&(l.groups=d)),e!==f)try{Yu(a,"source",f===""?"(?:)":f)}catch{}return a},vst=function(e){e in th||rst(th,e,{configurable:!0,get:function(){return cf[e]},set:function(t){cf[e]=t}})},_4e=ost(cf),E4e=0;_4e.length>E4e;)vst(_4e[E4e++]);X2.constructor=th,th.prototype=X2,$l(Mt,"RegExp",th)}qz("RegExp");var mst=new RegExp("\xA0","g");function C4e(e){return e.replace(mst," ")}function S4e(e,t){var n=e.length;if(n){var r=e[n-1];if(Qt.isText(r)){var o=Object.keys(r);if(o.length===1&&o[0]==="text")return r.text=r.text+t,!0}}return!1}function gst(e,t,n){return{type:"paragraph",children:[{text:Le(e).text().replace(/\s+/gm," ")}]}}function pH(e,t){var n=function(i,a){var l=[];if(i.attr("data-w-e-is-void")!=null)return l;var s=i[0].childNodes;return s.length===1&&s[0].nodeName==="BR"?(l.push({text:""}),l):(s.forEach(function(u){if(u.nodeType!==ed.ELEMENT_NODE){if(u.nodeType===ed.TEXT_NODE){var c=u.textContent||"";if(c.trim()===""&&c.indexOf(` |
|
1007 |
`)>=0)return;c&&(c=C4e(c),S4e(l,c)||l.push({text:c}))}}else{if(u.nodeName==="BR")return void(S4e(l,` |
|
1008 |
`)||l.push({text:` |
|
1009 |
`}));var d=vH(Le(u),a);Array.isArray(d)?d.forEach(function(f){return l.push(f)}):l.push(d)}}),l)}(e,t),r=function(i){for(var a in LC)if(i[0].matches(a))return LC[a];return gst}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach(function(i){ue.isVoid(t,i)||(n.length===0&&(i.children=[{text:e.text().replace(/\s+/gm," ")}]),dH.forEach(function(a){i=a(e[0],i,t)}))}),o}function hH(e,t){e.parents("pre").length===0&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,` |
|
1010 |
`));var n=e[0].textContent||"";n=function(o){return o.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"\xAE").replace(/©/g,"\xA9").replace(/™/g,"\u2122").replace(/"/g,'"')}(n);var r={text:n=C4e(n)};return dH.forEach(function(o){r=o(e[0],r,t)}),r}function vH(e,t){b4e.forEach(function(r){var o=r.selector,i=r.preParseHtml;e[0].matches(o)&&(e=Le(i(e[0])))});var n=Bbe(e);return n==="span"?e.attr("data-w-e-type")?pH(e,t):hH(e,t):n==="code"?Bbe(e.parent())==="pre"?pH(e,t):hH(e,t):y4e.includes(n)?hH(e,t):pH(e,t)}function k4e(e,t,n){var r=Le(n);return!!r.attr(t)||(r.attr(t,"true"),e.on("destroyed",function(){r.removeAttr(t)}),!1)}function D4e(e,t){t===void 0&&(t="");var n=[];t===""&&(t="<p><br></p>"),t.indexOf("<")!==0&&(t=t.split(/\n/).map(function(o){return"<p>"+o+"</p>"}).join(""));var r=Le("<div>"+t+"</div>");return Array.from(r.children()).forEach(function(o){var i=vH(Le(o),e);Array.isArray(i)?i.forEach(function(a){return n.push(a)}):n.push(i)}),n}var yst=Ku.f,O4e=wC.fastKey,T4e=Ia.set,mH=Ia.getterFor,bst={getConstructor:function(e,t,n,r){var o=e(function(u,c){_C(u,i),T4e(u,{type:t,index:pC(null),first:void 0,last:void 0,size:0}),ta||(u.size=0),c!=null&&s8(c,u[r],{that:u,AS_ENTRIES:n})}),i=o.prototype,a=mH(t),l=function(u,c,d){var f,p,m=a(u),v=s(u,c);return v?v.value=d:(m.last=v={index:p=O4e(c,!0),key:c,value:d,previous:f=m.last,next:void 0,removed:!1},m.first||(m.first=v),f&&(f.next=v),ta?m.size++:u.size++,p!=="F"&&(m.index[p]=v)),u},s=function(u,c){var d,f=a(u),p=O4e(c);if(p!=="F")return f.index[p];for(d=f.first;d;d=d.next)if(d.key==c)return d};return z2(i,{clear:function(){for(var u=a(this),c=u.index,d=u.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete c[d.index],d=d.next;u.first=u.last=void 0,ta?u.size=0:this.size=0},delete:function(u){var c=this,d=a(c),f=s(c,u);if(f){var p=f.next,m=f.previous;delete d.index[f.index],f.removed=!0,m&&(m.next=p),p&&(p.previous=m),d.first==f&&(d.first=p),d.last==f&&(d.last=m),ta?d.size--:c.size--}return!!f},forEach:function(u){for(var c,d=a(this),f=lv(u,arguments.length>1?arguments[1]:void 0);c=c?c.next:d.first;)for(f(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(u){return!!s(this,u)}}),z2(i,n?{get:function(u){var c=s(this,u);return c&&c.value},set:function(u,c){return l(this,u===0?0:u,c)}}:{add:function(u){return l(this,u=u===0?0:u,u)}}),ta&&yst(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=mH(t),i=mH(r);rz(e,t,function(a,l){T4e(this,{type:r,target:a,state:o(a),kind:l,last:void 0})},function(){for(var a=i(this),l=a.kind,s=a.last;s&&s.removed;)s=s.previous;return a.target&&(a.last=s=s?s.next:a.state.first)?l=="keys"?{value:s.key,done:!1}:l=="values"?{value:s.value,done:!1}:{value:[s.key,s.value],done:!1}:(a.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),qz(t)}};mbe("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},bst);var M4e=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function N4e(e,t){e.isInline(t)?(e.insertNode(t),t.type==="link"&&e.insertFragment([{text:""}])):et.insertNodes(e,t,{mode:"highest"})}var Ast=function(e){var t=e,n=t.insertText;return t.insertFragment,t.setFragmentData=function(r){var o=t.selection;if(o){var i=Er(ct.edges(o),2),a=i[0],l=i[1],s=ue.void(t,{at:a.path}),u=ue.void(t,{at:l.path});if(!ct.isCollapsed(o)||s){var c=Re.toDOMRange(t,o),d=c.cloneContents(),f=d.childNodes[0];if(d.childNodes.forEach(function(_){_.textContent&&_.textContent.trim()!==""&&(f=_)}),u){var p=Er(u,1)[0],m=c.cloneRange(),v=Re.toDOMNode(t,p);m.setEndAfter(v),d=m.cloneContents()}if(s&&(f=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(function(_){var E=_.getAttribute("data-slate-zero-width")==="n";_.textContent=E?` |
|
1011 |
`:""}),Fbe(f)){var g=f.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(f),d.appendChild(g),f=g}var b=t.getFragment(),y=JSON.stringify(b),w=window.btoa(encodeURIComponent(y));f.setAttribute("data-slate-fragment",w),r.setData("application/x-slate-fragment",w);var x=d.ownerDocument.createElement("div");return x.appendChild(d),x.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(x),r.setData("text/html",x.innerHTML),r.setData("text/plain",Clt(x)),d.ownerDocument.body.removeChild(x),r}}},t.insertData=function(r){var o,i,a=r.getData("application/x-slate-fragment");if(a){var l=decodeURIComponent(window.atob(a)),s=JSON.parse(l);t.insertFragment(s)}else{var u=r.getData("text/plain"),c=r.getData("text/html");if(c)t.dangerouslyInsertHtml(c);else if(u){var d=u.split(/\r\n|\r|\n/),f=!1;try{for(var p=du(d),m=p.next();!m.done;m=p.next()){var v=m.value;f&&et.splitNodes(t,{always:!0}),n(v),f=!0}}catch(g){o={error:g}}finally{try{m&&!m.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}}}},t},_8=function(e){return e!=null},wst={object:!0,function:!0,undefined:!0},xst=/^\s*class[\s{/}]/,_st=Function.prototype.toString,F4e=function(e){return!!function(t){if(typeof t!="function"||!hasOwnProperty.call(t,"length"))return!1;try{if(typeof t.length!="number"||typeof t.call!="function"||typeof t.apply!="function")return!1}catch{return!1}return!function(n){if(!function(r){return!!_8(r)&&hasOwnProperty.call(wst,typeof r)}(n))return!1;try{return!!n.constructor&&n.constructor.prototype===n}catch{return!1}}(t)}(e)&&!xst.test(_st.call(e))},gH=function(e){return e!=null},Est=Object.keys,Cst=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(e){return Est(gH(e)?Object(e):e)},Sst=Math.max,R4e=function(){var e,t=Object.assign;return typeof t=="function"&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var n,r,o,i=Sst(arguments.length,2);for(e=Object(function(a){if(!gH(a))throw new TypeError("Cannot use null or undefined");return a}(e)),o=function(a){try{e[a]=t[a]}catch(l){n||(n=l)}},r=1;r<i;++r)Cst(t=arguments[r]).forEach(o);if(n!==void 0)throw n;return e},kst=Array.prototype.forEach,Dst=Object.create,I4e=function(e){var t=Dst(null);return kst.call(arguments,function(n){gH(n)&&function(r,o){var i;for(i in r)o[i]=r[i]}(Object(n),t)}),t},yH="razdwatrzy",Ost=String.prototype.indexOf,E8=typeof yH.contains=="function"&&yH.contains("dwa")===!0&&yH.contains("foo")===!1?String.prototype.contains:function(e){return Ost.call(this,e,arguments[1])>-1},jC=U6(function(e){var t=e.exports=function(n,r){var o,i,a,l,s;return arguments.length<2||typeof n!="string"?(l=r,r=n,n=null):l=arguments[2],_8(n)?(o=E8.call(n,"c"),i=E8.call(n,"e"),a=E8.call(n,"w")):(o=a=!0,i=!1),s={value:r,configurable:o,enumerable:i,writable:a},l?R4e(I4e(l),s):s};t.gs=function(n,r,o){var i,a,l,s;return typeof n!="string"?(l=o,o=r,r=n,n=null):l=arguments[3],_8(r)?F4e(r)?_8(o)?F4e(o)||(l=o,o=void 0):o=void 0:(l=r,r=o=void 0):r=void 0,_8(n)?(i=E8.call(n,"c"),a=E8.call(n,"e")):(i=!0,a=!1),s={get:r,set:o,configurable:i,enumerable:a},l?R4e(I4e(l),s):s}}),bH=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},Tst=U6(function(e,t){var n,r,o,i,a,l,s,u=Function.prototype.apply,c=Function.prototype.call,d=Object.create,f=Object.defineProperty,p=Object.defineProperties,m=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};n=function(g,b){var y;return bH(b),m.call(this,"__ee__")?y=this.__ee__:(y=v.value=d(null),f(this,"__ee__",v),v.value=null),y[g]?typeof y[g]=="object"?y[g].push(b):y[g]=[y[g],b]:y[g]=b,this},r=function(g,b){var y,w;return bH(b),w=this,n.call(this,g,y=function(){o.call(w,g,y),u.call(b,this,arguments)}),y.__eeOnceListener__=b,this},o=function(g,b){var y,w,x,_;if(bH(b),!m.call(this,"__ee__"))return this;if(!(y=this.__ee__)[g])return this;if(typeof(w=y[g])=="object")for(_=0;x=w[_];++_)x!==b&&x.__eeOnceListener__!==b||(w.length===2?y[g]=w[_?0:1]:w.splice(_,1));else w!==b&&w.__eeOnceListener__!==b||delete y[g];return this},i=function(g){var b,y,w,x,_;if(m.call(this,"__ee__")&&(x=this.__ee__[g]))if(typeof x=="object"){for(y=arguments.length,_=new Array(y-1),b=1;b<y;++b)_[b-1]=arguments[b];for(x=x.slice(),b=0;w=x[b];++b)u.call(w,this,_)}else switch(arguments.length){case 1:c.call(x,this);break;case 2:c.call(x,this,arguments[1]);break;case 3:c.call(x,this,arguments[1],arguments[2]);break;default:for(y=arguments.length,_=new Array(y-1),b=1;b<y;++b)_[b-1]=arguments[b];u.call(x,this,_)}},a={on:n,once:r,off:o,emit:i},l={on:jC(n),once:jC(r),off:jC(o),emit:jC(i)},s=p({},l),e.exports=t=function(g){return g==null?d(s):p(Object(g),l)},t.methods=a});function VC(e){var t=Tbe.get(e);return t==null&&(t=Tst(),Tbe.set(e,t)),t}var zC=new WeakMap;function B4e(e,t){var n=zC.get(e);n==null&&(n=new Set,zC.set(e,n)),n.add(t)}function AH(e){var t=Re.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function wH(e){var t={top:"0",left:"0"},n=e.selection;if(n==null)return t;var r=AH(e);if(r==null)return t;var o=r.top,i=r.left,a=r.width,l=r.height,s=Re.toDOMRange(e,n).getClientRects()[0];if(s==null)return t;s.width;var u=s.height,c={},d=s.top-o,f=s.left-i;if(f>a/2){var p=a-f;c.right=p+5+"px"}else c.left=f+5+"px";if(d>l/2){var m=l-d;c.bottom=m+5+"px"}else{var v=d+u;v<0&&(v=0),c.top=v+5+"px"}return c}function xH(e,t,n){n===void 0&&(n="modal");var r={top:"0",left:"0"};if(e.selection==null)return r;var o=sn.isElement(t)&&e.isVoid(t),i=sn.isElement(t)&&e.isInline(t),a=NC.get(t);if(a==null)return r;var l=a.getBoundingClientRect(),s=l.top,u=l.left,c=l.height,d=l.width;if(o){var f=function(C){var T=[];T.push(C);for(var k=0;T.length>0;){var I=T.pop();if(I==null||++k>1e4)break;var O=I.nodeName;if(I.nodeType===1){var F=O.toLowerCase();if(_lt.includes(F)||F==="iframe"||F==="video")return I;var N=I.children||[],B=N.length;if(B)for(var L=B-1;L>=0;L--)T.push(N[L])}}return null}(a);if(f!=null){var p=f.getBoundingClientRect();s=p.top,c=p.height}}var m=AH(e);if(m==null)return r;var v,g=m.top,b=m.left,y=m.width,w=m.height,x={},_=s-g,E=u-b;if(n==="bar")return x.left=E+"px",_>40?x.bottom=w-_+5+"px":x.top=_+c+5+"px",x;if(n==="modal")return o?i?E>(y-d)/2?x.right=y-E+5+"px":x.left=E+d+5+"px":x.left="20px":x.left=E+"px",o?((v=_)<0&&(v=0),x.top=v+"px"):_>(w-c)/2?x.bottom=w-_+5+"px":((v=_+c)<0&&(v=0),x.top=v+5+"px"),x;throw new Error("type '"+n+"' is invalid")}function _H(e,t){fu(function(){var n=AH(e);if(n!=null){var r,o=n.top,i=n.left,a=n.width,l=n.height,s=t.offset(),u=s.top,c=s.left,d=t.width(),f=t.height(),p=u-o,m=c-i,v=t.attr("style");if(v.indexOf("top")>=0&&(r=p+f-l)>0){var g=t.css("top"),b=parseInt(g.toString())-r;b<0&&(b=0),t.css("top",b+"px")}if(v.indexOf("bottom")>=0&&u<0){var y=t.css("bottom"),w=parseInt(y.toString())-Math.abs(u);t.css("bottom",w+"px")}if(v.indexOf("left")>=0&&(r=m+d-a)>0){var x=t.css("left"),_=parseInt(x.toString())-r;_<0&&(_=0),t.css("left",_+"px")}if(v.indexOf("right")>=0&&c<0){var E=t.css("right"),C=parseInt(E.toString())-Math.abs(c);t.css("right",C+"px")}}})}var Mst=gC("slice"),Nst=So("species"),EH=Mt.Array,Fst=Math.max;ko({target:"Array",proto:!0,forced:!Mst},{slice:function(e,t){var n,r,o,i=Zp(this),a=sv(i),l=I2(e,a),s=I2(t===void 0?a:t,a);if(sC(i)&&(n=i.constructor,(uC(n)&&(n===EH||sC(n.prototype))||uo(n)&&(n=n[Nst])===null)&&(n=void 0),n===EH||n===void 0))return $be(i,l,s);for(r=new(n===void 0?EH:n)(Fst(s-l,0)),o=0;l<s;l++,o++)l in i&&r8(r,o,i[l]);return r.length=o,r}});var Rst=J6.f,L4e=cn("".startsWith),Ist=cn("".slice),Bst=Math.min,P4e=XV("startsWith"),Lst=!P4e&&!!function(){var e=Rst(String.prototype,"startsWith");return e&&!e.writable}();ko({target:"String",proto:!0,forced:!Lst&&!P4e},{startsWith:function(e){var t=to(uu(this));YV(e);var n=F2(Bst(arguments.length>1?arguments[1]:void 0,t.length)),r=to(e);return L4e?L4e(t,r,n):Ist(t,n,n+r.length)===r}});var Q2=Object.assign,j4e=Object.defineProperty,Pst=cn([].concat),V4e=!Q2||Pr(function(){if(ta&&Q2({b:1},Q2(j4e({},"a",{enumerable:!0,get:function(){j4e(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(o){t[o]=o}),Q2({},e)[n]!=7||B2(Q2({},t)).join("")!=r})?function(e,t){for(var n=Xp(e),r=arguments.length,o=1,i=I3e.f,a=O3e.f;r>o;)for(var l,s=lC(arguments[o++]),u=i?Pst(B2(s),i(s)):B2(s),c=u.length,d=0;c>d;)l=u[d++],ta&&!Dr(a,s,l)||(n[l]=s[l]);return n}:Q2;ko({target:"Object",stat:!0,forced:Object.assign!==V4e},{assign:V4e});var jst=["props","attrs","style","dataset","on","hook"];function z4e(e){var t=e.data,n=t===void 0?{}:t,r=e.children,o=r===void 0?[]:r;Object.keys(n).forEach(function(i){var a,l,s=n[i];if(i!=="key"){if(!jst.includes(i)){if(i.startsWith("data-")){var u=i.slice(5);return u=wrt(u),function(c,d){c.data==null&&(c.data={});var f=c.data;f.dataset==null&&(f.dataset={}),Object.assign(f.dataset,d)}(e,((a={})[u]=s,a)),void delete n[i]}(function(c,d){c.data==null&&(c.data={});var f=c.data;f.props==null&&(f.props={}),Object.assign(f.props,d)})(e,(l={},l[i]=s,l)),delete n[i]}}else e.key=s}),o.length>0&&o.forEach(function(i){typeof i!="string"&&z4e(i)})}var CH=[],H4e={};function Vst(e,t,n){return Mn(n.isInline(e)?"span":"div",null,t)}function $4e(e,t){return t===void 0&&(t=!1),Mn("span",{"data-slate-string":!0},t?e+` |
|
1012 |
`:e)}function SH(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),Mn("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\uFEFF",t?Mn("br",null):null)}function kH(e,t,n,r){return d8.set(e,t),H2.set(e,n),sn.isElement(e)?function(o,i){var a,l=Re.findKey(i,o),s=i.isInline(o),u=ue.isVoid(i,o),c=v4e(l.id),d={id:c,key:l.id,"data-slate-node":"element","data-slate-inline":s},f=o.type,p=o.children,m=p===void 0?[]:p,v=function(_){return H4e[_]||Vst}(f);a=u?null:m.map(function(_,E){return kH(_,E,o,i)});var g=v(o,a,i);if(u){d["data-slate-void"]=!0;var b=s?"span":"div",y=Er(Pt.texts(o),1),w=Er(y[0],1)[0],x=Mn(b,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},kH(w,0,o,i));g=Mn(b,{style:{position:"relative"}},g,x),d8.set(w,0),H2.set(w,o)}return g.data==null&&(g.data={}),Object.assign(g.data,d),u||s||(g=function(_,E){var C=E;return CH.forEach(function(T){C=T(_,E)}),C}(o,g)),fu(function(){var _=Vz(c);_!=null&&(Bz.set(l,_),NC.set(o,_),MC.set(_,o))}),g}(e,r):function(o,i,a){if(o.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(o));var l=Re.findKey(a,o),s=a.getConfig().decorate;if(s==null)throw new Error("Can not get config.decorate");var u=Re.findPath(a,o),c=s([o,u]),d=Qt.decorations(o,c),f=d.map(function(v,g){var b=function(y,w,x,_,E){w===void 0&&(w=!1);var C=y.text,T=Re.findPath(E,x),k=Ke.parent(T);if(ue.isEditor(_))throw new Error("Text node "+JSON.stringify(x)+" parent is Editor");return E.isVoid(_)?SH(Pt.string(_).length):C!==""||_.children[_.children.length-1]!==x||E.isInline(_)||ue.string(E,k)!==""?C===""?SH():w&&C.slice(-1)===` |
|
1013 |
`?$4e(C,!0):$4e(C):SH(0,!0)}(v,g===d.length-1,o,i,a);return b=function(y,w){var x=w;return CH.forEach(function(_){x=_(y,x)}),x}(v,b),Mn("span",{"data-slate-leaf":!0},b)}),p=function(v){return"w-e-text-"+v}(l.id),m=Mn("span",{"data-slate-node":"text",id:p,key:l.id},f);return fu(function(){var v=Vz(p);v!=null&&(Bz.set(l,v),NC.set(o,v),MC.set(v,o))}),m}(e,n,r)}function zst(e,t){var n,r=e.$scroll,o=function(v){return"w-e-textarea-"+v}(e.id),i=t.getConfig(),a=i.readOnly,l=i.autoFocus,s=function(v,g){return g===void 0&&(g=!1),S2("div#"+v,{props:{contentEditable:!g}})}(o,a),u=t.children||[];s.children=u.map(function(v,g){var b=kH(v,g,t,t);return z4e(b),b});var c=Sbe.get(e);if(c==null&&(c=!0),c){var d=function(v){return Le(`<div |
|
1014 |
id="`+v+`" |
|
1015 |
data-slate-editor |
|
1016 |
data-slate-node="value" |
|
1017 |
suppressContentEditableWarning |
|
1018 |
role="textarea" |
|
1019 |
spellCheck="true" |
|
1020 |
autoCorrect="true" |
|
1021 |
autoCapitalize="true" |
|
1022 |
></div>`)}(o);r.append(d),e.$textArea=d,n=d[0],(p=Knt([Xnt,ert,nrt,Qnt,Znt,Ynt]))(n,s),Sbe.set(e,!1),kbe.set(e,p)}else{var f=Dbe.get(e),p=kbe.get(e);if(f==null||p==null)return;n=f.elm,p(f,s)}if(n!=null||(n=Vz(o))!=null){if((c?l:t.isFocused())&&n.focus({preventScroll:!0}),c){var m=jz(n);m&&Obe.set(t,m)}Iz.set(t,n),NC.set(t,n),MC.set(n,t),Dbe.set(e,s)}}function U4e(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function W4e(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function DH(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return W4e(n.overflowY,t)||W4e(n.overflowX,t)||function(r){var o=function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)}(e)}return!1}function HC(e,t,n,r,o,i,a,l){return i<e&&a>t||i>e&&a<t?0:i<=e&&l<=n||a>=t&&l>=n?i-e-r:a>t&&l<n||i<e&&l>n?a-t+o:0}function G4e(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(J){return J!==a};if(!U4e(e))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,c=[],d=e;U4e(d)&&s(d);){if((d=d.parentElement)===u){c.push(d);break}d!=null&&d===document.body&&DH(d)&&!DH(document.documentElement)||d!=null&&DH(d,l)&&c.push(d)}for(var f=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),b=g.height,y=g.width,w=g.top,x=g.right,_=g.bottom,E=g.left,C=o==="start"||o==="nearest"?w:o==="end"?_:w+b/2,T=i==="center"?E+y/2:i==="end"?x:E,k=[],I=0;I<c.length;I++){var O=c[I],F=O.getBoundingClientRect(),N=F.height,B=F.width,L=F.top,V=F.right,P=F.bottom,H=F.left;if(r==="if-needed"&&w>=0&&E>=0&&_<=p&&x<=f&&w>=L&&_<=P&&E>=H&&x<=V)return k;var U=getComputedStyle(O),G=parseInt(U.borderLeftWidth,10),z=parseInt(U.borderTopWidth,10),$=parseInt(U.borderRightWidth,10),W=parseInt(U.borderBottomWidth,10),K=0,X=0,te="offsetWidth"in O?O.offsetWidth-O.clientWidth-G-$:0,ne="offsetHeight"in O?O.offsetHeight-O.clientHeight-z-W:0;if(u===O)K=o==="start"?C:o==="end"?C-p:o==="nearest"?HC(v,v+p,p,z,W,v+C,v+C+b,b):C-p/2,X=i==="start"?T:i==="center"?T-f/2:i==="end"?T-f:HC(m,m+f,f,G,$,m+T,m+T+y,y),K=Math.max(0,K+v),X=Math.max(0,X+m);else{K=o==="start"?C-L-z:o==="end"?C-P+W+ne:o==="nearest"?HC(L,P,N,z,W+ne,C,C+b,b):C-(L+N/2)+ne/2,X=i==="start"?T-H-G:i==="center"?T-(H+B/2)+te/2:i==="end"?T-V+$+te:HC(H,V,B,G,$+te,T,T+y,y);var se=O.scrollLeft,le=O.scrollTop;C+=le-(K=Math.max(0,Math.min(le+K,O.scrollHeight-N+ne))),T+=se-(X=Math.max(0,Math.min(se+X,O.scrollWidth-B+te)))}k.push({el:O,top:K,left:X})}return k}function q4e(e){return e===Object(e)&&Object.keys(e).length!==0}function pu(e,t){return fv(t)&&Re.hasDOMNode(e,t,{editable:!0})}function K4e(e,t){if(e.getConfig().readOnly)return!1;var n=J2(e,t)&&Re.toSlateNode(e,t);return ue.isVoid(e,n)}function J2(e,t){return fv(t)&&Re.hasDOMNode(e,t)}function Y4e(e,t,n){n===void 0&&(n=!1);var r=t.selection,o=t.getConfig(),i=Re.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a=i.type!=="None";if(r||a){var l=Iz.get(t),s=!1;if(l.contains(i.anchorNode)&&l.contains(i.focusNode)&&(s=!0),a&&s&&r){var u=Re.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(u&&ct.equals(u,r)){var c=!0;if(ct.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===l){var p=l.childNodes,m=void 0;(m=p[f])&&m.matches("table")&&(c=!1),(m=p[f-1])&&m.matches("table")&&(c=!1)}}if(c)return}}if(!r||Re.hasRange(t,r)){e.isUpdatingSelection=!0;var v=r&&Re.toDOMRange(t,r);if(v){ct.isBackward(r)?i.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):i.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var g=v.startContainer.parentElement;if(!g.closest("[data-slate-spacer]")){g.getBoundingClientRect=v.getBoundingClientRect.bind(v);var b=document.body;(function(y,w){var x=!y.ownerDocument.documentElement.contains(y);if(q4e(w)&&typeof w.behavior=="function")return w.behavior(x?[]:G4e(y,w));if(!x){var _=function(E){return E===!1?{block:"end",inline:"nearest"}:q4e(E)?E:{block:"start",inline:"nearest"}}(w);(function(E,C){C===void 0&&(C="auto");var T="scrollBehavior"in document.body.style;E.forEach(function(k){var I=k.el,O=k.top,F=k.left;I.scroll&&T?I.scroll({top:O,left:F,behavior:C}):(I.scrollTop=O,I.scrollLeft=F)})})(G4e(y,_),_.behavior)}})(g,{scrollMode:"if-needed",boundary:o.scroll?l.parentElement:b,block:"end",behavior:"smooth"}),delete g.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){v&&f8&&l.focus(),e.isUpdatingSelection=!1})}else t.selection=Re.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var OH=new WeakMap,X4e=new WeakMap,Hst={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},$st={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Ust={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},go=function(e){var t=Hst[e],n=$st[e],r=Ust[e],o=t&&eV(t),i=n&&eV(n),a=r&&eV(r);return function(l){return!(!o||!o(l))||!!(zz&&i&&i(l))||!(zz||!a||!a(l))}},Do={isBold:go("bold"),isCompose:go("compose"),isMoveBackward:go("moveBackward"),isMoveForward:go("moveForward"),isDeleteBackward:go("deleteBackward"),isDeleteForward:go("deleteForward"),isDeleteLineBackward:go("deleteLineBackward"),isDeleteLineForward:go("deleteLineForward"),isDeleteWordBackward:go("deleteWordBackward"),isDeleteWordForward:go("deleteWordForward"),isExtendBackward:go("extendBackward"),isExtendForward:go("extendForward"),isExtendLineBackward:go("extendLineBackward"),isExtendLineForward:go("extendLineForward"),isItalic:go("italic"),isMoveLineBackward:go("moveLineBackward"),isMoveLineForward:go("moveLineForward"),isMoveWordBackward:go("moveWordBackward"),isMoveWordForward:go("moveWordForward"),isRedo:go("redo"),isSplitBlock:go("splitBlock"),isTransposeCharacter:go("transposeCharacter"),isUndo:go("undo"),isTab:go("tab"),isSelectAll:go("selectAll")};function wi(e){e.preventDefault()}var Wst={beforeinput:function(e,t,n){var r=e,o=n.getConfig().readOnly;if(h8&&!o&&pu(n,r.target)){var i=n.selection,a=r.inputType,l=r.dataTransfer||r.data||void 0;if(a!=="insertCompositionText"&&a!=="deleteCompositionText"){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var s=Er(r.getTargetRanges(),1)[0];if(s){var u=Re.toSlateRange(n,s,{exactMatch:!1,suppressThrow:!1});i&&ct.equals(i,u)||et.select(n,u)}}if(i&&ct.isExpanded(i)&&a.startsWith("delete")){var c=a.endsWith("Backward")?"backward":"forward";ue.deleteFragment(n,{direction:c})}else switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":ue.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":ue.deleteForward(n);break;case"deleteContentBackward":ue.deleteBackward(n);break;case"deleteEntireSoftLine":ue.deleteBackward(n,{unit:"line"}),ue.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":ue.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":ue.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":ue.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":ue.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":ue.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":ue.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":ue.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(a==="insertFromPaste"&&!Pz.get(n))break;l instanceof DataTransfer?n.insertData(l):typeof l=="string"&&ue.insertText(n,l)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&pu(n,r.target)){var a=Re.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var l=r.relatedTarget;if(!(l===Re.toDOMNode(n,n)||Qu(l)&&l.hasAttribute("data-slate-spacer"))){if(l!=null&&fv(l)&&Re.hasDOMNode(n,l)){var s=Re.toSlateNode(n,l);if(sn.isElement(s)&&!n.isVoid(s))return}if(p8){var u=a.getSelection();u==null||u.removeAllRanges()}dv.delete(n)}}}},focus:function(e,t,n){var r=Re.toDOMNode(n,n),o=Re.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,f8&&e.target!==r?r.focus():dv.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&J2(n,e.target)&&fv(e.target)){var r=Re.toSlateNode(n,e.target),o=Re.findPath(n,r);if(ue.hasPath(n,o)&&Pt.get(n,o)===r){var i=ue.start(n,o),a=ue.end(n,o),l=ue.void(n,{at:i}),s=ue.void(n,{at:a});if(l&&s&&Ke.equals(l[1],s[1])){var u=ue.range(n,i);et.select(n,u)}}}},compositionstart:function(e,t,n){if(pu(n,e.target)){var r=n.selection;if(r&&ct.isExpanded(r)&&(ue.deleteFragment(n),Promise.resolve().then(function(){Y4e(t,n,!0)})),r&&ct.isCollapsed(r)){var o=Re.toDOMRange(n,r).startContainer,i=o.textContent||"";OH.set(n,i),X4e.set(n,o)}t.isComposing=!0,function(a,l){var s;l.getConfig().placeholder&&l.isEmpty()&&a.showPlaceholder&&((s=a.$placeholder)===null||s===void 0||s.hide(),a.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(pu(n,r.target)){t.isComposing=!1;var o=n.selection;if(o!=null){(Hz||f8)&&Re.cleanExposedTexNodeInSelectionBlock(n);for(var i=ct.isBackward(o)?o.focus:o.anchor,a=Er(ue.node(n,[i.path[0]]),1)[0],l=0;l<i.path.length;l++){var s=Er(ue.node(n,i.path.slice(0,l+1)),1)[0];if(sn.isElement(s)&&((p8||f8)&&s.type==="link"||s.type==="code")){Re.setNewKey(a);break}}var u=r.data;if(u){if(n.getConfig().maxLength){var c=Re.getLeftLengthOfMaxLength(n);c<u.length?(Re.toDOMRange(n,o).startContainer.textContent=OH.get(n)||"",c>0&&ue.insertText(n,u.slice(0,c)),t.changeViewState()):ue.insertText(n,u)}else ue.insertText(n,u);p8||setTimeout(function(){var d=n.selection;if(d!=null){var f=X4e.get(n);f!=null&&Re.toDOMRange(n,d).startContainer!==f&&(f.textContent=OH.get(n)||"")}})}}}},compositionupdate:function(e,t,n){pu(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&pu(n,r.target)){if(function(a,l){var s=DC.get(a),u=s&&s.getMenus(),c=OC.get(a),d=c&&c.getMenus(),f=cu(cu({},u),d);for(var p in f){var m=f[p],v=m.hotkey;if(v&&Ert(v,l)&&!m.isDisabled(a)){var g=m.getValue(a);m.exec(a,g)}}}(n,r),Do.isTab(r))return wi(r),void n.handleTab();if(Do.isRedo(r))return wi(r),void(typeof n.redo=="function"&&n.redo());if(Do.isUndo(r))return wi(r),void(typeof n.undo=="function"&&n.undo());if(Do.isMoveLineBackward(r))return wi(r),void et.move(n,{unit:"line",reverse:!0});if(Do.isMoveLineForward(r))return wi(r),void et.move(n,{unit:"line"});if(Do.isExtendLineBackward(r))return wi(r),void et.move(n,{unit:"line",edge:"focus",reverse:!0});if(Do.isExtendLineForward(r))return wi(r),void et.move(n,{unit:"line",edge:"focus"});if(Do.isMoveBackward(r))return wi(r),void(o&&ct.isCollapsed(o)?et.move(n,{reverse:!0}):et.collapse(n,{edge:"start"}));if(Do.isMoveForward(r))return wi(r),void(o&&ct.isCollapsed(o)?et.move(n):et.collapse(n,{edge:"end"}));if(Do.isMoveWordBackward(r))return wi(r),o&&ct.isExpanded(o)&&et.collapse(n,{edge:"focus"}),void et.move(n,{unit:"word",reverse:!0});if(Do.isMoveWordForward(r))return wi(r),o&&ct.isExpanded(o)&&et.collapse(n,{edge:"focus"}),void et.move(n,{unit:"word"});if(Do.isSelectAll(r))return wi(r),void n.selectAll();if(h8){if((Hz||p8)&&o&&(Do.isDeleteBackward(r)||Do.isDeleteForward(r))&&ct.isCollapsed(o)){var i=Pt.parent(n,o.anchor.path);if(sn.isElement(i)&&ue.isVoid(n,i)&&ue.isInline(n,i))return r.preventDefault(),void et.delete(n,{unit:"block"})}}else{if(Do.isBold(r)||Do.isItalic(r)||Do.isTransposeCharacter(r))return void wi(r);if(Do.isSplitBlock(r))return wi(r),void ue.insertBreak(n);if(Do.isDeleteBackward(r))return wi(r),void(o&&ct.isExpanded(o)?ue.deleteFragment(n,{direction:"backward"}):ue.deleteBackward(n));if(Do.isDeleteForward(r))return wi(r),void(o&&ct.isExpanded(o)?ue.deleteFragment(n,{direction:"forward"}):ue.deleteForward(n));if(Do.isDeleteLineBackward(r))return wi(r),void(o&&ct.isExpanded(o)?ue.deleteFragment(n,{direction:"backward"}):ue.deleteBackward(n,{unit:"line"}));if(Do.isDeleteLineForward(r))return wi(r),void(o&&ct.isExpanded(o)?ue.deleteFragment(n,{direction:"forward"}):ue.deleteForward(n,{unit:"line"}));if(Do.isDeleteWordBackward(r))return wi(r),void(o&&ct.isExpanded(o)?ue.deleteFragment(n,{direction:"backward"}):ue.deleteBackward(n,{unit:"word"}));if(Do.isDeleteWordForward(r))return wi(r),void(o&&ct.isExpanded(o)?ue.deleteFragment(n,{direction:"forward"}):ue.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!h8&&!n.getConfig().readOnly&&pu(n,e.target)){e.preventDefault();var r=e.key;ue.insertText(n,r)}},copy:function(e,t,n){var r=e;if(pu(n,r.target)){r.preventDefault();var o=r.clipboardData;o!=null&&n.setFragmentData(o)}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&pu(n,r.target)){r.preventDefault();var i=r.clipboardData;if(i!=null&&(n.setFragmentData(i),o))if(ct.isExpanded(o))ue.deleteFragment(n);else{var a=Pt.parent(n,o.anchor.path);ue.isVoid(n,a)&&et.delete(n)}}},paste:function(e,t,n){Pz.set(n,!0);var r=e;if(!n.getConfig().readOnly&&pu(n,r.target)){var o=n.getConfig().customPaste;if(o&&o(n,r)===!1)return void Pz.set(n,!1);if(!h8||function(a){return a.clipboardData&&a.clipboardData.getData("text/plain")!==""&&a.clipboardData.types.length===1}(r)){r.preventDefault();var i=r.clipboardData;i!=null&&n.insertData(i)}}},dragover:function(e,t,n){if(J2(n,e.target)){var r=Re.toSlateNode(n,e.target);ue.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(J2(n,r.target)&&!n.getConfig().readOnly){var o=Re.toSlateNode(n,r.target),i=Re.findPath(n,o);if(ue.isVoid(n,o)||ue.void(n,{at:i,voids:!0})){var a=ue.range(n,i);et.select(n,a)}var l=r.dataTransfer;l!=null&&(t.isDraggingInternally=!0,n.setFragmentData(l))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&J2(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&J2(n,r.target)&&o!=null&&!(h8&&p8&&o.files.length>0)){r.preventDefault();var i=n.selection,a=Re.findEventRange(n,r);et.select(n,a),t.isDraggingInternally&&(i&&et.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}},Gst=1,qst=function(){function e(t){var n=this;this.id=Gst++,this.$textArea=null,this.$progressBar=Le('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=Le('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=Y1(function(){var a=n.editorInstance;(function(l,s){var u=l.isComposing,c=l.isUpdatingSelection,d=l.isDraggingInternally;if(!(s.getConfig().readOnly||u||c||d)){var f=Re.findDocumentOrShadowRoot(s),p=f.activeElement,m=Re.toDOMNode(s,s),v=f.getSelection();if(p===m?(l.latestElement=p,dv.set(s,!0)):dv.delete(s),!v)return et.deselect(s);var g=v.anchorNode,b=v.focusNode,y=pu(s,g)||K4e(s,g),w=pu(s,b)||K4e(s,b);if(y&&w){var x=Re.toSlateRange(s,v,{exactMatch:!1,suppressThrow:!1});et.select(s,x)}else et.deselect(s)}})(n,a)},100);var r=Le(t);if(r.length===0)throw new Error("Cannot find textarea DOM by selector '"+t+"'");this.$box=r;var o=Le('<div class="w-e-text-container"></div>');o.append(this.$progressBar),o.append(this.$maxLengthInfo),r.append(o);var i=Le('<div class="w-e-scroll"></div>');o.append(i),this.$scroll=i,this.$textAreaContainer=o,fu(function(){var a=n.editorInstance,l=Re.getWindow(a);l.document.addEventListener("selectionchange",n.onDOMSelectionChange),a.on("destroyed",function(){l.document.removeEventListener("selectionchange",n.onDOMSelectionChange)}),o.on("click",function(){return a.hidePanelOrModal()}),a.on("change",n.changeViewState.bind(n));var s=a.getConfig().onChange;s&&a.on("change",function(){return s(a)}),n.onFocusAndOnBlur(),a.on("change",n.changeMaxLengthInfo.bind(n)),n.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=Tz.get(this);if(t==null)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var t=this,n=this.$textArea,r=this.$scroll,o=this.editorInstance;n!=null&&(Hj(Wst,function(i,a){n.on(a,function(l){i(l,t,o)})}),o.getConfig().scroll&&(r.css("overflow-y","auto"),r.on("scroll",Y1(function(){o.emit("scroll")},100))))},e.prototype.onFocusAndOnBlur=function(){var t=this,n=this.editorInstance,r=n.getConfig(),o=r.onBlur,i=r.onFocus;this.latestEditorSelection=n.selection,n.on("change",function(){t.latestEditorSelection==null&&n.selection!=null?setTimeout(function(){return i&&i(n)}):t.latestEditorSelection!=null&&n.selection==null&&setTimeout(function(){return o&&o(n)}),t.latestEditorSelection=n.selection})},e.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,n=t.getConfig().maxLength;if(n){var r=n-Re.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML=r+"/"+n}},e.prototype.changeProgress=function(t){var n=this.$progressBar;n.css("width",t+"%"),t>=100&&setTimeout(function(){n.hide(),n.css("width","0"),n.show()},1e3)},e.prototype.changeViewState=function(){var t=this,n=this.editorInstance;zst(this,n),function(r,o){var i,a=o.getConfig().placeholder;if(a){var l=o.isEmpty();if(l&&!r.showPlaceholder&&!r.isComposing){if(r.$placeholder==null){var s=Le('<div class="w-e-text-placeholder">'+a+"</div>");r.$textAreaContainer.append(s),r.$placeholder=s}return r.$placeholder.show(),void(r.showPlaceholder=!0)}!l&&r.showPlaceholder&&((i=r.$placeholder)===null||i===void 0||i.hide(),r.showPlaceholder=!1)}}(this,n),fu(function(){Y4e(t,n)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function TH(e){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&TH(t)}function MH(){return Le('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function Q4e(){return Le('<div class="w-e-bar-divider"></div>')}function J4e(e,t,n,r,o){if(o===void 0&&(o=!1),t){if(r){var i=zz?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?n+` |
|
1023 |
`+r:n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}mz("match",function(e,t,n){return[function(r){var o=uu(this),i=r==null?void 0:iv(r,e);return i?Dr(i,r,o):new RegExp(r)[e](to(o))},function(r){var o=ri(this),i=to(r),a=n(t,o,i);if(a.done)return a.value;if(!o.global)return a8(o,i);var l=o.unicode;o.lastIndex=0;for(var s,u=[],c=0;(s=a8(o,i))!==null;){var d=to(s[0]);u[c]=d,d===""&&(o.lastIndex=gz(i,F2(o.lastIndex),l)),c++}return c===0?null:u}]});var NH=function(){function e(t,n,r){var o=this;r===void 0&&(r=!1),this.$elem=Le('<div class="w-e-bar-item"></div>'),this.$button=Le('<button type="button"></button>'),this.disabled=!1,this.menu=n;var i=n.tag,a=n.width;if(i!=="button")throw new Error("Invalid tag '"+i+"', expected 'button'");var l=n.title,s=n.hotkey,u=s===void 0?"":s,c=n.iconSvg,d=c===void 0?"":c,f=this.$button;if(d){var p=Le(d);TH(p),f.append(p)}else f.text(l);J4e(f,d,l,u,r),r&&d&&f.append(Le('<span class="title">'+l+"</span>")),a&&f.css("width",a+"px"),f.attr("data-menu-key",t),this.$elem.append(f),fu(function(){return o.init()})}return e.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(n){n.preventDefault(),Os(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},e.prototype.exec=function(){var t=Os(this),n=this.menu,r=n.getValue(t);n.exec(t,r)},e.prototype.setActive=function(){var t=Os(this),n=this.$button,r="active";this.menu.isActive(t)?n.addClass(r):n.removeClass(r)},e.prototype.setDisabled=function(){var t=Os(this),n=this.$button,r=this.menu.isDisabled(t);(t.selection==null||t.isDisabled())&&(r=!0),this.menu.alwaysEnable&&(r=!1);var o="disabled";r?n.addClass(o):n.removeClass(o),this.disabled=r},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),Kst=function(e){function t(n,r,o){return o===void 0&&(o=!1),e.call(this,n,r,o)||this}return V2(t,e),t.prototype.onButtonClick=function(){},t}(NH),FH=function(){function e(t){this.isShow=!1,this.showTime=0,this.record(t)}return e.prototype.record=function(t){var n=Rz.get(t);n==null&&(n=new Set,Rz.set(t,n)),n.add(this),TC.set(this,t)},e.prototype.renderContent=function(t){var n=this.$elem;n.empty(),n.append(t);var r=this.genSelfElem();r&&n.append(r)},e.prototype.appendTo=function(t){var n=this.$elem;t.append(n)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=TC.get(this);t&&t.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=TC.get(this);t&&t.emit("modalOrPanelHide")}},e}(),Yst=function(e){function t(n){var r=e.call(this,n)||this;return r.type="dropPanel",r.$elem=Le('<div class="w-e-drop-panel"></div>'),r}return V2(t,e),t.prototype.genSelfElem=function(){return null},t}(FH),Xst=function(e){function t(n,r,o){o===void 0&&(o=!1);var i=e.call(this,n,r,o)||this;if(i.dropPanel=null,i.menu=r,r.showDropPanel){var a=MH();i.$button.append(a)}return i}return V2(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var n=this.menu;if(n.getPanelContentElem!=null){var r=Os(this);if(this.dropPanel==null){var o=new Yst(r),i=n.getPanelContentElem(r);o.renderContent(i),o.appendTo(this.$elem),o.show(),this.dropPanel=o}else{var a=this.dropPanel;a.isShow?a.hide():(i=n.getPanelContentElem(r),a.renderContent(i),a.show())}var l=this.dropPanel;if(l.isShow){var s=this.$elem,u=s.offset().left,c=s.parents(".w-e-bar");u-c.offset().left>=c.width()/2?l.$elem.css({left:"none",right:"0"}):l.$elem.css({left:"0",right:"none"})}}},t}(NH),Qst=function(e){function t(n,r){r===void 0&&(r=0);var o=e.call(this,n)||this;o.type="modal",o.$elem=Le('<div class="w-e-modal"></div>'),o.width=0,r&&(o.width=r);var i=o.$elem;return i.on("click",function(a){return a.stopPropagation()}),i.on("keyup",function(a){a.code==="Escape"&&(o.hide(),n.restoreSelection())}),o}return V2(t,e),t.prototype.genSelfElem=function(){var n=this,r=Le('<span class="btn-close"><svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg></span>'),o=TC.get(this);return r.on("click",function(){n.hide(),o==null||o.restoreSelection()}),r},t.prototype.setStyle=function(n){var r=this.width,o=this.$elem;o.attr("style",""),r&&o.css("width",r+"px"),o.css(n)},t}(FH);function Ds(e,t,n){var r=Le('<label class="babel-container"></label>');r.append("<span>"+e+"</span>");var o=Le('<input type="text" id="'+t+'" placeholder="'+(n||"")+'">');return r.append(o),[r[0],o[0]]}function Z2(e,t){var n=Le('<div class="button-container"></div>'),r=Le('<button type="button" id="'+e+'">'+t+"</button>");return n.append(r),[n[0],r[0]]}var Jst=function(e){function t(n,r,o){o===void 0&&(o=!1);var i=e.call(this,n,r,o)||this;return i.$body=Le("body"),i.modal=null,i.menu=r,i}return V2(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var n=Os(this),r=this.menu.getModalPositionNode(n);return sn.isElement(r)?xH(n,r,"modal"):wH(n)},t.prototype.handleModal=function(){var n=Os(this),r=this.menu;if(this.modal==null){var o=new Qst(n,r.modalWidth);this.renderAndShowModal(o,!0),this.modal=o}else(o=this.modal).isShow?o.hide():this.renderAndShowModal(o,!1)},t.prototype.renderAndShowModal=function(n,r){r===void 0&&(r=!1);var o=Os(this),i=this.menu;if(i.getModalContentElem!=null){var a=Re.getTextarea(o),l=Re.getToolbar(o),s=((l==null?void 0:l.getConfig())||{}).modalAppendToBody,u=i.getModalContentElem(o);if(n.renderContent(u),s)n.setStyle({left:"0",right:"0"});else{var c=this.getPosition();n.setStyle(c)}r&&(s?n.appendTo(this.$body):n.appendTo(a.$textAreaContainer)),n.show(),s||_H(o,n.$elem),setTimeout(function(){o.blur()})}},t}(NH),Zst=function(e){function t(n,r){var o=e.call(this,n)||this;return o.type="selectList",o.$elem=Le('<div class="w-e-select-list"></div>'),r&&o.$elem.css("width",r+"px"),o.$elem.on("click",function(i){i.stopPropagation()}),o}return V2(t,e),t.prototype.renderList=function(n){var r=this.$elem;r.empty();var o=Le("<ul></ul>");n.forEach(function(i){var a=i.value,l=i.text,s=i.selected,u=i.styleForRenderMenuList,c=Le('<li data-value="'+a+'"></li>');if(u&&c.css(u),s){var d=Le('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');c.append(d),c.addClass("selected")}c.append(Le('<span data-value="'+a+'">'+l+"</span>")),c.attr("title",l),o.append(c)}),r.append(o)},t.prototype.genSelfElem=function(){return null},t}(FH),eut=function(){function e(t,n,r){var o=this;r===void 0&&(r=!1),this.$elem=Le('<div class="w-e-bar-item"></div>'),this.$button=Le('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=n.tag,a=n.title,l=n.width,s=n.iconSvg,u=s===void 0?"":s,c=n.hotkey,d=c===void 0?"":c;if(i!=="select")throw new Error("Invalid tag '"+i+"', expected 'select'");var f=this.$button;l&&f.css("width",l+"px"),f.attr("data-menu-key",t),J4e(f,u,a,d,r),this.$elem.append(f),this.menu=n,fu(function(){return o.init()})}return e.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",function(n){n.preventDefault(),Os(t).hidePanelOrModal(),t.trigger()})},e.prototype.trigger=function(){var t=this,n=Os(this);if(!n.isDisabled()&&!this.disabled){var r=this.menu;if(this.selectList==null){this.selectList=new Zst(n,r.selectPanelWidth);var o=this.selectList,i=r.getOptions(n);o.renderList(i),o.appendTo(this.$elem),o.show(),o.$elem.on("click","li",function(a){var l=a.target;if(l!=null){a.preventDefault();var s=Le(l).attr("data-value");t.onChange(s)}})}else(o=this.selectList).isShow?o.hide():(i=r.getOptions(n),o.renderList(i),o.show())}},e.prototype.onChange=function(t){var n=Os(this),r=this.menu;r.exec&&r.exec(n,t)},e.prototype.setSelectedValue=function(){var t=Os(this),n=this.menu,r=n.getValue(t),o=function(l,s){for(var u=l.length,c="",d=0;d<u;d++){var f=l[d];if(f.value===s){c=f.text;break}}return c}(n.getOptions(t),r.toString()),i=this.$button,a=MH();i.empty(),i.text(o),i.append(a)},e.prototype.setDisabled=function(){var t=Os(this),n=this.menu.isDisabled(t),r=this.$button;(t.selection==null||t.isDisabled())&&(n=!0);var o="disabled";n?r.addClass(o):r.removeClass(o),this.disabled=n},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),Z4e=function(){function e(t){this.$elem=Le('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=Le('<div class="w-e-bar-item-menus-container"></div>'),this.$button=Le('<button type="button"></button>');var n=t.key,r=t.iconSvg,o=t.title,i=this.$elem,a=this.$button;if(r){var l=Le(r);TH(l),a.append(l)}else a.text(o);a.attr("data-menu-key",n);var s=MH();a.append(s),i.append(a);var u=this.$container;i.append(u);var c=this.createObserver();this.observe(c)}return e.prototype.appendBarItem=function(t){var n=t.$elem;this.$container.append(n)},e.prototype.observe=function(t){var n=this.$container;t.observe(n[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var t=this,n=this.$container,r=this.$button,o=new MutationObserver(function(){var i=n.find("button"),a=i.length;if(a!==0){var l=0;i.each(function(s){Le(s).hasClass("disabled")&&l++}),o.disconnect(),l===a?r.addClass("disabled"):r.removeClass("disabled"),t.observe(o)}});return o},e}(),e6e=new WeakMap;function Os(e){var t=Fz.get(e);if(t==null)throw new Error("Can not get editor instance");return t}function t6e(e,t,n){n===void 0&&(n=!1);var r=e6e.get(t);if(r)return r;var o=t.tag;if(o==="button"){var i=t.showDropPanel,a=t.showModal;r=i?new Xst(e,t,n):a?new Jst(e,t,n):new Kst(e,t,n)}if(o==="select"&&(r=new eut(e,t,n)),r==null)throw new Error("Invalid tag in menu "+JSON.stringify(t));return e6e.set(t,r),r}function tut(e,t){var n=e.selection;return n!=null&&!ct.isCollapsed(n)&&!Re.getSelectedElems(e).some(function(r){if(e.isVoid(r))return!0;var o=r.type;return!!["pre","code","table"].includes(o)||void 0})&&!!Qt.isText(t)}var nut=function(){function e(){var t=this;this.$elem=Le('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.changeHoverbarState=Eye(function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},o=r.node,i=o===void 0?null:o,a=r.menuKeys,l=a===void 0?[]:a;i!=null&&t.changeItemsState(),i&&sn.isElement(i)&&n&&t.isSamePath(i,t.prevSelectedNode)||(t.hideAndClean(),i!=null&&(t.registerItems(l),t.setPosition(i),t.show()),t.prevSelectedNode=i)},200),fu(function(){var n=t.getEditorInstance(),r=t.$elem;r.on("mousedown",function(i){return i.preventDefault()},{passive:!1}),Re.getTextarea(n).$textAreaContainer.append(r),n.on("change",t.changeHoverbarState);var o=t.hideAndClean.bind(t);n.on("scroll",o),n.on("fullScreen",o),n.on("unFullScreen",o)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var t=this.$elem;t.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],t.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var t=this.$elem,n=!1,r=window.innerHeight;r&&r>=360&&r-t[0].getBoundingClientRect().bottom<360&&(n=!0),n?t.addClass("w-e-bar-bottom"):t.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var t=this;fu(function(){t.hoverbarItems.forEach(function(n){n.changeMenuState()})})},e.prototype.registerItems=function(t){var n=this,r=this.$elem;t.forEach(function(o){if(o!=="|")n.registerSingleItem(o);else{var i=Q4e();r.append(i)}})},e.prototype.registerSingleItem=function(t){var n=this.getEditorInstance(),r=this.menus,o=r[t];if(o==null){var i=v8[t];if(i==null)throw new Error("Not found menu item factory by key '"+t+"'");if(typeof i!="function")throw new Error("Menu item factory (key='"+t+"') is not a function");o=i(),r[t]=o}var a=t6e(t,o);this.hoverbarItems.push(a),Fz.set(a,n),this.$elem.append(a.$elem)},e.prototype.setPosition=function(t){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),sn.isElement(t)){var o=xH(n,t,"bar");return r.css(o),void _H(n,r)}if(Qt.isText(t))return o=wH(n),r.css(o),void _H(n,r);throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var t=this.getEditorInstance();if(t.selection==null)return null;var n=this.getHoverbarKeysConf(),r=null,o=[],i=function(l){var s=n[l],u=s.match,c=s.menuKeys,d=c===void 0?[]:c,f=u||function(v,g){return Re.checkNodeType(g,l)},p=Er(ue.nodes(t,{match:function(v){return f(t,v)},universal:!0}),1),m=p[0];if(m!=null)return r=m[0],o=d,"break"};for(var a in n)if(i(a)==="break")break;return r==null||o.length===0?null:{node:r,menuKeys:o}},e.prototype.getEditorInstance=function(){var t=Nz.get(this);if(t==null)throw new Error("Can not get editor instance");return t},e.prototype.getHoverbarKeysConf=function(){var t=this.getEditorInstance().getConfig().hoverbarKeys,n=t===void 0?{}:t,r=n.text;return r&&r.match==null&&(r.match=tut),n},e.prototype.isSamePath=function(t,n){if(t==null||n==null)return!1;var r=Re.findPath(null,t),o=Re.findPath(null,n);return Ke.equals(r,o)},e.prototype.destroy=function(){this.changeHoverbarState.cancel(),this.$elem.remove(),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function n6e(e,t,n,r){if(d8.set(e,t),H2.set(e,n),sn.isElement(e)){var o=e.children;if((o===void 0?[]:o).forEach(function(l,s){return n6e(l,s,e,r)}),ue.isVoid(r,e)){var i=Er(Pt.texts(e),1),a=Er(i[0],1)[0];d8.set(a,0),H2.set(a,e)}}}function rut(e){var t=e.selector,n=t===void 0?"":t,r=e.config,o=r===void 0?{}:r,i=e.content,a=e.html,l=e.plugins,s=l===void 0?[]:l,u=(b=>{var y=b,{apply:w}=y;return y.history={undos:[],redos:[]},y.redo=()=>{var{history:x}=y,{redos:_}=x;if(_.length>0){var E=_[_.length-1];L2.withoutSaving(y,()=>{ue.withoutNormalizing(y,()=>{for(var C of E)y.apply(C)})}),x.redos.pop(),x.undos.push(E)}},y.undo=()=>{var{history:x}=y,{undos:_}=x;if(_.length>0){var E=_[_.length-1];L2.withoutSaving(y,()=>{ue.withoutNormalizing(y,()=>{var C=E.map(Vp.inverse).reverse();for(var T of C)y.apply(T)})}),x.redos.push(E),x.undos.pop()}},y.apply=x=>{var{operations:_,history:E}=y,{undos:C}=E,T=C[C.length-1],k=T&&T[T.length-1],I=((B,L)=>!(!L||B.type!=="set_selection"||L.type!=="set_selection"))(x,k),O=L2.isSaving(y),F=L2.isMerging(y);if(O==null&&(O=(B=>B.type!=="set_selection"||B.properties!=null&&B.newProperties!=null)(x)),O){if(F==null&&(F=T!=null&&(_.length!==0||((B,L)=>B.type==="set_selection"||!(!L||B.type!=="insert_text"||L.type!=="insert_text"||B.offset!==L.offset+L.text.length||!Ke.equals(B.path,L.path))||!(!L||B.type!=="remove_text"||L.type!=="remove_text"||B.offset+B.text.length!==L.offset||!Ke.equals(B.path,L.path)))(x,k)||I)),T&&F)I&&T.pop(),T.push(x);else{var N=[x];C.push(N)}for(;C.length>100;)C.shift();(B=>B.type!=="set_selection")(x)&&(E.redos=[])}w(x)},y})(function(b){var y=b,w=y.insertText,x=y.insertNode,_=y.insertFragment,E=y.dangerouslyInsertHtml;return y.insertText=function(C){if(y.getConfig().maxLength){var T=Re.getLeftLengthOfMaxLength(y);T<=0||(T<C.length?w(C.slice(0,T)):w(C))}else w(C)},y.insertNode=function(C){if(y.getConfig().maxLength){var T=Re.getLeftLengthOfMaxLength(y);T<=0||T<Pt.string(C).length||x(C)}else x(C)},y.insertFragment=function(C){if(y.getConfig().maxLength)if(C.length!==1)C.forEach(function(k){y.insertNode(k)});else{var T=C[0];if(Re.getLeftLengthOfMaxLength(y)<Pt.string(T).length)return;_(C)}else _(C)},y.dangerouslyInsertHtml=function(C,T){if(C===void 0&&(C=""),T===void 0&&(T=!1),C)if(y.getConfig().maxLength){var k=Re.getLeftLengthOfMaxLength(y);if(!(k<=0)){var I=document.createElement("div");I.innerHTML=C;var O=Array.from(I.childNodes).reduce(function(F,N){var B=N.nodeType,L=N.nodeName;return N?B===ed.TEXT_NODE?F+(N.textContent||""):B===ed.ELEMENT_NODE?M4e.has(L.toLowerCase())?F:F+(N.textContent||""):F:F},"");k<O.length||E(C,T)}}else E(C,T)},y}(function(b){var y=b;return y.on=function(w,x){var _=VC(y);if(_.on(w,x),w==="destroyed"&&B4e(y,x),w!=="destroyed"){var E=function(){return _.off(w,x)};_.on("destroyed",E),B4e(y,E)}},y.once=function(w,x){VC(y).once(w,x)},y.off=function(w,x){VC(y).off(w,x)},y.emit=function(w){for(var x=[],_=1;_<arguments.length;_++)x[_-1]=arguments[_];var E=VC(y);E.emit.apply(E,_z([w],Er(x))),w==="destroyed"&&(function(C){return zC.get(C)||new Set}(y).forEach(function(C){return E.off("destroyed",C)}),function(C){zC.set(C,new Set)}(y))},y}(function(b){var y=b;return y.select=function(w){et.select(y,w)},y.deselect=function(){var w=y.selection,x=Re.findDocumentOrShadowRoot(y).getSelection();x&&x.rangeCount>0&&x.removeAllRanges(),w&&et.deselect(b)},y.move=function(w,x){x===void 0&&(x=!1),w&&(w<0||et.move(b,{distance:w,unit:"character",reverse:x}))},y.moveReverse=function(w){y.move(w,!0)},y.restoreSelection=function(){var w=Lz.get(y);w!=null&&(y.focus(),et.select(y,w))},y.getSelectionPosition=function(){return wH(y)},y.getNodePosition=function(w){return xH(y,w)},y.isSelectedAll=function(){var w=y.selection;if(w==null)return!1;var x=Er(ct.edges(w),2),_=x[0],E=x[1],C=Er(ue.edges(y,[]),2),T=C[0],k=C[1];return!(!nr.equals(_,T)||!nr.equals(E,k))},y.selectAll=function(){var w=ue.start(y,[]),x=ue.end(y,[]);et.select(y,{anchor:w,focus:x})},y}(function(b){var y=b,w=y.onChange,x=y.insertText,_=y.apply,E=y.deleteBackward;return y.insertText=function(C){y.getConfig().readOnly||x(C)},y.apply=function(C){var T,k,I,O,F,N,B,L,V=[];switch(C.type){case"insert_text":case"remove_text":case"set_node":try{for(var P=du(ue.levels(y,{at:C.path})),H=P.next();!H.done;H=P.next()){var U=Er(H.value,2),G=U[0],z=U[1],$=Re.findKey(y,G);V.push([z,$])}}catch(ye){T={error:ye}}finally{try{H&&!H.done&&(k=P.return)&&k.call(P)}finally{if(T)throw T.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var W=du(ue.levels(y,{at:Ke.parent(C.path)})),K=W.next();!K.done;K=W.next()){var X=Er(K.value,2);G=X[0],z=X[1],$=Re.findKey(y,G),V.push([z,$])}}catch(ye){I={error:ye}}finally{try{K&&!K.done&&(O=W.return)&&O.call(W)}finally{if(I)throw I.error}}break;case"move_node":try{for(var te=du(ue.levels(y,{at:Ke.common(Ke.parent(C.path),Ke.parent(C.newPath))})),ne=te.next();!ne.done;ne=te.next()){var se=Er(ne.value,2);G=se[0],z=se[1],$=Re.findKey(y,G),V.push([z,$])}}catch(ye){F={error:ye}}finally{try{ne&&!ne.done&&(N=te.return)&&N.call(te)}finally{if(F)throw F.error}}}_(C);try{for(var le=du(V),J=le.next();!J.done;J=le.next()){var Z=Er(J.value,2);z=Z[0],$=Z[1],G=Er(ue.node(y,z),1)[0],FC.set(G,$)}}catch(ye){B={error:ye}}finally{try{J&&!J.done&&(L=le.return)&&L.call(le)}finally{if(B)throw B.error}}},y.deleteBackward=function(C){if(C!=="line")return E(C);if(b.selection&&ct.isCollapsed(b.selection)){var T=ue.above(b,{match:function(F){return ue.isBlock(b,F)},at:b.selection});if(T){var k=Er(T,2)[1],I=ue.range(b,k,b.selection.anchor),O=function(F,N){var B=ue.range(F,ct.end(N)),L=Array.from(ue.positions(F,{at:N})),V=0,P=L.length,H=Math.floor(P/2);if(g4e(F,ue.range(F,L[V]),B))return ue.range(F,L[V],B);if(L.length<2)return ue.range(F,L[L.length-1],B);for(;H!==L.length&&H!==V;)g4e(F,ue.range(F,L[H]),B)?P=H:V=H,H=Math.floor((V+P)/2);return ue.range(F,L[P],B)}(y,I);ct.isCollapsed(O)||et.delete(b,{at:O})}}},y.onChange=function(){var C=y.selection;C!=null&&Lz.set(y,C),y.emit("change"),w()},y.handleTab=function(){y.insertText(" ")},y.getHtml=function(){var C=y.children;return(C===void 0?[]:C).map(function(T){return h4e(T,y)}).join("")},y.getText=function(){var C=y.children;return(C===void 0?[]:C).map(function(T){return Pt.string(T)}).join(` |
|
1024 |
`)},y.getSelectionText=function(){var C=y.selection;return C==null?"":ue.string(b,C)},y.getElemsByType=function(C,T){var k,I;T===void 0&&(T=!1);var O=[],F=ue.nodes(y,{at:[],universal:!0});try{for(var N=du(F),B=N.next();!B.done;B=N.next()){var L=Er(B.value,1)[0];if(sn.isElement(L)&&(T?L.type.indexOf(C)>=0:L.type===C)){var V=v4e(Re.findKey(y,L).id);O.push(cu(cu({},L),{id:V}))}}}catch(P){k={error:P}}finally{try{B&&!B.done&&(I=N.return)&&I.call(N)}finally{if(k)throw k.error}}return O},y.getElemsByTypePrefix=function(C){return y.getElemsByType(C,!0)},y.isEmpty=function(){var C=y.children,T=C===void 0?[]:C;if(T.length>1)return!1;var k=T[0];if(k==null)return!0;if(sn.isElement(k)&&k.type==="paragraph"){var I=k.children,O=I===void 0?[]:I;if(O.length>1)return!1;var F=O[0];if(F==null||Qt.isText(F)&&F.text==="")return!0}return!1},y.clear=function(){et.delete(y,{at:{anchor:ue.start(y,[]),focus:ue.end(y,[])}}),y.children.length===0&&et.insertNodes(y,[{type:"paragraph",children:[{text:""}]}])},y.getParentNode=function(C){return Re.getParentNode(y,C)},y.dangerouslyInsertHtml=function(C,T){if(C===void 0&&(C=""),T===void 0&&(T=!1),C){var k=document.createElement("div");k.innerHTML=C;var I=Array.from(k.childNodes);if(I=I.filter(function(B){var L=B.nodeType,V=B.nodeName;return L===ed.TEXT_NODE||L===ed.ELEMENT_NODE&&!M4e.has(V.toLowerCase())}),I.length!==0){var O=y.selection;if(O!=null){var F=null;Re.isSelectedEmptyParagraph(y)&&!T&&(F=[O.focus.path[0]]),k.setAttribute("hidden","true"),document.body.appendChild(k);var N=0;I.forEach(function(B){var L=B.nodeType,V=B.nodeName,P=B.textContent,H=P===void 0?"":P;if(L!==ed.TEXT_NODE)if(V!=="BR"){var U=B,G=!1;if(y4e.includes(V.toLowerCase()))G=!0;else for(var z in LC)if(U.matches(z)){G=!0;break}if(G){var $=vH(Le(U),y);return Array.isArray($)?($.forEach(function(K){return N4e(y,K)}),N++):(N4e(y,$),N++),void(Re.isSelectedVoidNode(y)&&y.move(1))}var W=window.getComputedStyle(U).display;Re.isSelectedEmptyParagraph(y)||W.indexOf("inline")<0&&y.insertBreak(),y.dangerouslyInsertHtml(U.innerHTML,!0)}else y.insertText(` |
|
1025 |
`);else{if(!H||!H.trim())return;y.insertNode({text:H})}}),N&&F&&Re.isEmptyPath(y,F)&&et.removeNodes(y,{at:F}),k.remove()}}}},y.setHtml=function(C){C===void 0&&(C="");var T=y.isDisabled(),k=y.isFocused(),I=JSON.stringify(y.selection);y.enable(),y.focus(),y.clear();var O=D4e(y,C);if(et.insertFragment(y,O),k||(y.deselect(),y.blur()),T&&(y.deselect(),y.disable()),y.isFocused())try{y.select(JSON.parse(I))}catch{y.select(ue.start(y,[]))}},y}(function(b){var y=b;return y.getAllMenuKeys=function(){var w=[];for(var x in v8)w.push(x);return w},y.getConfig=function(){var w=Cbe.get(y);if(w==null)throw new Error("Can not get editor config");return w},y.getMenuConfig=function(w){var x=y.getConfig().MENU_CONF;return(x===void 0?{}:x)[w]||{}},y.alert=function(w,x){x===void 0&&(x="info");var _=y.getConfig().customAlert;_&&_(w,x)},y}(function(){var b=Ast(dtt());return b.id="wangEditor-"+Dlt++,b.isDestroyed=!1,b.isFullScreen=!1,b.focus=function(y){if(Re.toDOMNode(b,b).focus({preventScroll:!0}),dv.set(b,!0),y){var w=ue.end(b,[]);et.select(b,w)}else{var x=Lz.get(b);x?et.select(b,x):et.select(b,ue.start(b,[]))}},b.isFocused=function(){return!!dv.get(b)},b.blur=function(){Re.toDOMNode(b,b).blur(),et.deselect(b),dv.set(b,!1)},b.updateView=function(){Re.getTextarea(b).changeViewState();var y=Re.getToolbar(b);y&&y.changeToolbarState();var w=Re.getHoverbar(b);w&&w.changeHoverbarState()},b.destroy=function(){if(!b.isDestroyed){var y=Re.getTextarea(b);y.destroy(),Oz.delete(b),Tz.delete(y);var w=Re.getToolbar(b);w&&(w.destroy(),DC.delete(b),Mz.delete(w));var x=Re.getHoverbar(b);x&&(x.destroy(),OC.delete(b),Nz.delete(x)),b.isDestroyed=!0,b.emit("destroyed")}},b.scrollToElem=function(y){if(!b.getConfig().scroll){var w="\u7F16\u8F91\u5668\u7981\u7528\u4E86 scroll \uFF0C\u7F16\u8F91\u5668\u5185\u5BB9\u65E0\u6CD5\u6EDA\u52A8\uFF0C\u8BF7\u81EA\u884C\u5B9E\u73B0\u8BE5\u529F\u80FD";return w+=` |
|
1026 |
You has disabled editor scroll, please do this yourself`,void console.warn(w)}var x=Le("#"+y);if(x.length!==0){var _=x[0];if(!Re.hasDOMNode(b,_))return w="Element (found by id is '"+y+"') is not in editor DOM",w+=` |
|
1027 |
\u901A\u8FC7 id '`+y+"' \u627E\u5230\u7684 element \u4E0D\u5728 editor DOM \u4E4B\u5185",void console.error(w,_);var E=Re.getTextarea(b),C=E.$textAreaContainer,T=E.$scroll,k=x.offset().top,I=C.offset().top;T[0].scrollBy({top:k-I,behavior:"smooth"})}},b.showProgressBar=function(y){y<1||Re.getTextarea(b).changeProgress(y)},b.hidePanelOrModal=function(){var y=Rz.get(b);y!=null&&y.forEach(function(w){return w.hide()})},b.enable=function(){b.getConfig().readOnly=!1,b.updateView()},b.disable=function(){b.getConfig().readOnly=!0,b.updateView()},b.isDisabled=function(){return b.getConfig().readOnly},b.toDOMNode=function(y){return Re.toDOMNode(b,y)},b.fullScreen=function(){if(!b.isFullScreen){var y=null,w=Re.getToolbar(b);w&&(y=w.$box);var x=Re.getTextarea(b).$box.parent();if(y&&y.parent()[0]!==x[0])throw new Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent |
|
1028 |
\u4E0D\u80FD\u8BBE\u7F6E\u5168\u5C4F\uFF0C\u56E0\u4E3A toolbar DOM \u7236\u8282\u70B9\u548C textarea DOM \u7236\u8282\u70B9\u4E0D\u4E00\u81F4`);x.addClass("w-e-full-screen-container");var _=x.css("z-index");x.attr("data-z-index",_.toString()),b.isFullScreen=!0,b.emit("fullScreen")}},b.unFullScreen=function(){if(b.isFullScreen){var y=Re.getTextarea(b).$box.parent();setTimeout(function(){y.removeClass("w-e-full-screen-container"),b.isFullScreen=!1,b.emit("unFullScreen")},200)}},b.getEditableContainer=function(){return Re.getTextarea(b).$textAreaContainer[0]},b}()))))));if(n&&function(b,y){return k4e(b,"data-w-e-textarea",y)}(u,n))throw new Error("Repeated create editor by selector '"+n+"'");var c=function(b){b===void 0&&(b={});var y=Cye(Lbe),w={},x=b.MENU_CONF,_=x===void 0?{}:x;return Hj(y,function(E,C){w[C]=cu(cu({},E),_[C]||{})}),delete b.MENU_CONF,cu({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:w,hoverbarKeys:{},customAlert:function(E,C){window.alert(C+`: |
|
1029 |
`+E)}},b)}(o);Cbe.set(u,c);var d=c.hoverbarKeys,f=d===void 0?{}:d;if(s.forEach(function(b){u=b(u)}),a!=null&&(u.children=D4e(u,a)),i&&i.length&&(u.children=i),u.children.length===0&&(u.children=[{type:"paragraph",children:[{text:""}]}]),Re.normalizeContent(u),n){var p=new qst(n);Oz.set(u,p),Tz.set(p,u),p.changeViewState(),fu(function(){var b=p.$scroll;b!=null&&b.height()<300&&console.warn(`\u7F16\u8F91\u533A\u57DF\u9AD8\u5EA6 < 300px \u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4 modal hoverbar \u5B9A\u4F4D\u5F02\u5E38 |
|
1030 |
Textarea height < 300px . This may be cause modal and hoverbar position error`,b)});var m=void 0;Object.keys(f).length>0&&(m=new nut,Nz.set(m,u),OC.set(u,m)),u.on("change",function(){u.hidePanelOrModal()}),u.on("scroll",function(){u.hidePanelOrModal()})}else u.children.forEach(function(b,y){return n6e(b,y,u,u)});var v=c.onCreated,g=c.onDestroyed;return v&&u.on("created",function(){return v(u)}),g&&u.on("destroyed",function(){return g(u)}),fu(function(){return u.emit("created")}),u}var out=gC("splice"),iut=Mt.TypeError,aut=Math.max,lut=Math.min;ko({target:"Array",proto:!0,forced:!out},{splice:function(e,t){var n,r,o,i,a,l,s=Xp(this),u=sv(s),c=I2(e,u),d=arguments.length;if(d===0?n=r=0:d===1?(n=0,r=u-c):(n=d-2,r=lut(aut(X6(t),0),u-c)),u+n-r>9007199254740991)throw iut("Maximum allowed length exceeded");for(o=_3e(s,r),i=0;i<r;i++)(a=c+i)in s&&r8(o,i,s[a]);if(o.length=r,n<r){for(i=c;i<u-r;i++)l=i+n,(a=i+r)in s?s[l]=s[a]:delete s[l];for(i=u;i>u-r+n;i--)delete s[i-1]}else if(n>r)for(i=u-r;i>c;i--)l=i+n-1,(a=i+r-1)in s?s[l]=s[a]:delete s[l];for(i=0;i<n;i++)s[i+c]=arguments[i+2];return s.length=u-r+n,o}});var sut=function(){function e(t,n){var r=this;this.$toolbar=Le('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=Eye(function(){r.toolbarItems.forEach(function(a){a.changeMenuState()})},200),this.config=n;var o=Le(t);if(o.length===0)throw new Error("Cannot find toolbar DOM by selector '"+t+"'");this.$box=o;var i=this.$toolbar;i.on("mousedown",function(a){return a.preventDefault()},{passive:!1}),o.append(i),fu(function(){r.registerItems(),r.changeToolbarState(),r.getEditorInstance().on("change",r.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.registerItems=function(){var t=this,n="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=i===void 0?[]:i,l=o.insertKeys,s=l===void 0?{index:0,keys:[]}:l,u=o.excludeKeys,c=u===void 0?[]:u,d=Cye(a);s.keys.length>0&&(typeof s.keys=="string"&&(s.keys=[s.keys]),s.keys.forEach(function(m,v){d.splice(s.index+v,0,m)}));var f=d.filter(function(m){if(typeof m=="string"){if(c.includes(m))return!1}else if(c.includes(m.key))return!1;return!0}),p=f.length;f.forEach(function(m,v){if(m==="|"){if(v===0||v+1===p||n==="|")return;var g=Q4e();return r.append(g),void(n=m)}if(typeof m=="string")return t.registerSingleItem(m,t),void(n=m);t.registerGroup(m),n="group"})},e.prototype.registerGroup=function(t){var n=this,r=this.$toolbar,o=function(u){return new Z4e(u)}(t),i=t.menuKeys,a=i===void 0?[]:i,l=this.config.excludeKeys,s=l===void 0?[]:l;a.forEach(function(u){s.includes(u)||n.registerSingleItem(u,o)}),r.append(o.$elem)},e.prototype.registerSingleItem=function(t,n){var r=this.getEditorInstance(),o=n instanceof Z4e,i=this.menus,a=i[t];if(a==null){var l=v8[t];if(l==null)throw new Error("Not found menu item factory by key '"+t+"'");if(typeof l!="function")throw new Error("Menu item factory (key='"+t+"') is not a function");a=l(),i[t]=a}else console.warn("Duplicated toolbar menu key '"+t+`' |
|
1031 |
\u91CD\u590D\u6CE8\u518C\u4E86\u83DC\u5355\u680F menu '`+t+"'");var s=t6e(t,a,o);this.toolbarItems.push(s),Fz.set(s,r),o?n.appendBarItem(s):n.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var t=Mz.get(this);if(t==null)throw new Error("Can not get editor instance");return t},e.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},e}(),uut=N2.EXISTS,cut=Ku.f,r6e=Function.prototype,dut=cn(r6e.toString),o6e=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,fut=cn(o6e.exec);function i6e(e){var t=e.server,n=t===void 0?"":t,r=e.fieldName,o=r===void 0?"":r,i=e.maxFileSize,a=i===void 0?10485760:i,l=e.maxNumberOfFiles,s=l===void 0?100:l,u=e.meta,c=u===void 0?{}:u,d=e.metaWithUrl,f=d!==void 0&&d,p=e.headers,m=p===void 0?{}:p,v=e.withCredentials,g=v!==void 0&&v,b=e.timeout,y=b===void 0?1e4:b,w=e.onBeforeUpload,x=w===void 0?function(N){return N}:w,_=e.onSuccess,E=_===void 0?function(N,B){}:_,C=e.onError,T=C===void 0?function(N,B,L){console.error(N.name+" upload error",B,L)}:C,k=e.onProgress,I=k===void 0?function(N){}:k;if(!n)throw new Error(`Cannot get upload server address |
|
1032 |
\u6CA1\u6709\u914D\u7F6E\u4E0A\u4F20\u5730\u5740`);if(!o)throw new Error(`Cannot get fieldName |
|
1033 |
\u6CA1\u6709\u914D\u7F6E fieldName`);var O=n;f&&(O=function(N,B){var L=Er(N.split("#"),2),V=L[0],P=L[1],H=[];Hj(B,function(G,z){H.push(z+"="+G)});var U=H.join("&");return V=V.indexOf("?")>0?V+"&"+U:V+"?"+U,P?V+"#"+P:V}(O,c));var F=new P6({onBeforeUpload:x,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c}).use(Uot,{endpoint:O,headers:m,formData:!0,fieldName:o,bundle:!0,withCredentials:g,timeout:y});return F.on("upload-success",function(N,B){var L=B.body,V=L===void 0?{}:L;try{E(N,V)}catch(P){console.error("wangEditor upload file - onSuccess error",P)}F.removeFile(N.id)}),F.on("progress",function(N){N<1||I(N)}),F.on("upload-error",function(N,B,L){try{T(N,B,L)}catch(V){console.error("wangEditor upload file - onError error",V)}F.removeFile(N.id)}),F.on("restriction-failed",function(N,B){try{T(N,B)}catch(L){console.error("wangEditor upload file - onError error",L)}F.removeFile(N.id)}),F}function nh(e){return nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(e)}function put(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),r.forEach(function(o){put(e,o,n[o])})}return e}function df(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a6e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ff(e,t,n){return t&&a6e(e.prototype,t),n&&a6e(e,n),e}function mv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C8(e,t){if(t&&(nh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mv(e)}function ey(e){return ey=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ey(e)}function RH(e,t){return RH=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},RH(e,t)}function $C(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&RH(e,t)}ta&&!uut&&cut(r6e,"name",{configurable:!0,get:function(){try{return fut(o6e,dut(this))[1]}catch{return""}}});var hut={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},pf=new(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};df(this,e),this.init(t,n)}return ff(e,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||hut,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,n,r,o){return o&&!this.debug?null:(typeof t[0]=="string"&&(t[0]="".concat(r).concat(this.prefix," ").concat(t[0])),this.logger[n](t))}},{key:"create",value:function(t){return new e(this.logger,xi({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),rh=function(){function e(){df(this,e),this.observers={}}return ff(e,[{key:"on",value:function(t,n){var r=this;return t.split(" ").forEach(function(o){r.observers[o]=r.observers[o]||[],r.observers[o].push(n)}),this}},{key:"off",value:function(t,n){this.observers[t]&&(n?this.observers[t]=this.observers[t].filter(function(r){return r!==n}):delete this.observers[t])}},{key:"emit",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&[].concat(this.observers[t]).forEach(function(i){i.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(i){i.apply(i,[t].concat(r))})}}]),e}();function S8(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function l6e(e){return e==null?"":""+e}function IH(e,t,n){function r(l){return l&&l.indexOf("###")>-1?l.replace(/###/g,"."):l}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function s6e(e,t,n){var r=IH(e,t,Object);r.obj[r.k]=n}function UC(e,t){var n=IH(e,t),r=n.obj,o=n.k;if(r)return r[o]}function u6e(e,t,n){var r=UC(e,n);return r!==void 0?r:UC(t,n)}function c6e(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):c6e(e[r],t[r],n):e[r]=t[r]);return e}function ty(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var vut={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function mut(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return vut[t]}):e}var WC=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function d6e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o||typeof o[r[i]]=="string"&&i+1<r.length)return;if(o[r[i]]===void 0){for(var a=2,l=r.slice(i,i+a).join(n),s=o[l];s===void 0&&r.length>i+a;)a++,s=o[l=r.slice(i,i+a).join(n)];if(s===void 0)return;if(typeof s=="string")return s;if(l&&typeof s[l]=="string")return s[l];var u=r.slice(i+a).join(n);return u?d6e(s,u,n):void 0}o=o[r[i]]}return o}}var gut=function(){function e(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return df(this,e),n=C8(this,ey(e).call(this)),WC&&rh.call(mv(n)),n.data=t||{},n.options=r,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return $C(e,rh),ff(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function(t,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,l=[t,n];r&&typeof r!="string"&&(l=l.concat(r)),r&&typeof r=="string"&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."));var s=UC(this.data,l);return s||!a||typeof r!="string"?s:d6e(this.data&&this.data[t]&&this.data[t][n],r,i)}},{key:"addResource",value:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=this.options.keySeparator;a===void 0&&(a=".");var l=[t,n];r&&(l=l.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(o=n,n=(l=t.split("."))[1]),this.addNamespaces(n),s6e(this.data,l,o),i.silent||this.emit("added",t,n,r,o)}},{key:"addResources",value:function(t,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var i in r)typeof r[i]!="string"&&Object.prototype.toString.apply(r[i])!=="[object Array]"||this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function(t,n,r,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(l=t.split("."))[1]),this.addNamespaces(n);var s=UC(this.data,l)||{};o?c6e(s,r,i):s=xi({},s,r),s6e(this.data,l,s),a.silent||this.emit("added",t,n,r)}},{key:"removeResourceBundle",value:function(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function(t,n){return this.getResource(t,n)!==void 0}},{key:"getResourceBundle",value:function(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?xi({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(),f6e={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach(function(a){i.processors[a]&&(t=i.processors[a].process(t,n,r,o))}),t}},p6e={},h6e=function(){function e(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return df(this,e),n=C8(this,ey(e).call(this)),WC&&rh.call(mv(n)),function(o,i,a){o.forEach(function(l){i[l]&&(a[l]=i[l])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,mv(n)),n.options=r,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.logger=pf.create("translator"),n}return $C(e,rh),ff(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;var r=this.resolve(t,n);return r&&r.res!==void 0}},{key:"extractFromKey",value:function(t,n){var r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");var o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,i=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:i};var l=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),t=l.join(o)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}},{key:"translate",value:function(t,n,r){var o=this;if(nh(n)!=="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);var i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(t[t.length-1],n),l=a.key,s=a.namespaces,u=s[s.length-1],c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){var f=n.nsSeparator||this.options.nsSeparator;return u+f+l}return l}var p=this.resolve(t,n),m=p&&p.res,v=p&&p.usedKey||l,g=p&&p.exactUsedKey||l,b=Object.prototype.toString.apply(m),y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&m&&typeof m!="string"&&typeof m!="boolean"&&typeof m!="number"&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&(typeof y!="string"||b!=="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,xi({},n,{ns:s})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");if(i){var x=b==="[object Array]",_=x?[]:{},E=x?g:v;for(var C in m)if(Object.prototype.hasOwnProperty.call(m,C)){var T="".concat(E).concat(i).concat(C);_[C]=this.translate(T,xi({},n,{joinArrays:!1,ns:s})),_[C]===T&&(_[C]=m[C])}m=_}}else if(w&&typeof y=="string"&&b==="[object Array]")(m=m.join(y))&&(m=this.extendTranslation(m,t,n,r));else{var k=!1,I=!1,O=n.count!==void 0&&typeof n.count!="string",F=e.hasDefaultValue(n),N=O?this.pluralResolver.getSuffix(c,n.count):"",B=n["defaultValue".concat(N)]||n.defaultValue;!this.isValidLookup(m)&&F&&(k=!0,m=B),this.isValidLookup(m)||(I=!0,m=l);var L=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&I?void 0:m,V=F&&B!==m&&this.options.updateMissing;if(I||k||V){if(this.logger.log(V?"updateKey":"missingKey",c,u,l,V?B:m),i){var P=this.resolve(l,xi({},n,{keySeparator:!1}));P&&P.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.")}var H=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(var G=0;G<U.length;G++)H.push(U[G]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(n.lng||this.language):H.push(n.lng||this.language);var z=function($,W,K){o.options.missingKeyHandler?o.options.missingKeyHandler($,u,W,V?K:L,V,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing($,u,W,V?K:L,V,n),o.emit("missingKey",$,u,W,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?H.forEach(function($){o.pluralResolver.getSuffixes($).forEach(function(W){z([$],l+W,n["defaultValue".concat(W)]||B)})}):z(H,l,B))}m=this.extendTranslation(m,t,n,p,r),I&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(I||k)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(m))}return m}},{key:"extendTranslation",value:function(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,r,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(xi({},r,{interpolation:xi({},this.options.interpolation,r.interpolation)}));var l,s=r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var u=t.match(this.interpolator.nestingRegexp);l=u&&u.length}var c=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(c=xi({},this.options.interpolation.defaultVariables,c)),t=this.interpolator.interpolate(t,c,r.lng||this.language,r),s){var d=t.match(this.interpolator.nestingRegexp);l<(d&&d.length)&&(r.nest=!1)}r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var m=arguments.length,v=new Array(m),g=0;g<m;g++)v[g]=arguments[g];return i&&i[0]===v[0]&&!r.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(v[0]," in key: ").concat(n[0])),null):a.translate.apply(a,v.concat([n]))},r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,p=typeof f=="string"?[f]:f;return t!=null&&p&&p.length&&r.applyPostProcessor!==!1&&(t=f6e.handle(p,t,n,this.options&&this.options.postProcessPassResolved?xi({i18nResolved:o},r):r,this)),t}},{key:"resolve",value:function(t){var n,r,o,i,a,l=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof t=="string"&&(t=[t]),t.forEach(function(u){if(!l.isValidLookup(n)){var c=l.extractFromKey(u,s),d=c.key;r=d;var f=c.namespaces;l.options.fallbackNS&&(f=f.concat(l.options.fallbackNS));var p=s.count!==void 0&&typeof s.count!="string",m=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",v=s.lngs?s.lngs:l.languageUtils.toResolveHierarchy(s.lng||l.language,s.fallbackLng);f.forEach(function(g){l.isValidLookup(n)||(a=g,!p6e["".concat(v[0],"-").concat(g)]&&l.utils&&l.utils.hasLoadedNamespace&&!l.utils.hasLoadedNamespace(a)&&(p6e["".concat(v[0],"-").concat(g)]=!0,l.logger.warn('key "'.concat(r,'" for languages "').concat(v.join(", "),`" won't get resolved as namespace "`).concat(a,'" 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!!!")),v.forEach(function(b){if(!l.isValidLookup(n)){i=b;var y,w,x=d,_=[x];for(l.i18nFormat&&l.i18nFormat.addLookupKeys?l.i18nFormat.addLookupKeys(_,d,b,g,s):(p&&(y=l.pluralResolver.getSuffix(b,s.count)),p&&m&&_.push(x+y),m&&_.push(x+="".concat(l.options.contextSeparator).concat(s.context)),p&&_.push(x+=y));w=_.pop();)l.isValidLookup(n)||(o=w,n=l.getResource(b,g,w,s))}}))})}}),{res:n,usedKey:r,exactUsedKey:o,usedLng:i,usedNS:a}}},{key:"isValidLookup",value:function(t){return!(t===void 0||!this.options.returnNull&&t===null||!this.options.returnEmptyString&&t==="")}},{key:"getResource",value:function(t,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}}],[{key:"hasDefaultValue",value:function(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,12)&&t[r]!==void 0)return!0;return!1}}]),e}();function BH(e){return e.charAt(0).toUpperCase()+e.slice(1)}var yut=function(){function e(t){df(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pf.create("languageUtils")}return ff(e,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return n.length===2?null:(n.pop(),n[n.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map(function(o){return o.toLowerCase()}):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=BH(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=BH(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=BH(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var n,r=this;return t?(t.forEach(function(o){if(!n){var i=r.formatLanguageCode(o);r.options.supportedLngs&&!r.isSupportedCode(i)||(n=i)}}),!n&&this.options.supportedLngs&&t.forEach(function(o){if(!n){var i=r.getLanguagePartFromCode(o);if(r.isSupportedCode(i))return n=i;n=r.options.supportedLngs.find(function(a){if(a.indexOf(i)===0)return a})}}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}},{key:"getFallbackCodes",value:function(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,n){var r=this,o=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],a=function(l){l&&(r.isSupportedCode(l)?i.push(l):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(l)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),o.forEach(function(l){i.indexOf(l)<0&&a(r.formatLanguageCode(l))}),i}}]),e}(),but=[{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}],Aut={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},wut=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};df(this,e),this.languageUtils=t,this.options=n,this.logger=pf.create("pluralResolver"),this.rules=function(){var r={};return but.forEach(function(o){o.lngs.forEach(function(i){r[i]={numbers:o.nr,plurals:Aut[o.fc]}})}),r}()}return ff(e,[{key:"addRule",value:function(t,n){this.rules[t]=n}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,n){return this.getSuffixes(t).map(function(r){return n+r})}},{key:"getSuffixes",value:function(t){var n=this,r=this.getRule(t);return r?r.numbers.map(function(o){return n.getSuffix(t,o)}):[]}},{key:"getSuffix",value:function(t,n){var r=this,o=this.getRule(t);if(o){var i=o.noAbs?o.plurals(n):o.plurals(Math.abs(n)),a=o.numbers[i];this.options.simplifyPluralSuffix&&o.numbers.length===2&&o.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var l=function(){return r.options.prepend&&a.toString()?r.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):l():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&o.numbers.length===2&&o.numbers[0]===1?l():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),xut=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};df(this,e),this.logger=pf.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return ff(e,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=n.escape!==void 0?n.escape:mut,this.escapeValue=n.escapeValue===void 0||n.escapeValue,this.useRawValueToEscape=n.useRawValueToEscape!==void 0&&n.useRawValueToEscape,this.prefix=n.prefix?ty(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?ty(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?ty(n.nestingPrefix):n.nestingPrefixEscaped||ty("$t("),this.nestingSuffix=n.nestingSuffix?ty(n.nestingSuffix):n.nestingSuffixEscaped||ty(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,n,r,o){var i,a,l,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(v){return v.replace(/\$/g,"$$$$")}var d=function(v){if(v.indexOf(s.formatSeparator)<0){var g=u6e(n,u,v);return s.alwaysFormat?s.format(g,void 0,r,xi({},o,n,{interpolationkey:v})):g}var b=v.split(s.formatSeparator),y=b.shift().trim(),w=b.join(s.formatSeparator).trim();return s.format(u6e(n,u,y),w,r,xi({},o,n,{interpolationkey:y}))};this.resetRegExp();var f=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o&&o.interpolation&&o.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,m=[{regex:this.regexpUnescape,safeValue:function(v){return c(v)}},{regex:this.regexp,safeValue:function(v){return s.escapeValue?c(s.escape(v)):c(v)}}];return m.forEach(function(v){for(l=0;i=v.regex.exec(t);){if((a=d(i[1].trim()))===void 0)if(typeof f=="function"){var g=f(t,i,o);a=typeof g=="string"?g:""}else{if(p){a=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(t)),a=""}else typeof a=="string"||s.useRawValueToEscape||(a=l6e(a));var b=v.safeValue(a);if(t=t.replace(i[0],b),p?(v.regex.lastIndex+=b.length,v.regex.lastIndex-=i[0].length):v.regex.lastIndex=0,++l>=s.maxReplaces)break}}),t}},{key:"nest",value:function(t,n){var r,o,i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=xi({},a);function s(f,p){var m=this.nestingOptionsSeparator;if(f.indexOf(m)<0)return f;var v=f.split(new RegExp("".concat(m,"[ ]*{"))),g="{".concat(v[1]);f=v[0],g=(g=this.interpolate(g,l)).replace(/'/g,'"');try{l=JSON.parse(g),p&&(l=xi({},p,l))}catch(b){return this.logger.warn("failed parsing options string in nesting for key ".concat(f),b),"".concat(f).concat(m).concat(g)}return delete l.defaultValue,f}for(l.applyPostProcessor=!1,delete l.defaultValue;r=this.nestingRegexp.exec(t);){var u=[],c=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){var d=r[1].split(this.formatSeparator).map(function(f){return f.trim()});r[1]=d.shift(),u=d,c=!0}if((o=n(s.call(this,r[1].trim(),l),l))&&r[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=l6e(o)),o||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(t)),o=""),c&&(o=u.reduce(function(f,p){return i.format(f,p,a.lng,xi({},a,{interpolationkey:r[1].trim()}))},o.trim())),t=t.replace(r[0],o),this.regexp.lastIndex=0}return t}}]),e}(),_ut=function(){function e(t,n,r){var o,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return df(this,e),o=C8(this,ey(e).call(this)),WC&&rh.call(mv(o)),o.backend=t,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=pf.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return $C(e,rh),ff(e,[{key:"queueLoad",value:function(t,n,r,o){var i=this,a=[],l=[],s=[],u=[];return t.forEach(function(c){var d=!0;n.forEach(function(f){var p="".concat(c,"|").concat(f);!r.reload&&i.store.hasResourceBundle(c,f)?i.state[p]=2:i.state[p]<0||(i.state[p]===1?l.indexOf(p)<0&&l.push(p):(i.state[p]=1,d=!1,l.indexOf(p)<0&&l.push(p),a.indexOf(p)<0&&a.push(p),u.indexOf(f)<0&&u.push(f)))}),d||s.push(c)}),(a.length||l.length)&&this.queue.push({pending:l,loaded:{},errors:[],callback:o}),{toLoad:a,pending:l,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(t,n,r){var o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),r&&this.store.addResourceBundle(i,a,r),this.state[t]=n?-1:2;var l={};this.queue.forEach(function(s){(function(u,c,d){var f=IH(u,c,Object),p=f.obj,m=f.k;p[m]=p[m]||[],p[m].push(d)})(s.loaded,[i],a),function(u,c){for(var d=u.indexOf(c);d!==-1;)u.splice(d,1),d=u.indexOf(c)}(s.pending,t),n&&s.errors.push(n),s.pending.length!==0||s.done||(Object.keys(s.loaded).forEach(function(u){l[u]||(l[u]=[]),s.loaded[u].length&&s.loaded[u].forEach(function(c){l[u].indexOf(c)<0&&l[u].push(c)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(function(s){return!s.done})}},{key:"read",value:function(t,n,r){var o=this,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,l=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,function(s,u){s&&u&&i<5?setTimeout(function(){o.read.call(o,t,n,r,i+1,2*a,l)},a):l(s,u)}):l(null,{})}},{key:"prepareLoading",value:function(t,n){var r=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=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."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);var a=this.queueLoad(t,n,o,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(function(l){r.loadOne(l)})}},{key:"load",value:function(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=t.split("|"),i=o[0],a=o[1];this.read(i,a,"read",void 0,void 0,function(l,s){l&&n.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(i," failed"),l),!l&&s&&n.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(i),s),n.loaded(t,l,s)})}},{key:"saveMissing",value:function(t,n,r,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" 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!!!"):r!=null&&r!==""&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,xi({},a,{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),e}();function v6e(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function GC(){}var Eut=function(){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(df(this,e),t=C8(this,ey(e).call(this)),WC&&rh.call(mv(t)),t.options=v6e(n),t.services={},t.logger=pf,t.modules={external:[]},r&&!t.isInitialized&&!n.isClone){if(!t.options.initImmediate)return t.init(n,r),C8(t,mv(t));setTimeout(function(){t.init(n,r)},0)}return t}return $C(e,rh),ff(e,[{key:"init",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(c){return c?typeof c=="function"?new c:c:null}if(typeof n=="function"&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=xi({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(c){var d={};if(nh(c[1])==="object"&&(d=c[1]),typeof c[1]=="string"&&(d.defaultValue=c[1]),typeof c[2]=="string"&&(d.tDescription=c[2]),nh(c[2])==="object"||nh(c[3])==="object"){var f=c[3]||c[2];Object.keys(f).forEach(function(p){d[p]=f[p]})}return d},interpolation:{escapeValue:!0,format:function(c,d,f,p){return c},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,v6e(n)),this.format=this.options.interpolation.format,r||(r=GC),!this.options.isClone){this.modules.logger?pf.init(o(this.modules.logger),this.options):pf.init(null,this.options);var i=new yut(this.options);this.store=new gut(this.options.resources,this.options);var a=this.services;a.logger=pf,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new wut(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new xut(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new _ut(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];t.emit.apply(t,[c].concat(f))}),this.modules.languageDetector&&(a.languageDetector=o(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=o(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new h6e(this.services,this.options),this.translator.on("*",function(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];t.emit.apply(t,[c].concat(f))}),this.modules.external.forEach(function(c){c.init&&c.init(t)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(function(c){t[c]=function(){var d;return(d=t.store)[c].apply(d,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(c){t[c]=function(){var d;return(d=t.store)[c].apply(d,arguments),t}});var s=S8(),u=function(){var c=function(d,f){t.isInitialized&&!t.initializedStoreOnce&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),s.resolve(f),r(d,f)};if(t.languages&&t.options.compatibilityAPI!=="v1"&&!t.isInitialized)return c(null,t.t.bind(t));t.changeLanguage(t.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:GC,o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode")return r();var i=[],a=function(l){l&&n.services.languageUtils.toResolveHierarchy(l).forEach(function(s){i.indexOf(s)<0&&i.push(s)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(l){return a(l)}),this.options.preload&&this.options.preload.forEach(function(l){return a(l)}),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(t,n,r){var o=S8();return t||(t=this.languages),n||(n=this.options.ns),r||(r=GC),this.services.backendConnector.reload(t,n,function(i){o.resolve(),r(i)}),o}},{key:"use",value:function(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&f6e.addPostProcessor(t),t.type==="3rdParty"&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,n){var r=this;this.isLanguageChangingTo=t;var o=S8();this.emit("languageChanging",t);var i=function(a){t||a||!r.services.languageDetector||(a=[]);var l=typeof a=="string"?a:r.services.languageUtils.getBestMatchFromCodes(a);l&&(r.language||(r.language=l,r.languages=r.services.languageUtils.toResolveHierarchy(l)),r.translator.language||r.translator.changeLanguage(l),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(l)),r.loadResources(l,function(s){(function(u,c){c?(r.language=c,r.languages=r.services.languageUtils.toResolveHierarchy(c),r.translator.changeLanguage(c),r.isLanguageChangingTo=void 0,r.emit("languageChanged",c),r.logger.log("languageChanged",c)):r.isLanguageChangingTo=void 0,o.resolve(function(){return r.t.apply(r,arguments)}),n&&n(u,function(){return r.t.apply(r,arguments)})})(s,l)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(t):i(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(t,n,r){var o=this,i=function a(l,s){var u;if(nh(s)!=="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),f=2;f<c;f++)d[f-2]=arguments[f];u=o.options.overloadTranslationOptionHandler([l,s].concat(d))}else u=xi({},s);u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns;var p=o.options.keySeparator||".",m=r?"".concat(r).concat(p).concat(l):l;return o.t(m,u)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var n=this,r=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;var o=this.languages[0],i=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var l=function(u,c){var d=n.services.backendConnector.state["".concat(u,"|").concat(c)];return d===-1||d===2};if(r.precheck){var s=r.precheck(this,l);if(s!==void 0)return s}return!!this.hasResourceBundle(o,t)||!this.services.backendConnector.backend||!(!l(o,t)||i&&!l(a,t))}},{key:"loadNamespaces",value:function(t,n){var r=this,o=S8();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(function(i){r.options.ns.indexOf(i)<0&&r.options.ns.push(i)}),this.loadResources(function(i){o.resolve(),n&&n(i)}),o):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function(t,n){var r=S8();typeof t=="string"&&(t=[t]);var o=this.options.preload||[],i=t.filter(function(a){return o.indexOf(a)<0});return i.length?(this.options.preload=o.concat(i),this.loadResources(function(a){r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),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"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new e(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:GC,o=xi({},this.options,n,{isClone:!0}),i=new e(o);return["store","services","language"].forEach(function(a){i[a]=t[a]}),i.services=xi({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new h6e(i.services,i.options),i.translator.on("*",function(a){for(var l=arguments.length,s=new Array(l>1?l-1:0),u=1;u<l;u++)s[u-1]=arguments[u];i.emit.apply(i,[a].concat(s))}),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages}}}]),e}(),k8=new Eut;function Ul(e,t){k8.addResourceBundle(e,"translation",t,!0,!0)}k8.init({lng:"zh-CN",resources:{}});var jt=k8.t.bind(k8);Ul("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),Ul("zh-CN",{editor:{more:"\u66F4\u591A",justify:"\u5BF9\u9F50",indent:"\u7F29\u8FDB",image:"\u56FE\u7247",video:"\u89C6\u9891"}});var Cut=OP?{}.toString:function(){return"[object "+uE(this)+"]"};OP||j1(Object.prototype,"toString",Cut,{unsafe:!0});var m6e=Array.isArray||function(e){return I1(e)=="Array"},g6e=function(){},Sut=[],y6e=s6("Reflect","construct"),LH=/^\s*(?:class|function)\b/,kut=Kr(LH.exec),Dut=!LH.exec(g6e),D8=function(e){if(!Ri(e))return!1;try{return y6e(g6e,Sut,e),!0}catch{return!1}},Out=!y6e||ea(function(){var e;return D8(D8.call)||!D8(Object)||!D8(function(){e=!0})||e})?function(e){if(!Ri(e))return!1;switch(uE(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Dut||!!kut(LH,wP(e))}:D8,Tut=sl("species"),b6e=Ln.Array,Mut=function(e,t){return new(function(n){var r;return m6e(n)&&(r=n.constructor,(Out(r)&&(r===b6e||m6e(r.prototype))||Gc(r)&&(r=r[Tut])===null)&&(r=void 0)),r===void 0?b6e:r}(e))(t===0?0:t)},A6e=Kr([].push),oh=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=mP(s),v=wme(m),g=tge(u,c),b=aE(v),y=0,w=d||Mut,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:A6e(x,f)}else switch(e){case 4:return!1;case 7:A6e(x,f)}return i?-1:r||o?o:x}},Nut=[oh(0),oh(1),oh(2),oh(3),oh(4),oh(5),oh(6),oh(7)][0],Fut=function(){var e=[].forEach;return!!e&&ea(function(){e.call(null,function(){throw 1},1)})}(),PH=Fut?[].forEach:function(e){return Nut(this,e,arguments.length>1?arguments[1]:void 0)},w6e=function(e){if(e&&e.forEach!==PH)try{zl(e,"forEach",PH)}catch{e.forEach=PH}};for(var jH in vE)vE[jH]&&w6e(Ln[jH]&&Ln[jH].prototype);w6e(pge),Ul("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"}}),Ul("zh-CN",{common:{ok:"\u786E\u5B9A",delete:"\u5220\u9664",enter:"\u56DE\u8F66"},blockQuote:{title:"\u5F15\u7528"},codeBlock:{title:"\u4EE3\u7801\u5757"},color:{color:"\u6587\u5B57\u989C\u8272",bgColor:"\u80CC\u666F\u8272",default:"\u9ED8\u8BA4\u989C\u8272",clear:"\u6E05\u9664\u80CC\u666F\u8272"},divider:{title:"\u5206\u5272\u7EBF"},emotion:{title:"\u8868\u60C5"},fontSize:{title:"\u5B57\u53F7",default:"\u9ED8\u8BA4\u5B57\u53F7"},fontFamily:{title:"\u5B57\u4F53",default:"\u9ED8\u8BA4\u5B57\u4F53"},fullScreen:{title:"\u5168\u5C4F"},header:{title:"\u6807\u9898",text:"\u6B63\u6587"},image:{netImage:"\u7F51\u7EDC\u56FE\u7247",delete:"\u5220\u9664\u56FE\u7247",edit:"\u7F16\u8F91\u56FE\u7247",viewLink:"\u67E5\u770B\u94FE\u63A5",src:"\u56FE\u7247\u5730\u5740",desc:"\u56FE\u7247\u63CF\u8FF0",link:"\u56FE\u7247\u94FE\u63A5"},indent:{decrease:"\u51CF\u5C11\u7F29\u8FDB",increase:"\u589E\u52A0\u7F29\u8FDB"},justify:{left:"\u5DE6\u5BF9\u9F50",right:"\u53F3\u5BF9\u9F50",center:"\u5C45\u4E2D\u5BF9\u9F50",justify:"\u4E24\u7AEF\u5BF9\u9F50"},lineHeight:{title:"\u884C\u9AD8",default:"\u9ED8\u8BA4\u884C\u9AD8"},link:{insert:"\u63D2\u5165\u94FE\u63A5",text:"\u94FE\u63A5\u6587\u672C",url:"\u94FE\u63A5\u5730\u5740",unLink:"\u53D6\u6D88\u94FE\u63A5",edit:"\u4FEE\u6539\u94FE\u63A5",view:"\u67E5\u770B\u94FE\u63A5"},textStyle:{bold:"\u7C97\u4F53",clear:"\u6E05\u9664\u683C\u5F0F",code:"\u884C\u5185\u4EE3\u7801",italic:"\u659C\u4F53",sub:"\u4E0B\u6807",sup:"\u4E0A\u6807",through:"\u5220\u9664\u7EBF",underline:"\u4E0B\u5212\u7EBF"},undo:{undo:"\u64A4\u9500",redo:"\u91CD\u505A"},todo:{todo:"\u5F85\u529E"}});var Rut={type:"paragraph",renderElem:function(e,t,n){return Mn("p",null,t)}},qC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function KC(e){var t={exports:{}};return e(t,t.exports),t.exports}var ih,YC,XC=function(e){return e&&e.Math==Math&&e},Gn=XC(typeof globalThis=="object"&&globalThis)||XC(typeof window=="object"&&window)||XC(typeof self=="object"&&self)||XC(typeof qC=="object"&&qC)||function(){return this}()||Function("return this")(),Oo=function(e){try{return!!e()}catch{return!0}},Ju=!Oo(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),O8=Function.prototype.call,oi=O8.bind?O8.bind(O8):function(){return O8.apply(O8,arguments)},x6e={}.propertyIsEnumerable,_6e=Object.getOwnPropertyDescriptor,Iut=_6e&&!x6e.call({1:2},1)?function(e){var t=_6e(this,e);return!!t&&t.enumerable}:x6e,E6e={f:Iut},VH=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},C6e=Function.prototype,zH=C6e.bind,HH=C6e.call,But=zH&&zH.bind(HH),On=zH?function(e){return e&&But(HH,e)}:function(e){return e&&function(){return HH.apply(e,arguments)}},Lut=On({}.toString),Put=On("".slice),ah=function(e){return Put(Lut(e),8,-1)},$H=Gn.Object,jut=On("".split),QC=Oo(function(){return!$H("z").propertyIsEnumerable(0)})?function(e){return ah(e)=="String"?jut(e,""):$H(e)}:$H,Vut=Gn.TypeError,hu=function(e){if(e==null)throw Vut("Can't call method on "+e);return e},ny=function(e){return QC(hu(e))},La=function(e){return typeof e=="function"},Zu=function(e){return typeof e=="object"?e!==null:La(e)},T8=function(e,t){return arguments.length<2?function(n){return La(n)?n:void 0}(Gn[e]):Gn[e]&&Gn[e][t]},S6e=On({}.isPrototypeOf),UH=T8("navigator","userAgent")||"",k6e=Gn.process,D6e=Gn.Deno,O6e=k6e&&k6e.versions||D6e&&D6e.version,T6e=O6e&&O6e.v8;T6e&&(YC=(ih=T6e.split("."))[0]>0&&ih[0]<4?1:+(ih[0]+ih[1])),!YC&&UH&&(!(ih=UH.match(/Edge\/(\d+)/))||ih[1]>=74)&&(ih=UH.match(/Chrome\/(\d+)/))&&(YC=+ih[1]);var WH=YC,GH=!!Object.getOwnPropertySymbols&&!Oo(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&WH&&WH<41}),qH=GH&&!Symbol.sham&&typeof Symbol.iterator=="symbol",zut=Gn.Object,KH=qH?function(e){return typeof e=="symbol"}:function(e){var t=T8("Symbol");return La(t)&&S6e(t.prototype,zut(e))},Hut=Gn.String,M6e=function(e){try{return Hut(e)}catch{return"Object"}},$ut=Gn.TypeError,N6e=function(e){if(La(e))return e;throw $ut(M6e(e)+" is not a function")},JC=function(e,t){var n=e[t];return n==null?void 0:N6e(n)},Uut=Gn.TypeError,Wut=Object.defineProperty,YH=function(e,t){try{Wut(Gn,e,{value:t,configurable:!0,writable:!0})}catch{Gn[e]=t}return t},lh=Gn["__core-js_shared__"]||YH("__core-js_shared__",{}),XH=KC(function(e){(e.exports=function(t,n){return lh[t]||(lh[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),Gut=Gn.Object,M8=function(e){return Gut(hu(e))},qut=On({}.hasOwnProperty),vu=Object.hasOwn||function(e,t){return qut(M8(e),t)},Kut=0,Yut=Math.random(),Xut=On(1 .toString),F6e=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Xut(++Kut+Yut,36)},N8=XH("wks"),gv=Gn.Symbol,R6e=gv&&gv.for,Qut=qH?gv:gv&&gv.withoutSetter||F6e,Ts=function(e){if(!vu(N8,e)||!GH&&typeof N8[e]!="string"){var t="Symbol."+e;GH&&vu(gv,e)?N8[e]=gv[e]:N8[e]=qH&&R6e?R6e(t):Qut(t)}return N8[e]},Jut=Gn.TypeError,Zut=Ts("toPrimitive"),QH=function(e){var t=function(n){if(!Zu(n)||KH(n))return n;var r,o=JC(n,Zut);if(o){if(r=oi(o,n,"string"),!Zu(r)||KH(r))return r;throw Jut("Can't convert object to primitive value")}return function(i){var a,l;if(La(a=i.toString)&&!Zu(l=oi(a,i))||La(a=i.valueOf)&&!Zu(l=oi(a,i)))return l;throw Uut("Can't convert object to primitive value")}(n)}(e);return KH(t)?t:t+""},JH=Gn.document,ect=Zu(JH)&&Zu(JH.createElement),ZH=function(e){return ect?JH.createElement(e):{}},I6e=!Ju&&!Oo(function(){return Object.defineProperty(ZH("div"),"a",{get:function(){return 7}}).a!=7}),B6e=Object.getOwnPropertyDescriptor,e$={f:Ju?B6e:function(e,t){if(e=ny(e),t=QH(t),I6e)try{return B6e(e,t)}catch{}if(vu(e,t))return VH(!oi(E6e.f,e,t),e[t])}},tct=Gn.String,nct=Gn.TypeError,Ms=function(e){if(Zu(e))return e;throw nct(tct(e)+" is not an object")},rct=Gn.TypeError,L6e=Object.defineProperty,ry={f:Ju?L6e:function(e,t,n){if(Ms(e),t=QH(t),Ms(n),I6e)try{return L6e(e,t,n)}catch{}if("get"in n||"set"in n)throw rct("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},oy=Ju?function(e,t,n){return ry.f(e,t,VH(1,n))}:function(e,t,n){return e[t]=n,e},oct=On(Function.toString);La(lh.inspectSource)||(lh.inspectSource=function(e){return oct(e)});var ZC,F8,eS,t$=lh.inspectSource,P6e=Gn.WeakMap,ict=La(P6e)&&/native code/.test(t$(P6e)),j6e=XH("keys"),V6e=function(e){return j6e[e]||(j6e[e]=F6e(e))},n$={},r$=Gn.TypeError,act=Gn.WeakMap;if(ict||lh.state){var yv=lh.state||(lh.state=new act),lct=On(yv.get),z6e=On(yv.has),sct=On(yv.set);ZC=function(e,t){if(z6e(yv,e))throw new r$("Object already initialized");return t.facade=e,sct(yv,e,t),t},F8=function(e){return lct(yv,e)||{}},eS=function(e){return z6e(yv,e)}}else{var iy=V6e("state");n$[iy]=!0,ZC=function(e,t){if(vu(e,iy))throw new r$("Object already initialized");return t.facade=e,oy(e,iy,t),t},F8=function(e){return vu(e,iy)?e[iy]:{}},eS=function(e){return vu(e,iy)}}var o$={set:ZC,get:F8,has:eS,enforce:function(e){return eS(e)?F8(e):ZC(e,{})},getterFor:function(e){return function(t){var n;if(!Zu(t)||(n=F8(t)).type!==e)throw r$("Incompatible receiver, "+e+" required");return n}}},H6e=Function.prototype,uct=Ju&&Object.getOwnPropertyDescriptor,i$=vu(H6e,"name"),tS={EXISTS:i$,PROPER:i$&&(function(){}).name==="something",CONFIGURABLE:i$&&(!Ju||Ju&&uct(H6e,"name").configurable)},R8=KC(function(e){var t=tS.CONFIGURABLE,n=o$.get,r=o$.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;La(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!vu(l,"name")||t&&l.name!==p)&&oy(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==Gn?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:oy(i,a,l)):d?i[a]=l:YH(a,l)})(Function.prototype,"toString",function(){return La(this)&&n(this).source||t$(this)})}),cct=Math.ceil,dct=Math.floor,ay=function(e){var t=+e;return t!=t||t===0?0:(t>0?dct:cct)(t)},fct=Math.max,pct=Math.min,I8=function(e,t){var n=ay(e);return n<0?fct(n+t,0):pct(n,t)},hct=Math.min,B8=function(e){return e>0?hct(ay(e),9007199254740991):0},nS=function(e){return B8(e.length)},$6e=function(e){return function(t,n,r){var o,i=ny(t),a=nS(i),l=I8(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},U6e={includes:$6e(!0),indexOf:$6e(!1)},vct=U6e.indexOf,W6e=On([].push),G6e=function(e,t){var n,r=ny(e),o=0,i=[];for(n in r)!vu(n$,n)&&vu(r,n)&&W6e(i,n);for(;t.length>o;)vu(r,n=t[o++])&&(~vct(i,n)||W6e(i,n));return i},rS=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mct=rS.concat("length","prototype"),gct={f:Object.getOwnPropertyNames||function(e){return G6e(e,mct)}},q6e={f:Object.getOwnPropertySymbols},yct=On([].concat),bct=T8("Reflect","ownKeys")||function(e){var t=gct.f(Ms(e)),n=q6e.f;return n?yct(t,n(e)):t},Act=function(e,t){for(var n=bct(t),r=ry.f,o=e$.f,i=0;i<n.length;i++){var a=n[i];vu(e,a)||r(e,a,o(t,a))}},wct=/#|\.prototype\./,L8=function(e,t){var n=_ct[xct(e)];return n==Cct||n!=Ect&&(La(t)?Oo(t):!!t)},xct=L8.normalize=function(e){return String(e).replace(wct,".").toLowerCase()},_ct=L8.data={},Ect=L8.NATIVE="N",Cct=L8.POLYFILL="P",Sct=L8,kct=e$.f,Bi=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?Gn:u?Gn[l]||YH(l,{}):(Gn[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=kct(n,r))&&a.value:n[r],!Sct(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;Act(i,o)}(e.sham||o&&o.sham)&&oy(i,"sham",!0),R8(n,r,i,e)}},K6e=On(On.bind),oS=Array.isArray||function(e){return ah(e)=="Array"},Y6e={};Y6e[Ts("toStringTag")]="z";var a$=String(Y6e)==="[object z]",Dct=Ts("toStringTag"),Oct=Gn.Object,Tct=ah(function(){return arguments}())=="Arguments",l$=a$?ah:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=Oct(e),Dct))=="string"?n:Tct?ah(t):(r=ah(t))=="Object"&&La(t.callee)?"Arguments":r},X6e=function(){},Mct=[],Q6e=T8("Reflect","construct"),s$=/^\s*(?:class|function)\b/,Nct=On(s$.exec),Fct=!s$.exec(X6e),P8=function(e){if(!La(e))return!1;try{return Q6e(X6e,Mct,e),!0}catch{return!1}},u$=!Q6e||Oo(function(){var e;return P8(P8.call)||!P8(Object)||!P8(function(){e=!0})||e})?function(e){if(!La(e))return!1;switch(l$(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Fct||!!Nct(s$,t$(e))}:P8,Rct=Ts("species"),J6e=Gn.Array,Ict=function(e,t){return new(function(n){var r;return oS(n)&&(r=n.constructor,(u$(r)&&(r===J6e||oS(r.prototype))||Zu(r)&&(r=r[Rct])===null)&&(r=void 0)),r===void 0?J6e:r}(e))(t===0?0:t)},Z6e=On([].push),sh=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=M8(s),v=QC(m),g=function(_,E){return N6e(_),E===void 0?_:K6e?K6e(_,E):function(){return _.apply(E,arguments)}}(u,c),b=nS(v),y=0,w=d||Ict,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:Z6e(x,f)}else switch(e){case 4:return!1;case 7:Z6e(x,f)}return i?-1:r||o?o:x}},iS={forEach:sh(0),map:sh(1),filter:sh(2),some:sh(3),every:sh(4),find:sh(5),findIndex:sh(6),filterReject:sh(7)},Bct=Ts("species"),c$=function(e){return WH>=51||!Oo(function(){var t=[];return(t.constructor={})[Bct]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Lct=iS.filter;Bi({target:"Array",proto:!0,forced:!c$("filter")},{filter:function(e){return Lct(this,e,arguments.length>1?arguments[1]:void 0)}});var Pct=a$?{}.toString:function(){return"[object "+l$(this)+"]"};a$||R8(Object.prototype,"toString",Pct,{unsafe:!0});var aS,jct=Gn.String,To=function(e){if(l$(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return jct(e)},e8e=function(){var e=Ms(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},d$=Gn.RegExp,f$=Oo(function(){var e=d$("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Vct=f$||Oo(function(){return!d$("a","y").sticky}),t8e={BROKEN_CARET:f$||Oo(function(){var e=d$("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:Vct,UNSUPPORTED_Y:f$},ly=Object.keys||function(e){return G6e(e,rS)},zct=Ju?Object.defineProperties:function(e,t){Ms(e);for(var n,r=ny(t),o=ly(t),i=o.length,a=0;i>a;)ry.f(e,n=o[a++],r[n]);return e},Hct=T8("document","documentElement"),n8e=V6e("IE_PROTO"),p$=function(){},r8e=function(e){return"<script>"+e+"<\/script>"},o8e=function(e){e.write(r8e("")),e.close();var t=e.parentWindow.Object;return e=null,t},lS=function(){try{aS=new ActiveXObject("htmlfile")}catch{}var e,t;lS=typeof document<"u"?document.domain&&aS?o8e(aS):((t=ZH("iframe")).style.display="none",Hct.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(r8e("document.F=Object")),e.close(),e.F):o8e(aS);for(var n=rS.length;n--;)delete lS.prototype[rS[n]];return lS()};n$[n8e]=!0;var i8e,h$,a8e=Object.create||function(e,t){var n;return e!==null?(p$.prototype=Ms(e),n=new p$,p$.prototype=null,n[n8e]=e):n=lS(),t===void 0?n:zct(n,t)},$ct=Gn.RegExp,Uct=Oo(function(){var e=$ct(".","s");return!(e.dotAll&&e.exec(` |
|
1034 |
`)&&e.flags==="s")}),Wct=Gn.RegExp,Gct=Oo(function(){var e=Wct("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),qct=o$.get,Kct=XH("native-string-replace",String.prototype.replace),sS=RegExp.prototype.exec,v$=sS,Yct=On("".charAt),Xct=On("".indexOf),Qct=On("".replace),m$=On("".slice),g$=(h$=/b*/g,oi(sS,i8e=/a/,"a"),oi(sS,h$,"a"),i8e.lastIndex!==0||h$.lastIndex!==0),l8e=t8e.BROKEN_CARET,y$=/()??/.exec("")[1]!==void 0;(g$||y$||l8e||Uct||Gct)&&(v$=function(e){var t,n,r,o,i,a,l,s=this,u=qct(s),c=To(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=oi(v$,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=l8e&&s.sticky,m=oi(e8e,s),v=s.source,g=0,b=c;if(p&&(m=Qct(m,"y",""),Xct(m,"g")===-1&&(m+="g"),b=m$(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Yct(c,s.lastIndex-1)!==` |
|
1035 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),y$&&(n=new RegExp("^"+v+"$(?!\\s)",m)),g$&&(r=s.lastIndex),o=oi(sS,p?n:s,b),p?o?(o.input=m$(o.input,g),o[0]=m$(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:g$&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),y$&&o&&o.length>1&&oi(Kct,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=a8e(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var j8=v$;Bi({target:"RegExp",proto:!0,forced:/./.exec!==j8},{exec:j8});var b$=Function.prototype,s8e=b$.apply,Jct=b$.bind,u8e=b$.call,c8e=typeof Reflect=="object"&&Reflect.apply||(Jct?u8e.bind(s8e):function(){return u8e.apply(s8e,arguments)}),Zct=Ts("species"),A$=RegExp.prototype,w$=function(e,t,n,r){var o=Ts(e),i=!Oo(function(){var u={};return u[o]=function(){return 7},""[e](u)!=7}),a=i&&!Oo(function(){var u=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[Zct]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return u=!0,null},c[o](""),!u});if(!i||!a||n){var l=On(/./[o]),s=t(o,""[e],function(u,c,d,f,p){var m=On(u),v=c.exec;return v===j8||v===A$.exec?i&&!p?{done:!0,value:l(c,d,f)}:{done:!0,value:m(d,c,f)}:{done:!1}});R8(String.prototype,e,s[0]),R8(A$,o,s[1])}r&&oy(A$[o],"sham",!0)},edt=On("".charAt),d8e=On("".charCodeAt),tdt=On("".slice),ndt=function(e){return function(t,n){var r,o,i=To(hu(t)),a=ay(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=d8e(i,a))<55296||r>56319||a+1===l||(o=d8e(i,a+1))<56320||o>57343?e?edt(i,a):r:e?tdt(i,a,a+2):o-56320+(r-55296<<10)+65536}}(!0),x$=function(e,t,n){return t+(n?ndt(e,t).length:1)},rdt=Math.floor,_$=On("".charAt),odt=On("".replace),E$=On("".slice),idt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,adt=/\$([$&'`]|\d{1,2})/g,ldt=function(e,t,n,r,o,i){var a=n+e.length,l=r.length,s=adt;return o!==void 0&&(o=M8(o),s=idt),odt(i,s,function(u,c){var d;switch(_$(c,0)){case"$":return"$";case"&":return e;case"`":return E$(t,0,n);case"'":return E$(t,a);case"<":d=o[E$(c,1,-1)];break;default:var f=+c;if(f===0)return u;if(f>l){var p=rdt(f/10);return p===0?u:p<=l?r[p-1]===void 0?_$(c,1):r[p-1]+_$(c,1):u}d=r[f-1]}return d===void 0?"":d})},sdt=Gn.TypeError,V8=function(e,t){var n=e.exec;if(La(n)){var r=oi(n,e,t);return r!==null&&Ms(r),r}if(ah(e)==="RegExp")return oi(j8,e,t);throw sdt("RegExp#exec called on incompatible receiver")},C$=Ts("replace"),udt=Math.max,cdt=Math.min,ddt=On([].concat),S$=On([].push),f8e=On("".indexOf),p8e=On("".slice),fdt="a".replace(/./,"$0")==="$0",h8e=!!/./[C$]&&/./[C$]("a","$0")==="";w$("replace",function(e,t,n){var r=h8e?"$":"$0";return[function(o,i){var a=hu(this),l=o==null?void 0:JC(o,C$);return l?oi(l,o,a,i):oi(t,To(a),o,i)},function(o,i){var a=Ms(this),l=To(o);if(typeof i=="string"&&f8e(i,r)===-1&&f8e(i,"$<")===-1){var s=n(t,a,l,i);if(s.done)return s.value}var u=La(i);u||(i=To(i));var c=a.global;if(c){var d=a.unicode;a.lastIndex=0}for(var f=[];;){var p=V8(a,l);if(p===null||(S$(f,p),!c))break;To(p[0])===""&&(a.lastIndex=x$(l,B8(a.lastIndex),d))}for(var m,v="",g=0,b=0;b<f.length;b++){for(var y=To((p=f[b])[0]),w=udt(cdt(ay(p.index),l.length),0),x=[],_=1;_<p.length;_++)S$(x,(m=p[_])===void 0?m:String(m));var E=p.groups;if(u){var C=ddt([y],x,w,l);E!==void 0&&S$(C,E);var T=To(c8e(i,void 0,C))}else T=ldt(y,l,w,x,E,i);w>=g&&(v+=p8e(l,g,w)+T,g=w+y.length)}return v+p8e(l,g)}]},!!Oo(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!fdt||h8e);var k$=Ts("unscopables"),D$=Array.prototype;D$[k$]==null&&ry.f(D$,k$,{configurable:!0,value:a8e(null)});var v8e=function(e){D$[k$][e]=!0},pdt=iS.find,m8e=!0;"find"in[]&&Array(1).find(function(){m8e=!1}),Bi({target:"Array",proto:!0,forced:m8e},{find:function(e){return pdt(this,e,arguments.length>1?arguments[1]:void 0)}}),v8e("find");var hdt=Ts("match"),g8e=function(e){var t;return Zu(e)&&((t=e[hdt])!==void 0?!!t:ah(e)=="RegExp")},vdt=Gn.TypeError,mdt=Ts("species"),y8e=function(e,t,n){var r=QH(t);r in e?ry.f(e,r,VH(0,n)):e[r]=n},gdt=Gn.Array,ydt=Math.max,b8e=function(e,t,n){for(var r=nS(e),o=I8(t,r),i=I8(n===void 0?r:n,r),a=gdt(ydt(i-o,0)),l=0;o<i;o++,l++)y8e(a,l,e[o]);return a.length=l,a},sy=t8e.UNSUPPORTED_Y,bdt=Math.min,A8e=[].push,Adt=On(/./.exec),uy=On(A8e),z8=On("".slice);w$("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(o,i){var a=To(hu(this)),l=i===void 0?4294967295:i>>>0;if(l===0)return[];if(o===void 0)return[a];if(!g8e(o))return oi(t,a,o,l);for(var s,u,c,d=[],f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(o.sticky?"y":""),p=0,m=new RegExp(o.source,f+"g");(s=oi(j8,m,a))&&!((u=m.lastIndex)>p&&(uy(d,z8(a,p,s.index)),s.length>1&&s.index<a.length&&c8e(A8e,d,b8e(s,1)),c=s[0].length,p=u,d.length>=l));)m.lastIndex===s.index&&m.lastIndex++;return p===a.length?!c&&Adt(m,"")||uy(d,""):uy(d,z8(a,p)),d.length>l?b8e(d,0,l):d}:"0".split(void 0,0).length?function(o,i){return o===void 0&&i===0?[]:oi(t,this,o,i)}:t,[function(o,i){var a=hu(this),l=o==null?void 0:JC(o,e);return l?oi(l,o,a,i):oi(r,To(a),o,i)},function(o,i){var a=Ms(this),l=To(o),s=n(r,a,l,i,r!==t);if(s.done)return s.value;var u=function(x,_){var E,C=Ms(x).constructor;return C===void 0||(E=Ms(C)[mdt])==null?_:function(T){if(u$(T))return T;throw vdt(M6e(T)+" is not a constructor")}(E)}(a,RegExp),c=a.unicode,d=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(sy?"g":"y"),f=new u(sy?"^(?:"+a.source+")":a,d),p=i===void 0?4294967295:i>>>0;if(p===0)return[];if(l.length===0)return V8(f,l)===null?[l]:[];for(var m=0,v=0,g=[];v<l.length;){f.lastIndex=sy?0:v;var b,y=V8(f,sy?z8(l,v):l);if(y===null||(b=bdt(B8(f.lastIndex+(sy?v:0)),l.length))===m)v=x$(l,v,c);else{if(uy(g,z8(l,m,v)),g.length===p)return g;for(var w=1;w<=y.length-1;w++)if(uy(g,y[w]),g.length===p)return g;v=m=b}}return uy(g,z8(l,m)),g}]},!!Oo(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),sy);var O$=` |
|
1036 |
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,w8e=On("".replace),uS="["+O$+"]",wdt=RegExp("^"+uS+uS+"*"),xdt=RegExp(uS+uS+"*$"),T$=function(e){return function(t){var n=To(hu(t));return 1&e&&(n=w8e(n,wdt,"")),2&e&&(n=w8e(n,xdt,"")),n}},_dt={start:T$(1),end:T$(2),trim:T$(3)},Edt=tS.PROPER,Cdt=_dt.trim;function M$(e){return Le("<div>"+e+"</div>").children().filter(function(t){return t.tagName!=="BR"}).length===0}function cy(e){return e.length===0?"":e[0].outerHTML}function dy(e){return e.length?e[0].tagName.toLowerCase():""}function ec(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i++){var a=r[i];if(a){var l=a.split(":");l[0].trim()===t&&(n=l[1].trim())}}return n}Bi({target:"String",proto:!0,forced:Oo(function(){return!!O$.trim()||"\u200B\x85\u180E".trim()!=="\u200B\x85\u180E"||Edt&&O$.trim.name!=="trim"})},{trim:function(){return Cdt(this)}}),Bi({global:!0},{globalThis:Gn}),LE&&(Le.fn.css=LE),au&&(Le.fn.append=au),z2e&&(Le.fn.prepend=z2e),m2&&(Le.fn.addClass=m2),g2&&(Le.fn.removeClass=g2),y2&&(Le.fn.hasClass=y2),Yc&&(Le.fn.on=Yc),L2e&&(Le.fn.off=L2e),$p&&(Le.fn.focus=$p),iu&&(Le.fn.attr=iu),FE&&(Le.fn.removeAttr=FE),A2&&(Le.fn.hide=A2),BE&&(Le.fn.show=BE),VE&&(Le.fn.parents=VE),b2&&(Le.fn.dataset=b2),Kc&&(Le.fn.val=Kc),jE&&(Le.fn.text=jE),Hp&&(Le.fn.html=Hp),_2&&(Le.fn.children=_2),E2&&(Le.fn.remove=E2),x2&&(Le.fn.find=x2),RE&&(Le.fn.width=RE),IE&&(Le.fn.height=IE),j2e&&(Le.fn.filter=j2e),C2&&(Le.fn.empty=C2);var Sdt={selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e);return(t=t.filter(function(o){return!!Qt.isText(o)||!!n.isInline(o)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}},N$=function(e,t){return N$=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},N$(e,t)};function yo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}N$(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var uh=function(){return uh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},uh.apply(this,arguments)};function ch(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(u){try{s(r.next(u))}catch(c){i(c)}}function l(u){try{s(r.throw(u))}catch(c){i(c)}}function s(u){var c;u.done?o(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(a,l)}s((r=r.apply(e,[])).next())})}function dh(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(s){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(c[0]===6&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(d){c=[6,d],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,u])}}}function x8e(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Or(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function _8e(e){var t=Or(ue.nodes(e,{match:function(i){return e.children[0]===i},mode:"highest"}),1)[0];if(t==null)return!1;var n=t[0];if(!sn.isElement(n)||n.type==="paragraph"||Pt.string(n)!=="")return!1;var r=n.children,o=r===void 0?[]:r;return!!Qt.isText(o[0])&&(et.setNodes(e,{type:"paragraph"}),!0)}var kdt={renderElems:[Rut],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return t===""?"<p><br></p>":"<p>"+t+"</p>"}}],parseElemsHtml:[Sdt],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward;e.insertText,e.insertBreak;var r=e;return r.deleteBackward=function(o){_8e(r)||t(o)},r.deleteForward=function(o){_8e(r)||n(o)},r}},Ddt=/"/g,Odt=On("".replace),H8=function(e,t,n,r){var o=To(hu(e)),i="<"+t;return n!==""&&(i+=" "+n+'="'+Odt(To(r),Ddt,""")+'"'),i+">"+o+"</"+t+">"},$8=function(e){return Oo(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})};function F$(e,t){var n=t,r=e,o=r.bold,i=r.italic,a=r.underline;return o&&(n="<strong>"+n+"</strong>"),r.code&&(n="<code>"+n+"</code>"),i&&(n="<em>"+n+"</em>"),a&&(n="<u>"+n+"</u>"),r.through&&(n="<s>"+n+"</s>"),r.sub&&(n="<sub>"+n+"</sub>"),r.sup&&(n="<sup>"+n+"</sup>"),n}function bv(e,t){return e.length!==0&&(!!e[0].matches(t)||e.find(t).length>0)}Bi({target:"String",proto:!0,forced:$8("bold")},{bold:function(){return H8(this,"b","","")}}),Bi({target:"String",proto:!0,forced:$8("italics")},{italics:function(){return H8(this,"i","","")}}),Bi({target:"String",proto:!0,forced:$8("sub")},{sub:function(){return H8(this,"sub","","")}}),Bi({target:"String",proto:!0,forced:$8("sup")},{sup:function(){return H8(this,"sup","","")}});var E8e={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},R$=ZH("span").classList,C8e=R$&&R$.constructor&&R$.constructor.prototype,Tdt=C8e===Object.prototype?void 0:C8e,S8e=function(e,t){var n=[][e];return!!n&&Oo(function(){n.call(null,t||function(){throw 1},1)})},Mdt=iS.forEach,I$=S8e("forEach")?[].forEach:function(e){return Mdt(this,e,arguments.length>1?arguments[1]:void 0)},k8e=function(e){if(e&&e.forEach!==I$)try{oy(e,"forEach",I$)}catch{e.forEach=I$}};for(var B$ in E8e)E8e[B$]&&k8e(Gn[B$]&&Gn[B$].prototype);function D8e(e,t){return e.selection==null||!!Or(ue.nodes(e,{match:function(n){return Re.getNodeType(n)==="pre"||!!ue.isVoid(e,n)},universal:!0}),1)[0]}function Ndt(e,t){Object.keys(t).forEach(function(n){n!=="text"&&ue.removeMark(e,n)})}k8e(Tdt),Bi({target:"Object",stat:!0,forced:Oo(function(){ly(1)})},{keys:function(e){return ly(M8(e))}});var Av=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(t){var n=this.mark,r=ue.marks(t);return r?r[n]:!!Or(ue.nodes(t,{match:function(o){return o[n]===!0}}),1)[0]},e.prototype.isActive=function(t){return!!this.getValue(t)},e.prototype.isDisabled=function(t){return D8e(t,this.mark)},e.prototype.exec=function(t,n){var r=this.mark,o=this.marksNeedToRemove;n?t.removeMark(r):(t.addMark(r,!0),o&&o.forEach(function(i){return t.removeMark(i)}))},e}(),O8e='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',T8e='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',Fdt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="bold",n.title=jt("textStyle.bold"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',n.hotkey="mod+b",n}return yo(t,e),t}(Av),Rdt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="code",n.title=jt("textStyle.code"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',n.hotkey="mod+e",n}return yo(t,e),t}(Av),Idt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="italic",n.title=jt("textStyle.italic"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',n.hotkey="mod+i",n}return yo(t,e),t}(Av),Bdt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="through",n.title=jt("textStyle.through"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',n.hotkey="mod+shift+x",n}return yo(t,e),t}(Av),Ldt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="underline",n.title=jt("textStyle.underline"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',n.hotkey="mod+u",n}return yo(t,e),t}(Av),Pdt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="sub",n.marksNeedToRemove=["sup"],n.title=jt("textStyle.sub"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',n.hotkey="",n}return yo(t,e),t}(Av),jdt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="sup",n.marksNeedToRemove=["sub"],n.title=jt("textStyle.sup"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',n.hotkey="",n}return yo(t,e),t}(Av),Vdt=function(){function e(){this.title=jt("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return D8e(t)},e.prototype.exec=function(t,n){var r,o,i=ue.nodes(t,{match:function(s){return Qt.isText(s)},universal:!0});try{for(var a=x8e(i),l=a.next();!l.done;l=a.next())Ndt(t,l.value[0])}catch(s){r={error:s}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}},e}(),zdt={renderStyle:function(e,t){var n=e,r=n.bold,o=n.italic,i=n.underline,a=n.code,l=n.through,s=n.sub,u=n.sup,c=t;return r&&(c=Mn("strong",null,c)),a&&(c=Mn("code",null,c)),o&&(c=Mn("em",null,c)),i&&(c=Mn("u",null,c)),l&&(c=Mn("s",null,c)),s&&(c=Mn("sub",null,c)),u&&(c=Mn("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new Fdt}},{key:"underline",factory:function(){return new Ldt}},{key:"italic",factory:function(){return new Idt}},{key:"through",factory:function(){return new Bdt}},{key:"code",factory:function(){return new Rdt}},{key:"sub",factory:function(){return new Pdt}},{key:"sup",factory:function(){return new jdt}},{key:"clearStyle",factory:function(){return new Vdt}}],styleToHtml:function(e,t){if(!Qt.isText(e))return t;if(M$(t))return F$(e,t);var n=Le(t);if(dy(n)==="br")return F$(e,"<br>");var r=n.html();return r=F$(e,r),n.html(r),cy(n)},parseStyleHtml:function(e,t,n){var r=Le(e);if(!Qt.isText(t))return t;var o=t;return bv(r,"b,strong")&&(o.bold=!0),bv(r,"i,em")&&(o.italic=!0),bv(r,"u")&&(o.underline=!0),bv(r,"s,strike")&&(o.through=!0),bv(r,"sub")&&(o.sub=!0),bv(r,"sup")&&(o.sup=!0),bv(r,"code")&&(o.code=!0),o}};function U8(e){return function(t,n,r){return Mn("h"+e,null,n)}}var Hdt={type:"header1",renderElem:U8(1)},$dt={type:"header2",renderElem:U8(2)},Udt={type:"header3",renderElem:U8(3)},Wdt={type:"header4",renderElem:U8(4)},Gdt={type:"header5",renderElem:U8(5)},qdt=tS.PROPER,L$=RegExp.prototype,M8e=L$.toString,Kdt=On(e8e),Ydt=Oo(function(){return M8e.call({source:"a",flags:"b"})!="/a/b"}),Xdt=qdt&&M8e.name!="toString";(Ydt||Xdt)&&R8(RegExp.prototype,"toString",function(){var e=Ms(this),t=To(e.source),n=e.flags;return"/"+t+"/"+To(n===void 0&&S6e(L$,e)&&!("flags"in L$)?Kdt(e):n)},{unsafe:!0});var P$,Qdt=Gn.TypeError,N8e=function(e){if(g8e(e))throw Qdt("The method doesn't accept regular expressions");return e},Jdt=Ts("match"),F8e=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[Jdt]=!1,"/./"[e](t)}catch{}}return!1},Zdt=e$.f,R8e=On("".startsWith),eft=On("".slice),tft=Math.min,I8e=F8e("startsWith");function B8e(e){var t=Or(ue.nodes(e,{match:function(o){return Re.getNodeType(o).startsWith("header")},universal:!0}),1),n=t[0];if(n==null)return"paragraph";var r=Or(n,1)[0];return Re.getNodeType(r)}function L8e(e){return e.selection==null||!Or(ue.nodes(e,{match:function(t){var n=Re.getNodeType(t);return n==="paragraph"||!!n.startsWith("header")},universal:!0,mode:"highest"}),1)[0]}function P8e(e,t){t&&et.setNodes(e,{type:t})}Bi({target:"String",proto:!0,forced:!(!I8e&&(P$=Zdt(String.prototype,"startsWith"),P$&&!P$.writable)||I8e)},{startsWith:function(e){var t=To(hu(this));N8e(e);var n=B8(tft(arguments.length>1?arguments[1]:void 0,t.length)),r=To(e);return R8e?R8e(t,r,n):eft(t,n,n+r.length)===r}});var nft=function(){function e(){this.title=jt("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return e.prototype.getOptions=function(t){var n=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"paragraph",text:jt("header.text")}],r=this.getValue(t).toString();return n.forEach(function(o){o.value===r?o.selected=!0:delete o.selected}),n},e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){return B8e(t)},e.prototype.isDisabled=function(t){return L8e(t)},e.prototype.exec=function(t,n){P8e(t,n.toString())},e}(),W8=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){return B8e(t)},e.prototype.isActive=function(t){return this.getValue(t)===this.type},e.prototype.isDisabled=function(t){return L8e(t)},e.prototype.exec=function(t,n){var r=this.type;P8e(t,n===r?"paragraph":r)},e}(),rft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H1",n.type="header1",n}return yo(t,e),t}(W8),oft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H2",n.type="header2",n}return yo(t,e),t}(W8),ift=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H3",n.type="header3",n}return yo(t,e),t}(W8),aft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H4",n.type="header4",n}return yo(t,e),t}(W8),lft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H5",n.type="header5",n}return yo(t,e),t}(W8),sft={key:"headerSelect",factory:function(){return new nft}},uft={key:"header1",factory:function(){return new rft}},cft={key:"header2",factory:function(){return new oft}},dft={key:"header3",factory:function(){return new ift}},fft={key:"header4",factory:function(){return new aft}},pft={key:"header5",factory:function(){return new lft}};function G8(e){return function(t,n){return"<h"+e+">"+n+"</h"+e+">"}}function q8(e){return function(t,n,r){var o=Le(t);return(n=n.filter(function(i){return!!Qt.isText(i)||!!r.isInline(i)})).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header"+e,children:n}}}var hft={renderElems:[Hdt,$dt,Udt,Wdt,Gdt],elemsToHtml:[{type:"header1",elemToHtml:G8(1)},{type:"header2",elemToHtml:G8(2)},{type:"header3",elemToHtml:G8(3)},{type:"header4",elemToHtml:G8(4)},{type:"header5",elemToHtml:G8(5)}],parseElemsHtml:[{selector:"h1:not([data-w-e-type])",parseElemHtml:q8(1)},{selector:"h2:not([data-w-e-type])",parseElemHtml:q8(2)},{selector:"h3:not([data-w-e-type])",parseElemHtml:q8(3)},{selector:"h4:not([data-w-e-type])",parseElemHtml:q8(4)},{selector:"h5:not([data-w-e-type])",parseElemHtml:q8(5)}],menus:[sft,uft,cft,dft,fft,pft],editorPlugin:function(e){var t=e.insertBreak;e.insertNode;var n=e;return n.insertBreak=function(){var r=Or(ue.nodes(n,{match:function(o){return Re.getNodeType(o).startsWith("header")},universal:!0}),1)[0];r&&Re.isSelectionAtLineEnd(e,r[1])?et.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"}):t()},n}},fy=Object.assign,j8e=Object.defineProperty,vft=On([].concat),V8e=!fy||Oo(function(){if(Ju&&fy({b:1},fy(j8e({},"a",{enumerable:!0,get:function(){j8e(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(o){t[o]=o}),fy({},e)[n]!=7||ly(fy({},t)).join("")!=r})?function(e,t){for(var n=M8(e),r=arguments.length,o=1,i=q6e.f,a=E6e.f;r>o;)for(var l,s=QC(arguments[o++]),u=i?vft(ly(s),i(s)):ly(s),c=u.length,d=0;c>d;)l=u[d++],Ju&&!oi(a,s,l)||(n[l]=s[l]);return n}:fy;function wv(e,t){e.data==null&&(e.data={});var n=e.data;n.style==null&&(n.style={}),Object.assign(n.style,t)}Bi({target:"Object",stat:!0,forced:Object.assign!==V8e},{assign:V8e});var mft={selector:"font",preParseHtml:function(e){var t=Le(e);if(dy(t)!=="font")return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}},z8e=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(t,n){},e.prototype.getValue=function(t){var n=this.mark,r=ue.marks(t);return r&&r[n]?r[n]:""},e.prototype.isActive=function(t){return!!this.getValue(t)},e.prototype.isDisabled=function(t){return t.selection==null||!!Or(ue.nodes(t,{match:function(n){return Re.getNodeType(n)==="pre"||!!ue.isVoid(t,n)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(t){var n=this.mark;if(this.$content==null){var r=Le('<ul class="w-e-panel-content-color"></ul>');r.on("click","li",function(u){var c=u.target;if(c!=null&&(u.preventDefault(),t.selection!=null)){var d=Le(c).attr("data-value");d==="0"?ue.removeMark(t,n):ue.addMark(t,n,d)}}),this.$content=r}var o=this.$content;if(o==null)return document.createElement("ul");o.empty();var i=this.getValue(t),a=t.getMenuConfig(n).colors;(a===void 0?[]:a).forEach(function(u){var c=Le('<div class="color-block" data-value="'+u+'"></div>');c.css("background-color",u);var d=Le('<li data-value="'+u+'"></li>');i===u&&d.addClass("active"),d.append(c),o.append(d)});var l="";n==="color"&&(l=jt("color.default")),n==="bgColor"&&(l=jt("color.clear"));var s=Le(` |
|
1037 |
<li data-value="0" class="clear"> |
|
1038 |
<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg> |
|
1039 |
`+l+` |
|
1040 |
</li> |
|
1041 |
`);return o.prepend(s),o[0]},e}(),gft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("color.color"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',n.mark="color",n}return yo(t,e),t}(z8e),yft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("color.bgColor"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',n.mark="bgColor",n}return yo(t,e),t}(z8e),H8e=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"],bft={renderStyle:function(e,t){var n=e,r=n.color,o=n.bgColor,i=t;return r&&wv(i,{color:r}),o&&wv(i,{backgroundColor:o}),i},styleToHtml:function(e,t){if(!Qt.isText(e))return t;var n,r=e,o=r.color,i=r.bgColor;return o||i?((M$(t)||dy(n=Le(t))!=="span")&&(n=Le("<span>"+t+"</span>")),o&&n.css("color",o),i&&n.css("background-color",i),cy(n)):t},preParseHtml:[mft],parseStyleHtml:function(e,t,n){var r=Le(e);if(!Qt.isText(t))return t;var o=t,i=ec(r,"color");i&&(o.color=i);var a=ec(r,"background-color");return a||(a=ec(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new gft},config:{colors:H8e}},{key:"bgColor",factory:function(){return new yft},config:{colors:H8e}}]},Aft=/^(?:\w+:)?\/\/(\S+)$/,wft=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,xft=/^[^\s\.]+\.\S{2,}$/,_ft=U6e.includes;function cS(e){return e===void 0&&(e="r"),e+"-"+q2e()}function j$(e){return e.replace(/</g,"<").replace(/>/g,">")}function $8e(e,t,n,r){return ch(this,0,void 0,function(){var o,i;return dh(this,function(a){switch(a.label){case 0:return(o=t.getMenuConfig(e).checkLink)?[4,o(n,r)]:[3,2];case 1:if(typeof(i=a.sent())=="string")return t.alert(i,"error"),[2,!1];if(i==null)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function U8e(e,t,n){return ch(this,0,void 0,function(){var r;return dh(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function V$(e){return e.selection==null||!!Re.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)||void 0})}function z$(e,t){return{type:"link",url:j$(e),children:t?[{text:t}]:[]}}function W8e(e,t,n){return ch(this,0,void 0,function(){var r,o,i;return dh(this,function(a){switch(a.label){case 0:return n?(t||(t=n),e.restoreSelection(),V$(e)?[2]:[4,$8e("insertLink",e,t,n)]):[2];case 1:return a.sent()?[4,U8e("insertLink",e,n)]:[2];case 2:return r=a.sent(),(o=e.selection)==null||(ct.isCollapsed(o)?(e.insertText(" "),i=z$(r,t),et.insertNodes(e,i),e.insertFragment([{text:" "}])):ue.string(e,o)!==t?(e.deleteFragment(),i=z$(r,t),et.insertNodes(e,i)):(i=z$(r),et.wrapNodes(e,i,{split:!0}),et.collapse(e,{edge:"end"}))),[2]}})})}Bi({target:"Array",proto:!0},{includes:function(e){return _ft(this,e,arguments.length>1?arguments[1]:void 0)}}),v8e("includes");var Eft={type:"link",renderElem:function(e,t,n){var r=e,o=r.url,i=r.target;return Mn("a",{href:o,target:i===void 0?"_blank":i},t)}},Cft={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e);return(t=t.filter(function(o){return!!Qt.isText(o)||!!n.isInline(o)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};function H$(){return cS("w-e-insert-link")}var Sft=function(){function e(){this.title=jt("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=H$(),this.urlInputId=H$(),this.buttonId=H$()}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){return V$(t)},e.prototype.getModalPositionNode=function(t){return null},e.prototype.getModalContentElem=function(t){var n=t.selection,r=this,o=r.textInputId,i=r.urlInputId,a=r.buttonId,l=Or(Ds(jt("link.text"),o),2),s=l[0],u=Le(l[1]),c=Or(Ds(jt("link.url"),i),2),d=c[0],f=Le(c[1]),p=Or(Z2(a,jt("common.ok")),1)[0];if(this.$content==null){var m=Le("<div></div>");m.on("click","#"+a,function(b){b.preventDefault();var y=m.find("#"+o).val(),w=m.find("#"+i).val();W8e(t,y,w),t.hidePanelOrModal()}),this.$content=m}var v=this.$content;if(v.empty(),v.append(s),v.append(d),v.append(p),n==null||ct.isCollapsed(n))u.val("");else{var g=ue.string(t,n);u.val(g)}return f.val(""),setTimeout(function(){u.focus()}),v[0]},e}();function G8e(){return cS("w-e-update-link")}var kft=function(){function e(){this.title=jt("link.edit"),this.iconSvg=O8e,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=G8e(),this.buttonId=G8e()}return e.prototype.getSelectedLinkElem=function(t){var n=Re.getSelectedNodeByType(t,"link");return n??null},e.prototype.getValue=function(t){var n=this.getSelectedLinkElem(t);return n&&n.url||""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){return t.selection==null||this.getSelectedLinkElem(t)==null},e.prototype.getModalPositionNode=function(t){return Re.getSelectedNodeByType(t,"link")},e.prototype.getModalContentElem=function(t){var n=this.urlInputId,r=this.buttonId,o=Or(Ds(jt("link.url"),n),2),i=o[0],a=Le(o[1]),l=Or(Z2(r,jt("common.ok")),1)[0];if(this.$content==null){var s=Le("<div></div>");s.on("click","button",function(d){d.preventDefault(),t.restoreSelection();var f=Re.getSelectedNodeByType(t,"link"),p=f?Pt.string(f):"",m=s.find("#"+n).val();(function(v,g,b){ch(this,0,void 0,function(){var y,w;return dh(this,function(x){switch(x.label){case 0:return b?[4,$8e("editLink",v,g,b)]:[2];case 1:return x.sent()?[4,U8e("editLink",v,b)]:[2];case 2:return y=x.sent(),w={url:j$(y)},et.setNodes(v,w,{match:function(_){return Re.checkNodeType(_,"link")}}),[2]}})})})(t,p,m),t.hidePanelOrModal()}),this.$content=s}var u=this.$content;u.empty(),u.append(i),u.append(l);var c=this.getValue(t);return a.val(c),setTimeout(function(){a.focus()}),u[0]},e}(),Dft=function(){function e(){this.title=jt("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||Re.getSelectedNodeByType(t,"link")==null},e.prototype.exec=function(t,n){this.isDisabled(t)||et.unwrapNodes(t,{match:function(r){return Re.checkNodeType(r,"link")}})},e}(),Oft=function(){function e(){this.title=jt("link.view"),this.iconSvg=T8e,this.tag="button"}return e.prototype.getSelectedLinkElem=function(t){var n=Re.getSelectedNodeByType(t,"link");return n??null},e.prototype.getValue=function(t){var n=this.getSelectedLinkElem(t);return n&&n.url||""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||this.getSelectedLinkElem(t)==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){if(!n||typeof n!="string")throw new Error("View link failed, link url is '"+n+"'");window.open(n,"_blank")}},e}(),q8e={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},Tft={renderElems:[Eft],elemsToHtml:[{type:"link",elemToHtml:function(e,t){var n=e,r=n.url,o=n.target;return'<a href="'+r+'" target="'+(o===void 0?"_blank":o)+'">'+t+"</a>"}}],parseElemsHtml:[Cft],menus:[{key:"insertLink",factory:function(){return new Sft},config:q8e},{key:"editLink",factory:function(){return new kft},config:q8e},{key:"unLink",factory:function(){return new Dft}},{key:"viewLink",factory:function(){return new Oft}}],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode;e.insertNode,e.insertText;var o=e;return o.isInline=function(i){return i.type==="link"||t(i)},o.insertData=function(i){var a=i.getData("text/plain");if(function(u){if(typeof u!="string")return!1;var c=u.match(Aft);if(!c)return!1;var d=c[1];return!(!d||!wft.test(d)&&!xft.test(d))}(a)){if(!V$(o)){var l=o.selection;if(l!=null){var s=ue.string(o,l);W8e(o,s,a)}}}else n(i)},o.normalizeNode=function(i){var a=Or(i,2),l=a[0],s=a[1];return Re.getNodeType(l)!=="link"?r([l,s]):Pt.string(l)===""?et.removeNodes(o,{at:s}):r([l,s])},o}},Mft=On(1 .valueOf),Nft=Gn.RangeError,Fft=Gn.RangeError,K8e=Gn.String,Y8e=Math.floor,$$=On(function(e){var t=To(hu(this)),n="",r=ay(e);if(r<0||r==1/0)throw Nft("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}),X8e=On("".slice),K8=On(1 .toFixed),py=function(e,t,n){return t===0?n:t%2==1?py(e,t-1,n*e):py(e*e,t/2,n)},hy=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=Y8e(o/1e7)},U$=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=Y8e(r/t),r=r%t*1e7},Q8e=function(e){for(var t=6,n="";--t>=0;)if(n!==""||t===0||e[t]!==0){var r=K8e(e[t]);n=n===""?r:n+$$("0",7-r.length)+r}return n};function J8e(e,t){return"w-e-image-container-"+Re.findKey(e,t).id}Bi({target:"Number",proto:!0,forced:Oo(function(){return K8(8e-5,3)!=="0.000"||K8(.9,0)!=="1"||K8(1.255,2)!=="1.25"||K8(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!Oo(function(){K8({})})},{toFixed:function(e){var t,n,r,o,i=Mft(this),a=ay(e),l=[0,0,0,0,0,0],s="",u="0";if(a<0||a>20)throw Fft("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return K8e(i);if(i<0&&(s="-",i=-i),i>1e-21)if(n=(t=function(c){for(var d=0,f=c;f>=4096;)d+=12,f/=4096;for(;f>=2;)d+=1,f/=2;return d}(i*py(2,69,1))-69)<0?i*py(2,-t,1):i/py(2,t,1),n*=4503599627370496,(t=52-t)>0){for(hy(l,0,n),r=a;r>=7;)hy(l,1e7,0),r-=7;for(hy(l,py(10,r,1),0),r=t-1;r>=23;)U$(l,8388608),r-=23;U$(l,1<<r),hy(l,1,1),U$(l,2),u=Q8e(l)}else hy(l,0,n),hy(l,1<<-t,0),u=Q8e(l)+$$("0",a);return a>0?s+((o=u.length)<=a?"0."+$$("0",a-o)+u:X8e(u,0,o-a)+"."+X8e(u,o-a)):s+u}});var Rft={type:"image",renderElem:function(e,t,n){var r=e,o=r.src,i=r.alt,a=i===void 0?"":i,l=r.href,s=l===void 0?"":l,u=r.style,c=u===void 0?{}:u,d=c.width,f=d===void 0?"":d,p=c.height,m=p===void 0?"":p,v=Re.isNodeSelected(n,e),g={};f&&(g.width="100%"),m&&(g.height="100%");var b=Mn("img",{style:g,src:o,alt:a,"data-href":s}),y=n.isDisabled();return v&&!y?function(w,x,_,E){var C=Le("body"),T=J8e(w,x),k=E.width,I=E.height,O=0,F=0,N=0,B=!1,L=null;function V(G){L=function(){var W=Le("#"+T);if(W.length===0)throw new Error("Cannot find image container elem");return W}(),O=G;var z=L.find("img");if(z.length===0)throw new Error("Cannot find image elem");F=z.width(),N=z.height(),C.on("mousemove",P),C.on("mouseup",H);var $=Re.getHoverbar(w);$&&$.hideAndClean()}var P=Y1(function(G){G.preventDefault();var z=G.clientX,$=F+(B?O-z:z-O),W=N*($/F);L!=null&&($<=15||W<=15||(L.css("width",$+"px"),L.css("height",W+"px")))},100);function H(G){if(C.off("mousemove",P),L!=null){var z=L.width().toFixed(2),$=L.height().toFixed(2),W={style:uh(uh({},x.style),{width:z+"px",height:$+"px"})};et.setNodes(w,W,{at:Re.findPath(w,x)}),C.off("mouseup",H)}}var U={};return k&&(U.width=k),I&&(U.height=I),Mn("div",{id:T,style:U,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(G){var z=Le(G.target);z.hasClass("w-e-image-dragger")&&(G.preventDefault(),(z.hasClass("left-top")||z.hasClass("left-bottom"))&&(B=!0),V(G.clientX))}}},_,Mn("div",{className:"w-e-image-dragger left-top"}),Mn("div",{className:"w-e-image-dragger right-top"}),Mn("div",{className:"w-e-image-dragger left-bottom"}),Mn("div",{className:"w-e-image-dragger right-bottom"}))}(n,e,b,{width:f,height:m}):function(w,x,_,E){var C=E.width,T=E.height,k={};return C&&(k.width=C),T&&(k.height=T),Mn("div",{id:J8e(w,x),style:k,className:"w-e-image-container"},_)}(n,e,b,{width:f,height:m})}},Ift={selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:ec(r,"width"),height:ec(r,"height")},children:[{text:""}]}}};function Z8e(e,t,n,r,o){return r===void 0&&(r=""),o===void 0&&(o=""),ch(this,0,void 0,function(){var i,a;return dh(this,function(l){switch(l.label){case 0:return(i=t.getMenuConfig(e).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if(typeof(a=l.sent())=="string")return t.alert(a,"error"),[2,!1];if(a==null)return[2,!1];l.label=2;case 2:return[2,!0]}})})}function e5e(e,t,n){return ch(this,0,void 0,function(){var r;return dh(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function xv(e,t,n,r){return n===void 0&&(n=""),r===void 0&&(r=""),ch(this,0,void 0,function(){var o,i,a;return dh(this,function(l){switch(l.label){case 0:return[4,Z8e("insertImage",e,t,n,r)];case 1:return l.sent()?[4,e5e("insertImage",e,t)]:[2];case 2:return o=l.sent(),i={type:"image",src:j$(o),href:r,alt:n,style:{},children:[{text:""}]},e.selection===null&&e.restoreSelection(),Re.getSelectedNodeByType(e,"image")&&e.move(1),dS(e)||(et.insertNodes(e,i),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(i)),[2]}})})}function dS(e){var t=e.selection;return t==null||!ct.isCollapsed(t)||!!Or(ue.nodes(e,{match:function(n){var r=Re.getNodeType(n);return r==="code"||r==="pre"||r==="link"||r==="list-item"||!!r.startsWith("header")||r==="blockquote"||!!ue.isVoid(e,n)},universal:!0}),1)[0]}function fS(){return cS("w-e-insert-image")}var Bft=function(){function e(){this.title=jt("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=fS(),this.altInputId=fS(),this.hrefInputId=fS(),this.buttonId=fS()}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){return dS(t)},e.prototype.getModalPositionNode=function(t){return null},e.prototype.getModalContentElem=function(t){var n=this,r=this,o=r.srcInputId,i=r.altInputId,a=r.hrefInputId,l=r.buttonId,s=Or(Ds(jt("image.src"),o),2),u=s[0],c=Le(s[1]),d=Or(Ds(jt("image.desc"),i),2),f=d[0],p=Le(d[1]),m=Or(Ds(jt("image.link"),a),2),v=m[0],g=Le(m[1]),b=Or(Z2(l,jt("common.ok")),1)[0];if(this.$content==null){var y=Le("<div></div>");y.on("click","#"+l,function(x){x.preventDefault();var _=y.find("#"+o).val().trim(),E=y.find("#"+i).val().trim(),C=y.find("#"+a).val().trim();n.insertImage(t,_,E,C),t.hidePanelOrModal()}),this.$content=y}var w=this.$content;return w.empty(),w.append(u),w.append(f),w.append(v),w.append(b),c.val(""),p.val(""),g.val(""),setTimeout(function(){c.focus()}),w[0]},e.prototype.insertImage=function(t,n,r,o){r===void 0&&(r=""),o===void 0&&(o=""),n&&(t.restoreSelection(),this.isDisabled(t)||xv(t,n,r,o))},e}(),Lft=function(){function e(){this.title=jt("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||Re.getSelectedNodeByType(t,"image")==null},e.prototype.exec=function(t,n){this.isDisabled(t)||et.removeNodes(t,{match:function(r){return Re.checkNodeType(r,"image")}})},e}();function pS(){return cS("w-e-edit-image")}var Pft=function(){function e(){this.title=jt("image.edit"),this.iconSvg=O8e,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=pS(),this.altInputId=pS(),this.hrefInputId=pS(),this.buttonId=pS()}return e.prototype.getValue=function(t){return""},e.prototype.getImageNode=function(t){return Re.getSelectedNodeByType(t,"image")},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||Re.getSelectedNodeByType(t,"image")==null},e.prototype.getModalPositionNode=function(t){return this.getImageNode(t)},e.prototype.getModalContentElem=function(t){var n=this,r=this,o=r.srcInputId,i=r.altInputId,a=r.hrefInputId,l=r.buttonId,s=this.getImageNode(t);if(s==null)throw new Error("Not found selected image node");var u=Or(Ds(jt("image.src"),o),2),c=u[0],d=Le(u[1]),f=Or(Ds(jt("image.desc"),i),2),p=f[0],m=Le(f[1]),v=Or(Ds(jt("image.link"),a),2),g=v[0],b=Le(v[1]),y=Or(Z2(l,jt("common.ok")),1)[0];if(this.$content==null){var w=Le("<div></div>");w.on("click","#"+l,function(O){O.preventDefault();var F=w.find("#"+o).val(),N=w.find("#"+i).val(),B=w.find("#"+a).val();n.updateImage(t,F,N,B),t.hidePanelOrModal()}),this.$content=w}var x=this.$content;x.empty(),x.append(c),x.append(p),x.append(g),x.append(y);var _=s,E=_.src,C=_.alt,T=C===void 0?"":C,k=_.href,I=k===void 0?"":k;return d.val(E),m.val(T),b.val(I),setTimeout(function(){d.focus()}),x[0]},e.prototype.updateImage=function(t,n,r,o,i){r===void 0&&(r=""),o===void 0&&(o=""),i===void 0&&(i={}),n&&(t.restoreSelection(),this.isDisabled(t)||function(a,l,s,u,c){s===void 0&&(s=""),u===void 0&&(u=""),c===void 0&&(c={}),ch(this,0,void 0,function(){var d,f,p,m,v,g;return dh(this,function(b){switch(b.label){case 0:return[4,Z8e("editImage",a,l,s,u)];case 1:return b.sent()?[4,e5e("editImage",a,l)]:[2];case 2:return d=b.sent(),(f=Re.getSelectedNodeByType(a,"image"))==null||(p=f.style,m={src:d,alt:s,href:u,style:uh(uh({},p===void 0?{}:p),c)},et.setNodes(a,m,{match:function(y){return Re.checkNodeType(y,"image")}}),v=Re.getSelectedNodeByType(a,"image"),(g=a.getMenuConfig("editImage").onUpdatedImage)&&g(v)),[2]}})})}(t,n,r,o,i))},e}(),jft=function(){function e(){this.title=jt("image.viewLink"),this.iconSvg=T8e,this.tag="button"}return e.prototype.getValue=function(t){var n=Re.getSelectedNodeByType(t,"image");return n&&n.href||""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!this.getValue(t)},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){if(!n||typeof n!="string")throw new Error("View image link failed, image.href is '"+n+"'");window.open(n,"_blank")}},e}(),W$=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.getSelectedNode=function(t){return Re.getSelectedNodeByType(t,"image")},e.prototype.isDisabled=function(t){return t.selection==null||this.getSelectedNode(t)==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=this.getSelectedNode(t);if(r!=null){var o=Re.getHoverbar(t);o&&o.hideAndClean();var i=r.style,a={style:uh(uh({},i===void 0?{}:i),{width:this.value,height:""})};et.setNodes(t,a,{match:function(l){return Re.checkNodeType(l,"image")}})}}},e}(),Vft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="30%",n.value="30%",n}return yo(t,e),t}(W$),zft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="50%",n.value="50%",n}return yo(t,e),t}(W$),Hft=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="100%",n.value="100%",n}return yo(t,e),t}(W$),t5e={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}},$ft={renderElems:[Rft],elemsToHtml:[{type:"image",elemToHtml:function(e,t){var n=e,r=n.src,o=n.alt,i=o===void 0?"":o,a=n.href,l=a===void 0?"":a,s=n.style,u=s===void 0?{}:s,c=u.width,d=c===void 0?"":c,f=u.height,p=f===void 0?"":f,m="";return d&&(m+="width: "+d+";"),p&&(m+="height: "+p+";"),'<img src="'+r+'" alt="'+i+'" data-href="'+l+'" style="'+m+'"/>'}}],parseElemsHtml:[Ift],menus:[{key:"insertImage",factory:function(){return new Bft},config:t5e},{key:"deleteImage",factory:function(){return new Lft}},{key:"editImage",factory:function(){return new Pft},config:t5e},{key:"viewImageLink",factory:function(){return new jft}},{key:"imageWidth30",factory:function(){return new Vft}},{key:"imageWidth50",factory:function(){return new zft}},{key:"imageWidth100",factory:function(){return new Hft}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid;e.insertNode;var r=e;return r.isInline=function(o){return o.type==="image"||t(o)},r.isVoid=function(o){return o.type==="image"||n(o)},r}},Uft={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var o=Mn("div",{style:{margin:"5px 0"}},Mn("span",{contentEditable:!1,style:{marginRight:"0.5em"}},Mn("input",{type:"checkbox",checked:e.checked,disabled:r,on:{change:function(i){var a=Re.findPath(n,e),l={checked:i.target.checked};et.setNodes(n,l,{at:a})}}})),Mn("span",null,t));return o}},Wft=function(){function e(){this.title=jt("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!!Re.getSelectedNodeByType(t,"todo")},e.prototype.isDisabled=function(t){return t.selection==null||!!Re.getSelectedElems(t).some(function(n){if(ue.isVoid(t,n)&&ue.isBlock(t,n))return!0;var r=n.type;return!!["pre","table","list-item"].includes(r)||void 0})},e.prototype.exec=function(t,n){var r=this.isActive(t);et.setNodes(t,{type:r?"paragraph":"todo"})},e}(),Gft={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=Le(e);(t=t.filter(function(i){return!!Qt.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return r.find('input[type="checkbox"]').attr("checked")!=null&&(o=!0),{type:"todo",checked:o,children:t}}},qft={renderElems:[Uft],elemsToHtml:[{type:"todo",elemToHtml:function(e,t){return'<div data-w-e-type="todo"><input type="checkbox" disabled '+(e.checked?"checked":"")+">"+t+"</div>"}}],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=Le(e).find("li"),n=Le('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML=n[0].innerHTML+t[0].innerHTML,n[0]}}],parseElemsHtml:[Gft],menus:[{key:"todo",factory:function(){return new Wft}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(r){var o=e.selection;if(o&&ct.isCollapsed(o)){var i=Re.getSelectedNodeByType(e,"todo");if(i&&Pt.string(i).length===0)return void et.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(r)},n}},Kft={type:"blockquote",renderElem:function(e,t,n){return Mn("blockquote",null,t)}},Yft={selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e);return(t=t.filter(function(o){return!!Qt.isText(o)||!!n.isInline(o)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}},Xft=function(){function e(){this.title=jt("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!!Re.getSelectedNodeByType(t,"blockquote")},e.prototype.isDisabled=function(t){return t.selection==null||!Or(ue.nodes(t,{match:function(n){var r=Re.getNodeType(n);return r==="paragraph"||r==="blockquote"},universal:!0,mode:"highest"}),1)[0]},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=this.isActive(t)?"paragraph":"blockquote";et.setNodes(t,{type:r},{mode:"highest"})}},e}(),Qft={key:"blockquote",factory:function(){return new Xft}},Jft=On([].slice),Zft=c$("slice"),ept=Ts("species"),G$=Gn.Array,tpt=Math.max;Bi({target:"Array",proto:!0,forced:!Zft},{slice:function(e,t){var n,r,o,i=ny(this),a=nS(i),l=I8(e,a),s=I8(t===void 0?a:t,a);if(oS(i)&&(n=i.constructor,(u$(n)&&(n===G$||oS(n.prototype))||Zu(n)&&(n=n[ept])===null)&&(n=void 0),n===G$||n===void 0))return Jft(i,l,s);for(r=new(n===void 0?G$:n)(tpt(s-l,0)),o=0;l<s;l++,o++)l in i&&y8e(r,o,i[l]);return r.length=o,r}});var npt={renderElems:[Kft],elemsToHtml:[{type:"blockquote",elemToHtml:function(e,t){return"<blockquote>"+t+"</blockquote>"}}],parseElemsHtml:[Yft],menus:[Qft],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var o=r.selection;if(o==null)return t();var i=Or(ue.nodes(e,{match:function(c){return Re.checkNodeType(c,"blockquote")},universal:!0}),1)[0];if(!i)return t();var a=i[0],l=Re.findPath(e,a),s=ue.end(e,l);if(nr.equals(s,o.focus)){var u=Pt.string(a);if(u&&u.slice(-1)===` |
|
1042 |
`)return e.deleteBackward("character"),void et.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n(` |
|
1043 |
`)},r}},rpt=function(){function e(){this.title=jt("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(t,n){},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!!Or(ue.nodes(t,{match:function(n){return Re.getNodeType(n)==="pre"||!!ue.isVoid(t,n)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(t){if(this.$content==null){var n=Le('<ul class="w-e-panel-content-emotion"></ul>');n.on("click","li",function(i){var a=i.target;if(a!=null){i.preventDefault();var l=Le(a).text();t.insertText(l)}}),this.$content=n}var r=this.$content;if(r==null)return document.createElement("ul");r.empty();var o=t.getMenuConfig("emotion").emotions;return(o===void 0?[]:o).forEach(function(i){var a=Le("<li>"+i+"</li>");r.append(a)}),r[0]},e}(),opt={menus:[{key:"emotion",factory:function(){return new rpt},config:{emotions:"\u{1F600} \u{1F603} \u{1F604} \u{1F601} \u{1F606} \u{1F605} \u{1F602} \u{1F923} \u{1F60A} \u{1F607} \u{1F642} \u{1F643} \u{1F609} \u{1F60C} \u{1F60D} \u{1F618} \u{1F617} \u{1F619} \u{1F61A} \u{1F60B} \u{1F61B} \u{1F61D} \u{1F61C} \u{1F913} \u{1F60E} \u{1F60F} \u{1F612} \u{1F61E} \u{1F614} \u{1F61F} \u{1F615} \u{1F641} \u{1F623} \u{1F616} \u{1F62B} \u{1F629} \u{1F622} \u{1F62D} \u{1F624} \u{1F620} \u{1F621} \u{1F633} \u{1F631} \u{1F628} \u{1F917} \u{1F914} \u{1F636} \u{1F611} \u{1F62C} \u{1F644} \u{1F62F} \u{1F634} \u{1F637} \u{1F911} \u{1F608} \u{1F921} \u{1F4A9} \u{1F47B} \u{1F480} \u{1F440} \u{1F463} \u{1F450} \u{1F64C} \u{1F44F} \u{1F91D} \u{1F44D} \u{1F44E} \u{1F44A} \u270A \u{1F91B} \u{1F91C} \u{1F91E} \u270C\uFE0F \u{1F918} \u{1F44C} \u{1F448} \u{1F449} \u{1F446} \u{1F447} \u261D\uFE0F \u270B \u{1F91A} \u{1F590} \u{1F596} \u{1F44B} \u{1F919} \u{1F4AA} \u{1F595} \u270D\uFE0F \u{1F64F}".split(" ")}}]},ipt={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},apt={selector:"font",preParseHtml:function(e){var t=Le(e);if(dy(t)!=="font")return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",ipt[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}},lpt=On("".indexOf);Bi({target:"String",proto:!0,forced:!F8e("includes")},{includes:function(e){return!!~lpt(To(hu(this)),To(N8e(e)),arguments.length>1?arguments[1]:void 0)}});var fh,hS,vS=function(e){return e&&e.Math==Math&&e},lr=vS(typeof globalThis=="object"&&globalThis)||vS(typeof window=="object"&&window)||vS(typeof self=="object"&&self)||vS(typeof qC=="object"&&qC)||function(){return this}()||Function("return this")(),q$=Function.prototype,n5e=q$.apply,spt=q$.bind,r5e=q$.call,o5e=typeof Reflect=="object"&&Reflect.apply||(spt?r5e.bind(n5e):function(){return r5e.apply(n5e,arguments)}),i5e=Function.prototype,K$=i5e.bind,Y$=i5e.call,upt=K$&&K$.bind(Y$),$o=K$?function(e){return e&&upt(Y$,e)}:function(e){return e&&function(){return Y$.apply(e,arguments)}},Pa=function(e){return typeof e=="function"},Ns=function(e){try{return!!e()}catch{return!0}},Wl=!Ns(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Y8=Function.prototype.call,rd=Y8.bind?Y8.bind(Y8):function(){return Y8.apply(Y8,arguments)},a5e={}.propertyIsEnumerable,l5e=Object.getOwnPropertyDescriptor,cpt=l5e&&!a5e.call({1:2},1)?function(e){var t=l5e(this,e);return!!t&&t.enumerable}:a5e,X$={f:cpt},_v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},dpt=$o({}.toString),fpt=$o("".slice),Ev=function(e){return fpt(dpt(e),8,-1)},Q$=lr.Object,ppt=$o("".split),s5e=Ns(function(){return!Q$("z").propertyIsEnumerable(0)})?function(e){return Ev(e)=="String"?ppt(e,""):Q$(e)}:Q$,hpt=lr.TypeError,J$=function(e){if(e==null)throw hpt("Can't call method on "+e);return e},od=function(e){return s5e(J$(e))},tc=function(e){return typeof e=="object"?e!==null:Pa(e)},mu={},u5e=function(e){return Pa(e)?e:void 0},X8=function(e,t){return arguments.length<2?u5e(mu[e])||u5e(lr[e]):mu[e]&&mu[e][t]||lr[e]&&lr[e][t]},c5e=$o({}.isPrototypeOf),Z$=X8("navigator","userAgent")||"",d5e=lr.process,f5e=lr.Deno,p5e=d5e&&d5e.versions||f5e&&f5e.version,h5e=p5e&&p5e.v8;h5e&&(hS=(fh=h5e.split("."))[0]>0&&fh[0]<4?1:+(fh[0]+fh[1])),!hS&&Z$&&(!(fh=Z$.match(/Edge\/(\d+)/))||fh[1]>=74)&&(fh=Z$.match(/Chrome\/(\d+)/))&&(hS=+fh[1]);var mS=hS,id=!!Object.getOwnPropertySymbols&&!Ns(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&mS&&mS<41}),eU=id&&!Symbol.sham&&typeof Symbol.iterator=="symbol",vpt=lr.Object,vy=eU?function(e){return typeof e=="symbol"}:function(e){var t=X8("Symbol");return Pa(t)&&c5e(t.prototype,vpt(e))},mpt=lr.String,gpt=lr.TypeError,v5e=function(e){if(Pa(e))return e;throw gpt(function(t){try{return mpt(t)}catch{return"Object"}}(e)+" is not a function")},ypt=lr.TypeError,bpt=Object.defineProperty,ph=lr["__core-js_shared__"]||function(e,t){try{bpt(lr,e,{value:t,configurable:!0,writable:!0})}catch{lr[e]=t}return t}("__core-js_shared__",{}),Cv=KC(function(e){(e.exports=function(t,n){return ph[t]||(ph[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),Apt=lr.Object,Q8=function(e){return Apt(J$(e))},wpt=$o({}.hasOwnProperty),Tr=Object.hasOwn||function(e,t){return wpt(Q8(e),t)},xpt=0,_pt=Math.random(),Ept=$o(1 .toString),gS=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Ept(++xpt+_pt,36)},J8=Cv("wks"),Sv=lr.Symbol,m5e=Sv&&Sv.for,Cpt=eU?Sv:Sv&&Sv.withoutSetter||gS,Fs=function(e){if(!Tr(J8,e)||!id&&typeof J8[e]!="string"){var t="Symbol."+e;id&&Tr(Sv,e)?J8[e]=Sv[e]:J8[e]=eU&&m5e?m5e(t):Cpt(t)}return J8[e]},Spt=lr.TypeError,kpt=Fs("toPrimitive"),my=function(e){var t=function(n){if(!tc(n)||vy(n))return n;var r,o,i=(r=n[kpt])==null?void 0:v5e(r);if(i){if(o=rd(i,n,"string"),!tc(o)||vy(o))return o;throw Spt("Can't convert object to primitive value")}return function(a){var l,s;if(Pa(l=a.toString)&&!tc(s=rd(l,a))||Pa(l=a.valueOf)&&!tc(s=rd(l,a)))return s;throw ypt("Can't convert object to primitive value")}(n)}(e);return vy(t)?t:t+""},tU=lr.document,Dpt=tc(tU)&&tc(tU.createElement),g5e=function(e){return Dpt?tU.createElement(e):{}},y5e=!Wl&&!Ns(function(){return Object.defineProperty(g5e("div"),"a",{get:function(){return 7}}).a!=7}),b5e=Object.getOwnPropertyDescriptor,nU={f:Wl?b5e:function(e,t){if(e=od(e),t=my(t),y5e)try{return b5e(e,t)}catch{}if(Tr(e,t))return _v(!rd(X$.f,e,t),e[t])}},Opt=/#|\.prototype\./,Z8=function(e,t){var n=Mpt[Tpt(e)];return n==Fpt||n!=Npt&&(Pa(t)?Ns(t):!!t)},Tpt=Z8.normalize=function(e){return String(e).replace(Opt,".").toLowerCase()},Mpt=Z8.data={},Npt=Z8.NATIVE="N",Fpt=Z8.POLYFILL="P",Rpt=Z8,A5e=$o($o.bind),w5e=function(e,t){return v5e(e),t===void 0?e:A5e?A5e(e,t):function(){return e.apply(t,arguments)}},Ipt=lr.String,Bpt=lr.TypeError,kv=function(e){if(tc(e))return e;throw Bpt(Ipt(e)+" is not an object")},Lpt=lr.TypeError,x5e=Object.defineProperty,Dv={f:Wl?x5e:function(e,t,n){if(kv(e),t=my(t),kv(n),y5e)try{return x5e(e,t,n)}catch{}if("get"in n||"set"in n)throw Lpt("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},ad=Wl?function(e,t,n){return Dv.f(e,t,_v(1,n))}:function(e,t,n){return e[t]=n,e},Ppt=nU.f,jpt=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return o5e(e,this,arguments)};return t.prototype=e.prototype,t},hh=function(e,t){var n,r,o,i,a,l,s,u,c=e.target,d=e.global,f=e.stat,p=e.proto,m=d?lr:f?lr[c]:(lr[c]||{}).prototype,v=d?mu:mu[c]||ad(mu,c,{})[c],g=v.prototype;for(o in t)n=!Rpt(d?o:c+(f?".":"#")+o,e.forced)&&m&&Tr(m,o),a=v[o],n&&(l=e.noTargetGet?(u=Ppt(m,o))&&u.value:m[o]),i=n&&l?l:t[o],n&&typeof a==typeof i||(s=e.bind&&n?w5e(i,lr):e.wrap&&n?jpt(i):p&&Pa(i)?$o(i):i,(e.sham||i&&i.sham||a&&a.sham)&&ad(s,"sham",!0),ad(v,o,s),p&&(Tr(mu,r=c+"Prototype")||ad(mu,r,{}),ad(mu[r],o,i),e.real&&g&&!g[o]&&ad(g,o,i)))},yS=Array.isArray||function(e){return Ev(e)=="Array"},Vpt=Math.ceil,zpt=Math.floor,rU=function(e){var t=+e;return t!=t||t===0?0:(t>0?zpt:Vpt)(t)},Hpt=Math.min,bS=function(e){return(t=e.length)>0?Hpt(rU(t),9007199254740991):0;var t},oU=function(e,t,n){var r=my(t);r in e?Dv.f(e,r,_v(0,n)):e[r]=n},_5e={};_5e[Fs("toStringTag")]="z";var iU=String(_5e)==="[object z]",$pt=Fs("toStringTag"),Upt=lr.Object,Wpt=Ev(function(){return arguments}())=="Arguments",AS=iU?Ev:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=Upt(e),$pt))=="string"?n:Wpt?Ev(t):(r=Ev(t))=="Object"&&Pa(t.callee)?"Arguments":r},Gpt=$o(Function.toString);Pa(ph.inspectSource)||(ph.inspectSource=function(e){return Gpt(e)});var E5e=ph.inspectSource,C5e=function(){},qpt=[],S5e=X8("Reflect","construct"),aU=/^\s*(?:class|function)\b/,Kpt=$o(aU.exec),Ypt=!aU.exec(C5e),e5=function(e){if(!Pa(e))return!1;try{return S5e(C5e,qpt,e),!0}catch{return!1}},Xpt=!S5e||Ns(function(){var e;return e5(e5.call)||!e5(Object)||!e5(function(){e=!0})||e})?function(e){if(!Pa(e))return!1;switch(AS(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ypt||!!Kpt(aU,E5e(e))}:e5,Qpt=Fs("species"),k5e=lr.Array,D5e=function(e,t){return new(function(n){var r;return yS(n)&&(r=n.constructor,(Xpt(r)&&(r===k5e||yS(r.prototype))||tc(r)&&(r=r[Qpt])===null)&&(r=void 0)),r===void 0?k5e:r}(e))(t===0?0:t)},Jpt=Fs("species"),O5e=Fs("isConcatSpreadable"),T5e=lr.TypeError,Zpt=mS>=51||!Ns(function(){var e=[];return e[O5e]=!1,e.concat()[0]!==e}),eht=mS>=51||!Ns(function(){var e=[];return(e.constructor={})[Jpt]=function(){return{foo:1}},e.concat(Boolean).foo!==1}),tht=function(e){if(!tc(e))return!1;var t=e[O5e];return t!==void 0?!!t:yS(e)};hh({target:"Array",proto:!0,forced:!Zpt||!eht},{concat:function(e){var t,n,r,o,i,a=Q8(this),l=D5e(a,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(tht(i=t===-1?a:arguments[t])){if(s+(o=bS(i))>9007199254740991)throw T5e("Maximum allowed index exceeded");for(n=0;n<o;n++,s++)n in i&&oU(l,s,i[n])}else{if(s>=9007199254740991)throw T5e("Maximum allowed index exceeded");oU(l,s++,i)}return l.length=s,l}});var wS,nht=lr.String,xS=function(e){if(AS(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return nht(e)},rht=Math.max,oht=Math.min,lU=function(e,t){var n=rU(e);return n<0?rht(n+t,0):oht(n,t)},M5e=function(e){return function(t,n,r){var o,i=od(t),a=bS(i),l=lU(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},iht={includes:M5e(!0),indexOf:M5e(!1)},t5={},aht=iht.indexOf,N5e=$o([].push),F5e=function(e,t){var n,r=od(e),o=0,i=[];for(n in r)!Tr(t5,n)&&Tr(r,n)&&N5e(i,n);for(;t.length>o;)Tr(r,n=t[o++])&&(~aht(i,n)||N5e(i,n));return i},_S=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],sU=Object.keys||function(e){return F5e(e,_S)},lht=Wl?Object.defineProperties:function(e,t){kv(e);for(var n,r=od(t),o=sU(t),i=o.length,a=0;i>a;)Dv.f(e,n=o[a++],r[n]);return e},sht=X8("document","documentElement"),R5e=Cv("keys"),ES=function(e){return R5e[e]||(R5e[e]=gS(e))},I5e=ES("IE_PROTO"),uU=function(){},B5e=function(e){return"<script>"+e+"<\/script>"},L5e=function(e){e.write(B5e("")),e.close();var t=e.parentWindow.Object;return e=null,t},CS=function(){try{wS=new ActiveXObject("htmlfile")}catch{}var e,t;CS=typeof document<"u"?document.domain&&wS?L5e(wS):((t=g5e("iframe")).style.display="none",sht.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(B5e("document.F=Object")),e.close(),e.F):L5e(wS);for(var n=_S.length;n--;)delete CS.prototype[_S[n]];return CS()};t5[I5e]=!0;var SS,n5,kS,Ov=Object.create||function(e,t){var n;return e!==null?(uU.prototype=kv(e),n=new uU,uU.prototype=null,n[I5e]=e):n=CS(),t===void 0?n:lht(n,t)},uht=_S.concat("length","prototype"),P5e={f:Object.getOwnPropertyNames||function(e){return F5e(e,uht)}},cht=lr.Array,dht=Math.max,j5e=P5e.f,V5e=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],z5e={f:function(e){return V5e&&Ev(e)=="Window"?function(t){try{return j5e(t)}catch{return function(r){for(var o=bS(r),i=lU(void 0,o),a=lU(o,o),l=cht(dht(a-i,0)),s=0;i<a;i++,s++)oU(l,s,r[i]);return l.length=s,l}(V5e)}}(e):j5e(od(e))}},cU={f:Object.getOwnPropertySymbols},fht=$o([].slice),DS=function(e,t,n,r){ad(e,t,n)},dU={f:Fs},pht=Dv.f,ii=function(e){var t=mu.Symbol||(mu.Symbol={});Tr(t,e)||pht(t,e,{value:dU.f(e)})},hht=iU?{}.toString:function(){return"[object "+AS(this)+"]"},vht=Dv.f,H5e=Fs("toStringTag"),OS=function(e,t,n,r){if(e){var o=n?e:e.prototype;Tr(o,H5e)||vht(o,H5e,{configurable:!0,value:t}),r&&!iU&&ad(o,"toString",hht)}},$5e=lr.WeakMap,mht=Pa($5e)&&/native code/.test(E5e($5e)),fU=lr.TypeError,ght=lr.WeakMap;if(mht||ph.state){var Tv=ph.state||(ph.state=new ght),yht=$o(Tv.get),U5e=$o(Tv.has),bht=$o(Tv.set);SS=function(e,t){if(U5e(Tv,e))throw new fU("Object already initialized");return t.facade=e,bht(Tv,e,t),t},n5=function(e){return yht(Tv,e)||{}},kS=function(e){return U5e(Tv,e)}}else{var gy=ES("state");t5[gy]=!0,SS=function(e,t){if(Tr(e,gy))throw new fU("Object already initialized");return t.facade=e,ad(e,gy,t),t},n5=function(e){return Tr(e,gy)?e[gy]:{}},kS=function(e){return Tr(e,gy)}}var yy={set:SS,get:n5,has:kS,enforce:function(e){return kS(e)?n5(e):SS(e,{})},getterFor:function(e){return function(t){var n;if(!tc(t)||(n=n5(t)).type!==e)throw fU("Incompatible receiver, "+e+" required");return n}}},W5e=$o([].push),vh=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=Q8(s),v=s5e(m),g=w5e(u,c),b=bS(v),y=0,w=d||D5e,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:W5e(x,f)}else switch(e){case 4:return!1;case 7:W5e(x,f)}return i?-1:r||o?o:x}},TS=[vh(0),vh(1),vh(2),vh(3),vh(4),vh(5),vh(6),vh(7)][0],Gl=ES("hidden"),G5e=Fs("toPrimitive"),Aht=yy.set,q5e=yy.getterFor("Symbol"),nc=Object.prototype,mh=lr.Symbol,gh=mh&&mh.prototype,K5e=lr.TypeError,pU=lr.QObject,r5=X8("JSON","stringify"),Y5e=nU.f,yh=Dv.f,X5e=z5e.f,wht=X$.f,Q5e=$o([].push),hf=Cv("symbols"),o5=Cv("op-symbols"),hU=Cv("string-to-symbol-registry"),vU=Cv("symbol-to-string-registry"),xht=Cv("wks"),mU=!pU||!pU.prototype||!pU.prototype.findChild,gU=Wl&&Ns(function(){return Ov(yh({},"a",{get:function(){return yh(this,"a",{value:7}).a}})).a!=7})?function(e,t,n){var r=Y5e(nc,t);r&&delete nc[t],yh(e,t,n),r&&e!==nc&&yh(nc,t,r)}:yh,yU=function(e,t){var n=hf[e]=Ov(gh);return Aht(n,{type:"Symbol",tag:e,description:t}),Wl||(n.description=t),n},MS=function(e,t,n){e===nc&&MS(o5,t,n),kv(e);var r=my(t);return kv(n),Tr(hf,r)?(n.enumerable?(Tr(e,Gl)&&e[Gl][r]&&(e[Gl][r]=!1),n=Ov(n,{enumerable:_v(0,!1)})):(Tr(e,Gl)||yh(e,Gl,_v(1,{})),e[Gl][r]=!0),gU(e,r,n)):yh(e,r,n)},J5e=function(e,t){kv(e);var n=od(t),r=sU(n).concat(bU(n));return TS(r,function(o){Wl&&!rd(Z5e,n,o)||MS(e,o,n[o])}),e},Z5e=function(e){var t=my(e),n=rd(wht,this,t);return!(this===nc&&Tr(hf,t)&&!Tr(o5,t))&&(!(n||!Tr(this,t)||!Tr(hf,t)||Tr(this,Gl)&&this[Gl][t])||n)},eAe=function(e,t){var n=od(e),r=my(t);if(n!==nc||!Tr(hf,r)||Tr(o5,r)){var o=Y5e(n,r);return!o||!Tr(hf,r)||Tr(n,Gl)&&n[Gl][r]||(o.enumerable=!0),o}},tAe=function(e){var t=X5e(od(e)),n=[];return TS(t,function(r){Tr(hf,r)||Tr(t5,r)||Q5e(n,r)}),n},bU=function(e){var t=e===nc,n=X5e(t?o5:od(e)),r=[];return TS(n,function(o){!Tr(hf,o)||t&&!Tr(nc,o)||Q5e(r,hf[o])}),r};if(id||(gh=(mh=function(){if(c5e(gh,this))throw K5e("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==void 0?xS(arguments[0]):void 0,t=gS(e),n=function(r){this===nc&&rd(n,o5,r),Tr(this,Gl)&&Tr(this[Gl],t)&&(this[Gl][t]=!1),gU(this,t,_v(1,r))};return Wl&&mU&&gU(nc,t,{configurable:!0,set:n}),yU(t,e)}).prototype,DS(gh,"toString",function(){return q5e(this).tag}),DS(mh,"withoutSetter",function(e){return yU(gS(e),e)}),X$.f=Z5e,Dv.f=MS,nU.f=eAe,P5e.f=z5e.f=tAe,cU.f=bU,dU.f=function(e){return yU(Fs(e),e)},Wl&&yh(gh,"description",{configurable:!0,get:function(){return q5e(this).description}})),hh({global:!0,wrap:!0,forced:!id,sham:!id},{Symbol:mh}),TS(sU(xht),function(e){ii(e)}),hh({target:"Symbol",stat:!0,forced:!id},{for:function(e){var t=xS(e);if(Tr(hU,t))return hU[t];var n=mh(t);return hU[t]=n,vU[n]=t,n},keyFor:function(e){if(!vy(e))throw K5e(e+" is not a symbol");if(Tr(vU,e))return vU[e]},useSetter:function(){mU=!0},useSimple:function(){mU=!1}}),hh({target:"Object",stat:!0,forced:!id,sham:!Wl},{create:function(e,t){return t===void 0?Ov(e):J5e(Ov(e),t)},defineProperty:MS,defineProperties:J5e,getOwnPropertyDescriptor:eAe}),hh({target:"Object",stat:!0,forced:!id},{getOwnPropertyNames:tAe,getOwnPropertySymbols:bU}),hh({target:"Object",stat:!0,forced:Ns(function(){cU.f(1)})},{getOwnPropertySymbols:function(e){return cU.f(Q8(e))}}),r5){var _ht=!id||Ns(function(){var e=mh();return r5([e])!="[null]"||r5({a:e})!="{}"||r5(Object(e))!="{}"});hh({target:"JSON",stat:!0,forced:_ht},{stringify:function(e,t,n){var r=fht(arguments),o=t;if((tc(t)||e!==void 0)&&!vy(e))return yS(t)||(t=function(i,a){if(Pa(o)&&(a=rd(o,this,i,a)),!vy(a))return a}),r[1]=t,o5e(r5,null,r)}})}if(!gh[G5e]){var Eht=gh.valueOf;DS(gh,G5e,function(e){return rd(Eht,this)})}OS(mh,"Symbol"),t5[Gl]=!0,ii("asyncIterator"),ii("hasInstance"),ii("isConcatSpreadable"),ii("iterator"),ii("match"),ii("matchAll"),ii("replace"),ii("search"),ii("species"),ii("split"),ii("toPrimitive"),ii("toStringTag"),ii("unscopables"),OS(lr.JSON,"JSON",!0);var bh,nAe,rAe,Cht=mu.Symbol,Mv={},oAe=Function.prototype,Sht=Wl&&Object.getOwnPropertyDescriptor,AU=Tr(oAe,"name"),kht={EXISTS:AU,PROPER:AU&&(function(){}).name==="something",CONFIGURABLE:AU&&(!Wl||Wl&&Sht(oAe,"name").configurable)},Dht=!Ns(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),iAe=ES("IE_PROTO"),wU=lr.Object,Oht=wU.prototype,xU=Dht?wU.getPrototypeOf:function(e){var t=Q8(e);if(Tr(t,iAe))return t[iAe];var n=t.constructor;return Pa(n)&&t instanceof n?n.prototype:t instanceof wU?Oht:null},_U=Fs("iterator"),aAe=!1;[].keys&&("next"in(rAe=[].keys())?(nAe=xU(xU(rAe)))!==Object.prototype&&(bh=nAe):aAe=!0);var Tht=bh==null||Ns(function(){var e={};return bh[_U].call(e)!==e});bh=Tht?{}:Ov(bh),Pa(bh[_U])||DS(bh,_U,function(){return this});var lAe={IteratorPrototype:bh,BUGGY_SAFARI_ITERATORS:aAe},Mht=lAe.IteratorPrototype,Nht=function(){return this};lr.String,lr.TypeError,Object.setPrototypeOf||"__proto__"in{}&&function(){var e={};try{$o(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set)(e,[])}catch{}}();var Fht=kht.PROPER,EU=lAe.BUGGY_SAFARI_ITERATORS,Rht=Fs("iterator"),Iht=function(){return this},sAe=function(e,t,n,r,o,i,a){(function(g,b,y){var w=b+" Iterator";g.prototype=Ov(Mht,{next:_v(1,y)}),OS(g,w,!1,!0),Mv[w]=Nht})(n,t,r);var l,s,u=function(g){if(g===o&&m)return m;if(!EU&&g in f)return f[g];switch(g){case"keys":case"values":case"entries":return function(){return new n(this,g)}}return function(){return new n(this)}},c=t+" Iterator",d=!1,f=e.prototype,p=f[Rht]||f["@@iterator"]||o&&f[o],m=!EU&&p||u(o),v=t=="Array"&&f.entries||p;return v&&(l=xU(v.call(new e)))!==Object.prototype&&l.next&&(OS(l,c,!0,!0),Mv[c]=Iht),Fht&&o=="values"&&p&&p.name!=="values"&&(d=!0,m=function(){return rd(p,this)}),o&&(s={values:u("values"),keys:u("keys"),entries:u("entries")},a||hh({target:t,proto:!0,forced:EU||d},s)),Mv[t]=m,s},Bht=yy.set,Lht=yy.getterFor("Array Iterator");sAe(Array,"Array",function(e,t){Bht(this,{type:"Array Iterator",target:od(e),index:0,kind:t})},function(){var e=Lht(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),Mv.Arguments=Mv.Array;var uAe=Fs("toStringTag");for(var CU in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var cAe=lr[CU],SU=cAe&&cAe.prototype;SU&&AS(SU)!==uAe&&ad(SU,uAe,CU),Mv[CU]=Mv.Array}var Pht=Cht;ii("asyncDispose"),ii("dispose"),ii("matcher"),ii("metadata"),ii("observable"),ii("patternMatch"),ii("replaceAll");var NS=Pht,jht=$o("".charAt),dAe=$o("".charCodeAt),Vht=$o("".slice),zht=function(e){return function(t,n){var r,o,i=xS(J$(t)),a=rU(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=dAe(i,a))<55296||r>56319||a+1===l||(o=dAe(i,a+1))<56320||o>57343?e?jht(i,a):r:e?Vht(i,a,a+2):o-56320+(r-55296<<10)+65536}}(!0),Hht=yy.set,$ht=yy.getterFor("String Iterator");sAe(String,"String",function(e){Hht(this,{type:"String Iterator",string:xS(e),index:0})},function(){var e,t=$ht(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=zht(n,r),t.index+=e.length,{value:e,done:!1})});var Uht=dU.f("iterator"),Wht=KC(function(e){function t(n){return typeof NS=="function"&&typeof Uht=="symbol"?(e.exports=t=function(r){return typeof r},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(r){return r&&typeof NS=="function"&&r.constructor===NS&&r!==NS.prototype?"symbol":typeof r},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),fAe=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Wht),Ght=tS.EXISTS,qht=ry.f,pAe=Function.prototype,Kht=On(pAe.toString),hAe=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Yht=On(hAe.exec);Ju&&!Ght&&qht(pAe,"name",{configurable:!0,get:function(){try{return Yht(hAe,Kht(this))[1]}catch{return""}}});var vAe=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){var n=this.mark,r=ue.marks(t);return r&&r[n]?r[n]:""},e.prototype.isDisabled=function(t){return t.selection==null||(this.mark,!!Or(ue.nodes(t,{match:function(n){return Re.getNodeType(n)==="pre"||!!ue.isVoid(t,n)},universal:!0}),1)[0])},e.prototype.exec=function(t,n){var r=this.mark;n?t.addMark(r,n):t.removeMark(r)},e}(),Xht=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("fontSize.title"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',n.mark="fontSize",n}return yo(t,e),t.prototype.getOptions=function(n){var r=[],o=n.getMenuConfig(this.mark).fontSizeList,i=o===void 0?[]:o;r.push({text:jt("fontSize.default"),value:""}),i.forEach(function(l){if(typeof l=="string")r.push({text:l,value:l});else if(fAe(l)==="object"){var s=l.name,u=l.value;r.push({text:s,value:u})}});var a=this.getValue(n);return r.forEach(function(l){l.value===a?l.selected=!0:delete l.selected}),r},t}(vAe),Qht=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("fontFamily.title"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',n.mark="fontFamily",n.selectPanelWidth=150,n}return yo(t,e),t.prototype.getOptions=function(n){var r=[],o=n.getMenuConfig(this.mark).fontFamilyList,i=o===void 0?[]:o;r.push({text:jt("fontFamily.default"),value:""}),i.forEach(function(l){if(typeof l=="string")r.push({text:l,value:l,styleForRenderMenuList:{"font-family":l}});else if(fAe(l)==="object"){var s=l.name,u=l.value;r.push({text:s,value:u,styleForRenderMenuList:{"font-family":u}})}});var a=this.getValue(n);return r.forEach(function(l){l.value===a?l.selected=!0:delete l.selected}),r},t}(vAe),Jht={renderStyle:function(e,t){var n=e,r=n.fontSize,o=n.fontFamily,i=t;return r&&wv(i,{fontSize:r}),o&&wv(i,{fontFamily:o}),i},styleToHtml:function(e,t){if(!Qt.isText(e))return t;var n,r=e,o=r.fontSize,i=r.fontFamily;return o||i?((M$(t)||dy(n=Le(t))!=="span")&&(n=Le("<span>"+t+"</span>")),o&&n.css("font-size",o),i&&n.css("font-family",i),cy(n)):t},preParseHtml:[apt],parseStyleHtml:function(e,t,n){var r=Le(e);if(!Qt.isText(t))return t;var o=t,i=n.getMenuConfig("fontSize").fontSizeList,a=i===void 0?[]:i,l=ec(r,"font-size"),s=a.find(function(p){return p.value&&p.value===l})||a.includes(l);l&&s&&(o.fontSize=l);var u=n.getMenuConfig("fontFamily").fontFamilyList,c=u===void 0?[]:u,d=ec(r,"font-family").replace(/"/g,""),f=c.find(function(p){return p.value&&p.value===d})||c.includes(d);return d&&f&&(o.fontFamily=d),o},menus:[{key:"fontSize",factory:function(){return new Xht},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new Qht},config:{fontFamilyList:["\u9ED1\u4F53",{name:"\u4EFF\u5B8B",value:"\u4EFF\u5B8B"},"\u6977\u4F53","\u6807\u6977\u4F53","\u534E\u6587\u4EFF\u5B8B","\u534E\u6587\u6977\u4F53",{name:"\u5B8B\u4F53",value:"\u5B8B\u4F53"},"\u5FAE\u8F6F\u96C5\u9ED1","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]},Zht={selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=Le(e),n=ec(t,"padding-left");return/\dem/.test(n)&&t.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}},mAe=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){var n=Or(ue.nodes(t,{match:function(o){return!!o.indent},universal:!0}),1),r=n[0];return r==null?"":Or(r,1)[0].indent||""},e.prototype.isActive=function(t){return!1},e.prototype.getMatchNode=function(t){var n=Or(ue.nodes(t,{match:function(r){var o=Re.getNodeType(r);return o==="paragraph"||!!o.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},e}(),e0t=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("indent.decrease"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',n}return yo(t,e),t.prototype.isDisabled=function(n){var r=this.getMatchNode(n);return r==null||!r.indent},t.prototype.exec=function(n,r){et.setNodes(n,{indent:null},{match:function(o){return sn.isElement(o)}})},t}(mAe),t0t=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("indent.increase"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',n}return yo(t,e),t.prototype.isDisabled=function(n){var r=this.getMatchNode(n);return r==null||!!r.indent},t.prototype.exec=function(n,r){et.setNodes(n,{indent:"2em"},{match:function(o){return sn.isElement(o)},mode:"highest"})},t}(mAe),n0t={renderStyle:function(e,t){if(!sn.isElement(e))return t;var n=e.indent,r=t;return n&&wv(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!sn.isElement(e))return t;var n=e.indent;if(!n)return t;var r=Le(t);return r.css("text-indent",n),cy(r)},preParseHtml:[Zht],parseStyleHtml:function(e,t,n){var r=Le(e);if(!sn.isElement(t))return t;var o=t,i=ec(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new t0t}},{key:"delIndent",factory:function(){return new e0t}}]},FS=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.getMatchNode=function(t){var n=Or(ue.nodes(t,{match:function(r){var o=Re.getNodeType(r);return o==="paragraph"||o==="blockquote"||!!o.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},e.prototype.isDisabled=function(t){return t.selection==null||!!Re.getSelectedElems(t).some(function(n){if(ue.isVoid(t,n)&&ue.isBlock(t,n))return!0;var r=n.type;return!!["pre","code"].includes(r)||void 0})},e}(),r0t=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("justify.left"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',n}return yo(t,e),t.prototype.exec=function(n,r){et.setNodes(n,{textAlign:"left"},{match:function(o){return sn.isElement(o)&&!n.isInline(o)}})},t}(FS),o0t=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("justify.right"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',n}return yo(t,e),t.prototype.exec=function(n,r){et.setNodes(n,{textAlign:"right"},{match:function(o){return sn.isElement(o)&&!n.isInline(o)}})},t}(FS),i0t=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("justify.center"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',n}return yo(t,e),t.prototype.exec=function(n,r){et.setNodes(n,{textAlign:"center"},{match:function(o){return sn.isElement(o)&&!n.isInline(o)}})},t}(FS),a0t=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=jt("justify.justify"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',n}return yo(t,e),t.prototype.exec=function(n,r){et.setNodes(n,{textAlign:"justify"},{match:function(o){return sn.isElement(o)&&!n.isInline(o)}})},t}(FS),l0t={renderStyle:function(e,t){if(!sn.isElement(e))return t;var n=e.textAlign,r=t;return n&&wv(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!sn.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=Le(t);return r.css("text-align",n),cy(r)},parseStyleHtml:function(e,t,n){var r=Le(e);if(!sn.isElement(t))return t;var o=t,i=ec(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new r0t}},{key:"justifyRight",factory:function(){return new o0t}},{key:"justifyCenter",factory:function(){return new i0t}},{key:"justifyJustify",factory:function(){return new a0t}}]},s0t=function(){function e(){this.title=jt("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(t){var n=[],r=t.getMenuConfig("lineHeight").lineHeightList,o=r===void 0?[]:r;n.push({text:jt("lineHeight.default"),value:""}),o.forEach(function(a){n.push({text:a,value:a})});var i=this.getValue(t);return n.forEach(function(a){a.value===i?a.selected=!0:delete a.selected}),n},e.prototype.getMatchNode=function(t){var n=Or(ue.nodes(t,{match:function(r){var o=Re.getNodeType(r);return!!o.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(o)},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){var n=this.getMatchNode(t);return n==null?"":sn.isElement(n)&&n.lineHeight||""},e.prototype.isDisabled=function(t){return t.selection==null||this.getMatchNode(t)==null},e.prototype.exec=function(t,n){et.setNodes(t,{lineHeight:n.toString()},{mode:"highest"})},e}(),u0t={renderStyle:function(e,t){if(!sn.isElement(e))return t;var n=e.lineHeight,r=t;return n&&wv(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!sn.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=Le(t);return r.css("line-height",n),cy(r)},parseStyleHtml:function(e,t,n){var r=Le(e);if(!sn.isElement(t))return t;var o=t,i=n.getMenuConfig("lineHeight").lineHeightList,a=i===void 0?[]:i,l=ec(r,"line-height");return l&&a.includes(l)&&(o.lineHeight=l),o},menus:[{key:"lineHeight",factory:function(){return new s0t},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]},c0t=function(){function e(){this.title=jt("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null},e.prototype.exec=function(t,n){typeof t.redo=="function"&&t.redo()},e}(),d0t=function(){function e(){this.title=jt("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null},e.prototype.exec=function(t,n){typeof t.undo=="function"&&t.undo()},e}(),f0t={menus:[{key:"redo",factory:function(){return new c0t}},{key:"undo",factory:function(){return new d0t}}]},p0t={type:"divider",renderElem:function(e,t,n){return S2("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:Re.isNodeSelected(n,e)?"true":""},style:{},on:{mousedown:function(r){return r.preventDefault()}}},[S2("hr")])}},h0t=function(){function e(){this.title=jt("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!!Re.getSelectedElems(t).some(function(n){if(t.isVoid(n))return!0;var r=Re.getNodeType(n);return r==="table"||r==="pre"||void 0})},e.prototype.exec=function(t,n){et.insertNodes(t,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}(),v0t={renderElems:[p0t],elemsToHtml:[{type:"divider",elemToHtml:function(e,t){return"<hr/>"}}],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new h0t}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(o){return o.type==="divider"||t(o)},r.normalizeNode=function(o){var i=Or(o,2),a=i[0],l=i[1];if(Re.getNodeType(a)!=="divider")return n([a,l]);Re.isLastNode(r,a)&&et.insertNodes(r,Re.genEmptyParagraph(),{at:[l[0]+1]})},r}},m0t=iS.map;Bi({target:"Array",proto:!0,forced:!c$("map")},{map:function(e){return m0t(this,e,arguments.length>1?arguments[1]:void 0)}});var g0t=On([].join),y0t=QC!=Object,b0t=S8e("join",",");Bi({target:"Array",proto:!0,forced:y0t||!b0t},{join:function(e){return g0t(ny(this),e===void 0?",":e)}});var A0t=function(){function e(){this.title=jt("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(t){var n=Re.getSelectedNodeByType(t,"code");if(n==null)return null;var r=Re.getParentNode(t,n);return r==null||Re.getNodeType(r)!=="pre"?null:n},e.prototype.getValue=function(t){var n=this.getSelectCodeElem(t);return n==null?"":n.language||""},e.prototype.isActive=function(t){return!!this.getSelectCodeElem(t)},e.prototype.isDisabled=function(t){if(t.selection==null)return!0;var n=Re.getSelectedElems(t);return!!n.some(function(r){return t.isVoid(r)})||!n.some(function(r){var o=Re.getNodeType(r);if(o==="pre"||o==="paragraph")return!0})},e.prototype.exec=function(t,n){this.isActive(t)?this.changeToPlainText(t):this.changeToCodeBlock(t,n.toString())},e.prototype.changeToPlainText=function(t){var n=this.getSelectCodeElem(t);if(n!=null){var r=Pt.string(n);et.removeNodes(t,{mode:"highest"});var o=r.split(` |
|
1044 |
`).map(function(i){return{type:"paragraph",children:[{text:i}]}});et.insertNodes(t,o,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(t,n){var r,o,i=[],a=ue.nodes(t,{match:function(d){return t.children.includes(d)},universal:!0});try{for(var l=x8e(a),s=l.next();!s.done;s=l.next()){var u=Or(s.value,1)[0];u&&i.push(Pt.string(u))}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}et.removeNodes(t,{mode:"highest"});var c={type:"pre",children:[{type:"code",language:n,children:[{text:i.join(` |
|
1045 |
`)}]}]};et.insertNodes(t,c,{mode:"highest"})},e}(),w0t={key:"codeBlock",factory:function(){return new A0t}};Bi({target:"String",proto:!0,forced:$8("anchor")},{anchor:function(e){return H8(this,"a","name",e)}}),w$("match",function(e,t,n){return[function(r){var o=hu(this),i=r==null?void 0:JC(r,e);return i?oi(i,r,o):new RegExp(r)[e](To(o))},function(r){var o=Ms(this),i=To(r),a=n(t,o,i);if(a.done)return a.value;if(!o.global)return V8(o,i);var l=o.unicode;o.lastIndex=0;for(var s,u=[],c=0;(s=V8(o,i))!==null;){var d=To(s[0]);u[c]=d,d===""&&(o.lastIndex=x$(i,B8(o.lastIndex),l)),c++}return c===0?null:u}]});var x0t={type:"pre",renderElem:function(e,t,n){return Mn("pre",null,t)}},_0t={type:"code",renderElem:function(e,t,n){return Mn("code",null,t)}},E0t={selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e);return(t=t.filter(function(o){return Re.getNodeType(o)==="code"})).length===0&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(o){return Re.getNodeType(o)==="code"})}}},C0t={menus:[w0t],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData;e.insertNode;var o=e;return o.insertBreak=function(){var i=Re.getSelectedNodeByType(o,"code");if(i!=null){var a=function(u,c){var d=c.selection;if(d==null)return"";var f=Pt.string(u),p=d.anchor.offset,m=f.slice(0,p).split(` |
|
1046 |
`),v=m.length;return v===0?"":m[v-1]}(i,o);if(a){var l=a.match(/^\s+/);if(l!=null&&l[0]!=null){var s=l[0];return void o.insertText(` |
|
1047 |
`+s)}}o.insertText(` |
|
1048 |
`)}else t()},o.normalizeNode=function(i){var a=Or(i,2),l=a[0],s=a[1],u=Re.getNodeType(l);return u==="code"&&s.length<=1&&et.setNodes(o,{type:"paragraph"},{at:s}),u==="pre"&&(Re.isLastNode(o,l)&&et.insertNodes(o,Re.genEmptyParagraph(),{at:[s[0]+1]}),Re.getNodeType(l.children[0])!=="code"&&(et.unwrapNodes(o),et.setNodes(o,{type:"paragraph"},{mode:"highest"}))),n([l,s])},o.insertData=function(i){if(Re.getSelectedNodeByType(o,"code")!=null){var a=i.getData("text/plain");ue.insertText(o,a)}else r(i)},o},renderElems:[x0t,_0t],elemsToHtml:[{type:"code",elemToHtml:function(e,t){return"<code>"+t+"</code>"}},{type:"pre",elemToHtml:function(e,t){return"<pre>"+t+"</pre>"}}],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=Le(e);if(dy(t)!=="code")return e;var n=t.find("xmp");if(n.length===0)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:Le(e)[0].textContent||""}]}}},E0t]},S0t=function(){function e(){this.title=jt("fullScreen.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return t.isFullScreen},e.prototype.isDisabled=function(t){return!1},e.prototype.exec=function(t,n){t.isFullScreen?t.unFullScreen():t.fullScreen()},e}(),k0t={menus:[{key:"fullScreen",factory:function(){return new S0t}}]},D0t=function(){function e(){this.title=jt("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!!ct.isExpanded(n)},e.prototype.exec=function(t,n){var r=t.selection;if(r!=null){var o=[r.anchor.path[0]];et.insertNodes(t,{type:"paragraph",children:[{text:""}]},{at:o}),t.select(ue.start(t,o))}},e}(),O0t=[zdt,bft,Jht,n0t,l0t,u0t,$ft,v0t,opt,Tft,C0t,npt,hft,kdt,qft,f0t,k0t,{menus:[{key:"enter",factory:function(){return new D0t}}]}];Ul("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),Ul("zh-CN",{listModule:{unOrderedList:"\u65E0\u5E8F\u5217\u8868",orderedList:"\u6709\u5E8F\u5217\u8868"}});var gAe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kU(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ah,RS,IS=function(e){return e&&e.Math==Math&&e},Nn=IS(typeof globalThis=="object"&&globalThis)||IS(typeof window=="object"&&window)||IS(typeof self=="object"&&self)||IS(typeof gAe=="object"&&gAe)||function(){return this}()||Function("return this")(),yAe=Function.prototype,DU=yAe.bind,OU=yAe.call,T0t=DU&&DU.bind(OU),pr=DU?function(e){return e&&T0t(OU,e)}:function(e){return e&&function(){return OU.apply(e,arguments)}},Ro=function(e){try{return!!e()}catch{return!0}},M0t=pr({}.toString),N0t=pr("".slice),vf=function(e){return N0t(M0t(e),8,-1)},TU=Nn.Object,F0t=pr("".split),bAe=Ro(function(){return!TU("z").propertyIsEnumerable(0)})?function(e){return vf(e)=="String"?F0t(e,""):TU(e)}:TU,R0t=Nn.TypeError,BS=function(e){if(e==null)throw R0t("Can't call method on "+e);return e},by=function(e){return bAe(BS(e))},I0t=Object.defineProperty,MU=function(e,t){try{I0t(Nn,e,{value:t,configurable:!0,writable:!0})}catch{Nn[e]=t}return t},wh=Nn["__core-js_shared__"]||MU("__core-js_shared__",{}),NU=kU(function(e){(e.exports=function(t,n){return wh[t]||(wh[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),B0t=Nn.Object,i5=function(e){return B0t(BS(e))},L0t=pr({}.hasOwnProperty),Li=Object.hasOwn||function(e,t){return L0t(i5(e),t)},P0t=0,j0t=Math.random(),V0t=pr(1 .toString),FU=function(e){return"Symbol("+(e===void 0?"":e)+")_"+V0t(++P0t+j0t,36)},Uo=function(e){return typeof e=="function"},a5=function(e,t){return arguments.length<2?function(n){return Uo(n)?n:void 0}(Nn[e]):Nn[e]&&Nn[e][t]},RU=a5("navigator","userAgent")||"",AAe=Nn.process,wAe=Nn.Deno,xAe=AAe&&AAe.versions||wAe&&wAe.version,_Ae=xAe&&xAe.v8;_Ae&&(RS=(Ah=_Ae.split("."))[0]>0&&Ah[0]<4?1:+(Ah[0]+Ah[1])),!RS&&RU&&(!(Ah=RU.match(/Edge\/(\d+)/))||Ah[1]>=74)&&(Ah=RU.match(/Chrome\/(\d+)/))&&(RS=+Ah[1]);var LS,IU=RS,BU=!!Object.getOwnPropertySymbols&&!Ro(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&IU&&IU<41}),LU=BU&&!Symbol.sham&&typeof Symbol.iterator=="symbol",l5=NU("wks"),Nv=Nn.Symbol,EAe=Nv&&Nv.for,z0t=LU?Nv:Nv&&Nv.withoutSetter||FU,_a=function(e){if(!Li(l5,e)||!BU&&typeof l5[e]!="string"){var t="Symbol."+e;BU&&Li(Nv,e)?l5[e]=Nv[e]:l5[e]=LU&&EAe?EAe(t):z0t(t)}return l5[e]},Wo=function(e){return typeof e=="object"?e!==null:Uo(e)},H0t=Nn.String,$0t=Nn.TypeError,ql=function(e){if(Wo(e))return e;throw $0t(H0t(e)+" is not an object")},xh=!Ro(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),PU=Nn.document,U0t=Wo(PU)&&Wo(PU.createElement),jU=function(e){return U0t?PU.createElement(e):{}},CAe=!xh&&!Ro(function(){return Object.defineProperty(jU("div"),"a",{get:function(){return 7}}).a!=7}),s5=Function.prototype.call,na=s5.bind?s5.bind(s5):function(){return s5.apply(s5,arguments)},PS=pr({}.isPrototypeOf),W0t=Nn.Object,VU=LU?function(e){return typeof e=="symbol"}:function(e){var t=a5("Symbol");return Uo(t)&&PS(t.prototype,W0t(e))},G0t=Nn.String,zU=function(e){try{return G0t(e)}catch{return"Object"}},q0t=Nn.TypeError,HU=function(e){if(Uo(e))return e;throw q0t(zU(e)+" is not a function")},u5=function(e,t){var n=e[t];return n==null?void 0:HU(n)},K0t=Nn.TypeError,Y0t=Nn.TypeError,X0t=_a("toPrimitive"),$U=function(e){var t=function(n){if(!Wo(n)||VU(n))return n;var r,o=u5(n,X0t);if(o){if(r=na(o,n,"string"),!Wo(r)||VU(r))return r;throw Y0t("Can't convert object to primitive value")}return function(i){var a,l;if(Uo(a=i.toString)&&!Wo(l=na(a,i))||Uo(a=i.valueOf)&&!Wo(l=na(a,i)))return l;throw K0t("Can't convert object to primitive value")}(n)}(e);return VU(t)?t:t+""},Q0t=Nn.TypeError,SAe=Object.defineProperty,Fv={f:xh?SAe:function(e,t,n){if(ql(e),t=$U(t),ql(n),CAe)try{return SAe(e,t,n)}catch{}if("get"in n||"set"in n)throw Q0t("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},J0t=Math.ceil,Z0t=Math.floor,c5=function(e){var t=+e;return t!=t||t===0?0:(t>0?Z0t:J0t)(t)},e1t=Math.max,t1t=Math.min,UU=function(e,t){var n=c5(e);return n<0?e1t(n+t,0):t1t(n,t)},n1t=Math.min,kAe=function(e){return e>0?n1t(c5(e),9007199254740991):0},Ay=function(e){return kAe(e.length)},DAe=function(e){return function(t,n,r){var o,i=by(t),a=Ay(i),l=UU(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},OAe={includes:DAe(!0),indexOf:DAe(!1)},jS={},r1t=OAe.indexOf,TAe=pr([].push),MAe=function(e,t){var n,r=by(e),o=0,i=[];for(n in r)!Li(jS,n)&&Li(r,n)&&TAe(i,n);for(;t.length>o;)Li(r,n=t[o++])&&(~r1t(i,n)||TAe(i,n));return i},VS=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],o1t=Object.keys||function(e){return MAe(e,VS)},i1t=xh?Object.defineProperties:function(e,t){ql(e);for(var n,r=by(t),o=o1t(t),i=o.length,a=0;i>a;)Fv.f(e,n=o[a++],r[n]);return e},a1t=a5("document","documentElement"),NAe=NU("keys"),WU=function(e){return NAe[e]||(NAe[e]=FU(e))},FAe=WU("IE_PROTO"),GU=function(){},RAe=function(e){return"<script>"+e+"<\/script>"},IAe=function(e){e.write(RAe("")),e.close();var t=e.parentWindow.Object;return e=null,t},zS=function(){try{LS=new ActiveXObject("htmlfile")}catch{}var e,t;zS=typeof document<"u"?document.domain&&LS?IAe(LS):((t=jU("iframe")).style.display="none",a1t.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(RAe("document.F=Object")),e.close(),e.F):IAe(LS);for(var n=VS.length;n--;)delete zS.prototype[VS[n]];return zS()};jS[FAe]=!0;var qU=Object.create||function(e,t){var n;return e!==null?(GU.prototype=ql(e),n=new GU,GU.prototype=null,n[FAe]=e):n=zS(),t===void 0?n:i1t(n,t)},KU=_a("unscopables"),YU=Array.prototype;YU[KU]==null&&Fv.f(YU,KU,{configurable:!0,value:qU(null)});var d5=function(e){YU[KU][e]=!0},wy={},l1t=pr(Function.toString);Uo(wh.inspectSource)||(wh.inspectSource=function(e){return l1t(e)});var HS,f5,$S,XU=wh.inspectSource,BAe=Nn.WeakMap,LAe=Uo(BAe)&&/native code/.test(XU(BAe)),US=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_h=xh?function(e,t,n){return Fv.f(e,t,US(1,n))}:function(e,t,n){return e[t]=n,e},QU=Nn.TypeError,s1t=Nn.WeakMap;if(LAe||wh.state){var Rv=wh.state||(wh.state=new s1t),u1t=pr(Rv.get),PAe=pr(Rv.has),c1t=pr(Rv.set);HS=function(e,t){if(PAe(Rv,e))throw new QU("Object already initialized");return t.facade=e,c1t(Rv,e,t),t},f5=function(e){return u1t(Rv,e)||{}},$S=function(e){return PAe(Rv,e)}}else{var xy=WU("state");jS[xy]=!0,HS=function(e,t){if(Li(e,xy))throw new QU("Object already initialized");return t.facade=e,_h(e,xy,t),t},f5=function(e){return Li(e,xy)?e[xy]:{}},$S=function(e){return Li(e,xy)}}var Iv,jAe,VAe,ld={set:HS,get:f5,has:$S,enforce:function(e){return $S(e)?f5(e):HS(e,{})},getterFor:function(e){return function(t){var n;if(!Wo(t)||(n=f5(t)).type!==e)throw QU("Incompatible receiver, "+e+" required");return n}}},zAe={}.propertyIsEnumerable,HAe=Object.getOwnPropertyDescriptor,d1t={f:HAe&&!zAe.call({1:2},1)?function(e){var t=HAe(this,e);return!!t&&t.enumerable}:zAe},$Ae=Object.getOwnPropertyDescriptor,UAe={f:xh?$Ae:function(e,t){if(e=by(e),t=$U(t),CAe)try{return $Ae(e,t)}catch{}if(Li(e,t))return US(!na(d1t.f,e,t),e[t])}},WAe=Function.prototype,f1t=xh&&Object.getOwnPropertyDescriptor,JU=Li(WAe,"name"),ZU={EXISTS:JU,PROPER:JU&&(function(){}).name==="something",CONFIGURABLE:JU&&(!xh||xh&&f1t(WAe,"name").configurable)},mf=kU(function(e){var t=ZU.CONFIGURABLE,n=ld.get,r=ld.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;Uo(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Li(l,"name")||t&&l.name!==p)&&_h(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==Nn?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:_h(i,a,l)):d?i[a]=l:MU(a,l)})(Function.prototype,"toString",function(){return Uo(this)&&n(this).source||XU(this)})}),p1t=VS.concat("length","prototype"),WS={f:Object.getOwnPropertyNames||function(e){return MAe(e,p1t)}},h1t={f:Object.getOwnPropertySymbols},v1t=pr([].concat),m1t=a5("Reflect","ownKeys")||function(e){var t=WS.f(ql(e)),n=h1t.f;return n?v1t(t,n(e)):t},g1t=function(e,t){for(var n=m1t(t),r=Fv.f,o=UAe.f,i=0;i<n.length;i++){var a=n[i];Li(e,a)||r(e,a,o(t,a))}},y1t=/#|\.prototype\./,p5=function(e,t){var n=A1t[b1t(e)];return n==x1t||n!=w1t&&(Uo(t)?Ro(t):!!t)},b1t=p5.normalize=function(e){return String(e).replace(y1t,".").toLowerCase()},A1t=p5.data={},w1t=p5.NATIVE="N",x1t=p5.POLYFILL="P",eW=p5,_1t=UAe.f,Eh=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?Nn:u?Nn[l]||MU(l,{}):(Nn[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=_1t(n,r))&&a.value:n[r],!eW(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;g1t(i,o)}(e.sham||o&&o.sham)&&_h(i,"sham",!0),mf(n,r,i,e)}},E1t=!Ro(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),GAe=WU("IE_PROTO"),tW=Nn.Object,C1t=tW.prototype,GS=E1t?tW.getPrototypeOf:function(e){var t=i5(e);if(Li(t,GAe))return t[GAe];var n=t.constructor;return Uo(n)&&t instanceof n?n.prototype:t instanceof tW?C1t:null},nW=_a("iterator"),qAe=!1;[].keys&&("next"in(VAe=[].keys())?(jAe=GS(GS(VAe)))!==Object.prototype&&(Iv=jAe):qAe=!0);var S1t=Iv==null||Ro(function(){var e={};return Iv[nW].call(e)!==e});S1t&&(Iv={}),Uo(Iv[nW])||mf(Iv,nW,function(){return this});var rW={IteratorPrototype:Iv,BUGGY_SAFARI_ITERATORS:qAe},k1t=Fv.f,KAe=_a("toStringTag"),oW=function(e,t,n){e&&!Li(e=n?e:e.prototype,KAe)&&k1t(e,KAe,{configurable:!0,value:t})},D1t=rW.IteratorPrototype,O1t=function(){return this},T1t=Nn.String,M1t=Nn.TypeError,qS=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=pr(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,o){return ql(r),function(i){if(typeof i=="object"||Uo(i))return i;throw M1t("Can't set "+T1t(i)+" as a prototype")}(o),t?e(r,o):r.__proto__=o,r}}():void 0),N1t=ZU.PROPER,F1t=ZU.CONFIGURABLE,YAe=rW.IteratorPrototype,iW=rW.BUGGY_SAFARI_ITERATORS,h5=_a("iterator"),R1t=function(){return this},XAe=function(e,t,n,r,o,i,a){(function(g,b,y){var w=b+" Iterator";g.prototype=qU(D1t,{next:US(1,y)}),oW(g,w,!1),wy[w]=O1t})(n,t,r);var l,s,u=function(g){if(g===o&&m)return m;if(!iW&&g in f)return f[g];switch(g){case"keys":case"values":case"entries":return function(){return new n(this,g)}}return function(){return new n(this)}},c=t+" Iterator",d=!1,f=e.prototype,p=f[h5]||f["@@iterator"]||o&&f[o],m=!iW&&p||u(o),v=t=="Array"&&f.entries||p;return v&&(l=GS(v.call(new e)))!==Object.prototype&&l.next&&(GS(l)!==YAe&&(qS?qS(l,YAe):Uo(l[h5])||mf(l,h5,R1t)),oW(l,c,!0)),N1t&&o=="values"&&p&&p.name!=="values"&&(F1t?_h(f,"name","values"):(d=!0,m=function(){return na(p,this)})),o&&(s={values:u("values"),keys:u("keys"),entries:u("entries")},a||Eh({target:t,proto:!0,forced:iW||d},s)),f[h5]!==m&&mf(f,h5,m,{name:o}),wy[t]=m,s},I1t=ld.set,B1t=ld.getterFor("Array Iterator"),v5=XAe(Array,"Array",function(e,t){I1t(this,{type:"Array Iterator",target:by(e),index:0,kind:t})},function(){var e=B1t(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");wy.Arguments=wy.Array,d5("keys"),d5("values"),d5("entries");var QAe={};QAe[_a("toStringTag")]="z";var aW=String(QAe)==="[object z]",L1t=_a("toStringTag"),P1t=Nn.Object,j1t=vf(function(){return arguments}())=="Arguments",KS=aW?vf:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=P1t(e),L1t))=="string"?n:j1t?vf(t):(r=vf(t))=="Object"&&Uo(t.callee)?"Arguments":r},V1t=aW?{}.toString:function(){return"[object "+KS(this)+"]"};aW||mf(Object.prototype,"toString",V1t,{unsafe:!0});var z1t=Nn.String,gf=function(e){if(KS(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return z1t(e)},H1t=pr("".charAt),JAe=pr("".charCodeAt),$1t=pr("".slice),ZAe=function(e){return function(t,n){var r,o,i=gf(BS(t)),a=c5(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=JAe(i,a))<55296||r>56319||a+1===l||(o=JAe(i,a+1))<56320||o>57343?e?H1t(i,a):r:e?$1t(i,a,a+2):o-56320+(r-55296<<10)+65536}},ewe={codeAt:ZAe(!1),charAt:ZAe(!0)},U1t=ewe.charAt,W1t=ld.set,G1t=ld.getterFor("String Iterator");XAe(String,"String",function(e){W1t(this,{type:"String Iterator",string:gf(e),index:0})},function(){var e,t=G1t(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=U1t(n,r),t.index+=e.length,{value:e,done:!1})});var lW=function(e,t,n){for(var r in t)mf(e,r,t[r],n);return e},q1t=Nn.Array,K1t=Math.max,twe=WS.f,nwe=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Y1t={f:function(e){return nwe&&vf(e)=="Window"?function(t){try{return twe(t)}catch{return function(r){for(var o,i,a,l,s=Ay(r),u=UU(void 0,s),c=UU(s,s),d=q1t(K1t(c-u,0)),f=0;u<c;u++,f++)o=d,i=f,a=r[u],(l=$U(i))in o?Fv.f(o,l,US(0,a)):o[l]=a;return d.length=f,d}(nwe)}}(e):twe(by(e))}},rwe=Ro(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),YS=Object.isExtensible,Bv=Ro(function(){YS(1)})||rwe?function(e){return!!Wo(e)&&(!rwe||vf(e)!="ArrayBuffer")&&(!YS||YS(e))}:YS,X1t=!Ro(function(){return Object.isExtensible(Object.preventExtensions({}))}),sW=kU(function(e){var t=Fv.f,n=!1,r=FU("meta"),o=0,i=function(l){t(l,r,{value:{objectID:"O"+o++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var l=WS.f,s=pr([].splice),u={};u[r]=1,l(u).length&&(WS.f=function(c){for(var d=l(c),f=0,p=d.length;f<p;f++)if(d[f]===r){s(d,f,1);break}return d},Eh({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Y1t.f}))},fastKey:function(l,s){if(!Wo(l))return typeof l=="symbol"?l:(typeof l=="string"?"S":"P")+l;if(!Li(l,r)){if(!Bv(l))return"F";if(!s)return"E";i(l)}return l[r].objectID},getWeakData:function(l,s){if(!Li(l,r)){if(!Bv(l))return!0;if(!s)return!1;i(l)}return l[r].weakData},onFreeze:function(l){return X1t&&n&&Bv(l)&&!Li(l,r)&&i(l),l}};jS[r]=!0}),owe=pr(pr.bind),uW=function(e,t){return HU(e),t===void 0?e:owe?owe(e,t):function(){return e.apply(t,arguments)}},Q1t=_a("iterator"),J1t=Array.prototype,Z1t=_a("iterator"),iwe=function(e){if(e!=null)return u5(e,Z1t)||u5(e,"@@iterator")||wy[KS(e)]},evt=Nn.TypeError,awe=function(e,t,n){var r,o;ql(e);try{if(!(r=u5(e,"return"))){if(t==="throw")throw n;return n}r=na(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return ql(r),n},tvt=Nn.TypeError,XS=function(e,t){this.stopped=e,this.result=t},lwe=XS.prototype,swe=function(e,t,n){var r,o,i,a,l,s,u,c,d=n&&n.that,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),m=!(!n||!n.INTERRUPTED),v=uW(t,d),g=function(y){return r&&awe(r,"normal",y),new XS(!0,y)},b=function(y){return f?(ql(y),m?v(y[0],y[1],g):v(y[0],y[1])):m?v(y,g):v(y)};if(p)r=e;else{if(!(o=iwe(e)))throw tvt(zU(e)+" is not iterable");if((c=o)!==void 0&&(wy.Array===c||J1t[Q1t]===c)){for(i=0,a=Ay(e);a>i;i++)if((l=b(e[i]))&&PS(lwe,l))return l;return new XS(!1)}r=function(y,w){var x=arguments.length<2?iwe(y):w;if(HU(x))return ql(na(x,y));throw evt(zU(y)+" is not iterable")}(e,o)}for(s=r.next;!(u=na(s,r)).done;){try{l=b(u.value)}catch(y){awe(r,"throw",y)}if(typeof l=="object"&&l&&PS(lwe,l))return l}return new XS(!1)},nvt=Nn.TypeError,uwe=function(e,t){if(PS(t,e))return e;throw nvt("Incorrect invocation")},cwe=_a("iterator"),dwe=!1;try{var rvt=0,fwe={next:function(){return{done:!!rvt++}},return:function(){dwe=!0}};fwe[cwe]=function(){return this},Array.from(fwe,function(){throw 2})}catch{}var cW=Array.isArray||function(e){return vf(e)=="Array"},pwe=function(){},ovt=[],hwe=a5("Reflect","construct"),dW=/^\s*(?:class|function)\b/,ivt=pr(dW.exec),avt=!dW.exec(pwe),m5=function(e){if(!Uo(e))return!1;try{return hwe(pwe,ovt,e),!0}catch{return!1}},lvt=!hwe||Ro(function(){var e;return m5(m5.call)||!m5(Object)||!m5(function(){e=!0})||e})?function(e){if(!Uo(e))return!1;switch(KS(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return avt||!!ivt(dW,XU(e))}:m5,svt=_a("species"),vwe=Nn.Array,mwe=function(e,t){return new(function(n){var r;return cW(n)&&(r=n.constructor,(lvt(r)&&(r===vwe||cW(r.prototype))||Wo(r)&&(r=r[svt])===null)&&(r=void 0)),r===void 0?vwe:r}(e))(t===0?0:t)},gwe=pr([].push),Ch=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=i5(s),v=bAe(m),g=uW(u,c),b=Ay(v),y=0,w=d||mwe,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:gwe(x,f)}else switch(e){case 4:return!1;case 7:gwe(x,f)}return i?-1:r||o?o:x}},fW={forEach:Ch(0),map:Ch(1),filter:Ch(2),some:Ch(3),every:Ch(4),find:Ch(5),findIndex:Ch(6),filterReject:Ch(7)},QS=sW.getWeakData,uvt=ld.set,cvt=ld.getterFor,dvt=fW.find,fvt=fW.findIndex,pvt=pr([].splice),hvt=0,JS=function(e){return e.frozen||(e.frozen=new ywe)},ywe=function(){this.entries=[]},pW=function(e,t){return dvt(e.entries,function(n){return n[0]===t})};ywe.prototype={get:function(e){var t=pW(this,e);if(t)return t[1]},has:function(e){return!!pW(this,e)},set:function(e,t){var n=pW(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=fvt(this.entries,function(n){return n[0]===e});return~t&&pvt(this.entries,t,1),!!~t}};var g5,bwe={getConstructor:function(e,t,n,r){var o=e(function(s,u){uwe(s,i),uvt(s,{type:t,id:hvt++,frozen:void 0}),u!=null&&swe(u,s[r],{that:s,AS_ENTRIES:n})}),i=o.prototype,a=cvt(t),l=function(s,u,c){var d=a(s),f=QS(ql(u),!0);return f===!0?JS(d).set(u,c):f[d.id]=c,s};return lW(i,{delete:function(s){var u=a(this);if(!Wo(s))return!1;var c=QS(s);return c===!0?JS(u).delete(s):c&&Li(c,u.id)&&delete c[u.id]},has:function(s){var u=a(this);if(!Wo(s))return!1;var c=QS(s);return c===!0?JS(u).has(s):c&&Li(c,u.id)}}),lW(i,n?{get:function(s){var u=a(this);if(Wo(s)){var c=QS(s);return c===!0?JS(u).get(s):c?c[u.id]:void 0}},set:function(s,u){return l(this,s,u)}}:{add:function(s){return l(this,s,!0)}}),o}},ZS=ld.enforce,vvt=!Nn.ActiveXObject&&"ActiveXObject"in Nn,Awe=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},mvt=function(e,t,n){var r=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=r?"set":"add",a=Nn[e],l=a&&a.prototype,s=a,u={},c=function(g){var b=pr(l[g]);mf(l,g,g=="add"?function(y){return b(this,y===0?0:y),this}:g=="delete"?function(y){return!(o&&!Wo(y))&&b(this,y===0?0:y)}:g=="get"?function(y){return o&&!Wo(y)?void 0:b(this,y===0?0:y)}:g=="has"?function(y){return!(o&&!Wo(y))&&b(this,y===0?0:y)}:function(y,w){return b(this,y===0?0:y,w),this})};if(eW(e,!Uo(a)||!(o||l.forEach&&!Ro(function(){new a().entries().next()}))))s=n.getConstructor(t,e,r,i),sW.enable();else if(eW(e,!0)){var d=new s,f=d[i](o?{}:-0,1)!=d,p=Ro(function(){d.has(1)}),m=function(){if(!dwe)return!1;var g=!1;try{var b={};b[cwe]=function(){return{next:function(){return{done:g=!0}}}},function(y){new a(y)}(b)}catch{}return g}(),v=!o&&Ro(function(){for(var g=new a,b=5;b--;)g[i](b,b);return!g.has(-0)});m||((s=t(function(g,b){uwe(g,l);var y=function(w,x,_){var E,C;return qS&&Uo(E=x.constructor)&&E!==_&&Wo(C=E.prototype)&&C!==_.prototype&&qS(w,C),w}(new a,g,s);return b!=null&&swe(b,y[i],{that:y,AS_ENTRIES:r}),y})).prototype=l,l.constructor=s),(p||v)&&(c("delete"),c("has"),r&&c("get")),(v||f)&&c(i),o&&l.clear&&delete l.clear}return u[e]=s,Eh({global:!0,forced:s!=a},u),oW(s,e),o||n.setStrong(s,e,r),s}("WeakMap",Awe,bwe);if(LAe&&vvt){g5=bwe.getConstructor(Awe,"WeakMap",!0),sW.enable();var y5=mvt.prototype,wwe=pr(y5.delete),ek=pr(y5.has),xwe=pr(y5.get),_we=pr(y5.set);lW(y5,{delete:function(e){if(Wo(e)&&!Bv(e)){var t=ZS(this);return t.frozen||(t.frozen=new g5),wwe(this,e)||t.frozen.delete(e)}return wwe(this,e)},has:function(e){if(Wo(e)&&!Bv(e)){var t=ZS(this);return t.frozen||(t.frozen=new g5),ek(this,e)||t.frozen.has(e)}return ek(this,e)},get:function(e){if(Wo(e)&&!Bv(e)){var t=ZS(this);return t.frozen||(t.frozen=new g5),ek(this,e)?xwe(this,e):t.frozen.get(e)}return xwe(this,e)},set:function(e,t){if(Wo(e)&&!Bv(e)){var n=ZS(this);n.frozen||(n.frozen=new g5),ek(this,e)?_we(this,e,t):n.frozen.set(e,t)}else _we(this,e,t);return this}})}var Ewe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},hW=jU("span").classList,Cwe=hW&&hW.constructor&&hW.constructor.prototype,gvt=Cwe===Object.prototype?void 0:Cwe,vW=_a("iterator"),Swe=_a("toStringTag"),mW=v5.values,kwe=function(e,t){if(e){if(e[vW]!==mW)try{_h(e,vW,mW)}catch{e[vW]=mW}if(e[Swe]||_h(e,Swe,t),Ewe[t]){for(var n in v5)if(e[n]!==v5[n])try{_h(e,n,v5[n])}catch{e[n]=v5[n]}}}};for(var gW in Ewe)kwe(Nn[gW]&&Nn[gW].prototype,gW);kwe(gvt,"DOMTokenList");var yW=new WeakMap,yvt={type:"list-item",renderElem:function(e,t,n){yW.set(e,n);var r=e,o=r.level,i=o===void 0?0:o,a=r.ordered,l={margin:"5px 0 5px "+20*i+"px"},s="";if(a!==void 0&&a){var u=function(d,f){var p=f,m=p.type,v=p.level,g=v===void 0?0:v,b=p.ordered,y=b!==void 0&&b;if(!y)return-1;var w=1,x=f,_=Re.findPath(d,x);if(_[0]===0)return 1;for(;_[0]>0;){var E=Ke.previous(_),C=ue.node(d,E);if(C==null)break;var T=C[0],k=T.level,I=k===void 0?0:k,O=T.type,F=T.ordered;if(O!==m||I<g)break;if(I===g){if(F!==y)break;w++}x=T,_=E}return w}(n,e);s=u+"."}else s=function(d){d===void 0&&(d=0);var f="";switch(d){case 0:f="\u2022";break;case 1:f="\u25E6";break;default:f="\u25AA"}return f}(i);var c=function(d){var f,p=d.children||[],m=p.length;if(m===0)return"";for(var v=0;v<m&&!f;v++){var g=p[v];Qt.isText(g)&&(f=g)}return f==null?"":f.color||""}(e);return Mn("div",{style:l},Mn("span",{contentEditable:!1,style:{marginRight:"0.5em",color:c},"data-w-e-reserve":!0},s),Mn("span",null,t))}},bW=function(e,t){return bW=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},bW(e,t)};function Dwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}bW(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Owe(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b5(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Twe(e){return ue.nodes(e,{at:e.selection||void 0,match:function(t){return Re.findPath(e,t).length===1}})}var bvt=OAe.includes;Eh({target:"Array",proto:!0},{includes:function(e){return bvt(this,e,arguments.length>1?arguments[1]:void 0)}}),d5("includes");var Mwe,AW,Avt=function(){var e=ql(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},wW=Nn.RegExp,xW=Ro(function(){var e=wW("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),wvt=xW||Ro(function(){return!wW("a","y").sticky}),xvt={BROKEN_CARET:xW||Ro(function(){var e=wW("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:wvt,UNSUPPORTED_Y:xW},_vt=Nn.RegExp,Evt=Ro(function(){var e=_vt(".","s");return!(e.dotAll&&e.exec(` |
|
1049 |
`)&&e.flags==="s")}),Cvt=Nn.RegExp,Svt=Ro(function(){var e=Cvt("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),kvt=ld.get,Dvt=NU("native-string-replace",String.prototype.replace),tk=RegExp.prototype.exec,_W=tk,Ovt=pr("".charAt),Tvt=pr("".indexOf),Mvt=pr("".replace),EW=pr("".slice),CW=(AW=/b*/g,na(tk,Mwe=/a/,"a"),na(tk,AW,"a"),Mwe.lastIndex!==0||AW.lastIndex!==0),Nwe=xvt.BROKEN_CARET,SW=/()??/.exec("")[1]!==void 0;(CW||SW||Nwe||Evt||Svt)&&(_W=function(e){var t,n,r,o,i,a,l,s=this,u=kvt(s),c=gf(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=na(_W,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=Nwe&&s.sticky,m=na(Avt,s),v=s.source,g=0,b=c;if(p&&(m=Mvt(m,"y",""),Tvt(m,"g")===-1&&(m+="g"),b=EW(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Ovt(c,s.lastIndex-1)!==` |
|
1050 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),SW&&(n=new RegExp("^"+v+"$(?!\\s)",m)),CW&&(r=s.lastIndex),o=na(tk,p?n:s,b),p?o?(o.input=EW(o.input,g),o[0]=EW(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:CW&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),SW&&o&&o.length>1&&na(Dvt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=qU(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var nk=_W;Eh({target:"RegExp",proto:!0,forced:/./.exec!==nk},{exec:nk});var Fwe=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(t){var n=this.type;return Re.getSelectedNodeByType(t,n)},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){var n=this.getListNode(t);if(n==null)return!1;var r=n.ordered;return(r!==void 0&&r)===this.ordered},e.prototype.isDisabled=function(t){return t.selection==null||!!Re.getSelectedElems(t).some(function(n){if(ue.isVoid(t,n)&&ue.isBlock(t,n))return!0;var r=n.type;return!!["pre","code","table"].includes(r)||void 0})},e.prototype.exec=function(t,n){this.isActive(t)?et.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):et.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),Nvt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.ordered=!1,n.title=jt("listModule.unOrderedList"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',n}return Dwe(t,e),t}(Fwe),Fvt=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.ordered=!0,n.title=jt("listModule.orderedList"),n.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',n}return Dwe(t,e),t}(Fwe),Rvt={key:"bulletedList",factory:function(){return new Nvt}},Ivt={key:"numberedList",factory:function(){return new Fvt}},Rwe=[],Bvt={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=o!==void 0&&o?"ol":"ul",a=function(u){var c=yW.get(u);if(c==null)return 0;var d=u,f=d.type,p=d.ordered,m=p!==void 0&&p,v=d.level,g=v===void 0?0:v,b=Re.findPath(c,u);if(b[0]===0)return g+1;var y=Ke.previous(b),w=ue.node(c,y);if(!w)return 0;var x=b5(w,1)[0];if(Re.getNodeType(x)!==f)return g+1;var _=x,E=_.ordered,C=E!==void 0&&E,T=_.level,k=T===void 0?0:T;return k<g?g-k:k>g?0:k===g?C===m?0:1:0}(e);if(a>0)for(var l=0;l<a;l++)n+="<"+i+">",Rwe.push(i);var s=function(u){var c=yW.get(u);if(c==null)return 0;var d=u,f=d.type,p=d.ordered,m=p!==void 0&&p,v=d.level,g=v===void 0?0:v,b=Re.findPath(c,u);if(b[0]===c.children.length-1)return g+1;var y=Ke.next(b),w=ue.node(c,y);if(!w)return 0;var x=b5(w,1)[0];if(Re.getNodeType(x)!==f)return g+1;var _=x,E=_.ordered,C=E!==void 0&&E,T=_.level,k=T===void 0?0:T;return k<g?g-k:k>g?0:k===g?C===m?0:1:0}(e);if(s>0)for(l=0;l<s;l++)r+="</"+Rwe.pop()+">";return{html:"<li>"+t+"</li>",prefix:n,suffix:r}}},Lvt=_a("species"),Pvt=fW.filter,jvt=IU>=51||!Ro(function(){var e=[];return(e.constructor={})[Lvt]=function(){return{foo:1}},e.filter(Boolean).foo!==1});Eh({target:"Array",proto:!0,forced:!jvt},{filter:function(e){return Pvt(this,e,arguments.length>1?arguments[1]:void 0)}});var kW=Function.prototype,Iwe=kW.apply,Vvt=kW.bind,Bwe=kW.call,zvt=typeof Reflect=="object"&&Reflect.apply||(Vvt?Bwe.bind(Iwe):function(){return Bwe.apply(Iwe,arguments)}),Lwe=(_a("species"),RegExp.prototype),Hvt=ewe.charAt,$vt=function(e,t,n){return t+(n?Hvt(e,t).length:1)},Uvt=Math.floor,DW=pr("".charAt),Wvt=pr("".replace),OW=pr("".slice),Gvt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,qvt=/\$([$&'`]|\d{1,2})/g,Kvt=function(e,t,n,r,o,i){var a=n+e.length,l=r.length,s=qvt;return o!==void 0&&(o=i5(o),s=Gvt),Wvt(i,s,function(u,c){var d;switch(DW(c,0)){case"$":return"$";case"&":return e;case"`":return OW(t,0,n);case"'":return OW(t,a);case"<":d=o[OW(c,1,-1)];break;default:var f=+c;if(f===0)return u;if(f>l){var p=Uvt(f/10);return p===0?u:p<=l?r[p-1]===void 0?DW(c,1):r[p-1]+DW(c,1):u}d=r[f-1]}return d===void 0?"":d})},Yvt=Nn.TypeError,Xvt=function(e,t){var n=e.exec;if(Uo(n)){var r=na(n,e,t);return r!==null&&ql(r),r}if(vf(e)==="RegExp")return na(nk,e,t);throw Yvt("RegExp#exec called on incompatible receiver")},TW=_a("replace"),Qvt=Math.max,Jvt=Math.min,Zvt=pr([].concat),MW=pr([].push),Pwe=pr("".indexOf),jwe=pr("".slice),emt="a".replace(/./,"$0")==="$0",Vwe=!!/./[TW]&&/./[TW]("a","$0")==="";(function(e,t,n){var r=_a(e),o=!Ro(function(){var s={};return s[r]=function(){return 7},""[e](s)!=7}),i=o&&!Ro(function(){var s=!1,u=/a/;return u.exec=function(){return s=!0,null},u[r](""),!s});if(!o||!i||n){var a=pr(/./[r]),l=function(s,u,c){var d=Vwe?"$":"$0";return[function(f,p){var m=BS(this),v=f==null?void 0:u5(f,TW);return v?na(v,f,m,p):na(u,gf(m),f,p)},function(f,p){var m=ql(this),v=gf(f);if(typeof p=="string"&&Pwe(p,d)===-1&&Pwe(p,"$<")===-1){var g=c(u,m,v,p);if(g.done)return g.value}var b=Uo(p);b||(p=gf(p));var y=m.global;if(y){var w=m.unicode;m.lastIndex=0}for(var x=[];;){var _=Xvt(m,v);if(_===null||(MW(x,_),!y))break;gf(_[0])===""&&(m.lastIndex=$vt(v,kAe(m.lastIndex),w))}for(var E,C="",T=0,k=0;k<x.length;k++){for(var I=gf((_=x[k])[0]),O=Qvt(Jvt(c5(_.index),v.length),0),F=[],N=1;N<_.length;N++)MW(F,(E=_[N])===void 0?E:String(E));var B=_.groups;if(b){var L=Zvt([I],F,O,v);B!==void 0&&MW(L,B);var V=gf(zvt(p,void 0,L))}else V=Kvt(I,v,O,F,B,p);O>=T&&(C+=jwe(v,T,O)+V,T=O+I.length)}return C+jwe(v,T)}]}(0,""[e],function(s,u,c,d,f){var p=pr(s),m=u.exec;return m===nk||m===Lwe.exec?o&&!f?{done:!0,value:a(u,c,d)}:{done:!0,value:p(c,u,d)}:{done:!1}});mf(String.prototype,e,l[0]),mf(Lwe,r,l[1])}})("replace",0,!!Ro(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!emt||Vwe);var tmt=Nn.TypeError,zwe=function(e,t,n,r,o,i,a,l){for(var s,u,c=o,d=0,f=!!a&&uW(a,l);d<r;){if(d in n){if(s=f?f(n[d],d,t):n[d],i>0&&cW(s))u=Ay(s),c=zwe(e,t,s,u,c,i-1)-1;else{if(c>=9007199254740991)throw tmt("Exceed the acceptable array length");e[c]=s}c++}d++}return c},nmt=zwe;function NW(e){return e.length?e[0].tagName.toLowerCase():""}Eh({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=i5(this),n=Ay(t),r=mwe(t,0);return r.length=nmt(r,t,t,n,0,e===void 0?1:c5(e)),r}}),d5("flat"),Eh({global:!0},{globalThis:Nn}),au&&(Le.fn.append=au),iu&&(Le.fn.attr=iu),w2&&(Le.fn.parent=w2);var rmt={renderElems:[yvt],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e;return o.deleteBackward=function(i){var a=o.selection;if(a!=null)if(ct.isExpanded(a))t(i);else{var l=Re.getSelectedNodeByType(o,"list-item");if(l!=null)if(a.focus.offset!==0)t(i);else{var s=l.level,u=s===void 0?0:s;u>0?et.setNodes(o,{level:u-1}):et.setNodes(o,{type:"paragraph",ordered:void 0,level:void 0})}else t(i)}else t(i)},o.handleTab=function(){var i,a,l,s,u=o.selection;if(u!=null){if(ct.isCollapsed(u)){var c=Re.getSelectedNodeByType(o,"list-item");if(c==null)return void n();if(u.focus.offset===0){var d=c.level,f=d===void 0?0:d;return void et.setNodes(o,{level:f+1})}}if(ct.isExpanded(u)){var p=0,m=!1;try{for(var v=Owe(Twe(o)),g=v.next();!g.done;g=v.next()){var b=b5(g.value,1)[0];Re.getNodeType(b)==="list-item"?p++:m=!0}}catch(C){i={error:C}}finally{try{g&&!g.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}if(m||p<=1)return void n();try{for(var y=Owe(Twe(o)),w=y.next();!w.done;w=y.next()){var x=b5(w.value,2),_=(b=x[0],x[1]),E=b.level;f=E===void 0?0:E,et.setNodes(o,{level:f+1},{at:_})}}catch(C){l={error:C}}finally{try{w&&!w.done&&(s=y.return)&&s.call(y)}finally{if(l)throw l.error}}}else n()}else n()},o.normalizeNode=function(i){var a=b5(i,2),l=a[0],s=a[1],u=Re.getNodeType(l);return u!=="bulleted-list"&&u!=="numbered-list"||et.unwrapNodes(o,{at:s}),r([l,s])},o},menus:[Rvt,Ivt],elemsToHtml:[Bvt],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e);(t=t.filter(function(a){return!!Qt.isText(a)||!!n.isInline(a)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(a){return NW(a.parent())==="ol"}(r),i=function(a){for(var l=0,s=a.parent(),u=NW(s);u==="ul"||u==="ol";)u=NW(s=s.parent()),l++;return l-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}}]},Hwe=T1(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Array]",a="[object Boolean]",l="[object Date]",s="[object Error]",u="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",p="[object Promise]",m="[object RegExp]",v="[object Set]",g="[object String]",b="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",x=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,E={};E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E[o]=E[i]=E[y]=E[a]=E[w]=E[l]=E[s]=E[u]=E[c]=E[d]=E[f]=E[m]=E[v]=E[g]=E[b]=!1;var C=typeof eo=="object"&&eo&&eo.Object===Object&&eo,T=typeof self=="object"&&self&&self.Object===Object&&self,k=C||T||Function("return this")(),I=t&&!t.nodeType&&t,O=I&&e&&!e.nodeType&&e,F=O&&O.exports===I,N=F&&C.process,B=function(){try{return N&&N.binding&&N.binding("util")}catch{}}(),L=B&&B.isTypedArray;function V(He,lt){for(var Et=-1,Kt=He==null?0:He.length;++Et<Kt;)if(lt(He[Et],Et,He))return!0;return!1}function P(He){var lt=-1,Et=Array(He.size);return He.forEach(function(Kt,gr){Et[++lt]=[gr,Kt]}),Et}function H(He){var lt=-1,Et=Array(He.size);return He.forEach(function(Kt){Et[++lt]=Kt}),Et}var U=Array.prototype,G=Function.prototype,z=Object.prototype,$=k["__core-js_shared__"],W=G.toString,K=z.hasOwnProperty,X=function(){var He=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||"");return He?"Symbol(src)_1."+He:""}(),te=z.toString,ne=RegExp("^"+W.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),se=F?k.Buffer:void 0,le=k.Symbol,J=k.Uint8Array,Z=z.propertyIsEnumerable,ye=U.splice,be=le?le.toStringTag:void 0,ve=Object.getOwnPropertySymbols,Ae=se?se.isBuffer:void 0,Ce=function(He,lt){return function(Et){return He(lt(Et))}}(Object.keys,Object),_e=rn(k,"DataView"),ke=rn(k,"Map"),Be=rn(k,"Promise"),$e=rn(k,"Set"),rt=rn(k,"WeakMap"),ge=rn(Object,"create"),We=An(_e),st=An(ke),At=An(Be),Ve=An($e),it=An(rt),dt=le?le.prototype:void 0,ot=dt?dt.valueOf:void 0;function je(He){var lt=-1,Et=He==null?0:He.length;for(this.clear();++lt<Et;){var Kt=He[lt];this.set(Kt[0],Kt[1])}}function we(He){var lt=-1,Et=He==null?0:He.length;for(this.clear();++lt<Et;){var Kt=He[lt];this.set(Kt[0],Kt[1])}}function ze(He){var lt=-1,Et=He==null?0:He.length;for(this.clear();++lt<Et;){var Kt=He[lt];this.set(Kt[0],Kt[1])}}function me(He){var lt=-1,Et=He==null?0:He.length;for(this.__data__=new ze;++lt<Et;)this.add(He[lt])}function Me(He){var lt=this.__data__=new we(He);this.size=lt.size}function Ie(He,lt){for(var Et=He.length;Et--;)if(_n(He[Et][0],lt))return Et;return-1}function ht(He){return He==null?He===void 0?"[object Undefined]":"[object Null]":be&&be in Object(He)?function(lt){var Et=K.call(lt,be),Kt=lt[be];try{lt[be]=void 0;var gr=!0}catch{}var Bn=te.call(lt);return gr&&(Et?lt[be]=Kt:delete lt[be]),Bn}(He):function(lt){return te.call(lt)}(He)}function gt(He){return Go(He)&&ht(He)==o}function vt(He,lt,Et,Kt,gr){return He===lt||(He==null||lt==null||!Go(He)&&!Go(lt)?He!=He&<!=lt:function(Bn,Ne,Tt,Oe,nt,ut){var xt=Qr(Bn),En=Qr(Ne),ln=xt?i:tt(Bn),Ct=En?i:tt(Ne),Fn=(ln=ln==o?f:ln)==f,Mo=(Ct=Ct==o?f:Ct)==f,jr=ln==Ct;if(jr&&Ar(Bn)){if(!Ar(Ne))return!1;xt=!0,Fn=!1}if(jr&&!Fn)return ut||(ut=new Me),xt||za(Bn)?qt(Bn,Ne,Tt,Oe,nt,ut):function(Ee,Ze,Vt,Cn,on,Pn,Mr){switch(Vt){case w:if(Ee.byteLength!=Ze.byteLength||Ee.byteOffset!=Ze.byteOffset)return!1;Ee=Ee.buffer,Ze=Ze.buffer;case y:return!(Ee.byteLength!=Ze.byteLength||!Pn(new J(Ee),new J(Ze)));case a:case l:case d:return _n(+Ee,+Ze);case s:return Ee.name==Ze.name&&Ee.message==Ze.message;case m:case g:return Ee==Ze+"";case c:var gn=P;case v:var Ef=1&Cn;if(gn||(gn=H),Ee.size!=Ze.size&&!Ef)return!1;var gd=Mr.get(Ee);if(gd)return gd==Ze;Cn|=2,Mr.set(Ee,Ze);var Yl=qt(gn(Ee),gn(Ze),Cn,on,Pn,Mr);return Mr.delete(Ee),Yl;case"[object Symbol]":if(ot)return ot.call(Ee)==ot.call(Ze)}return!1}(Bn,Ne,ln,Tt,Oe,nt,ut);if(!(1&Tt)){var cr=Fn&&K.call(Bn,"__wrapped__"),Ha=Mo&&K.call(Ne,"__wrapped__");if(cr||Ha){var pe=cr?Bn.value():Bn,xe=Ha?Ne.value():Ne;return ut||(ut=new Me),nt(pe,xe,Tt,Oe,ut)}}return!!jr&&(ut||(ut=new Me),function(Ee,Ze,Vt,Cn,on,Pn){var Mr=1&Vt,gn=mn(Ee),Ef=gn.length;if(Ef!=mn(Ze).length&&!Mr)return!1;for(var gd=Ef;gd--;){var Yl=gn[gd];if(!(Mr?Yl in Ze:K.call(Ze,Yl)))return!1}var Ps=Pn.get(Ee);if(Ps&&Pn.get(Ze))return Ps==Ze;var om=!0;Pn.set(Ee,Ze),Pn.set(Ze,Ee);for(var n3=Mr;++gd<Ef;){var yd=Ee[Yl=gn[gd]],t0=Ze[Yl];if(Cn)var YA=Mr?Cn(t0,yd,Yl,Ze,Ee,Pn):Cn(yd,t0,Yl,Ee,Ze,Pn);if(!(YA===void 0?yd===t0||on(yd,t0,Vt,Cn,Pn):YA)){om=!1;break}n3||(n3=Yl=="constructor")}if(om&&!n3){var n0=Ee.constructor,im=Ze.constructor;n0==im||!("constructor"in Ee)||!("constructor"in Ze)||typeof n0=="function"&&n0 instanceof n0&&typeof im=="function"&&im instanceof im||(om=!1)}return Pn.delete(Ee),Pn.delete(Ze),om}(Bn,Ne,Tt,Oe,nt,ut))}(He,lt,Et,Kt,vt,gr))}function qt(He,lt,Et,Kt,gr,Bn){var Ne=1&Et,Tt=He.length,Oe=lt.length;if(Tt!=Oe&&!(Ne&&Oe>Tt))return!1;var nt=Bn.get(He);if(nt&&Bn.get(lt))return nt==lt;var ut=-1,xt=!0,En=2&Et?new me:void 0;for(Bn.set(He,lt),Bn.set(lt,He);++ut<Tt;){var ln=He[ut],Ct=lt[ut];if(Kt)var Fn=Ne?Kt(Ct,ln,ut,lt,He,Bn):Kt(ln,Ct,ut,He,lt,Bn);if(Fn!==void 0){if(Fn)continue;xt=!1;break}if(En){if(!V(lt,function(Mo,jr){if(cr=jr,!En.has(cr)&&(ln===Mo||gr(ln,Mo,Et,Kt,Bn)))return En.push(jr);var cr})){xt=!1;break}}else if(ln!==Ct&&!gr(ln,Ct,Et,Kt,Bn)){xt=!1;break}}return Bn.delete(He),Bn.delete(lt),xt}function mn(He){return function(lt,Et,Kt){var gr=Et(lt);return Qr(lt)?gr:function(Bn,Ne){for(var Tt=-1,Oe=Ne.length,nt=Bn.length;++Tt<Oe;)Bn[nt+Tt]=Ne[Tt];return Bn}(gr,Kt(lt))}(He,sa,zn)}function Zt(He,lt){var Et,Kt,gr=He.__data__;return((Kt=typeof(Et=lt))=="string"||Kt=="number"||Kt=="symbol"||Kt=="boolean"?Et!=="__proto__":Et===null)?gr[typeof lt=="string"?"string":"hash"]:gr.map}function rn(He,lt){var Et=function(Kt,gr){return Kt==null?void 0:Kt[gr]}(He,lt);return function(Kt){return!(!pl(Kt)||function(gr){return!!X&&X in gr}(Kt))&&(Jr(Kt)?ne:x).test(An(Kt))}(Et)?Et:void 0}je.prototype.clear=function(){this.__data__=ge?ge(null):{},this.size=0},je.prototype.delete=function(He){var lt=this.has(He)&&delete this.__data__[He];return this.size-=lt?1:0,lt},je.prototype.get=function(He){var lt=this.__data__;if(ge){var Et=lt[He];return Et===n?void 0:Et}return K.call(lt,He)?lt[He]:void 0},je.prototype.has=function(He){var lt=this.__data__;return ge?lt[He]!==void 0:K.call(lt,He)},je.prototype.set=function(He,lt){var Et=this.__data__;return this.size+=this.has(He)?0:1,Et[He]=ge&<===void 0?n:lt,this},we.prototype.clear=function(){this.__data__=[],this.size=0},we.prototype.delete=function(He){var lt=this.__data__,Et=Ie(lt,He);return!(Et<0||(Et==lt.length-1?lt.pop():ye.call(lt,Et,1),--this.size,0))},we.prototype.get=function(He){var lt=this.__data__,Et=Ie(lt,He);return Et<0?void 0:lt[Et][1]},we.prototype.has=function(He){return Ie(this.__data__,He)>-1},we.prototype.set=function(He,lt){var Et=this.__data__,Kt=Ie(Et,He);return Kt<0?(++this.size,Et.push([He,lt])):Et[Kt][1]=lt,this},ze.prototype.clear=function(){this.size=0,this.__data__={hash:new je,map:new(ke||we),string:new je}},ze.prototype.delete=function(He){var lt=Zt(this,He).delete(He);return this.size-=lt?1:0,lt},ze.prototype.get=function(He){return Zt(this,He).get(He)},ze.prototype.has=function(He){return Zt(this,He).has(He)},ze.prototype.set=function(He,lt){var Et=Zt(this,He),Kt=Et.size;return Et.set(He,lt),this.size+=Et.size==Kt?0:1,this},me.prototype.add=me.prototype.push=function(He){return this.__data__.set(He,n),this},me.prototype.has=function(He){return this.__data__.has(He)},Me.prototype.clear=function(){this.__data__=new we,this.size=0},Me.prototype.delete=function(He){var lt=this.__data__,Et=lt.delete(He);return this.size=lt.size,Et},Me.prototype.get=function(He){return this.__data__.get(He)},Me.prototype.has=function(He){return this.__data__.has(He)},Me.prototype.set=function(He,lt){var Et=this.__data__;if(Et instanceof we){var Kt=Et.__data__;if(!ke||Kt.length<199)return Kt.push([He,lt]),this.size=++Et.size,this;Et=this.__data__=new ze(Kt)}return Et.set(He,lt),this.size=Et.size,this};var zn=ve?function(He){return He==null?[]:(He=Object(He),function(lt,Et){for(var Kt=-1,gr=lt==null?0:lt.length,Bn=0,Ne=[];++Kt<gr;){var Tt=lt[Kt];Et(Tt)&&(Ne[Bn++]=Tt)}return Ne}(ve(He),function(lt){return Z.call(He,lt)}))}:function(){return[]},tt=ht;function kt(He,lt){return!!(lt=lt??r)&&(typeof He=="number"||_.test(He))&&He>-1&&He%1==0&&He<lt}function An(He){if(He!=null){try{return W.call(He)}catch{}try{return He+""}catch{}}return""}function _n(He,lt){return He===lt||He!=He&<!=lt}(_e&&tt(new _e(new ArrayBuffer(1)))!=w||ke&&tt(new ke)!=c||Be&&tt(Be.resolve())!=p||$e&&tt(new $e)!=v||rt&&tt(new rt)!=b)&&(tt=function(He){var lt=ht(He),Et=lt==f?He.constructor:void 0,Kt=Et?An(Et):"";if(Kt)switch(Kt){case We:return w;case st:return c;case At:return p;case Ve:return v;case it:return b}return lt});var po=gt(function(){return arguments}())?gt:function(He){return Go(He)&&K.call(He,"callee")&&!Z.call(He,"callee")},Qr=Array.isArray,Ar=Ae||function(){return!1};function Jr(He){if(!pl(He))return!1;var lt=ht(He);return lt==u||lt=="[object GeneratorFunction]"||lt=="[object AsyncFunction]"||lt=="[object Proxy]"}function Ao(He){return typeof He=="number"&&He>-1&&He%1==0&&He<=r}function pl(He){var lt=typeof He;return He!=null&&(lt=="object"||lt=="function")}function Go(He){return He!=null&&typeof He=="object"}var za=L?function(He){return function(lt){return He(lt)}}(L):function(He){return Go(He)&&Ao(He.length)&&!!E[ht(He)]};function sa(He){return(lt=He)!=null&&Ao(lt.length)&&!Jr(lt)?function(Et){var Kt=Qr(Et),gr=!Kt&&po(Et),Bn=!Kt&&!gr&&Ar(Et),Ne=!Kt&&!gr&&!Bn&&za(Et),Tt=Kt||gr||Bn||Ne,Oe=Tt?function(xt,En){for(var ln=-1,Ct=Array(xt);++ln<xt;)Ct[ln]=En(ln);return Ct}(Et.length,String):[],nt=Oe.length;for(var ut in Et)!K.call(Et,ut)||Tt&&(ut=="length"||Bn&&(ut=="offset"||ut=="parent")||Ne&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||kt(ut,nt))||Oe.push(ut);return Oe}(He):function(Et){if(gr=(Kt=Et)&&Kt.constructor,Kt!==(typeof gr=="function"&&gr.prototype||z))return Ce(Et);var Kt,gr,Bn=[];for(var Ne in Object(Et))K.call(Et,Ne)&&Ne!="constructor"&&Bn.push(Ne);return Bn}(He);var lt}e.exports=function(He,lt){return vt(He,lt)}});Ul("en",{tableModule:{deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header"}}),Ul("zh-CN",{tableModule:{deleteCol:"\u5220\u9664\u5217",deleteRow:"\u5220\u9664\u884C",deleteTable:"\u5220\u9664\u8868\u683C",widthAuto:"\u5BBD\u5EA6\u81EA\u9002\u5E94",insertCol:"\u63D2\u5165\u5217",insertRow:"\u63D2\u5165\u884C",insertTable:"\u63D2\u5165\u8868\u683C",header:"\u8868\u5934"}});var $we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uwe(e){var t={exports:{}};return e(t,t.exports),t.exports}var Sh,rk,ok=function(e){return e&&e.Math==Math&&e},sr=ok(typeof globalThis=="object"&&globalThis)||ok(typeof window=="object"&&window)||ok(typeof self=="object"&&self)||ok(typeof $we=="object"&&$we)||function(){return this}()||Function("return this")(),_i=function(e){try{return!!e()}catch{return!0}},kh=!_i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),A5=Function.prototype.call,Pi=A5.bind?A5.bind(A5):function(){return A5.apply(A5,arguments)},Wwe={}.propertyIsEnumerable,Gwe=Object.getOwnPropertyDescriptor,omt={f:Gwe&&!Wwe.call({1:2},1)?function(e){var t=Gwe(this,e);return!!t&&t.enumerable}:Wwe},FW=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},qwe=Function.prototype,RW=qwe.bind,IW=qwe.call,imt=RW&&RW.bind(IW),mr=RW?function(e){return e&&imt(IW,e)}:function(e){return e&&function(){return IW.apply(e,arguments)}},amt=mr({}.toString),lmt=mr("".slice),Dh=function(e){return lmt(amt(e),8,-1)},BW=sr.Object,smt=mr("".split),Kwe=_i(function(){return!BW("z").propertyIsEnumerable(0)})?function(e){return Dh(e)=="String"?smt(e,""):BW(e)}:BW,umt=sr.TypeError,Oh=function(e){if(e==null)throw umt("Can't call method on "+e);return e},w5=function(e){return Kwe(Oh(e))},ja=function(e){return typeof e=="function"},rc=function(e){return typeof e=="object"?e!==null:ja(e)},x5=function(e,t){return arguments.length<2?function(n){return ja(n)?n:void 0}(sr[e]):sr[e]&&sr[e][t]},Ywe=mr({}.isPrototypeOf),LW=x5("navigator","userAgent")||"",Xwe=sr.process,Qwe=sr.Deno,Jwe=Xwe&&Xwe.versions||Qwe&&Qwe.version,Zwe=Jwe&&Jwe.v8;Zwe&&(rk=(Sh=Zwe.split("."))[0]>0&&Sh[0]<4?1:+(Sh[0]+Sh[1])),!rk&&LW&&(!(Sh=LW.match(/Edge\/(\d+)/))||Sh[1]>=74)&&(Sh=LW.match(/Chrome\/(\d+)/))&&(rk=+Sh[1]);var PW=rk,jW=!!Object.getOwnPropertySymbols&&!_i(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&PW&&PW<41}),VW=jW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",cmt=sr.Object,zW=VW?function(e){return typeof e=="symbol"}:function(e){var t=x5("Symbol");return ja(t)&&Ywe(t.prototype,cmt(e))},dmt=sr.String,e7e=function(e){try{return dmt(e)}catch{return"Object"}},fmt=sr.TypeError,t7e=function(e){if(ja(e))return e;throw fmt(e7e(e)+" is not a function")},HW=function(e,t){var n=e[t];return n==null?void 0:t7e(n)},pmt=sr.TypeError,hmt=Object.defineProperty,$W=function(e,t){try{hmt(sr,e,{value:t,configurable:!0,writable:!0})}catch{sr[e]=t}return t},Th=sr["__core-js_shared__"]||$W("__core-js_shared__",{}),UW=Uwe(function(e){(e.exports=function(t,n){return Th[t]||(Th[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),vmt=sr.Object,WW=function(e){return vmt(Oh(e))},mmt=mr({}.hasOwnProperty),gu=Object.hasOwn||function(e,t){return mmt(WW(e),t)},gmt=0,ymt=Math.random(),bmt=mr(1 .toString),n7e=function(e){return"Symbol("+(e===void 0?"":e)+")_"+bmt(++gmt+ymt,36)},_5=UW("wks"),Lv=sr.Symbol,r7e=Lv&&Lv.for,Amt=VW?Lv:Lv&&Lv.withoutSetter||n7e,yu=function(e){if(!gu(_5,e)||!jW&&typeof _5[e]!="string"){var t="Symbol."+e;jW&&gu(Lv,e)?_5[e]=Lv[e]:_5[e]=VW&&r7e?r7e(t):Amt(t)}return _5[e]},wmt=sr.TypeError,xmt=yu("toPrimitive"),GW=function(e){var t=function(n){if(!rc(n)||zW(n))return n;var r,o=HW(n,xmt);if(o){if(r=Pi(o,n,"string"),!rc(r)||zW(r))return r;throw wmt("Can't convert object to primitive value")}return function(i){var a,l;if(ja(a=i.toString)&&!rc(l=Pi(a,i))||ja(a=i.valueOf)&&!rc(l=Pi(a,i)))return l;throw pmt("Can't convert object to primitive value")}(n)}(e);return zW(t)?t:t+""},qW=sr.document,_mt=rc(qW)&&rc(qW.createElement),KW=function(e){return _mt?qW.createElement(e):{}},o7e=!kh&&!_i(function(){return Object.defineProperty(KW("div"),"a",{get:function(){return 7}}).a!=7}),i7e=Object.getOwnPropertyDescriptor,a7e={f:kh?i7e:function(e,t){if(e=w5(e),t=GW(t),o7e)try{return i7e(e,t)}catch{}if(gu(e,t))return FW(!Pi(omt.f,e,t),e[t])}},Emt=sr.String,Cmt=sr.TypeError,bu=function(e){if(rc(e))return e;throw Cmt(Emt(e)+" is not an object")},Smt=sr.TypeError,l7e=Object.defineProperty,E5={f:kh?l7e:function(e,t,n){if(bu(e),t=GW(t),bu(n),o7e)try{return l7e(e,t,n)}catch{}if("get"in n||"set"in n)throw Smt("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},_y=kh?function(e,t,n){return E5.f(e,t,FW(1,n))}:function(e,t,n){return e[t]=n,e},kmt=mr(Function.toString);ja(Th.inspectSource)||(Th.inspectSource=function(e){return kmt(e)});var ik,C5,ak,YW=Th.inspectSource,s7e=sr.WeakMap,Dmt=ja(s7e)&&/native code/.test(YW(s7e)),u7e=UW("keys"),c7e=function(e){return u7e[e]||(u7e[e]=n7e(e))},XW={},QW=sr.TypeError,Omt=sr.WeakMap;if(Dmt||Th.state){var Pv=Th.state||(Th.state=new Omt),Tmt=mr(Pv.get),d7e=mr(Pv.has),Mmt=mr(Pv.set);ik=function(e,t){if(d7e(Pv,e))throw new QW("Object already initialized");return t.facade=e,Mmt(Pv,e,t),t},C5=function(e){return Tmt(Pv,e)||{}},ak=function(e){return d7e(Pv,e)}}else{var Ey=c7e("state");XW[Ey]=!0,ik=function(e,t){if(gu(e,Ey))throw new QW("Object already initialized");return t.facade=e,_y(e,Ey,t),t},C5=function(e){return gu(e,Ey)?e[Ey]:{}},ak=function(e){return gu(e,Ey)}}var JW={set:ik,get:C5,has:ak,enforce:function(e){return ak(e)?C5(e):ik(e,{})},getterFor:function(e){return function(t){var n;if(!rc(t)||(n=C5(t)).type!==e)throw QW("Incompatible receiver, "+e+" required");return n}}},f7e=Function.prototype,Nmt=kh&&Object.getOwnPropertyDescriptor,ZW=gu(f7e,"name"),eG={EXISTS:ZW,PROPER:ZW&&(function(){}).name==="something",CONFIGURABLE:ZW&&(!kh||kh&&Nmt(f7e,"name").configurable)},S5=Uwe(function(e){var t=eG.CONFIGURABLE,n=JW.get,r=JW.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;ja(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!gu(l,"name")||t&&l.name!==p)&&_y(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==sr?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:_y(i,a,l)):d?i[a]=l:$W(a,l)})(Function.prototype,"toString",function(){return ja(this)&&n(this).source||YW(this)})}),Fmt=Math.ceil,Rmt=Math.floor,lk=function(e){var t=+e;return t!=t||t===0?0:(t>0?Rmt:Fmt)(t)},Imt=Math.max,Bmt=Math.min,k5=function(e,t){var n=lk(e);return n<0?Imt(n+t,0):Bmt(n,t)},Lmt=Math.min,tG=function(e){return e>0?Lmt(lk(e),9007199254740991):0},sk=function(e){return tG(e.length)},Pmt=function(e){return function(t,n,r){var o,i=w5(t),a=sk(i),l=k5(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}}(!1),p7e=mr([].push),h7e=function(e,t){var n,r=w5(e),o=0,i=[];for(n in r)!gu(XW,n)&&gu(r,n)&&p7e(i,n);for(;t.length>o;)gu(r,n=t[o++])&&(~Pmt(i,n)||p7e(i,n));return i},uk=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jmt=uk.concat("length","prototype"),Vmt={f:Object.getOwnPropertyNames||function(e){return h7e(e,jmt)}},zmt={f:Object.getOwnPropertySymbols},Hmt=mr([].concat),$mt=x5("Reflect","ownKeys")||function(e){var t=Vmt.f(bu(e)),n=zmt.f;return n?Hmt(t,n(e)):t},Umt=function(e,t){for(var n=$mt(t),r=E5.f,o=a7e.f,i=0;i<n.length;i++){var a=n[i];gu(e,a)||r(e,a,o(t,a))}},Wmt=/#|\.prototype\./,D5=function(e,t){var n=qmt[Gmt(e)];return n==Ymt||n!=Kmt&&(ja(t)?_i(t):!!t)},Gmt=D5.normalize=function(e){return String(e).replace(Wmt,".").toLowerCase()},qmt=D5.data={},Kmt=D5.NATIVE="N",Ymt=D5.POLYFILL="P",Xmt=D5,Qmt=a7e.f,Mh=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?sr:u?sr[l]||$W(l,{}):(sr[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Qmt(n,r))&&a.value:n[r],!Xmt(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;Umt(i,o)}(e.sham||o&&o.sham)&&_y(i,"sham",!0),S5(n,r,i,e)}},v7e={};v7e[yu("toStringTag")]="z";var nG=String(v7e)==="[object z]",Jmt=yu("toStringTag"),Zmt=sr.Object,egt=Dh(function(){return arguments}())=="Arguments",rG=nG?Dh:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=Zmt(e),Jmt))=="string"?n:egt?Dh(t):(r=Dh(t))=="Object"&&ja(t.callee)?"Arguments":r},tgt=sr.String,Va=function(e){if(rG(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return tgt(e)},ngt=/"/g,rgt=mr("".replace);Mh({target:"String",proto:!0,forced:_i(function(){var e="".anchor('"');return e!==e.toLowerCase()||e.split('"').length>3})},{anchor:function(e){return t=e,n=Va(Oh(this)),r="<a",(r+=' name="'+rgt(Va(t),ngt,""")+'"')+">"+n+"</a>";var t,n,r}});var ck,m7e=function(){var e=bu(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},oG=sr.RegExp,iG=_i(function(){var e=oG("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),ogt=iG||_i(function(){return!oG("a","y").sticky}),g7e={BROKEN_CARET:iG||_i(function(){var e=oG("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:ogt,UNSUPPORTED_Y:iG},igt=Object.keys||function(e){return h7e(e,uk)},agt=kh?Object.defineProperties:function(e,t){bu(e);for(var n,r=w5(t),o=igt(t),i=o.length,a=0;i>a;)E5.f(e,n=o[a++],r[n]);return e},lgt=x5("document","documentElement"),y7e=c7e("IE_PROTO"),aG=function(){},b7e=function(e){return"<script>"+e+"<\/script>"},A7e=function(e){e.write(b7e("")),e.close();var t=e.parentWindow.Object;return e=null,t},dk=function(){try{ck=new ActiveXObject("htmlfile")}catch{}var e,t;dk=typeof document<"u"?document.domain&&ck?A7e(ck):((t=KW("iframe")).style.display="none",lgt.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(b7e("document.F=Object")),e.close(),e.F):A7e(ck);for(var n=uk.length;n--;)delete dk.prototype[uk[n]];return dk()};XW[y7e]=!0;var w7e,lG,x7e=Object.create||function(e,t){var n;return e!==null?(aG.prototype=bu(e),n=new aG,aG.prototype=null,n[y7e]=e):n=dk(),t===void 0?n:agt(n,t)},sgt=sr.RegExp,ugt=_i(function(){var e=sgt(".","s");return!(e.dotAll&&e.exec(` |
|
1051 |
`)&&e.flags==="s")}),cgt=sr.RegExp,dgt=_i(function(){var e=cgt("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),fgt=JW.get,pgt=UW("native-string-replace",String.prototype.replace),fk=RegExp.prototype.exec,sG=fk,hgt=mr("".charAt),vgt=mr("".indexOf),mgt=mr("".replace),uG=mr("".slice),cG=(lG=/b*/g,Pi(fk,w7e=/a/,"a"),Pi(fk,lG,"a"),w7e.lastIndex!==0||lG.lastIndex!==0),_7e=g7e.BROKEN_CARET,dG=/()??/.exec("")[1]!==void 0;(cG||dG||_7e||ugt||dgt)&&(sG=function(e){var t,n,r,o,i,a,l,s=this,u=fgt(s),c=Va(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=Pi(sG,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=_7e&&s.sticky,m=Pi(m7e,s),v=s.source,g=0,b=c;if(p&&(m=mgt(m,"y",""),vgt(m,"g")===-1&&(m+="g"),b=uG(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&hgt(c,s.lastIndex-1)!==` |
|
1052 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),dG&&(n=new RegExp("^"+v+"$(?!\\s)",m)),cG&&(r=s.lastIndex),o=Pi(fk,p?n:s,b),p?o?(o.input=uG(o.input,g),o[0]=uG(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:cG&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),dG&&o&&o.length>1&&Pi(pgt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=x7e(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var O5=sG;Mh({target:"RegExp",proto:!0,forced:/./.exec!==O5},{exec:O5});var pk=Array.isArray||function(e){return Dh(e)=="Array"},E7e=function(){},ggt=[],C7e=x5("Reflect","construct"),fG=/^\s*(?:class|function)\b/,ygt=mr(fG.exec),bgt=!fG.exec(E7e),T5=function(e){if(!ja(e))return!1;try{return C7e(E7e,ggt,e),!0}catch{return!1}},pG=!C7e||_i(function(){var e;return T5(T5.call)||!T5(Object)||!T5(function(){e=!0})||e})?function(e){if(!ja(e))return!1;switch(rG(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return bgt||!!ygt(fG,YW(e))}:T5,S7e=function(e,t,n){var r=GW(t);r in e?E5.f(e,r,FW(0,n)):e[r]=n},Agt=yu("species"),hG=function(e){return PW>=51||!_i(function(){var t=[];return(t.constructor={})[Agt]=function(){return{foo:1}},t[e](Boolean).foo!==1})},wgt=mr([].slice),xgt=hG("slice"),_gt=yu("species"),vG=sr.Array,Egt=Math.max;function oc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function k7e(e){var t=e.selection;if(t==null)return!1;var n=oc(ue.nodes(e,{match:function(i){return Re.checkNodeType(i,"table-cell")}}),1)[0];if(n){var r=oc(n,2)[1],o=ue.start(e,r);if(nr.equals(t.anchor,o))return!0}return!1}function D7e(e,t){var n,r,o=ue.nodes(e,{at:t,match:function(s){return Re.getNodeType(s)==="table"}}),i=!1;try{for(var a=function(s){var u=typeof Symbol=="function"&&Symbol.iterator,c=u&&s[u],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),l=a.next();!l.done;l=a.next())l.value,i=!0}catch(s){n={error:s}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}Mh({target:"Array",proto:!0,forced:!xgt},{slice:function(e,t){var n,r,o,i=w5(this),a=sk(i),l=k5(e,a),s=k5(t===void 0?a:t,a);if(pk(i)&&(n=i.constructor,(pG(n)&&(n===vG||pk(n.prototype))||rc(n)&&(n=n[_gt])===null)&&(n=void 0),n===vG||n===void 0))return wgt(i,l,s);for(r=new(n===void 0?vG:n)(Egt(s-l,0)),o=0;l<s;l++,o++)l in i&&S7e(r,o,i[l]);return r.length=o,r}});var O7e=mr(mr.bind),Cgt=yu("species"),T7e=sr.Array,Sgt=function(e,t){return new(function(n){var r;return pk(n)&&(r=n.constructor,(pG(r)&&(r===T7e||pk(r.prototype))||rc(r)&&(r=r[Cgt])===null)&&(r=void 0)),r===void 0?T7e:r}(e))(t===0?0:t)},M7e=mr([].push),Nh=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=WW(s),v=Kwe(m),g=function(_,E){return t7e(_),E===void 0?_:O7e?O7e(_,E):function(){return _.apply(E,arguments)}}(u,c),b=sk(v),y=0,w=d||Sgt,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:M7e(x,f)}else switch(e){case 4:return!1;case 7:M7e(x,f)}return i?-1:r||o?o:x}},hk={forEach:Nh(0),map:Nh(1),filter:Nh(2),some:Nh(3),every:Nh(4),find:Nh(5),findIndex:Nh(6),filterReject:Nh(7)},kgt=hk.map;Mh({target:"Array",proto:!0,forced:!hG("map")},{map:function(e){return kgt(this,e,arguments.length>1?arguments[1]:void 0)}});var Dgt=nG?{}.toString:function(){return"[object "+rG(this)+"]"};function vk(e){var t=e.children||[];return t.length===0?[]:(t[0]||{}).children||[]}function N7e(e){return vk(e).every(function(t){return!!t.isHeader})}nG||S5(Object.prototype,"toString",Dgt,{unsafe:!0});var Ogt=eG.PROPER,mG=RegExp.prototype,F7e=mG.toString,Tgt=mr(m7e),Mgt=_i(function(){return F7e.call({source:"a",flags:"b"})!="/a/b"}),Ngt=Ogt&&F7e.name!="toString";(Mgt||Ngt)&&S5(RegExp.prototype,"toString",function(){var e=bu(this),t=Va(e.source),n=e.flags;return"/"+t+"/"+Va(n===void 0&&Ywe(mG,e)&&!("flags"in mG)?Tgt(e):n)},{unsafe:!0});var gG=yu("unscopables"),yG=Array.prototype;yG[gG]==null&&E5.f(yG,gG,{configurable:!0,value:x7e(null)});var Fgt=hk.find,R7e=!0;"find"in[]&&Array(1).find(function(){R7e=!1}),Mh({target:"Array",proto:!0,forced:R7e},{find:function(e){return Fgt(this,e,arguments.length>1?arguments[1]:void 0)}}),yG[gG].find=!0;var bG=Function.prototype,I7e=bG.apply,Rgt=bG.bind,B7e=bG.call,L7e=typeof Reflect=="object"&&Reflect.apply||(Rgt?B7e.bind(I7e):function(){return B7e.apply(I7e,arguments)}),Igt=yu("species"),AG=RegExp.prototype,P7e=function(e,t,n,r){var o=yu(e),i=!_i(function(){var u={};return u[o]=function(){return 7},""[e](u)!=7}),a=i&&!_i(function(){var u=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[Igt]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return u=!0,null},c[o](""),!u});if(!i||!a||n){var l=mr(/./[o]),s=t(o,""[e],function(u,c,d,f,p){var m=mr(u),v=c.exec;return v===O5||v===AG.exec?i&&!p?{done:!0,value:l(c,d,f)}:{done:!0,value:m(d,c,f)}:{done:!1}});S5(String.prototype,e,s[0]),S5(AG,o,s[1])}r&&_y(AG[o],"sham",!0)},Bgt=yu("match"),Lgt=sr.TypeError,Pgt=yu("species"),jgt=mr("".charAt),j7e=mr("".charCodeAt),Vgt=mr("".slice),zgt=function(e){return function(t,n){var r,o,i=Va(Oh(t)),a=lk(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=j7e(i,a))<55296||r>56319||a+1===l||(o=j7e(i,a+1))<56320||o>57343?e?jgt(i,a):r:e?Vgt(i,a,a+2):o-56320+(r-55296<<10)+65536}}(!0),V7e=function(e,t,n){return t+(n?zgt(e,t).length:1)},Hgt=sr.Array,$gt=Math.max,z7e=function(e,t,n){for(var r=sk(e),o=k5(t,r),i=k5(n===void 0?r:n,r),a=Hgt($gt(i-o,0)),l=0;o<i;o++,l++)S7e(a,l,e[o]);return a.length=l,a},Ugt=sr.TypeError,wG=function(e,t){var n=e.exec;if(ja(n)){var r=Pi(n,e,t);return r!==null&&bu(r),r}if(Dh(e)==="RegExp")return Pi(O5,e,t);throw Ugt("RegExp#exec called on incompatible receiver")},Cy=g7e.UNSUPPORTED_Y,Wgt=Math.min,H7e=[].push,Ggt=mr(/./.exec),Sy=mr(H7e),M5=mr("".slice);P7e("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(o,i){var a,l,s=Va(Oh(this)),u=i===void 0?4294967295:i>>>0;if(u===0)return[];if(o===void 0)return[s];if(!rc(a=o)||!((l=a[Bgt])!==void 0?l:Dh(a)=="RegExp"))return Pi(t,s,o,u);for(var c,d,f,p=[],m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(o.sticky?"y":""),v=0,g=new RegExp(o.source,m+"g");(c=Pi(O5,g,s))&&!((d=g.lastIndex)>v&&(Sy(p,M5(s,v,c.index)),c.length>1&&c.index<s.length&&L7e(H7e,p,z7e(c,1)),f=c[0].length,v=d,p.length>=u));)g.lastIndex===c.index&&g.lastIndex++;return v===s.length?!f&&Ggt(g,"")||Sy(p,""):Sy(p,M5(s,v)),p.length>u?z7e(p,0,u):p}:"0".split(void 0,0).length?function(o,i){return o===void 0&&i===0?[]:Pi(t,this,o,i)}:t,[function(o,i){var a=Oh(this),l=o==null?void 0:HW(o,e);return l?Pi(l,o,a,i):Pi(r,Va(a),o,i)},function(o,i){var a=bu(this),l=Va(o),s=n(r,a,l,i,r!==t);if(s.done)return s.value;var u=function(x,_){var E,C=bu(x).constructor;return C===void 0||(E=bu(C)[Pgt])==null?_:function(T){if(pG(T))return T;throw Lgt(e7e(T)+" is not a constructor")}(E)}(a,RegExp),c=a.unicode,d=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Cy?"g":"y"),f=new u(Cy?"^(?:"+a.source+")":a,d),p=i===void 0?4294967295:i>>>0;if(p===0)return[];if(l.length===0)return wG(f,l)===null?[l]:[];for(var m=0,v=0,g=[];v<l.length;){f.lastIndex=Cy?0:v;var b,y=wG(f,Cy?M5(l,v):l);if(y===null||(b=Wgt(tG(f.lastIndex+(Cy?v:0)),l.length))===m)v=V7e(l,v,c);else{if(Sy(g,M5(l,m,v)),g.length===p)return g;for(var w=1;w<=y.length-1;w++)if(Sy(g,y[w]),g.length===p)return g;v=m=b}}return Sy(g,M5(l,m)),g}]},!!_i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),Cy);var xG=` |
|
1053 |
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,$7e=mr("".replace),mk="["+xG+"]",qgt=RegExp("^"+mk+mk+"*"),Kgt=RegExp(mk+mk+"*$"),_G=function(e){return function(t){var n=Va(Oh(t));return 1&e&&(n=$7e(n,qgt,"")),2&e&&(n=$7e(n,Kgt,"")),n}},Ygt={start:_G(1),end:_G(2),trim:_G(3)},Xgt=eG.PROPER,Qgt=Ygt.trim;function U7e(e){return e.length?e[0].tagName.toLowerCase():""}Mh({target:"String",proto:!0,forced:function(e){return _i(function(){return!!xG[e]()||"\u200B\x85\u180E"[e]()!=="\u200B\x85\u180E"||Xgt&&xG[e].name!==e})}("trim")},{trim:function(){return Qgt(this)}}),Mh({global:!0},{globalThis:sr}),au&&(Le.fn.append=au),Yc&&(Le.fn.on=Yc),$p&&(Le.fn.focus=$p),iu&&(Le.fn.attr=iu),Kc&&(Le.fn.val=Kc),Hp&&(Le.fn.html=Hp),b2&&(Le.fn.dataset=b2),m2&&(Le.fn.addClass=m2),g2&&(Le.fn.removeClass=g2),_2&&(Le.fn.children=_2),PE&&(Le.fn.each=PE),x2&&(Le.fn.find=x2);var N5=!1,W7e=0,G7e=0,F5=null,R5=null,I5=Le("body");function q7e(e){N5=!1,R5=null,F5=null,I5.off("mousemove",K7e),I5.off("mouseup",q7e)}I5.on("mousedown",function(e){var t=e.target;if((t.tagName==="TH"||t.tagName==="TD")&&t.style.cursor==="col-resize"){t.style.cursor="auto",e.preventDefault(),N5=!0;var n=e.clientX;W7e=n;var r=t.getBoundingClientRect().width;G7e=r,I5.on("mousemove",K7e),I5.on("mouseup",q7e)}});var K7e=Y1(function(e){if(N5&&R5!=null&&F5!=null){e.preventDefault();var t=e.clientX,n=G7e+(t-W7e);(n=Math.floor(100*n)/100)<30&&(n=30),et.setNodes(R5,{width:n.toString()},{at:F5})}},100),Jgt={type:"table",renderElem:function(e,t,n){var r=function(l,s){if(l.isDisabled())return!1;var u=l.selection;if(u==null||ct.isCollapsed(u))return!0;var c=u.anchor,d=u.focus,f=Re.findPath(l,s),p=ue.start(l,f),m=ue.end(l,f),v=nr.compare(c,m)<=0&&nr.compare(c,p)>=0,g=nr.compare(d,m)<=0&&nr.compare(d,p)>=0;return!!(v&&g&&Ke.equals(c.path.slice(0,3),d.path.slice(0,3)))}(n,e),o=e.width,i=o===void 0?"auto":o,a=Mn("div",{className:"table-container","data-selected":Re.isNodeSelected(n,e),on:{mousedown:function(l){if(l.target.tagName==="DIV"&&l.preventDefault(),!n.isDisabled()){var s=Re.findPath(n,e),u=ue.start(n,s),c=n.selection;c!=null?c.anchor.path[0]!==s[0]&&n.select(u):n.select(u)}}}},Mn("table",{width:i,contentEditable:r},Mn("colgroup",null,vk(e).map(function(l){var s=l.width;return Mn("col",{width:s===void 0?"auto":s})})),Mn("tbody",null,t)));return a}},Zgt={type:"table-row",renderElem:function(e,t,n){return Mn("tr",null,t)}},e2t={type:"table-cell",renderElem:function(e,t,n){var r=function(f,p){var m=Re.getParentNode(f,p);if(m==null)return!1;var v=Re.getParentNode(f,m);return v!=null&&vk(v).some(function(g){return g===p})}(n,e),o=e,i=o.colSpan,a=i===void 0?1:i,l=o.rowSpan,s=l===void 0?1:l,u=o.isHeader,c=u!==void 0&&u;if(!r)return Mn("td",{colSpan:a,rowSpan:s},t);var d=Mn(c?"th":"td",{colSpan:a,rowSpan:s,style:{borderRightWidth:"3px"},on:{mousemove:Y1(function(f){var p=this.elm;if(p!=null){var m=p.getBoundingClientRect(),v=m.left,g=m.width,b=m.top,y=m.height,w=f.clientX,x=f.clientY;N5||(w>v+g-5&&w<v+g&&x>b&&x<b+y?(p.style.cursor="col-resize",R5=n,F5=Re.findPath(n,e)):N5||(p.style.cursor="auto",R5=null,F5=null))}},100)}},t);return d}},t2t={selector:"table",preParseHtml:function(e){var t=Le(e);if(U7e(t)!=="table")return e;var n=t.find("tbody");if(n.length===0)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}},n2t=hk.filter;Mh({target:"Array",proto:!0,forced:!hG("filter")},{filter:function(e){return n2t(this,e,arguments.length>1?arguments[1]:void 0)}});var r2t=Math.floor,EG=mr("".charAt),o2t=mr("".replace),CG=mr("".slice),i2t=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a2t=/\$([$&'`]|\d{1,2})/g,l2t=function(e,t,n,r,o,i){var a=n+e.length,l=r.length,s=a2t;return o!==void 0&&(o=WW(o),s=i2t),o2t(i,s,function(u,c){var d;switch(EG(c,0)){case"$":return"$";case"&":return e;case"`":return CG(t,0,n);case"'":return CG(t,a);case"<":d=o[CG(c,1,-1)];break;default:var f=+c;if(f===0)return u;if(f>l){var p=r2t(f/10);return p===0?u:p<=l?r[p-1]===void 0?EG(c,1):r[p-1]+EG(c,1):u}d=r[f-1]}return d===void 0?"":d})},SG=yu("replace"),s2t=Math.max,u2t=Math.min,c2t=mr([].concat),kG=mr([].push),Y7e=mr("".indexOf),X7e=mr("".slice),d2t="a".replace(/./,"$0")==="$0",Q7e=!!/./[SG]&&/./[SG]("a","$0")==="";P7e("replace",function(e,t,n){var r=Q7e?"$":"$0";return[function(o,i){var a=Oh(this),l=o==null?void 0:HW(o,SG);return l?Pi(l,o,a,i):Pi(t,Va(a),o,i)},function(o,i){var a=bu(this),l=Va(o);if(typeof i=="string"&&Y7e(i,r)===-1&&Y7e(i,"$<")===-1){var s=n(t,a,l,i);if(s.done)return s.value}var u=ja(i);u||(i=Va(i));var c=a.global;if(c){var d=a.unicode;a.lastIndex=0}for(var f=[];;){var p=wG(a,l);if(p===null||(kG(f,p),!c))break;Va(p[0])===""&&(a.lastIndex=V7e(l,tG(a.lastIndex),d))}for(var m,v="",g=0,b=0;b<f.length;b++){for(var y=Va((p=f[b])[0]),w=s2t(u2t(lk(p.index),l.length),0),x=[],_=1;_<p.length;_++)kG(x,(m=p[_])===void 0?m:String(m));var E=p.groups;if(u){var C=c2t([y],x,w,l);E!==void 0&&kG(C,E);var T=Va(L7e(i,void 0,C))}else T=l2t(y,l,w,x,E,i);w>=g&&(v+=X7e(l,g,w)+T,g=w+y.length)}return v+X7e(l,g)}]},!!_i(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!d2t||Q7e);var f2t={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e);(t=t.filter(function(l){return!!Qt.isText(l)||!!n.isInline(l)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1"),i=parseInt(r.attr("rowSpan")||"1"),a=r.attr("width")||"auto";return{type:"table-cell",isHeader:U7e(r)==="th",colSpan:o,rowSpan:i,width:a,children:t}}},p2t={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"table-row",children:t.filter(function(r){return Re.getNodeType(r)==="table-cell"})}}},h2t={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Le(e),o="auto";return function(i){for(var a="",l=(i.attr("style")||"").split(";"),s=l.length,u=0;u<s;u++){var c=l[u];if(c){var d=c.split(":");d[0].trim()==="width"&&(a=d[1].trim())}}return a}(r)==="100%"&&(o="100%"),r.attr("width")==="100%"&&(o="100%"),{type:"table",width:o,children:t.filter(function(i){return Re.getNodeType(i)==="table-row"})}}},v2t=function(){function e(){this.title=jt("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||!!Re.getSelectedElems(t).some(function(r){var o=Re.getNodeType(r);return o==="pre"||o==="table"||o==="list-item"||!!t.isVoid(r)})},e.prototype.getPanelContentElem=function(t){var n=this;if(this.$content)return this.$content[0];for(var r=Le('<div class="w-e-panel-content-table"></div>'),o=Le("<span>0 × 0</span>"),i=Le("<table></table>"),a=0;a<10;a++){for(var l=Le("<tr></tr>"),s=0;s<10;s++){var u=Le("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",a.toString()),l.append(u),u.on("mouseenter",function(c){var d=c.target;if(d!=null){var f=Le(d).dataset(),p=f.x,m=f.y;o[0].innerHTML=p+1+" × "+(m+1),i.children().each(function(v){Le(v).children().each(function(g){var b=Le(g),y=b.dataset(),w=y.x,x=y.y;w<=p&&x<=m?b.addClass("active"):b.removeClass("active")})})}}),u.on("click",function(c){c.preventDefault();var d=c.target;if(d!=null){var f=Le(d).dataset(),p=f.x,m=f.y;n.insertTable(t,m+1,p+1)}})}i.append(l)}return r.append(i),r.append(o),this.$content=r,r[0]},e.prototype.insertTable=function(t,n,r){var o=parseInt(n,10),i=parseInt(r,10);if(o&&i&&!(o<=0||i<=0)){Re.isSelectedEmptyParagraph(t)&&et.removeNodes(t,{mode:"highest"});var a=function(l,s){for(var u=[],c=0;c<l;c++){for(var d=[],f=0;f<s;f++){var p={type:"table-cell",children:[{text:""}]};c===0&&(p.isHeader=!0),d.push(p)}u.push({type:"table-row",children:d})}return{type:"table",width:"auto",children:u}}(o,i);et.insertNodes(t,a,{mode:"highest"})}},e}(),m2t=function(){function e(){this.title=jt("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||Re.getSelectedNodeByType(t,"table")==null},e.prototype.exec=function(t,n){this.isDisabled(t)||et.removeNodes(t,{mode:"highest"})},e}(),g2t=function(){function e(){this.title=jt("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||Re.getSelectedNodeByType(t,"table")==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=oc(ue.nodes(t,{match:function(p){return Re.checkNodeType(p,"table-cell")},universal:!0}),1),o=oc(r[0],2),i=o[0],a=o[1],l=Re.getParentNode(t,i),s=(l==null?void 0:l.children.length)||0;if(s!==0){for(var u={type:"table-row",children:[]},c=0;c<s;c++)u.children.push({type:"table-cell",children:[{text:""}]});var d=Ke.parent(a),f=Ke.next(d);et.insertNodes(t,u,{at:f})}}},e}(),y2t=function(){function e(){this.title=jt("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||Re.getSelectedNodeByType(t,"table-row")==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=oc(ue.nodes(t,{match:function(s){return Re.checkNodeType(s,"table-row")},universal:!0}),1),o=oc(r[0],2),i=o[0],a=o[1],l=Re.getParentNode(t,i);((l==null?void 0:l.children.length)||0)<=1?et.removeNodes(t,{mode:"highest"}):et.removeNodes(t,{at:a})}},e}(),J7e={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DG=KW("span").classList,Z7e=DG&&DG.constructor&&DG.constructor.prototype,b2t=Z7e===Object.prototype?void 0:Z7e,A2t=hk.forEach,w2t=function(){var e=[].forEach;return!!e&&_i(function(){e.call(null,function(){throw 1},1)})}(),OG=w2t?[].forEach:function(e){return A2t(this,e,arguments.length>1?arguments[1]:void 0)},e9e=function(e){if(e&&e.forEach!==OG)try{_y(e,"forEach",OG)}catch{e.forEach=OG}};for(var TG in J7e)J7e[TG]&&e9e(sr[TG]&&sr[TG].prototype);e9e(b2t);var x2t=function(){function e(){this.title=jt("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||Re.getSelectedNodeByType(t,"table")==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=oc(ue.nodes(t,{match:function(u){return Re.checkNodeType(u,"table-cell")},universal:!0}),1),o=oc(r[0],2),i=o[0],a=o[1],l=Re.getParentNode(t,i);if(l!=null){var s=Re.getParentNode(t,l);s!=null&&(s.children||[]).forEach(function(u,c){sn.isElement(u)&&(u.children||[]).forEach(function(d){var f=Re.findPath(t,d);if(f.length===a.length&&Hwe(f.slice(-1),a.slice(-1))){var p={type:"table-cell",children:[{text:""}]};c===0&&N7e(s)&&(p.isHeader=!0),et.insertNodes(t,p,{at:f})}})})}}},e}(),_2t=function(){function e(){this.title=jt("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||Re.getSelectedNodeByType(t,"table-cell")==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=oc(ue.nodes(t,{match:function(c){return Re.checkNodeType(c,"table-cell")},universal:!0}),1),o=oc(r[0],2),i=o[0],a=o[1],l=Re.getParentNode(t,i),s=(l==null?void 0:l.children.length)||0;if(!l||s<=1)et.removeNodes(t,{mode:"highest"});else{var u=Re.getParentNode(t,l);u!=null&&(u.children||[]).forEach(function(c){sn.isElement(c)&&(c.children||[]).forEach(function(d){var f=Re.findPath(t,d);f.length===a.length&&Hwe(f.slice(-1),a.slice(-1))&&et.removeNodes(t,{at:f})})})}}},e}(),E2t=function(){function e(){this.title=jt("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){var n=Re.getSelectedNodeByType(t,"table");return n!=null&&N7e(n)},e.prototype.isActive=function(t){return!!this.getValue(t)},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||Re.getSelectedNodeByType(t,"table")==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=!n,o=Re.getSelectedNodeByType(t,"table");o!=null&&vk(o).forEach(function(i){return et.setNodes(t,{isHeader:r},{at:Re.findPath(t,i)})})}},e}(),C2t=function(){function e(){this.title=jt("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){var n=Re.getSelectedNodeByType(t,"table");return n!=null&&n.width==="100%"},e.prototype.isActive=function(t){return!!this.getValue(t)},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||Re.getSelectedNodeByType(t,"table")==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r={width:n?"auto":"100%"};et.setNodes(t,r,{mode:"highest"})}},e}(),S2t={renderElems:[Jgt,Zgt,e2t],elemsToHtml:[{type:"table",elemToHtml:function(e,t){var n=e.width;return'<table style="width: '+(n===void 0?"auto":n)+';"><tbody>'+t+"</tbody></table>"}},{type:"table-row",elemToHtml:function(e,t){return"<tr>"+t+"</tr>"}},{type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=r===void 0?1:r,i=n.rowSpan,a=i===void 0?1:i,l=n.isHeader,s=l!==void 0&&l,u=n.width,c=s?"th":"td";return"<"+c+' colSpan="'+o+'" rowSpan="'+a+'" width="'+(u===void 0?"auto":u)+'">'+t+"</"+c+">"}}],preParseHtml:[t2t],parseElemsHtml:[f2t,p2t,h2t],menus:[{key:"insertTable",factory:function(){return new v2t}},{key:"deleteTable",factory:function(){return new m2t}},{key:"insertTableRow",factory:function(){return new g2t}},{key:"deleteTableRow",factory:function(){return new y2t}},{key:"insertTableCol",factory:function(){return new x2t}},{key:"deleteTableCol",factory:function(){return new _2t}},{key:"tableHeader",factory:function(){return new E2t}},{key:"tableFullWidth",factory:function(){return new C2t}}],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.normalizeNode,i=e.insertData,a=e.handleTab,l=e.selectAll,s=e;return s.insertBreak=function(){Re.getSelectedNodeByType(s,"table")==null?t():s.insertText(` |
|
1054 |
`)},s.deleteBackward=function(u){if(!k7e(s)){var c=s.selection;if(c){var d=ue.before(s,c);if(d){var f=D7e(s,d),p=D7e(s,c);if(f&&!p)return}}n(u)}},s.handleTab=function(){var u;if(Re.getSelectedNodeByType(s,"table")){var c=ue.above(e);Re.checkNodeType(c[0],"table-cell")&&et.select(e,c[1]);var d=ue.next(e);if(d)d[0]&&d[0].text&&(d=(u=ue.above(e,{at:d[1]}))!==null&&u!==void 0?u:d),et.select(e,d[1]);else{var f=s.children||[],p=f.length;if(Re.checkNodeType(f[p-1],"table")){var m=Re.genEmptyParagraph();et.insertNodes(s,m,{at:[p]}),s.handleTab()}}}else a()},s.deleteForward=function(u){k7e(s)||r(u)},s.normalizeNode=function(u){var c=oc(u,2),d=c[0],f=c[1];if(Re.getNodeType(d)!=="table")return o([d,f]);if(Re.isLastNode(s,d)){var p=Re.genEmptyParagraph();et.insertNodes(s,p,{at:[f[0]+1]})}},s.insertData=function(u){if(Re.getSelectedNodeByType(s,"table")!=null){var c=u.getData("text/plain");c===` |
|
1055 |
`||/<img[^>]+>/.test(u.getData("text/html"))?i(u):ue.insertText(s,c)}else i(u)},s.selectAll=function(){var u=s.selection;if(u!=null){var c=Re.getSelectedNodeByType(s,"table-cell");if(c!=null){var d=u.anchor,f=u.focus;if(Ke.equals(d.path.slice(0,3),f.path.slice(0,3)))if(Pt.string(c).length!==0){var p=Re.findPath(s,c),m={anchor:ue.start(s,p),focus:ue.end(s,p)};s.select(m)}else l();else l()}else l()}else l()},s}};Ul("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",width:"Width",height:"Height"}}),Ul("zh-CN",{videoModule:{delete:"\u5220\u9664\u89C6\u9891",uploadVideo:"\u4E0A\u4F20\u89C6\u9891",insertVideo:"\u63D2\u5165\u89C6\u9891",videoSrc:"\u89C6\u9891\u5730\u5740",videoSrcPlaceHolder:"\u89C6\u9891\u6587\u4EF6 url \u6216\u7B2C\u4E09\u65B9 <iframe>",videoPoster:"\u89C6\u9891\u5C01\u9762",videoPosterPlaceHolder:"\u5C01\u9762\u56FE\u7247 url",ok:"\u786E\u5B9A",editSize:"\u4FEE\u6539\u5C3A\u5BF8",width:"\u5BBD\u5EA6",height:"\u9AD8\u5EA6"}});var gk=function(){return gk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gk.apply(this,arguments)};function yk(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(u){try{s(r.next(u))}catch(c){i(c)}}function l(u){try{s(r.throw(u))}catch(c){i(c)}}function s(u){var c;u.done?o(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(a,l)}s((r=r.apply(e,[])).next())})}function bk(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(s){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(c[0]===6&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(d){c=[6,d],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,u])}}}function jv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var t9e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function MG(e){var t={exports:{}};return e(t,t.exports),t.exports}var Fh,Ak,wk=function(e){return e&&e.Math==Math&&e},Ht=wk(typeof globalThis=="object"&&globalThis)||wk(typeof window=="object"&&window)||wk(typeof self=="object"&&self)||wk(typeof t9e=="object"&&t9e)||function(){return this}()||Function("return this")(),io=function(e){try{return!!e()}catch{return!0}},sd=!io(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),B5=Function.prototype.call,ao=B5.bind?B5.bind(B5):function(){return B5.apply(B5,arguments)},n9e={}.propertyIsEnumerable,r9e=Object.getOwnPropertyDescriptor,k2t={f:r9e&&!n9e.call({1:2},1)?function(e){var t=r9e(this,e);return!!t&&t.enumerable}:n9e},xk=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},o9e=Function.prototype,NG=o9e.bind,FG=o9e.call,D2t=NG&&NG.bind(FG),Vn=NG?function(e){return e&&D2t(FG,e)}:function(e){return e&&function(){return FG.apply(e,arguments)}},O2t=Vn({}.toString),T2t=Vn("".slice),ud=function(e){return T2t(O2t(e),8,-1)},RG=Ht.Object,M2t=Vn("".split),IG=io(function(){return!RG("z").propertyIsEnumerable(0)})?function(e){return ud(e)=="String"?M2t(e,""):RG(e)}:RG,N2t=Ht.TypeError,L5=function(e){if(e==null)throw N2t("Can't call method on "+e);return e},Rh=function(e){return IG(L5(e))},Xr=function(e){return typeof e=="function"},bo=function(e){return typeof e=="object"?e!==null:Xr(e)},Vv=function(e,t){return arguments.length<2?function(n){return Xr(n)?n:void 0}(Ht[e]):Ht[e]&&Ht[e][t]},P5=Vn({}.isPrototypeOf),ky=Vv("navigator","userAgent")||"",i9e=Ht.process,a9e=Ht.Deno,l9e=i9e&&i9e.versions||a9e&&a9e.version,s9e=l9e&&l9e.v8;s9e&&(Ak=(Fh=s9e.split("."))[0]>0&&Fh[0]<4?1:+(Fh[0]+Fh[1])),!Ak&&ky&&(!(Fh=ky.match(/Edge\/(\d+)/))||Fh[1]>=74)&&(Fh=ky.match(/Chrome\/(\d+)/))&&(Ak=+Fh[1]);var j5=Ak,BG=!!Object.getOwnPropertySymbols&&!io(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&j5&&j5<41}),LG=BG&&!Symbol.sham&&typeof Symbol.iterator=="symbol",F2t=Ht.Object,PG=LG?function(e){return typeof e=="symbol"}:function(e){var t=Vv("Symbol");return Xr(t)&&P5(t.prototype,F2t(e))},R2t=Ht.String,_k=function(e){try{return R2t(e)}catch{return"Object"}},I2t=Ht.TypeError,Ih=function(e){if(Xr(e))return e;throw I2t(_k(e)+" is not a function")},V5=function(e,t){var n=e[t];return n==null?void 0:Ih(n)},B2t=Ht.TypeError,L2t=Object.defineProperty,jG=function(e,t){try{L2t(Ht,e,{value:t,configurable:!0,writable:!0})}catch{Ht[e]=t}return t},Bh=Ht["__core-js_shared__"]||jG("__core-js_shared__",{}),VG=MG(function(e){(e.exports=function(t,n){return Bh[t]||(Bh[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),P2t=Ht.Object,Ek=function(e){return P2t(L5(e))},j2t=Vn({}.hasOwnProperty),Ei=Object.hasOwn||function(e,t){return j2t(Ek(e),t)},V2t=0,z2t=Math.random(),H2t=Vn(1 .toString),zG=function(e){return"Symbol("+(e===void 0?"":e)+")_"+H2t(++V2t+z2t,36)},z5=VG("wks"),zv=Ht.Symbol,u9e=zv&&zv.for,$2t=LG?zv:zv&&zv.withoutSetter||zG,ai=function(e){if(!Ei(z5,e)||!BG&&typeof z5[e]!="string"){var t="Symbol."+e;BG&&Ei(zv,e)?z5[e]=zv[e]:z5[e]=LG&&u9e?u9e(t):$2t(t)}return z5[e]},U2t=Ht.TypeError,W2t=ai("toPrimitive"),HG=function(e){var t=function(n){if(!bo(n)||PG(n))return n;var r,o=V5(n,W2t);if(o){if(r=ao(o,n,"string"),!bo(r)||PG(r))return r;throw U2t("Can't convert object to primitive value")}return function(i){var a,l;if(Xr(a=i.toString)&&!bo(l=ao(a,i))||Xr(a=i.valueOf)&&!bo(l=ao(a,i)))return l;throw B2t("Can't convert object to primitive value")}(n)}(e);return PG(t)?t:t+""},$G=Ht.document,G2t=bo($G)&&bo($G.createElement),H5=function(e){return G2t?$G.createElement(e):{}},c9e=!sd&&!io(function(){return Object.defineProperty(H5("div"),"a",{get:function(){return 7}}).a!=7}),d9e=Object.getOwnPropertyDescriptor,UG={f:sd?d9e:function(e,t){if(e=Rh(e),t=HG(t),c9e)try{return d9e(e,t)}catch{}if(Ei(e,t))return xk(!ao(k2t.f,e,t),e[t])}},q2t=Ht.String,K2t=Ht.TypeError,ra=function(e){if(bo(e))return e;throw K2t(q2t(e)+" is not an object")},Y2t=Ht.TypeError,f9e=Object.defineProperty,yf={f:sd?f9e:function(e,t,n){if(ra(e),t=HG(t),ra(n),c9e)try{return f9e(e,t,n)}catch{}if("get"in n||"set"in n)throw Y2t("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Lh=sd?function(e,t,n){return yf.f(e,t,xk(1,n))}:function(e,t,n){return e[t]=n,e},X2t=Vn(Function.toString);Xr(Bh.inspectSource)||(Bh.inspectSource=function(e){return X2t(e)});var Ck,$5,Sk,kk=Bh.inspectSource,p9e=Ht.WeakMap,h9e=Xr(p9e)&&/native code/.test(kk(p9e)),v9e=VG("keys"),WG=function(e){return v9e[e]||(v9e[e]=zG(e))},Dk={},GG=Ht.TypeError,Q2t=Ht.WeakMap;if(h9e||Bh.state){var Hv=Bh.state||(Bh.state=new Q2t),J2t=Vn(Hv.get),m9e=Vn(Hv.has),Z2t=Vn(Hv.set);Ck=function(e,t){if(m9e(Hv,e))throw new GG("Object already initialized");return t.facade=e,Z2t(Hv,e,t),t},$5=function(e){return J2t(Hv,e)||{}},Sk=function(e){return m9e(Hv,e)}}else{var Dy=WG("state");Dk[Dy]=!0,Ck=function(e,t){if(Ei(e,Dy))throw new GG("Object already initialized");return t.facade=e,Lh(e,Dy,t),t},$5=function(e){return Ei(e,Dy)?e[Dy]:{}},Sk=function(e){return Ei(e,Dy)}}var Rs={set:Ck,get:$5,has:Sk,enforce:function(e){return Sk(e)?$5(e):Ck(e,{})},getterFor:function(e){return function(t){var n;if(!bo(t)||(n=$5(t)).type!==e)throw GG("Incompatible receiver, "+e+" required");return n}}},g9e=Function.prototype,eyt=sd&&Object.getOwnPropertyDescriptor,qG=Ei(g9e,"name"),Oy={EXISTS:qG,PROPER:qG&&(function(){}).name==="something",CONFIGURABLE:qG&&(!sd||sd&&eyt(g9e,"name").configurable)},Au=MG(function(e){var t=Oy.CONFIGURABLE,n=Rs.get,r=Rs.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;Xr(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ei(l,"name")||t&&l.name!==p)&&Lh(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==Ht?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:Lh(i,a,l)):d?i[a]=l:jG(a,l)})(Function.prototype,"toString",function(){return Xr(this)&&n(this).source||kk(this)})}),tyt=Math.ceil,nyt=Math.floor,Ok=function(e){var t=+e;return t!=t||t===0?0:(t>0?nyt:tyt)(t)},ryt=Math.max,oyt=Math.min,U5=function(e,t){var n=Ok(e);return n<0?ryt(n+t,0):oyt(n,t)},iyt=Math.min,y9e=function(e){return e>0?iyt(Ok(e),9007199254740991):0},W5=function(e){return y9e(e.length)},b9e=function(e){return function(t,n,r){var o,i=Rh(t),a=W5(i),l=U5(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},A9e={includes:b9e(!0),indexOf:b9e(!1)},ayt=A9e.indexOf,w9e=Vn([].push),x9e=function(e,t){var n,r=Rh(e),o=0,i=[];for(n in r)!Ei(Dk,n)&&Ei(r,n)&&w9e(i,n);for(;t.length>o;)Ei(r,n=t[o++])&&(~ayt(i,n)||w9e(i,n));return i},Tk=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],lyt=Tk.concat("length","prototype"),Mk={f:Object.getOwnPropertyNames||function(e){return x9e(e,lyt)}},syt={f:Object.getOwnPropertySymbols},uyt=Vn([].concat),cyt=Vv("Reflect","ownKeys")||function(e){var t=Mk.f(ra(e)),n=syt.f;return n?uyt(t,n(e)):t},dyt=function(e,t){for(var n=cyt(t),r=yf.f,o=UG.f,i=0;i<n.length;i++){var a=n[i];Ei(e,a)||r(e,a,o(t,a))}},fyt=/#|\.prototype\./,G5=function(e,t){var n=hyt[pyt(e)];return n==myt||n!=vyt&&(Xr(t)?io(t):!!t)},pyt=G5.normalize=function(e){return String(e).replace(fyt,".").toLowerCase()},hyt=G5.data={},vyt=G5.NATIVE="N",myt=G5.POLYFILL="P",Nk=G5,gyt=UG.f,Kl=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?Ht:u?Ht[l]||jG(l,{}):(Ht[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=gyt(n,r))&&a.value:n[r],!Nk(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;dyt(i,o)}(e.sham||o&&o.sham)&&Lh(i,"sham",!0),Au(n,r,i,e)}},_9e={};_9e[ai("toStringTag")]="z";var KG=String(_9e)==="[object z]",yyt=ai("toStringTag"),byt=Ht.Object,Ayt=ud(function(){return arguments}())=="Arguments",Fk=KG?ud:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=byt(e),yyt))=="string"?n:Ayt?ud(t):(r=ud(t))=="Object"&&Xr(t.callee)?"Arguments":r},wyt=Ht.String,wu=function(e){if(Fk(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return wyt(e)},YG=` |
|
1056 |
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,E9e=Vn("".replace),Rk="["+YG+"]",xyt=RegExp("^"+Rk+Rk+"*"),_yt=RegExp(Rk+Rk+"*$"),XG=function(e){return function(t){var n=wu(L5(t));return 1&e&&(n=E9e(n,xyt,"")),2&e&&(n=E9e(n,_yt,"")),n}},Eyt={start:XG(1),end:XG(2),trim:XG(3)},Cyt=Oy.PROPER,Syt=Eyt.trim;function C9e(e){return e.length?e[0].tagName.toLowerCase():""}function S9e(e,t,n){t===void 0&&(t="auto"),n===void 0&&(n="auto");var r=Le(e);return r.attr("width",t),r.attr("height",n),r[0].outerHTML}Kl({target:"String",proto:!0,forced:io(function(){return!!YG.trim()||"\u200B\x85\u180E".trim()!=="\u200B\x85\u180E"||Cyt&&YG.trim.name!=="trim"})},{trim:function(){return Syt(this)}}),Kl({global:!0},{globalThis:Ht}),au&&(Le.fn.append=au),Yc&&(Le.fn.on=Yc),$p&&(Le.fn.focus=$p),iu&&(Le.fn.attr=iu),Kc&&(Le.fn.val=Kc),Hp&&(Le.fn.html=Hp),w2&&(Le.fn.parent=w2),y2&&(Le.fn.hasClass=y2),C2&&(Le.fn.empty=C2);var Ik,kyt={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=i===void 0?"":i,l=o.poster,s=l===void 0?"":l,u=o.width,c=u===void 0?"auto":u,d=o.height,f=d===void 0?"auto":d,p=Re.isNodeSelected(n,e);if(a.trim().indexOf("<iframe ")===0)r=Mn("div",{className:"w-e-textarea-video-container","data-selected":p?"true":"",innerHTML:S9e(a,c,f)});else{var m=Mn("video",{poster:s,controls:!0},Mn("source",{src:a,type:"video/mp4"}),`Sorry, your browser doesn't support embedded videos. |
|
1057 |
\u62B1\u6B49\uFF0C\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u89C6\u9891`);c!=="auto"&&(m.data.width=c),f!=="auto"&&(m.data.height=f),r=Mn("div",{className:"w-e-textarea-video-container","data-selected":p?"true":""},m)}return S2("div",{props:{contentEditable:!1},on:{mousedown:function(v){return v.preventDefault()}}},r)}},Dyt={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=r===void 0?"":r,i=n.poster,a=i===void 0?"":i,l=n.width,s=l===void 0?"auto":l,u=n.height,c=u===void 0?"auto":u,d=`<div data-w-e-type="video" data-w-e-is-void> |
|
1058 |
`;return o.trim().indexOf("<iframe ")===0?d+=S9e(o,s,c):d+='<video poster="'+a+'" controls="true" width="'+s+'" height="'+c+'"><source src="'+o+'" type="video/mp4"/></video>',d+` |
|
1059 |
</div>`}},Oyt=Object.keys||function(e){return x9e(e,Tk)},Tyt=sd?Object.defineProperties:function(e,t){ra(e);for(var n,r=Rh(t),o=Oyt(t),i=o.length,a=0;i>a;)yf.f(e,n=o[a++],r[n]);return e},QG=Vv("document","documentElement"),k9e=WG("IE_PROTO"),JG=function(){},D9e=function(e){return"<script>"+e+"<\/script>"},O9e=function(e){e.write(D9e("")),e.close();var t=e.parentWindow.Object;return e=null,t},Bk=function(){try{Ik=new ActiveXObject("htmlfile")}catch{}var e,t;Bk=typeof document<"u"?document.domain&&Ik?O9e(Ik):((t=H5("iframe")).style.display="none",QG.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(D9e("document.F=Object")),e.close(),e.F):O9e(Ik);for(var n=Tk.length;n--;)delete Bk.prototype[Tk[n]];return Bk()};Dk[k9e]=!0;var ZG=Object.create||function(e,t){var n;return e!==null?(JG.prototype=ra(e),n=new JG,JG.prototype=null,n[k9e]=e):n=Bk(),t===void 0?n:Tyt(n,t)},eq=ai("unscopables"),tq=Array.prototype;tq[eq]==null&&yf.f(tq,eq,{configurable:!0,value:ZG(null)});var q5=function(e){tq[eq][e]=!0},Myt=A9e.includes;Kl({target:"Array",proto:!0},{includes:function(e){return Myt(this,e,arguments.length>1?arguments[1]:void 0)}}),q5("includes");var Nyt={selector:"iframe,video,p",preParseHtml:function(e){var t=Le(e),n=t;if(C9e(t)==="p"){var r=t.children();if(r.length===1){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=Le(o))}}var a=C9e(n);if(a!=="iframe"&&a!=="video"||n.parent().attr("data-w-e-type")==="video")return n[0];var l=Le('<div data-w-e-type="video" data-w-e-is-void></div>');return l.append(n),l[0]}},T9e=Vn(Vn.bind),K5=function(e,t){return Ih(e),t===void 0?e:T9e?T9e(e,t):function(){return e.apply(t,arguments)}},Lk=Array.isArray||function(e){return ud(e)=="Array"},M9e=function(){},Fyt=[],N9e=Vv("Reflect","construct"),nq=/^\s*(?:class|function)\b/,Ryt=Vn(nq.exec),Iyt=!nq.exec(M9e),Y5=function(e){if(!Xr(e))return!1;try{return N9e(M9e,Fyt,e),!0}catch{return!1}},rq=!N9e||io(function(){var e;return Y5(Y5.call)||!Y5(Object)||!Y5(function(){e=!0})||e})?function(e){if(!Xr(e))return!1;switch(Fk(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Iyt||!!Ryt(nq,kk(e))}:Y5,Byt=ai("species"),F9e=Ht.Array,Lyt=function(e,t){return new(function(n){var r;return Lk(n)&&(r=n.constructor,(rq(r)&&(r===F9e||Lk(r.prototype))||bo(r)&&(r=r[Byt])===null)&&(r=void 0)),r===void 0?F9e:r}(e))(t===0?0:t)},R9e=Vn([].push),Ph=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=Ek(s),v=IG(m),g=K5(u,c),b=W5(v),y=0,w=d||Lyt,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:R9e(x,f)}else switch(e){case 4:return!1;case 7:R9e(x,f)}return i?-1:r||o?o:x}},oq={forEach:Ph(0),map:Ph(1),filter:Ph(2),some:Ph(3),every:Ph(4),find:Ph(5),findIndex:Ph(6),filterReject:Ph(7)},Pyt=oq.find,I9e=!0;"find"in[]&&Array(1).find(function(){I9e=!1}),Kl({target:"Array",proto:!0,forced:I9e},{find:function(e){return Pyt(this,e,arguments.length>1?arguments[1]:void 0)}}),q5("find");var jyt=KG?{}.toString:function(){return"[object "+Fk(this)+"]"};function B9e(e,t,n,r){return t===void 0&&(t=""),n===void 0&&(n="auto"),r===void 0&&(r="auto"),{type:"video",src:e,poster:t,width:n,height:r,children:[{text:""}]}}KG||Au(Object.prototype,"toString",jyt,{unsafe:!0});var L9e,iq,Vyt={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=Le(e),o="",i="",a="auto",l="auto",s=r.find("iframe");if(s.length>0)return a=s.attr("width")||"auto",l=s.attr("height")||"auto",B9e(o=s[0].outerHTML,i,a,l);var u=r.find("video");return(o=u.attr("src")||"")||u.length>0&&(o=u.find("source").attr("src")||""),a=u.attr("width")||"auto",l=u.attr("height")||"auto",B9e(o,i=u.attr("poster")||"",a,l)}},P9e=function(){var e=ra(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},aq=Ht.RegExp,lq=io(function(){var e=aq("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),zyt=lq||io(function(){return!aq("a","y").sticky}),Hyt={BROKEN_CARET:lq||io(function(){var e=aq("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:zyt,UNSUPPORTED_Y:lq},$yt=Ht.RegExp,Uyt=io(function(){var e=$yt(".","s");return!(e.dotAll&&e.exec(` |
|
1060 |
`)&&e.flags==="s")}),Wyt=Ht.RegExp,Gyt=io(function(){var e=Wyt("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),qyt=Rs.get,Kyt=VG("native-string-replace",String.prototype.replace),Pk=RegExp.prototype.exec,sq=Pk,Yyt=Vn("".charAt),Xyt=Vn("".indexOf),Qyt=Vn("".replace),uq=Vn("".slice),cq=(iq=/b*/g,ao(Pk,L9e=/a/,"a"),ao(Pk,iq,"a"),L9e.lastIndex!==0||iq.lastIndex!==0),j9e=Hyt.BROKEN_CARET,dq=/()??/.exec("")[1]!==void 0;(cq||dq||j9e||Uyt||Gyt)&&(sq=function(e){var t,n,r,o,i,a,l,s=this,u=qyt(s),c=wu(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=ao(sq,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=j9e&&s.sticky,m=ao(P9e,s),v=s.source,g=0,b=c;if(p&&(m=Qyt(m,"y",""),Xyt(m,"g")===-1&&(m+="g"),b=uq(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Yyt(c,s.lastIndex-1)!==` |
|
1061 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),dq&&(n=new RegExp("^"+v+"$(?!\\s)",m)),cq&&(r=s.lastIndex),o=ao(Pk,p?n:s,b),p?o?(o.input=uq(o.input,g),o[0]=uq(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:cq&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),dq&&o&&o.length>1&&ao(Kyt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=ZG(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var jk=sq;Kl({target:"RegExp",proto:!0,forced:/./.exec!==jk},{exec:jk});var fq=Function.prototype,V9e=fq.apply,Jyt=fq.bind,z9e=fq.call,H9e=typeof Reflect=="object"&&Reflect.apply||(Jyt?z9e.bind(V9e):function(){return z9e.apply(V9e,arguments)}),$9e=(ai("species"),RegExp.prototype),Zyt=Vn("".charAt),U9e=Vn("".charCodeAt),e3t=Vn("".slice),W9e=function(e){return function(t,n){var r,o,i=wu(L5(t)),a=Ok(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=U9e(i,a))<55296||r>56319||a+1===l||(o=U9e(i,a+1))<56320||o>57343?e?Zyt(i,a):r:e?e3t(i,a,a+2):o-56320+(r-55296<<10)+65536}},G9e={codeAt:W9e(!1),charAt:W9e(!0)},t3t=G9e.charAt,n3t=function(e,t,n){return t+(n?t3t(e,t).length:1)},r3t=Math.floor,pq=Vn("".charAt),o3t=Vn("".replace),hq=Vn("".slice),i3t=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a3t=/\$([$&'`]|\d{1,2})/g,l3t=function(e,t,n,r,o,i){var a=n+e.length,l=r.length,s=a3t;return o!==void 0&&(o=Ek(o),s=i3t),o3t(i,s,function(u,c){var d;switch(pq(c,0)){case"$":return"$";case"&":return e;case"`":return hq(t,0,n);case"'":return hq(t,a);case"<":d=o[hq(c,1,-1)];break;default:var f=+c;if(f===0)return u;if(f>l){var p=r3t(f/10);return p===0?u:p<=l?r[p-1]===void 0?pq(c,1):r[p-1]+pq(c,1):u}d=r[f-1]}return d===void 0?"":d})},s3t=Ht.TypeError,u3t=function(e,t){var n=e.exec;if(Xr(n)){var r=ao(n,e,t);return r!==null&&ra(r),r}if(ud(e)==="RegExp")return ao(jk,e,t);throw s3t("RegExp#exec called on incompatible receiver")},vq=ai("replace"),c3t=Math.max,d3t=Math.min,f3t=Vn([].concat),mq=Vn([].push),q9e=Vn("".indexOf),K9e=Vn("".slice),p3t="a".replace(/./,"$0")==="$0",Y9e=!!/./[vq]&&/./[vq]("a","$0")==="";function X9e(e){return e+"-"+q2e()}(function(e,t,n){var r=ai(e),o=!io(function(){var s={};return s[r]=function(){return 7},""[e](s)!=7}),i=o&&!io(function(){var s=!1,u=/a/;return u.exec=function(){return s=!0,null},u[r](""),!s});if(!o||!i||n){var a=Vn(/./[r]),l=function(s,u,c){var d=Y9e?"$":"$0";return[function(f,p){var m=L5(this),v=f==null?void 0:V5(f,vq);return v?ao(v,f,m,p):ao(u,wu(m),f,p)},function(f,p){var m=ra(this),v=wu(f);if(typeof p=="string"&&q9e(p,d)===-1&&q9e(p,"$<")===-1){var g=c(u,m,v,p);if(g.done)return g.value}var b=Xr(p);b||(p=wu(p));var y=m.global;if(y){var w=m.unicode;m.lastIndex=0}for(var x=[];;){var _=u3t(m,v);if(_===null||(mq(x,_),!y))break;wu(_[0])===""&&(m.lastIndex=n3t(v,y9e(m.lastIndex),w))}for(var E,C="",T=0,k=0;k<x.length;k++){for(var I=wu((_=x[k])[0]),O=c3t(d3t(Ok(_.index),v.length),0),F=[],N=1;N<_.length;N++)mq(F,(E=_[N])===void 0?E:String(E));var B=_.groups;if(b){var L=f3t([I],F,O,v);B!==void 0&&mq(L,B);var V=wu(H9e(p,void 0,L))}else V=l3t(I,v,O,F,B,p);O>=T&&(C+=K9e(v,T,O)+V,T=O+I.length)}return C+K9e(v,T)}]}(0,""[e],function(s,u,c,d,f){var p=Vn(s),m=u.exec;return m===jk||m===$9e.exec?o&&!f?{done:!0,value:a(u,c,d)}:{done:!0,value:p(c,u,d)}:{done:!1}});Au(String.prototype,e,l[0]),Au($9e,r,l[1])}})("replace",0,!!io(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!p3t||Y9e);var Vk=Ht.Promise,zk=function(e,t,n){for(var r in t)Au(e,r,t[r],n);return e},h3t=Ht.String,v3t=Ht.TypeError,Ty=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Vn(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,o){return ra(r),function(i){if(typeof i=="object"||Xr(i))return i;throw v3t("Can't set "+h3t(i)+" as a prototype")}(o),t?e(r,o):r.__proto__=o,r}}():void 0),m3t=yf.f,Q9e=ai("toStringTag"),Hk=function(e,t,n){e&&!Ei(e=n?e:e.prototype,Q9e)&&m3t(e,Q9e,{configurable:!0,value:t})},J9e=ai("species"),g3t=Ht.TypeError,gq=function(e,t){if(P5(t,e))return e;throw g3t("Incorrect invocation")},My={},y3t=ai("iterator"),b3t=Array.prototype,A3t=ai("iterator"),Z9e=function(e){if(e!=null)return V5(e,A3t)||V5(e,"@@iterator")||My[Fk(e)]},w3t=Ht.TypeError,exe=function(e,t,n){var r,o;ra(e);try{if(!(r=V5(e,"return"))){if(t==="throw")throw n;return n}r=ao(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return ra(r),n},x3t=Ht.TypeError,$k=function(e,t){this.stopped=e,this.result=t},txe=$k.prototype,Uk=function(e,t,n){var r,o,i,a,l,s,u,c,d=n&&n.that,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),m=!(!n||!n.INTERRUPTED),v=K5(t,d),g=function(y){return r&&exe(r,"normal",y),new $k(!0,y)},b=function(y){return f?(ra(y),m?v(y[0],y[1],g):v(y[0],y[1])):m?v(y,g):v(y)};if(p)r=e;else{if(!(o=Z9e(e)))throw x3t(_k(e)+" is not iterable");if((c=o)!==void 0&&(My.Array===c||b3t[y3t]===c)){for(i=0,a=W5(e);a>i;i++)if((l=b(e[i]))&&P5(txe,l))return l;return new $k(!1)}r=function(y,w){var x=arguments.length<2?Z9e(y):w;if(Ih(x))return ra(ao(x,y));throw w3t(_k(y)+" is not iterable")}(e,o)}for(s=r.next;!(u=ao(s,r)).done;){try{l=b(u.value)}catch(y){exe(r,"throw",y)}if(typeof l=="object"&&l&&P5(txe,l))return l}return new $k(!1)},nxe=ai("iterator"),rxe=!1;try{var _3t=0,oxe={next:function(){return{done:!!_3t++}},return:function(){rxe=!0}};oxe[nxe]=function(){return this},Array.from(oxe,function(){throw 2})}catch{}var X5,Ny,ixe,yq,axe=function(e,t){if(!rxe)return!1;var n=!1;try{var r={};r[nxe]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},E3t=Ht.TypeError,C3t=ai("species"),lxe=Vn([].slice),sxe=/(?:ipad|iphone|ipod).*applewebkit/i.test(ky),jh=ud(Ht.process)=="process",bq=Ht.setImmediate,Aq=Ht.clearImmediate,S3t=Ht.process,wq=Ht.Dispatch,k3t=Ht.Function,uxe=Ht.MessageChannel,D3t=Ht.String,xq=0,Q5={};try{X5=Ht.location}catch{}var _q=function(e){if(Ei(Q5,e)){var t=Q5[e];delete Q5[e],t()}},Eq=function(e){return function(){_q(e)}},cxe=function(e){_q(e.data)},dxe=function(e){Ht.postMessage(D3t(e),X5.protocol+"//"+X5.host)};bq&&Aq||(bq=function(e){var t=lxe(arguments,1);return Q5[++xq]=function(){H9e(Xr(e)?e:k3t(e),void 0,t)},Ny(xq),xq},Aq=function(e){delete Q5[e]},jh?Ny=function(e){S3t.nextTick(Eq(e))}:wq&&wq.now?Ny=function(e){wq.now(Eq(e))}:uxe&&!sxe?(yq=(ixe=new uxe).port2,ixe.port1.onmessage=cxe,Ny=K5(yq.postMessage,yq)):Ht.addEventListener&&Xr(Ht.postMessage)&&!Ht.importScripts&&X5&&X5.protocol!=="file:"&&!io(dxe)?(Ny=dxe,Ht.addEventListener("message",cxe,!1)):Ny="onreadystatechange"in H5("script")?function(e){QG.appendChild(H5("script")).onreadystatechange=function(){QG.removeChild(this),_q(e)}}:function(e){setTimeout(Eq(e),0)});var J5,$v,Z5,Fy,Cq,Sq,kq,fxe,pxe={set:bq,clear:Aq},O3t=/ipad|iphone|ipod/i.test(ky)&&Ht.Pebble!==void 0,T3t=/web0s(?!.*chrome)/i.test(ky),M3t=UG.f,Dq=pxe.set,hxe=Ht.MutationObserver||Ht.WebKitMutationObserver,vxe=Ht.document,mxe=Ht.process,Wk=Ht.Promise,gxe=M3t(Ht,"queueMicrotask"),yxe=gxe&&gxe.value;yxe||(J5=function(){var e,t;for(jh&&(e=mxe.domain)&&e.exit();$v;){t=$v.fn,$v=$v.next;try{t()}catch(n){throw $v?Fy():Z5=void 0,n}}Z5=void 0,e&&e.enter()},sxe||jh||T3t||!hxe||!vxe?!O3t&&Wk&&Wk.resolve?((kq=Wk.resolve(void 0)).constructor=Wk,fxe=K5(kq.then,kq),Fy=function(){fxe(J5)}):jh?Fy=function(){mxe.nextTick(J5)}:(Dq=K5(Dq,Ht),Fy=function(){Dq(J5)}):(Cq=!0,Sq=vxe.createTextNode(""),new hxe(J5).observe(Sq,{characterData:!0}),Fy=function(){Sq.data=Cq=!Cq}));var Oq,bxe,Axe,wxe,xxe=yxe||function(e){var t={fn:e,next:void 0};Z5&&(Z5.next=t),$v||($v=t,Fy()),Z5=t},N3t=function(e){var t,n;this.promise=new e(function(r,o){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=o}),this.resolve=Ih(t),this.reject=Ih(n)},Tq={f:function(e){return new N3t(e)}},Mq=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},F3t=typeof window=="object",_xe=pxe.set,R3t=ai("species"),bf="Promise",Exe=Rs.getterFor(bf),I3t=Rs.set,B3t=Rs.getterFor(bf),Uv=Vk&&Vk.prototype,cd=Vk,eA=Uv,Cxe=Ht.TypeError,Nq=Ht.document,Fq=Ht.process,Ry=Tq.f,L3t=Ry,P3t=!!(Nq&&Nq.createEvent&&Ht.dispatchEvent),Sxe=Xr(Ht.PromiseRejectionEvent),kxe=!1,tA=Nk(bf,function(){var e=kk(cd),t=e!==String(cd);if(!t&&j5===66)return!0;if(j5>=51&&/native code/.test(e))return!1;var n=new cd(function(o){o(1)}),r=function(o){o(function(){},function(){})};return(n.constructor={})[R3t]=r,!(kxe=n.then(function(){})instanceof r)||!t&&F3t&&!Sxe}),j3t=tA||!axe(function(e){cd.all(e).catch(function(){})}),Dxe=function(e){var t;return!(!bo(e)||!Xr(t=e.then))&&t},Rq=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;xxe(function(){for(var r=e.value,o=e.state==1,i=0;n.length>i;){var a,l,s,u=n[i++],c=o?u.ok:u.fail,d=u.resolve,f=u.reject,p=u.domain;try{c?(o||(e.rejection===2&&z3t(e),e.rejection=1),c===!0?a=r:(p&&p.enter(),a=c(r),p&&(p.exit(),s=!0)),a===u.promise?f(Cxe("Promise-chain cycle")):(l=Dxe(a))?ao(l,a,d,f):d(a)):f(r)}catch(m){p&&!s&&p.exit(),f(m)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&V3t(e)})}},Oxe=function(e,t,n){var r,o;P3t?((r=Nq.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Ht.dispatchEvent(r)):r={promise:t,reason:n},!Sxe&&(o=Ht["on"+e])?o(r):e==="unhandledrejection"&&function(i,a){var l=Ht.console;l&&l.error&&(arguments.length==1?l.error(i):l.error(i,a))}("Unhandled promise rejection",n)},V3t=function(e){ao(_xe,Ht,function(){var t,n=e.facade,r=e.value;if(Txe(e)&&(t=Mq(function(){jh?Fq.emit("unhandledRejection",r,n):Oxe("unhandledrejection",n,r)}),e.rejection=jh||Txe(e)?2:1,t.error))throw t.value})},Txe=function(e){return e.rejection!==1&&!e.parent},z3t=function(e){ao(_xe,Ht,function(){var t=e.facade;jh?Fq.emit("rejectionHandled",t):Oxe("rejectionhandled",t,e.value)})},Iy=function(e,t,n){return function(r){e(t,r,n)}},By=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Rq(e,!0))},Iq=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Cxe("Promise can't be resolved itself");var r=Dxe(t);r?xxe(function(){var o={done:!1};try{ao(r,t,Iy(Iq,o,e),Iy(By,o,e))}catch(i){By(o,i,e)}}):(e.value=t,e.state=1,Rq(e,!1))}catch(o){By({done:!1},o,e)}}};if(tA&&(eA=(cd=function(e){gq(this,eA),Ih(e),ao(Oq,this);var t=Exe(this);try{e(Iy(Iq,t),Iy(By,t))}catch(n){By(t,n)}}).prototype,(Oq=function(e){I3t(this,{type:bf,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=zk(eA,{then:function(e,t){var n=B3t(this),r=n.reactions,o=Ry(function(i,a){var l,s=ra(i).constructor;return s===void 0||(l=ra(s)[C3t])==null?a:function(u){if(rq(u))return u;throw E3t(_k(u)+" is not a constructor")}(l)}(this,cd));return o.ok=!Xr(e)||e,o.fail=Xr(t)&&t,o.domain=jh?Fq.domain:void 0,n.parent=!0,r[r.length]=o,n.state!=0&&Rq(n,!1),o.promise},catch:function(e){return this.then(void 0,e)}}),bxe=function(){var e=new Oq,t=Exe(e);this.promise=e,this.resolve=Iy(Iq,t),this.reject=Iy(By,t)},Tq.f=Ry=function(e){return e===cd||e===Axe?new bxe(e):L3t(e)},Xr(Vk)&&Uv!==Object.prototype)){wxe=Uv.then,kxe||(Au(Uv,"then",function(e,t){var n=this;return new cd(function(r,o){ao(wxe,n,r,o)}).then(e,t)},{unsafe:!0}),Au(Uv,"catch",eA.catch,{unsafe:!0}));try{delete Uv.constructor}catch{}Ty&&Ty(Uv,eA)}function nA(e,t,n){return n===void 0&&(n=""),yk(this,0,void 0,function(){var r,o,i,a,l,s,u;return bk(this,function(c){switch(c.label){case 0:return t?(e.restoreSelection(),r=e.getMenuConfig("insertVideo"),o=r.onInsertedVideo,i=r.checkVideo,a=r.parseVideoSrc,[4,i(t,n)]):[2];case 1:return typeof(l=c.sent())=="string"?(e.alert(l,"error"),[2]):l==null?[2]:[4,a(t)];case 2:return(s=c.sent()).trim().indexOf("<iframe ")!==0&&(s=s.replace(/</g,"<").replace(/>/g,">")),u={type:"video",src:s,poster:n,children:[{text:""}]},Promise.resolve().then(function(){et.insertNodes(e,u)}),o(u),[2]}})})}function Bq(){return X9e("w-e-insert-video")}Kl({global:!0,wrap:!0,forced:tA},{Promise:cd}),Hk(cd,bf,!1),function(){var e=Vv("Promise"),t=yf.f;sd&&e&&!e[J9e]&&t(e,J9e,{configurable:!0,get:function(){return this}})}(),Axe=Vv(bf),Kl({target:bf,stat:!0,forced:tA},{reject:function(e){var t=Ry(this);return ao(t.reject,void 0,e),t.promise}}),Kl({target:bf,stat:!0,forced:tA},{resolve:function(e){return function(t,n){if(ra(t),bo(n)&&n.constructor===t)return n;var r=Tq.f(t);return(0,r.resolve)(n),r.promise}(this,e)}}),Kl({target:bf,stat:!0,forced:j3t},{all:function(e){var t=this,n=Ry(t),r=n.resolve,o=n.reject,i=Mq(function(){var a=Ih(t.resolve),l=[],s=0,u=1;Uk(e,function(c){var d=s++,f=!1;u++,ao(a,t,c).then(function(p){f||(f=!0,l[d]=p,--u||r(l))},o)}),--u||r(l)});return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=Ry(t),r=n.reject,o=Mq(function(){var i=Ih(t.resolve);Uk(e,function(a){ao(i,t,a).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}});var H3t=function(){function e(){this.title=jt("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Bq(),this.posterInputId=Bq(),this.buttonId=Bq()}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||!!Re.getSelectedElems(t).some(function(r){var o=Re.getNodeType(r);return o==="pre"||o==="list-item"||!!t.isVoid(r)})},e.prototype.getModalPositionNode=function(t){return null},e.prototype.getModalContentElem=function(t){var n=this,r=this,o=r.srcInputId,i=r.posterInputId,a=r.buttonId,l=jv(Ds(jt("videoModule.videoSrc"),o,jt("videoModule.videoSrcPlaceHolder")),2),s=l[0],u=l[1],c=jv(Ds(jt("videoModule.videoPoster"),i,jt("videoModule.videoPosterPlaceHolder")),2),d=c[0],f=c[1],p=Le(u),m=Le(f),v=jv(Z2(a,jt("videoModule.ok")),1)[0];if(this.$content==null){var g=Le("<div></div>");g.on("click","#"+a,function(y){return yk(n,0,void 0,function(){var w,x;return bk(this,function(_){switch(_.label){case 0:return y.preventDefault(),w=g.find("#"+o).val().trim(),x=g.find("#"+i).val().trim(),[4,nA(t,w,x)];case 1:return _.sent(),t.hidePanelOrModal(),[2]}})})}),this.$content=g}var b=this.$content;return b.empty(),b.append(s),b.append(d),b.append(v),p.val(""),m.val(""),setTimeout(function(){p.focus()}),b[0]},e}(),$3t=Vn([].join),U3t=IG!=Object,W3t=function(){var e=[].join;return!!e&&io(function(){e.call(null,",",1)})}();Kl({target:"Array",proto:!0,forced:U3t||!W3t},{join:function(e){return $3t(Rh(this),e===void 0?",":e)}});var Wv,Mxe,Nxe,G3t=!io(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Fxe=WG("IE_PROTO"),Lq=Ht.Object,q3t=Lq.prototype,Gk=G3t?Lq.getPrototypeOf:function(e){var t=Ek(e);if(Ei(t,Fxe))return t[Fxe];var n=t.constructor;return Xr(n)&&t instanceof n?n.prototype:t instanceof Lq?q3t:null},Pq=ai("iterator"),Rxe=!1;[].keys&&("next"in(Nxe=[].keys())?(Mxe=Gk(Gk(Nxe)))!==Object.prototype&&(Wv=Mxe):Rxe=!0);var K3t=Wv==null||io(function(){var e={};return Wv[Pq].call(e)!==e});K3t&&(Wv={}),Xr(Wv[Pq])||Au(Wv,Pq,function(){return this});var jq={IteratorPrototype:Wv,BUGGY_SAFARI_ITERATORS:Rxe},Y3t=jq.IteratorPrototype,X3t=function(){return this},Q3t=Oy.PROPER,J3t=Oy.CONFIGURABLE,Ixe=jq.IteratorPrototype,Vq=jq.BUGGY_SAFARI_ITERATORS,rA=ai("iterator"),Z3t=function(){return this},Bxe=function(e,t,n,r,o,i,a){(function(g,b,y){var w=b+" Iterator";g.prototype=ZG(Y3t,{next:xk(1,y)}),Hk(g,w,!1),My[w]=X3t})(n,t,r);var l,s,u=function(g){if(g===o&&m)return m;if(!Vq&&g in f)return f[g];switch(g){case"keys":case"values":case"entries":return function(){return new n(this,g)}}return function(){return new n(this)}},c=t+" Iterator",d=!1,f=e.prototype,p=f[rA]||f["@@iterator"]||o&&f[o],m=!Vq&&p||u(o),v=t=="Array"&&f.entries||p;return v&&(l=Gk(v.call(new e)))!==Object.prototype&&l.next&&(Gk(l)!==Ixe&&(Ty?Ty(l,Ixe):Xr(l[rA])||Au(l,rA,Z3t)),Hk(l,c,!0)),Q3t&&o=="values"&&p&&p.name!=="values"&&(J3t?Lh(f,"name","values"):(d=!0,m=function(){return ao(p,this)})),o&&(s={values:u("values"),keys:u("keys"),entries:u("entries")},a||Kl({target:t,proto:!0,forced:Vq||d},s)),f[rA]!==m&&Au(f,rA,m,{name:o}),My[t]=m,s},ebt=Rs.set,tbt=Rs.getterFor("Array Iterator"),oA=Bxe(Array,"Array",function(e,t){ebt(this,{type:"Array Iterator",target:Rh(e),index:0,kind:t})},function(){var e=tbt(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");My.Arguments=My.Array,q5("keys"),q5("values"),q5("entries");var nbt=G9e.charAt,rbt=Rs.set,obt=Rs.getterFor("String Iterator");Bxe(String,"String",function(e){rbt(this,{type:"String Iterator",string:wu(e),index:0})},function(){var e,t=obt(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=nbt(n,r),t.index+=e.length,{value:e,done:!1})});var Lxe=function(e,t,n){var r=HG(t);r in e?yf.f(e,r,xk(0,n)):e[r]=n},ibt=Ht.Array,abt=Math.max,Pxe=Mk.f,jxe=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],lbt={f:function(e){return jxe&&ud(e)=="Window"?function(t){try{return Pxe(t)}catch{return function(r){for(var o=W5(r),i=U5(void 0,o),a=U5(o,o),l=ibt(abt(a-i,0)),s=0;i<a;i++,s++)Lxe(l,s,r[i]);return l.length=s,l}(jxe)}}(e):Pxe(Rh(e))}},Vxe=io(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),qk=Object.isExtensible,Gv=io(function(){qk(1)})||Vxe?function(e){return!!bo(e)&&(!Vxe||ud(e)!="ArrayBuffer")&&(!qk||qk(e))}:qk,sbt=!io(function(){return Object.isExtensible(Object.preventExtensions({}))}),zq=MG(function(e){var t=yf.f,n=!1,r=zG("meta"),o=0,i=function(l){t(l,r,{value:{objectID:"O"+o++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var l=Mk.f,s=Vn([].splice),u={};u[r]=1,l(u).length&&(Mk.f=function(c){for(var d=l(c),f=0,p=d.length;f<p;f++)if(d[f]===r){s(d,f,1);break}return d},Kl({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:lbt.f}))},fastKey:function(l,s){if(!bo(l))return typeof l=="symbol"?l:(typeof l=="string"?"S":"P")+l;if(!Ei(l,r)){if(!Gv(l))return"F";if(!s)return"E";i(l)}return l[r].objectID},getWeakData:function(l,s){if(!Ei(l,r)){if(!Gv(l))return!0;if(!s)return!1;i(l)}return l[r].weakData},onFreeze:function(l){return sbt&&n&&Gv(l)&&!Ei(l,r)&&i(l),l}};Dk[r]=!0}),Kk=zq.getWeakData,ubt=Rs.set,cbt=Rs.getterFor,dbt=oq.find,fbt=oq.findIndex,pbt=Vn([].splice),hbt=0,Yk=function(e){return e.frozen||(e.frozen=new zxe)},zxe=function(){this.entries=[]},Hq=function(e,t){return dbt(e.entries,function(n){return n[0]===t})};zxe.prototype={get:function(e){var t=Hq(this,e);if(t)return t[1]},has:function(e){return!!Hq(this,e)},set:function(e,t){var n=Hq(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=fbt(this.entries,function(n){return n[0]===e});return~t&&pbt(this.entries,t,1),!!~t}};var iA,Hxe={getConstructor:function(e,t,n,r){var o=e(function(s,u){gq(s,i),ubt(s,{type:t,id:hbt++,frozen:void 0}),u!=null&&Uk(u,s[r],{that:s,AS_ENTRIES:n})}),i=o.prototype,a=cbt(t),l=function(s,u,c){var d=a(s),f=Kk(ra(u),!0);return f===!0?Yk(d).set(u,c):f[d.id]=c,s};return zk(i,{delete:function(s){var u=a(this);if(!bo(s))return!1;var c=Kk(s);return c===!0?Yk(u).delete(s):c&&Ei(c,u.id)&&delete c[u.id]},has:function(s){var u=a(this);if(!bo(s))return!1;var c=Kk(s);return c===!0?Yk(u).has(s):c&&Ei(c,u.id)}}),zk(i,n?{get:function(s){var u=a(this);if(bo(s)){var c=Kk(s);return c===!0?Yk(u).get(s):c?c[u.id]:void 0}},set:function(s,u){return l(this,s,u)}}:{add:function(s){return l(this,s,!0)}}),o}},Xk=Rs.enforce,vbt=!Ht.ActiveXObject&&"ActiveXObject"in Ht,$xe=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},mbt=function(e,t,n){var r=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=r?"set":"add",a=Ht[e],l=a&&a.prototype,s=a,u={},c=function(g){var b=Vn(l[g]);Au(l,g,g=="add"?function(y){return b(this,y===0?0:y),this}:g=="delete"?function(y){return!(o&&!bo(y))&&b(this,y===0?0:y)}:g=="get"?function(y){return o&&!bo(y)?void 0:b(this,y===0?0:y)}:g=="has"?function(y){return!(o&&!bo(y))&&b(this,y===0?0:y)}:function(y,w){return b(this,y===0?0:y,w),this})};if(Nk(e,!Xr(a)||!(o||l.forEach&&!io(function(){new a().entries().next()}))))s=n.getConstructor(t,e,r,i),zq.enable();else if(Nk(e,!0)){var d=new s,f=d[i](o?{}:-0,1)!=d,p=io(function(){d.has(1)}),m=axe(function(g){new a(g)}),v=!o&&io(function(){for(var g=new a,b=5;b--;)g[i](b,b);return!g.has(-0)});m||((s=t(function(g,b){gq(g,l);var y=function(w,x,_){var E,C;return Ty&&Xr(E=x.constructor)&&E!==_&&bo(C=E.prototype)&&C!==_.prototype&&Ty(w,C),w}(new a,g,s);return b!=null&&Uk(b,y[i],{that:y,AS_ENTRIES:r}),y})).prototype=l,l.constructor=s),(p||v)&&(c("delete"),c("has"),r&&c("get")),(v||f)&&c(i),o&&l.clear&&delete l.clear}return u[e]=s,Kl({global:!0,forced:s!=a},u),Hk(s,e),o||n.setStrong(s,e,r),s}("WeakMap",$xe,Hxe);if(h9e&&vbt){iA=Hxe.getConstructor($xe,"WeakMap",!0),zq.enable();var aA=mbt.prototype,Uxe=Vn(aA.delete),Qk=Vn(aA.has),Wxe=Vn(aA.get),Gxe=Vn(aA.set);zk(aA,{delete:function(e){if(bo(e)&&!Gv(e)){var t=Xk(this);return t.frozen||(t.frozen=new iA),Uxe(this,e)||t.frozen.delete(e)}return Uxe(this,e)},has:function(e){if(bo(e)&&!Gv(e)){var t=Xk(this);return t.frozen||(t.frozen=new iA),Qk(this,e)||t.frozen.has(e)}return Qk(this,e)},get:function(e){if(bo(e)&&!Gv(e)){var t=Xk(this);return t.frozen||(t.frozen=new iA),Qk(this,e)?Wxe(this,e):t.frozen.get(e)}return Wxe(this,e)},set:function(e,t){if(bo(e)&&!Gv(e)){var n=Xk(this);n.frozen||(n.frozen=new iA),Qk(this,e)?Gxe(this,e,t):n.frozen.set(e,t)}else Gxe(this,e,t);return this}})}var qxe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},$q=H5("span").classList,Kxe=$q&&$q.constructor&&$q.constructor.prototype,gbt=Kxe===Object.prototype?void 0:Kxe,Uq=ai("iterator"),Yxe=ai("toStringTag"),Wq=oA.values,Xxe=function(e,t){if(e){if(e[Uq]!==Wq)try{Lh(e,Uq,Wq)}catch{e[Uq]=Wq}if(e[Yxe]||Lh(e,Yxe,t),qxe[t]){for(var n in oA)if(e[n]!==oA[n])try{Lh(e,n,oA[n])}catch{e[n]=oA[n]}}}};for(var Gq in qxe)Xxe(Ht[Gq]&&Ht[Gq].prototype,Gq);Xxe(gbt,"DOMTokenList");var ybt=Oy.EXISTS,bbt=yf.f,Qxe=Function.prototype,Abt=Vn(Qxe.toString),Jxe=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,wbt=Vn(Jxe.exec);sd&&!ybt&&bbt(Qxe,"name",{configurable:!0,get:function(){try{return wbt(Jxe,Abt(this))[1]}catch{return""}}});var xbt=ai("species"),_bt=j5>=51||!io(function(){var e=[];return(e.constructor={})[xbt]=function(){return{foo:1}},e.slice(Boolean).foo!==1}),Ebt=ai("species"),qq=Ht.Array,Cbt=Math.max;function Zxe(e){return e.getMenuConfig("uploadVideo")}Kl({target:"Array",proto:!0,forced:!_bt},{slice:function(e,t){var n,r,o,i=Rh(this),a=W5(i),l=U5(e,a),s=U5(t===void 0?a:t,a);if(Lk(i)&&(n=i.constructor,(rq(n)&&(n===qq||Lk(n.prototype))||bo(n)&&(n=n[Ebt])===null)&&(n=void 0),n===qq||n===void 0))return lxe(i,l,s);for(r=new(n===void 0?qq:n)(Cbt(s-l,0)),o=0;l<s;l++,o++)l in i&&Lxe(r,o,i[l]);return r.length=o,r}});var e_e=new WeakMap;function Sbt(e,t){return yk(this,0,void 0,function(){var n,r,o,i;return bk(this,function(a){switch(a.label){case 0:return n=function(l){var s=e_e.get(l);if(s!=null)return s;var u=Zxe(l),c=u.onSuccess,d=u.onProgress,f=u.onFailed,p=u.customInsert,m=u.onError;return s=i6e(gk(gk({},u),{onProgress:function(v){l.showProgressBar(v),d&&d(v)},onSuccess:function(v,g){if(p)return p(g,function(T,k){return nA(l,T,k)}),void c(v,g);var b=g.errno,y=b===void 0?1:b,w=g.data,x=w===void 0?{}:w;if(y===0){var _=x.url,E=_===void 0?"":_,C=x.poster;nA(l,E,C===void 0?"":C),c(v,g)}else f(v,g)},onError:function(v,g,b){m(v,g,b)}})),e_e.set(l,s),s}(e),r=t.name,o=t.type,i=t.size,n.addFile({name:r,type:o,size:i,data:t}),[4,n.upload()];case 1:return a.sent(),[2]}})})}var kbt=function(){function e(){this.title=jt("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){var r=this.getMenuConfig(t),o=r.allowedFileTypes,i=o===void 0?[]:o,a=r.customBrowseAndUpload;if(a)a(function(c,d){return nA(t,c,d)});else{var l="";i.length>0&&(l='accept="'+i.join(", ")+'"');var s=Le("body"),u=Le('<input type="file" '+l+" multiple/>");u.hide(),s.append(u),u.click(),u.on("change",function(){var c=u[0].files;(function(d,f){var p,m;yk(this,0,void 0,function(){var v,g,b,y,w,x;return bk(this,function(_){switch(_.label){case 0:if(f==null)return[2];v=Array.prototype.slice.call(f),g=Zxe(d).customUpload,_.label=1;case 1:_.trys.push([1,9,10,15]),b=function(E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C,T=E[Symbol.asyncIterator];return T?T.call(E):(E=function(I){var O=typeof Symbol=="function"&&Symbol.iterator,F=O&&I[O],N=0;if(F)return F.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&N>=I.length&&(I=void 0),{value:I&&I[N++],done:!I}}};throw new TypeError(O?"Object is not iterable.":"Symbol.iterator is not defined.")}(E),C={},k("next"),k("throw"),k("return"),C[Symbol.asyncIterator]=function(){return this},C);function k(I){C[I]=E[I]&&function(O){return new Promise(function(F,N){(function(B,L,V,P){Promise.resolve(P).then(function(H){B({value:H,done:V})},L)})(F,N,(O=E[I](O)).done,O.value)})}}}(v),_.label=2;case 2:return[4,b.next()];case 3:return(y=_.sent()).done?[3,8]:(w=y.value,g?[4,g(w,function(E,C){return nA(d,E,C)})]:[3,5]);case 4:return _.sent(),[3,7];case 5:return[4,Sbt(d,w)];case 6:_.sent(),_.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return x=_.sent(),p={error:x},[3,15];case 10:return _.trys.push([10,,13,14]),y&&!y.done&&(m=b.return)?[4,m.call(b)]:[3,12];case 11:_.sent(),_.label=12;case 12:return[3,14];case 13:if(p)throw p.error;return[7];case 14:return[7];case 15:return[2]}})})})(t,c)})}},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!ct.isCollapsed(n)||!!Re.getSelectedElems(t).some(function(r){var o=Re.getNodeType(r);return o==="pre"||o==="list-item"||!!t.isVoid(r)})},e.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadVideo")},e}(),Dbt=Oy.PROPER,Kq=RegExp.prototype,t_e=Kq.toString,Obt=Vn(P9e),Tbt=io(function(){return t_e.call({source:"a",flags:"b"})!="/a/b"}),Mbt=Dbt&&t_e.name!="toString";function Yq(){return X9e("w-e-insert-video")}(Tbt||Mbt)&&Au(RegExp.prototype,"toString",function(){var e=ra(this),t=wu(e.source),n=e.flags;return"/"+t+"/"+wu(n===void 0&&P5(Kq,e)&&!("flags"in Kq)?Obt(e):n)},{unsafe:!0});var Nbt=function(){function e(){this.title=jt("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Yq(),this.heightInputId=Yq(),this.buttonId=Yq()}return e.prototype.getSelectedVideoNode=function(t){return Re.getSelectedNodeByType(t,"video")},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){return t.selection==null||this.getSelectedVideoNode(t)==null},e.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},e.prototype.getModalContentElem=function(t){var n=this,r=n.widthInputId,o=n.heightInputId,i=n.buttonId,a=jv(Ds(jt("videoModule.width"),r,"auto"),2),l=a[0],s=Le(a[1]),u=jv(Ds(jt("videoModule.height"),o,"auto"),2),c=u[0],d=Le(u[1]),f=jv(Z2(i,jt("videoModule.ok")),1)[0];if(this.$content==null){var p=Le("<div></div>");p.on("click","#"+i,function(x){x.preventDefault();var _=p.find("#"+r).val().trim(),E=p.find("#"+o).val().trim(),C=parseInt(_),T=parseInt(E),k=C?C.toString():"auto",I=T?T.toString():"auto";t.restoreSelection(),et.setNodes(t,{width:k,height:I},{match:function(O){return Re.checkNodeType(O,"video")}}),t.hidePanelOrModal()}),this.$content=p}var m=this.$content;m.empty(),m.append(l),m.append(c),m.append(f);var v=this.getSelectedVideoNode(t);if(v==null)return m[0];var g=v.width,b=g===void 0?"auto":g,y=v.height,w=y===void 0?"auto":y;return s.val(b),d.val(w),setTimeout(function(){s.focus()}),m[0]},e}(),Fbt={renderElems:[kyt],elemsToHtml:[Dyt],preParseHtml:[Nyt],parseElemsHtml:[Vyt],menus:[{key:"insertVideo",factory:function(){return new H3t},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new kbt},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'"+e.name+"' upload failed",t)},onError:function(e,t,n){console.error("'"+e.name+" upload error",t,n)}}},{key:"editVideoSize",factory:function(){return new Nbt}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(o){return o.type==="video"||t(o)},r.normalizeNode=function(o){var i=jv(o,2),a=i[0],l=i[1];return Re.getNodeType(a)==="video"&&Re.isLastNode(r,a)&&et.insertNodes(r,Re.genEmptyParagraph(),{at:[l[0]+1]}),n([a,l])},r}};Ul("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),Ul("zh-CN",{uploadImgModule:{uploadImage:"\u4E0A\u4F20\u56FE\u7247",uploadError:"{{fileName}} \u4E0A\u4F20\u51FA\u9519"}});var n_e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xq(e){var t={exports:{}};return e(t,t.exports),t.exports}var Vh,Jk,Zk=function(e){return e&&e.Math==Math&&e},zt=Zk(typeof globalThis=="object"&&globalThis)||Zk(typeof window=="object"&&window)||Zk(typeof self=="object"&&self)||Zk(typeof n_e=="object"&&n_e)||function(){return this}()||Function("return this")(),co=function(e){try{return!!e()}catch{return!0}},dd=!co(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),lA=Function.prototype.call,Ur=lA.bind?lA.bind(lA):function(){return lA.apply(lA,arguments)},r_e={}.propertyIsEnumerable,o_e=Object.getOwnPropertyDescriptor,Rbt={f:o_e&&!r_e.call({1:2},1)?function(e){var t=o_e(this,e);return!!t&&t.enumerable}:r_e},eD=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},i_e=Function.prototype,Qq=i_e.bind,Jq=i_e.call,Ibt=Qq&&Qq.bind(Jq),ur=Qq?function(e){return e&&Ibt(Jq,e)}:function(e){return e&&function(){return Jq.apply(e,arguments)}},Bbt=ur({}.toString),Lbt=ur("".slice),ic=function(e){return Lbt(Bbt(e),8,-1)},Zq=zt.Object,Pbt=ur("".split),eK=co(function(){return!Zq("z").propertyIsEnumerable(0)})?function(e){return ic(e)=="String"?Pbt(e,""):Zq(e)}:Zq,jbt=zt.TypeError,sA=function(e){if(e==null)throw jbt("Can't call method on "+e);return e},zh=function(e){return eK(sA(e))},no=function(e){return typeof e=="function"},fo=function(e){return typeof e=="object"?e!==null:no(e)},qv=function(e,t){return arguments.length<2?function(n){return no(n)?n:void 0}(zt[e]):zt[e]&&zt[e][t]},uA=ur({}.isPrototypeOf),Ly=qv("navigator","userAgent")||"",a_e=zt.process,l_e=zt.Deno,s_e=a_e&&a_e.versions||l_e&&l_e.version,u_e=s_e&&s_e.v8;u_e&&(Jk=(Vh=u_e.split("."))[0]>0&&Vh[0]<4?1:+(Vh[0]+Vh[1])),!Jk&&Ly&&(!(Vh=Ly.match(/Edge\/(\d+)/))||Vh[1]>=74)&&(Vh=Ly.match(/Chrome\/(\d+)/))&&(Jk=+Vh[1]);var cA=Jk,tK=!!Object.getOwnPropertySymbols&&!co(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&cA&&cA<41}),nK=tK&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Vbt=zt.Object,rK=nK?function(e){return typeof e=="symbol"}:function(e){var t=qv("Symbol");return no(t)&&uA(t.prototype,Vbt(e))},zbt=zt.String,tD=function(e){try{return zbt(e)}catch{return"Object"}},Hbt=zt.TypeError,Hh=function(e){if(no(e))return e;throw Hbt(tD(e)+" is not a function")},dA=function(e,t){var n=e[t];return n==null?void 0:Hh(n)},$bt=zt.TypeError,Ubt=Object.defineProperty,oK=function(e,t){try{Ubt(zt,e,{value:t,configurable:!0,writable:!0})}catch{zt[e]=t}return t},$h=zt["__core-js_shared__"]||oK("__core-js_shared__",{}),iK=Xq(function(e){(e.exports=function(t,n){return $h[t]||($h[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),Wbt=zt.Object,aK=function(e){return Wbt(sA(e))},Gbt=ur({}.hasOwnProperty),Ci=Object.hasOwn||function(e,t){return Gbt(aK(e),t)},qbt=0,Kbt=Math.random(),Ybt=ur(1 .toString),lK=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Ybt(++qbt+Kbt,36)},fA=iK("wks"),Kv=zt.Symbol,c_e=Kv&&Kv.for,Xbt=nK?Kv:Kv&&Kv.withoutSetter||lK,li=function(e){if(!Ci(fA,e)||!tK&&typeof fA[e]!="string"){var t="Symbol."+e;tK&&Ci(Kv,e)?fA[e]=Kv[e]:fA[e]=nK&&c_e?c_e(t):Xbt(t)}return fA[e]},Qbt=zt.TypeError,Jbt=li("toPrimitive"),sK=function(e){var t=function(n){if(!fo(n)||rK(n))return n;var r,o=dA(n,Jbt);if(o){if(r=Ur(o,n,"string"),!fo(r)||rK(r))return r;throw Qbt("Can't convert object to primitive value")}return function(i){var a,l;if(no(a=i.toString)&&!fo(l=Ur(a,i))||no(a=i.valueOf)&&!fo(l=Ur(a,i)))return l;throw $bt("Can't convert object to primitive value")}(n)}(e);return rK(t)?t:t+""},uK=zt.document,Zbt=fo(uK)&&fo(uK.createElement),pA=function(e){return Zbt?uK.createElement(e):{}},d_e=!dd&&!co(function(){return Object.defineProperty(pA("div"),"a",{get:function(){return 7}}).a!=7}),f_e=Object.getOwnPropertyDescriptor,cK={f:dd?f_e:function(e,t){if(e=zh(e),t=sK(t),d_e)try{return f_e(e,t)}catch{}if(Ci(e,t))return eD(!Ur(Rbt.f,e,t),e[t])}},e4t=zt.String,t4t=zt.TypeError,oa=function(e){if(fo(e))return e;throw t4t(e4t(e)+" is not an object")},n4t=zt.TypeError,p_e=Object.defineProperty,Af={f:dd?p_e:function(e,t,n){if(oa(e),t=sK(t),oa(n),d_e)try{return p_e(e,t,n)}catch{}if("get"in n||"set"in n)throw n4t("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},fd=dd?function(e,t,n){return Af.f(e,t,eD(1,n))}:function(e,t,n){return e[t]=n,e},r4t=ur(Function.toString);no($h.inspectSource)||($h.inspectSource=function(e){return r4t(e)});var nD,hA,rD,oD=$h.inspectSource,h_e=zt.WeakMap,v_e=no(h_e)&&/native code/.test(oD(h_e)),m_e=iK("keys"),dK=function(e){return m_e[e]||(m_e[e]=lK(e))},iD={},fK=zt.TypeError,o4t=zt.WeakMap;if(v_e||$h.state){var Yv=$h.state||($h.state=new o4t),i4t=ur(Yv.get),g_e=ur(Yv.has),a4t=ur(Yv.set);nD=function(e,t){if(g_e(Yv,e))throw new fK("Object already initialized");return t.facade=e,a4t(Yv,e,t),t},hA=function(e){return i4t(Yv,e)||{}},rD=function(e){return g_e(Yv,e)}}else{var Py=dK("state");iD[Py]=!0,nD=function(e,t){if(Ci(e,Py))throw new fK("Object already initialized");return t.facade=e,fd(e,Py,t),t},hA=function(e){return Ci(e,Py)?e[Py]:{}},rD=function(e){return Ci(e,Py)}}var Is={set:nD,get:hA,has:rD,enforce:function(e){return rD(e)?hA(e):nD(e,{})},getterFor:function(e){return function(t){var n;if(!fo(t)||(n=hA(t)).type!==e)throw fK("Incompatible receiver, "+e+" required");return n}}},y_e=Function.prototype,l4t=dd&&Object.getOwnPropertyDescriptor,pK=Ci(y_e,"name"),vA={EXISTS:pK,PROPER:pK&&(function(){}).name==="something",CONFIGURABLE:pK&&(!dd||dd&&l4t(y_e,"name").configurable)},xu=Xq(function(e){var t=vA.CONFIGURABLE,n=Is.get,r=Is.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;no(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ci(l,"name")||t&&l.name!==p)&&fd(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==zt?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:fd(i,a,l)):d?i[a]=l:oK(a,l)})(Function.prototype,"toString",function(){return no(this)&&n(this).source||oD(this)})}),s4t=Math.ceil,u4t=Math.floor,hK=function(e){var t=+e;return t!=t||t===0?0:(t>0?u4t:s4t)(t)},c4t=Math.max,d4t=Math.min,mA=function(e,t){var n=hK(e);return n<0?c4t(n+t,0):d4t(n,t)},f4t=Math.min,b_e=function(e){return e>0?f4t(hK(e),9007199254740991):0},gA=function(e){return b_e(e.length)},p4t=function(e){return function(t,n,r){var o,i=zh(t),a=gA(i),l=mA(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}}(!1),A_e=ur([].push),w_e=function(e,t){var n,r=zh(e),o=0,i=[];for(n in r)!Ci(iD,n)&&Ci(r,n)&&A_e(i,n);for(;t.length>o;)Ci(r,n=t[o++])&&(~p4t(i,n)||A_e(i,n));return i},aD=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],h4t=aD.concat("length","prototype"),lD={f:Object.getOwnPropertyNames||function(e){return w_e(e,h4t)}},v4t={f:Object.getOwnPropertySymbols},m4t=ur([].concat),g4t=qv("Reflect","ownKeys")||function(e){var t=lD.f(oa(e)),n=v4t.f;return n?m4t(t,n(e)):t},y4t=function(e,t){for(var n=g4t(t),r=Af.f,o=cK.f,i=0;i<n.length;i++){var a=n[i];Ci(e,a)||r(e,a,o(t,a))}},b4t=/#|\.prototype\./,yA=function(e,t){var n=w4t[A4t(e)];return n==_4t||n!=x4t&&(no(t)?co(t):!!t)},A4t=yA.normalize=function(e){return String(e).replace(b4t,".").toLowerCase()},w4t=yA.data={},x4t=yA.NATIVE="N",_4t=yA.POLYFILL="P",sD=yA,E4t=cK.f,pd=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?zt:u?zt[l]||oK(l,{}):(zt[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=E4t(n,r))&&a.value:n[r],!sD(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;y4t(i,o)}(e.sham||o&&o.sham)&&fd(i,"sham",!0),xu(n,r,i,e)}},uD=Array.isArray||function(e){return ic(e)=="Array"},x_e={};x_e[li("toStringTag")]="z";var vK=String(x_e)==="[object z]",C4t=li("toStringTag"),S4t=zt.Object,k4t=ic(function(){return arguments}())=="Arguments",cD=vK?ic:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=S4t(e),C4t))=="string"?n:k4t?ic(t):(r=ic(t))=="Object"&&no(t.callee)?"Arguments":r},__e=function(){},D4t=[],E_e=qv("Reflect","construct"),mK=/^\s*(?:class|function)\b/,O4t=ur(mK.exec),T4t=!mK.exec(__e),bA=function(e){if(!no(e))return!1;try{return E_e(__e,D4t,e),!0}catch{return!1}},gK=!E_e||co(function(){var e;return bA(bA.call)||!bA(Object)||!bA(function(){e=!0})||e})?function(e){if(!no(e))return!1;switch(cD(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return T4t||!!O4t(mK,oD(e))}:bA,C_e=function(e,t,n){var r=sK(t);r in e?Af.f(e,r,eD(0,n)):e[r]=n},M4t=li("species"),S_e=ur([].slice),N4t=cA>=51||!co(function(){var e=[];return(e.constructor={})[M4t]=function(){return{foo:1}},e.slice(Boolean).foo!==1}),F4t=li("species"),yK=zt.Array,R4t=Math.max;pd({target:"Array",proto:!0,forced:!N4t},{slice:function(e,t){var n,r,o,i=zh(this),a=gA(i),l=mA(e,a),s=mA(t===void 0?a:t,a);if(uD(i)&&(n=i.constructor,(gK(n)&&(n===yK||uD(n.prototype))||fo(n)&&(n=n[F4t])===null)&&(n=void 0),n===yK||n===void 0))return S_e(i,l,s);for(r=new(n===void 0?yK:n)(R4t(s-l,0)),o=0;l<s;l++,o++)l in i&&C_e(r,o,i[l]);return r.length=o,r}});var I4t=vK?{}.toString:function(){return"[object "+cD(this)+"]"};vK||xu(Object.prototype,"toString",I4t,{unsafe:!0});var dD,B4t=zt.String,Uh=function(e){if(cD(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return B4t(e)},k_e=function(){var e=oa(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},bK=zt.RegExp,AK=co(function(){var e=bK("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),L4t=AK||co(function(){return!bK("a","y").sticky}),D_e={BROKEN_CARET:AK||co(function(){var e=bK("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:L4t,UNSUPPORTED_Y:AK},P4t=Object.keys||function(e){return w_e(e,aD)},j4t=dd?Object.defineProperties:function(e,t){oa(e);for(var n,r=zh(t),o=P4t(t),i=o.length,a=0;i>a;)Af.f(e,n=o[a++],r[n]);return e},wK=qv("document","documentElement"),O_e=dK("IE_PROTO"),xK=function(){},T_e=function(e){return"<script>"+e+"<\/script>"},M_e=function(e){e.write(T_e("")),e.close();var t=e.parentWindow.Object;return e=null,t},fD=function(){try{dD=new ActiveXObject("htmlfile")}catch{}var e,t;fD=typeof document<"u"?document.domain&&dD?M_e(dD):((t=pA("iframe")).style.display="none",wK.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(T_e("document.F=Object")),e.close(),e.F):M_e(dD);for(var n=aD.length;n--;)delete fD.prototype[aD[n]];return fD()};iD[O_e]=!0;var N_e,_K,EK=Object.create||function(e,t){var n;return e!==null?(xK.prototype=oa(e),n=new xK,xK.prototype=null,n[O_e]=e):n=fD(),t===void 0?n:j4t(n,t)},V4t=zt.RegExp,z4t=co(function(){var e=V4t(".","s");return!(e.dotAll&&e.exec(` |
|
1062 |
`)&&e.flags==="s")}),H4t=zt.RegExp,$4t=co(function(){var e=H4t("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),U4t=Is.get,W4t=iK("native-string-replace",String.prototype.replace),pD=RegExp.prototype.exec,CK=pD,G4t=ur("".charAt),q4t=ur("".indexOf),K4t=ur("".replace),SK=ur("".slice),kK=(_K=/b*/g,Ur(pD,N_e=/a/,"a"),Ur(pD,_K,"a"),N_e.lastIndex!==0||_K.lastIndex!==0),F_e=D_e.BROKEN_CARET,DK=/()??/.exec("")[1]!==void 0;(kK||DK||F_e||z4t||$4t)&&(CK=function(e){var t,n,r,o,i,a,l,s=this,u=U4t(s),c=Uh(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=Ur(CK,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=F_e&&s.sticky,m=Ur(k_e,s),v=s.source,g=0,b=c;if(p&&(m=K4t(m,"y",""),q4t(m,"g")===-1&&(m+="g"),b=SK(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&G4t(c,s.lastIndex-1)!==` |
|
1063 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),DK&&(n=new RegExp("^"+v+"$(?!\\s)",m)),kK&&(r=s.lastIndex),o=Ur(pD,p?n:s,b),p?o?(o.input=SK(o.input,g),o[0]=SK(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:kK&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),DK&&o&&o.length>1&&Ur(W4t,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=EK(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var AA=CK;pd({target:"RegExp",proto:!0,forced:/./.exec!==AA},{exec:AA});var OK=Function.prototype,R_e=OK.apply,Y4t=OK.bind,I_e=OK.call,B_e=typeof Reflect=="object"&&Reflect.apply||(Y4t?I_e.bind(R_e):function(){return I_e.apply(R_e,arguments)}),X4t=li("species"),TK=RegExp.prototype,Q4t=li("match"),J4t=zt.TypeError,Z4t=li("species"),L_e=function(e,t){var n,r=oa(e).constructor;return r===void 0||(n=oa(r)[Z4t])==null?t:function(o){if(gK(o))return o;throw J4t(tD(o)+" is not a constructor")}(n)},e6t=ur("".charAt),P_e=ur("".charCodeAt),t6t=ur("".slice),j_e=function(e){return function(t,n){var r,o,i=Uh(sA(t)),a=hK(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=P_e(i,a))<55296||r>56319||a+1===l||(o=P_e(i,a+1))<56320||o>57343?e?e6t(i,a):r:e?t6t(i,a,a+2):o-56320+(r-55296<<10)+65536}},V_e={codeAt:j_e(!1),charAt:j_e(!0)},n6t=V_e.charAt,r6t=function(e,t,n){return t+(n?n6t(e,t).length:1)},o6t=zt.Array,i6t=Math.max,MK=function(e,t,n){for(var r=gA(e),o=mA(t,r),i=mA(n===void 0?r:n,r),a=o6t(i6t(i-o,0)),l=0;o<i;o++,l++)C_e(a,l,e[o]);return a.length=l,a},a6t=zt.TypeError,z_e=function(e,t){var n=e.exec;if(no(n)){var r=Ur(n,e,t);return r!==null&&oa(r),r}if(ic(e)==="RegExp")return Ur(AA,e,t);throw a6t("RegExp#exec called on incompatible receiver")},jy=D_e.UNSUPPORTED_Y,l6t=Math.min,H_e=[].push,s6t=ur(/./.exec),Vy=ur(H_e),wA=ur("".slice);(function(e,t,n,r){var o=li(e),i=!co(function(){var u={};return u[o]=function(){return 7},""[e](u)!=7}),a=i&&!co(function(){var u=!1,c=/a/;return(c={}).constructor={},c.constructor[X4t]=function(){return c},c.flags="",c[o]=/./[o],c.exec=function(){return u=!0,null},c[o](""),!u});if(!i||!a||n){var l=ur(/./[o]),s=function(u,c,d){var f;return f="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(p,m){var v,g,b=Uh(sA(this)),y=m===void 0?4294967295:m>>>0;if(y===0)return[];if(p===void 0)return[b];if(!fo(v=p)||!((g=v[Q4t])!==void 0?g:ic(v)=="RegExp"))return Ur(c,b,p,y);for(var w,x,_,E=[],C=(p.ignoreCase?"i":"")+(p.multiline?"m":"")+(p.unicode?"u":"")+(p.sticky?"y":""),T=0,k=new RegExp(p.source,C+"g");(w=Ur(AA,k,b))&&!((x=k.lastIndex)>T&&(Vy(E,wA(b,T,w.index)),w.length>1&&w.index<b.length&&B_e(H_e,E,MK(w,1)),_=w[0].length,T=x,E.length>=y));)k.lastIndex===w.index&&k.lastIndex++;return T===b.length?!_&&s6t(k,"")||Vy(E,""):Vy(E,wA(b,T)),E.length>y?MK(E,0,y):E}:"0".split(void 0,0).length?function(p,m){return p===void 0&&m===0?[]:Ur(c,this,p,m)}:c,[function(p,m){var v=sA(this),g=p==null?void 0:dA(p,u);return g?Ur(g,p,v,m):Ur(f,Uh(v),p,m)},function(p,m){var v=oa(this),g=Uh(p),b=d(f,v,g,m,f!==c);if(b.done)return b.value;var y=L_e(v,RegExp),w=v.unicode,x=(v.ignoreCase?"i":"")+(v.multiline?"m":"")+(v.unicode?"u":"")+(jy?"g":"y"),_=new y(jy?"^(?:"+v.source+")":v,x),E=m===void 0?4294967295:m>>>0;if(E===0)return[];if(g.length===0)return z_e(_,g)===null?[g]:[];for(var C=0,T=0,k=[];T<g.length;){_.lastIndex=jy?0:T;var I,O=z_e(_,jy?wA(g,T):g);if(O===null||(I=l6t(b_e(_.lastIndex+(jy?T:0)),g.length))===C)T=r6t(g,T,w);else{if(Vy(k,wA(g,C,T)),k.length===E)return k;for(var F=1;F<=O.length-1;F++)if(Vy(k,O[F]),k.length===E)return k;T=C=I}}return Vy(k,wA(g,C)),k}]}(o,""[e],function(u,c,d,f,p){var m=ur(u),v=c.exec;return v===AA||v===TK.exec?i&&!p?{done:!0,value:l(c,d,f)}:{done:!0,value:m(d,c,f)}:{done:!1}});xu(String.prototype,e,s[0]),xu(TK,o,s[1])}r&&fd(TK[o],"sham",!0)})("split",0,!!co(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),jy);var hD=function(){return hD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hD.apply(this,arguments)};function NK(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(u){try{s(r.next(u))}catch(c){i(c)}}function l(u){try{s(r.throw(u))}catch(c){i(c)}}function s(u){var c;u.done?o(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(a,l)}s((r=r.apply(e,[])).next())})}function FK(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(s){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(c[0]===6&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(d){c=[6,d],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,u])}}}var RK=li("unscopables"),IK=Array.prototype;IK[RK]==null&&Af.f(IK,RK,{configurable:!0,value:EK(null)});var Xv,$_e,U_e,BK=function(e){IK[RK][e]=!0},zy={},u6t=!co(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),W_e=dK("IE_PROTO"),LK=zt.Object,c6t=LK.prototype,vD=u6t?LK.getPrototypeOf:function(e){var t=aK(e);if(Ci(t,W_e))return t[W_e];var n=t.constructor;return no(n)&&t instanceof n?n.prototype:t instanceof LK?c6t:null},PK=li("iterator"),G_e=!1;[].keys&&("next"in(U_e=[].keys())?($_e=vD(vD(U_e)))!==Object.prototype&&(Xv=$_e):G_e=!0);var d6t=Xv==null||co(function(){var e={};return Xv[PK].call(e)!==e});d6t&&(Xv={}),no(Xv[PK])||xu(Xv,PK,function(){return this});var jK={IteratorPrototype:Xv,BUGGY_SAFARI_ITERATORS:G_e},f6t=Af.f,q_e=li("toStringTag"),mD=function(e,t,n){e&&!Ci(e=n?e:e.prototype,q_e)&&f6t(e,q_e,{configurable:!0,value:t})},p6t=jK.IteratorPrototype,h6t=function(){return this},v6t=zt.String,m6t=zt.TypeError,Hy=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ur(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,o){return oa(r),function(i){if(typeof i=="object"||no(i))return i;throw m6t("Can't set "+v6t(i)+" as a prototype")}(o),t?e(r,o):r.__proto__=o,r}}():void 0),g6t=vA.PROPER,y6t=vA.CONFIGURABLE,K_e=jK.IteratorPrototype,VK=jK.BUGGY_SAFARI_ITERATORS,xA=li("iterator"),b6t=function(){return this},Y_e=function(e,t,n,r,o,i,a){(function(g,b,y){var w=b+" Iterator";g.prototype=EK(p6t,{next:eD(1,y)}),mD(g,w,!1),zy[w]=h6t})(n,t,r);var l,s,u=function(g){if(g===o&&m)return m;if(!VK&&g in f)return f[g];switch(g){case"keys":case"values":case"entries":return function(){return new n(this,g)}}return function(){return new n(this)}},c=t+" Iterator",d=!1,f=e.prototype,p=f[xA]||f["@@iterator"]||o&&f[o],m=!VK&&p||u(o),v=t=="Array"&&f.entries||p;return v&&(l=vD(v.call(new e)))!==Object.prototype&&l.next&&(vD(l)!==K_e&&(Hy?Hy(l,K_e):no(l[xA])||xu(l,xA,b6t)),mD(l,c,!0)),g6t&&o=="values"&&p&&p.name!=="values"&&(y6t?fd(f,"name","values"):(d=!0,m=function(){return Ur(p,this)})),o&&(s={values:u("values"),keys:u("keys"),entries:u("entries")},a||pd({target:t,proto:!0,forced:VK||d},s)),f[xA]!==m&&xu(f,xA,m,{name:o}),zy[t]=m,s},A6t=Is.set,w6t=Is.getterFor("Array Iterator"),_A=Y_e(Array,"Array",function(e,t){A6t(this,{type:"Array Iterator",target:zh(e),index:0,kind:t})},function(){var e=w6t(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");zy.Arguments=zy.Array,BK("keys"),BK("values"),BK("entries");var x6t=V_e.charAt,_6t=Is.set,E6t=Is.getterFor("String Iterator");Y_e(String,"String",function(e){_6t(this,{type:"String Iterator",string:Uh(e),index:0})},function(){var e,t=E6t(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=x6t(n,r),t.index+=e.length,{value:e,done:!1})});var gD=function(e,t,n){for(var r in t)xu(e,r,t[r],n);return e},X_e=lD.f,Q_e=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],C6t={f:function(e){return Q_e&&ic(e)=="Window"?function(t){try{return X_e(t)}catch{return MK(Q_e)}}(e):X_e(zh(e))}},J_e=co(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),yD=Object.isExtensible,Qv=co(function(){yD(1)})||J_e?function(e){return!!fo(e)&&(!J_e||ic(e)!="ArrayBuffer")&&(!yD||yD(e))}:yD,S6t=!co(function(){return Object.isExtensible(Object.preventExtensions({}))}),zK=Xq(function(e){var t=Af.f,n=!1,r=lK("meta"),o=0,i=function(l){t(l,r,{value:{objectID:"O"+o++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var l=lD.f,s=ur([].splice),u={};u[r]=1,l(u).length&&(lD.f=function(c){for(var d=l(c),f=0,p=d.length;f<p;f++)if(d[f]===r){s(d,f,1);break}return d},pd({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:C6t.f}))},fastKey:function(l,s){if(!fo(l))return typeof l=="symbol"?l:(typeof l=="string"?"S":"P")+l;if(!Ci(l,r)){if(!Qv(l))return"F";if(!s)return"E";i(l)}return l[r].objectID},getWeakData:function(l,s){if(!Ci(l,r)){if(!Qv(l))return!0;if(!s)return!1;i(l)}return l[r].weakData},onFreeze:function(l){return S6t&&n&&Qv(l)&&!Ci(l,r)&&i(l),l}};iD[r]=!0}),Z_e=ur(ur.bind),EA=function(e,t){return Hh(e),t===void 0?e:Z_e?Z_e(e,t):function(){return e.apply(t,arguments)}},k6t=li("iterator"),D6t=Array.prototype,O6t=li("iterator"),eEe=function(e){if(e!=null)return dA(e,O6t)||dA(e,"@@iterator")||zy[cD(e)]},T6t=zt.TypeError,tEe=function(e,t,n){var r,o;oa(e);try{if(!(r=dA(e,"return"))){if(t==="throw")throw n;return n}r=Ur(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return oa(r),n},M6t=zt.TypeError,bD=function(e,t){this.stopped=e,this.result=t},nEe=bD.prototype,AD=function(e,t,n){var r,o,i,a,l,s,u,c,d=n&&n.that,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),m=!(!n||!n.INTERRUPTED),v=EA(t,d),g=function(y){return r&&tEe(r,"normal",y),new bD(!0,y)},b=function(y){return f?(oa(y),m?v(y[0],y[1],g):v(y[0],y[1])):m?v(y,g):v(y)};if(p)r=e;else{if(!(o=eEe(e)))throw M6t(tD(e)+" is not iterable");if((c=o)!==void 0&&(zy.Array===c||D6t[k6t]===c)){for(i=0,a=gA(e);a>i;i++)if((l=b(e[i]))&&uA(nEe,l))return l;return new bD(!1)}r=function(y,w){var x=arguments.length<2?eEe(y):w;if(Hh(x))return oa(Ur(x,y));throw T6t(tD(y)+" is not iterable")}(e,o)}for(s=r.next;!(u=Ur(s,r)).done;){try{l=b(u.value)}catch(y){tEe(r,"throw",y)}if(typeof l=="object"&&l&&uA(nEe,l))return l}return new bD(!1)},N6t=zt.TypeError,HK=function(e,t){if(uA(t,e))return e;throw N6t("Incorrect invocation")},rEe=li("iterator"),oEe=!1;try{var F6t=0,iEe={next:function(){return{done:!!F6t++}},return:function(){oEe=!0}};iEe[rEe]=function(){return this},Array.from(iEe,function(){throw 2})}catch{}var aEe=function(e,t){if(!oEe)return!1;var n=!1;try{var r={};r[rEe]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},R6t=li("species"),lEe=zt.Array,I6t=function(e,t){return new(function(n){var r;return uD(n)&&(r=n.constructor,(gK(r)&&(r===lEe||uD(r.prototype))||fo(r)&&(r=r[R6t])===null)&&(r=void 0)),r===void 0?lEe:r}(e))(t===0?0:t)},sEe=ur([].push),Wh=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=aK(s),v=eK(m),g=EA(u,c),b=gA(v),y=0,w=d||I6t,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:sEe(x,f)}else switch(e){case 4:return!1;case 7:sEe(x,f)}return i?-1:r||o?o:x}},$K={forEach:Wh(0),map:Wh(1),filter:Wh(2),some:Wh(3),every:Wh(4),find:Wh(5),findIndex:Wh(6),filterReject:Wh(7)},wD=zK.getWeakData,B6t=Is.set,L6t=Is.getterFor,P6t=$K.find,j6t=$K.findIndex,V6t=ur([].splice),z6t=0,xD=function(e){return e.frozen||(e.frozen=new uEe)},uEe=function(){this.entries=[]},UK=function(e,t){return P6t(e.entries,function(n){return n[0]===t})};uEe.prototype={get:function(e){var t=UK(this,e);if(t)return t[1]},has:function(e){return!!UK(this,e)},set:function(e,t){var n=UK(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=j6t(this.entries,function(n){return n[0]===e});return~t&&V6t(this.entries,t,1),!!~t}};var CA,cEe={getConstructor:function(e,t,n,r){var o=e(function(s,u){HK(s,i),B6t(s,{type:t,id:z6t++,frozen:void 0}),u!=null&&AD(u,s[r],{that:s,AS_ENTRIES:n})}),i=o.prototype,a=L6t(t),l=function(s,u,c){var d=a(s),f=wD(oa(u),!0);return f===!0?xD(d).set(u,c):f[d.id]=c,s};return gD(i,{delete:function(s){var u=a(this);if(!fo(s))return!1;var c=wD(s);return c===!0?xD(u).delete(s):c&&Ci(c,u.id)&&delete c[u.id]},has:function(s){var u=a(this);if(!fo(s))return!1;var c=wD(s);return c===!0?xD(u).has(s):c&&Ci(c,u.id)}}),gD(i,n?{get:function(s){var u=a(this);if(fo(s)){var c=wD(s);return c===!0?xD(u).get(s):c?c[u.id]:void 0}},set:function(s,u){return l(this,s,u)}}:{add:function(s){return l(this,s,!0)}}),o}},_D=Is.enforce,H6t=!zt.ActiveXObject&&"ActiveXObject"in zt,dEe=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},$6t=function(e,t,n){var r=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=r?"set":"add",a=zt[e],l=a&&a.prototype,s=a,u={},c=function(g){var b=ur(l[g]);xu(l,g,g=="add"?function(y){return b(this,y===0?0:y),this}:g=="delete"?function(y){return!(o&&!fo(y))&&b(this,y===0?0:y)}:g=="get"?function(y){return o&&!fo(y)?void 0:b(this,y===0?0:y)}:g=="has"?function(y){return!(o&&!fo(y))&&b(this,y===0?0:y)}:function(y,w){return b(this,y===0?0:y,w),this})};if(sD(e,!no(a)||!(o||l.forEach&&!co(function(){new a().entries().next()}))))s=n.getConstructor(t,e,r,i),zK.enable();else if(sD(e,!0)){var d=new s,f=d[i](o?{}:-0,1)!=d,p=co(function(){d.has(1)}),m=aEe(function(g){new a(g)}),v=!o&&co(function(){for(var g=new a,b=5;b--;)g[i](b,b);return!g.has(-0)});m||((s=t(function(g,b){HK(g,l);var y=function(w,x,_){var E,C;return Hy&&no(E=x.constructor)&&E!==_&&fo(C=E.prototype)&&C!==_.prototype&&Hy(w,C),w}(new a,g,s);return b!=null&&AD(b,y[i],{that:y,AS_ENTRIES:r}),y})).prototype=l,l.constructor=s),(p||v)&&(c("delete"),c("has"),r&&c("get")),(v||f)&&c(i),o&&l.clear&&delete l.clear}return u[e]=s,pd({global:!0,forced:s!=a},u),mD(s,e),o||n.setStrong(s,e,r),s}("WeakMap",dEe,cEe);if(v_e&&H6t){CA=cEe.getConstructor(dEe,"WeakMap",!0),zK.enable();var SA=$6t.prototype,fEe=ur(SA.delete),ED=ur(SA.has),pEe=ur(SA.get),hEe=ur(SA.set);gD(SA,{delete:function(e){if(fo(e)&&!Qv(e)){var t=_D(this);return t.frozen||(t.frozen=new CA),fEe(this,e)||t.frozen.delete(e)}return fEe(this,e)},has:function(e){if(fo(e)&&!Qv(e)){var t=_D(this);return t.frozen||(t.frozen=new CA),ED(this,e)||t.frozen.has(e)}return ED(this,e)},get:function(e){if(fo(e)&&!Qv(e)){var t=_D(this);return t.frozen||(t.frozen=new CA),ED(this,e)?pEe(this,e):t.frozen.get(e)}return pEe(this,e)},set:function(e,t){if(fo(e)&&!Qv(e)){var n=_D(this);n.frozen||(n.frozen=new CA),ED(this,e)?hEe(this,e,t):n.frozen.set(e,t)}else hEe(this,e,t);return this}})}var CD={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},WK=pA("span").classList,vEe=WK&&WK.constructor&&WK.constructor.prototype,mEe=vEe===Object.prototype?void 0:vEe,GK=li("iterator"),gEe=li("toStringTag"),qK=_A.values,yEe=function(e,t){if(e){if(e[GK]!==qK)try{fd(e,GK,qK)}catch{e[GK]=qK}if(e[gEe]||fd(e,gEe,t),CD[t]){for(var n in _A)if(e[n]!==_A[n])try{fd(e,n,_A[n])}catch{e[n]=_A[n]}}}};for(var KK in CD)yEe(zt[KK]&&zt[KK].prototype,KK);yEe(mEe,"DOMTokenList");var bEe=function(e,t){var n=[][e];return!!n&&co(function(){n.call(null,t||function(){throw 1},1)})},U6t=$K.forEach,YK=bEe("forEach")?[].forEach:function(e){return U6t(this,e,arguments.length>1?arguments[1]:void 0)},AEe=function(e){if(e&&e.forEach!==YK)try{fd(e,"forEach",YK)}catch{e.forEach=YK}};for(var XK in CD)CD[XK]&&AEe(zt[XK]&&zt[XK].prototype);AEe(mEe);var kA,$y,wEe,QK,SD=zt.Promise,xEe=li("species"),_Ee=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ly),Gh=ic(zt.process)=="process",JK=zt.setImmediate,ZK=zt.clearImmediate,W6t=zt.process,eY=zt.Dispatch,G6t=zt.Function,EEe=zt.MessageChannel,q6t=zt.String,tY=0,DA={};try{kA=zt.location}catch{}var nY=function(e){if(Ci(DA,e)){var t=DA[e];delete DA[e],t()}},rY=function(e){return function(){nY(e)}},CEe=function(e){nY(e.data)},SEe=function(e){zt.postMessage(q6t(e),kA.protocol+"//"+kA.host)};JK&&ZK||(JK=function(e){var t=S_e(arguments,1);return DA[++tY]=function(){B_e(no(e)?e:G6t(e),void 0,t)},$y(tY),tY},ZK=function(e){delete DA[e]},Gh?$y=function(e){W6t.nextTick(rY(e))}:eY&&eY.now?$y=function(e){eY.now(rY(e))}:EEe&&!_Ee?(QK=(wEe=new EEe).port2,wEe.port1.onmessage=CEe,$y=EA(QK.postMessage,QK)):zt.addEventListener&&no(zt.postMessage)&&!zt.importScripts&&kA&&kA.protocol!=="file:"&&!co(SEe)?($y=SEe,zt.addEventListener("message",CEe,!1)):$y="onreadystatechange"in pA("script")?function(e){wK.appendChild(pA("script")).onreadystatechange=function(){wK.removeChild(this),nY(e)}}:function(e){setTimeout(rY(e),0)});var OA,Jv,TA,Uy,oY,iY,aY,kEe,DEe={set:JK,clear:ZK},K6t=/ipad|iphone|ipod/i.test(Ly)&&zt.Pebble!==void 0,Y6t=/web0s(?!.*chrome)/i.test(Ly),X6t=cK.f,lY=DEe.set,OEe=zt.MutationObserver||zt.WebKitMutationObserver,TEe=zt.document,MEe=zt.process,kD=zt.Promise,NEe=X6t(zt,"queueMicrotask"),FEe=NEe&&NEe.value;FEe||(OA=function(){var e,t;for(Gh&&(e=MEe.domain)&&e.exit();Jv;){t=Jv.fn,Jv=Jv.next;try{t()}catch(n){throw Jv?Uy():TA=void 0,n}}TA=void 0,e&&e.enter()},_Ee||Gh||Y6t||!OEe||!TEe?!K6t&&kD&&kD.resolve?((aY=kD.resolve(void 0)).constructor=kD,kEe=EA(aY.then,aY),Uy=function(){kEe(OA)}):Gh?Uy=function(){MEe.nextTick(OA)}:(lY=EA(lY,zt),Uy=function(){lY(OA)}):(oY=!0,iY=TEe.createTextNode(""),new OEe(OA).observe(iY,{characterData:!0}),Uy=function(){iY.data=oY=!oY}));var sY,REe,IEe,BEe,LEe=FEe||function(e){var t={fn:e,next:void 0};TA&&(TA.next=t),Jv||(Jv=t,Uy()),TA=t},Q6t=function(e){var t,n;this.promise=new e(function(r,o){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=o}),this.resolve=Hh(t),this.reject=Hh(n)},uY={f:function(e){return new Q6t(e)}},cY=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},J6t=typeof window=="object",PEe=DEe.set,Z6t=li("species"),wf="Promise",jEe=Is.getterFor(wf),e8t=Is.set,t8t=Is.getterFor(wf),Zv=SD&&SD.prototype,hd=SD,MA=Zv,VEe=zt.TypeError,dY=zt.document,fY=zt.process,Wy=uY.f,n8t=Wy,r8t=!!(dY&&dY.createEvent&&zt.dispatchEvent),zEe=no(zt.PromiseRejectionEvent),HEe=!1,NA=sD(wf,function(){var e=oD(hd),t=e!==String(hd);if(!t&&cA===66)return!0;if(cA>=51&&/native code/.test(e))return!1;var n=new hd(function(o){o(1)}),r=function(o){o(function(){},function(){})};return(n.constructor={})[Z6t]=r,!(HEe=n.then(function(){})instanceof r)||!t&&J6t&&!zEe}),o8t=NA||!aEe(function(e){hd.all(e).catch(function(){})}),$Ee=function(e){var t;return!(!fo(e)||!no(t=e.then))&&t},pY=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;LEe(function(){for(var r=e.value,o=e.state==1,i=0;n.length>i;){var a,l,s,u=n[i++],c=o?u.ok:u.fail,d=u.resolve,f=u.reject,p=u.domain;try{c?(o||(e.rejection===2&&a8t(e),e.rejection=1),c===!0?a=r:(p&&p.enter(),a=c(r),p&&(p.exit(),s=!0)),a===u.promise?f(VEe("Promise-chain cycle")):(l=$Ee(a))?Ur(l,a,d,f):d(a)):f(r)}catch(m){p&&!s&&p.exit(),f(m)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&i8t(e)})}},UEe=function(e,t,n){var r,o;r8t?((r=dY.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),zt.dispatchEvent(r)):r={promise:t,reason:n},!zEe&&(o=zt["on"+e])?o(r):e==="unhandledrejection"&&function(i,a){var l=zt.console;l&&l.error&&(arguments.length==1?l.error(i):l.error(i,a))}("Unhandled promise rejection",n)},i8t=function(e){Ur(PEe,zt,function(){var t,n=e.facade,r=e.value;if(WEe(e)&&(t=cY(function(){Gh?fY.emit("unhandledRejection",r,n):UEe("unhandledrejection",n,r)}),e.rejection=Gh||WEe(e)?2:1,t.error))throw t.value})},WEe=function(e){return e.rejection!==1&&!e.parent},a8t=function(e){Ur(PEe,zt,function(){var t=e.facade;Gh?fY.emit("rejectionHandled",t):UEe("rejectionhandled",t,e.value)})},Gy=function(e,t,n){return function(r){e(t,r,n)}},qy=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,pY(e,!0))},hY=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw VEe("Promise can't be resolved itself");var r=$Ee(t);r?LEe(function(){var o={done:!1};try{Ur(r,t,Gy(hY,o,e),Gy(qy,o,e))}catch(i){qy(o,i,e)}}):(e.value=t,e.state=1,pY(e,!1))}catch(o){qy({done:!1},o,e)}}};if(NA&&(MA=(hd=function(e){HK(this,MA),Hh(e),Ur(sY,this);var t=jEe(this);try{e(Gy(hY,t),Gy(qy,t))}catch(n){qy(t,n)}}).prototype,(sY=function(e){e8t(this,{type:wf,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=gD(MA,{then:function(e,t){var n=t8t(this),r=n.reactions,o=Wy(L_e(this,hd));return o.ok=!no(e)||e,o.fail=no(t)&&t,o.domain=Gh?fY.domain:void 0,n.parent=!0,r[r.length]=o,n.state!=0&&pY(n,!1),o.promise},catch:function(e){return this.then(void 0,e)}}),REe=function(){var e=new sY,t=jEe(e);this.promise=e,this.resolve=Gy(hY,t),this.reject=Gy(qy,t)},uY.f=Wy=function(e){return e===hd||e===IEe?new REe(e):n8t(e)},no(SD)&&Zv!==Object.prototype)){BEe=Zv.then,HEe||(xu(Zv,"then",function(e,t){var n=this;return new hd(function(r,o){Ur(BEe,n,r,o)}).then(e,t)},{unsafe:!0}),xu(Zv,"catch",MA.catch,{unsafe:!0}));try{delete Zv.constructor}catch{}Hy&&Hy(Zv,MA)}pd({global:!0,wrap:!0,forced:NA},{Promise:hd}),mD(hd,wf,!1),function(){var e=qv("Promise"),t=Af.f;dd&&e&&!e[xEe]&&t(e,xEe,{configurable:!0,get:function(){return this}})}(),IEe=qv(wf),pd({target:wf,stat:!0,forced:NA},{reject:function(e){var t=Wy(this);return Ur(t.reject,void 0,e),t.promise}}),pd({target:wf,stat:!0,forced:NA},{resolve:function(e){return function(t,n){if(oa(t),fo(n)&&n.constructor===t)return n;var r=uY.f(t);return(0,r.resolve)(n),r.promise}(this,e)}}),pd({target:wf,stat:!0,forced:o8t},{all:function(e){var t=this,n=Wy(t),r=n.resolve,o=n.reject,i=cY(function(){var a=Hh(t.resolve),l=[],s=0,u=1;AD(e,function(c){var d=s++,f=!1;u++,Ur(a,t,c).then(function(p){f||(f=!0,l[d]=p,--u||r(l))},o)}),--u||r(l)});return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=Wy(t),r=n.reject,o=cY(function(){var i=Hh(t.resolve);AD(e,function(a){Ur(i,t,a).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}});var l8t=vA.PROPER,vY=RegExp.prototype,GEe=vY.toString,s8t=ur(k_e),u8t=co(function(){return GEe.call({source:"a",flags:"b"})!="/a/b"}),c8t=l8t&&GEe.name!="toString";(u8t||c8t)&&xu(RegExp.prototype,"toString",function(){var e=oa(this),t=Uh(e.source),n=e.flags;return"/"+t+"/"+Uh(n===void 0&&uA(vY,e)&&!("flags"in vY)?s8t(e):n)},{unsafe:!0});var d8t=vA.EXISTS,f8t=Af.f,qEe=Function.prototype,p8t=ur(qEe.toString),KEe=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,h8t=ur(KEe.exec);dd&&!d8t&&f8t(qEe,"name",{configurable:!0,get:function(){try{return h8t(KEe,p8t(this))[1]}catch{return""}}});var YEe=new WeakMap;function XEe(e){return e.getMenuConfig("uploadImage")}function v8t(e,t){return NK(this,0,void 0,function(){return FK(this,function(n){return[2,new Promise(function(r){var o=new FileReader;o.readAsDataURL(t),o.onload=function(){var i=o.result;if(i){var a=i.toString(),l=a.indexOf("data:image")===0?"":a;xv(e,a,t.name,l),r("ok")}}})]})})}function m8t(e,t){return NK(this,0,void 0,function(){var n,r,o,i;return FK(this,function(a){switch(a.label){case 0:return n=function(l){var s=YEe.get(l);if(s!=null)return s;var u=XEe(l),c=u.onSuccess,d=u.onProgress,f=u.onFailed,p=u.customInsert,m=u.onError;return s=i6e(hD(hD({},u),{onProgress:function(v){l.showProgressBar(v),d&&d(v)},onSuccess:function(v,g){if(p)return p(g,function(I,O,F){return xv(l,I,O,F)}),void c(v,g);var b=g.errno,y=b===void 0?1:b,w=g.data,x=w===void 0?{}:w;if(y===0){if(Array.isArray(x))x.forEach(function(I){var O=I.url,F=O===void 0?"":O,N=I.alt,B=N===void 0?"":N,L=I.href;xv(l,F,B,L===void 0?"":L)});else{var _=x.url,E=_===void 0?"":_,C=x.alt,T=C===void 0?"":C,k=x.href;xv(l,E,T,k===void 0?"":k)}c(v,g)}else f(v,g)},onError:function(v,g,b){m(v,g,b)}})),YEe.set(l,s),s}(e),r=t.name,o=t.type,i=t.size,n.addFile({name:r,type:o,size:i,data:t}),[4,n.upload()];case 1:return a.sent(),[2]}})})}function QEe(e,t){var n,r;return NK(this,0,void 0,function(){var o,i,a,l,s,u,c,d,f;return FK(this,function(p){switch(p.label){case 0:if(t==null)return[2];o=Array.prototype.slice.call(t),i=XEe(e),a=i.customUpload,l=i.base64LimitSize,p.label=1;case 1:p.trys.push([1,11,12,17]),s=function(m){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v,g=m[Symbol.asyncIterator];return g?g.call(m):(m=function(y){var w=typeof Symbol=="function"&&Symbol.iterator,x=w&&y[w],_=0;if(x)return x.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&_>=y.length&&(y=void 0),{value:y&&y[_++],done:!y}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),v={},b("next"),b("throw"),b("return"),v[Symbol.asyncIterator]=function(){return this},v);function b(y){v[y]=m[y]&&function(w){return new Promise(function(x,_){(function(E,C,T,k){Promise.resolve(k).then(function(I){E({value:I,done:T})},C)})(x,_,(w=m[y](w)).done,w.value)})}}}(o),p.label=2;case 2:return[4,s.next()];case 3:return(u=p.sent()).done?[3,10]:(c=u.value,d=c.size,l&&d<=l?[4,v8t(e,c)]:[3,5]);case 4:return p.sent(),[3,9];case 5:return a?[4,a(c,function(m,v,g){return xv(e,m,v,g)})]:[3,7];case 6:return p.sent(),[3,9];case 7:return[4,m8t(e,c)];case 8:p.sent(),p.label=9;case 9:return[3,2];case 10:return[3,17];case 11:return f=p.sent(),n={error:f},[3,17];case 12:return p.trys.push([12,,15,16]),u&&!u.done&&(r=s.return)?[4,r.call(s)]:[3,14];case 13:p.sent(),p.label=14;case 14:return[3,16];case 15:if(n)throw n.error;return[7];case 16:return[7];case 17:return[2]}})})}var g8t=ur([].join),y8t=eK!=Object,b8t=bEe("join",",");pd({target:"Array",proto:!0,forced:y8t||!b8t},{join:function(e){return g8t(zh(this),e===void 0?",":e)}}),au&&(Le.fn.append=au),Yc&&(Le.fn.on=Yc),E2&&(Le.fn.remove=E2),Kc&&(Le.fn.val=Kc),$2e&&(Le.fn.click=$2e),A2&&(Le.fn.hide=A2);var A8t=function(){function e(){this.title=jt("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return dS(t)},e.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadImage")},e.prototype.exec=function(t,n){var r=this.getMenuConfig(t),o=r.allowedFileTypes,i=o===void 0?[]:o,a=r.customBrowseAndUpload;if(a)a(function(c,d,f){return xv(t,c,d,f)});else{var l="";i.length>0&&(l='accept="'+i.join(", ")+'"');var s=Le("body"),u=Le('<input type="file" '+l+" multiple/>");u.hide(),s.append(u),u.click(),u.on("change",function(){var c=u[0].files;QEe(t,c)})}},e}(),w8t={menus:[{key:"uploadImage",factory:function(){return new A8t},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'"+e.name+"' upload failed",t)},onError:function(e,t,n){console.error("'"+e.name+"' upload error",n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(dS(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;o.length<=0?t(r):Array.prototype.slice.call(o).some(function(i){return function(a,l){var s=typeof Symbol=="function"&&a[Symbol.iterator];if(!s)return a;var u,c,d=s.call(a),f=[];try{for(;(l===void 0||l-- >0)&&!(u=d.next()).done;)f.push(u.value)}catch(p){c={error:p}}finally{try{u&&!u.done&&(s=d.return)&&s.call(d)}finally{if(c)throw c.error}}return f}(i.type.split("/"),1)[0]==="image"})?QEe(e,o):t(r)}},n}};Ul("en",{highLightModule:{selectLang:"Language"}}),Ul("zh-CN",{highLightModule:{selectLang:"\u9009\u62E9\u8BED\u8A00"}});var DD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mY(e){var t={exports:{}};return e(t,t.exports),t.exports}var qh,OD,TD=function(e){return e&&e.Math==Math&&e},hr=TD(typeof globalThis=="object"&&globalThis)||TD(typeof window=="object"&&window)||TD(typeof self=="object"&&self)||TD(typeof DD=="object"&&DD)||function(){return this}()||Function("return this")(),x8t=Object.defineProperty,gY=function(e,t){try{x8t(hr,e,{value:t,configurable:!0,writable:!0})}catch{hr[e]=t}return t},Kh=hr["__core-js_shared__"]||gY("__core-js_shared__",{}),yY=mY(function(e){(e.exports=function(t,n){return Kh[t]||(Kh[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),JEe=Function.prototype,bY=JEe.bind,AY=JEe.call,_8t=bY&&bY.bind(AY),zr=bY?function(e){return e&&_8t(AY,e)}:function(e){return e&&function(){return AY.apply(e,arguments)}},E8t=hr.TypeError,Ky=function(e){if(e==null)throw E8t("Can't call method on "+e);return e},C8t=hr.Object,wY=function(e){return C8t(Ky(e))},S8t=zr({}.hasOwnProperty),_u=Object.hasOwn||function(e,t){return S8t(wY(e),t)},k8t=0,D8t=Math.random(),O8t=zr(1 .toString),ZEe=function(e){return"Symbol("+(e===void 0?"":e)+")_"+O8t(++k8t+D8t,36)},cl=function(e){return typeof e=="function"},FA=function(e,t){return arguments.length<2?function(n){return cl(n)?n:void 0}(hr[e]):hr[e]&&hr[e][t]},xY=FA("navigator","userAgent")||"",eCe=hr.process,tCe=hr.Deno,nCe=eCe&&eCe.versions||tCe&&tCe.version,rCe=nCe&&nCe.v8;rCe&&(OD=(qh=rCe.split("."))[0]>0&&qh[0]<4?1:+(qh[0]+qh[1])),!OD&&xY&&(!(qh=xY.match(/Edge\/(\d+)/))||qh[1]>=74)&&(qh=xY.match(/Chrome\/(\d+)/))&&(OD=+qh[1]);var oCe=OD,ia=function(e){try{return!!e()}catch{return!0}},_Y=!!Object.getOwnPropertySymbols&&!ia(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oCe&&oCe<41}),EY=_Y&&!Symbol.sham&&typeof Symbol.iterator=="symbol",RA=yY("wks"),em=hr.Symbol,iCe=em&&em.for,T8t=EY?em:em&&em.withoutSetter||ZEe,Yh=function(e){if(!_u(RA,e)||!_Y&&typeof RA[e]!="string"){var t="Symbol."+e;_Y&&_u(em,e)?RA[e]=em[e]:RA[e]=EY&&iCe?iCe(t):T8t(t)}return RA[e]},aCe={};aCe[Yh("toStringTag")]="z";var CY=String(aCe)==="[object z]",vd=!ia(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),md=function(e){return typeof e=="object"?e!==null:cl(e)},SY=hr.document,M8t=md(SY)&&md(SY.createElement),kY=function(e){return M8t?SY.createElement(e):{}},lCe=!vd&&!ia(function(){return Object.defineProperty(kY("div"),"a",{get:function(){return 7}}).a!=7}),N8t=hr.String,F8t=hr.TypeError,ac=function(e){if(md(e))return e;throw F8t(N8t(e)+" is not an object")},IA=Function.prototype.call,aa=IA.bind?IA.bind(IA):function(){return IA.apply(IA,arguments)},sCe=zr({}.isPrototypeOf),R8t=hr.Object,DY=EY?function(e){return typeof e=="symbol"}:function(e){var t=FA("Symbol");return cl(t)&&sCe(t.prototype,R8t(e))},I8t=hr.String,uCe=function(e){try{return I8t(e)}catch{return"Object"}},B8t=hr.TypeError,cCe=function(e){if(cl(e))return e;throw B8t(uCe(e)+" is not a function")},dCe=function(e,t){var n=e[t];return n==null?void 0:cCe(n)},L8t=hr.TypeError,P8t=hr.TypeError,j8t=Yh("toPrimitive"),OY=function(e){var t=function(n){if(!md(n)||DY(n))return n;var r,o=dCe(n,j8t);if(o){if(r=aa(o,n,"string"),!md(r)||DY(r))return r;throw P8t("Can't convert object to primitive value")}return function(i){var a,l;if(cl(a=i.toString)&&!md(l=aa(a,i))||cl(a=i.valueOf)&&!md(l=aa(a,i)))return l;throw L8t("Can't convert object to primitive value")}(n)}(e);return DY(t)?t:t+""},V8t=hr.TypeError,fCe=Object.defineProperty,MD={f:vd?fCe:function(e,t,n){if(ac(e),t=OY(t),ac(n),lCe)try{return fCe(e,t,n)}catch{}if("get"in n||"set"in n)throw V8t("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},TY=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Yy=vd?function(e,t,n){return MD.f(e,t,TY(1,n))}:function(e,t,n){return e[t]=n,e},z8t=zr(Function.toString);cl(Kh.inspectSource)||(Kh.inspectSource=function(e){return z8t(e)});var ND,BA,FD,MY=Kh.inspectSource,pCe=hr.WeakMap,H8t=cl(pCe)&&/native code/.test(MY(pCe)),hCe=yY("keys"),vCe=function(e){return hCe[e]||(hCe[e]=ZEe(e))},NY={},FY=hr.TypeError,$8t=hr.WeakMap;if(H8t||Kh.state){var tm=Kh.state||(Kh.state=new $8t),U8t=zr(tm.get),mCe=zr(tm.has),W8t=zr(tm.set);ND=function(e,t){if(mCe(tm,e))throw new FY("Object already initialized");return t.facade=e,W8t(tm,e,t),t},BA=function(e){return U8t(tm,e)||{}},FD=function(e){return mCe(tm,e)}}else{var Xy=vCe("state");NY[Xy]=!0,ND=function(e,t){if(_u(e,Xy))throw new FY("Object already initialized");return t.facade=e,Yy(e,Xy,t),t},BA=function(e){return _u(e,Xy)?e[Xy]:{}},FD=function(e){return _u(e,Xy)}}var RY={set:ND,get:BA,has:FD,enforce:function(e){return FD(e)?BA(e):ND(e,{})},getterFor:function(e){return function(t){var n;if(!md(t)||(n=BA(t)).type!==e)throw FY("Incompatible receiver, "+e+" required");return n}}},gCe=Function.prototype,G8t=vd&&Object.getOwnPropertyDescriptor,IY=_u(gCe,"name"),yCe={EXISTS:IY,PROPER:IY&&(function(){}).name==="something",CONFIGURABLE:IY&&(!vd||vd&&G8t(gCe,"name").configurable)},LA=mY(function(e){var t=yCe.CONFIGURABLE,n=RY.get,r=RY.enforce,o=String(String).split("String");(e.exports=function(i,a,l,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;cl(l)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!_u(l,"name")||t&&l.name!==p)&&Yy(l,"name",p),(u=r(l)).source||(u.source=o.join(typeof p=="string"?p:""))),i!==hr?(c?!f&&i[a]&&(d=!0):delete i[a],d?i[a]=l:Yy(i,a,l)):d?i[a]=l:gY(a,l)})(Function.prototype,"toString",function(){return cl(this)&&n(this).source||MY(this)})}),q8t=zr({}.toString),K8t=zr("".slice),Xh=function(e){return K8t(q8t(e),8,-1)},Y8t=Yh("toStringTag"),X8t=hr.Object,Q8t=Xh(function(){return arguments}())=="Arguments",BY=CY?Xh:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(t=X8t(e),Y8t))=="string"?n:Q8t?Xh(t):(r=Xh(t))=="Object"&&cl(t.callee)?"Arguments":r},J8t=CY?{}.toString:function(){return"[object "+BY(this)+"]"};CY||LA(Object.prototype,"toString",J8t,{unsafe:!0});var bCe,ACe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},LY=kY("span").classList,wCe=LY&&LY.constructor&&LY.constructor.prototype,Z8t=wCe===Object.prototype?void 0:wCe,xCe=zr(zr.bind),PY=hr.Object,e5t=zr("".split),jY=ia(function(){return!PY("z").propertyIsEnumerable(0)})?function(e){return Xh(e)=="String"?e5t(e,""):PY(e)}:PY,t5t=Math.ceil,n5t=Math.floor,VY=function(e){var t=+e;return t!=t||t===0?0:(t>0?n5t:t5t)(t)},r5t=Math.min,_Ce=function(e){return e>0?r5t(VY(e),9007199254740991):0},zY=function(e){return _Ce(e.length)},ECe=Array.isArray||function(e){return Xh(e)=="Array"},CCe=function(){},o5t=[],SCe=FA("Reflect","construct"),HY=/^\s*(?:class|function)\b/,i5t=zr(HY.exec),a5t=!HY.exec(CCe),PA=function(e){if(!cl(e))return!1;try{return SCe(CCe,o5t,e),!0}catch{return!1}},kCe=!SCe||ia(function(){var e;return PA(PA.call)||!PA(Object)||!PA(function(){e=!0})||e})?function(e){if(!cl(e))return!1;switch(BY(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return a5t||!!i5t(HY,MY(e))}:PA,l5t=Yh("species"),DCe=hr.Array,s5t=function(e,t){return new(function(n){var r;return ECe(n)&&(r=n.constructor,(kCe(r)&&(r===DCe||ECe(r.prototype))||md(r)&&(r=r[l5t])===null)&&(r=void 0)),r===void 0?DCe:r}(e))(t===0?0:t)},OCe=zr([].push),Qh=function(e){var t=e==1,n=e==2,r=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,m=wY(s),v=jY(m),g=function(_,E){return cCe(_),E===void 0?_:xCe?xCe(_,E):function(){return _.apply(E,arguments)}}(u,c),b=zY(v),y=0,w=d||s5t,x=t?w(s,b):n||a?w(s,0):void 0;b>y;y++)if((l||y in v)&&(p=g(f=v[y],y,m),e))if(t)x[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:OCe(x,f)}else switch(e){case 4:return!1;case 7:OCe(x,f)}return i?-1:r||o?o:x}},u5t=[Qh(0),Qh(1),Qh(2),Qh(3),Qh(4),Qh(5),Qh(6),Qh(7)][0],$Y=(bCe=[].forEach)&&ia(function(){bCe.call(null,function(){throw 1},1)})?[].forEach:function(e){return u5t(this,e,arguments.length>1?arguments[1]:void 0)},TCe=function(e){if(e&&e.forEach!==$Y)try{Yy(e,"forEach",$Y)}catch{e.forEach=$Y}};for(var UY in ACe)ACe[UY]&&TCe(hr[UY]&&hr[UY].prototype);TCe(Z8t);var MCe={}.propertyIsEnumerable,NCe=Object.getOwnPropertyDescriptor,FCe={f:NCe&&!MCe.call({1:2},1)?function(e){var t=NCe(this,e);return!!t&&t.enumerable}:MCe},RD=function(e){return jY(Ky(e))},RCe=Object.getOwnPropertyDescriptor,ICe={f:vd?RCe:function(e,t){if(e=RD(e),t=OY(t),lCe)try{return RCe(e,t)}catch{}if(_u(e,t))return TY(!aa(FCe.f,e,t),e[t])}},c5t=Math.max,d5t=Math.min,WY=function(e,t){var n=VY(e);return n<0?c5t(n+t,0):d5t(n,t)},f5t=function(e){return function(t,n,r){var o,i=RD(t),a=zY(i),l=WY(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}}(!1),BCe=zr([].push),LCe=function(e,t){var n,r=RD(e),o=0,i=[];for(n in r)!_u(NY,n)&&_u(r,n)&&BCe(i,n);for(;t.length>o;)_u(r,n=t[o++])&&(~f5t(i,n)||BCe(i,n));return i},ID=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],p5t=ID.concat("length","prototype"),h5t={f:Object.getOwnPropertyNames||function(e){return LCe(e,p5t)}},PCe={f:Object.getOwnPropertySymbols},v5t=zr([].concat),m5t=FA("Reflect","ownKeys")||function(e){var t=h5t.f(ac(e)),n=PCe.f;return n?v5t(t,n(e)):t},g5t=function(e,t){for(var n=m5t(t),r=MD.f,o=ICe.f,i=0;i<n.length;i++){var a=n[i];_u(e,a)||r(e,a,o(t,a))}},y5t=/#|\.prototype\./,jA=function(e,t){var n=A5t[b5t(e)];return n==x5t||n!=w5t&&(cl(t)?ia(t):!!t)},b5t=jA.normalize=function(e){return String(e).replace(y5t,".").toLowerCase()},A5t=jA.data={},w5t=jA.NATIVE="N",x5t=jA.POLYFILL="P",_5t=jA,E5t=ICe.f,BD=function(e,t){var n,r,o,i,a,l=e.target,s=e.global,u=e.stat;if(n=s?hr:u?hr[l]||gY(l,{}):(hr[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=E5t(n,r))&&a.value:n[r],!_5t(s?r:l+(u?".":"#")+r,e.forced)&&o!==void 0){if(typeof i==typeof o)continue;g5t(i,o)}(e.sham||o&&o.sham)&&Yy(i,"sham",!0),LA(n,r,i,e)}},LD=Object.keys||function(e){return LCe(e,ID)},Qy=Object.assign,jCe=Object.defineProperty,C5t=zr([].concat),VCe=!Qy||ia(function(){if(vd&&Qy({b:1},Qy(jCe({},"a",{enumerable:!0,get:function(){jCe(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(o){t[o]=o}),Qy({},e)[n]!=7||LD(Qy({},t)).join("")!=r})?function(e,t){for(var n=wY(e),r=arguments.length,o=1,i=PCe.f,a=FCe.f;r>o;)for(var l,s=jY(arguments[o++]),u=i?C5t(LD(s),i(s)):LD(s),c=u.length,d=0;c>d;)l=u[d++],vd&&!aa(a,s,l)||(n[l]=s[l]);return n}:Qy;BD({target:"Object",stat:!0,forced:Object.assign!==VCe},{assign:VCe});var zCe=mY(function(e){var t=function(n){var r=/\blang(?:uage)?-([\w-]+)\b/i,o=0,i={},a={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function g(b){return b instanceof l?new l(b.type,g(b.content),b.alias):Array.isArray(b)?b.map(g):b.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(g){return Object.prototype.toString.call(g).slice(8,-1)},objId:function(g){return g.__id||Object.defineProperty(g,"__id",{value:++o}),g.__id},clone:function g(b,y){var w,x;switch(y=y||{},a.util.type(b)){case"Object":if(x=a.util.objId(b),y[x])return y[x];for(var _ in w={},y[x]=w,b)b.hasOwnProperty(_)&&(w[_]=g(b[_],y));return w;case"Array":return x=a.util.objId(b),y[x]?y[x]:(w=[],y[x]=w,b.forEach(function(E,C){w[C]=g(E,y)}),w);default:return b}},getLanguage:function(g){for(;g&&!r.test(g.className);)g=g.parentElement;return g?(g.className.match(r)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(w){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(g){var b=document.getElementsByTagName("script");for(var y in b)if(b[y].src==g)return b[y]}return null}},isActive:function(g,b,y){for(var w="no-"+b;g;){var x=g.classList;if(x.contains(b))return!0;if(x.contains(w))return!1;g=g.parentElement}return!!y}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(g,b){var y=a.util.clone(a.languages[g]);for(var w in b)y[w]=b[w];return y},insertBefore:function(g,b,y,w){var x=(w=w||a.languages)[g],_={};for(var E in x)if(x.hasOwnProperty(E)){if(E==b)for(var C in y)y.hasOwnProperty(C)&&(_[C]=y[C]);y.hasOwnProperty(E)||(_[E]=x[E])}var T=w[g];return w[g]=_,a.languages.DFS(a.languages,function(k,I){I===T&&k!=g&&(this[k]=_)}),_},DFS:function g(b,y,w,x){x=x||{};var _=a.util.objId;for(var E in b)if(b.hasOwnProperty(E)){y.call(b,E,b[E],w||E);var C=b[E],T=a.util.type(C);T!=="Object"||x[_(C)]?T!=="Array"||x[_(C)]||(x[_(C)]=!0,g(C,y,E,x)):(x[_(C)]=!0,g(C,y,null,x))}}},plugins:{},highlightAll:function(g,b){a.highlightAllUnder(document,g,b)},highlightAllUnder:function(g,b,y){var w={callback:y,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),a.hooks.run("before-all-elements-highlight",w);for(var x,_=0;x=w.elements[_++];)a.highlightElement(x,b===!0,w.callback)},highlightElement:function(g,b,y){var w=a.util.getLanguage(g),x=a.languages[w];g.className=g.className.replace(r,"").replace(/\s+/g," ")+" language-"+w;var _=g.parentElement;_&&_.nodeName.toLowerCase()==="pre"&&(_.className=_.className.replace(r,"").replace(/\s+/g," ")+" language-"+w);var E={element:g,language:w,grammar:x,code:g.textContent};function C(k){E.highlightedCode=k,a.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,a.hooks.run("after-highlight",E),a.hooks.run("complete",E),y&&y.call(E.element)}if(a.hooks.run("before-sanity-check",E),(_=E.element.parentElement)&&_.nodeName.toLowerCase()==="pre"&&!_.hasAttribute("tabindex")&&_.setAttribute("tabindex","0"),!E.code)return a.hooks.run("complete",E),void(y&&y.call(E.element));if(a.hooks.run("before-highlight",E),E.grammar)if(b&&n.Worker){var T=new Worker(a.filename);T.onmessage=function(k){C(k.data)},T.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else C(a.highlight(E.code,E.grammar,E.language));else C(a.util.encode(E.code))},highlight:function(g,b,y){var w={code:g,grammar:b,language:y};return a.hooks.run("before-tokenize",w),w.tokens=a.tokenize(w.code,w.grammar),a.hooks.run("after-tokenize",w),l.stringify(a.util.encode(w.tokens),w.language)},tokenize:function(g,b){var y=b.rest;if(y){for(var w in y)b[w]=y[w];delete b.rest}var x=new c;return d(x,x.head,g),u(g,x,b,x.head,0),function(_){for(var E=[],C=_.head.next;C!==_.tail;)E.push(C.value),C=C.next;return E}(x)},hooks:{all:{},add:function(g,b){var y=a.hooks.all;y[g]=y[g]||[],y[g].push(b)},run:function(g,b){var y=a.hooks.all[g];if(y&&y.length)for(var w,x=0;w=y[x++];)w(b)}},Token:l};function l(g,b,y,w){this.type=g,this.content=b,this.alias=y,this.length=0|(w||"").length}function s(g,b,y,w){g.lastIndex=b;var x=g.exec(y);if(x&&w&&x[1]){var _=x[1].length;x.index+=_,x[0]=x[0].slice(_)}return x}function u(g,b,y,w,x,_){for(var E in y)if(y.hasOwnProperty(E)&&y[E]){var C=y[E];C=Array.isArray(C)?C:[C];for(var T=0;T<C.length;++T){if(_&&_.cause==E+","+T)return;var k=C[T],I=k.inside,O=!!k.lookbehind,F=!!k.greedy,N=k.alias;if(F&&!k.pattern.global){var B=k.pattern.toString().match(/[imsuy]*$/)[0];k.pattern=RegExp(k.pattern.source,B+"g")}for(var L=k.pattern||k,V=w.next,P=x;V!==b.tail&&!(_&&P>=_.reach);P+=V.value.length,V=V.next){var H=V.value;if(b.length>g.length)return;if(!(H instanceof l)){var U,G=1;if(F){if(!(U=s(L,P,g,O)))break;var z=U.index,$=U.index+U[0].length,W=P;for(W+=V.value.length;z>=W;)W+=(V=V.next).value.length;if(P=W-=V.value.length,V.value instanceof l)continue;for(var K=V;K!==b.tail&&(W<$||typeof K.value=="string");K=K.next)G++,W+=K.value.length;G--,H=g.slice(P,W),U.index-=P}else if(!(U=s(L,0,H,O)))continue;z=U.index;var X=U[0],te=H.slice(0,z),ne=H.slice(z+X.length),se=P+H.length;_&&se>_.reach&&(_.reach=se);var le=V.prev;if(te&&(le=d(b,le,te),P+=te.length),f(b,le,G),V=d(b,le,new l(E,I?a.tokenize(X,I):X,N,X)),ne&&d(b,V,ne),G>1){var J={cause:E+","+T,reach:se};u(g,b,y,V.prev,P,J),_&&J.reach>_.reach&&(_.reach=J.reach)}}}}}}function c(){var g={value:null,prev:null,next:null},b={value:null,prev:g,next:null};g.next=b,this.head=g,this.tail=b,this.length=0}function d(g,b,y){var w=b.next,x={value:y,prev:b,next:w};return b.next=x,w.prev=x,g.length++,x}function f(g,b,y){for(var w=b.next,x=0;x<y&&w!==g.tail;x++)w=w.next;b.next=w,w.prev=b,g.length-=x}if(n.Prism=a,l.stringify=function g(b,y){if(typeof b=="string")return b;if(Array.isArray(b)){var w="";return b.forEach(function(T){w+=g(T,y)}),w}var x={type:b.type,content:g(b.content,y),tag:"span",classes:["token",b.type],attributes:{},language:y},_=b.alias;_&&(Array.isArray(_)?Array.prototype.push.apply(x.classes,_):x.classes.push(_)),a.hooks.run("wrap",x);var E="";for(var C in x.attributes)E+=" "+C+'="'+(x.attributes[C]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+E+">"+x.content+"</"+x.tag+">"},!n.document)return n.addEventListener&&(a.disableWorkerMessageHandler||n.addEventListener("message",function(g){var b=JSON.parse(g.data),y=b.language,w=b.code,x=b.immediateClose;n.postMessage(a.highlight(w,a.languages[y],y)),x&&n.close()},!1)),a;var p=a.util.currentScript();function m(){a.manual||a.highlightAll()}if(p&&(a.filename=p.src,p.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var v=document.readyState;v==="loading"||v==="interactive"&&p&&p.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return a}(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),DD!==void 0&&(DD.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[r]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var a={};a[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(n,r){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:t.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(n){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var o=n.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(t!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",o='pre[data-src]:not([data-src-status="loaded"]):not([data-src-status="loading"])',i=/\blang(?:uage)?-([\w-]+)\b/i;t.hooks.add("before-highlightall",function(s){s.selector+=", "+o}),t.hooks.add("before-sanity-check",function(s){var u=s.element;if(u.matches(o)){s.code="",u.setAttribute(r,"loading");var c=u.appendChild(document.createElement("CODE"));c.textContent="Loading\u2026";var d=u.getAttribute("data-src"),f=s.language;if(f==="none"){var p=(/\.(\w+)$/.exec(d)||[,"none"])[1];f=n[p]||p}l(c,f),l(u,f);var m=t.plugins.autoloader;m&&m.loadLanguages(f);var v=new XMLHttpRequest;v.open("GET",d,!0),v.onreadystatechange=function(){v.readyState==4&&(v.status<400&&v.responseText?(u.setAttribute(r,"loaded"),c.textContent=v.responseText,t.highlightElement(c)):(u.setAttribute(r,"failed"),v.status>=400?c.textContent="\u2716 Error "+v.status+" while fetching file: "+v.statusText:c.textContent="\u2716 Error: File does not exist or is empty"))},v.send(null)}}),t.plugins.fileHighlight={highlight:function(s){for(var u,c=(s||document).querySelectorAll(o),d=0;u=c[d++];)t.highlightElement(u)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}function l(s,u){var c=s.className;c=c.replace(i," ")+" language-"+u,s.className=c.replace(/\s+/g," ").trim()}}()});(function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(s,u){return s=s.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return o}),RegExp(s,u)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var a=function(s){return s?typeof s=="string"?s:typeof s.content=="string"?s.content:s.content.map(a).join(""):""},l=function(s){for(var u=[],c=0;c<s.length;c++){var d=s[c],f=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?u.length>0&&u[u.length-1].tagName===a(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content==="/>"||u.push({tagName:a(d.content[0].content[1]),openedBraces:0}):u.length>0&&d.type==="punctuation"&&d.content==="{"?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:f=!0),(f||typeof d=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var p=a(d);c<s.length-1&&(typeof s[c+1]=="string"||s[c+1].type==="plain-text")&&(p+=a(s[c+1]),s.splice(c+1,1)),c>0&&(typeof s[c-1]=="string"||s[c-1].type==="plain-text")&&(p=a(s[c-1])+p,s.splice(c-1,1),c--),s[c]=new e.Token("plain-text",p,null,p)}d.content&&typeof d.content!="string"&&l(d.content)}};e.hooks.add("after-tokenize",function(s){s.language!=="jsx"&&s.language!=="tsx"||l(s.tokens)})})(Prism),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,number:/(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/}),delete Prism.languages.go["class-name"],function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(s){/<\?/.test(s.code)&&e.languages["markup-templating"].buildPlaceholders(s,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}),e.hooks.add("after-tokenize",function(s){e.languages["markup-templating"].tokenizePlaceholders(s,"php")})}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:module|import)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism),function(e){function t($,W){return $.replace(/<<(\d+)>>/g,function(K,X){return"(?:"+W[+X]+")"})}function n($,W,K){return RegExp(t($,W),"")}function r($,W){for(var K=0;K<W;K++)$=$.replace(/<<self>>/g,function(){return"(?:"+$+")"});return $.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",l="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function s($){return"\\b(?:"+$.trim().replace(/ /g,"|")+")\\b"}var u=s(i),c=RegExp(s(o+" "+i+" "+a+" "+l)),d=s(i+" "+a+" "+l),f=s(o+" "+i+" "+l),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),m=r(/\((?:[^()]|<<self>>)*\)/.source,2),v=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[v,p]),b=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,g]),y=/\[\s*(?:,\s*)*\]/.source,w=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[b,y]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,m,y]),_=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),E=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[_,b,y]),C={keyword:c,punctuation:/[<>()?,.:[\]]/},T=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,k=/"(?:\\.|[^\\"\r\n])*"/.source,I=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[I]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[k]),lookbehind:!0,greedy:!0},{pattern:RegExp(T),greedy:!0,alias:"character"}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[b]),lookbehind:!0,inside:C},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[v,E]),lookbehind:!0,inside:C},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[v]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[u,g]),lookbehind:!0,inside:C},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[b]),lookbehind:!0,inside:C},{pattern:n(/(\bwhere\s+)<<0>>/.source,[v]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[w]),lookbehind:!0,inside:C},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[E,f,v]),inside:C}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[v]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[v]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|typeof|sizeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:C},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[E,b]),inside:C,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[E]),lookbehind:!0,inside:C,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[v,p]),inside:{function:n(/^<<0>>/.source,[v]),generic:{pattern:RegExp(p),alias:"class-name",inside:C}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[u,g,v,E,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,m]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(E),greedy:!0,inside:C},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=k+"|"+T,F=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[F]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,L=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[b,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,L]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(b),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var V=/:[^}\r\n]+/.source,P=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[F]),2),H=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,V]),U=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),G=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[U,V]);function z($,W){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[$]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[W,V]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[H]),lookbehind:!0,greedy:!0,inside:z(H,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[G]),lookbehind:!0,greedy:!0,inside:z(G,U)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp,Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?)[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Until|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp(/%r/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp(/%[qQiIwWxs]?/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"),greedy:!0,inside:{interpolation:t}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?/}},interpolation:t}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?'|'$/}}}}],e.languages.rb=e.languages.ruby}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:true|false)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:true|false)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(c){u!==c&&(e.languages.markdown[u].inside.content.inside[c]=e.languages.markdown[c])})}),e.hooks.add("after-tokenize",function(u){u.language!=="markdown"&&u.language!=="md"||function c(d){if(d&&typeof d!="string")for(var f=0,p=d.length;f<p;f++){var m=d[f];if(m.type==="code"){var v=m.content[1],g=m.content[3];if(v&&g&&v.type==="code-language"&&g.type==="code-block"&&typeof v.content=="string"){var b=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),y="language-"+(b=(/[a-z][\w-]*/i.exec(b)||[""])[0].toLowerCase());g.alias?typeof g.alias=="string"?g.alias=[g.alias,y]:g.alias.push(y):g.alias=[y]}}else c(m.content)}}(u.tokens)}),e.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var c="",d=0,f=u.classes.length;d<f;d++){var p=u.classes[d],m=/language-(.+)/.exec(p);if(m){c=m[1];break}}var v=e.languages[c];if(v)u.content=e.highlight(function(b){return b.replace(a,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(y,w){var x;return(w=w.toLowerCase())[0]==="#"?(x=w[1]==="x"?parseInt(w.slice(2),16):Number(w.slice(1)),s(x)):l[w]||y})}(u.content),v,c);else if(c&&c!=="none"&&e.plugins.autoloader){var g="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random());u.attributes.id=g,e.plugins.autoloader.loadLanguages(c,function(){var b=document.getElementById(g);b&&(b.innerHTML=e.highlight(b.textContent,e.languages[c],c))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:/\b(?:as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if(e.language==="groovy"&&e.type==="string"){var t=e.content[0];if(t!="'"){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;t==="$"&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push(t==="/"?"regex":"gstring")}}});var S5t=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function HCe(e){return typeof e=="string"?e.length:typeof e.content=="string"?e.content.length:e.content.reduce(function(t,n){return t+HCe(n)},0)}var PD,k5t=hr.String,xf=function(e){if(BY(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return k5t(e)},$Ce=function(){var e=ac(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},GY=hr.RegExp,qY=ia(function(){var e=GY("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),D5t=qY||ia(function(){return!GY("a","y").sticky}),UCe={BROKEN_CARET:qY||ia(function(){var e=GY("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:D5t,UNSUPPORTED_Y:qY},O5t=vd?Object.defineProperties:function(e,t){ac(e);for(var n,r=RD(t),o=LD(t),i=o.length,a=0;i>a;)MD.f(e,n=o[a++],r[n]);return e},T5t=FA("document","documentElement"),WCe=vCe("IE_PROTO"),KY=function(){},GCe=function(e){return"<script>"+e+"<\/script>"},qCe=function(e){e.write(GCe("")),e.close();var t=e.parentWindow.Object;return e=null,t},jD=function(){try{PD=new ActiveXObject("htmlfile")}catch{}var e,t;jD=typeof document<"u"?document.domain&&PD?qCe(PD):((t=kY("iframe")).style.display="none",T5t.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(GCe("document.F=Object")),e.close(),e.F):qCe(PD);for(var n=ID.length;n--;)delete jD.prototype[ID[n]];return jD()};NY[WCe]=!0;var KCe,YY,M5t=Object.create||function(e,t){var n;return e!==null?(KY.prototype=ac(e),n=new KY,KY.prototype=null,n[WCe]=e):n=jD(),t===void 0?n:O5t(n,t)},N5t=hr.RegExp,F5t=ia(function(){var e=N5t(".","s");return!(e.dotAll&&e.exec(` |
|
1064 |
`)&&e.flags==="s")}),R5t=hr.RegExp,I5t=ia(function(){var e=R5t("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),B5t=RY.get,L5t=yY("native-string-replace",String.prototype.replace),VD=RegExp.prototype.exec,XY=VD,P5t=zr("".charAt),j5t=zr("".indexOf),V5t=zr("".replace),QY=zr("".slice),JY=(YY=/b*/g,aa(VD,KCe=/a/,"a"),aa(VD,YY,"a"),KCe.lastIndex!==0||YY.lastIndex!==0),YCe=UCe.BROKEN_CARET,ZY=/()??/.exec("")[1]!==void 0;(JY||ZY||YCe||F5t||I5t)&&(XY=function(e){var t,n,r,o,i,a,l,s=this,u=B5t(s),c=xf(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=aa(XY,d,c),s.lastIndex=d.lastIndex,t;var f=u.groups,p=YCe&&s.sticky,m=aa($Ce,s),v=s.source,g=0,b=c;if(p&&(m=V5t(m,"y",""),j5t(m,"g")===-1&&(m+="g"),b=QY(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&P5t(c,s.lastIndex-1)!==` |
|
1065 |
`)&&(v="(?: "+v+")",b=" "+b,g++),n=new RegExp("^(?:"+v+")",m)),ZY&&(n=new RegExp("^"+v+"$(?!\\s)",m)),JY&&(r=s.lastIndex),o=aa(VD,p?n:s,b),p?o?(o.input=QY(o.input,g),o[0]=QY(o[0],g),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:JY&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),ZY&&o&&o.length>1&&aa(L5t,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&f)for(o.groups=a=M5t(null),i=0;i<f.length;i++)a[(l=f[i])[0]]=o[l[1]];return o});var VA=XY;BD({target:"RegExp",proto:!0,forced:/./.exec!==VA},{exec:VA});var eX=Function.prototype,XCe=eX.apply,z5t=eX.bind,QCe=eX.call,H5t=typeof Reflect=="object"&&Reflect.apply||(z5t?QCe.bind(XCe):function(){return QCe.apply(XCe,arguments)}),$5t=Yh("species"),tX=RegExp.prototype,U5t=Yh("match"),W5t=hr.TypeError,G5t=Yh("species"),q5t=zr("".charAt),JCe=zr("".charCodeAt),K5t=zr("".slice),Y5t=function(e){return function(t,n){var r,o,i=xf(Ky(t)),a=VY(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=JCe(i,a))<55296||r>56319||a+1===l||(o=JCe(i,a+1))<56320||o>57343?e?q5t(i,a):r:e?K5t(i,a,a+2):o-56320+(r-55296<<10)+65536}}(!0),X5t=function(e,t,n){return t+(n?Y5t(e,t).length:1)},Q5t=hr.Array,J5t=Math.max,ZCe=function(e,t,n){for(var r,o,i,a,l=zY(e),s=WY(t,l),u=WY(n===void 0?l:n,l),c=Q5t(J5t(u-s,0)),d=0;s<u;s++,d++)r=c,o=d,i=e[s],(a=OY(o))in r?MD.f(r,a,TY(0,i)):r[a]=i;return c.length=d,c},Z5t=hr.TypeError,eSe=function(e,t){var n=e.exec;if(cl(n)){var r=aa(n,e,t);return r!==null&&ac(r),r}if(Xh(e)==="RegExp")return aa(VA,e,t);throw Z5t("RegExp#exec called on incompatible receiver")},Jy=UCe.UNSUPPORTED_Y,eAt=Math.min,tSe=[].push,tAt=zr(/./.exec),Zy=zr(tSe),zA=zr("".slice);(function(e,t,n,r){var o=Yh(e),i=!ia(function(){var u={};return u[o]=function(){return 7},""[e](u)!=7}),a=i&&!ia(function(){var u=!1,c=/a/;return(c={}).constructor={},c.constructor[$5t]=function(){return c},c.flags="",c[o]=/./[o],c.exec=function(){return u=!0,null},c[o](""),!u});if(!i||!a||n){var l=zr(/./[o]),s=function(u,c,d){var f;return f="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(p,m){var v,g,b=xf(Ky(this)),y=m===void 0?4294967295:m>>>0;if(y===0)return[];if(p===void 0)return[b];if(!md(v=p)||!((g=v[U5t])!==void 0?g:Xh(v)=="RegExp"))return aa(c,b,p,y);for(var w,x,_,E=[],C=(p.ignoreCase?"i":"")+(p.multiline?"m":"")+(p.unicode?"u":"")+(p.sticky?"y":""),T=0,k=new RegExp(p.source,C+"g");(w=aa(VA,k,b))&&!((x=k.lastIndex)>T&&(Zy(E,zA(b,T,w.index)),w.length>1&&w.index<b.length&&H5t(tSe,E,ZCe(w,1)),_=w[0].length,T=x,E.length>=y));)k.lastIndex===w.index&&k.lastIndex++;return T===b.length?!_&&tAt(k,"")||Zy(E,""):Zy(E,zA(b,T)),E.length>y?ZCe(E,0,y):E}:"0".split(void 0,0).length?function(p,m){return p===void 0&&m===0?[]:aa(c,this,p,m)}:c,[function(p,m){var v=Ky(this),g=p==null?void 0:dCe(p,u);return g?aa(g,p,v,m):aa(f,xf(v),p,m)},function(p,m){var v=ac(this),g=xf(p),b=d(f,v,g,m,f!==c);if(b.done)return b.value;var y=function(N,B){var L,V=ac(N).constructor;return V===void 0||(L=ac(V)[G5t])==null?B:function(P){if(kCe(P))return P;throw W5t(uCe(P)+" is not a constructor")}(L)}(v,RegExp),w=v.unicode,x=(v.ignoreCase?"i":"")+(v.multiline?"m":"")+(v.unicode?"u":"")+(Jy?"g":"y"),_=new y(Jy?"^(?:"+v.source+")":v,x),E=m===void 0?4294967295:m>>>0;if(E===0)return[];if(g.length===0)return eSe(_,g)===null?[g]:[];for(var C=0,T=0,k=[];T<g.length;){_.lastIndex=Jy?0:T;var I,O=eSe(_,Jy?zA(g,T):g);if(O===null||(I=eAt(_Ce(_.lastIndex+(Jy?T:0)),g.length))===C)T=X5t(g,T,w);else{if(Zy(k,zA(g,C,T)),k.length===E)return k;for(var F=1;F<=O.length-1;F++)if(Zy(k,O[F]),k.length===E)return k;T=C=I}}return Zy(k,zA(g,C)),k}]}(o,""[e],function(u,c,d,f,p){var m=zr(u),v=c.exec;return v===VA||v===tX.exec?i&&!p?{done:!0,value:l(c,d,f)}:{done:!0,value:m(d,c,f)}:{done:!1}});LA(String.prototype,e,s[0]),LA(tX,o,s[1])}r&&Yy(tX[o],"sham",!0)})("split",0,!!ia(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),Jy),BD({global:!0},{globalThis:hr}),iu&&(Le.fn.attr=iu);var nAt=yCe.PROPER,nX=RegExp.prototype,nSe=nX.toString,rAt=zr($Ce),oAt=ia(function(){return nSe.call({source:"a",flags:"b"})!="/a/b"}),iAt=nAt&&nSe.name!="toString";(oAt||iAt)&&LA(RegExp.prototype,"toString",function(){var e=ac(this),t=xf(e.source),n=e.flags;return"/"+t+"/"+xf(n===void 0&&sCe(nX,e)&&!("flags"in nX)?rAt(e):n)},{unsafe:!0});var aAt=function(){function e(){this.title=jt("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115}return e.prototype.getOptions=function(t){var n=[],r=t.getMenuConfig("codeSelectLang").codeLangs,o=r===void 0?[]:r;n.push({text:"plain text",value:""}),o.forEach(function(a){var l=a.text,s=a.value;n.push({text:l,value:s})});var i=this.getValue(t);return n.forEach(function(a){a.value===i?a.selected=!0:delete a.selected}),n},e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){var n=this.getSelectCodeElem(t);if(n==null||!sn.isElement(n))return"";var r=n.language.toString(),o=t.getMenuConfig("codeSelectLang").codeLangs;return(o===void 0?[]:o).some(function(i){return i.value===r})?r:""},e.prototype.isDisabled=function(t){return t.selection==null||!this.getSelectCodeElem(t)},e.prototype.exec=function(t,n){if(this.getSelectCodeElem(t)!=null){var r={language:n.toString()};et.setNodes(t,r,{match:function(o){return Re.checkNodeType(o,"code")}})}},e.prototype.getSelectCodeElem=function(t){var n=Re.getSelectedNodeByType(t,"code");if(n==null)return null;var r=Re.getParentNode(t,n);return sn.isElement(r)?r.type!=="pre"?null:n:null},e}(),lAt={renderStyle:function(e,t){var n=e,r=t,o="";return S5t.forEach(function(i){n[i]&&(o=i)}),o&&function(i,a){i.data==null&&(i.data={});var l=i.data;l.props==null&&(l.props={}),Object.assign(l.props,{className:a})}(r,o="token "+o),r},parseStyleHtml:function(e,t,n){var r=Le(e);if(!sn.isElement(t)||Re.getNodeType(t)!=="code")return t;var o=t,i=r.attr("class")||"";return i.indexOf("language-")===0?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[{key:"codeSelectLang",factory:function(){return new aAt},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"}]}}],elemsToHtml:[{type:"code",elemToHtml:function(e,t){var n=e.language,r=n===void 0?"":n;return"<code "+(r?'class="language-'+r+'"':"")+">"+t+"</code>"}}]},sAt=/"/g,uAt=zr("".replace);BD({target:"String",proto:!0,forced:ia(function(){var e="".anchor('"');return e!==e.toLowerCase()||e.split('"').length>3})},{anchor:function(e){return t=e,n=xf(Ky(this)),r="<a",(r+=' name="'+uAt(xf(t),sAt,""")+'"')+">"+n+"</a>";var t,n,r}});var rSe=function(e){var t,n,r,o=function(b,y){var w=typeof Symbol=="function"&&b[Symbol.iterator];if(!w)return b;var x,_,E=w.call(b),C=[];try{for(;(y===void 0||y-- >0)&&!(x=E.next()).done;)C.push(x.value)}catch(T){_={error:T}}finally{try{x&&!x.done&&(w=E.return)&&w.call(E)}finally{if(_)throw _.error}}return C}(e,2),i=o[0],a=o[1],l=[],s=function(b){if(!Qt.isText(b))return null;var y=Re.getParentNode(null,b);if(y&&Re.getNodeType(y)==="code"){var w=Re.getParentNode(null,y);if(w&&Re.getNodeType(w)==="pre")return y}return null}(i);if(s==null)return l;var u=s.language,c=u===void 0?"":u;if(!c)return l;var d=function(b,y){if(!y)return[];var w=zCe.languages[y];return w?zCe.tokenize(b.text,w):[]}(i,c),f=0;try{for(var p=function(b){var y=typeof Symbol=="function"&&Symbol.iterator,w=y&&b[y],x=0;if(w)return w.call(b);if(b&&typeof b.length=="number")return{next:function(){return b&&x>=b.length&&(b=void 0),{value:b&&b[x++],done:!b}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),m=p.next();!m.done;m=p.next()){var v=m.value,g=f+HCe(v);typeof v!="string"&&l.push(((r={})[v.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:g},r)),f=g}}catch(b){t={error:b}}finally{try{m&&!m.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return l},Io=function(){return Io=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Io.apply(this,arguments)},la=function(){function e(){throw new Error(`\u4E0D\u80FD\u5B9E\u4F8B\u5316 |
|
1066 |
Can not construct a instance`)}return e.setEditorConfig=function(t){t===void 0&&(t={}),this.editorConfig=Io(Io({},this.editorConfig),t)},e.setSimpleEditorConfig=function(t){t===void 0&&(t={}),this.simpleEditorConfig=Io(Io({},this.simpleEditorConfig),t)},e.setToolbarConfig=function(t){t===void 0&&(t={}),this.toolbarConfig=Io(Io({},this.toolbarConfig),t)},e.setSimpleToolbarConfig=function(t){t===void 0&&(t={}),this.simpleToolbarConfig=Io(Io({},this.simpleToolbarConfig),t)},e.registerPlugin=function(t){this.plugins.push(t)},e.registerMenu=function(t,n){(function(r,o){var i=r.key,a=r.factory,l=r.config,s=cu(cu({},l),o||{});if(v8[i]!=null)throw new Error("Duplicated key '"+i+"' in menu items");v8[i]=a,function(u,c){c!=null&&(Lbe[u]=c)}(i,s)})(t,n)},e.registerRenderElem=function(t){(function(n){var r=n.type,o=n.renderElem;H4e[r||""]=o})(t)},e.registerRenderStyle=function(t){(function(n){CH.push(n)})(t)},e.registerElemToHtml=function(t){(function(n){var r=n.type,o=n.elemToHtml;jbe[r||""]=o})(t)},e.registerStyleToHtml=function(t){(function(n){Wz.push(n)})(t)},e.registerPreParseHtml=function(t){(function(n){b4e.push(n)})(t)},e.registerParseElemHtml=function(t){(function(n){var r=n.selector,o=n.parseElemHtml;LC[r]=o})(t)},e.registerParseStyleHtml=function(t){(function(n){dH.push(n)})(t)},e.registerModule=function(t){nm(t)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function nm(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,l=e.parseElemsHtml,s=e.parseStyleHtml,u=e.editorPlugin;t&&t.forEach(function(c){return la.registerMenu(c)}),n&&n.forEach(function(c){return la.registerRenderElem(c)}),r&&la.registerRenderStyle(r),o&&o.forEach(function(c){return la.registerElemToHtml(c)}),i&&la.registerStyleToHtml(i),a&&a.forEach(function(c){return la.registerPreParseHtml(c)}),l&&l.forEach(function(c){return la.registerParseElemHtml(c)}),s&&la.registerParseStyleHtml(s),u&&la.registerPlugin(u)}O0t.forEach(function(e){return nm(e)}),nm(rmt),nm(S2t),nm(Fbt),nm(w8t),nm(lAt);var oSe='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',iSe={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize"]}},cAt={hoverbarKeys:Io(Io({},iSe),{text:{menuKeys:["headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};la.setEditorConfig(Io(Io({},cAt),{decorate:rSe}));var dAt={hoverbarKeys:iSe};la.setSimpleEditorConfig(Io(Io({},dAt),{decorate:rSe}));var fAt={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:jt("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:jt("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:jt("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:jt("editor.image"),iconSvg:oSe,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:jt("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen"]};la.setToolbarConfig(fAt);var pAt={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:jt("editor.image"),iconSvg:oSe,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};la.setSimpleToolbarConfig(pAt);var hAt=Object.defineProperty,vAt=Object.defineProperties,mAt=Object.getOwnPropertyDescriptors,aSe=Object.getOwnPropertySymbols,gAt=Object.prototype.hasOwnProperty,yAt=Object.prototype.propertyIsEnumerable,lSe=(e,t,n)=>t in e?hAt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bAt=(e,t)=>{for(var n in t||(t={}))gAt.call(t,n)&&lSe(e,n,t[n]);if(aSe)for(var n of aSe(t))yAt.call(t,n)&&lSe(e,n,t[n]);return e},AAt=(e,t)=>vAt(e,mAt(t));function Jh(e){let t=`\u8BF7\u4F7F\u7528 '@${e}' \u4E8B\u4EF6\uFF0C\u4E0D\u8981\u653E\u5728 props \u4E2D`;return t+=` |
|
1067 |
Please use '@${e}' event instead of props`,t}var sSe=(e,t)=>{for(const[n,r]of t)e[n]=r;return e};const wAt=Te({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(e,t){const n=de(null),r=Qo(null),o=de(""),i=()=>{if(!n.value)return;const a=Zn(e.defaultContent);(function(l){l===void 0&&(l={});var s=l.selector,u=s===void 0?"":s,c=l.content,d=c===void 0?[]:c,f=l.html,p=l.config,m=p===void 0?{}:p,v=l.mode,g=(v===void 0?"default":v)==="simple"?la.simpleEditorConfig:la.editorConfig,b=Io(Io({},g.hoverbarKeys||{}),m.hoverbarKeys||{});rut({selector:u,config:Io(Io(Io({},g),m),{hoverbarKeys:b}),content:d,html:f,plugins:la.plugins})})({selector:n.value,mode:e.mode,content:a||[],html:e.defaultHtml||e.modelValue||"",config:AAt(bAt({},e.defaultConfig),{onCreated(l){if(r.value=l,t.emit("onCreated",l),e.defaultConfig.onCreated){const s=Jh("onCreated");throw new Error(s)}},onChange(l){const s=l.getHtml();if(o.value=s,t.emit("update:modelValue",s),t.emit("onChange",l),e.defaultConfig.onChange){const u=Jh("onChange");throw new Error(u)}},onDestroyed(l){if(t.emit("onDestroyed",l),e.defaultConfig.onDestroyed){const s=Jh("onDestroyed");throw new Error(s)}},onMaxLength(l){if(t.emit("onMaxLength",l),e.defaultConfig.onMaxLength){const s=Jh("onMaxLength");throw new Error(s)}},onFocus(l){if(t.emit("onFocus",l),e.defaultConfig.onFocus){const s=Jh("onFocus");throw new Error(s)}},onBlur(l){if(t.emit("onBlur",l),e.defaultConfig.onBlur){const s=Jh("onBlur");throw new Error(s)}},customAlert(l,s){if(t.emit("customAlert",l,s),e.defaultConfig.customAlert){const u=Jh("customAlert");throw new Error(u)}},customPaste:(l,s)=>{if(e.defaultConfig.customPaste){const c=Jh("customPaste");throw new Error(c)}let u;return t.emit("customPaste",l,s,c=>{u=c}),u}})})};return yn(()=>{i()}),Je(()=>e.modelValue,a=>{a!==o.value&&function(l){const s=r.value;s!=null&&s.setHtml(l)}(a)}),{box:n}}}),xAt={ref:"box",style:{height:"100%"}};var _At=sSe(wAt,[["render",function(e,t,n,r,o,i){return Y(),fe("div",xAt,null,512)}]]);const EAt=Te({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(e){const t=de(null),n=r=>{if(t.value){if(r==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");Re.getToolbar(r)||function(o){var i=o.selector,a=o.editor,l=o.config,s=l===void 0?{}:l,u=o.mode,c=u===void 0?"default":u;if(!i)throw new Error("Cannot find 'selector' when create toolbar");var d=c==="simple"?la.simpleToolbarConfig:la.toolbarConfig,f=function(p,m){if(p==null)throw new Error("Cannot create toolbar, because editor is null");var v=m.selector,g=m.config,b=g===void 0?{}:g;if(function(x,_){return k4e(x,"data-w-e-toolbar",_)}(p,v))throw new Error("Repeated create toolbar by selector '"+v+"'");var y=cu({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},b||{}),w=new sut(v,y);return Mz.set(w,p),DC.set(p,w),w}(a,{selector:i,config:Io(Io({},d),s)})}({editor:r,selector:t.value||"<div></div>",mode:e.mode,config:e.defaultConfig})}};return yl(()=>{const{editor:r}=e;r!=null&&n(r)}),{selector:t}}}),CAt={ref:"selector"};var SAt=sSe(EAt,[["render",function(e,t,n,r,o,i){return Y(),fe("div",CAt,null,512)}]]);let uSe,rX,e3,cSe,oX,dSe;uSe={class:"border-1 border-solid border-[var(--tags-view-border-color)] z-10"},BQ=Te({name:"Editor",__name:"Editor",props:{editorId:Xn.string.def("wangeEditor-1"),height:Xn.oneOfType([Number,String]).def("500px"),editorConfig:{type:Object,default:()=>{}},readonly:Xn.bool.def(!1),modelValue:Xn.string.def("")},emits:["change","update:modelValue"],setup(e,{expose:t,emit:n}){const r=Fw();(function(f){k8.changeLanguage(f)})(M(ee(()=>r.getCurrentLocale)).lang);const o=e,i=n,a=Qo(),l=de("");Je(()=>o.modelValue,f=>{f!==M(l)&&(l.value=f)},{immediate:!0}),Je(()=>l.value,f=>{i("update:modelValue",f)});const s=f=>{a.value=f},u=ee(()=>Object.assign({placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9...",readOnly:o.readonly,customAlert:(f,p)=>{switch(p){case"success":El.success(f);break;case"info":default:El.info(f);break;case"warning":El.warning(f);break;case"error":El.error(f)}},autoFocus:!1,scroll:!0,MENU_CONF:{uploadImage:{server:"http://localhost:48080/admin-api/infra/file/upload",maxFileSize:5242880,maxNumberOfFiles:10,allowedFileTypes:["image/*"],headers:{Accept:"*",Authorization:"Bearer "+Cd(),"tenant-id":_3()},timeout:5e3,fieldName:"file",onBeforeUpload:f=>f,onProgress(f){console.log("progress",f)},onSuccess(f,p){console.log("onSuccess",f,p)},onFailed(f,p){alert(p.message),console.log("onFailed",f,p)},onError(f,p,m){alert(p.message),console.error("onError",f,p,m)},customInsert(f,p){p(f.data,"image",f.data)}},uploadVideo:{server:"http://localhost:48080/admin-api/infra/file/upload",maxFileSize:10485760,maxNumberOfFiles:10,allowedFileTypes:["video/*"],headers:{Accept:"*",Authorization:"Bearer "+Cd(),"tenant-id":_3()},timeout:15e3,fieldName:"file",onBeforeUpload:f=>f,onProgress(f){console.log("progress",f)},onSuccess(f,p){console.log("onSuccess",f,p)},onFailed(f,p){alert(p.message),console.log("onFailed",f,p)},onError(f,p,m){alert(p.message),console.error("onError",f,p,m)},customInsert(f,p){p(f.data,"mp4",f.data)}}},uploadImgShowBase64:!0},o.editorConfig||{})),c=ee(()=>({height:EQ(o.height)?`${o.height}px`:o.height})),d=f=>{i("change",f)};return xo(()=>{const f=M(a.value);f==null||f.destroy()}),t({getEditorRef:async()=>(await St(),M(a.value))}),(f,p)=>(Y(),fe("div",uSe,[ie(M(SAt),{editor:M(a),editorId:e.editorId,class:"border-0 b-b-1 border-solid border-[var(--tags-view-border-color)]"},null,8,["editor","editorId"]),ie(M(_At),{modelValue:M(l),"onUpdate:modelValue":p[0]||(p[0]=m=>Jn(l)?l.value=m:null),defaultConfig:M(u),editorId:e.editorId,style:$t(M(c)),onOnChange:d,onOnCreated:s},null,8,["modelValue","defaultConfig","editorId","style"])]))}}),rX=()=>No.get({url:"/system/dict-data/simple-list"}),PDe=e=>No.get({url:"/system/dict-data/page",params:e}),_Oe=e=>No.get({url:"/system/dict-data/get?id="+e}),EOe=e=>No.post({url:"/system/dict-data/create",data:e}),LOe=e=>No.put({url:"/system/dict-data/update",data:e}),jDe=e=>No.delete({url:"/system/dict-data/delete?id="+e}),VDe=e=>No.download({url:"/system/dict-data/export",params:e}),{wsCache:e3}=ku("sessionStorage"),cSe=ym("dict",{state:()=>({dictMap:new Map,isSetDict:!1}),getters:{getDictMap(){const e=e3.get(Nr.DICT_CACHE);return e&&(this.dictMap=e),this.dictMap},getIsSetDict(){return this.isSetDict}},actions:{async setDictMap(){const e=e3.get(Nr.DICT_CACHE);if(e)this.dictMap=e,this.isSetDict=!0;else{const t=await rX(),n=new Map;t.forEach(r=>{n[r.dictType]||(n[r.dictType]=[]),n[r.dictType].push({value:r.value,label:r.label,colorType:r.colorType,cssClass:r.cssClass})}),this.dictMap=n,this.isSetDict=!0,e3.set(Nr.DICT_CACHE,n,{exp:60})}},getDictByType(e){return this.isSetDict||this.setDictMap(),this.dictMap[e]},async resetDict(){e3.delete(Nr.DICT_CACHE);const e=await rX(),t=new Map;e.forEach(n=>{t[n.dictType]||(t[n.dictType]=[]),t[n.dictType].push({value:n.value,label:n.label,colorType:n.colorType,cssClass:n.cssClass})}),this.dictMap=t,this.isSetDict=!0,e3.set(Nr.DICT_CACHE,t,{exp:60})}}}),oX=()=>cSe(Nf),dSe=oX(),T3=e=>dSe.getDictByType(e)||[],pQ=e=>{const t=T3(e),n=[];return t.forEach(r=>{n.push({...r,value:parseInt(r.value+"")})}),n},KQ=e=>{const t=T3(e),n=[];return t.forEach(r=>{n.push({...r,value:r.value+""})}),n},uQ=e=>{const t=[];return T3(e).forEach(n=>{t.push({...n,value:n.value+""=="true"})}),t},FOe=(e,t)=>{const n=T3(e),r=de("");return n.forEach(o=>{o.value===t+""&&(r.value=o.label)}),r.value},cQ=(e=>(e.USER_TYPE="user_type",e.COMMON_STATUS="common_status",e.TERMINAL="terminal",e.DATE_INTERVAL="date_interval",e.SYSTEM_USER_SEX="system_user_sex",e.SYSTEM_MENU_TYPE="system_menu_type",e.SYSTEM_APP_MENU_TYPE="system_app_menu_type",e.SYSTEM_APP_TYPE="system_app_type",e.SYSTEM_ROLE_TYPE="system_role_type",e.SYSTEM_DATA_SCOPE="system_data_scope",e.SYSTEM_NOTICE_TYPE="system_notice_type",e.SYSTEM_LOGIN_TYPE="system_login_type",e.SYSTEM_LOGIN_RESULT="system_login_result",e.SYSTEM_SMS_CHANNEL_CODE="system_sms_channel_code",e.SYSTEM_SMS_TEMPLATE_TYPE="system_sms_template_type",e.SYSTEM_SMS_SEND_STATUS="system_sms_send_status",e.SYSTEM_SMS_RECEIVE_STATUS="system_sms_receive_status",e.SYSTEM_OAUTH2_GRANT_TYPE="system_oauth2_grant_type",e.SYSTEM_MAIL_SEND_STATUS="system_mail_send_status",e.SYSTEM_NOTIFY_TEMPLATE_TYPE="system_notify_template_type",e.SYSTEM_SOCIAL_TYPE="system_social_type",e.INFRA_BOOLEAN_STRING="infra_boolean_string",e.INFRA_JOB_STATUS="infra_job_status",e.INFRA_JOB_LOG_STATUS="infra_job_log_status",e.INFRA_API_ERROR_LOG_PROCESS_STATUS="infra_api_error_log_process_status",e.INFRA_CONFIG_TYPE="infra_config_type",e.INFRA_CODEGEN_TEMPLATE_TYPE="infra_codegen_template_type",e.INFRA_CODEGEN_FRONT_TYPE="infra_codegen_front_type",e.INFRA_CODEGEN_SCENE="infra_codegen_scene",e.INFRA_FILE_STORAGE="infra_file_storage",e.INFRA_OPERATE_TYPE="infra_operate_type",e.BPM_MODEL_FORM_TYPE="bpm_model_form_type",e.BPM_TASK_CANDIDATE_STRATEGY="bpm_task_candidate_strategy",e.BPM_PROCESS_INSTANCE_STATUS="bpm_process_instance_status",e.BPM_TASK_STATUS="bpm_task_status",e.BPM_OA_LEAVE_TYPE="bpm_oa_leave_type",e.BPM_PROCESS_LISTENER_TYPE="bpm_process_listener_type",e.BPM_PROCESS_LISTENER_VALUE_TYPE="bpm_process_listener_value_type",e.PAY_CHANNEL_CODE="pay_channel_code",e.PAY_ORDER_STATUS="pay_order_status",e.PAY_REFUND_STATUS="pay_refund_status",e.PAY_NOTIFY_STATUS="pay_notify_status",e.PAY_NOTIFY_TYPE="pay_notify_type",e.PAY_TRANSFER_STATUS="pay_transfer_status",e.PAY_TRANSFER_TYPE="pay_transfer_type",e.MP_AUTO_REPLY_REQUEST_MATCH="mp_auto_reply_request_match",e.MP_MESSAGE_TYPE="mp_message_type",e.MEMBER_POINT_BIZ_TYPE="member_point_biz_type",e.MEMBER_EXPERIENCE_BIZ_TYPE="member_experience_biz_type",e.PRODUCT_SPU_STATUS="product_spu_status",e.EXPRESS_CHARGE_MODE="trade_delivery_express_charge_mode",e.TRADE_AFTER_SALE_STATUS="trade_after_sale_status",e.TRADE_AFTER_SALE_WAY="trade_after_sale_way",e.TRADE_AFTER_SALE_TYPE="trade_after_sale_type",e.TRADE_ORDER_TYPE="trade_order_type",e.TRADE_ORDER_STATUS="trade_order_status",e.TRADE_ORDER_ITEM_AFTER_SALE_STATUS="trade_order_item_after_sale_status",e.TRADE_DELIVERY_TYPE="trade_delivery_type",e.BROKERAGE_ENABLED_CONDITION="brokerage_enabled_condition",e.BROKERAGE_BIND_MODE="brokerage_bind_mode",e.BROKERAGE_BANK_NAME="brokerage_bank_name",e.BROKERAGE_WITHDRAW_TYPE="brokerage_withdraw_type",e.BROKERAGE_RECORD_BIZ_TYPE="brokerage_record_biz_type",e.BROKERAGE_RECORD_STATUS="brokerage_record_status",e.BROKERAGE_WITHDRAW_STATUS="brokerage_withdraw_status",e.PROMOTION_DISCOUNT_TYPE="promotion_discount_type",e.PROMOTION_PRODUCT_SCOPE="promotion_product_scope",e.PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE="promotion_coupon_template_validity_type",e.PROMOTION_COUPON_STATUS="promotion_coupon_status",e.PROMOTION_COUPON_TAKE_TYPE="promotion_coupon_take_type",e.PROMOTION_ACTIVITY_STATUS="promotion_activity_status",e.PROMOTION_CONDITION_TYPE="promotion_condition_type",e.PROMOTION_BARGAIN_RECORD_STATUS="promotion_bargain_record_status",e.PROMOTION_COMBINATION_RECORD_STATUS="promotion_combination_record_status",e.PROMOTION_BANNER_POSITION="promotion_banner_position",e.CRM_AUDIT_STATUS="crm_audit_status",e.CRM_BIZ_TYPE="crm_biz_type",e.CRM_BUSINESS_END_STATUS_TYPE="crm_business_end_status_type",e.CRM_RECEIVABLE_RETURN_TYPE="crm_receivable_return_type",e.CRM_CUSTOMER_INDUSTRY="crm_customer_industry",e.CRM_CUSTOMER_LEVEL="crm_customer_level",e.CRM_CUSTOMER_SOURCE="crm_customer_source",e.CRM_PRODUCT_STATUS="crm_product_status",e.CRM_PERMISSION_LEVEL="crm_permission_level",e.CRM_PRODUCT_UNIT="crm_product_unit",e.CRM_FOLLOW_UP_TYPE="crm_follow_up_type",e.ERP_AUDIT_STATUS="erp_audit_status",e.ERP_STOCK_RECORD_BIZ_TYPE="erp_stock_record_biz_type",e.AI_PLATFORM="ai_platform",e.AI_IMAGE_STATUS="ai_image_status",e.AI_MUSIC_STATUS="ai_music_status",e.AI_GENERATE_MODE="ai_generate_mode",e.AI_WRITE_TYPE="ai_write_type",e.AI_WRITE_LENGTH="ai_write_length",e.AI_WRITE_FORMAT="ai_write_format",e.AI_WRITE_TONE="ai_write_tone",e.AI_WRITE_LANGUAGE="ai_write_language",e))(cQ||{});const kAt=Te({name:"DictSelect",__name:"DictSelect",props:{dictType:{},valueType:{default:"str"},selectType:{default:"select"},formCreateInject:{}},setup(e){const t=yc(),n=e,r=ee(()=>{switch(n.valueType){case"str":return KQ(n.dictType);case"int":return pQ(n.dictType);case"bool":return uQ(n.dictType);default:return[]}});return(o,i)=>{const a=wO,l=w3,s=k3,u=Ow,c=bl,d=C3;return Y(),fe(bt,null,[o.selectType==="select"?(Y(),Pe(l,Un({key:0,class:"w-1/1"},M(t)),{default:he(()=>[(Y(!0),fe(bt,null,bn(M(r),(f,p)=>(Y(),Pe(a,{key:p,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},16)):Fe("",!0),o.selectType==="radio"?(Y(),Pe(u,Un({key:1,class:"w-1/1"},M(t)),{default:he(()=>[(Y(!0),fe(bt,null,bn(M(r),(f,p)=>(Y(),Pe(s,{key:p,value:f.value},{default:he(()=>[Dt(Ye(f.label),1)]),_:2},1032,["value"]))),128))]),_:1},16)):Fe("",!0),o.selectType==="checkbox"?(Y(),Pe(d,Un({key:2,class:"w-1/1"},M(t)),{default:he(()=>[(Y(!0),fe(bt,null,bn(M(r),(f,p)=>(Y(),Pe(c,{key:p,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},16)):Fe("",!0)],64)}}}),DAt=[MPe,tVe,NPe,FPe,TPe,vQ,IQ,Bie,sQ,fQ,dQ,lQ,LQ,PQ,jQ,kAt,TL({name:"UserSelect",labelField:"nickname",valueField:"id",url:"/system/user/simple-list"}),TL({name:"DeptSelect",labelField:"name",valueField:"id",url:"/system/dept/simple-list"}),TL({name:"ApiSelect"}),BQ],{t:OAt}=hc(),{t:TAt}=hc(),MAt=e=>{(function(t){t.directive("hasRole",(n,r)=>{const{wsCache:o}=ku(),{value:i}=r,a=o.get(Nr.USER).roles;if(!(i&&i instanceof Array&&i.length>0))throw new Error(OAt("permission.hasRole"));{const l=i;a.some(s=>s==="admin"||l.includes(s))||n.parentNode&&n.parentNode.removeChild(n)}})})(e),function(t){t.directive("hasPermi",(n,r)=>{const{wsCache:o}=ku(),{value:i}=r,a=o.get(Nr.USER).permissions;if(!(i&&i instanceof Array&&i.length>0))throw new Error(TAt("permission.hasPermission"));{const l=i;a.some(s=>s==="*:*:*"||l.includes(s))||n.parentNode&&n.parentNode.removeChild(n)}})}(e)};function Zh(e){return!!Z3()&&(eb(e),!0)}function Bs(e){return typeof e=="function"?e():M(e)}const _f=typeof window<"u"&&typeof document<"u",NAt=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,FAt=e=>e!=null,RAt=Object.prototype.toString,IAt=e=>RAt.call(e)==="[object Object]",zD=()=>{};function fSe(e){return dn()}vOe=function(e,t=200,n={}){return function(r,o){return function(...i){return new Promise((a,l)=>{Promise.resolve(r(()=>o.apply(this,i),{fn:o,thisArg:this,args:i})).then(a).catch(l)})}}(function(r,o={}){let i,a,l=zD;const s=u=>{clearTimeout(u),l(),l=zD};return u=>{const c=Bs(r),d=Bs(o.maxWait);return i&&s(i),c<=0||d!==void 0&&d<=0?(a&&(s(a),a=null),Promise.resolve(u())):new Promise((f,p)=>{l=o.rejectOnCancel?p:f,d&&!a&&(a=setTimeout(()=>{i&&s(i),a=null,f(u())},d)),i=setTimeout(()=>{a&&s(a),a=null,f(u())},c)})}}(t,n),e)},AQ=function(e,t=!0,n){fSe()?yn(e,n):t?e():St(e)},tOe=function(e,t){fSe()&&Vs(e,t)};function HA(e){var t;const n=Bs(e);return(t=n==null?void 0:n.$el)!=null?t:n}const $A=_f?window:void 0,BAt=_f?window.document:void 0,pSe=_f?window.navigator:void 0;function t3(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=$A):[t,n,r,o]=e,!t)return zD;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],a=()=>{i.forEach(u=>u()),i.length=0},l=Je(()=>[HA(t),Bs(o)],([u,c])=>{if(a(),!u)return;const d=IAt(c)?{...c}:c;i.push(...n.flatMap(f=>r.map(p=>((m,v,g,b)=>(m.addEventListener(v,g,b),()=>m.removeEventListener(v,g,b)))(u,f,p,d))))},{immediate:!0,flush:"post"}),s=()=>{l(),a()};return Zh(s),s}function UA(e){const t=function(){const n=de(!1),r=dn();return r&&yn(()=>{n.value=!0},r),n}();return ee(()=>(t.value,!!e()))}function hSe(e,t={}){const{controls:n=!1,navigator:r=pSe}=t,o=UA(()=>r&&"permissions"in r);let i;const a=typeof e=="string"?{name:e}:e,l=de(),s=()=>{i&&(l.value=i.state)},u=function(c){let d;function f(){return d||(d=c()),d}return f.reset=async()=>{const p=d;d=void 0,p&&await p},f}(async()=>{if(o.value){if(!i)try{i=await r.permissions.query(a),t3(i,"change",s),s()}catch{l.value="prompt"}return i}});return u(),n?{state:l,isSupported:o,query:u}:l}COe=function(e={}){const{navigator:t=pSe,read:n=!1,source:r,copiedDuring:o=1500,legacy:i=!1}=e,a=UA(()=>t&&"clipboard"in t),l=hSe("clipboard-read"),s=hSe("clipboard-write"),u=ee(()=>a.value||i),c=de(""),d=de(!1),f=function(m,v,g={}){const{immediate:b=!0}=g,y=de(!1);let w=null;function x(){w&&(clearTimeout(w),w=null)}function _(){y.value=!1,x()}function E(...C){x(),y.value=!0,w=setTimeout(()=>{y.value=!1,w=null,m(...C)},Bs(v))}return b&&(y.value=!0,_f&&E()),Zh(_),{isPending:xd(y),start:E,stop:_}}(()=>d.value=!1,o);function p(m){return m==="granted"||m==="prompt"}return u.value&&n&&t3(["copy","cut"],function(){a.value&&p(l.value)?t.clipboard.readText().then(m=>{c.value=m}):c.value=function(){var m,v,g;return(g=(v=(m=document==null?void 0:document.getSelection)==null?void 0:m.call(document))==null?void 0:v.toString())!=null?g:""}()}),{isSupported:u,text:c,copied:d,copy:async function(m=Bs(r)){u.value&&m!=null&&(a.value&&p(s.value)?await t.clipboard.writeText(m):function(v){const g=document.createElement("textarea");g.value=v??"",g.style.position="absolute",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove()}(m),c.value=m,d.value=!0,f.start())}}},rJ=function(e,t,n={}){const{window:r=$A,initialValue:o="",observe:i=!1}=n,a=de(o),l=ee(()=>{var u;return HA(t)||((u=r==null?void 0:r.document)==null?void 0:u.documentElement)});function s(){var u;const c=Bs(e),d=Bs(l);if(d&&r){const f=(u=r.getComputedStyle(d).getPropertyValue(c))==null?void 0:u.trim();a.value=f||o}}return i&&function(u,c,d={}){const{window:f=$A,...p}=d;let m;const v=UA(()=>f&&"MutationObserver"in f),g=()=>{m&&(m.disconnect(),m=void 0)},b=ee(()=>{const x=Bs(u),_=(Array.isArray(x)?x:[x]).map(HA).filter(FAt);return new Set(_)}),y=Je(()=>b.value,x=>{g(),v.value&&x.size&&(m=new MutationObserver(c),x.forEach(_=>m.observe(_,p)))},{immediate:!0,flush:"post"});Zh(()=>{g(),y()})}(l,s,{attributeFilter:["style","class"],window:r}),Je([l,()=>Bs(e)],s,{immediate:!0}),Je(a,u=>{var c;(c=l.value)!=null&&c.style&&l.value.style.setProperty(Bs(e),u)}),a};const vSe=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];fOe=function(e,t={}){const{document:n=BAt,autoExit:r=!1}=t,o=ee(()=>{var v;return(v=HA(e))!=null?v:n==null?void 0:n.querySelector("html")}),i=de(!1),a=ee(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(v=>n&&v in n||o.value&&v in o.value)),l=ee(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(v=>n&&v in n||o.value&&v in o.value)),s=ee(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(v=>n&&v in n||o.value&&v in o.value)),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(v=>n&&v in n),c=UA(()=>o.value&&n&&a.value!==void 0&&l.value!==void 0&&s.value!==void 0),d=()=>{if(s.value){if(n&&n[s.value]!=null)return n[s.value];{const v=o.value;if((v==null?void 0:v[s.value])!=null)return!!v[s.value]}}return!1};async function f(){if(c.value&&i.value){if(l.value)if((n==null?void 0:n[l.value])!=null)await n[l.value]();else{const v=o.value;(v==null?void 0:v[l.value])!=null&&await v[l.value]()}i.value=!1}}async function p(){if(!c.value||i.value)return;d()&&await f();const v=o.value;a.value&&(v==null?void 0:v[a.value])!=null&&(await v[a.value](),i.value=!0)}const m=()=>{const v=d();(!v||v&&u&&(n==null?void 0:n[u])===o.value)&&(i.value=v)};return t3(n,vSe,m,!1),t3(()=>HA(o),vSe,m,!1),r&&Zh(f),{isSupported:c,isFullscreen:i,enter:p,exit:f,toggle:async function(){await(i.value?f():p())}}},$Oe=function(){const e=de([]);return e.value.set=t=>{t&&e.value.push(t)},ub(()=>{e.value.length=0}),e};const mSe="ping";function iX(e){return e===!0?{}:e}OOe=function(e,t={}){const{onConnected:n,onDisconnected:r,onError:o,onMessage:i,immediate:a=!0,autoClose:l=!0,protocols:s=[]}=t,u=de(null),c=de("CLOSED"),d=de(),f=function(...k){if(k.length!==1)return dr(...k);const I=k[0];return typeof I=="function"?xd(KT(()=>({get:I,set:zD}))):de(I)}(e);let p,m,v,g=!1,b=0,y=[];const w=()=>{if(y.length&&d.value&&c.value==="OPEN"){for(const k of y)d.value.send(k);y=[]}},x=()=>{clearTimeout(v),v=void 0},_=(k=1e3,I)=>{_f&&d.value&&(g=!0,x(),p==null||p(),d.value.close(k,I),d.value=void 0)},E=(k,I=!0)=>d.value&&c.value==="OPEN"?(w(),d.value.send(k),!0):(I&&y.push(k),!1),C=()=>{if(g||f.value===void 0)return;const k=new WebSocket(f.value,s);d.value=k,c.value="CONNECTING",k.onopen=()=>{c.value="OPEN",n==null||n(k),m==null||m(),w()},k.onclose=I=>{if(c.value="CLOSED",r==null||r(k,I),!g&&t.autoReconnect){const{retries:O=-1,delay:F=1e3,onFailed:N}=iX(t.autoReconnect);b+=1,typeof O=="number"&&(O<0||b<O)||typeof O=="function"&&O()?setTimeout(C,F):N==null||N()}},k.onerror=I=>{o==null||o(k,I)},k.onmessage=I=>{if(t.heartbeat){x();const{message:O=mSe}=iX(t.heartbeat);if(I.data===O)return}u.value=I.data,i==null||i(k,I)}};if(t.heartbeat){const{message:k=mSe,interval:I=1e3,pongTimeout:O=1e3}=iX(t.heartbeat),{pause:F,resume:N}=function(B,L=1e3,V={}){const{immediate:P=!0,immediateCallback:H=!1}=V;let U=null;const G=de(!1);function z(){U&&(clearInterval(U),U=null)}function $(){G.value=!1,z()}function W(){const K=Bs(L);K<=0||(G.value=!0,H&&B(),z(),U=setInterval(B,K))}return P&&_f&&W(),(Jn(L)||typeof L=="function")&&Zh(Je(L,()=>{G.value&&_f&&W()})),Zh($),{isActive:G,pause:$,resume:W}}(()=>{E(k,!1),v==null&&(v=setTimeout(()=>{_(),g=!1},O))},I,{immediate:!1});p=F,m=N}l&&(_f&&t3("beforeunload",()=>_()),Zh(_));const T=()=>{(_f||NAt)&&(_(),g=!1,b=0,C())};return a&&T(),Je(f,T),{data:u,status:c,close:_,send:E,open:T,ws:d}};function LAt(e={}){const{window:t=$A,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:o=!0,includeScrollbar:i=!0}=e,a=de(n),l=de(r),s=()=>{t&&(i?(a.value=t.innerWidth,l.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};if(s(),AQ(s),t3("resize",s,{passive:!0}),o){const u=function(c,d={}){const{window:f=$A}=d,p=UA(()=>f&&"matchMedia"in f&&typeof f.matchMedia=="function");let m;const v=de(!1),g=w=>{v.value=w.matches},b=()=>{m&&("removeEventListener"in m?m.removeEventListener("change",g):m.removeListener(g))},y=yl(()=>{p.value&&(b(),m=f.matchMedia(Bs(c)),"addEventListener"in m?m.addEventListener("change",g):m.addListener(g),v.value=m.matches)});return Zh(()=>{y(),b(),m=void 0}),v}("(orientation: portrait)");Je(u,()=>s())}return{width:a,height:l}}let lc,aX,gSe,ySe,lX;({wsCache:lc}=ku()),Sw=ym("app",{state:()=>({userInfo:"userInfo",sizeMap:["default","large","small"],mobile:!1,title:"\u5DE5\u4E1A\u4E92\u8054\u7F51\u5E73\u53F0",pageLoading:!1,breadcrumb:!0,breadcrumbIcon:!0,collapse:!1,uniqueOpened:!0,hamburger:!0,screenfull:!0,search:!0,size:!0,locale:!0,message:!0,tagsView:!0,tagsViewIcon:!0,logo:!0,fixedHeader:!0,footer:!0,greyMode:!1,fixedMenu:lc.get("fixedMenu")||!1,layout:lc.get(Nr.LAYOUT)||"classic",isDark:lc.get(Nr.IS_DARK)||!1,currentSize:lc.get("default")||"default",theme:lc.get(Nr.THEME)||{elColorPrimary:"#409eff",leftMenuBorderColor:"inherit",leftMenuBgColor:"#001529",leftMenuBgLightColor:"#0f2438",leftMenuBgActiveColor:"var(--el-color-primary)",leftMenuCollapseBgActiveColor:"var(--el-color-primary)",leftMenuTextColor:"#bfcbd9",leftMenuTextActiveColor:"#fff",logoTitleTextColor:"#fff",logoBorderColor:"inherit",topHeaderBgColor:"#fff",topHeaderTextColor:"inherit",topHeaderHoverColor:"#f6f6f6",topToolBorderColor:"#eee"}}),getters:{getBreadcrumb(){return this.breadcrumb},getBreadcrumbIcon(){return this.breadcrumbIcon},getCollapse(){return this.collapse},getUniqueOpened(){return this.uniqueOpened},getHamburger(){return this.hamburger},getScreenfull(){return this.screenfull},getSize(){return this.size},getLocale(){return this.locale},getMessage(){return this.message},getTagsView(){return this.tagsView},getTagsViewIcon(){return this.tagsViewIcon},getLogo(){return this.logo},getFixedHeader(){return this.fixedHeader},getGreyMode(){return this.greyMode},getFixedMenu(){return this.fixedMenu},getPageLoading(){return this.pageLoading},getLayout(){return this.layout},getTitle(){return this.title},getUserInfo(){return this.userInfo},getIsDark(){return this.isDark},getCurrentSize(){return this.currentSize},getSizeMap(){return this.sizeMap},getMobile(){return this.mobile},getTheme(){return this.theme},getFooter(){return this.footer}},actions:{setBreadcrumb(e){this.breadcrumb=e},setBreadcrumbIcon(e){this.breadcrumbIcon=e},setCollapse(e){this.collapse=e},setUniqueOpened(e){this.uniqueOpened=e},setHamburger(e){this.hamburger=e},setScreenfull(e){this.screenfull=e},setSize(e){this.size=e},setLocale(e){this.locale=e},setMessage(e){this.message=e},setTagsView(e){this.tagsView=e},setTagsViewIcon(e){this.tagsViewIcon=e},setLogo(e){this.logo=e},setFixedHeader(e){this.fixedHeader=e},setGreyMode(e){this.greyMode=e},setFixedMenu(e){lc.set("fixedMenu",e),this.fixedMenu=e},setPageLoading(e){this.pageLoading=e},setLayout(e){this.mobile&&e!=="classic"?El.warning("\u79FB\u52A8\u7AEF\u6A21\u5F0F\u4E0B\u4E0D\u652F\u6301\u5207\u6362\u5176\u4ED6\u5E03\u5C40"):(this.layout=e,lc.set(Nr.LAYOUT,this.layout))},setTitle(e){this.title=e},setIsDark(e){this.isDark=e,this.isDark?(document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light")):(document.documentElement.classList.add("light"),document.documentElement.classList.remove("dark")),lc.set(Nr.IS_DARK,this.isDark)},setCurrentSize(e){this.currentSize=e,lc.set("currentSize",this.currentSize)},setMobile(e){this.mobile=e},setTheme(e){this.theme=Object.assign(this.theme,e),lc.set(Nr.THEME,this.theme)},setCssVarTheme(){for(const t in this.theme)zw(`--${e=t,e.replace(/([A-Z])/g,"-$1").toLowerCase()}`,this.theme[t]);var e},setFooter(e){this.footer=e}},persist:!1}),aX=()=>Sw(Nf),gSe=Te({__name:"ConfigGlobal",props:{size:Xn.oneOf(["default","small","large"]).def("default")},setup(e){const{variables:t}=Dw(),n=Sw();qn("configGlobal",e),yn(()=>{n.setCssVarTheme()});const{width:r}=LAt();Je(()=>r.value,a=>{a<768?(n.getMobile||n.setMobile(!0),zw("--left-menu-min-width","0"),n.setCollapse(!0),n.getLayout!=="classic"&&n.setLayout("classic")):(n.getMobile&&n.setMobile(!1),zw("--left-menu-min-width","64px"))},{immediate:!0});const o=Fw(),i=ee(()=>o.currentLocale);return(a,l)=>(Y(),Pe(M(XIe),{namespace:M(t).elNamespace,locale:i.value.elLocale,message:{max:5},size:e.size},{default:he(()=>[ft(a.$slots,"default")]),_:3},8,["namespace","locale","size"]))}}),SQ=Te({__name:"index",props:{isModal:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=aJ(),r=de(!1),o=de(!1),i=de(""),a=n.getRoutes(),l=ee(()=>i.value?a.filter(f=>{var p;if(((p=f.meta.title)==null?void 0:p.indexOf(i.value))>-1||f.path.indexOf(i.value)>-1)return!0}).map(f=>({label:`${f.meta.title}${f.path}`,value:f.path})):[]);function s(f){i.value=f}function u(f){n.push({path:f}),c()}function c(){o.value=!1}function d(f){(f.ctrlKey||f.metaKey)&&f.key==="k"&&(r.value=!r.value)}return yn(()=>{window.addEventListener("keydown",d),window.addEventListener("click",c)}),Vs(()=>{window.removeEventListener("keydown",d),window.removeEventListener("click",c)}),t({openSearch:()=>{r.value=!0}}),(f,p)=>{const m=wO,v=w3,g=Mw,b=mm;return e.isModal?(Y(),Pe(g,{key:0,modelValue:M(r),"onUpdate:modelValue":p[0]||(p[0]=y=>Jn(r)?r.value=y:null),"show-close":!1,title:"\u83DC\u5355\u641C\u7D22"},{default:he(()=>[ie(v,{filterable:"","reserve-keyword":!1,remote:"",placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u5185\u5BB9","remote-method":s,style:{width:"100%"},onChange:u},{default:he(()=>[(Y(!0),fe(bt,null,bn(M(l),y=>(Y(),Pe(m,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1})]),_:1},8,["modelValue"])):(Y(),fe("div",{key:1,class:"custom-hover",onClick:p[1]||(p[1]=Gt(y=>o.value=!M(o),["stop"]))},[ie(b,{icon:"ep:search"}),ie(v,{filterable:"","reserve-keyword":!1,remote:"",placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u5185\u5BB9","remote-method":s,class:oe(["overflow-hidden transition-all-600",M(o)?"!w-220px ml2":"!w-0"]),onChange:u},{default:he(()=>[(Y(!0),fe(bt,null,bn(M(l),y=>(Y(),Pe(m,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["class"])]))}}}),ySe=Te({name:"APP",__name:"App",setup(e){const{getPrefixCls:t}=Dw(),n=t("app"),r=Sw(),o=ee(()=>r.getCurrentSize),i=ee(()=>r.getGreyMode),{wsCache:a}=ku();return(()=>{let l=a.get(Nr.IS_DARK);l===null&&(l=window.matchMedia("(prefers-color-scheme: dark)").matches),r.setIsDark(l)})(),(l,s)=>{const u=Qe("RouterView"),c=gSe;return Y(),Pe(c,{size:M(o)},{default:he(()=>[ie(u,{class:oe(M(i)?`${M(n)}-grey-mode`:"")},null,8,["class"]),ie(SQ)]),_:1},8,["size"])}}}),lX=aX();var bSe={exports:{}};bSe.exports=function(){var e={version:"0.2.0"},t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(f,p,m){return f<p?p:f>m?m:f}function r(f){return 100*(-1+f)}function o(f,p,m){var v;return(v=t.positionUsing==="translate3d"?{transform:"translate3d("+r(f)+"%,0,0)"}:t.positionUsing==="translate"?{transform:"translate("+r(f)+"%,0)"}:{"margin-left":r(f)+"%"}).transition="all "+p+"ms "+m,v}e.configure=function(f){var p,m;for(p in f)(m=f[p])!==void 0&&f.hasOwnProperty(p)&&(t[p]=m);return this},e.status=null,e.set=function(f){var p=e.isStarted();f=n(f,t.minimum,1),e.status=f===1?null:f;var m=e.render(!p),v=m.querySelector(t.barSelector),g=t.speed,b=t.easing;return m.offsetWidth,i(function(y){t.positionUsing===""&&(t.positionUsing=e.getPositioningCSS()),a(v,o(f,g,b)),f===1?(a(m,{transition:"none",opacity:1}),m.offsetWidth,setTimeout(function(){a(m,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){e.remove(),y()},g)},g)):setTimeout(y,g)}),this},e.isStarted=function(){return typeof e.status=="number"},e.start=function(){e.status||e.set(0);var f=function(){setTimeout(function(){e.status&&(e.trickle(),f())},t.trickleSpeed)};return t.trickle&&f(),this},e.done=function(f){return f||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(f){var p=e.status;return p?(typeof f!="number"&&(f=(1-p)*n(Math.random()*p,.1,.95)),p=n(p+f,0,.994),e.set(p)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var f=0,p=0;e.promise=function(m){return m&&m.state()!=="resolved"?(p===0&&e.start(),f++,p++,m.always(function(){--p==0?(f=0,e.done()):e.set((f-p)/f)}),this):this}}(),e.render=function(f){if(e.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var p=document.createElement("div");p.id="nprogress",p.innerHTML=t.template;var m,v=p.querySelector(t.barSelector),g=f?"-100":r(e.status||0),b=document.querySelector(t.parent);return a(v,{transition:"all 0 linear",transform:"translate3d("+g+"%,0,0)"}),t.showSpinner||(m=p.querySelector(t.spinnerSelector))&&d(m),b!=document.body&&s(b,"nprogress-custom-parent"),b.appendChild(p),p},e.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(t.parent),"nprogress-custom-parent");var f=document.getElementById("nprogress");f&&d(f)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var f=document.body.style,p="WebkitTransform"in f?"Webkit":"MozTransform"in f?"Moz":"msTransform"in f?"ms":"OTransform"in f?"O":"";return p+"Perspective"in f?"translate3d":p+"Transform"in f?"translate":"margin"};var i=function(){var f=[];function p(){var m=f.shift();m&&m(p)}return function(m){f.push(m),f.length==1&&p()}}(),a=function(){var f=["Webkit","O","Moz","ms"],p={};function m(y){return y.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(w,x){return x.toUpperCase()})}function v(y){var w=document.body.style;if(y in w)return y;for(var x,_=f.length,E=y.charAt(0).toUpperCase()+y.slice(1);_--;)if((x=f[_]+E)in w)return x;return y}function g(y){return y=m(y),p[y]||(p[y]=v(y))}function b(y,w,x){w=g(w),y.style[w]=x}return function(y,w){var x,_,E=arguments;if(E.length==2)for(x in w)(_=w[x])!==void 0&&w.hasOwnProperty(x)&&b(y,x,_);else b(y,E[1],E[2])}}();function l(f,p){return(typeof f=="string"?f:c(f)).indexOf(" "+p+" ")>=0}function s(f,p){var m=c(f),v=m+p;l(m,p)||(f.className=v.substring(1))}function u(f,p){var m,v=c(f);l(f,p)&&(m=v.replace(" "+p+" "," "),f.className=m.substring(1,m.length-1))}function c(f){return(" "+(f.className||"")+" ").replace(/\s+/gi," ")}function d(f){f&&f.parentNode&&f.parentNode.removeChild(f)}return e}();let HD,ASe,sX;HD=_l(bSe.exports),ASe=rJ("--el-color-primary",document.documentElement),sX=aX(),XDe=e=>No.post({url:"/system/auth/login",data:e}),ZDe=e=>No.get({url:"/system/tenant/get-id-by-name?name="+e}),$De=e=>No.get({url:"/system/tenant/get-by-website?website="+e}),qDe=e=>No.post({url:"/system/auth/send-sms-code",data:e}),KDe=e=>No.post({url:"/system/auth/sms-login",data:e}),YDe=function(e,t,n){return No.post({url:"/system/auth/social-login",data:{type:e,code:t,state:n}})};let e0,uX,wSe,xSe,_Se,ESe,CSe;GDe=e=>No.postOriginal({url:"system/captcha/get",data:e}),WDe=e=>No.postOriginal({url:"system/captcha/check",data:e}),{wsCache:e0}=ku(),hQ=ym("admin-user",{state:()=>({permissions:[],roles:[],isSetUser:!1,user:{id:0,avatar:"",nickname:"",deptId:0}}),getters:{getPermissions(){return this.permissions},getRoles(){return this.roles},getIsSetUser(){return this.isSetUser},getUser(){return this.user}},actions:{async setUserInfoAction(){if(!Cd())return this.resetState(),null;let e=e0.get(Nr.USER);e||(e=await No.get({url:"/system/auth/get-permission-info"})),this.permissions=e.permissions,this.roles=e.roles,this.user=e.user,this.isSetUser=!0,e0.set(Nr.USER,e),e0.set(Nr.ROLE_ROUTERS,e.menus)},async setUserAvatarAction(e){const t=e0.get(Nr.USER);this.user.avatar=e,t.user.avatar=e,e0.set(Nr.USER,t)},async setUserNicknameAction(e){const t=e0.get(Nr.USER);this.user.nickname=e,t.user.nickname=e,e0.set(Nr.USER,t)},async loginOut(){await No.post({url:"/system/auth/logout"}),uL(),DO(),this.resetState()},resetState(){this.permissions=[],this.roles=[],this.isSetUser=!1,this.user={id:0,avatar:"",nickname:"",deptId:0}}}}),{wsCache:uX}=ku(),lJ=ym("permission",{state:()=>({routers:[],addRouters:[],menuTabRouters:[]}),getters:{getRouters(){return this.routers},getAddRouters(){return(e=>{const t=Mf(e);for(let n=0;n<t.length;n++){const r=t[n];$0e(r)&&U0e(r)}return t})(Mf(this.addRouters))},getMenuTabRouters(){return this.menuTabRouters}},actions:{async generateRoutes(){return new Promise(async e=>{let t=[];uX.get(Nr.ROLE_ROUTERS)&&(t=uX.get(Nr.ROLE_ROUTERS));const n=AL(t);this.addRouters=n.concat([{path:"/:path(.*)*",redirect:"/404",name:"404Page",meta:{hidden:!0,breadcrumb:!1}}]),this.routers=Mf(EL).concat(n),e()})},setMenuTabRouters(e){this.menuTabRouters=e}},persist:!1}),{start:wSe,done:xSe}=(HD.configure({showSpinner:!1}),(async()=>{var t;await St();const e=(t=document.getElementById("nprogress"))==null?void 0:t.getElementsByClassName("bar")[0];e&&(e.style.background=M(ASe.value))})(),{start:()=>{HD.start()},done:()=>{HD.done()}}),{loadStart:_Se,loadDone:ESe}={loadStart:()=>{sX.setPageLoading(!0)},loadDone:()=>{sX.setPageLoading(!1)}},CSe=["/login","/social-login","/auth-redirect","/bind","/register","/oauthLogin/gitee"],vc.beforeEach(async(e,t,n)=>{if(wSe(),_Se(),Cd())if(e.path==="/login")n({path:"/"});else{const r=oX(),o=hQ(Nf),i=lJ(Nf);if(r.getIsSetDict||await r.setDictMap(),o.getIsSetUser)n();else{t2.show=!0,await o.setUserInfoAction(),t2.show=!1,await i.generateRoutes(),i.getAddRouters.forEach(u=>{vc.addRoute(u)});const a=t.query.redirect||e.path,l=decodeURIComponent(a),{paramsObject:s}=(u=>{if(u==null)return{basePath:"",paramsObject:{}};const c=u.indexOf("?");let d=u;const f={};if(c!==-1){d=u.substring(0,c);const p=u.substring(c+1);new URLSearchParams(p).forEach((m,v)=>{f[v]=m})}return{basePath:d,paramsObject:f}})(l);n(e.path===l?{...e,replace:!0}:{path:l,query:s})}}else CSe.indexOf(e.path)!==-1?n():n(`/login?redirect=${e.fullPath}`)}),vc.afterEach(e=>{var t;(n=>{const{t:r}=hc(),o=de(n?`${lX.getTitle} - ${r(n)}`:lX.getTitle);Je(o,(i,a)=>{E3(i)&&i!==a&&document&&(document.title=i)},{immediate:!0})})((t=e==null?void 0:e.meta)==null?void 0:t.title),xSe(),ESe()}),window._hmt=window._hmt||[],function(){const e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?a1ff8825baa73c3a78eb96aa40325abc";const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(),vc.afterEach(function(e){_hmt.push(["_trackPageview",e.fullPath])});const SSe=function(e){return Object.prototype.toString.call(e)==="[object Array]"},ji=()=>{};ji.typeColor=function(e){let t="";switch(e){case"primary":t="#2d8cf0";break;case"success":t="#19be6b";break;case"info":t="#909399";break;case"warn":t="#ff9900";break;case"error":t="#f03f14";break;default:t="#35495E"}return t},ji.print=function(e="default",t,n=!1){typeof t!="object"?n?console.log(`%c ${t} `,`background:${ji.typeColor(e)}; padding: 2px; border-radius: 4px; color: #fff;`):console.log(`%c ${t} `,`border: 1px solid ${ji.typeColor(e)}; |
|
1068 |
padding: 2px; border-radius: 4px; |
|
1069 |
color: ${ji.typeColor(e)};`):SSe(t)?console.table(t):console.dir(t)},ji.printBack=function(e="primary",t){this.print(e,t,!0)},ji.pretty=function(e="primary",t,n){if(typeof n=="object")return console.group("Console Group",t),console.log(`%c ${t}`,`background:${ji.typeColor(e)};border:1px solid ${ji.typeColor(e)}; |
|
1070 |
padding: 1px; border-radius: 4px; color: #fff;`),SSe(n)?console.table(n):console.dir(n),void console.groupEnd();console.log(`%c ${t} %c ${n} %c`,`background:${ji.typeColor(e)};border:1px solid ${ji.typeColor(e)}; |
|
1071 |
padding: 1px; border-radius: 4px 0 0 4px; color: #fff;`,`border:1px solid ${ji.typeColor(e)}; |
|
1072 |
padding: 1px; border-radius: 0 4px 4px 0; color: ${ji.typeColor(e)};`,"background:transparent")},ji.prettyPrimary=function(e,...t){t.forEach(n=>this.pretty("primary",e,n))},ji.prettySuccess=function(e,...t){t.forEach(n=>this.pretty("success",e,n))},ji.prettyWarn=function(e,...t){t.forEach(n=>this.pretty("warn",e,n))},ji.prettyError=function(e,...t){t.forEach(n=>this.pretty("error",e,n))},ji.prettyInfo=function(e,...t){t.forEach(n=>this.pretty("info",e,n))};const{entries:kSe,setPrototypeOf:DSe,isFrozen:PAt,getPrototypeOf:jAt,getOwnPropertyDescriptor:VAt}=Object;let{freeze:dl,seal:Eu,create:OSe}=Object,{apply:cX,construct:dX}=typeof Reflect<"u"&&Reflect;dl||(dl=function(e){return e}),Eu||(Eu=function(e){return e}),cX||(cX=function(e,t,n){return e.apply(t,n)}),dX||(dX=function(e,t){return new e(...t)});const $D=Ls(Array.prototype.forEach),TSe=Ls(Array.prototype.pop),WA=Ls(Array.prototype.push),UD=Ls(String.prototype.toLowerCase),fX=Ls(String.prototype.toString),MSe=Ls(String.prototype.match),GA=Ls(String.prototype.replace),zAt=Ls(String.prototype.indexOf),HAt=Ls(String.prototype.trim),sc=Ls(Object.prototype.hasOwnProperty),fl=Ls(RegExp.prototype.test),qA=(NSe=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return dX(NSe,t)});var NSe;function Ls(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return cX(e,t,r)}}function br(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:UD;DSe&&DSe(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(PAt(t)||(t[r]=i),o=i)}e[o]=!0}return e}function $At(e){for(let t=0;t<e.length;t++)sc(e,t)||(e[t]=null);return e}function rm(e){const t=OSe(null);for(const[n,r]of kSe(e))sc(e,n)&&(Array.isArray(r)?t[n]=$At(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=rm(r):t[n]=r);return t}function KA(e,t){for(;e!==null;){const n=VAt(e,t);if(n){if(n.get)return Ls(n.get);if(typeof n.value=="function")return Ls(n.value)}e=jAt(e)}return function(){return null}}const FSe=dl(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),pX=dl(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hX=dl(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),UAt=dl(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vX=dl(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),WAt=dl(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),RSe=dl(["#text"]),ISe=dl(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),mX=dl(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),BSe=dl(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),WD=dl(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),GAt=Eu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),qAt=Eu(/<%[\w\W]*|[\w\W]*%>/gm),KAt=Eu(/\${[\w\W]*}/gm),YAt=Eu(/^data-[\-\w.\u00B7-\uFFFF]/),XAt=Eu(/^aria-[\-\w]+$/),LSe=Eu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),QAt=Eu(/^(?:\w+script|data):/i),JAt=Eu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),PSe=Eu(/^html$/i),ZAt=Eu(/^[a-z][.\w]*(-[.\w]+)+$/i);var jSe=Object.freeze({__proto__:null,MUSTACHE_EXPR:GAt,ERB_EXPR:qAt,TMPLIT_EXPR:KAt,DATA_ATTR:YAt,ARIA_ATTR:XAt,IS_ALLOWED_URI:LSe,IS_SCRIPT_OR_DATA:QAt,ATTR_WHITESPACE:JAt,DOCTYPE_NAME:PSe,CUSTOM_ELEMENT:ZAt});const ewt=1,twt=3,nwt=7,rwt=8,owt=9,iwt=function(){return typeof window>"u"?null:window};var awt=function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:iwt();const n=Ne=>e(Ne);if(n.version="3.1.6",n.removed=[],!t||!t.document||t.document.nodeType!==owt)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:s,Element:u,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:m}=t,v=u.prototype,g=KA(v,"cloneNode"),b=KA(v,"remove"),y=KA(v,"nextSibling"),w=KA(v,"childNodes"),x=KA(v,"parentNode");if(typeof l=="function"){const Ne=r.createElement("template");Ne.content&&Ne.content.ownerDocument&&(r=Ne.content.ownerDocument)}let _,E="";const{implementation:C,createNodeIterator:T,createDocumentFragment:k,getElementsByTagName:I}=r,{importNode:O}=o;let F={};n.isSupported=typeof kSe=="function"&&typeof x=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:B,TMPLIT_EXPR:L,DATA_ATTR:V,ARIA_ATTR:P,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:G}=jSe;let{IS_ALLOWED_URI:z}=jSe,$=null;const W=br({},[...FSe,...pX,...hX,...vX,...RSe]);let K=null;const X=br({},[...ISe,...mX,...BSe,...WD]);let te=Object.seal(OSe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,se=null,le=!0,J=!0,Z=!1,ye=!0,be=!1,ve=!0,Ae=!1,Ce=!1,_e=!1,ke=!1,Be=!1,$e=!1,rt=!0,ge=!1,We=!0,st=!1,At={},Ve=null;const it=br({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let dt=null;const ot=br({},["audio","video","img","source","image","track"]);let je=null;const we=br({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ze="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",Me="http://www.w3.org/1999/xhtml";let Ie=Me,ht=!1,gt=null;const vt=br({},[ze,me,Me],fX);let qt=null;const mn=["application/xhtml+xml","text/html"];let Zt=null,rn=null;const zn=r.createElement("form"),tt=function(Ne){return Ne instanceof RegExp||Ne instanceof Function},kt=function(){let Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!rn||rn!==Ne){if(Ne&&typeof Ne=="object"||(Ne={}),Ne=rm(Ne),qt=mn.indexOf(Ne.PARSER_MEDIA_TYPE)===-1?"text/html":Ne.PARSER_MEDIA_TYPE,Zt=qt==="application/xhtml+xml"?fX:UD,$=sc(Ne,"ALLOWED_TAGS")?br({},Ne.ALLOWED_TAGS,Zt):W,K=sc(Ne,"ALLOWED_ATTR")?br({},Ne.ALLOWED_ATTR,Zt):X,gt=sc(Ne,"ALLOWED_NAMESPACES")?br({},Ne.ALLOWED_NAMESPACES,fX):vt,je=sc(Ne,"ADD_URI_SAFE_ATTR")?br(rm(we),Ne.ADD_URI_SAFE_ATTR,Zt):we,dt=sc(Ne,"ADD_DATA_URI_TAGS")?br(rm(ot),Ne.ADD_DATA_URI_TAGS,Zt):ot,Ve=sc(Ne,"FORBID_CONTENTS")?br({},Ne.FORBID_CONTENTS,Zt):it,ne=sc(Ne,"FORBID_TAGS")?br({},Ne.FORBID_TAGS,Zt):{},se=sc(Ne,"FORBID_ATTR")?br({},Ne.FORBID_ATTR,Zt):{},At=!!sc(Ne,"USE_PROFILES")&&Ne.USE_PROFILES,le=Ne.ALLOW_ARIA_ATTR!==!1,J=Ne.ALLOW_DATA_ATTR!==!1,Z=Ne.ALLOW_UNKNOWN_PROTOCOLS||!1,ye=Ne.ALLOW_SELF_CLOSE_IN_ATTR!==!1,be=Ne.SAFE_FOR_TEMPLATES||!1,ve=Ne.SAFE_FOR_XML!==!1,Ae=Ne.WHOLE_DOCUMENT||!1,ke=Ne.RETURN_DOM||!1,Be=Ne.RETURN_DOM_FRAGMENT||!1,$e=Ne.RETURN_TRUSTED_TYPE||!1,_e=Ne.FORCE_BODY||!1,rt=Ne.SANITIZE_DOM!==!1,ge=Ne.SANITIZE_NAMED_PROPS||!1,We=Ne.KEEP_CONTENT!==!1,st=Ne.IN_PLACE||!1,z=Ne.ALLOWED_URI_REGEXP||LSe,Ie=Ne.NAMESPACE||Me,te=Ne.CUSTOM_ELEMENT_HANDLING||{},Ne.CUSTOM_ELEMENT_HANDLING&&tt(Ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(te.tagNameCheck=Ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ne.CUSTOM_ELEMENT_HANDLING&&tt(Ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(te.attributeNameCheck=Ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ne.CUSTOM_ELEMENT_HANDLING&&typeof Ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=Ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),be&&(J=!1),Be&&(ke=!0),At&&($=br({},RSe),K=[],At.html===!0&&(br($,FSe),br(K,ISe)),At.svg===!0&&(br($,pX),br(K,mX),br(K,WD)),At.svgFilters===!0&&(br($,hX),br(K,mX),br(K,WD)),At.mathMl===!0&&(br($,vX),br(K,BSe),br(K,WD))),Ne.ADD_TAGS&&($===W&&($=rm($)),br($,Ne.ADD_TAGS,Zt)),Ne.ADD_ATTR&&(K===X&&(K=rm(K)),br(K,Ne.ADD_ATTR,Zt)),Ne.ADD_URI_SAFE_ATTR&&br(je,Ne.ADD_URI_SAFE_ATTR,Zt),Ne.FORBID_CONTENTS&&(Ve===it&&(Ve=rm(Ve)),br(Ve,Ne.FORBID_CONTENTS,Zt)),We&&($["#text"]=!0),Ae&&br($,["html","head","body"]),$.table&&(br($,["tbody"]),delete ne.tbody),Ne.TRUSTED_TYPES_POLICY){if(typeof Ne.TRUSTED_TYPES_POLICY.createHTML!="function")throw qA('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ne.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qA('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=Ne.TRUSTED_TYPES_POLICY,E=_.createHTML("")}else _===void 0&&(_=function(Tt,Oe){if(typeof Tt!="object"||typeof Tt.createPolicy!="function")return null;let nt=null;const ut="data-tt-policy-suffix";Oe&&Oe.hasAttribute(ut)&&(nt=Oe.getAttribute(ut));const xt="dompurify"+(nt?"#"+nt:"");try{return Tt.createPolicy(xt,{createHTML:En=>En,createScriptURL:En=>En})}catch{return console.warn("TrustedTypes policy "+xt+" could not be created."),null}}(m,i)),_!==null&&typeof E=="string"&&(E=_.createHTML(""));dl&&dl(Ne),rn=Ne}},An=br({},["mi","mo","mn","ms","mtext"]),_n=br({},["foreignobject","annotation-xml"]),po=br({},["title","style","font","a","script"]),Qr=br({},[...pX,...hX,...UAt]),Ar=br({},[...vX,...WAt]),Jr=function(Ne){WA(n.removed,{element:Ne});try{x(Ne).removeChild(Ne)}catch{b(Ne)}},Ao=function(Ne,Tt){try{WA(n.removed,{attribute:Tt.getAttributeNode(Ne),from:Tt})}catch{WA(n.removed,{attribute:null,from:Tt})}if(Tt.removeAttribute(Ne),Ne==="is"&&!K[Ne])if(ke||Be)try{Jr(Tt)}catch{}else try{Tt.setAttribute(Ne,"")}catch{}},pl=function(Ne){let Tt=null,Oe=null;if(_e)Ne="<remove></remove>"+Ne;else{const xt=MSe(Ne,/^[\r\n\t ]+/);Oe=xt&&xt[0]}qt==="application/xhtml+xml"&&Ie===Me&&(Ne='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ne+"</body></html>");const nt=_?_.createHTML(Ne):Ne;if(Ie===Me)try{Tt=new p().parseFromString(nt,qt)}catch{}if(!Tt||!Tt.documentElement){Tt=C.createDocument(Ie,"template",null);try{Tt.documentElement.innerHTML=ht?E:nt}catch{}}const ut=Tt.body||Tt.documentElement;return Ne&&Oe&&ut.insertBefore(r.createTextNode(Oe),ut.childNodes[0]||null),Ie===Me?I.call(Tt,Ae?"html":"body")[0]:Ae?Tt.documentElement:ut},Go=function(Ne){return T.call(Ne.ownerDocument||Ne,Ne,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},za=function(Ne){return Ne instanceof f&&(typeof Ne.nodeName!="string"||typeof Ne.textContent!="string"||typeof Ne.removeChild!="function"||!(Ne.attributes instanceof d)||typeof Ne.removeAttribute!="function"||typeof Ne.setAttribute!="function"||typeof Ne.namespaceURI!="string"||typeof Ne.insertBefore!="function"||typeof Ne.hasChildNodes!="function")},sa=function(Ne){return typeof s=="function"&&Ne instanceof s},He=function(Ne,Tt,Oe){F[Ne]&&$D(F[Ne],nt=>{nt.call(n,Tt,Oe,rn)})},lt=function(Ne){let Tt=null;if(He("beforeSanitizeElements",Ne,null),za(Ne))return Jr(Ne),!0;const Oe=Zt(Ne.nodeName);if(He("uponSanitizeElement",Ne,{tagName:Oe,allowedTags:$}),Ne.hasChildNodes()&&!sa(Ne.firstElementChild)&&fl(/<[/\w]/g,Ne.innerHTML)&&fl(/<[/\w]/g,Ne.textContent)||Ne.nodeType===nwt||ve&&Ne.nodeType===rwt&&fl(/<[/\w]/g,Ne.data))return Jr(Ne),!0;if(!$[Oe]||ne[Oe]){if(!ne[Oe]&&Kt(Oe)&&(te.tagNameCheck instanceof RegExp&&fl(te.tagNameCheck,Oe)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Oe)))return!1;if(We&&!Ve[Oe]){const nt=x(Ne)||Ne.parentNode,ut=w(Ne)||Ne.childNodes;if(ut&&nt)for(let xt=ut.length-1;xt>=0;--xt){const En=g(ut[xt],!0);En.__removalCount=(Ne.__removalCount||0)+1,nt.insertBefore(En,y(Ne))}}return Jr(Ne),!0}return Ne instanceof u&&!function(nt){let ut=x(nt);ut&&ut.tagName||(ut={namespaceURI:Ie,tagName:"template"});const xt=UD(nt.tagName),En=UD(ut.tagName);return!!gt[nt.namespaceURI]&&(nt.namespaceURI===me?ut.namespaceURI===Me?xt==="svg":ut.namespaceURI===ze?xt==="svg"&&(En==="annotation-xml"||An[En]):!!Qr[xt]:nt.namespaceURI===ze?ut.namespaceURI===Me?xt==="math":ut.namespaceURI===me?xt==="math"&&_n[En]:!!Ar[xt]:nt.namespaceURI===Me?!(ut.namespaceURI===me&&!_n[En])&&!(ut.namespaceURI===ze&&!An[En])&&!Ar[xt]&&(po[xt]||!Qr[xt]):!(qt!=="application/xhtml+xml"||!gt[nt.namespaceURI]))}(Ne)?(Jr(Ne),!0):Oe!=="noscript"&&Oe!=="noembed"&&Oe!=="noframes"||!fl(/<\/no(script|embed|frames)/i,Ne.innerHTML)?(be&&Ne.nodeType===twt&&(Tt=Ne.textContent,$D([N,B,L],nt=>{Tt=GA(Tt,nt," ")}),Ne.textContent!==Tt&&(WA(n.removed,{element:Ne.cloneNode()}),Ne.textContent=Tt)),He("afterSanitizeElements",Ne,null),!1):(Jr(Ne),!0)},Et=function(Ne,Tt,Oe){if(rt&&(Tt==="id"||Tt==="name")&&(Oe in r||Oe in zn))return!1;if(!(J&&!se[Tt]&&fl(V,Tt))){if(!(le&&fl(P,Tt))){if(!K[Tt]||se[Tt]){if(!(Kt(Ne)&&(te.tagNameCheck instanceof RegExp&&fl(te.tagNameCheck,Ne)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Ne))&&(te.attributeNameCheck instanceof RegExp&&fl(te.attributeNameCheck,Tt)||te.attributeNameCheck instanceof Function&&te.attributeNameCheck(Tt))||Tt==="is"&&te.allowCustomizedBuiltInElements&&(te.tagNameCheck instanceof RegExp&&fl(te.tagNameCheck,Oe)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Oe))))return!1}else if(!je[Tt]){if(!fl(z,GA(Oe,U,""))){if((Tt!=="src"&&Tt!=="xlink:href"&&Tt!=="href"||Ne==="script"||zAt(Oe,"data:")!==0||!dt[Ne])&&!(Z&&!fl(H,GA(Oe,U,"")))){if(Oe)return!1}}}}}return!0},Kt=function(Ne){return Ne!=="annotation-xml"&&MSe(Ne,G)},gr=function(Ne){He("beforeSanitizeAttributes",Ne,null);const{attributes:Tt}=Ne;if(!Tt)return;const Oe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K};let nt=Tt.length;for(;nt--;){const ut=Tt[nt],{name:xt,namespaceURI:En,value:ln}=ut,Ct=Zt(xt);let Fn=xt==="value"?ln:HAt(ln);if(Oe.attrName=Ct,Oe.attrValue=Fn,Oe.keepAttr=!0,Oe.forceKeepAttr=void 0,He("uponSanitizeAttribute",Ne,Oe),Fn=Oe.attrValue,ve&&fl(/((--!?|])>)|<\/(style|title)/i,Fn)){Ao(xt,Ne);continue}if(Oe.forceKeepAttr||(Ao(xt,Ne),!Oe.keepAttr))continue;if(!ye&&fl(/\/>/i,Fn)){Ao(xt,Ne);continue}be&&$D([N,B,L],jr=>{Fn=GA(Fn,jr," ")});const Mo=Zt(Ne.nodeName);if(Et(Mo,Ct,Fn)){if(!ge||Ct!=="id"&&Ct!=="name"||(Ao(xt,Ne),Fn="user-content-"+Fn),_&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!En)switch(m.getAttributeType(Mo,Ct)){case"TrustedHTML":Fn=_.createHTML(Fn);break;case"TrustedScriptURL":Fn=_.createScriptURL(Fn)}try{En?Ne.setAttributeNS(En,xt,Fn):Ne.setAttribute(xt,Fn),za(Ne)?Jr(Ne):TSe(n.removed)}catch{}}}He("afterSanitizeAttributes",Ne,null)},Bn=function Ne(Tt){let Oe=null;const nt=Go(Tt);for(He("beforeSanitizeShadowDOM",Tt,null);Oe=nt.nextNode();)He("uponSanitizeShadowNode",Oe,null),lt(Oe)||(Oe.content instanceof a&&Ne(Oe.content),gr(Oe));He("afterSanitizeShadowDOM",Tt,null)};return n.sanitize=function(Ne){let Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Oe=null,nt=null,ut=null,xt=null;if(ht=!Ne,ht&&(Ne="<!-->"),typeof Ne!="string"&&!sa(Ne)){if(typeof Ne.toString!="function")throw qA("toString is not a function");if(typeof(Ne=Ne.toString())!="string")throw qA("dirty is not a string, aborting")}if(!n.isSupported)return Ne;if(Ce||kt(Tt),n.removed=[],typeof Ne=="string"&&(st=!1),st){if(Ne.nodeName){const Ct=Zt(Ne.nodeName);if(!$[Ct]||ne[Ct])throw qA("root node is forbidden and cannot be sanitized in-place")}}else if(Ne instanceof s)Oe=pl("<!---->"),nt=Oe.ownerDocument.importNode(Ne,!0),nt.nodeType===ewt&&nt.nodeName==="BODY"||nt.nodeName==="HTML"?Oe=nt:Oe.appendChild(nt);else{if(!ke&&!be&&!Ae&&Ne.indexOf("<")===-1)return _&&$e?_.createHTML(Ne):Ne;if(Oe=pl(Ne),!Oe)return ke?null:$e?E:""}Oe&&_e&&Jr(Oe.firstChild);const En=Go(st?Ne:Oe);for(;ut=En.nextNode();)lt(ut)||(ut.content instanceof a&&Bn(ut.content),gr(ut));if(st)return Ne;if(ke){if(Be)for(xt=k.call(Oe.ownerDocument);Oe.firstChild;)xt.appendChild(Oe.firstChild);else xt=Oe;return(K.shadowroot||K.shadowrootmode)&&(xt=O.call(o,xt,!0)),xt}let ln=Ae?Oe.outerHTML:Oe.innerHTML;return Ae&&$["!doctype"]&&Oe.ownerDocument&&Oe.ownerDocument.doctype&&Oe.ownerDocument.doctype.name&&fl(PSe,Oe.ownerDocument.doctype.name)&&(ln="<!DOCTYPE "+Oe.ownerDocument.doctype.name+`> |
|
1073 |
`+ln),be&&$D([N,B,L],Ct=>{ln=GA(ln,Ct," ")}),_&&$e?_.createHTML(ln):ln},n.setConfig=function(){kt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ce=!0},n.clearConfig=function(){rn=null,Ce=!1},n.isValidAttribute=function(Ne,Tt,Oe){rn||kt({});const nt=Zt(Ne),ut=Zt(Tt);return Et(nt,ut,Oe)},n.addHook=function(Ne,Tt){typeof Tt=="function"&&(F[Ne]=F[Ne]||[],WA(F[Ne],Tt))},n.removeHook=function(Ne){if(F[Ne])return TSe(F[Ne])},n.removeHooks=function(Ne){F[Ne]&&(F[Ne]=[])},n.removeAllHooks=function(){F={}},n}();function VSe(){return awt()}const lwt={install(e,t={},n=VSe){e.directive("dompurify-html",function(r={},o=VSe){const i=o();(function(l,s){const u=l.hooks??{};let c;for(c in u){const d=u[c];d!==void 0&&s.addHook(c,d)}})(r,i);const a=function(l,s){const u=s.value;if(s.oldValue===u)return;const c=`${u}`,d=s.arg,f=r.namedConfigurations,p=r.default??{};l.innerHTML=f&&d!==void 0?i.sanitize(c,f[d]??p):i.sanitize(c,p)};return{mounted:a,updated:a}}(t,n))}};(async()=>{const e=K7(ySe);await qne(e),(t=>{t.use(Nf)})(e),(t=>{t.component("Icon",mm)})(e),(t=>{Vce.forEach(n=>{t.use(n)}),zce.forEach(n=>{t.component(n.name,n)})})(e),(t=>{DAt.forEach(n=>{t.component(n.name,n)}),_d.use(Rqe),t.use(_d),t.use(mc)})(e),(t=>{t.use(vc)})(e),MAt(e),await vc.isReady(),e.use(lwt),e.mount("#app")})(),ji.prettyPrimary("\u6B22\u8FCE\u4F7F\u7528","\u5DE5\u4E1A\u4E92\u8054\u7F51\u5E73\u53F0")})();export{wO as $,Qn as A,he as B,ce as C,Ye as D,xw as E,bt as F,_w as G,Ew as H,Jn as I,hc as J,lQ as K,sQ as L,uQ as M,cQ as N,Dt as O,nn as P,Cw as Q,w3 as R,IDe as S,xO as T,mm as U,Sa as V,_O as W,dQ as X,fQ as Y,EO as Z,Nt as _,a9t as __tla,M as a,BDe as a$,LDe as a0,gm as a1,Rr as a2,pQ as a3,PDe as a4,jDe as a5,VDe as a6,ua as a7,Sw as a8,zDe as a9,Qe as aA,$t as aB,f0 as aC,kw as aD,hQ as aE,St as aF,HDe as aG,x3 as aH,$De as aI,_3 as aJ,UDe as aK,di as aL,WDe as aM,GDe as aN,yl as aO,Hn as aP,qDe as aQ,KDe as aR,Mf as aS,E3 as aT,vQ as aU,No as aV,Gt as aW,C3 as aX,fi as aY,Gr as aZ,qn as a_,S3 as aa,ca as ab,Dw as ac,ee as ad,$n as ae,YDe as af,mQ as ag,vc as ah,XDe as ai,gQ as aj,QDe as ak,JDe as al,CO as am,bl as an,yQ as ao,SO as ap,ZDe as aq,eOe as ar,Xn as as,mc as at,Ow as au,k3 as av,kO as aw,Nf as ax,ym as ay,dn as az,yn as b,Vs as b$,Rt as b0,Ft as b1,bQ as b2,wd as b3,vn as b4,AQ as b5,tOe as b6,DO as b7,D3 as b8,gc as b9,Ff as bA,nOe as bB,rOe as bC,wQ as bD,xQ as bE,oOe as bF,iOe as bG,aOe as bH,OO as bI,lOe as bJ,sOe as bK,_Q as bL,yc as bM,bm as bN,Kn as bO,an as bP,Tw as bQ,uOe as bR,cOe as bS,Ga as bT,EQ as bU,Mw as bV,pn as bW,mt as bX,O3 as bY,CQ as bZ,dOe as b_,fOe as ba,pOe as bb,oo as bc,SQ as bd,Nw as be,kQ as bf,qe as bg,DQ as bh,OQ as bi,Fw as bj,TQ as bk,xd as bl,Yo as bm,bc as bn,TO as bo,Zl as bp,Xt as bq,hOe as br,Al as bs,MQ as bt,p0 as bu,Rw as bv,ka as bw,Iw as bx,xo as by,$i as bz,fe as c,T3 as c$,vOe as c0,NQ as c1,Am as c2,mOe as c3,FQ as c4,RQ as c5,rr as c6,zs as c7,Tn as c8,es as c9,MO as cA,wl as cB,NO as cC,Bw as cD,FO as cE,RO as cF,IO as cG,BO as cH,LO as cI,PO as cJ,IQ as cK,BQ as cL,LQ as cM,PQ as cN,jQ as cO,gOe as cP,yOe as cQ,jO as cR,VO as cS,VQ as cT,Lw as cU,M3 as cV,bOe as cW,zQ as cX,HQ as cY,$Q as cZ,N3 as c_,h0 as ca,Ui as cb,da as cc,v0 as cd,Pw as ce,F3 as cf,Wi as cg,wn as ch,Zn as ci,qa as cj,Ac as ck,jw as cl,Vw as cm,zO as cn,UQ as co,ts as cp,ns as cq,AOe as cr,fa as cs,Ut as ct,xn as cu,WQ as cv,GQ as cw,Xo as cx,Rf as cy,qQ as cz,Te as d,zw as d$,wm as d0,wOe as d1,xm as d2,m0 as d3,Su as d4,xOe as d5,pa as d6,R3 as d7,_Oe as d8,EOe as d9,KQ as dA,_d as dB,COe as dC,HO as dD,Hw as dE,SOe as dF,kOe as dG,DOe as dH,Nr as dI,OOe as dJ,YQ as dK,Qo as dL,TOe as dM,MOe as dN,NOe as dO,XQ as dP,FOe as dQ,QQ as dR,Ka as dS,ROe as dT,IOe as dU,Ed as dV,xl as dW,Hs as dX,JQ as dY,I3 as dZ,BOe as d_,LOe as da,ZQ as db,$O as dc,UO as dd,_l as de,_m as df,B3 as dg,g0 as dh,El as di,POe as dj,eJ as dk,tJ as dl,y0 as dm,nJ as dn,WO as dp,$w as dq,wc as dr,Cd as ds,GO as dt,qO as du,$s as dv,jOe as dw,VOe as dx,zOe as dy,KO as dz,Lt as e,rJ as e0,HOe as e1,YO as e2,$Oe as e3,oJ as e4,_t as f,Pe as g,Fe as h,bn as i,ft as j,ie as k,iJ as l,Un as m,oe as n,Y as o,UOe as p,Cr as q,de as r,Ya as s,dr as t,aJ as u,lJ as v,Je as w,XO as x,WOe as y,ku as z}; |
|
1074 |
function __vite__mapDeps(indexes) { |
|
1075 |
if (!__vite__mapDeps.viteFileDeps) { |
|
1076 |
__vite__mapDeps.viteFileDeps = ["assets/403-C3njrW1B.js","assets/Error.vue_vue_type_script_setup_true_lang-4IJzYCko.js","assets/404-Df4057FR.js","assets/500-BeG3Ja1t.js","assets/Index2-BrXgvzlQ.js","assets/index-BTFEG66G.js","assets/ToolHeader-fGIEHLBi.js","assets/XButton-BfzTlH8o.js","assets/XButton-DYff_jSU.css","assets/el-avatar-DuLjWuSU.js","assets/el-avatar-59mKYfyG.css","assets/formatTime-DwR9f7DP.js","assets/index-DTTJX9Ya.js","assets/el-dropdown-item-BW-wC9MJ.js","assets/el-dropdown-item-BrDVK7WC.css","assets/tagsView-DQpvPGX0.js","assets/Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js","assets/Dialog-BdewL7YE.css","assets/useValidator-CKF7yVmu.js","assets/tree-BBZY150N.js","assets/LocaleDropdown.vue_vue_type_script_setup_true_lang-C1_iMzaR.js","assets/el-button-group-ou1b9mwh.css","assets/ToolHeader-DmsqBX2J.css","assets/Index2-i2uXlKJO.css","assets/Login-eIV7ELhl.js","assets/logo-BKeFBQsR.js","assets/login-box-bg-CgotIC_L.js","assets/ThemeSwitch-kktbYEVv.js","assets/useIcon-DZqEaX5R.js","assets/ThemeSwitch-TW9QG3Ix.css","assets/LoginForm-DmQqCWC8.js","assets/Verify-Caf2Rnns.js","assets/Verify-6k5ori_o.css","assets/LoginFormTitle.vue_vue_type_script_setup_true_lang-BdHKqTBo.js","assets/formRules-9V-NAySD.js","assets/LoginForm-DGFUufA1.css","assets/MobileForm-BwD5BqYs.js","assets/MobileForm-2N7Ej7pZ.css","assets/Form.vue_vue_type_style_index_0_scoped_09f6ff61_lang-D5RcC1zQ.js","assets/el-virtual-list-DJUo12qZ.js","assets/el-virtual-list-rfJ2-s6H.css","assets/el-tree-select-pYALMRc9.js","assets/el-tree-select-CKlBvrqO.css","assets/InputPassword-Da-PE-q6.js","assets/InputPassword-xqMp5d9J.css","assets/Form-DuSiGXu8.css","assets/QrCodeForm.vue_vue_type_script_setup_true_lang-qcbfGX-c.js","assets/el-card-bU92WWV4.js","assets/el-card-BRs6t4Sx.css","assets/QrCodeForm-DNYY6tXC.css","assets/Login-CXEHpsyE.css","assets/SocialLogin-BnFjod1I.js","assets/SocialLogin-Can16JpL.css","assets/LoginFormTitle-Dj_rO8Yu.js","assets/QrCodeForm-fybGn-E-.js","assets/RegisterForm-Cmvb3GJh.js","assets/Form-CFzd3m81.js","assets/useForm-sMS-5OOc.js","assets/SSOLogin-Cyi_kSmX.js","assets/Index-C58mdRyU.js","assets/BasicInfo.vue_vue_type_script_setup_true_lang-DDdyw5Vl.js","assets/profile-D2d8moUa.js","assets/ProfileUser-Xh59PtIz.js","assets/UserAvatar-C0MdBRR4.js","assets/UserAvatar-CwM0JGvx.css","assets/ProfileUser-DauWhksk.css","assets/ResetPwd.vue_vue_type_script_setup_true_lang-DxY6sbkv.js","assets/UserSocial.vue_vue_type_script_setup_true_lang-DXmG42kH.js","assets/XTextButton-B6L8upsJ.js","assets/XTextButton-C4zGMyiT.css","assets/constants-CuOBQ73z.js","assets/Index-Con7Wr0K.css","assets/BasicInfo-D50vTdBQ.js","assets/ResetPwd-CmgEQAbi.js","assets/UserSocial-aZof3tVi.js","assets/CategoryForm-Dap-RjEt.js","assets/CategoryForm.vue_vue_type_script_setup_true_lang-9i_j7Xpr.js","assets/index-qIioACxn.js","assets/index-97lRpI6I.js","assets/index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js","assets/index-BZESAUPP.js","assets/DictTag.vue_vue_type_script_lang-DwXPHgid.js","assets/color-DXkOL5Tu.js","assets/ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js","assets/index-DIodGfFA.js","assets/bpmn-embedded-DgbZ9dtA.js","assets/index-CeFKtjBg.js","assets/index-NsInNyZ_.js","assets/index-BdNokKwC.js","assets/index-DkNlrmPs.js","assets/index-vFgEqmZu.js","assets/index-Y1ylnZaQ.js","assets/index-ox_WxZBR.js","assets/el-drawer-CuGR_O5R.js","assets/el-drawer-6tlglFsG.css","assets/index-BRcqC2Y4.js","assets/bpmn-embedded-CpnPu0S0.css","assets/index-C5h6z2YM.js","assets/formCreate-4fM2e5HN.js","assets/index-C4SO0Kfq.js","assets/useFormCreateDesigner-DHu111_t.js","assets/dict.type-FYuZ3DI6.js","assets/index-CuLYrEPr.js","assets/UserGroupForm-CVKcJY4c.js","assets/UserGroupForm.vue_vue_type_script_setup_true_lang-pwAyI0qe.js","assets/index-I-u8UXfO.js","assets/ModelForm-_zTE2K7u.js","assets/ModelForm.vue_vue_type_script_setup_true_lang-DSoQinCM.js","assets/index-D1RxyxVK.js","assets/ModelImportForm-Bmlfai10.js","assets/ModelImportForm.vue_vue_type_script_setup_true_lang-CpKJC_-x.js","assets/index-hhUeFszk.js","assets/index-DlKT4_cY.css","assets/index-vvdfOLXR.js","assets/el-image-CQbvaLia.js","assets/el-image-BrUZgf8Q.css","assets/create-YDTdFbew.js","assets/index-B8sHfnMD.js","assets/detail-D4luXcIi.js","assets/el-descriptions-item-BuMEVwqR.js","assets/el-descriptions-item-D_IHWRLM.css","assets/index-CAJBdJt5.js","assets/index-DMqCuIfZ.js","assets/ProcessExpressionForm-C0si1nWr.js","assets/ProcessExpressionForm.vue_vue_type_script_setup_true_lang-B2GqxT-a.js","assets/index-BUi65MjA.js","assets/index-CiJ6gEhw.js","assets/ProcessInstanceBpmnViewer.vue_vue_type_style_index_0_lang-BqVMBg67.js","assets/ProcessInstanceBpmnViewer-D6pGjtXC.css","assets/index-CjuDOozN.css","assets/ProcessInstanceBpmnViewer-BCabhZMF.js","assets/ProcessInstanceTaskList-BAXlq3-T.js","assets/ProcessInstanceTaskList.vue_vue_type_script_setup_true_lang-CXDyHZKv.js","assets/el-timeline-item-DBF-RmS6.js","assets/el-timeline-item-uzx6ttP-.css","assets/TaskSignList.vue_vue_type_script_setup_true_lang-BeK2MDy8.js","assets/TaskSignDeleteForm.vue_vue_type_script_setup_true_lang-b-uPzDeh.js","assets/index-CMi8END7.js","assets/TaskDelegateForm-DfEbXqRR.js","assets/TaskDelegateForm.vue_vue_type_script_setup_true_lang-CMS0k1TH.js","assets/TaskReturnForm-C44r83kJ.js","assets/TaskReturnForm.vue_vue_type_script_name_TaskRollbackDialogForm_setup_true_lang-CoEKifd_.js","assets/TaskSignCreateForm-CTFYhv9M.js","assets/TaskSignCreateForm.vue_vue_type_script_setup_true_lang-DGqrqeGt.js","assets/TaskSignDeleteForm-Bqrfw94u.js","assets/TaskSignList-BjpTApU7.js","assets/TaskTransferForm-DB9nNZVa.js","assets/TaskTransferForm.vue_vue_type_script_setup_true_lang-nqL2j16d.js","assets/index-DQD4RNFA.js","assets/index-DTO4W-Dl.js","assets/index-rza34a39.js","assets/ProcessListenerForm-CKzhloSV.js","assets/ProcessListenerForm.vue_vue_type_script_setup_true_lang-DiFHzMsr.js","assets/index-D-GqyCS0.js","assets/index-8Av-n9mU.js","assets/index-D4OAIF_x.css","assets/index-DhNrfIGz.js","assets/index-BP0jixUN.js","assets/index-Du6jOj90.js","assets/index-C9J_2f2c.js","assets/ModBusDeviceForm-Bdr5fm2X.js","assets/ModBusDeviceForm.vue_vue_type_script_setup_true_lang-DgCpFMG9.js","assets/index-cayQWHiR.js","assets/ScheduleJobForm-qWCds9nR.js","assets/ScheduleJobForm.vue_vue_type_script_setup_true_lang-BD-mUfDc.js","assets/index-TlhH24JX.js","assets/DemoForm-DeYLW7Bx.js","assets/DemoForm.vue_vue_type_script_setup_true_lang-oJXnRt53.js","assets/index-D1B9ZO92.js","assets/download-e0EdwhTv.js","assets/ApiAccessLogDetail-Ce-42Zwf.js","assets/ApiAccessLogDetail.vue_vue_type_script_setup_true_lang-ClbnDPKP.js","assets/index-5Ca2gdiz.js","assets/ApiErrorLogDetail-DBlutMU6.js","assets/ApiErrorLogDetail.vue_vue_type_script_setup_true_lang-BMCsNwOK.js","assets/index-FNjJ7Ifl.js","assets/index-C5cbiYhU.js","assets/java-Dj9vEU5d.js","assets/java-CGk0_04g.css","assets/EditTable-PVnEl7F7.js","assets/BasicInfoForm.vue_vue_type_script_setup_true_lang-LnkutEsP.js","assets/ColumInfoForm.vue_vue_type_script_setup_true_lang-Duc7fGcF.js","assets/GenerateInfoForm.vue_vue_type_script_setup_true_lang-7ItbqkoW.js","assets/index-BtTbjW0J.js","assets/index-Abw9tEaW.js","assets/ImportTable-Q_4XyVyA.js","assets/ImportTable.vue_vue_type_script_setup_true_lang-BrGeogSa.js","assets/index-BX1jjyoD.js","assets/PreviewCode-C63Jj1wc.js","assets/PreviewCode.vue_vue_type_style_index_0_lang-Hb1VU02G.js","assets/PreviewCode-xvKbIAPl.css","assets/BasicInfoForm-BujhGjNv.js","assets/ColumInfoForm-D-VPUIWa.js","assets/GenerateInfoForm-BYU9x5XP.js","assets/index-CjU98Foc.js","assets/ConfigForm-CcQy9uwF.js","assets/ConfigForm.vue_vue_type_script_setup_true_lang-D2G4zk5w.js","assets/index-BNt-RPr-.js","assets/index-B6-AS63z.js","assets/DataSourceConfigForm-Cc3UO513.js","assets/DataSourceConfigForm.vue_vue_type_script_setup_true_lang-mcacgB5r.js","assets/index-CS--F4H0.js","assets/index-Ci_k-M0y.js","assets/IFrame.vue_vue_type_script_setup_true_lang-5_jtBsQC.js","assets/FileForm-vdWktgSq.js","assets/FileForm.vue_vue_type_script_setup_true_lang-CnQrRREf.js","assets/index-DZOqyKkh.js","assets/FileConfigForm-BTauTe0f.js","assets/FileConfigForm.vue_vue_type_script_setup_true_lang-CT5fzbrG.js","assets/index-DhdwKmIZ.js","assets/JobDetail-bxPwHyhP.js","assets/JobDetail.vue_vue_type_script_setup_true_lang-CdsDcxKW.js","assets/index-BurMR7Th.js","assets/JobForm-CP4qQl-3.js","assets/JobForm.vue_vue_type_script_setup_true_lang-CoOEboRs.js","assets/JobForm-wzjfQlLD.css","assets/index-Bp3JsZ7W.js","assets/permission-BEe7BIhI.js","assets/JobLogDetail-BrFH-XZw.js","assets/JobLogDetail.vue_vue_type_script_setup_true_lang-Dv5JKFqM.js","assets/index-Bi1gRqfn.js","assets/index-wEL30NBu.js","assets/Echart.vue_vue_type_script_setup_true_lang-CUhHxp-X.js","assets/index-dGATVPtG.js","assets/index-CGucII1E.js","assets/index_rec-CHIgIcZf.js","assets/index-JP535Zng.js","assets/index-9PZasrrd.js","assets/index--F_kuFHY.js","assets/index-C-vYbcvV.js","assets/AppForm-BjUegUCd.js","assets/AppForm.vue_vue_type_script_setup_true_lang-DoQhCg1P.js","assets/index-Br3-yVWh.js","assets/index-CdDMcTFE.js","assets/index-Cw4tru0C.js","assets/AppGroupForm-D7PyvT_H.js","assets/AppGroupForm.vue_vue_type_script_setup_true_lang-Dw4oQfSq.js","assets/index-CXr9GbPn.js","assets/AppMenuForm-CzSPXAxX.js","assets/AppMenuForm.vue_vue_type_script_setup_true_lang-DISWSUcv.js","assets/Tooltip.vue_vue_type_script_setup_true_lang-DU3-PeCc.js","assets/index-BEzAzG9Z.js","assets/AreaForm-B-ZrMlwU.js","assets/AreaForm.vue_vue_type_script_setup_true_lang-DvZrpVj9.js","assets/index-CcrUXSJq.js","assets/index-BBXEaI3n.css","assets/DeptForm-JDfZ5LXs.js","assets/DeptForm.vue_vue_type_script_setup_true_lang-BniUbzt4.js","assets/index-ClFq84Dt.js","assets/DictTypeForm-Cy99RhwM.js","assets/DictTypeForm.vue_vue_type_script_setup_true_lang-zVIZKXd7.js","assets/DictDataForm-ClnzEbt5.js","assets/DictDataForm.vue_vue_type_script_setup_true_lang-BuK30qO4.js","assets/index-D_26zh9S.js","assets/index-BK6Fgvl7.js","assets/LoginLogDetail-DPwXgsGH.js","assets/LoginLogDetail.vue_vue_type_script_setup_true_lang-B66cGgWN.js","assets/index-CFtJXhGu.js","assets/MailAccountDetail-D7EyLrUT.js","assets/MailAccountDetail.vue_vue_type_script_setup_true_lang-tEymLTfD.js","assets/Descriptions-DqoepVxh.js","assets/Descriptions-BFnuuTfN.css","assets/useCrudSchemas-C857pLxT.js","assets/account.data-CGzUiLMk.js","assets/MailAccountForm-BpWCS-fR.js","assets/MailAccountForm.vue_vue_type_script_setup_true_lang-DhtkioXo.js","assets/index-Bvzmwz0j.js","assets/useTable-C6Yqovep.js","assets/useTable-M4eiVa6K.css","assets/MailLogDetail-DVEturGS.js","assets/MailLogDetail.vue_vue_type_script_setup_true_lang-BBOsfONa.js","assets/index--7wnyo3e.js","assets/MailTemplateForm-DxfUXL4x.js","assets/MailTemplateForm.vue_vue_type_script_setup_true_lang-Cv6ILmYk.js","assets/index-CC9P7Y1v.js","assets/MailTemplateSendForm-CzFuNq6T.js","assets/MailTemplateSendForm.vue_vue_type_script_setup_true_lang-D_q_Z5uu.js","assets/index-CFWheoIY.js","assets/MenuForm-5PeXOZ0h.js","assets/MenuForm.vue_vue_type_script_setup_true_lang-B3BsOB4e.js","assets/index-DpGFnJCN.js","assets/NoticeForm-Bc6Jj63Q.js","assets/NoticeForm.vue_vue_type_script_setup_true_lang-C5kCUHIa.js","assets/index--BL1Tj1G.js","assets/NotifyMessageDetail-BHrMdrGO.js","assets/NotifyMessageDetail.vue_vue_type_script_setup_true_lang-qKCHAKUG.js","assets/index-CRpGGJIy.js","assets/MyNotifyMessageDetail-B8WGLlXB.js","assets/MyNotifyMessageDetail.vue_vue_type_script_setup_true_lang-By55ICXE.js","assets/index-Ds3WEynp.js","assets/NotifyTemplateForm-DQ3VwKU3.js","assets/NotifyTemplateForm.vue_vue_type_script_setup_true_lang-uDgTmACp.js","assets/index-Bvwxza6N.js","assets/NotifyTemplateSendForm-gytSnt5S.js","assets/NotifyTemplateSendForm.vue_vue_type_script_setup_true_lang-Wc12K9TE.js","assets/index-BO-PBizS.js","assets/ClientForm-CQIXgd22.js","assets/ClientForm.vue_vue_type_script_setup_true_lang-Bpw06q1t.js","assets/index-CZ0FAmsS.js","assets/index-BlGrx8zO.js","assets/OperateLogDetail-C9fTkDkI.js","assets/OperateLogDetail.vue_vue_type_script_setup_true_lang-mEyl2rgh.js","assets/index-Cn7uhldH.js","assets/PostForm-DAtTERGI.js","assets/PostForm.vue_vue_type_script_setup_true_lang-0UdXDls6.js","assets/index-BkadTgAv.js","assets/RoleAssignMenuForm-DCm5byhF.js","assets/index-B9sptnFO.js","assets/RoleAssignMenuForm-CJXRELC9.css","assets/RoleDataPermissionForm-CnHp3M8L.js","assets/RoleDataPermissionForm.vue_vue_type_script_setup_true_lang-TrPoSNYm.js","assets/RoleForm-Cy5sLDMY.js","assets/RoleForm.vue_vue_type_script_setup_true_lang-B2v67vha.js","assets/index-vYfiymmM.js","assets/SmsChannelForm-ZZ6ETlc9.js","assets/SmsChannelForm.vue_vue_type_script_setup_true_lang-DXWds-UQ.js","assets/index-wN65iY9u.js","assets/index-BceOdX1M.js","assets/SmsLogDetail-wgR5LTbI.js","assets/SmsLogDetail.vue_vue_type_script_setup_true_lang-DGSjoRHw.js","assets/index-Dw-KWMro.js","assets/SmsTemplateForm-DXCZAlzx.js","assets/SmsTemplateForm.vue_vue_type_script_setup_true_lang-DEdlFzGI.js","assets/index-BiqsPth1.js","assets/SmsTemplateSendForm-kdOnxoKf.js","assets/SmsTemplateSendForm.vue_vue_type_script_setup_true_lang-8dNIojA4.js","assets/index-C7ONju3p.js","assets/SocialClientForm-6W-mO7_N.js","assets/SocialClientForm.vue_vue_type_script_setup_true_lang-c1c69chP.js","assets/index-D2nMxQrn.js","assets/SocialUserDetail-BKVRMSso.js","assets/SocialUserDetail.vue_vue_type_script_setup_true_lang-DQJiYafq.js","assets/index-Df3SSbk6.js","assets/TenantForm-BJTYSfTQ.js","assets/TenantForm.vue_vue_type_script_setup_true_lang-DPhVFJYm.js","assets/index-ml7XefzV.js","assets/index-B9gBYVdL.js","assets/TenantPackageForm-C6XNQn_6.js","assets/TenantPackageForm-Y7TatbGs.css","assets/index-CdBBzK-d.js","assets/DeptTree-_PYgjqJ9.js","assets/DeptTree.vue_vue_type_script_setup_true_lang-SrBMShWN.js","assets/UserAssignRoleForm-DbuijVRv.js","assets/UserAssignRoleForm.vue_vue_type_script_setup_true_lang-BIyYYdPa.js","assets/UserForm-BC4rWABp.js","assets/UserForm.vue_vue_type_script_setup_true_lang-Boekhu2q.js","assets/UserImportForm-Cdv4dJce.js","assets/UserImportForm.vue_vue_type_script_setup_true_lang-B9eU9TVY.js","assets/index-BEJHajxs.js","assets/Layout-CQGQ8vsG.js","assets/Layout-DQ2eXgIJ.css"] |
|
1077 |
} |
|
1078 |
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) |
|
1079 |
} |
|
1080 |
|
|
1081 |
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6IkFBQ08sb3NCQUFzQixtQkFBWEEsT0FBd0IsR0FDakMsT0FBU0MsT0FDUCxHQUFJQyxHQUFPQyxRQUFTRCxNQUNoQkUsQ0FBU0QsVUFBU0UsY0FBZSx5QkFD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ybWF0aW9ucy5wdXNoKFxuICAgICAgICAgIFwidHJhbnNsYXRlKFwiICsgKGJveC53aWR0aCArIGJveC5sZWZ0KS50b1N0cmluZygpICsgXCIgXCIgKyAoMCAtIGJveC50b3ApLnRvU3RyaW5nKCkgKyBcIilcIlxuICAgICAgICApO1xuICAgICAgICB0cmFuc2Zvcm1hdGlvbnMucHVzaChcInNjYWxlKC0xIDEpXCIpO1xuICAgICAgICBib3gudG9wID0gYm94LmxlZnQgPSAwO1xuICAgICAgfVxuICAgIH0gZWxzZSBpZiAodkZsaXApIHtcbiAgICAgIHRyYW5zZm9ybWF0aW9ucy5wdXNoKFxuICAgICAgICBcInRyYW5zbGF0ZShcIiArICgwIC0gYm94LmxlZnQpLnRvU3RyaW5nKCkgKyBcIiBcIiArIChib3guaGVpZ2h0ICsgYm94LnRvcCkudG9TdHJpbmcoKSArIFwiKVwiXG4gICAgICApO1xuICAgICAgdHJhbnNmb3JtYXRpb25zLnB1c2goXCJzY2FsZSgxIC0xKVwiKTtcbiAgICAgIGJveC50b3AgPSBib3gubGVmdCA9IDA7XG4gICAgfVxuICAgIGxldCB0ZW1wVmFsdWU7XG4gICAgaWYgKHJvdGF0aW9uIDwgMCkge1xuICAgICAgcm90YXRpb24gLT0gTWF0aC5mbG9vcihyb3RhdGlvbiAvIDQpICogNDtcbiAgICB9XG4gICAgcm90YXRpb24gPSByb3RhdGlvbiAlIDQ7XG4gICAgc3dpdGNoIChyb3RhdGlvbikge1xuICAgICAgY2FzZSAxOlxuICAgICAgICB0ZW1wVmFsdWUgPSBib3guaGVpZ2h0IC8gMiArIGJveC50b3A7XG4gICAgICAgIHRyYW5zZm9ybWF0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIFwicm90YXRlKDkwIFwiICsgdGVtcFZhbHVlLnRvU3RyaW5nKCkgKyBcIiBcIiArIHRlbXBWYWx1ZS50b1N0cmluZygpICsgXCIpXCJcbiAgICAgICAgKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDI6XG4gICAgICAgIHRyYW5zZm9ybWF0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIFwicm90YXRlKDE4MCBcIiArIChib3gud2lkdGggLyAyICsgYm94LmxlZnQpLnRvU3RyaW5nKCkgKyBcIiBcIiArIChib3guaGVpZ2h0IC8gMiArIGJveC50b3ApLnRvU3RyaW5nKCkgKyBcIilcIlxuICAgICAgICApO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMzpcbiAgICAgICAgdGVtcFZhbHVlID0gYm94LndpZHRoIC8gMiArIGJveC5sZWZ0O1xuICAgICAgICB0cmFuc2Zvcm1hdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBcInJvdGF0ZSgtOTAgXCIgKyB0ZW1wVmFsdWUudG9TdHJpbmcoKSArIFwiIFwiICsgdGVtcFZhbHVlLnRvU3RyaW5nKCkgKyBcIilcIlxuICAgICAgICApO1xuICAgICAgICBicmVhaztcbiAgICB9XG4gICAgaWYgKHJvdGF0aW9uICUgMiA9PT0gMSkge1xuICAgICAgaWYgKGJveC5sZWZ0ICE9PSBib3gudG9wKSB7XG4gICAgICAgIHRlbXBWYWx1ZSA9IGJveC5sZWZ0O1xuICAgICAgICBib3gubGVmdCA9IGJveC50b3A7XG4gICAgICAgIGJveC50b3AgPSB0ZW1wVmFsdWU7XG4gICAgICB9XG4gICAgICBpZiAoYm94LndpZHRoICE9PSBib3guaGVpZ2h0KSB7XG4gICAgICAgIHRlbXBWYWx1ZSA9IGJveC53aWR0aDtcbiAgICAgICAgYm94LndpZHRoID0gYm94LmhlaWdodDtcbiAgICAgICAgYm94LmhlaWdodCA9IHRlbXBWYWx1ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgaWYgKHRyYW5zZm9ybWF0aW9ucy5sZW5ndGgpIHtcbiAgICAgIGJvZHkgPSAnPGcgdHJhbnNmb3JtPVwiJyArIHRyYW5zZm9ybWF0aW9ucy5qb2luKFwiIFwiKSArICdcIj4nICsgYm9keSArIFwiPC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AgcHJvdmlkZXIsXG4gICAgICAgICAgICAgIHByZWZpeCxcbiAgICAgICAgICAgICAgbmFtZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSBlbHNlIGlmIChzdG9yYWdlLm1pc3NpbmcuaGFzKG5hbWUpKSB7XG4gICAgICAgICAgICBpY29ucy5taXNzaW5nLnB1c2goe1xuICAgICAgICAgICAgICBwcm92aWRlcixcbiAgICAgICAgICAgICAgcHJlZml4LFxuICAgICAgICAgICAgICBuYW1lXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaGFzUGVuZGluZyA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKGljb25zLnBlbmRpbmcubGVuZ3RoICE9PSBvbGRMZW5ndGgpIHtcbiAgICAgICAgICBpZiAoIWhhc1BlbmRpbmcpIHtcbiAgICAgICAgICAgIHJlbW92ZUNhbGxiYWNrKFtzdG9yYWdlXSwgaXRlbS5pZCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGl0ZW0uY2FsbGJhY2soXG4gICAgICAgICAgICBpY29ucy5sb2FkZWQuc2xpY2UoMCksXG4gICAgICAgICAgICBpY29ucy5taXNzaW5nLnNsaWNlKDApLFxuICAgICAgICAgICAgaWNvbnMucGVuZGluZy5zbGljZSgwKSxcbiAgICAgICAgICAgIGl0ZW0uYWJvcnRcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxufVxubGV0IGlkQ291bnRlciA9IDA7XG5mdW5jdGlvbiBzdG9yZUNhbGxiYWNrKGNhbGxiYWNrLCBpY29ucywgcGVuZGluZ1NvdXJjZXMpIHtcbiAgY29uc3QgaWQgPSBpZENvdW50ZXIrKztcbiAgY29uc3QgYWJvcnQgPSByZW1vdmVDYWxsYmFj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UuaWNvbnNRdWV1ZUZsYWcgPSB0cnVlO1xuICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgc3RvcmFnZS5pY29uc1F1ZXVlRmxhZyA9IGZhbHNlO1xuICAgICAgY29uc3QgeyBwcm92aWRlciwgcHJlZml4IH0gPSBzdG9yYWdlO1xuICAgICAgY29uc3QgaWNvbnMyID0gc3RvcmFnZS5pY29uc1RvTG9hZDtcbiAgICAgIGRlbGV0ZSBzdG9yYWdlLmljb25zVG9Mb2FkO1xuICAgICAgbGV0IGFwaTtcbiAgICAgIGlmICghaWNvbnMyIHx8ICEoYXBpID0gZ2V0QVBJTW9kdWxlKHByb3ZpZGVyKSkpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgY29uc3QgcGFyYW1zID0gYXBpLnByZXBhcmUocHJvdmlkZXIsIHByZWZpeCwgaWNvbnMyKTtcbiAgICAgIHBhcmFtcy5mb3JFYWNoKChpdGVtKSA9PiB7XG4gICAgICAgIHNlbmRBUElRdWVyeShwcm92aWRlciwgaXRlbSwgKGRhdGEpID0+IHtcbiAgICAgICAgICBpZiAodHlwZW9mIGRhdGEgIT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgIGl0ZW0uaWNvbnMuZm9yRWFjaCgobmFtZSkgPT4ge1xuICAgICAgICAgICAgICBzdG9yYWdlLm1pc3NpbmcuYWRkKG5hbWUpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbnN0IHBhcnNlZCA9IGFkZEljb25TZXQoXG4gICAgICAgICAgICAgICAgc3RvcmFnZSxcbiAgICAgICAgICAgICAgICBkYXRhXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIGlmICghcGFyc2VkLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBjb25zdCB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5nU2NhbiA9IHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgZGVsZXRlIG9ic2VydmVyLnBlbmRpbmdTY2FuO1xuICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgY2FsbGJhY2sobm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn1cbi8qKlxuICogQ2hlY2sgbXV0YXRpb25zIGZvciBhZGRlZCBub2Rlc1xuICovXG5mdW5jdGlvbiBjaGVja011dGF0aW9ucyhub2RlLCBtdXRhdGlvbnMpIHtcbiAgICBpZiAoIW5vZGUub2JzZXJ2ZXIpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBjb25zdCBvYnNlcnZlciA9IG5vZGUub2JzZXJ2ZXI7XG4gICAgaWYgKCFvYnNlcnZlci5wZW5kaW5nU2Nhbikge1xuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG11dGF0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgY29uc3QgaXRlbSA9IG11dGF0aW9uc1tpXTtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIC8vIENoZWNrIGZvciBhZGRlZCBub2Rlc1xuICAgICAgICAgICAgKGl0ZW0uYWRkZWROb2RlcyAmJiBpdGVtLmFkZGVkTm9kZXMubGVuZ3RoID4gMCkgfHxcbiAgICAgICAgICAgICAgICAvLyBDaGVjayBmb3IgaWNvbiBvciBwbGFjZWhvbGRlciB3aXRoIG1vZGlmaWVkIGF0dHJpYnV0ZXNcbiAgICAgICAgICAgICAgICAoaXRlbS50eXBlID09PSAnYXR0cmlidXRlcycgJiZcbiAgICAgICAgICAgICAgICAgICAgaXRlbS50YXJnZXRbZWxlbWVudERhdGFQcm9wZXJ0eV0gIT09XG4gICAgICAgICAgICAgICAgICAgICAgICB2b2lkIDApKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFvYnNlcnZlci5wYXVzZWQ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gICAgICAgICAgaWYgKCFvYnNlcnZlci5wYXVzZWQpIHtcbiAgICAgICAgICAgICAgICAvLyBTdGFydCAvIHJlc3VtZVxuICAgICAgICAgICAgICAgIGNvbnN0IHJvb3QgPSB0eXBlb2Ygbm9kZS5ub2RlID09PSAnZnVuY3Rpb24nID8gbm9kZS5ub2RlKCkgOiBub2RlLm5vZGU7XG4gICAgICAgICAgICAgICAgaWYgKCFyb290KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAob2JzZXJ2ZXIuaW5zdGFuY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWVPYnNlcnZpbmcobm9kZSwgcm9vdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzdGFydE9ic2VydmVyKG5vZGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xufVxuLyoqXG4gKiBSZXN1bWUgb2JzZXJ2ZXJcbiAqL1xuZnVuY3Rpb24gcmVzdW1lT2JzZXJ2ZXIocm9vdCkge1xuICAgIGlmIChyb290KSB7XG4gICAgICAgIGNvbnN0IG5vZGUgPSBmaW5kUm9vdE5vZGUocm9vdCk7XG4gICAgICAgIGlmIChub2RlKSB7XG4gICAgICAgICAgICByZXN1bWVPYnNlcnZpbmdOb2RlKG5vZGUpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXN1bWVPYnNlcnZpbmdOb2RlKCk7XG4gICAgfVxufVxuLyoqXG4gKiBPYnNlcnZlIG5vZGVcbiAqL1xuZnVuY3Rpb24gb2JzZXJ2ZShyb290LCBhdXRvUmVtb3ZlID0gZmFsc2UpIHtcbiAgICBjb25zdCBub2RlID0gYWRkUm9vdE5vZGUocm9vdCwgYXV0b1JlbW92ZSk7XG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ZXJdW3ByZWZpeF0gPSBTZXQ8bmFtZT5cbiAgICBjb25zdCBpY29uc1RvTG9hZCA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gICAgZnVuY3Rpb24gZ2V0SWNvbihpY29uLCBsb2FkKSB7XG4gICAgICAgIGNvbnN0IHsgcHJvdmlkZXIsIHByZWZpeCwgbmFtZSB9ID0gaWNvbjtcbiAgICAgICAgY29uc3Qgc3RvcmFnZSA9IGdldFN0b3JhZ2UocHJvdmlkZXIsIHByZWZpeCk7XG4gICAgICAgIGNvbnN0IHN0b3JlZEljb24gPSBzdG9yYWdlLmljb25zW25hbWVdO1xuICAgICAgICBpZiAoc3RvcmVkSWNvbikge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdsb2FkZWQnLFxuICAgICAgICAgICAgICAgIGljb246IHN0b3JlZEljb24sXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGlmIChzdG9yYWdlLm1pc3NpbmcuaGFzKG5hbWUpKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHN0YXR1czogJ21pc3NpbmcnLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobG9hZCAmJiAhaXNQZW5kaW5nKGljb24pKSB7XG4gICAgICAgICAgICBjb25zdCBwcm92aWRlckljb25zVG9Mb2FkID0gaWNvbnNUb0xvYWRbcHJvdmlkZXJdIHx8XG4gICAgICAgICAgICAgICAgKGljb25zVG9Mb2FkW3Byb3ZpZGVyXSA9IE9iamVjdC5jcmVhdGUobnVsbCkpO1xuICAgICAgICAgICAgY29uc3Qgc2V0ID0gcHJvdmlkZXJJY29uc1RvTG9hZFtwcmVmaXhdIHx8XG4gICAgICAgICAgICAgICAgKHByb3ZpZGVySWNvbnNUb0xvYWRbcHJlZml4XSA9IG5ldyBTZXQoKSk7XG4gICAgICAgICAgICBzZXQuYWRkKG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzdGF0dXM6ICdsb2FkaW5nJyxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgLy8gUGFyc2UgYWxsIHJvb3Qgbm9kZXNcbiAgICAocm9vdE5vZGUgPyBbcm9vdE5vZGVdIDogbGlzdFJvb3ROb2RlcygpKS5mb3JFYWNoKChvYnNlcnZlZE5vZGUpID0+IHtcbiAgICAgICAgY29uc3Qgcm9vdCA9IHR5cGVvZiBvYnNlcnZlZE5vZGUubm9kZSA9PT0gJ2Z1bmN0aW9uJ1xuICAgICAgICAgICAgPyBvYnNlcnZlZE5vZGUubm9kZSgpXG4gICAgICAgICAgICA6IG9ic2VydmVkTm9kZS5ub2RlO1xuICAgICAgICBpZiAoIXJvb3QgfHwgIXJvb3QucXVlcnlTZWxlY3RvckFsbCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIC8vIFRyYWNrIHBsYWNlaG9sZGVyc1xuICAgICAgICBsZXQgaGFzUGxhY2Vob2xkZXJzID0gZmFsc2U7XG4gICAgICAgIC8vIE9ic2VydmVyXG4gICAgICAgIGxldCBwYXVzZWQgPSBmYWxzZTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJlbmRlciBpY29uXG4gICAgICAgICAqL1xuICAgICAgICBmdW5jdGlvbiByZW5kZXIoZWxlbWVudCwgcHJvcHMsIGljb25EYXRhKSB7XG4gICAgICAgICAgICBpZiAoIXBhdXNlZCkge1xuICAgICAgICAgICAgICAgIHBhdXNlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcGF1c2VPYnNlcnZpbmdOb2RlKG9ic2VydmVkTm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZWxlbWVudC50YWdOYW1lLnRvVXBwZXJDYXNlKCkgIT09ICdTVkcnKSB7XG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIG9uZSBvZiBzdHlsZSBtb2Rlc1xuICAgICAgICAgICAgICAgIGNvbnN0IG1vZGUgPSBwcm9wcy5tb2RlO1xuICAgICAgICAgICAgICAgIGNvbnN0IGlzTWFzayA9IG1vZGUgPT09ICdtYXNrJyB8fFxuICAgICAgICAgICAgICAgICAgICAobW9kZSA9PT0gJ2JnJ1xuICAgICAgICAgICAgICAgICAgICAgICAgPyBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBtb2RlID09PSAnc3R5bGUnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpY29uRGF0YS5ib2R5LmluZGV4T2YoJ2N1cnJlbnRDb2xvcicpICE9PSAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbnVsbCk7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpc01hc2sgPT09ICdib29sZWFuJykge1xuICAgICAgICAgICAgICAgICAgICByZW5kZXJCYWNrZ3JvdW5kKGVsZW1lbnQsIHByb3BzLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAuLi5kZWZhdWx0SWNvblByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgLi4uaWNvbkRhdGEsXG4gICAgICAgICAgICAgICAgICAgIH0sIGlzTWFzayk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZW5kZXJJbmxpbmVTVkcoZWxlbWVudCwgcHJvcHMsIGljb25EYXRhKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBGaW5kIGFsbCBlbGVtZW50c1xuICAgICAgICBzY2FuUm9vdE5vZGUocm9vdCkuZm9yRWFjaCgoeyBub2RlLCBwcm9wcyB9KSA9PiB7XG4gICAgICAgICAgICAvLyBDaGVjayBpZiBpdGVtIGFscmVhZHkgaGFzIHByb3BzXG4gICAgICAgICAgICBjb25zdCBvbGREYXRhID0gbm9kZVtlbGVtZW50RGF0YVByb3BlcnR5XTtcbiAgICAgICAgICAgIGlmICghb2xkRGF0YSkge1xuICAgICAgICAgICAgICAgIC8vIE5ldyBpY29uIHdpdGhvdXQgZGF0YVxuICAgICAgICAgICAgICAgIGNvbnN0IHsgc3RhdHVzLCBpY29uIH0gPSBnZXRJY29uKHByb3BzLmljb24sIHRydWUpO1xuICAgICAgICAgICAgICAgIGlmIChpY29uKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFJlYWR5IHRvIHJlbmRlciFcbiAgICAgICAgICAgICAgICAgICAgcmVuZGVyKG5vZGUsIHByb3BzLCBpY29uKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBMb2FkaW5nIG9yIG1pc3NpbmdcbiAgICAgICAgICAgICAgICBoYXNQbGFjZWhvbGRlcnMgPSBoYXNQbGFjZWhvbGRlcnMgfHwgc3RhdHVzID09PSAnbG9hZGluZyc7XG4gICAgICAgICAgICAgICAgbm9kZVtlbGVtZW50RGF0YVByb3BlcnR5XSA9IHtcbiAgICAgICAgICAgICAgICAgICAgLi4ucHJvcHMsXG4gICAgICAgICAgICAgICAgICAgIHN0YXR1cyxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFByZXZpb3VzbHkgZm91bmQgaWNvblxuICAgICAgICAgICAgbGV0IGl0ZW07XG4gICAgICAgICAgICBpZiAoIXByb3BzQ2hhbmdlZChvbGREYXRhLCBwcm9wcykpIHtcbiAgICAgICAgICAgICAgICAvLyBQcm9wcyBoYXZlIG5vdCBjaGFuZ2VkLiBDaGVjayBzdGF0dXNcbiAgICAgICAgICAgICAgICBjb25zdCBvbGRTdGF0dXMgPSBvbGREYXRhLnN0YXR1cztcbiAgICAgICAgICAgICAgICBpZiAob2xkU3RhdHVzICE9PSAnbG9hZGluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpdGVtID0gZ2V0SWNvbihwcm9wcy5pY29uLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgaWYgKCFpdGVtLmljb24pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gTm90aGluZyB0byByZW5kZXJcbiAgICAgICAgICAgICAgICAgICAgb2xkRGF0YS5zdGF0dXMgPSBpdGVtLnN0YXR1cztcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFByb3BlcnRpZXMgaGF2ZSBjaGFuZ2VkOiBsb2FkIGljb24gaWYgbmFtZSBoYXMgY2hhbmdlZFxuICAgICAgICAgICAgICAgIGl0ZW0gPSBnZXRJY29uKHByb3BzLmljb24sIG9sZERhdGEubmFtZSAhPT0gcHJvcHMubmFtZSk7XG4gICAgICAgICAgICAgICAgaWYgKCFpdGVtLmljb24pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQ2Fubm90IHJlbmRlciBpY29uOiB1cGRhdGUgc3RhdHVzIGFuZCBwcm9wc1xuICAgICAgICAgICAgICAgICAgICBoYXNQbGFjZWhvbGRlcnMgPVxuICAgICAgICAgICAgICAgICAgICAgICAgaGFzUGxhY2Vob2xkZXJzIHx8IGl0ZW0uc3RhdHVzID09PSAnbG9hZGluZyc7XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24ob2xkRGF0YSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ucHJvcHMsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IGl0ZW0uc3RhdHVzLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFJlLXJlbmRlciBpY29uXG4gICAgICAgICAgICByZW5kZXIobm9kZSwgcHJvcHMsIGl0ZW0uaWNvbik7XG4gICAgICAgIH0pO1xuICAgICAgICAvLyBPYnNlcnZlZCBub2RlIHN0dWZmXG4gICAgICAgIGlmIChvYnNlcnZlZE5vZGUudGVtcG9yYXJ5ICYmICFoYXNQbGFjZWhvbGRlcnMpIHtcbiAgICAgICAgICAgIC8vIFJlbW92ZSB0ZW1wb3Jhcnkgbm9kZVxuICAgICAgICAgICAgc3RvcE9ic2VydmluZyhyb290KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChhZGRUZW1wTm9kZSAmJiBoYXNQbGFjZWhvbGRlcnMpIHtcbiAgICAgICAgICAgIC8vIEFkZCBuZXcgdGVtcG9yYXJ5IG5vZGVcbiAgICAgICAgICAgIG9ic2VydmUocm9vdCwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAocGF1c2VkICYmIG9ic2VydmVkTm9kZS5vYnNlcnZlcikge1xuICAgICAgICAgICAgLy8gUmVzdW1lIG9ic2VydmVyXG4gICAgICAgICAgICByZXN1bWVPYnNlcnZpbmdOb2RlKG9ic2VydmVkTm9kZSk7XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICAvLyBMb2FkIGljb25zXG4gICAgZm9yIChjb25zdCBwcm92aWRlciBpbiBpY29uc1RvTG9hZCkge1xuICAgICAgICBjb25zdCBwcm92aWRlckljb25zVG9Mb2FkID0gaWNvbnNUb0xvYWRbcHJvdmlkZXJdO1xuICAgICAgICBmb3IgKGNvbnN0IHByZWZpeCBpbiBwcm92aWRlckljb25zVG9Mb2FkKSB7XG4gICAgICAgICAgICBjb25zdCBzZXQgPSBwcm92aWRlckljb25zVG9Mb2FkW3ByZWZpeF07XG4gICAgICAgICAgICBsb2FkSWNvbnMoQXJyYXkuZnJvbShzZXQpLm1hcCgobmFtZSkgPT4gKHtcbiAgICAgICAgICAgICAgICBwcm92aWRlcixcbiAgICAgICAgICAgICAg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SkgPT4ge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgaXRlbSBpcyBhbiBvYmplY3QgYW5kIG5vdCBudWxsL2FycmF5XG4gICAgICAgICAgICAgICAgICAgIHR5cGVvZiBpdGVtICE9PSAnb2JqZWN0JyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbSA9PT0gbnVsbCB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbSBpbnN0YW5jZW9mIEFycmF5IHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBmb3IgJ2ljb25zJyBhbmQgJ3ByZWZpeCdcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBpdGVtLmljb25zICE9PSAnb2JqZWN0JyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZW9mIGl0ZW0ucHJlZml4ICE9PSAnc3RyaW5nJyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIGljb24gc2V0XG4gICAgICAgICAgICAgICAgICAgICAgICAhYWRkQ29sbGVjdGlvbihpdGVtKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvLyBMb2FkIG9ic2VydmVyIGFuZCBzY2FuIERPTSBvbiBuZXh0IHRpY2tcbiAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgaW5pdE9ic2VydmVyKHNjYW5ET00pO1xuICAgICAgICBzY2FuRE9NKCk7XG4gICAgfSk7XG59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AnSWNvbmlmeVByb3ZpZGVyc1snICsga2V5ICsgJ10gaXMgaW52YWxpZC4nO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcHJvdmlkZXJzW2tleV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgIT09ICdvYmplY3QnIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAhdmFsdWUgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLnJlc291cmNlcyA9PT0gdm9pZCAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWFkZEFQSVByb3ZpZGVyKGtleSwgdmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbi8qKlxuICogSW50ZXJuYWwgQVBJXG4gKi9cbmNvbnN0IF9hcGkgPSB7XG4gICAgZ2V0QVBJQ29uZmlnLFxuICAgIHNldEFQSU1vZHVsZSxcbiAgICBzZW5kQVBJUXVlcnksXG4gICAgc2V0RmV0Y2gsXG4gICAgZ2V0RmV0Y2gsXG4gICAgbGlzdEFQSVByb3ZpZGVycyxcbn07XG4vKipcbiAqIEdsb2JhbCB2YXJpYWJsZVxuICovXG5jb25zdCBJY29uaWZ5ID0ge1xuICAgIC8vIEljb25pZnlBUElJbnRlcm5hbEZ1bmN0aW9uc1xuICAgIF9hcGksXG4gICAgLy8gSWNvbmlmeUFQSUZ1bmN0aW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tqXX1gKTtcbiAgICAgICAgICAgICAgICBjb25zdCBsaW5lTGVuZ3RoID0gbGluZXNbal0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGlmIChqID09PSBpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHB1c2ggdW5kZXJsaW5lXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhZCA9IHN0YXJ0IC0gKGNvdW50IC0gbGluZUxlbmd0aCkgKyAxO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBsZW5ndGggPSBNYXRoLm1heCgxLCBlbmQgPiBjb3VudCA/IGxpbmVMZW5ndGggLSBwYWQgOiBlbmQgLSBzdGFydCk7XG4gICAgICAgICAgICAgICAgICAgIHJlcy5wdXNoKGAgICB8ICBgICsgJyAnLnJlcGVhdChwYWQpICsgJ14nLnJlcGVhdChsZW5ndGgpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaiA+IGkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVuZCA+IGNvdW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBsZW5ndGggPSBNYXRoLm1heChNYXRoLm1pbihlbmQgLSBjb3VudCwgbGluZUxlbmd0aCksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzLnB1c2goYCAgIHwgIGAgKyAnXicucmVwZWF0KGxlbmd0aCkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvdW50ICs9IGxpbmVMZW5ndGggKyAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXMuam9pbignXFxuJyk7XG59XG5mdW5jdGlvbiBpbmNyZW1lbnRlcihjb2RlKSB7XG4gICAgbGV0IGN1cnJlbnQgPSBjb2RlO1xuICAgIHJldHVybiAoKSA9PiArK2N1cn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wgaGFuZGxlcikge1xuICAgICAgICAgICAgY29uc3QgaGFuZGxlcnMgPSBldmVudHMuZ2V0KGV2ZW50KTtcbiAgICAgICAgICAgIGNvbnN0IGFkZGVkID0gaGFuZGxlcnMgJiYgaGFuZGxlcnMucHVzaChoYW5kbGVyKTtcbiAgICAgICAgICAgIGlmICghYWRkZWQpIHtcbiAgICAgICAgICAgICAgICBldmVudHMuc2V0KGV2ZW50LCBbaGFuZGxlcl0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBvZmYoZXZlbnQsIGhhbmRsZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IGhhbmRsZXJzID0gZXZlbnRzLmdldChldmVudCk7XG4gICAgICAgICAgICBpZiAoaGFuZGxlcnMpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVycy5zcGxpY2UoaGFuZGxlcnMuaW5kZXhPZihoYW5kbGVyKSA+Pj4gMCwgMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVtaXQoZXZlbnQsIHBheWxvYWQpIHtcbiAgICAgICAgICAgIChldmVudHMuZ2V0KGV2ZW50KSB8fCBbXSlcbiAgICAgICAgICAgICAgICAuc2xpY2UoKVxuICAgICAgICAgICAgICAgIC5tYXAoaGFuZGxlciA9PiBoYW5kbGVyKHBheWxvYWQpKTtcbiAgICAgICAgICAgIChldmVudHMuZ2V0KCcqJykgfHwgW10pXG4gICAgICAgICAgICAgICAgLnNsaWNlKClcbiAgICAgICAgICAgICAgICAubWFwKGhhbmRsZXIgPT4gaGFuZGxlcihldmVudCwgcGF5bG9hZCkpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gZW1pdHRlcjtcbn1cblxuY29uc3QgaXNOb3RPYmplY3RPcklzQXJyYXkgPSAodmFsKSA9PiAhaXNPYmplY3QodmFsKSB8fCBpc0FycmF5KHZhbCk7XG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3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C9cXHI/XFxuLyk7XG4gICAgbGV0IGNvdW50ID0gMDtcbiAgICBjb25zdCByZXMgPSBbXTtcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGNvdW50ICs9IGxpbmVzW2ldLmxlbmd0aCArIDE7XG4gICAgICAgIGlmIChjb3VudCA+PSBzdGFydCkge1xuICAgICAgICAgICAgZm9yIChsZXQgaiA9IGkgLSBSQU5HRTsgaiA8PSBpICsgUkFOR0UgfHwgZW5kID4gY291bnQ7IGorKykge1xuICAgICAgICAgICAgICAgIGlmIChqIDwgMCB8fCBqID49IGxpbmVzLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY29uc3QgbGluZSA9IGogKyAxO1xuICAgICAgICAgICAgICAgIHJlcy5wdXNoKGAke2xpbmV9JHsnICcucmVwZWF0KDMgLSBTdHJpbmcobGluZSkubGVuZ3RoKX18ICAke2xpbmVzW2pdfWApO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVMZW5ndGggPSBsaW5lc1tqXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWYgKGogPT09IGkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gcHVzaCB1bmRlcmxpbmVcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFkID0gc3RhcnQgLSAoY291bnQgLSBsaW5lTGVuZ3RoKSArIDE7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IE1hdGgubWF4KDEsIGVuZCA+IGNvdW50ID8gbGluZUxlbmd0aCAtIHBhZCA6IGVuZCAtIHN0YXJ0KTtcbiAgICAgICAgICAgICAgICAgICAgcmVzLnB1c2goYCAgIHwgIGAgKyAnICcucmVwZWF0KHBhZCkgKyAnXicucmVwZWF0KGxlbmd0aCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChqID4gaSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW5kID4gY291bnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IE1hdGgubWF4KE1hdGgubWluKGVuZCAtIGNvdW50LCBsaW5lTGVuZ3RoKSwgMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXMucHVzaChgICAgfCAgYCArICdeJy5yZXBlYXQobGVuZ3RoKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY291bnQgKz0gbGluZUxlbmd0aCArIDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJlcy5qb2luKCdcXG4nKTtcbn1cbmZ1bmN0aW9uIGluY3JlbWVudGVyKGNvZGUpIHtcbiAgICBsZXQgY3VycmVudCA9IGNvZGU7XG4gICAgcmV0dXJuICgpID0+ICsrY3VycmVudDtcbn1cblxuZnVuY3Rpb24gd2Fybihtc2csIGVycikge1xuICAgIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgY29uc29sZS53YXJuKGBbaW50bGlmeV0gYCArIG1zZyk7XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICBjb25zb2xlLndhcm4oZXJyLnN0YWNrKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbmNvbnN0IGhhc1dhcm5lZCA9IHt9O1xuZnVuY3Rpb24gd2Fybk9uY2UobXNnKSB7XG4gICAgaWYgKCFoYXNXYXJuZWRbbXNnXSkge1xuICAgICAgICBoYXNXYXJuZWRbbXNnXSA9IHRydWU7XG4gICAgICAgIHdhcm4obXNnKTtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIGNyZWF0ZVBvc2l0aW9uKGxp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ICAgY29uc3QgY29sdW1uID0gKCkgPT4gX2NvbHVtbjtcbiAgICBjb25zdCBwZWVrT2Zmc2V0ID0gKCkgPT4gX3BlZWtPZmZzZXQ7XG4gICAgY29uc3QgY2hhckF0ID0gKG9mZnNldCkgPT4gaXNDUkxGKG9mZnNldCkgfHwgaXNQUyhvZmZzZXQpIHx8IGlzTFMob2Zmc2V0KSA/IENIQVJfTEYgOiBfYnVmW29mZnNldF07XG4gICAgY29uc3QgY3VycmVudENoYXIgPSAoKSA9PiBjaGFyQXQoX2luZGV4KTtcbiAgICBjb25zdCBjdXJyZW50UGVlayA9ICgpID0+IGNoYXJBdChfaW5kZXggKyBfcGVla09mZnNldCk7XG4gICAgZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgX3BlZWtPZmZzZXQgPSAwO1xuICAgICAgICBpZiAoaXNMaW5lRW5kKF9pbmRleCkpIHtcbiAgICAgICAgICAgIF9saW5lKys7XG4gICAgICAgICAgICBfY29sdW1uID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNDUkxGKF9pbmRleCkpIHtcbiAgICAgICAgICAgIF9pbmRleCsrO1xuICAgICAgICB9XG4gICAgICAgIF9pbmRleCsrO1xuICAgICAgICBfY29sdW1uKys7XG4gICAgICAgIHJldHVybiBfYnVmW19pbmRleF07XG4gICAgfVxuICAgIGZ1bmN0aW9uIHBlZWsoKSB7XG4gICAgICAgIGlmIChpc0NSTEYoX2luZGV4ICsgX3BlZWtPZmZzZXQpKSB7XG4gICAgICAgICAgICBfcGVla09mZnNldCsrO1xuICAgICAgICB9XG4gICAgICAgIF9wZWVrT2Zmc2V0Kys7XG4gICAgICAgIHJldHVybiBfYnVmW19pbmRleCArIF9wZWVrT2Zmc2V0XTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVzZXQoKSB7XG4gICAgICAgIF9pbmRleCA9IDA7XG4gICAgICAgIF9saW5lID0gMTtcbiAgICAgICAgX2NvbHVtbiA9IDE7XG4gICAgICAgIF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AgaWYgKG9uRXJyb3IpIHtcbiAgICAgICAgICAgIGNvbnN0IGxvYyA9IGxvY2F0aW9uID8gY3JlYXRlTG9jYXRpb24oY3R4LnN0YXJ0TG9jLCBwb3MpIDogbnVsbDtcbiAgICAgICAgICAgIGNvbnN0IGVyciA9IGNyZWF0ZUNvbXBpbGVFcnJvcihjb2RlLCBsb2MsIHtcbiAgICAgICAgICAgICAgICBkb21haW46IEVSUk9SX0RPTUFJTiQzLFxuICAgICAgICAgICAgICAgIGFyZ3NcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgb25FcnJvcihlcnIpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldFRva2VuKGNvbnRleHQsIHR5cGUsIHZhbHVlKSB7XG4gICAgICAgIGNvbnRleHQuZW5kTG9jID0gY3VycmVudFBvc2l0aW9uKCk7XG4gICAgICAgIGNvbnRleHQuY3VycmVudFR5cGUgPSB0eXBlO1xuICAgICAgICBjb25zdCB0b2tlbiA9IHsgdHlwZSB9O1xuICAgICAgICBpZiAobG9jYXRpb24pIHtcbiAgICAgICAgICAgIHRva2VuLmxvYyA9IGNyZWF0ZUxvY2F0aW9uKGNvbnRleHQuc3RhcnRMb2MsIGNvbnRleHQuZW5kTG9jKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodmFsdWUgIT0gbnVsbCkge1xuICAgICAgICAgICAgdG9rZW4udmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgfVxuICAgIGNvbnN0IGdldEVuZFRva2VuID0gKGNvbnRleHQpID0+IGdldFRva2VuKGNvbnRleHQsIDE0IC8qIFRva2VuVHlwZXMuRU9GICovKTtcbiAgICBmdW5jdGlvbiBlYXQoc2NuciwgY2gpIHtcbiAgICAgICAgaWYgKHNjbnIuY3VycmVudENoYXIoKSA9PT0gY2gpIHtcbiAgICAgICAgICAgIHNjbnIubmV4dCgpO1xuICAgICAgICAgICAgcmV0dXJuIGNoO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZW1pdEVycm9yKENvbXBpbGVFcnJvckNvZGVzLkVYUEVDVEVEX1RPS0VOLCBjdXJyZW50UG9zaXRpb24oKSwgMCwgY2gpO1xuICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHBlZWtTcGFjZXMoc2Nucikge1xuICAgICAgICBsZXQgYnVmID0gJyc7XG4gICAgICAgIHdoaWxlIChzY25yLmN1cnJlbnRQZWVrKCkgPT09IENIQVJfU1AgfHwgc2Nuci5jdXJyZW50UGVlaygpID09PSBDSEFSX0xGKSB7XG4gICAgICAgICAgICBidWYgKz0gc2Nuci5jdXJyZW50UGVlaygpO1xuICAgICAgICAgICAgc2Nuci5wZWVrKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGJ1ZjtcbiAgICB9XG4gICAgZnVuY3Rpb24gc2tpcFNwYWNlcyhzY25yKSB7XG4gICAgICAgIGNvbnN0IGJ1ZiA9IHBlZWtTcGFjZXMoc2Nucik7XG4gICAgICAgIHNjbnIuc2tpcFRvUGVlaygpO1xuICAgICAgICByZXR1cm4gYnVmO1xuICAgIH1cbiAgICBmdW5jdGlvbiBpc0lkZW50aWZpZXJTdGFydChjaCkge1xuICAgICAgICBpZiAoY2ggPT09IEVPRikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNjID0gY2guY2hhckNvZGVBdCgwKTtcbiAgICAgICAgcmV0dXJuICgoY2MgPj0gOTcgJiYgY2MgPD0gMTIyKSB8fCAvLyBhLXpcbiAgICAgICAgICAgIChjYyA+PSA2NSAmJiBjYyA8PSA5MCkgfHwgLy8gQS1aXG4gICAgICAgICAgICBjYyA9PT0gOTUgLy8gX1xuICAgICAgICApO1xuICAgIH1cbiAgICBmdW5jdGlvbiBpc051bWJlclN0YXJ0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biAgICAgICAgc2Nuci5yZXNldFBlZWsoKTtcbiAgICAgICAgcmV0dXJuIHJldDtcbiAgICB9XG4gICAgZnVuY3Rpb24gaXNMaXRlcmFsU3RhcnQoc2NuciwgY29udGV4dCkge1xuICAgICAgICBjb25zdCB7IGN1cnJlbnRUeXBlIH0gPSBjb250ZXh0O1xuICAgICAgICBpZiAoY3VycmVudFR5cGUgIT09IDIgLyogVG9rZW5UeXBlcy5CcmFjZUxlZnQgKi8pIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBwZWVrU3BhY2VzKHNjbnIpO1xuICAgICAgICBjb25zdCByZXQgPSBzY25yLmN1cnJlbnRQZWVrKCkgPT09IExJVEVSQUxfREVMSU1JVEVSO1xuICAgICAgICBzY25yLnJlc2V0UGVlaygpO1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgIH1cbiAgICBmdW5jdGlvbiBpc0xpbmtlZERvdFN0YXJ0KHNjbnIsIGNvbnRleHQpIHtcbiAgICAgICAgY29uc3QgeyBjdXJyZW50VHlwZSB9ID0gY29udGV4dDtcbiAgICAgICAgaWYgKGN1cnJlbnRUeXBlICE9PSA4IC8qIFRva2VuVHlwZXMuTGlua2VkQWxpYXMgKi8pIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBwZWVrU3BhY2VzKHNjbnIpO1xuICAgICAgICBjb25zdCByZXQgPSBzY25yLmN1cnJlbnRQZWVrKCkgPT09IFwiLlwiIC8qIFRva2VuQ2hhcnMuTGlua2VkRG90ICovO1xuICAgICAgICBzY25yLnJlc2V0UGVlaygpO1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgIH1cbiAgICBmdW5jdGlvbiBpc0xpbmtlZE1vZGlmaWVyU3RhcnQoc2NuciwgY29udGV4dCkge1xuICAgICAgICBjb25zdCB7IGN1cnJlbnRUeXBlIH0gPSBjb250ZXh0O1xuICAgICAgICBpZiAoY3VycmVudFR5cGUgIT09IDkgLyogVG9rZW5UeXBlcy5MaW5rZWREb3QgKi8pIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBwZWVrU3BhY2VzKHNjbnIpO1xuICAgICAgICBjb25zdCByZXQgPSBpc0lkZW50aWZpZXJTdGFydChzY25yLmN1cnJlbnRQZWVrKCkpO1xuICAgICAgICBzY25yLnJlc2V0UGVlaygpO1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgIH1cbiAgICBmdW5jdGlvbiBpc0xpbmtlZERlbGltaXRlclN0YXJ0KHNjbnIsIGNvbnRleHQpIHtcbiAgICAgICAgY29uc3QgeyBjdXJyZW50VHlwZSB9ID0gY29udGV4dDtcbiAgICAgICAgaWYgKCEoY3VycmVudFR5cGUgPT09IDggLyogVG9rZW5UeXBlcy5MaW5rZWRBbGlhcyAqLyB8fFxuICAgICAgICAgICAgY3VycmVudFR5cGUgPT09IDEyIC8qIFRva2VuVHlwZXMuTGlua2VkTW9kaWZpZXIgKi8pKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcGVla1NwYWNlcyhzY25yKTtcbiAgICAgICAgY29uc3QgcmV0ID0gc2Nuci5jdXJyZW50UGVlaygpID09PSBcIjpcIiAvKiBUb2tlbkNoYXJzLkxpbmtlZERlbGltaXRlciAqLztcbiAgICAgICAgc2Nuci5yZXNldFBlZWsoKTtcbiAgICAgICAgcmV0dXJuIHJldDtcbiAgICB9XG4gICAgZnVuY3Rpb24gaXNMaW5rZWRSZWZlclN0YXJ0KHNjbnIsIGNvbnRleHQpIHtcbiAgICAgICAgY29uc3QgeyBjdXJyZW50VHlwZSB9ID0gY29udGV4dDtcbiAgICAgICAgaWYgKGN1cnJlbnRUeXBlICE9PSAxMCAvKiBUb2tlblR5cGVzLkxpbmtlZERlbGltaXRlciAqLykge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGZuID0gKCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgY2ggPSBzY25yLmN1cnJlbnRQZWVrKCk7XG4gICAgICAgICAgICBpZiAoY2ggPT09IFwie1wiIC8qIFRva2VuQ2hhcnMuQnJhY2VMZWZ0ICovKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlzSWRlbnRpZmllclN0YXJ0KHNjbnIucGVlaygpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNoID09PSBcIkBcIiAvKiBUb2tlbkNoYXJzLkxpbmtlZEFsaWFzICovIHx8XG4gICAgICAgICAgICAgICAgY2ggPT09IFwiJVwiIC8qIFRva2VuQ2hhcnMuTW9kdWxvICovIHx8XG4gICAgICAgICAgICAgICAgY2ggPT09IFwifFwiIC8qIFRva2VuQ2hhcnMuUGlwZSAqLyB8fFxuICAgICAgICAgICAgICAgIGNoID09PSBcIjpcIiAvKiBUb2tlbkNoYXJzLkxpbmtlZERlbGltaXRlciAqLyB8fFxuICAgICAgICAgICAgICAgIGNoID09PSBcIi5cIiAvKiBUb2tlbkNoYXJzLkxpbmtlZERvdCAqLyB8fFxuICAgICAgICAgICAgICAgIGNoID09PSBDSEFSX1NQIHx8XG4gICAgICAgICAgICAgICAgIWNoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoY2ggPT09IENIQVJfTEYpIHtcbiAgICAgICAgICAgICAgICBzY25yLnBlZWsoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIG90aGVyIGNoYXJhY3RlcnNcbiAgICAgICAgICAgICAgICByZXR1cm4gaXNJZGVudGlmaWVyU3RhcnQoY2gpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICA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0ICovKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHByZXYgPT09IFwiJVwiIC8qIFRva2VuQ2hhcnMuTW9kdWxvICovID8gZmFsc2UgOiBoYXNTcGFjZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNoID09PSBcIkBcIiAvKiBUb2tlbkNoYXJzLkxpbmtlZEFsaWFzICovIHx8ICFjaCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBwcmV2ID09PSBcIiVcIiAvKiBUb2tlbkNoYXJzLk1vZHVsbyAqLyA/IHRydWUgOiBoYXNTcGFjZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNoID09PSBcIiVcIiAvKiBUb2tlbkNoYXJzLk1vZHVsbyAqLykge1xuICAgICAgICAgICAgICAgIHNjbnIucGVlaygpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmbihoYXNTcGFjZSwgXCIlXCIgLyogVG9rZW5DaGFycy5Nb2R1bG8gKi8sIHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoY2ggPT09IFwifFwiIC8qIFRva2VuQ2hhcnMuUGlwZSAqLykge1xuICAgICAgICAgICAgICAgIHJldHVybiBwcmV2ID09PSBcIiVcIiAvKiBUb2tlbkNoYXJzLk1vZHVsbyAqLyB8fCBkZXRlY3RNb2R1bG9cbiAgICAgICAgICAgICAgICAgICAgPyB0cnVlXG4gICAgICAgICAgICAgICAgICAgIDogIShwcmV2ID09PSBDSEFSX1NQIHx8IHByZXYgPT09IENIQVJfTEYpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoY2ggPT09IENIQVJfU1ApIHtcbiAgICAgICAgICAgICAgICBzY25yLnBlZWsoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4odHJ1ZSwgQ0hBUl9TUCwgZGV0ZWN0TW9kdWxvKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNoID09PSBDSEFSX0xGKSB7XG4gICAgICAgICAgICAgICAgc2Nuci5wZWVrKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZuKHRydWUsIENIQVJfTEYsIGRldGVjdE1vZHVsbyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgY29uc3QgcmV0ID0gZm4oKTtcbiAgICAgICAgcmVzZXQgJiYgc2Nuci5yZXNldFBlZWsoKTtcbiAgICAgICAgcmV0dXJuIHJldDtcbiAgICB9XG4gICAgZnVuY3Rpb24gdGFrZUNoYXIoc2NuciwgZm4pIHtcbiAgICAgICAgY29uc3QgY2ggPSBzY25yLmN1cnJlbnRDaGFyKCk7XG4gICAgICAgIGlmIChjaCA9PT0gRU9GKSB7XG4gICAgICAgICAgICByZXR1cm4gRU9GO1xuICAgICAgICB9XG4gICAgICAgIGlmIChmbihjaCkpIHtcbiAgICAgICAgICAgIHNjbnIubmV4dCgpO1xuICAgICAgICAgICAgcmV0dXJuIGNoO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICBmdW5jdGlvbiB0YWtlSWRlbnRpZmllckNoYXIoc2Nucikge1xuICAgICAgICBjb25zdCBjbG9zdXJlID0gKGNoKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBjYyA9IGNoLmNoYXJDb2RlQXQoMCk7XG4gICAgICAgICAgICByZXR1cm4gKChjYyA+PSA5NyAmJiBjYyA8PSAxMjIpIHx8IC8vIGEtelxuICAgICAgICAgICAgICAgIChjYyA+PSA2NSAmJiBjYyA8PSA5MCkgfHwgLy8gQS1aXG4gICAgICAgICAgICAgICAgKGNjID49IDQ4ICYmIGNjIDw9IDU3KSB8fCAvLyAwLTlcbiAgICAgICAgICAgICAgICBjYyA9PT0gOTUgfHwgLy8gX1xuICAgICAgICAgICAgICAgIGNjID09PSAzNiAvLyAkXG4gICAgICAgICAgICApO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gdGFrZUNoYXIoc2NuciwgY2xvc3VyZSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHRha2VEaWdpdChzY25yKSB7XG4gICAgICAgIGNvbnN0IGNsb3N1cmUgPSAoY2gpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGNjID0gY2guY2hhckNvZGVBdCgwKTtcbiAgICAgICAgICAgIHJldHVybiBjYyA+PSA0OCAmJiBjYyA8PSA1NzsgLy8gMC05XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiB0YWtlQ2hhcihzY25yLCBjbG9zdXJlKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gdGFrZUhleERpZ2l0KHNjbnIpIHtcbiAgICAgICAgY29uc3QgY2xvc3VyZSA9IChjaCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgY2MgPSBjaC5jaGFyQ29kZUF0KDApO1xuICAgICAgICAgICAgcmV0dXJuICgoY2MgPj0gNDggJiYgY2MgPD0gNTcpIHx8IC8vIDAtOVxuICAgICAgICAgICAgICAgIChjYyA+PSA2NSAmJiBjYyA8PSA3MCkgfHwgLy8gQS1GXG4gICAgICAgICAgICAgICAgKGNjID49IDk3ICYmIGNjIDw9IDEwMikpOyAvLyBhLWZcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIHRha2VDaGFyKHNjbnIsIGNsb3N1cmUpO1xuICAgIH1cbiAgICBmdW5jdGlvbiBnZXREaWdpdHMoc2Nucikge1xuICAgICAgICBsZXQgY2ggPSAnJztcbiAgICAgICAgbGV0IG51bSA9ICcnO1xuICAgICAgICB3aGlsZSAoKGNoID0gdGFrZURpZ2l0KHNjbnIpKSkge1xuICAgICAgICAgICAgbnVtICs9IGNoO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudW07XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlYWRNb2R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HtcbiAgICAgICAgICAgICAgICBpZiAoaXNUZXh0U3RhcnQoc2NucikpIHtcbiAgICAgICAgICAgICAgICAgICAgYnVmICs9IGNoO1xuICAgICAgICAgICAgICAgICAgICBzY25yLm5leHQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNoID09PSBDSEFSX1NQIHx8IGNoID09PSBDSEFSX0xGKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzVGV4dFN0YXJ0KHNjbnIpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJ1ZiArPSBjaDtcbiAgICAgICAgICAgICAgICAgICAgc2Nuci5uZXh0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGlzUGx1cmFsU3RhcnQoc2NucikpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBidWYgKz0gY2g7XG4gICAgICAgICAgICAgICAgICAgIHNjbnIubmV4dCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1ZiArPSBjaDtcbiAgICAgICAgICAgICAgICBzY25yLm5leHQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYnVmO1xuICAgIH1cbiAgICBmdW5jdGlvbiByZWFkTmFtZWRJZGVudGlmaWVyKHNjbnIpIHtcbiAgICAgICAgc2tpcFNwYWNlcyhzY25yKTtcbiAgICAgICAgbGV0IGNoID0gJyc7XG4gICAgICAgIGxldCBuYW1lID0gJyc7XG4gICAgICAgIHdoaWxlICgoY2ggPSB0YWtlSWRlbnRpZmllckNoYXIoc2NucikpKSB7XG4gICAgICAgICAgICBuYW1lICs9IGNoO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzY25yLmN1cnJlbnRDaGFyKCkgPT09IEVPRikge1xuICAgICAgICAgICAgZW1pdEVycm9yKENvbXBpbGVFcnJvckNvZGVzLlVOVEVSTUlOQVRFRF9DTE9TSU5HX0JSQUNFLCBjdXJyZW50UG9zaXRpb24oKSwgMCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5hbWU7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlYWRMaXN0SWRlbnRpZmllcihzY25yKSB7XG4gICAgICAgIHNraXBTcGFjZXMoc2Nucik7XG4gICAgICAgIGxldCB2YWx1ZSA9ICcnO1xuICAgICAgICBpZiAoc2Nuci5jdXJyZW50Q2hhcigpID09PSAnLScpIHtcbiAgICAgICAgICAgIHNjbnIubmV4dCgpO1xuICAgICAgICAgICAgdmFsdWUgKz0gYC0ke2dldERpZ2l0cyhzY25yKX1gO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdmFsdWUgKz0gZ2V0RGlnaXRzKHNjbnIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzY25yLmN1cnJlbnRDaGFyKCkgPT09IEVPRikge1xuICAgICAgICAgICAgZW1pdEVycm9yKENvbXBpbGVFcnJvckNvZGVzLlVOVEVSTUlOQVRFRF9DTE9TSU5HX0JSQUNFLCBjdXJyZW50UG9zaXRpb24oKSwgMCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cbiAgICBmdW5jdGlvbiByZWFkTGl0ZXJhbChzY25yKSB7XG4gICAgICAgIHNraXBTcGFjZXMoc2Nucik7XG4gICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby11c2VsZXNzLWVzY2FwZVxuICAgICAgICBlYXQoc2NuciwgYFxcJ2ApO1xuICAgICAgICBsZXQgY2ggPSAnJztcbiAgICAgICAgbGV0IGxpdGVyYWwgPSAnJztcbiAgICAgICAgY29uc3QgZm4gPSAoeCkgPT4geCAhPT0gTElURVJBTF9ERUxJTUlURVIgJiYgeCAhPT0gQ0hBUl9MRjtcbiAgICAgICAgd2hpbGUgKChjaCA9IHRha2VDaGFyKHNjbnIsIGZuKSkpIHtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gJ1xcXFwnKSB7XG4gICAgICAgICAgICAgICAgbGl0ZXJhbCArPSByZWFkRXNjYXBlU2VxdWVuY2Uoc2Nucik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBsaXRlcmFsICs9IGNoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGN1cnJlbnQgPSBzY25yLmN1cnJlbnRDaGFyKCk7XG4gICAgICAgIGlmIChjdXJyZW50ID09PSBDSEFSX0xGIHx8IGN1cnJlbnQgPT09IEVPRikge1xuICAgICAgICAgICAgZW1pdEVycm9yKENvbXBpbGVFcnJvckNvZGVzLlVOVEVSTUlOQVRFRF9TSU5HTEVfUVVPVEVfSU5fUExBQ0VIT0xERVIsIGN1cnJlbnRQb3NpdGlvbigpLCAwKTtcbiAgICAgICAgICAgIC8vIFRPRE86IElzIGl0IGNvcnJlY3QgcmVhbGx5P1xuICAgICAgICAgICAgaWYgKGN1cnJlbnQgPT09IENIQVJfTEYpIHtcbiAgICAgICAgICAgICAgICBzY25yLm5leHQoKTtcbiAgICAgICAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tdXNlbGVzcy1lc2NhcGVcbiAgICAgICAgICAgICAgICBlYXQoc2NuciwgYFxcJ2ApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGxpdGVyYWw7XG4gICAgICAgIH1cbiAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5v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tcbiAgICAgICAgICAgIGNvbnN0IGNoID0gdGFrZUhleERpZ2l0KHNjbnIpO1xuICAgICAgICAgICAgaWYgKCFjaCkge1xuICAgICAgICAgICAgICAgIGVtaXRFcnJvcihDb21waWxlRXJyb3JDb2Rlcy5JTlZBTElEX1VOSUNPREVfRVNDQVBFX1NFUVVFTkNFLCBjdXJyZW50UG9zaXRpb24oKSwgMCwgYFxcXFwke3VuaWNvZGV9JHtzZXF1ZW5jZX0ke3NjbnIuY3VycmVudENoYXIoKX1gKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNlcXVlbmNlICs9IGNoO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBgXFxcXCR7dW5pY29kZX0ke3NlcXVlbmNlfWA7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlYWRJbnZhbGlkSWRlbnRpZmllcihzY25yKSB7XG4gICAgICAgIHNraXBTcGFjZXMoc2Nucik7XG4gICAgICAgIGxldCBjaCA9ICcnO1xuICAgICAgICBsZXQgaWRlbnRpZmllcnMgPSAnJztcbiAgICAgICAgY29uc3QgY2xvc3VyZSA9IChjaCkgPT4gY2ggIT09IFwie1wiIC8qIFRva2VuQ2hhcnMuQnJhY2VMZWZ0ICovICYmXG4gICAgICAgICAgICBjaCAhPT0gXCJ9XCIgLyogVG9rZW5DaGFycy5CcmFjZVJpZ2h0ICovICYmXG4gICAgICAgICAgICBjaCAhPT0gQ0hBUl9TUCAmJlxuICAgICAgICAgICAgY2ggIT09IENIQVJfTEY7XG4gICAgICAgIHdoaWxlICgoY2ggPSB0YWtlQ2hhcihzY25yLCBjbG9zdXJlKSkpIHtcbiAgICAgICAgICAgIGlkZW50aWZpZXJzICs9IGNoO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpZGVudGlmaWVycztcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVhZExpbmtlZE1vZGlmaWVyKHNjbnIpIHtcbiAgICAgICAgbGV0IGNoID0gJyc7XG4gICAgICAgIGxldCBuYW1lID0gJyc7XG4gICAgICAgIHdoaWxlICgoY2ggPSB0YWtlSWRlbnRpZmllckNoYXIoc2NucikpKSB7XG4gICAgICAgICAgICBuYW1lICs9IGNoO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuYW1lO1xuICAgIH1cbiAgICBmdW5jdGlvbiByZWFkTGlua2VkUmVmZXIoc2Nucikge1xuICAgICAgICBjb25zdCBmbiA9IChkZXRlY3QgPSBmYWxzZSwgYnVmKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBjaCA9IHNjbnIuY3VycmVudENoYXIoKTtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gXCJ7XCIgLyogVG9rZW5DaGFycy5CcmFjZUxlZnQgKi8gfHxcbiAgICAgICAgICAgICAgICBjaCA9PT0gXCIlXCIgLyogVG9rZW5DaGFycy5Nb2R1bG8gKi8gfHxcbiAgICAgICAgICAgICAgICBjaCA9PT0gXCJAXCIgLyogVG9rZW5DaGFycy5MaW5rZWRBbGlhcyAqLyB8fFxuICAgICAgICAgICAgICAgIGNoID09PSBcInxcIiAvKiBUb2tlbkNoYXJzLlBpcGUgKi8gfHxcbiAgICAgICAgICAgICAgICBjaCA9PT0gXCIoXCIgLyogVG9rZW5DaGFycy5QYXJlbkxlZnQgKi8gfHxcbiAgICAgICAgICAgICAgICBjaCA9PT0gXCIpXCIgLyogVG9rZW5DaGFycy5QYXJlblJpZ2h0ICovIHx8XG4gICAgICAgICAgICAgICAgIWNoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGJ1ZjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNoID09PSBDSEFSX1NQKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGJ1ZjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNoID09PSBDSEFSX0xGIHx8IGNoID09PSBET1QpIHtcbiAgICAgICAgICAgICAgICBidWYgKz0gY2g7XG4gICAgICAgICAgICAgICAgc2Nuci5uZXh0KCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZuKGRldGVjdCwgYnVmKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1ZiArPSBjaDtcbiAgICAgICAgICAgICAgICBzY25yLm5leHQoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4odHJ1ZSwgYnVmKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIGZuKGZhbHNlLCAnJyk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlYWRQbHVyYWwoc2Nucikge1xuICAgICAgICBza2lwU3BhY2VzKHNjbnIpO1xuICAgICAgICBjb25zdCBwbHVyYWwgPSBlYXQoc2NuciwgXCJ8XCIgLyogVG9rZW5DaGFycy5QaXBlICovKTtcbiAgICAgICAgc2tpcFNwYWNlcyhzY25yKTtcbiAgICAgICAgcmV0dXJuIHBsdXJhbDtcbiAgICB9XG4gICAgLy8gVE9ETzogV2UgbmVlZCByZWZhY3RvcmluZyBvZiB0b2tlbiBwYXJzaW5nIC4uLlxuICAgIGZ1bmN0aW9uIHJlYWRUb2tlbkluUGxhY2Vob2xkZXIoc2NuciwgY29udGV4dCkge1xuICAgICAgICBsZXQgdG9rZW4gPSBudWxsO1xuICAgICAgICBjb25zdCBjaCA9IHNjbnIuY3VycmVudENoYXIoKTtcbiAgICAgICAgc3dpdGNoIChjaCkge1xuICAgICAgICAgICAgY2FzZSBcIntcIiAvKiBUb2tlbkNoYXJzLkJyYWNlTGVmdCAqLzpcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5icmFjZU5lc3QgPj0gMSkge1xuICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IoQ29tcGlsZUVycm9yQ29kZXMuTk9UX0FMTE9XX05FU1RfUExBQ0VIT0xERVIsIGN1cnJlbnRQb3NpdGlvbigpLCAwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2Nuci5uZXh0KCk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBnZXRUb2tlbihjb250ZXh0LCAyIC8qIFRva2VuVHlwZXMuQnJhY2VMZWZ0ICovLCBcIntcIiAvKiBUb2tlbkNoYXJzLkJyYWNlTGVmdCAqLyk7XG4gICAgICAgICAgICAgICAgc2tpcFNwYWNlcyhzY25yKTtcbiAgICAgICAgICAgICAgICBjb250ZXh0LmJyYWNlTmVzdCsrO1xuICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgICAgIGNhc2UgXCJ9XCIgLyogVG9rZW5DaGFycy5CcmFjZVJpZ2h0ICovOlxuICAgICAgICAgICAgICAgIGlmIChjb250ZXh0LmJyYWNlTmVzdCA+IDAgJiZcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5jdXJyZW50VHlwZSA9PT0gMiAvKiBUb2tlblR5cGVzLkJyYWNlTGVmdCAqLykge1xuICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IoQ29tcGlsZUVycm9yQ29kZXMuRU1QVFlfUExBQ0VIT0xERVIsIGN1cnJlbnRQb3NpdGlvbigpLCAwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2Nuci5uZXh0KCk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBnZXRUb2tlbihjb250ZXh0LCAzIC8qIFRva2VuVHlwZXMuQnJhY2VSaWdodCAqLywgXCJ9XCIgLyogVG9rZW5DaGFycy5CcmFjZVJpZ2h0ICovKTtcbiAgICAgICAgICAgICAgICBjb250ZXh0LmJyYWNlTmVzdC0tO1xuICAgICAgICAgICAgICAgIGNvbnRleHQuYnJhY2VOZXN0ID4gMCAmJiBza2lwU3BhY2VzKHNjbnIpO1xuICAgICAgICAgICAgICAgIGlmIChjb250ZXh0LmluTGlua2VkICYmIGNvbnRleHQuYnJhY2VOZXN0ID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuaW5MaW5rZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgY2FzZSBcIkBcIiAvKiBUb2tlbkNoYXJzLkxpbmtlZEFsaWFzICovOlxuICAgICAgICAgICAgICAgIGlmIChjb250ZXh0LmJyYWNlTmVzdCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZW1pdEVycm9yKENvbXBpbGVFcnJvckNvZGVzLlVOVEVSTUlOQVRFRF9DTE9TSU5HX0JSQUNFLCBjdXJyZW50UG9zaXRpb24oKSwgMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRva2VuID0gcmVhZFRva2VuSW5MaW5rZWQoc2NuciwgY29udGV4dCkgfHwgZ2V0RW5kVG9rZW4oY29udGV4dCk7XG4gICAgICAgICAgICAgICAgY29udGV4dC5icmFjZU5lc3QgPSAwO1xuICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgICAgICAgICBsZXQgdmFsaWROYW1lZElkZW50aWZpZXIgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGxldCB2YWxpZExpc3RJZGVudGlmaWVyID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBsZXQgdmFsaWRMaXRlcmFsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBpZiAoaXNQbHVyYWxTdGFydChzY25yKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5icmFjZU5lc3QgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IoQ29tcGlsZUVycm9yQ29kZXMuVU5URVJNSU5BVEVEX0NMT1NJTkdfQlJBQ0UsIGN1cnJlbnRQb3NpdGlvbigpLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IGdldFRva2VuKGNvbnRleHQsIDEgLyogVG9rZW5UeXBlcy5QaXBlICovLCByZWFkUGx1cmFsKHNjbnIpKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gcmVzZXRcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5icmFjZU5lc3QgPSAwO1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmluTGlua2VkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuYnJhY2VOZXN0ID4gMCAmJlxuICAgICAgICAgICAgICAgICAgICAoY29udGV4dC5jdXJyZW50VHlwZSA9PT0gNSAvKiBUb2tlblR5cGVzLk5hbWVkICovIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmN1cnJlbnRUeXBlID09PSA2IC8qIFRva2VuVHlwZXMuTGlzdCAqLyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dC5jdXJyZW50VHlwZSA9PT0gNyAvKiBUb2tlblR5cGVzLkxpdGVyYWwgKi8pKSB7XG4gICAgICAgICAgICAgICAgICAgIGVtaXRFcnJvcihDb21waWxlRXJyb3JDb2Rlcy5VTlRFUk1JTkFURURfQ0xPU0lOR19CUkFDRSwgY3VycmVudFBvc2l0aW9uKCksIDApO1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmJyYWNlTmVzdCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZWFkVG9rZW4oc2NuciwgY29udGV4dCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgodmFsaWROYW1lZElkZW50aWZpZXIgPSBpc05hbWVkSWRlbnRpZmllclN0YXJ0KHNjbnIsIGNvbnRleHQpKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IGdldFRva2VuKGNvbnRleHQsIDUgLyogVG9rZW5UeXBlcy5OYW1lZCAqLywgcmVhZE5hbWVkSWRlbnRpZmllcihzY25yKSk7XG4gICAgICAgICAgICAgICAgICAgIHNraXBTcGFjZXMoc2Nucik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCh2YWxpZExpc3RJZGVudGlmaWVyID0gaXNMaXN0SWRlbnRpZmllclN0YXJ0KHNjbnIsIGNvbnRleHQpKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IGdldFRva2VuKGNvbnRleHQsIDYgLyogVG9rZW5UeXBlcy5MaXN0ICovLCByZWFkTGlzdElkZW50aWZpZXIoc2NucikpO1xuICAgICAgICAgICAgICAgICAgICBza2lwU3BhY2VzKHNjbnIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgodmFsaWRMaXRlcmFsID0gaXNMaXRlcmFsU3RhcnQoc2NuciwgY29udGV4dCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gZ2V0VG9rZW4oY29udGV4dCwgNyAvKiBUb2tlblR5cGVzLkxpdGVyYWwgKi8sIHJlYWRMaXRlcmFsKHNjbnIpKTtcbiAgICAgICAgICAgICAgICAgICAgc2tpcFNwYWNlcyhzY25yKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIXZhbGlkTmFtZWRJZGVudGlmaWVyICYmICF2YWxpZExpc3RJZGVudGlmaWVyICYmICF2YWxpZExpdGVyYWwpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogd2Ugc2hvdWxkIGJlIHJlLWRlc2lnbmVkIGludmFsaWQgY2FzZXMsIHdoZW4gd2Ugd2lsbCBleHRlbmQgbWVzc2FnZSBzeW50YXggbmVhciB0aGUgZnV0dXJlIC4uLlxuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IGdldFRva2VuKGNvbnRleHQsIDEzIC8qIFRva2VuVHlwZXMuSW52YWxpZFBsYWNlICovLCByZWFkSW52YWxpZElkZW50aWZpZXIoc2NucikpO1xuICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IoQ29tcGlsZUVycm9yQ29kZXMuSU5WQUxJRF9UT0tFTl9JTl9QTEFDRUhPTERFUiwgY3VycmVudFBvc2l0aW9uKCksIDAsIHRva2VuLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgc2tpcFNwYWNlcyhzY25yKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgfVxuICAgIC8vIFRPRE86IFdlIG5lZWQgcmVmYWN0b3Jpbmcgb2YgdG9rZW4gcGFyc2luZyAuLi5cbiAgICBmdW5jdGlvbiByZWFkVG9rZW5JbkxpbmtlZChzY25yLCBjb250ZXh0KSB7XG4gICAgICAgIGNvbnN0IHsgY3VycmVudFR5cGUgfSA9IGNvbnRleHQ7XG4gICAgICAgIGxldCB0b2tlbiA9IG51bGw7XG4gICAgICAgIGNvbnN0IGNoID0gc2Nuci5jdXJyZW50Q2hhcigpO1xuICAgICAgICBpZiAoKGN1cnJlbnRUeXBlID09PSA4IC8qIFRva2VuVHlwZXMuTGlua2VkQWxpYXMgKi8gfHxcbiAgICAgICAgICAgIGN1cnJlbnRUeXBlID09PSA5IC8qIFRva2VuVHlwZXMuTGlua2VkRG90ICovIHx8XG4gICAgICAgICAgICBjdXJyZW50VHlwZSA9PT0gMTIgLyogVG9rZW5UeXBlcy5MaW5rZWRNb2RpZmllciAqLyB8fFxuICAgICAgICAgICAgY3VycmVudFR5cGUgPT09IDEwIC8qIFRva2VuVHlwZXMuTGlua2VkRGVsaW1pdGVyICovKSAmJlxuICAgICAgICAgICAgKGNoID09PSBDSEFSX0xGIHx8IGNoID09PSBDSEFSX1NQKSkge1xuICAgICAgICAgICAgZW1pdEVycm9yKENvbXBpbGVFcnJvckNvZGVzLklOVkFMSURfTElOS0VEX0ZPUk1BVCwgY3VycmVudFBvc2l0aW9uKCksIDApO1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoY2gpIHtcbiAgICAgICAgICAgIGNhc2UgXCJAXCIgLyogVG9rZW5DaGFycy5MaW5rZWRBbGlhcyAqLzpcbiAgICAgICAgICAgICAgICBzY25yLm5leHQoKTtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGdldFRva2VuKGNvbnRleHQsIDggLyogVG9rZW5UeXBlcy5MaW5rZWRBbGlhcyAqLywgXCJAXCIgLyogVG9rZW5DaGFycy5MaW5rZWRBbGlhcyAqLyk7XG4gICAgICAgICAgICAgICAgY29udGV4dC5pbkxpbmtlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgY2FzZSBcIi5cIiAvKiBUb2tlbkNoYXJzLkxpbmtlZERvdCAqLzpcbiAgICAgICAgICAgICAgICBza2lwU3BhY2VzKHNjbnIpO1xuICAgICAgICAgICAgICAgIHNjbnIubmV4dCgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBnZXRUb2tlbihjb250ZXh0LCA5IC8qIFRva2VuVHlwZXMuTGlua2VkRG90ICovLCBcIi5cIiAvKiBUb2tlbkNoYXJzLkxpbmtlZERvdCAqLyk7XG4gICAgICAgICAgICBjYXNlIFwiOlwiIC8qIFRva2VuQ2hhcnMuTGlua2VkRGVsaW1pdGVyICovOlxuICAgICAgICAgICAgICAgIHNraXBTcGFjZXMoc2Nucik7XG4gICAgICAgICAgICAgICAgc2Nuci5uZXh0KCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFRva2VuKGNvbnRleHQsIDEwIC8qIFRva2VuVHlwZXMuTGlua2VkRGVsaW1pdGVyICovLCBcIjpcIiAvKiBUb2tlbkNoYXJzLkxpbmtlZERlbGltaXRlciAqLyk7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIGlmIChpc1BsdXJhbFN0YXJ0KHNjbnIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gZ2V0VG9rZW4oY29udGV4dCwgMSAvKiBUb2tlblR5cGVzLlBpcGUgKi8sIHJlYWRQbHVyYWwoc2NucikpO1xuICAgICAgICAgICAgICAgICAgICAvLyByZXNldFxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmJyYWNlTmVzdCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuaW5MaW5rZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNMaW5rZWREb3RTdGFydChzY25yLCBjb250ZXh0KSB8fFxuICAgICAgICAgICAgICAgICAgICBpc0xpbmtlZERlbGltaXRlclN0YXJ0KHNjbnIsIGNvbnRleHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHNraXBTcGFjZXMoc2Nucik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZWFkVG9rZW5JbkxpbmtlZChzY25yLCBjb250ZXh0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzTGlua2VkTW9kaWZpZXJTdGFydChzY25yLCBjb250ZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICBza2lwU3BhY2VzKHNjbnIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VG9rZW4oY29udGV4dCwgMTIgLyogVG9rZW5UeXBlcy5MaW5rZWRNb2RpZmllciAqLywgcmVhZExpbmtlZE1vZGlmaWVyKHNjbnIpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzTGlua2VkUmVmZXJTdGFydChzY25yLCBjb250ZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICBza2lwU3BhY2VzKHNjbnIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09IFwie1wiIC8qIFRva2VuQ2hhcnMuQnJhY2VMZWZ0ICovKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzY2FuIHRoZSBwbGFjZWhvbGRlclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlYWRUb2tlbkluUGxhY2Vob2xkZXIoc2NuciwgY29udGV4dCkgfHwgdG9rZW47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VG9rZW4oY29udGV4dCwgMTEgLyogVG9rZW5UeXBlcy5MaW5rZWRLZXkgKi8sIHJlYWRMaW5rZWRSZWZlcihzY25yKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUeXBlID09PSA4IC8qIFRva2VuVHlwZXMuTGlua2VkQWxpYXMgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgZW1pdEVycm9yKENvbXBpbGVFcnJvckNvZGVzLklOVkFMSURfTElOS0VEX0ZPUk1BVCwgY3VycmVudFBvc2l0aW9uKCksIDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb250ZXh0LmJyYWNlTmVzdCA9IDA7XG4gICAgICAgICAgICAgICAgY29udGV4dC5pbkxpbmtlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJldHVybiByZWFkVG9rZW4oc2NuciwgY29udGV4dCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgLy8gVE9ETzogV2UgbmVlZCByZWZhY3RvcmluZyBvZiB0b2tlbiBwYXJz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WdodCAqLyk7XG4gICAgICAgICAgICBjYXNlIFwiQFwiIC8qIFRva2VuQ2hhcnMuTGlua2VkQWxpYXMgKi86XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlYWRUb2tlbkluTGlua2VkKHNjbnIsIGNvbnRleHQpIHx8IGdldEVuZFRva2VuKGNvbnRleHQpO1xuICAgICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgICAgIGlmIChpc1BsdXJhbFN0YXJ0KHNjbnIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gZ2V0VG9rZW4oY29udGV4dCwgMSAvKiBUb2tlblR5cGVzLlBpcGUgKi8sIHJlYWRQbHVyYWwoc2NucikpO1xuICAgICAgICAgICAgICAgICAgICAvLyByZXNldFxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmJyYWNlTmVzdCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuaW5MaW5rZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCB7IGlzTW9kdWxvLCBoYXNTcGFjZSB9ID0gZGV0ZWN0TW9kdWxvU3RhcnQoc2Nucik7XG4gICAgICAgICAgICAgICAgaWYgKGlzTW9kdWxvKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBoYXNTcGFjZVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBnZXRUb2tlbihjb250ZXh0LCAwIC8qIFRva2VuVHlwZXMuVGV4dCAqLywgcmVhZFRleHQoc2NucikpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGdldFRva2VuKGNvbnRleHQsIDQgLyogVG9rZW5UeXBlcy5Nb2R1bG8gKi8sIHJlYWRNb2R1bG8oc2NucikpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNUZXh0U3RhcnQoc2NucikpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldFRva2VuKGNvbnRleHQsIDAgLyogVG9rZW5UeXBlcy5UZXh0ICovLCByZWFkVGV4dChzY25yKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0b2tlbjtcbiAgICB9XG4gICAgZnVuY3Rpb24gbmV4dFRva2VuKCkge1xuICAgICAgICBjb25zdCB7IGN1cnJlbnRUeXBlLCBvZmZzZXQsIHN0YXJ0TG9jLCBlbmRMb2MgfSA9IF9jb250ZXh0O1xuICAgICAgICBfY29udGV4dC5sYXN0VHlwZSA9IGN1cnJlbnRUeXBlO1xuICAgICAgICBfY29udGV4dC5sYXN0T2Zmc2V0ID0gb2Zmc2V0O1xuICAgICAgICBfY29udGV4dC5sYXN0U3RhcnRMb2MgPSBzdGFydExvYztcbiAgICAgICAgX2NvbnRleHQubGFzdEVuZExvYyA9IGVuZExvYztcbiAgICAgICAgX2NvbnRleHQub2Zmc2V0ID0gY3VycmVudE9mZnNldCgpO1xuICAgICAgICBfY29udGV4dC5zdGFydExvYyA9IGN1cnJlbnRQb3NpdGlvbigpO1xuICAgICAgICBpZiAoX3NjbnIuY3VycmVudENoYXIoKSA9PT0gRU9GKSB7XG4gICAgICAgICAgICByZXR1cm4gZ2V0VG9rZW4oX2NvbnRleHQsIDE0IC8qIFRva2VuVHlwZXMuRU9GICovKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVhZFRva2VuKF9zY25yLCBfY29udGV4dCk7XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIG5leHRUb2tlbixcbiAgICAgICAgY3VycmVudE9mZnNldCxcbiAgICAgICAgY3VycmVudFBvc2l0aW9uLFxuICAgICAgICBjb250ZXh0XG4gICAgfTtcbn1cblxuY29uc3QgRVJST1JfRE9NQUlOJDIgPSAncGFyc2VyJztcbi8vIEJhY2tzbGFzaCBiYWN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Skge1xuICAgIGNvbnN0IGxvY2F0aW9uID0gb3B0aW9ucy5sb2NhdGlvbiAhPT0gZmFsc2U7XG4gICAgY29uc3QgeyBvbkVycm9yIH0gPSBvcHRpb25zO1xuICAgIGZ1bmN0aW9uIGVtaXRFcnJvcih0b2tlbnplciwgY29kZSwgc3RhcnQsIG9mZnNldCwgLi4uYXJncykge1xuICAgICAgICBjb25zdCBlbmQgPSB0b2tlbnplci5jdXJyZW50UG9zaXRpb24oKTtcbiAgICAgICAgZW5kLm9mZnNldCArPSBvZmZzZXQ7XG4gICAgICAgIGVuZC5jb2x1bW4gKz0gb2Zmc2V0O1xuICAgICAgICBpZiAob25FcnJvcikge1xuICAgICAgICAgICAgY29uc3QgbG9jID0gbG9jYXRpb24gPyBjcmVhdGVMb2NhdGlvbihzdGFydCwgZW5kKSA6IG51bGw7XG4gICAgICAgICAgICBjb25zdCBlcnIgPSBjcmVhdGVDb21waWxlRXJyb3IoY29kZSwgbG9jLCB7XG4gICAgICAgICAgICAgICAgZG9tYWluOiBFUlJPUl9ET01BSU4kMixcbiAgICAgICAgICAgICAgICBhcmdzXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIG9uRXJyb3IoZXJyKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBzdGFydE5vZGUodHlwZSwgb2Zmc2V0LCBsb2MpIHtcbiAgICAgICAgY29uc3Qgbm9kZSA9IHsgdHlwZSB9O1xuICAgICAgICBpZiAobG9jYXRpb24pIHtcbiAgICAgICAgICAgIG5vZGUuc3RhcnQgPSBvZmZzZXQ7XG4gICAgICAgICAgICBub2RlLmVuZCA9IG9mZnNldDtcbiAgICAgICAgICAgIG5vZGUubG9jID0geyBzdGFydDogbG9jLCBlbmQ6IGxvYyB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBub2RlO1xuICAgIH1cbiAgICBmdW5jdGlvbiBlbmROb2RlKG5vZGUsIG9mZnNldCwgcG9zLCB0eXBlKSB7XG4g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6ZXIubmV4dFRva2VuKCk7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoICh0b2tlbi50eXBlKSB7XG4gICAgICAgICAgICBjYXNlIDExIC8qIFRva2VuVHlwZXMuTGlua2VkS2V5ICovOlxuICAgICAgICAgICAgICAgIGlmICh0b2tlbi52YWx1ZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGVtaXRFcnJvcih0b2tlbml6ZXIsIENvbXBpbGVFcnJvckNvZGVzLlVORVhQRUNURURfTEVYSUNBTF9BTkFMWVNJUywgY29udGV4dC5sYXN0U3RhcnRMb2MsIDAsIGdldFRva2VuQ2FwdGlvbih0b2tlbikpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsaW5rZWROb2RlLmtleSA9IHBhcnNlTGlua2VkS2V5KHRva2VuaXplciwgdG9rZW4udmFsdWUgfHwgJycpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSA1IC8qIFRva2VuVHlwZXMuTmFtZWQgKi86XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuLnZhbHVlID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgZW1pdEVycm9yKHRva2VuaXplciwgQ29tcGlsZUVycm9yQ29kZXMuVU5FWFBFQ1RFRF9MRVhJQ0FMX0FOQUxZU0lTLCBjb250ZXh0Lmxhc3RTdGFydExvYywgMCwgZ2V0VG9rZW5DYXB0aW9uKHRva2VuKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxpbmtlZE5vZGUua2V5ID0gcGFyc2VOYW1lZCh0b2tlbml6ZXIsIHRva2VuLnZhbHVlIHx8ICcnKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgNiAvKiBUb2tlblR5cGVzLkxpc3QgKi86XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuLnZhbHVlID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgZW1pdEVycm9yKHRva2VuaXplciwgQ29tcGlsZUVycm9yQ29kZXMuVU5FWFBFQ1RFRF9MRVhJQ0FMX0FOQUxZU0lTLCBjb250ZXh0Lmxhc3RTdGFydExvYywgMCwgZ2V0VG9rZW5DYXB0aW9uKHRva2VuKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxpbmtlZE5vZGUua2V5ID0gcGFyc2VMaXN0KHRva2VuaXplciwgdG9rZW4udmFsdWUgfHwgJycpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSA3IC8qIFRva2VuVHlwZXMuTGl0ZXJhbCAqLzpcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IodG9rZW5pemVyLCBDb21waWxlRXJyb3JDb2Rlcy5VTkVYUEVDVEVEX0xFWElDQUxfQU5BTFlTSVMsIGNvbnRleHQubGFzdFN0YXJ0TG9jLCAwLCBnZXRUb2tlbkNhcHRpb24odG9rZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGlua2VkTm9kZS5rZXkgPSBwYXJzZUxpdGVyYWwodG9rZW5pemVyLCB0b2tlbi52YWx1ZSB8fCAnJyk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OiB7XG4gICAgICAgICAgICAgICAgLy8gZW1wdHkga2V5XG4gICAgICAgICAgICAgICAgZW1pdEVycm9yKHRva2VuaXplciwgQ29tcGlsZUVycm9yQ29kZXMuVU5FWFBFQ1RFRF9FTVBUWV9MSU5LRURfS0VZLCBjb250ZXh0Lmxhc3RTdGFydExvYywgMCk7XG4gICAgICAgICAgICAgICAgY29uc3QgbmV4dENvbnRleHQgPSB0b2tlbml6ZXIuY29udGV4dCgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGVtcHR5TGlua2VkS2V5Tm9kZSA9IHN0YXJ0Tm9kZSg3IC8qIE5vZGVUeXBlcy5MaW5rZWRLZXkgKi8sIG5leHRDb250ZXh0Lm9mZnNldCwgbmV4dENvbnRleHQuc3RhcnRMb2MpO1xuICAgICAgICAgICAgICAgIGVtcHR5TGlua2VkS2V5Tm9kZS52YWx1ZSA9ICcnO1xuICAgICAgICAgICAgICAgIGVuZE5vZGUoZW1wdHlMaW5rZWRLZXlOb2RlLCBuZXh0Q29udGV4dC5vZmZzZXQsIG5leHRDb250ZXh0LnN0YXJ0TG9jKTtcbiAgICAgICAgICAgICAgICBsaW5rZWROb2RlLmtleSA9IGVtcHR5TGlua2VkS2V5Tm9kZTtcbiAgICAgICAgICAgICAgICBlbmROb2RlKGxpbmtlZE5vZGUsIG5leHRDb250ZXh0Lm9mZnNldCwgbmV4dENvbnRleHQuc3RhcnRMb2MpO1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIG5leHRDb25zdW1lVG9rZW46IHRva2VuLFxuICAgICAgICAgICAgICAgICAgICBub2RlOiBsaW5rZWROb2RlXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbmROb2RlKGxpbmtlZE5vZGUsIHRva2VuaXplci5jdXJyZW50T2Zmc2V0KCksIHRva2VuaXplci5jdXJyZW50UG9zaXRpb24oKSk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBub2RlOiBsaW5rZWROb2RlXG4gICAgICAgIH07XG4gICAgfVxuICAgIGZ1bmN0aW9uIHBhcnNlTWVzc2FnZSh0b2tlbml6ZXIpIHtcbiAgICAgICAgY29uc3QgY29udGV4dCA9IHRva2VuaXplci5jb250ZXh0KCk7XG4gICAgICAgIGNvbnN0IHN0YXJ0T2Zmc2V0ID0gY29udGV4dC5jdXJyZW50VHlwZSA9PT0gMSAvKiBUb2tlblR5cGVzLlBpcGUgKi9cbiAgICAgICAgICAgID8gdG9rZW5pemVyLmN1cnJlbnRPZmZzZXQoKVxuICAgICAgICAgICAgOiBjb250ZXh0Lm9mZnNldDtcbiAgICAgICAgY29uc3Qgc3RhcnRMb2MgPSBjb250ZXh0LmN1cnJlbnRUeXBlID09PSAxIC8qIFRva2VuVHlwZXMuUGlwZSAqL1xuICAgICAgICAgICAgPyBjb250ZXh0LmVuZExvY1xuICAgICAgICAgICAgOiBjb250ZXh0LnN0YXJ0TG9jO1xuICAgICAgICBjb25zdCBub2RlID0gc3RhcnROb2RlKDIgLyogTm9kZVR5cGVzLk1lc3NhZ2UgKi8sIHN0YXJ0T2Zmc2V0LCBzdGFydExvYyk7XG4gICAgICAgIG5vZGUuaXRlbXMgPSBbXTtcbiAgICAgICAgbGV0IG5leHRUb2tlbiA9IG51bGw7XG4gICAgICAgIGRvIHtcbiAgICAgICAgICAgIGNvbnN0IHRva2VuID0gbmV4dFRva2VuIHx8IHRva2VuaXplci5uZXh0VG9rZW4oKTtcbiAgICAgICAgICAgIG5leHRUb2tlbiA9IG51bGw7XG4gICAgICAgICAgICBzd2l0Y2ggKHRva2VuLnR5cGUpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDAgLyogVG9rZW5UeXBlcy5UZXh0ICovOlxuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZW1pdEVycm9yKHRva2VuaXplciwgQ29tcGlsZUVycm9yQ29kZXMuVU5FWFBFQ1RFRF9MRVhJQ0FMX0FOQUxZU0lTLCBjb250ZXh0Lmxhc3RTdGFydExvYywgMCwgZ2V0VG9rZW5DYXB0aW9uKHRva2VuKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbm9kZS5pdGVtcy5wdXNoKHBhcnNlVGV4dCh0b2tlbml6ZXIsIHRva2VuLnZhbHVlIHx8ICcnKSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNiAvKiBUb2tlblR5cGVzLkxpc3QgKi86XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbi52YWx1ZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IodG9rZW5pemVyLCBDb21waWxlRXJyb3JDb2Rlcy5VTkVYUEVDVEVEX0xFWElDQUxfQU5BTFlTSVMsIGNvbnRleHQubGFzdFN0YXJ0TG9jLCAwLCBnZXRUb2tlbkNhcHRpb24odG9rZW4pKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBub2RlLml0ZW1zLnB1c2gocGFyc2VMaXN0KHRva2VuaXplciwgdG9rZW4udmFsdWUgfHwgJycpKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSA1IC8qIFRva2VuVHlwZXMuTmFtZWQgKi86XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbi52YWx1ZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IodG9rZW5pemVyLCBDb21waWxlRXJyb3JDb2Rlcy5VTkVYUEVDVEVEX0xFWElDQUxfQU5BTFlTSVMsIGNvbnRleHQubGFzdFN0YXJ0TG9jLCAwLCBnZXRUb2tlbkNhcHRpb24odG9rZW4pKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBub2RlLml0ZW1zLnB1c2gocGFyc2VOYW1lZCh0b2tlbml6ZXIsIHRva2VuLnZhbHVlIHx8ICcnKSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNyAvKiBUb2tlblR5cGVzLkxpdGVyYWwgKi86XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbi52YWx1ZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbWl0RXJyb3IodG9rZW5pemVyLCBDb21waWxlRXJyb3JDb2Rlcy5VTkVYUEVDVEVEX0xFWElDQUxfQU5BTFlTSVMsIGNvbnRleHQubGFzdFN0YXJ0TG9jLCAwLCBnZXRUb2tlbkNhcHRpb24odG9rZW4pKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBub2RlLml0ZW1zLnB1c2gocGFyc2VMaXRlcmFsKHRva2VuaXplciwgdG9rZW4udmFsdWUgfHwgJycpKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSA4IC8qIFRva2VuVHlwZXMuTGlua2VkQWxpYXMgKi86IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyc2VkID0gcGFyc2VMaW5rZWQodG9rZW5pemVyKTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5pdGVtcy5wdXNoKHBhcnNlZC5ub2RlKTtcbiAgICAgICAgICAgICAgICAgICAgbmV4dFRva2VuID0gcGFyc2VkLm5leHRDb25zdW1lVG9rZW4gfHwgbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlIChjb250ZXh0LmN1cnJlbnRUeXBlICE9PSAxNCAvKiBUb2tlblR5cGVzLkVPRiAqLyAmJlxuICAgICAgICAgICAgY29udGV4dC5jdXJyZW50VHlwZSAhPT0gMSAvKiBUb2tlblR5cGVzLlBpcGUgKi8pO1xuICAgICAgICAvLyBhZGp1c3QgbWVzc2FnZSBub2RlIGxvY1xuICAgICAgICBjb25zdCBlbmRPZmZzZXQgPSBjb250ZXh0LmN1cnJlbnRUeXBlID09PSAxIC8qIFRva2VuVHlwZXMuUGlwZSAqL1xuICAgICAgICAgICAgPyBjb250ZXh0Lmxhc3RPZmZzZXRcbiAgICAgICAgICAgIDogdG9rZW5pemVyLmN1cnJlbnRPZmZzZXQoKTtcbiAgICA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SB7XG4gICAgICAgICAgICAgICAgbWluaWZ5KGNhc2VzW2ldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBsdXJhbC5jID0gY2FzZXM7XG4gICAgICAgICAgICBkZWxldGUgcGx1cmFsLmNhc2VzO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSAyIC8qIE5vZGVUeXBlcy5NZXNzYWdlICovOiB7XG4gICAgICAgICAgICBjb25zdCBtZXNzYWdlID0gbm9kZTtcbiAgICAgICAgICAgIGNvbnN0IGl0ZW1zID0gbWVzc2FnZS5pdGVtcztcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgaXRlbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBtaW5pZnkoaXRlbXNbaV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWVzc2FnZS5pID0gaXRlbXM7XG4gICAgICAgICAgICBkZWxldGUgbWVzc2FnZS5pdGVtcztcbiAgICAgICAgICAgIGlmIChtZXNzYWdlLnN0YXRpYykge1xuICAgICAgICAgICAgICAgIG1lc3NhZ2UucyA9IG1lc3NhZ2Uuc3RhdGljO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBtZXNzYWdlLnN0YXRpYztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgMyAvKiBOb2RlVHlwZXMuVGV4dCAqLzpcbiAgICAgICAgY2FzZSA5IC8qIE5vZGVUeXBlcy5MaXRlcmFsICovOlxuICAgICAgICBjYXNlIDggLyogTm9kZVR5cGVzLkxpbmtlZE1vZGlmaWVyICovOlxuICAgICAgICBjYXNlIDcgLyogTm9kZVR5cGVzLkxpbmtlZEtleSAqLzoge1xuICAgICAgICAgICAgY29uc3QgdmFsdWVOb2RlID0gbm9kZTtcbiAgICAgICAgICAgIGlmICh2YWx1ZU5vZGUudmFsdWUpIHtcbiAgICAgICAgICAgICAgICB2YWx1ZU5vZGUudiA9IHZhbHVlTm9kZS52YWx1ZTtcbiAgICAgICAgICAgICAgICBkZWxldGUgdmFsdWVOb2RlLnZhbHVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSA2IC8qIE5vZGVUeXBlcy5MaW5rZWQgKi86IHtcbiAgICAgICAgICAgIGNvbnN0IGxpbmtlZCA9IG5vZGU7XG4gICAgICAgICAgICBtaW5pZnkobGlua2VkLmtleSk7XG4gICAgICAgICAgICBsaW5rZWQuayA9IGxpbmtlZC5rZXk7XG4gICAgICAgICAgICBkZWxldGUgbGlua2VkLmtleTtcbiAgICAgICAgICAgIGlmIChsaW5rZWQubW9kaWZpZXIpIHtcbiAgICAgICAgICAgICAgICBtaW5pZnkobGlua2VkLm1vZGlmaWVyKTtcbiAgICAgICAgICAgICAgICBsaW5rZWQubSA9IGxpbmtlZC5tb2RpZmllcjtcbiAgICAgICAgICAgICAgICBkZWxldGUgbGlua2VkLm1vZGlmaWVyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSA1IC8qIE5vZGVUeXBlcy5MaXN0ICovOiB7XG4gICAgICAgICAgICBjb25zdCBsaXN0ID0gbm9kZTtcbiAgICAgICAgICAgIGxpc3QuaSA9IGxpc3QuaW5kZXg7XG4gICAgICAgICAgICBkZWxldGUgbGlzdC5pbmRleDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgNCAvKiBOb2RlVHlwZXMuTmFtZWQgKi86IHtcbiAgICAgICAgICAgIGNvbnN0IG5hbWVkID0gbm9kZTtcbiAgICAgICAgICAgIG5hbWVkLmsgPSBuYW1lZC5rZXk7XG4gICAgICAgICAgICBkZWxldGUgbmFtZWQua2V5O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIC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xuICAgIGFjdGlvbnNbMyAvKiBBY3Rpb25zLlBVU0hfU1VCX1BBVEggKi9dID0gKCkgPT4ge1xuICAgICAgICBpZiAoc3ViUGF0aERlcHRoID4gMCkge1xuICAgICAgICAgICAgc3ViUGF0aERlcHRoLS07XG4gICAgICAgICAgICBtb2RlID0gNCAvKiBTdGF0ZXMuSU5fU1VCX1BBVEggKi87XG4gICAgICAgICAgICBhY3Rpb25zWzAgLyogQWN0aW9ucy5BUFBFTkQgKi9dKCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBzdWJQYXRoRGVwdGggPSAwO1xuICAgICAgICAgICAgaWYgKGtleSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAga2V5ID0gZm9ybWF0U3ViUGF0aChrZXkpO1xuICAgICAgICAgICAgaWYgKGtleSA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBhY3Rpb25zWzEgLyogQWN0aW9ucy5QVVNIICovXSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICBmdW5jdGlvbiBtYXliZVVuZXNjYXBlUXVvdGUoKSB7XG4gICAgICAgIGNvbnN0IG5leHRDaGFyID0gcGF0aFtpbmRleCArIDFdO1xuICAgICAgICBpZiAoKG1vZGUgPT09IDUgLyogU3RhdGVzLklOX1NJTkdMRV9RVU9URSAqLyAmJlxuICAgICAgICAgICAgbmV4dENoYXIgPT09IFwiJ1wiIC8qIFBhdGhDaGFyVHlwZXMuU0lOR0xFX1FVT1RFICovKSB8fFxuICAgICAgICAgICAgKG1vZGUgPT09IDYgLyogU3RhdGVzLklOX0RPVUJMRV9RVU9URSAqLyAmJlxuICAgICAgICAgICAgICAgIG5leHRD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SA9IDA7XG4gICAgd2hpbGUgKGkgPCBsZW4pIHtcbiAgICAgICAgY29uc3QgdmFsID0gbGFzdFtoaXRbaV1dO1xuICAgICAgICBpZiAodmFsID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc0Z1bmN0aW9uKGxhc3QpKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBsYXN0ID0gdmFsO1xuICAgICAgICBpKys7XG4gICAgfVxuICAgIHJldHVybiBsYXN0O1xufVxuXG5jb25zdCBERUZBVUxUX01PRElGSUVSID0gKHN0cikgPT4gc3RyO1xuY29uc3QgREVGQVVMVF9NRVNTQUdFID0gKGN0eCkgPT4gJyc7IC8vIGVzbGludC1kaXNhYmxlLWxpbmVcbmNvbnN0IERFRkFVTFRfTUVTU0FHRV9EQVRBX1RZUEUgPSAndGV4dCc7XG5jb25zdCBERUZBVUxUX05PUk1BTElaRSA9ICh2YWx1ZXMpID0+IHZhbHVlcy5sZW5ndGggPT09IDAgPyAnJyA6IGpvaW4odmFsdWVzKTtcbmNvbnN0IERFRkFVTFRfSU5URVJQT0xBVEUgPSB0b0Rpc3BsYXlTdHJpbmc7XG5mdW5jdGlvbiBwbHVyYWxEZWZhdWx0KGNob2ljZSwgY2hvaWNlc0xlbmd0aCkge1xuICAgIGNob2ljZSA9IE1hdGguYWJzKGNob2ljZSk7XG4gICAgaWYgKGNob2ljZXNMZW5ndGggPT09IDIpIHtcbiAgICAgICAgLy8gcHJldHRpZXItaWdub3JlXG4gICAgICAgIHJldHVybiBjaG9pY2VcbiAgICAgICAgICAgID8gY2hvaWNlID4gMVxuICAgICAgICAgICAgICAgID8gMVxuICAgICAgICAgICAgICAgIDogMFxuICAgICAgICAgICAgOiAxO1xuICAgIH1cbiAgICByZXR1cm4gY2hvaWNlID8gTWF0aC5taW4oY2hvaWNlLCAyKSA6IDA7XG59XG5mdW5jdGlvbiBnZXRQbHVyYWxJbmRleChvcHRpb25zKSB7XG4gICAgLy8gcHJldHRpZXItaWdub3JlXG4gICAgY29uc3QgaW5kZXggPSBpc051bWJlcihvcHRpb25zLnBsdXJhbEluZGV4KVxuICAgICAgICA/IG9wdGlvbnMucGx1cmFsSW5kZXhcbiAgICAgICAgOiAtMTtcbiAgICAvLyBwcmV0dGllci1pZ25vcmVcbiAgICByZXR1cm4gb3B0aW9ucy5uYW1lZCAmJiAoaXNOdW1iZXIob3B0aW9ucy5uYW1lZC5jb3VudCkgfHwgaXNOdW1iZXIob3B0aW9ucy5uYW1lZC5uKSlcbiAgICAgICAgPyBpc051bWJlcihvcHRpb25zLm5hbWVkLmNvdW50KVxuICAgICAgICAgICAgPyBvcHRpb25zLm5hbWVkLmNvdW50XG4gICAgICAgICAgICA6IGlzTnVtYmVyKG9wdGlvbnMubmFtZWQubilcbiAgICAgICAgICAgICAgICA/IG9wdGlvbnMubmFtZWQublxuICAgICAgICAgICAgICAgIDogaW5kZXhcbiAgICAgICAgOiBpbmRleDtcbn1cbmZ1bmN0aW9uIG5vcm1hbGl6ZU5hbWVkKHBsdXJhbEluZGV4LCBwcm9wcykge1xuICAgIGlmICghcHJvcHMuY291bnQpIHtcbiAgICAgICAgcHJvcHMuY291bnQgPSBwbHVyYWxJbmRleDtcbiAgICB9XG4gICAgaWYgKCFwcm9wcy5uKSB7XG4gICAgICAgIHByb3BzLm4gPSBwbHVyYWxJbmRleDtcbiAgICB9XG59XG5mdW5jdGlvbiBjcmVhdGVNZXNzYWdlQ29udGV4dChvcHRpb25zID0ge30pIHtcbiAgICBjb25zdCBsb2NhbGUgPSBvcHRpb25zLmxvY2FsZTtcbiAgICBjb25zdCBwbHVyYWxJbmRleCA9IGdldFBsdXJhbEluZGV4KG9wdGlvbnMpO1xuICAgIGNvbnN0IHBsdXJhbFJ1bGUgPSBpc09iamVjdChvcHRpb25zLnBsdXJhbFJ1bGVzKSAmJlxuICAgICAgICBpc1N0cm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25zdCB0eXBlID0gaXNQbGFpbk9iamVjdChvcHRpb25zLnByb2Nlc3NvcikgJiYgaXNTdHJpbmcob3B0aW9ucy5wcm9jZXNzb3IudHlwZSlcbiAgICAgICAgPyBvcHRpb25zLnByb2Nlc3Nvci50eXBlXG4gICAgICAgIDogREVGQVVMVF9NRVNTQUdFX0RBVEFfVFlQRTtcbiAgICBjb25zdCBsaW5rZWQgPSAoa2V5LCAuLi5hcmdzKSA9PiB7XG4gICAgICAgIGNvbnN0IFthcmcxLCBhcmcyXSA9IGFyZ3M7XG4gICAgICAgIGxldCB0eXBlID0gJ3RleHQnO1xuICAgICAgICBsZXQgbW9kaWZpZXIgPSAnJztcbiAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICBpZiAoaXNPYmplY3QoYXJnMSkpIHtcbiAgICAgICAgICAgICAgICBtb2RpZmllciA9IGFyZzEubW9kaWZpZXIgfHwgbW9kaWZpZXI7XG4gICAgICAgICAgICAgICAgdHlwZSA9IGFyZzEudHlwZSB8fCB0eXBlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoaXNTdHJpbmcoYXJnMSkpIHtcbiAgICAgICAgICAgICAgICBtb2RpZmllciA9IGFyZzEgfHwgbW9kaWZpZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoYXJncy5sZW5ndGggPT09IDIpIHtcbiAgICAgICAgICAgIGlmIChpc1N0cmluZyhhcmcxKSkge1xuICAgICAgICAgICAgICAgIG1vZGlmaWVyID0gYXJnMSB8fCBtb2RpZmllcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc1N0cmluZyhhcmcyKSkge1xuICAgICAgICAgICAgICAgIHR5cGUgPSBhcmcyIHx8IHR5cGU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgcmV0ID0gbWVzc2FnZShrZXkpKGN0eCk7XG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XJDYXNlKClcbiAgICAgICAgICAgICAgICA6IHR5cGUgPT09ICd2bm9kZScgJiYgaXNPYmplY3QodmFsKSAmJiAnX192X2lzVk5vZGUnIGluIHZhbFxuICAgICAgICAgICAgICAgICAgICA/IHZhbC5jaGlsZHJlbi50b0xvd2VyQ2FzZSgpXG4gICAgICAgICAgICAgICAgICAgIDogdmFsO1xuICAgICAgICB9LFxuICAgICAgICBjYXBpdGFsaXplOiAodmFsLCB0eXBlKSA9PiB7XG4gICAgICAgICAgICAvLyBwcmV0dGllci1pZ25vcmVcbiAgICAgICAgICAgIHJldHVybiAodHlwZSA9PT0gJ3RleHQnICYmIGlzU3RyaW5nKHZhbClcbiAgICAgICAgICAgICAgICA/IGNhcGl0YWxpemUodmFsKVxuICAgICAgICAgICAgICAgIDogdHlwZSA9PT0gJ3Zub2RlJyAmJiBpc09iamVjdCh2YWwpICYmICdfX3ZfaXNWTm9kZScgaW4gdmFsXG4gICAgICAgICAgICAgICAgICAgID8gY2FwaXRhbGl6ZSh2YWwuY2hpbGRyZW4pXG4gICAgICAgICAgICAgICAgICAgIDogdmFsKTtcbiAgICAgICAgfVxuICAgIH07XG59XG5sZXQgX2NvbXBpbGVyO1xuZnVuY3Rpb24gcmVnaXN0ZXJNZXNzYWdlQ29tcGlsZXIoY29tcGlsZXIpIHtcbiAgICBfY29tcGlsZXIgPSBjb21waWxlcjtcbn1cbmxldCBfcmVzb2x2ZXI7XG4vKipcbiAqIFJlZ2lzdGVyIHRoZSBtZXNzYWdlIHJlc29sdmVyXG4gKlxuICogQHBhcmFtIHJlc29sdmVyIC0gQSB7QGxpbmsgTWVzc2FnZVJlc29sdmVyfSBmdW5jdGlvblxuICpcbiAqIEBWdWVJMThuR2VuZXJhbFxuICovXG5mdW5jdGlvbiByZWdpc3Rlck1lc3NhZ2VSZXNvbHZlcihyZXNvbHZlcikge1xuICAgIF9yZXNvbHZlciA9IHJlc29sdmVyO1xufVxubGV0IF9mYWxsYmFja2VyO1xuLyoqXG4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Y2tDb250ZXh0ID0gaXNPYmplY3Qob3B0aW9ucy5mYWxsYmFja0NvbnRleHQpXG4gICAgICAgID8gb3B0aW9ucy5mYWxsYmFja0NvbnRleHRcbiAgICAgICAgOiB1bmRlZmluZWQ7XG4gICAgLy8gc2V0dXAgaW50ZXJuYWwgb3B0aW9uc1xuICAgIGNvbnN0IGludGVybmFsT3B0aW9ucyA9IG9wdGlvbnM7XG4gICAgY29uc3QgX19kYXRldGltZUZvcm1hdHRlcnMgPSBpc09iamVjdChpbnRlcm5hbE9wdGlvbnMuX19kYXRldGltZUZvcm1hdHRlcnMpXG4gICAgICAgICAgICA/IGludGVybmFsT3B0aW9ucy5fX2RhdGV0aW1lRm9ybWF0dGVyc1xuICAgICAgICAgICAgOiBuZXcgTWFwKClcbiAgICAgICAgO1xuICAgIGNvbnN0IF9fbnVtYmVyRm9ybWF0dGVycyA9IGlzT2JqZWN0KGludGVybmFsT3B0aW9ucy5fX251bWJlckZvcm1hdHRlcnMpXG4gICAgICAgICAgICA/IGludGVybmFsT3B0aW9ucy5fX251bWJlckZvcm1hdHRlcnNcbiAgICAgICAgICAgIDogbmV3IE1hcCgpXG4gICAgICAgIDtcbiAgICBjb25zdCBfX21ldGEgPSBpc09iamVjdChpbnRlcm5hbE9wdGlvbnMuX19tZXRhKSA/IGludGVybmFsT3B0aW9ucy5fX21ldGEgOiB7fTtcbiAgICBfY2lkKys7XG4gICAgY29uc3QgY29udGV4dCA9IHtcbiAgICAgICAgdmVyc2lvbixcbiAgICAgICAgY2lkOiBfY2lkLFxuICAgICAgICBsb2NhbGUsXG4gICAgICAgIGZhbGxiYWNrTG9jYWxlLFxuICAgICAgICBtZXNzYWdlcyxcbiAgICAgICAgbW9kaWZpZXJzLFxuICAgICAgICBwbHVyYWxSdWxlcyxcbiAgICAgICAgbWlzc2luZyxcbiAgICAgICAgbWlzc2luZ1dhcm4sXG4gICAgICAgIGZhbGxiYWNrV2FybixcbiAgICAgICAgZmFsbGJhY2tGb3JtYXQsXG4gICAgICAgIHVucmVzb2x2aW5nLFxuICAgICAgICBwb3N0VHJhbnNsYXRpb24sXG4gICAgICAgIHByb2Nlc3NvcixcbiAgICAgICAgd2Fybkh0bWxNZXNzYWdlLFxuICAgICAgICBlc2NhcGVQYXJhbWV0ZXIsXG4gICAgICAgIG1lc3NhZ2VDb21waWxlcixcbiAgICAgICAgbWVzc2FnZVJlc29sdmVyLFxuICAgICAgICBsb2NhbGVGYWxsYmFja2VyLFxuICAgICAgICBmYWxsYmFja0NvbnRleHQsXG4gICAgICAgIG9uV2FybixcbiAgICAgICAgX19tZXRhXG4gICAgfTtcbiAgICB7XG4gICAgICAgIGNvbnRleHQuZGF0ZXRpbWVGb3JtYXRzID0gZGF0ZXRpbWVGb3JtYXRzO1xuICAgICAgICBjb250ZXh0Lm51bWJlckZvcm1hdHMgPSBudW1iZXJGb3JtYXRzO1xuICAgICAgICBjb250ZXh0Ll9fZGF0ZXRpbWVGb3JtYXR0ZXJzID0gX19kYXRldGltZUZvcm1hdHRlcnM7XG4gICAgICAgIGNvbnRleHQuX19udW1iZXJGb3JtYXR0ZXJzID0gX19udW1iZXJGb3JtYXR0ZXJzO1xuICAgIH1cbiAgICAvLyBmb3IgdnVlLWRldnRvb2xzIHRpbWVsaW5lIGV2ZW50XG4gICAge1xuICAgICAgICBjb250ZXh0Ll9fdl9lbWl0dGVyID1cbiAgICAgICAgICAgIGludGVybmFsT3B0aW9ucy5fX3ZfZW1pdHRlciAhPSBudWxsXG4gICAgICAgICAgICAgICAgPyBpbnRlcm5hbE9wdGlvbnMuX192X2VtaXR0ZXJcbiAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICB9XG4gICAgLy8gTk9URTogZXhwZXJpbWVudGFsICEhXG4gICAge1xuICAgICAgICBpbml0STE4bkRldlRvb2xzKGNvbnRleHQsIHZlcnNpb24sIF9fbWV0YSk7XG4gICAgfVxuICAgIHJldHVybiBjb250ZXh0O1xufVxuLyoqIEBpbnRlcm5hbC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ICBlbWl0dGVyLmVtaXQoXCJmYWxsYmFja1wiIC8qIFZ1ZURldlRvb2xzVGltZWxpbmVFdmVudHMuRkFMQkFDSyAqLywge1xuICAgICAgICAgICAgICAgICAgICB0eXBlLFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICAgIGZyb20sXG4gICAgICAgICAgICAgICAgICAgIHRvLFxuICAgICAgICAgICAgICAgICAgICBncm91cElkOiBgJHt0eXBlfToke2tleX1gXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgbWVzc2FnZSA9XG4gICAgICAgICAgICBtZXNzYWdlc1t0YXJnZXRMb2NhbGVdIHx8IHt9O1xuICAgICAgICAvLyBmb3IgdnVlLWRldnRvb2xzIHRpbWVsaW5lIGV2ZW50XG4gICAgICAgIGxldCBzdGFydCA9IG51bGw7XG4gICAgICAgIGxldCBzdGFydFRhZztcbiAgICAgICAgbGV0IGVuZFRhZztcbiAgICAgICAgaWYgKGluQnJvd3Nlcikge1xuICAgICAgICAgICAgc3RhcnQgPSB3aW5kb3cucGVyZm9ybWFuY2Uubm93KCk7XG4gICAgICAgICAgICBzdGFydFRhZyA9ICdpbnRsaWZ5LW1lc3NhZ2UtcmVzb2x2ZS1zdGFydCc7XG4gICAgICAgICAgICBlbmRUYWcgPSAnaW50bGlmeS1tZXNzYWdlLXJlc29sdmUtZW5kJztcbiAgICAgICAgICAgIG1hcmsgJiYgbWFyayhzdGFydFRhZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKChmb3JtYXQgPSByZXNvbHZlVmFsdWUobWVzc2FnZSwga2V5KSkgPT09IG51bGwpIHtcbiAgICAgICAgICAgIC8vIGlmIG51bGwsIHJlc29sdmUgd2l0aCBvYmplY3Qga2V5IHBhdGhcbiAgICAgICAgICAgIGZvcm1hdCA9IG1lc3NhZ2Vba2V5XTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55XG4gICAgICAgIH1cbiAgICAgICAgLy8gZm9yIHZ1ZS1kZXZ0b29scyB0aW1lbGluZSBldmVudFxuICAgICAgICBpZiAoaW5Ccm93c2VyKSB7XG4gICAgICAgICAgICBjb25zdCBlbmQgPSB3aW5kb3cucGVyZm9ybWFuY2Uubm93KCk7XG4gICAgICAgICAgICBjb25zdCBlbWl0dGVyID0gY29udGV4dC5fX3ZfZW1pdHRlcjtcbiAgICAgICAgICAgIGlmIChlbWl0dGVyICYmIHN0YXJ0ICYmIGZvcm1hdCkge1xuICAgICAgICAgICAgICAgIGVtaXR0ZXIuZW1pdChcIm1lc3NhZ2UtcmVzb2x2ZVwiIC8qIFZ1ZURldlRvb2xzVGltZWxpbmVFdmVudHMuTUVTU0FHRV9SRVNPTFZFICovLCB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IFwibWVzc2FnZS1yZXNvbHZlXCIgLyogVnVlRGV2VG9vbHNUaW1lbGluZUV2ZW50cy5NRVNTQUdFX1JFU09MVkUgKi8sXG4gICAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogZm9ybWF0LFxuICAgICAgICAgICAgICAgICAgICB0aW1lOiBlbmQgLSBzdGFydCxcbiAgICAgICAgICAgICAgICAgICAgZ3JvdXBJZDogYCR7dHlwZX06JHtrZXl9YFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHN0YXJ0VGFnICYmIGVuZFRhZyAmJiBtYXJrICYmIG1lYXN1cmUpIHtcbiAgICAgICAgICAgICAgICBtYXJrKGVuZFRhZyk7XG4gICAgICAgICAgICAgICAgbWVhc3VyZSgnaW50bGlmeSBtZXNzYWdlIHJlc29sdmUnLCBzdGFydFRhZywgZW5kVGFnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNTdHJpbmcoZm9ybWF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mluZyhhcmczKSkge1xuICAgICAgICBvcHRpb25zLmRlZmF1bHQgPSBhcmczO1xuICAgIH1cbiAgICBlbHNlIGlmIChpc1BsYWluT2JqZWN0KGFyZzMpKSB7XG4gICAgICAgIGFzc2lnbihvcHRpb25zLCBhcmczKTtcbiAgICB9XG4gICAgcmV0dXJuIFtrZXksIG9wdGlvbnNdO1xufVxuZnVuY3Rpb24gZ2V0Q29tcGlsZUNvbnRleHQoY29udGV4dCwgbG9jYWxlLCBrZXksIHNvdXJjZSwgd2Fybkh0bWxNZXNzYWdlLCBvbkVycm9yKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgbG9jYWxlLFxuICAgICAgICBrZXksXG4gICAgICAgIHdhcm5IdG1sTWVzc2FnZSxcbiAgICAgICAgb25FcnJvcjogKGVycikgPT4ge1xuICAgICAgICAgICAgb25FcnJvciAmJiBvbkVycm9yKGVycik7XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uc3QgX3NvdXJjZSA9IGdldFNvdXJjZUZvckNvZGVGcmFtZShzb3VyY2UpO1xuICAgICAgICAgICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBgTWVzc2FnZSBjb21waWxhdGlvbiBlcnJvcjogJHtlcnIubWVzc2FnZX1gO1xuICAgICAgICAgICAgICAgIGNvbnN0IGNvZGVGcmFtZSA9IGVyci5sb2NhdGlvbiAmJlxuICAgICAgICAgICAgICAgICAgICBfc291cmNlICYmXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYXRlQ29kZUZyYW1lKF9zb3VyY2UsIGVyci5sb2NhdGlvbi5zdGFydC5vZmZzZXQsIGVyci5sb2NhdGlvbi5lbmQub2Zmc2V0KTtcbiAgICAgICAgICAgICAgICBjb25zdCBlbWl0dGVyID0gY29udGV4dC5fX3ZfZW1pdHRlcjtcbiAgICAgICAgICAgICAgICBpZiAoZW1pdHRlciAmJiBfc291cmNlKSB7XG4gICAgICAgICAgICAgICAgICAgIGVtaXR0ZXIuZW1pdChcImNvbXBpbGUtZXJyb3JcIiAvKiBWdWVEZXZUb29sc1RpbWVsaW5lRXZlbnRzLkNPTVBJTEVfRVJST1IgKi8sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IF9zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvcjogZXJyLm1lc3NhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGFydDogZXJyLmxvY2F0aW9uICYmIGVyci5sb2NhdGlvbi5zdGFydC5vZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICBlbmQ6IGVyci5sb2NhdGlvbiAmJiBlcnIubG9jYXRpb24uZW5kLm9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwSWQ6IGAkeyd0cmFuc2xhdGUnfToke2tleX1gXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGNvZGVGcmFtZSA/IGAke21lc3NhZ2V9XFxuJHtjb2RlRnJhbWV9YCA6IG1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBvbkNhY2hlS2V5OiAoc291cmNlKSA9PiBnZW5lcmF0ZUZvcm1hdENhY2hlS2V5KGxvY2FsZSwga2V5LCBzb3VyY2UpXG4gICAgfTtcbn1cbmZ1bmN0aW9uIGdldFNvdXJjZUZvckNvZGVGcmFtZShzb3VyY2UpIHtcbiAgICBpZiAoaXNTdHJpbmcoc291cmNlKSkge1xuICAgICAgICByZXR1cm4gc291cmNlO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgICAgaWYgKHNvdXJjZS5sb2MgJiYgc291cmNlLmxvYy5zb3VyY2UpIHtcbiAgICAgICAgICAgIHJldHVybiBzb3VyY2UubG9jLnNvdXJjZTtcbiAgICAgICAgfVxuICAgIH1cbn1cbmZ1bmN0aW9uIGdldE1lc3NhZ2VDb250ZXh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V2FybkNvZGVzLkZBTExCQUNLX1RPX0RBVEVfRk9STUFULCB7XG4gICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgIHRhcmdldDogdGFyZ2V0TG9jYWxlXG4gICAgICAgICAgICB9KSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gZm9yIHZ1ZS1kZXZ0b29scyB0aW1lbGluZSBldmVudFxuICAgICAgICBpZiAobG9jYWxlICE9PSB0YXJnZXRMb2NhbGUpIHtcbiAgICAgICAgICAgIGNvbnN0IGVtaXR0ZXIgPSBjb250ZXh0Ll9fdl9lbWl0dGVyO1xuICAgICAgICAgICAgaWYgKGVtaXR0ZXIpIHtcbiAgICAgICAgICAgICAgICBlbWl0dGVyLmVtaXQoXCJmYWxsYmFja1wiIC8qIFZ1ZURldlRvb2xzVGltZWxpbmVFdmVudHMuRkFMQkFDSyAqLywge1xuICAgICAgICAgICAgICAgICAgICB0eXBlLFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICAgIGZyb20sXG4gICAgICAgICAgICAgICAgICAgIHRvLFxuICAgICAgICAgICAgICAgICAgICBncm91cElkOiBgJHt0eXBlfToke2tleX1gXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZGF0ZXRpbWVGb3JtYXQgPVxuICAgICAgICAgICAgZGF0ZXRpbWVGb3JtYXRzW3RhcmdldExvY2FsZV0gfHwge307XG4gICAgICAgIGZvcm1hdCA9IGRhdGV0aW1lRm9ybWF0W2tleV07XG4gICAgICAgIGlmIChpc1BsYWluT2JqZWN0KGZvcm1hdCkpXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgaGFuZGxlTWlzc2luZyhjb250ZXh0LCBrZXksIHRhcmdldExvY2FsZSwgbWlzc2luZ1dhcm4sIHR5cGUpOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpd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5GQUxMQkFDS19UT19OVU1CRVJfRk9STUFULCB7XG4gICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgIHRhcmdldDogdGFyZ2V0TG9jYWxlXG4gICAgICAgICAgICB9KSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gZm9yIHZ1ZS1kZXZ0b29scyB0aW1lbGluZSBldmVudFxuICAgICAgICBpZiAobG9jYWxlICE9PSB0YXJnZXRMb2NhbGUpIHtcbiAgICAgICAgICAgIGNvbnN0IGVtaXR0ZXIgPSBjb250ZXh0Ll9fdl9lbWl0dGVyO1xuICAgICAgICAgICAgaWYgKGVtaXR0ZXIpIHtcbiAgICAgICAgICAgICAgICBlbWl0dGVyLmVtaXQoXCJmYWxsYmFja1wiIC8qIFZ1ZURldlRvb2xzVGltZWxpbmVFdmVudHMuRkFMQkFDSyAqLywge1xuICAgICAgICAgICAgICAgICAgICB0eXBlLFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICAgIGZyb20sXG4gICAgICAgICAgICAgICAgICAgIHRvLFxuICAgICAgICAgICAgICAgICAgICBncm91cElkOiBgJHt0eXBlfToke2tleX1gXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgbnVtYmVyRm9ybWF0ID1cbiAgICAgICAgICAgIG51bWJlckZvcm1hdHNbdGFyZ2V0TG9jYWxlXSB8fCB7fTtcbiAgICAgICAgZm9ybWF0ID0gbnVtYmVyRm9ybWF0W2tleV07XG4gICAgICAgIGlmIChpc1BsYWluT2JqZWN0KGZvcm1hdCkpXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgaGFuZGxlTWlzc2luZyhjb250ZXh0LCBrZXksIHRhcmdldExvY2FsZSwgbWlzc2luZ1dhcm4sIHR5cGUpOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbiAgICAgIC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c1trZXldID0gYXJnMltrZXldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgb3B0aW9uc1trZXldID0gYXJnMltrZXldO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG4gICAgaWYgKGlzU3RyaW5nKGFyZzMpKSB7XG4gICAgICAgIG9wdGlvbnMubG9jYWxlID0gYXJnMztcbiAgICB9XG4gICAgZWxzZSBpZiAoaXNQbGFpbk9iamVjdChhcmczKSkge1xuICAgICAgICBvdmVycmlkZXMgPSBhcmczO1xuICAgIH1cbiAgICBpZiAoaXNQbGFpbk9iamVjdChhcmc0KSkge1xuICAgICAgICBvdmVycmlkZXMgPSBhcmc0O1xuICAgIH1cbiAgICByZXR1cm4gW29wdGlvbnMua2V5IHx8ICcnLCB2YWx1ZSwgb3B0aW9ucywgb3ZlcnJpZGVzXTtcbn1cbi8qKiBAaW50ZXJuYWwgKi9cbmZ1bmN0aW9uIGNsZWFyTnVtYmVyRm9ybWF0KGN0eCwgbG9jYWxlLCBmb3JtYXQpIHtcbiAgICBjb25zdCBjb250ZXh0ID0gY3R4O1xuICAgIGZvciAoY29uc3Qga2V5IGluIGZvcm1hdCkge1xuICAgICAgICBjb25zdCBpZCA9IGAke2xvY2FsZX1fXyR7a2V5fWA7XG4gICAgICAgIGlmICghY29udGV4dC5fX251bWJlckZvcm1hdHRlcnMuaGFzKGlkKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgY29udGV4dC5fX251bWJlckZvcm1hdHRlcnMuZGVsZXRlKGlkKTtcbiAgICB9XG59XG5cbmV4cG9ydCB7IENvbXBpbGVFcnJvckNvZGVzLCBDb3JlRXJyb3JDb2RlcywgQ29yZVdhcm5Db2RlcywgREFURVRJTUVfRk9STUFUX09QVElPTlNfS0VZUywgREVGQVVMVF9MT0NBTEUsIERFRkFVTFRfTUVTU0FHRV9EQVRBX1RZUEUsIE1JU1NJTk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0IGxpbmVMZW5ndGggPSBsaW5lc1tqXS5sZW5ndGg7XG4gICAgICAgIGNvbnN0IG5ld0xpbmVTZXFMZW5ndGggPSBuZXdsaW5lU2VxdWVuY2VzW2pdICYmIG5ld2xpbmVTZXF1ZW5jZXNbal0ubGVuZ3RoIHx8IDA7XG4gICAgICAgIGlmIChqID09PSBpKSB7XG4gICAgICAgICAgY29uc3QgcGFkID0gc3RhcnQgLSAoY291bnQgLSAobGluZUxlbmd0aCArIG5ld0xpbmVTZXFMZW5ndGgpKTtcbiAgICAgICAgICBjb25zdCBsZW5ndGggPSBNYXRoLm1heChcbiAgICAgICAgICAgIDEsXG4gICAgICAgICAgICBlbmQgPiBjb3VudCA/IGxpbmVMZW5ndGggLSBwYWQgOiBlbmQgLSBzdGFydFxuICAgICAgICAgICk7XG4gICAgICAgICAgcmVzLnB1c2goYCAgIHwgIGAgKyBcIiBcIi5yZXBlYXQocGFkKSArIFwiXlwiLnJlcGVhdChsZW5ndGgpKTtcbiAgICAgICAgfSBlbHNlIGlmIChqID4gaSkge1xuICAgICAgICAgIGlmIChlbmQgPiBjb3VudCkge1xuICAgICAgICAgICAgY29uc3QgbGVuZ3RoID0gTWF0aC5tYXgoTWF0aC5taW4oZW5kIC0gY291bnQsIGxpbmVMZW5ndGgpLCAxKTtcbiAgICAgICAgICAgIHJlcy5wdXNoKGAgICB8ICBgICsgXCJeXCIucmVwZWF0KGxlbmd0aCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb3VudCArPSBsaW5lTGVuZ3RoICsgbmV3TGluZVNlcUxlbmd0aDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgYnJlYWs7XG4gICAgfVxuICB9XG4gIHJldHVybiByZXMuam9pbihcIlxcblwiKTtcbn1cblxuZnVuY3Rpb24gbm9ybWFsaXplU3R5bGUodmFsdWUpIHtcbiAgaWYgKGlzQXJyYXkodmFsdWUpKSB7XG4gICAgY29uc3QgcmVzID0ge307XG4gICAgZm9yIChsZXQga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veHlUb1VzZTtcbiAgICAgIHJlc3VsdCA9IG5vcm1hbGl6ZVZOb2RlKFxuICAgICAgICByZW5kZXIuY2FsbChcbiAgICAgICAgICB0aGlzUHJveHksXG4gICAgICAgICAgcHJveHlUb1VzZSxcbiAgICAgICAgICByZW5kZXJDYWNoZSxcbiAgICAgICAgICBwcm9wcyxcbiAgICAgICAgICBzZXR1cFN0YXRlLFxuICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgY3R4XG4gICAgICAgIClcbiAgICAgICk7XG4gICAgICBmYWxsdGhyb3VnaEF0dHJzID0gYXR0cnM7XG4gICAgfSBlbHNlIHtcbiAgICAgIGNvbnN0IHJlbmRlcjIgPSBDb21wb25lbnQ7XG4gICAgICBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSAmJiBhdHRycyA9PT0gcHJvcHMpIHtcbiAgICAgICAgbWFya0F0dHJzQWNjZXNzZWQoKTtcbiAgICAgIH1cbiAgICAgIHJlc3VsdCA9IG5vcm1hbGl6ZVZOb2RlKFxuICAgICAgICByZW5kZXIyLmxlbmd0aCA+IDEgPyByZW5kZXIyKFxuICAgICAgICAgIHByb3BzLFxuICAgICAgICAgICEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikgPyB7XG4gICAgICAgICAgICBnZXQgYXR0cnMoKSB7XG4gICAgICAgICAgICAgIG1hcmtBdHRyc0FjY2Vzc2VkKCk7XG4gICAgICAgICAgICAgIHJldHVybiBhdHRycztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzbG90cyxcbiAgICAgICAgICAgIGVtaXRcbiAgICAgICAgICB9IDogeyBhdHRycywgc2xvdHMsIGVtaXQgfVxuICAgICAgICApIDogcmVuZGVyMihcbiAgICAgICAgICBwcm9wcyxcbiAgICAgICAgICBudWxsXG4gICAgICAgICAgLyogd2Uga25vdyBpdCBkb2Vzbid0IG5lZWQgaXQgKi9cbiA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AgICAgcGF0Y2goXG4gICAgICAgIHBlbmRpbmdCcmFuY2gsXG4gICAgICAgIG5ld0JyYW5jaCxcbiAgICAgICAgc3VzcGVuc2UuaGlkZGVuQ29udGFpbmVyLFxuICAgICAgICBudWxsLFxuICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgIHN1c3BlbnNlLFxuICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgb3B0aW1pemVkXG4gICAgICApO1xuICAgICAgaWYgKHN1c3BlbnNlLmRlcHMgPD0gMCkge1xuICAgICAgICBzdXNwZW5zZS5yZXNvbHZlKCk7XG4gICAgICB9IGVsc2UgaWYgKGlzSW5GYWxsYmFjaykge1xuICAgICAgICBpZiAoIWlzSHlkcmF0aW5nKSB7XG4gICAgICAgICAgcGF0Y2goXG4gICAgICAgICAgICBhY3RpdmVCcmFuY2gsXG4gICAgICAgICAgICBuZXdGYWxsYmFjayxcbiAgICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICAgIGFuY2hvcixcbiAgICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAvLyBmYWxsYmFjayB0cmVlIHdpbGwgbm90IGhhdmUgc3VzcGVuc2UgY29udGV4dFxuICAgICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICAgKTtcbiAgICAgICAgICBzZXRBY3RpdmVCcmFuY2goc3VzcGVuc2UsIG5ld0ZhbGxiYWNrKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBzdXNwZW5zZS5wZW5kaW5nSWQgPSBzdXNwZW5zZUlkKys7XG4gICAgICBpZiAoaXNIeWRyYXRpbmcpIHtcbiAgICAgICAgc3VzcGVuc2UuaXNIeWRyYXRpbmcgPSBmYWxzZTtcbiAgICAgICAgc3VzcGVuc2UuYWN0aXZlQnJhbmNoID0gcGVuZGluZ0JyYW5jaDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHVubW91bnQocGVuZGluZ0JyYW5jaCwgcGFyZW50Q29tcG9uZW50LCBzdXNwZW5zZSk7XG4gICAgICB9XG4gICAgICBzdXNwZW5zZS5kZXBzID0gMDtcbiAgICAgIHN1c3BlbnNlLmVmZmVjdHMubGVuZ3RoID0gMDtcbiAgICAgIHN1c3BlbnNlLmhpZGRlbkNvbnRhaW5lciA9IGNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG4gICAgICBpZiAoaXNJbkZhbGxiYWNrKSB7XG4gICAgICAgIHBhdGNoKFxuICAgICAgICAgIG51bGwsXG4gICAgICAgICAgbmV3QnJhbmNoLFxuICAgICAgICAgIHN1c3BlbnNlLmhpZGRlbkNvbnRhaW5lcixcbiAgICAgICAgICBudWxsLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBzdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICApO1xuICAgICAgICBpZiAoc3VzcGVuc2UuZGVwcyA8PSAwKSB7XG4gICAgICAgICAgc3VzcGVuc2UucmVzb2x2ZSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHBhdGNoKFxuICAgICAgICAgICAgYWN0aXZlQnJhbmNoLFxuICAgICAgICAgICAgbmV3RmFsbGJhY2ssXG4gICAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgICBhbmNob3IsXG4gICAgICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgLy8gZmFsbGJhY2sgdHJlZSB3aWxsIG5vdCBoYXZlIHN1c3BlbnNlIGNvbnRleHRcbiAgICAgICAgICAgIG5hbWVzcGFjZSxcbiAgICAgICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICAgICk7XG4gICAgICAgICAgc2V0QWN0aXZlQnJhbmNoKHN1c3BlbnNlLCBuZXdGYWxsYmFjayk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoYWN0aXZlQnJhbmNoICYmIGlzU2FtZVZOb2RlVHlwZShuZXdCcmFuY2gsIGFjdGl2ZUJyYW5jaCkpIHtcbiAgICAgICAgcGF0Y2goXG4gICAgICAgICAgYWN0aXZlQnJhbmNoLFxuICAgICAgICAgIG5ld0JyYW5jaCxcbiAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBzdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICApO1xuICAgICAgICBzdXNwZW5zZS5yZXNvbHZlKHRydWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcGF0Y2goXG4gICAgICAgICAgbnVsbCxcbiAgICAgICAgICBuZXdCcmFuY2gsXG4gICAgICAgICAgc3VzcGVuc2UuaGlkZGVuQ29udGFpbmVyLFxuICAgICAgICAgIG51bGwsXG4gICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgIHN1c3BlbnNlLFxuICAgICAgICAgIG5hbWVzcGFjZSxcbiAgICAgICAgICBzbG90U2NvcGVJZHMsXG4gICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICk7XG4gICAgICAgIGlmIChzdXNwZW5zZS5kZXBzIDw9IDApIHtcbiAgICAgICAgICBzdXNwZW5zZS5yZXNvbHZlKCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgaWYgKGFjdGl2ZUJyYW5jaCAmJiBpc1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BlbnNlSWQgPT09IHBhcmVudFN1c3BlbnNlLnBlbmRpbmdJZCkge1xuICAgICAgICAgIHBhcmVudFN1c3BlbnNlLmRlcHMtLTtcbiAgICAgICAgICBpZiAocGFyZW50U3VzcGVuc2UuZGVwcyA9PT0gMCAmJiAhc3luYykge1xuICAgICAgICAgICAgcGFyZW50U3VzcGVuc2UucmVzb2x2ZSgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdHJpZ2dlckV2ZW50KHZub2RlMiwgXCJvblJlc29sdmVcIik7XG4gICAgfSxcbiAgICBmYWxsYmFjayhmYWxsYmFja1ZOb2RlKSB7XG4gICAgICBpZiAoIXN1c3BlbnNlLnBlbmRpbmdCcmFuY2gpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgY29uc3QgeyB2bm9kZTogdm5vZGUyLCBhY3RpdmVCcmFuY2gsIHBhcmVudENvbXBvbmVudDogcGFyZW50Q29tcG9uZW50MiwgY29udGFpbmVyOiBjb250YWluZXIyLCBuYW1lc3BhY2U6IG5hbWVzcGFjZTIgfSA9IHN1c3BlbnNlO1xuICAgICAgdHJpZ2dlckV2ZW50KHZub2RlMiwgXCJvbkZhbGxiYWNrXCIpO1xuICAgICAgY29uc3QgYW5jaG9yMiA9IG5leHQoYWN0aXZlQnJhbmNoKTtcbiAgICAgIGNvbnN0IG1vdW50RmFsbGJhY2sgPSAoKSA9PiB7XG4gICAgICAgIGlmICghc3VzcGVuc2UuaXNJbkZhbGxiYWNrKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHBhdGNoKFxuICAgICAgICAgIG51bGwsXG4gICAgICAgICAgZmFsbGJhY2tWTm9kZSxcbiAgICAgICAgICBjb250YWluZXIyLFxuICAgICAgICAgIGFuY2hvcjIsXG4gICAgICAgICAgcGFyZW50Q29tcG9uZW50MixcbiAgICAgICAgICBudWxsLFxuICAgICAgICAgIC8vIGZhbGxiYWNrI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RyZW4gPSBzbG90cy5kZWZhdWx0ICYmIGdldFRyYW5zaXRpb25SYXdDaGlsZHJlbihzbG90cy5kZWZhdWx0KCksIHRydWUpO1xuICAgICAgaWYgKCFjaGlsZHJlbiB8fCAhY2hpbGRyZW4ubGVuZ3RoKSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGxldCBjaGlsZCA9IGNoaWxkcmVuWzBdO1xuICAgICAgaWYgKGNoaWxkcmVuLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgbGV0IGhhc0ZvdW5kID0gZmFsc2U7XG4gICAgICAgIGZvciAoY29uc3QgYyBvZiBjaGlsZHJlbikge1xuICAgICAgICAgIGlmIChjLnR5cGUgIT09IENvbW1lbnQpIHtcbiAgICAgICAgICAgIGlmICghIShwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpICYmIGhhc0ZvdW5kKSB7XG4gICAgICAgICAgICAgIHdhcm4kMShcbiAgICAgICAgICAgICAgICBcIjx0cmFuc2l0aW9uPiBjYW4gb25seSBiZSB1c2VkIG9uIGEgc2luZ2xlIGVsZW1lbnQgb3IgY29tcG9uZW50LiBVc2UgPHRyYW5zaXRpb24tZ3JvdXA+IGZvciBsaXN0cy5cIlxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoaWxkID0gYztcbiAgICAgICAgICAgIGhhc0ZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgIGlmICghISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSlcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBjb25zdCByYXdQcm9wcyA9IHRvUmF3KHByb3BzKTtcbiAgICAgIGNvbnN0IHsgbW9kZSB9ID0gcmF3UHJvcHM7XG4gICAgICBpZiAoISEocHJvY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yRW50ZXI7XG4gICAgICAgICAgY2FuY2VsSG9vayA9IG9uQXBwZWFyQ2FuY2VsbGVkIHx8IG9uRW50ZXJDYW5jZWxsZWQ7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBsZXQgY2FsbGVkID0gZmFsc2U7XG4gICAgICBjb25zdCBkb25lID0gZWxbZW50ZXJDYktleV0gPSAoY2FuY2VsbGVkKSA9PiB7XG4gICAgICAgIGlmIChjYWxsZWQpXG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICBjYWxsZWQgPSB0cnVlO1xuICAgICAgICBpZiAoY2FuY2VsbGVkKSB7XG4gICAgICAgICAgY2FsbEhvb2soY2FuY2VsSG9vaywgW2VsXSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY2FsbEhvb2soYWZ0ZXJIb29rLCBbZWxdKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaG9va3MuZGVsYXllZExlYXZlKSB7XG4gICAgICAgICAgaG9va3MuZGVsYXllZExlYXZlKCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxbZW50ZXJDYktleV0gPSB2b2lkIDA7XG4gICAgICB9O1xuICAgICAgaWYgKGhvb2spIHtcbiAgICAgICAgY2FsbEFzeW5jSG9vayhob29rLCBbZWwsIGRvbmVdKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGRvbmUoKTtcbiAgICAgIH1cbiAgICB9LFxuICAgIGxlYXZlKGVsLCByZW1vdmUpIHtcbiAgICAgIGNvbnN0IGtleTIgPSBTdHJpbmcodm5vZGUua2V5KTtcbiAgICAgIGlmIChlbFtlbnRlckNiS2V5XSkge1xuICAgICAgICBlbFtlbnRlckNiS2V5XShcbiAgICAgICAgICB0cnVlXG4gICAgICAgICAgLyogY2FuY2VsbGVkICovXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBpZiAoc3RhdGUuaXNVbm1vdW50aW5nKS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29tcCwgaW5zdGFuY2UpO1xuICAgICAgfVxuICAgICAgY29uc3Qgb25FcnJvciA9IChlcnIpID0+IHtcbiAgICAgICAgcGVuZGluZ1JlcXVlc3QgPSBudWxsO1xuICAgICAgICBoYW5kbGVFcnJvcihcbiAgICAgICAgICBlcnIsXG4gICAgICAgICAgaW5zdGFuY2UsXG4gICAgICAgICAgMTMsXG4gICAgICAgICAgIWVycm9yQ29tcG9uZW50XG4gICAgICAgICk7XG4gICAgICB9O1xuICAgICAgaWYgKHN1c3BlbnNpYmxlICYmIGluc3RhbmNlLnN1c3BlbnNlIHx8IGlzSW5TU1JDb21wb25lbnRTZXR1cCkge1xuICAgICAgICByZXR1cm4gbG9hZCgpLnRoZW4oKGNvbXApID0+IHtcbiAgICAgICAgICByZXR1cm4gKCkgPT4gY3JlYXRlSW5uZXJDb21wKGNvbXAsIGluc3RhbmNlKTtcbiAgICAgICAgfSkuY2F0Y2goKGVycikgPT4ge1xuICAgICAgICAgIG9uRXJyb3IoZXJyKTtcbiAgICAgICAgICByZXR1cm4gKCkgPT4gZXJyb3JDb21wb25lbnQgPyBjcmVhdGVWTm9kZShlcnJvckNvbXBvbmVudCwge1xuICAgICAgICAgICAgZXJyb3I6IGVyclxuICAgICAgICAgIH0pIDogbnVsbDtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBjb25zdCBsb2FkZWQgPSByZWYoZmFsc2UpO1xuICAgICAgY29uc3QgZXJyb3IgPSByZWYoKTtcbiAgICAgIGNvbnN0IGRlbGF5ZWQgPSByZWYoISFkZWxheSk7XG4gICAgICBpZiAoZGVsYXkpIHtcbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgZGVsYXllZC52YWx1ZSA9IGZhbHNlO1xuICAgICAgICB9LCBkZWxheSk7XG4gICAgICB9XG4gICAgICBpZiAodGltZW91dCAhPSBudWxsKSB7XG4gICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgIGlmICghbG9hZGVkLnZhbHVlICYmICFlcnJvci52YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgZXJyID0gbmV3IEVycm9yKFxuICAgICAgICAgICAgICBgQXN5bmMgY29tcG9uZW50IHRpbWVkIG91dCBhZnRlciAke3RpbWVvdXR9bXMuYFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIG9uRXJyb3IoZXJyKTtcbiAgICAgICAgICAgIGVycm9yLnZhbHVlID0gZXJyO1xuICAgICAgICAgIH1cbiAgICAgICAgfSwgdGltZW91dCk7XG4gICAgICB9XG4gICAgICBsb2FkKCkudGhlbigoKSA9PiB7XG4gICAgICAgIGxvYWRlZC52YWx1ZSA9IHRydWU7XG4gICAgICAgIGlmIChpbnN0YW5jZS5wYXJlbnQgJiYgaXNLZWVwQWxpdmUoaW5zdGFuY2UucGFyZW50LnZub2RlKSkge1xuICAgICAgICAgIGluc3RhbmNlLnBhcmVudC5lZmZlY3QuZGlydHkgPSB0cnVlO1xuICAgICAgICAgIHF1ZXVlSm9iKGluc3RhbmNlLnBhcmVudC51cGRhdGUpO1xuICAgICAgICB9XG4gICAgICB9KS5jYXRjaCgoZXJyKSA9PiB7XG4gICAgICAgIG9uRXJyb3IoZXJyKTtcbiAgICAgICAgZXJyb3IudmFsdWUgPSBlcnI7XG4gICAgICB9KTtcbiAgICAgIHJldHVybiAoKSA9PiB7XG4gICAgICAgIGlmIChsb2FkZWQudmFsdWUgJiYgcmVzb2x2ZWRDb21wKSB7XG4gICAgICAgICAgcmV0dXJuIGNyZWF0ZUlubmVyQ29tcChyZXNvbHZlZENvbXAsIGluc3RhbmNlKTtcbiAgICAgICAgfSBlbHNlIGlmIChlcnJvci52YWx1ZSAmJiBlcnJvckNvbXBvbmVudCkge1xuICAgICAgICAgIHJldHVybiBjcmVhdGVWTm9kZShlcnJvckNvbXBvbmVudCwge1xuICAgICAgICAgICAgZXJyb3I6IGVycm9yLnZhbHVlXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWx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l2XCIpO1xuICAgIHNoYXJlZENvbnRleHQuYWN0aXZhdGUgPSAodm5vZGUsIGNvbnRhaW5lciwgYW5jaG9yLCBuYW1lc3BhY2UsIG9wdGltaXplZCkgPT4ge1xuICAgICAgY29uc3QgaW5zdGFuY2UyID0gdm5vZGUuY29tcG9uZW50O1xuICAgICAgbW92ZSh2bm9kZSwgY29udGFpbmVyLCBhbmNob3IsIDAsIHBhcmVudFN1c3BlbnNlKTtcbiAgICAgIHBhdGNoKFxuICAgICAgICBpbnN0YW5jZTIudm5vZGUsXG4gICAgICAgIHZub2RlLFxuICAgICAgICBjb250YWluZXIsXG4gICAgICAgIGFuY2hvcixcbiAgICAgICAgaW5zdGFuY2UyLFxuICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICB2bm9kZS5zbG90U2NvcGVJZHMsXG4gICAgICAgIG9wdGltaXplZFxuICAgICAgKTtcbiAgICAgIHF1ZXVlUG9zdFJlbmRlckVmZmVjdCgoKSA9PiB7XG4gICAgICAgIGluc3RhbmNlMi5pc0RlYWN0aXZhdGVkID0gZmFsc2U7XG4gICAgICAgIGlmIChpbnN0YW5jZTIuYSkge1xuICAgICAgICAgIGludm9rZUFycmF5Rm5zKGluc3RhbmNlMi5hKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB2bm9kZUhvb2sgPSB2bm9kZS5wcm9wcyAmJiB2bm9kZS5wcm9wcy5vblZub2RlTW91bnRlZDtcbiAgICAgICAgaWYgKHZub2RlSG9vaykge1xuICAgICAgICAgIGludm9rZVZOb2RlSG9vayh2bm9kZUhvb2ssIGluc3RhbmNlMi5wYXJlbnQsIHZub2RlKTtcbiAgICAgICAgfVxuICAgICAgfSwgcGFyZW50U3VzcGVuc2UpO1xuICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikgfHwgX19WVUVfUFJPRF9ERVZUT09MU19fKSB7XG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udWxsKSB7XG4gICAgaWYgKCFpc0Z1bmN0aW9uKHJvb3RDb21wb25lbnQpKSB7XG4gICAgICByb290Q29tcG9uZW50ID0gZXh0ZW5kKHt9LCByb290Q29tcG9uZW50KTtcbiAgICB9XG4gICAgaWYgKHJvb3RQcm9wcyAhPSBudWxsICYmICFpc09iamVjdChyb290UHJvcHMpKSB7XG4gICAgICAhIShwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpICYmIHdhcm4kMShgcm9vdCBwcm9wcyBwYXNzZWQgdG8gYXBwLm1vdW50KCkgbXVzdCBiZSBhbiBvYmplY3QuYCk7XG4gICAgICByb290UHJvcHMgPSBudWxsO1xuICAgIH1cbiAgICBjb25zdCBjb250ZXh0ID0gY3JlYXRlQXBwQ29udGV4dCgpO1xuICAgIGNvbnN0IGluc3RhbGxlZFBsdWdpbnMgPSAvKiBAX19QVVJFX18gKi8gbmV3IFdlYWtTZXQoKTtcbiAgICBsZXQgaXNNb3VudGVkID0gZmFsc2U7XG4gICAgY29uc3QgYXBwID0gY29udGV4dC5hcHAgPSB7XG4gICAgICBfdWlkOiB1aWQkMSsrLFxuICAgICAgX2NvbXBvbmVudDogcm9vdENvbXBvbmVudCxcbiAgICAgIF9wcm9wczogcm9vdFByb3BzLFxuICAgICAgX2NvbnRhaW5lcjogbnVsbCxcbiAgICAgIF9jb250ZXh0OiBjb250ZXh0LFxuICAgICAgX2luc3RhbmNlOiBudWxsLFxuICAgICAgdmVyc2lvbixcbiAgICAgIGdldCBjb25maWcoKSB7XG4gICAgICAgIHJldHVybiBjb250ZXh0LmNvbmZpZztcbiAgICAgIH0sXG4gICAgICBzZXQgY29uZmlnKHYpIHtcbiAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICB3YXJuJDEoXG4gICAgICAgICAgICBgYXBwLmNvbmZpZyBjYW5ub3QgYmUgcmVwb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AgICAgICAgaWYgKCFjb250ZXh0Lm1peGlucy5pbmNsdWRlcyhtaXhpbikpIHtcbiAgICAgICAgICAgIGNvbnRleHQubWl4aW5zLnB1c2gobWl4aW4pO1xuICAgICAgICAgIH0gZWxzZSBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgICAgd2FybiQxKFxuICAgICAgICAgICAgICBcIk1peGluIGhhcyBhbHJlYWR5IGJlZW4gYXBwbGllZCB0byB0YXJnZXQgYXBwXCIgKyAobWl4aW4ubmFtZSA/IGA6ICR7bWl4aW4ubmFtZX1gIDogXCJcIilcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICB3YXJuJDEoXCJNaXhpbnMgYXJlIG9ubHkgYXZhaWxhYmxlIGluIGJ1aWxkcyBzdXBwb3J0aW5nIE9wdGlvbnMgQVBJXCIpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBhcHA7XG4gICAgICB9LFxuICAgICAgY29tcG9uZW50KG5hbWUsIGNvbXBvbmVudCkge1xuICAgICAgICBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgIHZhbGlkYXRlQ29tcG9uZW50TmFtZShuYW1lLCBjb250ZXh0LmNvbmZpZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5jb21wb25lbnRzW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIGlmICghIShwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpICYmIGNvbnRleHQuY29tcG9uZW50c1tuYW1lXSkge1xuICAgICAgICAgIHdhcm4kM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AgICAgICB3YXJuJDEoXG4gICAgICAgICAgICAgIGBUaGVyZSBpcyBhbHJlYWR5IGFuIGFwcCBpbnN0YW5jZSBtb3VudGVkIG9uIHRoZSBob3N0IGNvbnRhaW5lci5cbiBJZiB5b3Ugd2FudCB0byBtb3VudCBhbm90aGVyIGFwcCBvbiB0aGUgc2FtZSBob3N0IGNvbnRhaW5lciwgeW91IG5lZWQgdG8gdW5tb3VudCB0aGUgcHJldmlvdXMgYXBwIGJ5IGNhbGxpbmcgXFxgYXBwLnVubW91bnQoKVxcYCBmaXJzdC5gXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCB2bm9kZSA9IGNyZWF0ZVZOb2RlKHJvb3RDb21wb25lbnQsIHJvb3RQcm9wcyk7XG4gICAgICAgICAgdm5vZGUuYXBwQ29udGV4dCA9IGNvbnRleHQ7XG4gICAgICAgICAgaWYgKG5hbWVzcGFjZSA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgbmFtZXNwYWNlID0gXCJzdmdcIjtcbiAgICAgICAgICB9IGVsc2UgaWYgKG5hbWVzcGFjZSA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgIG5hbWVzcGFjZSA9IHZvaWQgMDtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICAgIGNvbnRleHQucmVsb2FkID0gKCkgPT4ge1xuICAgICAgICAgICAgICByZW5kZXIoXG4gICAgICAgICAgICAgICAgY2xvbmVWTm9kZSh2bm9kZSksXG4gICAgICAgICAgICAgICAgcm9vdENvbnRhaW5lcixcbiAgICAgICAgICAgICAgICBuYW1lc3BhY2VcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChpc0h5ZHJhdGUgJiYgaHlkcmF0ZSkge1xuICAgICAgICAgICAgaHlk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ICAgICApO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgdW5tb3VudCgpIHtcbiAgICAgICAgaWYgKGlzTW91bnRlZCkge1xuICAgICAgICAgIHJlbmRlcihudWxsLCBhcHAuX2NvbnRhaW5lcik7XG4gICAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikgfHwgX19WVUVfUFJPRF9ERVZUT09MU19fKSB7XG4gICAgICAgICAgICBhcHAuX2luc3RhbmNlID0gbnVsbDtcbiAgICAgICAgICAgIGRldnRvb2xzVW5tb3VudEFwcChhcHApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBkZWxldGUgYXBwLl9jb250YWluZXIuX192dWVfYXBwX187XG4gICAgICAgIH0gZWxzZSBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgIHdhcm4kMShgQ2Fubm90IHVubW91bnQgYW4gYXBwIHRoYXQgaXMgbm90IG1vdW50ZWQuYCk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBwcm92aWRlKGtleSwgdmFsdWUpIHtcbiAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikgJiYga2V5IGluIGNvbnRleHQucHJvdmlkZXMpIHtcbiAgICAgICAgICB3YXJuJDEoXG4gICAgICAgICAgICBgQXBwIGFscmVhZHkgcHJvdmlkZXMgcHJvcGVydHkgd2l0aCBrZXkgXCIke1N0cmluZyhrZXkpfVwiLiBJdCB3aWxsIGJlIG92ZXJ3cml0dGVuIHdpdGggdGhlIG5ldyB2YWx1ZS5gXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBjb250ZXh0LnByb3ZpZGVzW2tleV0gPSB2YWx1ZTtcbiAgICAgICAgcmV0dXJuIGFwcDtcbiAgICAgIH0sXG4gICAgICBydW5XaXRoQ29udGV4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VcGRhdGUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgbGV0IGtleSA9IHByb3BzVG9VcGRhdGVbaV07XG4gICAgICAgIGlmIChpc0VtaXRMaXN0ZW5lcihpbnN0YW5jZS5lbWl0c09wdGlvbnMsIGtleSkpIHtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB2YWx1ZSA9IHJhd1Byb3BzW2tleV07XG4gICAgICAgIGlmIChvcHRpb25zKSB7XG4gICAgICAgICAgaWYgKGhhc093bihhdHRycywga2V5KSkge1xuICAgICAgICAgICAgaWYgKHZhbHVlICE9PSBhdHRyc1trZXldKSB7XG4gICAgICAgICAgICAgIGF0dHJzW2tleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgaGFzQXR0cnNDaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc3QgY2FtZWxpemVkS2V5ID0gY2FtZWxpemUoa2V5KTtcbiAgICAgICAgICAgIHByb3BzW2NhbWVsaXplZEtleV0gPSByZXNvbHZlUHJvcFZhbHVlKFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgICByYXdDdXJyZW50UHJvcHMsXG4gICAgICAgICAgICAgIGNhbWVsaXplZEtleSxcbiAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICAgIGluc3RhbmNlLFxuICAgICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKHZhbHVlICE9PSBhdHRyc1trZXldKSB7XG4gICAgICAgICAgICBhdHRyc1trZXldID0gdmFsdWU7XG4gICAgICAgICAgICBoYXNBdHRyc0NoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSBlbHNlIHtcbiAgICBpZiAoc2V0RnVsbFByb3BzKGluc3RhbmNlLCByYXdQcm9wcywgcHJvcHMsIGF0dHJzKSkge1xuICAgICAgaGFzQXR0cnNDaGFuZ2VkID0gdHJ1ZTtcbiAgICB9XG4gICAgbGV0IGtlYmFiS2V5O1xuICAgIGZvciAoY29uc3Qga2V5IGluIHJhd0N1cnJlbnRQcm9wcykge1xuICAgICAgaWYgKCFyYXdQcm9wcyB8fCAvLyBmb3IgY2FtZWxDYXNlXG4gICAgICAhaGFzT3duKHJhd1Byb3BzLCBrZXkpICYmIC8vIGl0J3MgcG9zc2libGUgdGhlIG9yaWdpbmFsIHByb3BzIHdhcyBwYXNzZWQgaW4gYXMga2ViYWItY2FzZVxuICAgICAgLy8gYW5kIGNvbnZlcnRlZCB0byBjYW1lbENhc2UgKCM5NTUpXG4gICAgICAoKGtlYmFiS2V5ID0gaHlwaGVuYXRlKGtleSkpID09PSBrZXkgfHwgIWhhc093bihyYXdQcm9wcywga2ViYWJLZXkpKSkge1xuICAgICAgICBpZiAob3B0aW9ucykge1xuICAgICAgICAgIGlmIChyYXdQcmV2UHJvcHMgJiYgLy8gZm9yIGNhbWVsQ2FzZVxuICAgICAgICAgIChyYXdQcmV2UHJvcHNba2V5XSAhPT0gdm9pZCAwIHx8IC8vIGZvciBrZWJhYi1jYXNlXG4gICAgICAgICAgcmF3UHJldlByb3BzW2tlYmFiS2V5XSAhPT0gdm9pZCAwKSkge1xuICAgICAgICAgICAgcHJvcHNba2V5XSA9IHJlc29sdmVQcm9wVmFsdWUoXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICAgIHJhd0N1cnJlbnRQcm9wcyxcbiAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICB2b2lkIDAsXG4gICAgICAgICAgICAgIGluc3RhbmNlLFxuICAgICAgICAgICAgICB0cnVlXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBkZWxldGUgcHJvc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ID0gW3JlZlZhbHVlXTtcbiAgICAgICAgICAgICAgICBpZiAocmF3UmVmLmspXG4gICAgICAgICAgICAgICAgICByZWZzW3Jhd1JlZi5rXSA9IHJlZi52YWx1ZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICghZXhpc3RpbmcuaW5jbHVkZXMocmVmVmFsdWUpKSB7XG4gICAgICAgICAgICAgIGV4aXN0aW5nLnB1c2gocmVmVmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChfaXNTdHJpbmcpIHtcbiAgICAgICAgICByZWZzW3JlZl0gPSB2YWx1ZTtcbiAgICAgICAgICBpZiAoaGFzT3duKHNldHVwU3RhdGUsIHJlZikpIHtcbiAgICAgICAgICAgIHNldHVwU3RhdGVbcmVmXSA9IHZhbHVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChfaXNSZWYpIHtcbiAgICAgICAgICByZWYudmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgICBpZiAocmF3UmVmLmspXG4gICAgICAgICAgICByZWZzW3Jhd1JlZi5rXSA9IHZhbHVlO1xuICAgICAgICB9IGVsc2UgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICB3YXJuJDEoXCJJbnZhbGlkIHRlbXBsYXRlIHJlZiB0eXBlOlwiLCByZWYsIGAoJHt0eXBlb2YgcmVmfSlgKTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICBkb1NldC5pZCA9IC0xO1xuICAgICAgICBxdWV1ZVBvc3RSZW5kZXJFZmZlY3QoZG9TZXQsIHBhcmVudFN1c3BlbnNlKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGRvU2V0KCk7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmICghIShwcm9jZXNzLmVudi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5naWZ5KHZub2RlLmNoaWxkcmVuKX1gXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgbm9kZS5kYXRhID0gdm5vZGUuY2hpbGRyZW47XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHROb2RlID0gbmV4dFNpYmxpbmcobm9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIENvbW1lbnQ6XG4gICAgICAgIGlmIChpc1RlbXBsYXRlTm9kZShub2RlKSkge1xuICAgICAgICAgIG5leHROb2RlID0gbmV4dFNpYmxpbmcobm9kZSk7XG4gICAgICAgICAgcmVwbGFjZU5vZGUoXG4gICAgICAgICAgICB2bm9kZS5lbCA9IG5vZGUuY29udGVudC5maXJzdENoaWxkLFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIHBhcmVudENvbXBvbmVudFxuICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSBpZiAoZG9tVHlwZSAhPT0gOCAvKiBDT01NRU5UICovIHx8IGlzRnJhZ21lbnRTdGFydCkge1xuICAgICAgICAgIG5leHROb2RlID0gb25NaXNtYXRjaCgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG5leHROb2RlID0gbmV4dFNpYmxpbmcobm9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIFN0YXRpYzpcbiAgICAgICAgaWYgKGlzRnJhZ21lbnRTdGFydCkge1xuICAgICAgICAgIG5vZGUgPSBuZXh0U2libGluZyhub2RlKTtcbiAgICAgICAgICBkb21UeXBlID0gbm9kZS5ub2RlVHlwZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZG9tVHlwZSA9PT0gMSAvKiBFTEVNRU5UICovIHx8IGRvbVR5cGUgPT09IDMgLyogVEVYVCAqLykge1xuICAgICAgICAgIG5leHROb2RlID0gbm9kZTtcbiAgICAgICAgICBjb25zdCBuZWVkVG9BZG9wdENvbnRlbnQgPSAhdm5vZGUuY2hpbGRyZW4ubGVuZ3RoO1xuICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdm5vZGUuc3RhdGljQ291bnQ7IGkrKykge1xuICAgICAgICAgICAgaWYgKG5lZWRUb0Fkb3B0Q29udGVudClcbiAgICAgICAgICAgICAgdm5vZGUuY2hpbGRyZW4gKz0gbmV4dE5vZGUubm9kZVR5cGUgPT09IDEgLyogRUxFTUVOVCAqLyA/IG5leHROb2RlLm91dGVySFRNTCA6IG5leHROb2RlLmRhdGE7XG4gICAgICAgICAgICBpZiAoaSA9PT0gdm5vZGUuc3RhdGljQ291bnQgLSAxKSB7XG4gICAgICAgICAgICAgIHZub2RlLmFuY2hvciA9IG5leHROb2RlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbmV4dE5vZGUgPSBuZXh0U2libGluZyhuZXh0Tm9kZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBpc0ZyYWdtZW50U3RhcnQgPyBuZXh0U2libGluZyhuZXh0Tm9kZSkgOiBuZXh0Tm9kZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBvbk1pc21hdGNoKCk7XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIEZyYWdtZW50OlxuICAgICAgICBpZiAoIWlzRnJhZ21lbnRTdGFydCkge1xuICAgICAgICAgIG5leHROb2RlID0gb25NaXNtYXRjaCgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG5leHROb2RlID0gaHlkcmF0ZUZyYWdtZW50KFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIHZub2RlLFxuICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgICBzbG90U2NvcGVJZHMsXG4gICAgICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuICAgICAg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xzZSB7XG4gICAgICAgICAgICBuZXh0Tm9kZSA9IG5leHRTaWJsaW5nKG5vZGUpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtb3VudENvbXBvbmVudChcbiAgICAgICAgICAgIHZub2RlLFxuICAgICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICAgICAgZ2V0Q29udGFpbmVyVHlwZShjb250YWluZXIpLFxuICAgICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoaXNBc3luY1dyYXBwZXIodm5vZGUpKSB7XG4gICAgICAgICAgICBsZXQgc3ViVHJlZTtcbiAgICAgICAgICAgIGlmIChpc0ZyYWdtZW50U3RhcnQpIHtcbiAgICAgICAgICAgICAgc3ViVHJlZSA9IGNyZWF0ZVZOb2RlKEZyYWdtZW50KTtcbiAgICAgICAgICAgICAgc3ViVHJlZS5hbmNob3IgPSBuZXh0Tm9kZSA/IG5leHROb2RlLnByZXZpb3VzU2libGluZyA6IGNvbnRhaW5lci5sYXN0Q2hpbGQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzdWJUcmVlID0gbm9kZS5ub2RlVHlwZSA9PT0gMyA/IGNyZWF0ZVRleHRWTm9kZShcIlwiKSA6IGNyZWF0ZVZOb2RlKFwiZGl2XCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3ViVHJlZS5lbCA9IG5vZGU7XG4gICAgICAgICAgICB2bm9kZS5jb21wb25lbnQuc3ViVHJlZSA9IHN1YlRyZWU7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHNoYXBlRmxhZyAmIDY0KSB7XG4gICAgICAgICAgaWYgKGRvbVR5cGUgIT09IDggLyogQ09NTUVOVCAqLykge1xuICAgICAgICAgICAgbmV4dE5vZGUgPSBvbk1pc21hdGNoKCk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5leHROb2RlID0gdm5vZGUudHlwZS5oeWRyYXRlKFxuICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICB2bm9kZSxcbiAgICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgICAgICBvcHRpbWl6ZWQsXG4gICAgICAgICAgICAgIHJlbmRlcmVySW50ZXJuYWxzLFxuICAgICAgICAgICAgICBoeWRyYXRlQ2hpbGRyZW5cbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHNoYXBlRmxhZyAmIDEyOCkge1xuICAgICAgICAgIG5leHROb2RlID0gdm5vZGUudHlwZS5oeWRyYXRlKFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIHZub2RlLFxuICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgICBnZXRDb250YWluZXJUeXBlKHBhcmVudE5vZGUobm9kZSkpLFxuICAgICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgICAgb3B0aW1pemVkLFxuICAgICAgICAgICAgcmVuZGVyZXJJbnRlcm5hbHMsXG4gICAgICAgICAgICBoeWRyYXRlTm9kZVxuICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSB8fCBfX1ZVRV9QUk9EX0hZRFJBVElPTl9NSVNNQVRDSF9ERVRBSUxTX18pIHtcbiAgICAgICAgICB3YXJuJDEoXCJJbnZhbGlkIEhvc3RWTm9kZSB0eXBlOlwiLCB0eXBlLCBgKCR7dHlwZW9mIHR5cGV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zICYmIHBhcmVudENvbXBvbmVudC52bm9kZS5wcm9wcy5hcHBlYXI7XG4gICAgICAgIGNvbnN0IGNvbnRlbnQgPSBlbC5jb250ZW50LmZpcnN0Q2hpbGQ7XG4gICAgICAgIGlmIChuZWVkQ2FsbFRyYW5zaXRpb25Ib29rcykge1xuICAgICAgICAgIHRyYW5zaXRpb24uYmVmb3JlRW50ZXIoY29udGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgcmVwbGFjZU5vZGUoY29udGVudCwgZWwsIHBhcmVudENvbXBvbmVudCk7XG4gICAgICAgIHZub2RlLmVsID0gZWwgPSBjb250ZW50O1xuICAgICAgfVxuICAgICAgaWYgKHNoYXBlRmxhZyAmIDE2ICYmIC8vIHNraXAgaWYgZWxlbWVudCBoYXMgaW5uZXJIVE1MIC8gdGV4dENvbnRlbnRcbiAgICAgICEocHJvcHMgJiYgKHByb3BzLmlubmVySFRNTCB8fCBwcm9wcy50ZXh0Q29udGVudCkpKSB7XG4gICAgICAgIGxldCBuZXh0ID0gaHlkcmF0ZUNoaWxkcmVuKFxuICAgICAgICAgIGVsLmZpcnN0Q2hpbGQsXG4gICAgICAgICAgdm5vZGUsXG4gICAgICAgICAgZWwsXG4gICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGhhc1dhcm5lZCA9IGZhbHNlO1xuICAgICAgICB3aGlsZSAobmV4dCkge1xuICAgICAgICAgIGhhc01pc21hdGNoID0gdHJ1ZTtcbiAgICAgICAgICBpZiAoKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikgfHwgX19WVUVfUFJPRF9IWURSQVRJT05fTUlTTUFUQ0hfREVUQUlMU19fKSAmJiAhaGFzV2FybmVkKSB7XG4gICAgICAgICAgICB3YXJuJDEoXG4gICAgICAgICAgICAgIGBIeWRyYXRpb24gY2hpbGRyZW4gbWlzbWF0Y2ggb25gLFxuICAgICAgICAgICAgICBlbCxcbiAgICAgICAgICAgICAgYFxuU2VydmVyIHJlbmRlcmVkIGVsZW1lbnQgY29udGFpbnMgbW9yZSBjaGlsZCBub2RlcyB0aGFuIGNsaWVudCB2ZG9tLmBcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBoYXNXYXJuZWQgPSB0cnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCBjdXIgPSBuZXh0O1xuICAgICAgICAgIG5leHQgPSBuZXh0Lm5leHRTaWJsaW5nO1xuICAgICAgICAgIHJlbW92ZShjdXIpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKHNoYXBlRmxhZyAmIDgpIHtcbiAgICAgICAgaWYgKGVsLnRleHRDb250ZW50ICE9PSB2bm9kZS5jaGlsZHJlbikge1xuICAgICAgICAgIGhhc01pc21hdGNoID0gdHJ1ZTtcbiAgICAgICAgICAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSB8fCBfX1ZVRV9QUk9EX0hZRFJBVElPTl9NSVNNQVRDSF9ERVRBSUxTX18pICYmIHdhcm4kMShcbiAgICAgICAgICAgIGBIeWRyYXRpb24gdGV4dCBjb250ZW50IG1pc21hdGNoIG9uYCxcbiAgICAgICAgICAgIGVsLFxuICAgICAgICAgICAgYFxuICAtIHJlbmRlcmVkIG9uIHNlcnZlcjogJHtlbC50ZXh0Q29udGVudH1cbiAgLSBleHBlY3RlZCBvbiBjbGllbnQ6ICR7dm5vZGUuY2hpbGRyZW59YFxuICAgICAgICAgICk7XG4gICAgICAgICAgZWwudGV4dENvbnRlbnQgPSB2bm9kZS5jaGlsZHJlbjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHByb3BzKSB7XG4gICAgICAgIGlmICghIShwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpIHx8IGZvcmNlUGF0Y2ggfHwgIW9wdGltaXplZCB8fCBwYXRjaEZsYWcgJiAoMTYgfCAzMikpIHtcbiAgICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBwcm9wcykge1xuICAgICAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikgJiYgcHJvcEhhc01pc21hdGNoKGVsLCBrZXksIHByb3BzW2tleV0sIHZub2RlLCBwYXJlbnRDb21wb25lbnQpKSB7XG4gICAgICAgICAgICAgIGhhc01pc21hdGNoID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChmb3JjZVBhdGNoICYmIChrZXkuZW5kc1dpdGgoXCJ2YWx1ZVwiKSB8fCBrZXkgPT09IFwiaW5kZXRlcm1pbmF0ZVwiKSB8fCBpc09uKGtleSkgJiYgIWlzUmVzZXJ2ZWRQcm9wKGtleSkgfHwgLy8gZm9yY2UgaHlkcmF0ZSB2LWJpbmQgd2l0aCAucHJvcCBtb2RpZmllcnNcbiAgICAgICAgICAgIGtleVswXSA9PT0gXCIuXCIpIHtcbiAgICAgICAgICAgICAgcGF0Y2hQcm9wKFxuICAgICAgICAgICAgICAgIGVsLFxuICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgIHByb3BzW2tleV0sXG4gICAgICAgICAgICAgICAgdm9pZCAwLFxuICAgICAgICAgICAgICAgIHZvaWQgMCxcbiAgICAgICAgICAgICAgICBwYXJlbnRDb21wb25lbnRcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAocHJvcHMub25DbGljaykge1xuICAgICAgICAgIHBhdGNoUHJvcChcbiAgICAgICAgICAgIGVsLFxuICAgICAgICAgICAgXCJvbkNsaWNrXCIsXG4gICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgcHJvcHMub25DbGljayxcbiAgICAgICAgICAgIHZvaWQgMCxcbiAgICAgICAgICAgIHZvaWQgMCxcbiAgICAgICAgICAgIHBhcmVudENvbXBvbmVudFxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGxldCB2bm9kZUhvb2tzO1xuICAgICAgaWYgKHZub2RlSG9va3MgPSBwcm9wcyAmJiBwcm9wcy5vblZub2RlQmVmb3JlTW91bnQpIHtcbiAgICAgICAgaW52b2tlVk5vZGVIb29rKHZub2RlSG9va3MsIHBhcmVudENvbXBvbmVudCwgdm5vZGUpO1xuICAgICAgfVxuICAgICAgaWYgKGRpcnMpIHtcbiAgICAgICAgaW52b2tlRGlyZWN0aXZlSG9vayh2bm9kZSwgbnVsbCwgcGFyZW50Q29tcG9uZW50LCBcImJlZm9yZU1vdW50XCIpO1xuICAgICAgfVxuICAgICAgaWYgKCh2bm9kZUhvb2tzID0gcHJvcHMgJiYgcHJvcHMub25Wbm9kZU1vdW50ZWQpIHx8IGRpcnMgfHwgbmVlZENhbGxUcmFuc2l0aW9uSG9va3MpIHtcbiAgICAgICAgcXVldWVFZmZlY3RXaXRoU3VzcGVuc2UoKCkgPT4ge1xuICAgICAgICAgIHZub2RlSG9va3MgJiYgaW52b2tlVk5vZGVIb29rKHZub2RlSG9va3MsIHBhcmVudENvbXBvbmVudCwgdm5vZGUpO1xuICAgICAgICAgIG5lZWRDYWxsVHJhbnNpdGlvbkhvb2tzICYmIHRyYW5zaXRpb24uZW50ZXIoZWwpO1xuICAgICAgICAgIGRpcnMgJiYgaW52b2tlRGlyZWN0aXZlSG9vayh2bm9kZSwgbnVsbCwgcGFyZW50Q29tcG9uZW50LCBcIm1vdW50ZWRcIik7XG4gICAgICAgIH0sIHBhcmVudFN1c3BlbnNlKTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGVsLm5leHRTaWJsaW5nO1xuICB9O1xuICBj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RBSUxTX18pICYmICFoYXNXYXJuZWQpIHtcbiAgICAgICAgICB3YXJuJDEoXG4gICAgICAgICAgICBgSHlkcmF0aW9uIGNoaWxkcmVuIG1pc21hdGNoIG9uYCxcbiAgICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICAgIGBcblNlcnZlciByZW5kZXJlZCBlbGVtZW50IGNvbnRhaW5zIGZld2VyIGNoaWxkIG5vZGVzIHRoYW4gY2xpZW50IHZkb20uYFxuICAgICAgICAgICk7XG4gICAgICAgICAgaGFzV2FybmVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBwYXRjaChcbiAgICAgICAgICBudWxsLFxuICAgICAgICAgIHZub2RlLFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBudWxsLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICBnZXRDb250YWluZXJUeXBlKGNvbnRhaW5lciksXG4gICAgICAgICAgc2xvdFNjb3BlSWRzXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBub2RlO1xuICB9O1xuICBjb25zdCBoeWRyYXRlRnJhZ21lbnQgPSAobm9kZSwgdm5vZGUsIHBhcmVudENvbXBvbmVudCwgcGFyZW50U3VzcGVuc2UsIHNsb3RTY29wZUlkcywgb3B0aW1pemVkKSA9PiB7XG4gICAgY29uc3QgeyBzbG90U2NvcGVJZHM6IGZyYWdtZW50U2xvdFNjb3BlSWRzIH0gPSB2bm9kZTtcbiAgICBpZiAoZnJhZ21lbnRTbG90U2NvcGVJZHMpIHtcbiAgICAgIHNsb3RTY29wZUlkcyA9IHNsb3RTY29wZUlkcyA/IHNsb3RTY29wZUlkcy5jb25jYXQoZnJhZ21lbnRTbG90U2NvcGVJZHMpIDogZnJhZ21lbnRTbG90U2NvcGVJZHM7XG4gICAgfVxuICAgIGNvbnN0IGNvbnRhaW5lciA9IHBhcmVudE5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hID09PSBcIltcIiA/IGAoc3RhcnQgb2YgZnJhZ21lbnQpYCA6IGBgLFxuICAgICAgYFxuLSBleHBlY3RlZCBvbiBjbGllbnQ6YCxcbiAgICAgIHZub2RlLnR5cGVcbiAgICApO1xuICAgIHZub2RlLmVsID0gbnVsbDtcbiAgICBpZiAoaXNGcmFnbWVudCkge1xuICAgICAgY29uc3QgZW5kID0gbG9jYXRlQ2xvc2luZ0FuY2hvcihub2RlKTtcbiAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgIGNvbnN0IG5leHQyID0gbmV4dFNpYmxpbmcobm9kZSk7XG4gICAgICAgIGlmIChuZXh0MiAmJiBuZXh0MiAhPT0gZW5kKSB7XG4gICAgICAgICAgcmVtb3ZlKG5leHQyKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBuZXh0ID0gbmV4dFNpYmxpbmcobm9kZSk7XG4gICAgY29uc3QgY29udGFpbmVyID0gcGFyZW50Tm9kZShub2RlKTtcbiAgICByZW1vdmUobm9kZSk7XG4gICAgcGF0Y2goXG4gICAgICBudWxsLFxuICAgICAgdm5vZGUsXG4gICAgICBjb250YWluZXIsXG4gICAgICBuZXh0LFxuICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICBnZXRDb250YWluZXJUeXBlKGNvbnRhaW5lciksXG4gICAgICBzbG90U2NvcGVJZHNcbiAgICApO1xuICAgIHJldHVybiBuZXh0O1xuICB9O1xuICBjb25zdCBsb2NhdGVDbG9zaW5nQW5jaG9yID0gKG5vZGUsIG9wZW4gPSBcIltcIiwgY2xvc2UgPSBcIl1cIikgPT4ge1xuICAgIGxldCBtYXRjaCA9IDA7XG4gICAgd2hpbGUgKG5vZGUpIHtcbiAgICAgIG5vZGUgPSBuZXh0U2libGluZyhub2RlKTtcbiAgICAgIGlmIChub2RlICYmIGlzQ29tbWVudChub2RlKSkge1xuICAgICAgICBpZiAobm9kZS5kYXRhID09PSBvcGVuKVxuICAgICAgICAgIG1hdGNoKys7XG4gICAgICAgIGlmIChub2RlLmRhdGEgPT09IGNsb3NlKSB7XG4gICAgICAgICAgaWYgKG1hdGNoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV4dFNpYmxpbmcobm9kZSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG1hdGNoLS07XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBub2RlO1xuICB9O1xuICBjb25zdCByZXBsYWNlTm9kZSA9IChuZXdOb2RlLCBvbGROb2RlLCBwYXJlbnRDb21wb25lbnQpID0+IHtcbiAgICBjb25zdCBwYXJlbnROb2RlMiA9IG9sZE5vZGUucGFyZW50Tm9kZTtcbiAgICBpZiAocGFyZW50Tm9kZTIpIHtcbiAgICAgIHBhcmVudE5vZGUyLnJlcGxhY2VDaGlsZChuZXdOb2RlLCBvbGROb2RlKTtcbiAgICB9XG4gICAgbGV0IHBhcmVudCA9IHBhcmVudENvbXBvbmVudDtcbiAgICB3aGlsZSAocGFyZW50KSB7XG4gICAgICBpZiAocGFyZW50LnZub2RlLmVsID09PSBvbGROb2RlKSB7XG4gICAgICAgIHBhcmVudC52bm9kZS5lbCA9IHBhcmVudC5zdWJUcmVlLmVsID0gbmV3Tm9kZTtcbiAgICAgIH1cbiAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnQ7XG4gICAgfVxuICB9O1xuICBjb25zdCBpc1RlbXBsYXRlTm9kZSA9IChub2RlKSA9PiB7XG4gICAgcmV0dXJuIG5vZGUubm9kZVR5cGUgPT09IDEgLyogRUxFTUVOVCAqLyAmJiBub2RlLnRhZ05hbWUudG9Mb3dlckNhc2UoKSA9PT0gXCJ0ZW1wbGF0ZVwiO1xuICB9O1xuICByZXR1cm4gW2h5ZHJhdGUsIGh5ZHJhdGV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gICAgICAgIGFuY2hvcixcbiAgICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICAgKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBkZWZhdWx0OlxuICAgICAgICBpZiAoc2hhcGVGbGFnICYgMSkge1xuICAgICAgICAgIHByb2Nlc3NFbGVtZW50KFxuICAgICAgICAgICAgbjEsXG4gICAgICAgICAgICBuMixcbiAgICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICAgIGFuY2hvcixcbiAgICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBlbHNlIGlmIChzaGFwZUZsYWcgJiA2KSB7XG4gICAgICAgICAgcHJvY2Vzc0NvbXBvbmVudChcbiAgICAgICAgICAgIG4xLFxuICAgICAgICAgICAgbjIsXG4gICAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgICBhbmNob3IsXG4gICAgICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICAgIG5hbWVzcGFjZSxcbiAgICAgICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSBpZiAoc2hhcGVGbGFnICYgNjQpIHtcbiAgICAgICAgICB0eXBlLnByb2Nlc3MoXG4gICAgICAgICAgICBuMSxcbiAgICAgICAgICAgIG4yLFxuICAgICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgICBzbG90U2NvcGVJZHMsXG4gICAgICAgICAgICBvcHRpbWl6ZWQsXG4gICAgICAgICAgICBpbnRlcm5hbHNcbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKHNoYXBlRmxhZyAmIDEyOCkge1xuICAgICAgICAgIHR5cGUucHJvY2VzcyhcbiAgICAgICAgICAgIG4xLFxuICAgICAgICAgICAgbjIsXG4gICAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgICBhbmNob3IsXG4gICAgICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICAgIG5hbWVzcGFjZSxcbiAgICAgICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgICAgIG9wdGltaXplZCxcbiAgICAgICAgICAgIGludGVybmFsc1xuICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgIHdhcm4kMShcIkludmFsaWQgVk5vZGUgdHlwZTpcIiwgdHlwZSwgYCgke3R5cGVvZiB0eXBlfSlgKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAocmVmICE9IG51bGwgJiYgcGFyZW50Q29tcG9uZW50KSB7XG4gICAgICBzZXRSZWYocmVmLCBuMSAmJiBuMS5yZWYsIHBhcmVudFN1c3BlbnNlLCBuMiB8fCBuMSwgIW4yKTtcbiAgICB9XG4gIH07XG4gIGNvbnN0IHByb2Nlc3NUZXh0ID0gKG4xLCBuMiwgY29udGFpbmVyLCBhbmNob3IpID0+IHtcbiAgICBpZiAobjEgPT0gbnVsbCkge1xuICAgICAga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CBuMiwgY29udGFpbmVyLCBhbmNob3IsIHBhcmVudENvbXBvbmVudCwgcGFyZW50U3VzcGVuc2UsIG5hbWVzcGFjZSwgc2xvdFNjb3BlSWRzLCBvcHRpbWl6ZWQpID0+IHtcbiAgICBpZiAobjIudHlwZSA9PT0gXCJzdmdcIikge1xuICAgICAgbmFtZXNwYWNlID0gXCJzdmdcIjtcbiAgICB9IGVsc2UgaWYgKG4yLnR5cGUgPT09IFwibWF0aFwiKSB7XG4gICAgICBuYW1lc3BhY2UgPSBcIm1hdGhtbFwiO1xuICAgIH1cbiAgICBpZiAobjEgPT0gbnVsbCkge1xuICAgICAgbW91bnRFbGVtZW50KFxuICAgICAgICBuMixcbiAgICAgICAgY29udGFpbmVyLFxuICAgICAgICBhbmNob3IsXG4gICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgIG5hbWVzcGFjZSxcbiAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHBhdGNoRWxlbWVudChcbiAgICAgICAgbjEsXG4gICAgICAgIG4yLFxuICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgb3B0aW1pemVkXG4gICAgICApO1xuICAgIH1cbiAgfTtcbiAgY29uc3QgbW91bnRFbGVtZW50ID0gKHZub2RlLCBjb250YWluZXIsIGFuY2hvciwgcGFyZW50Q29tcG9uZW50LCBwYXJlbnRTdXNwZW5zZSwgbmFtZXNwYWNlLCBzbG90U2NvcGVJZHMsIG9wdGltaXplZCkgPT4ge1xuICAgIGxldCBlbDtcbiAgICBsZXQgdm5vZGVIb29rO1xuICAgIGNvbnN0IHsgcHJvcHMsIHNoYXBlRmxhZywgdHJhbnNpd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51bGwsXG4gICAgICAgICAgICBwcm9wc1trZXldLFxuICAgICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgICAgdm5vZGUuY2hpbGRyZW4sXG4gICAgICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICAgIHVubW91bnRDaGlsZHJlblxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChcInZhbHVlXCIgaW4gcHJvcHMpIHtcbiAgICAgICAgaG9zdFBhdGNoUHJvcChlbCwgXCJ2YWx1ZVwiLCBudWxsLCBwcm9wcy52YWx1ZSwgbmFtZXNwYWNlKTtcbiAgICAgIH1cbiAgICAgIGlmICh2bm9kZUhvb2sgPSBwcm9wcy5vblZub2RlQmVmb3JlTW91bnQpIHtcbiAgICAgICAgaW52b2tlVk5vZGVIb29rKHZub2RlSG9vaywgcGFyZW50Q29tcG9uZW50LCB2bm9kZSk7XG4gICAgICB9XG4gICAgfVxuICAgIGlmICghIShwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpIHx8IF9fVlVFX1BST0RfREVWVE9PTFNfXykge1xuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGVsLCBcIl9fdm5vZGVcIiwge1xuICAgICAgICB2YWx1ZTogdm5vZGUsXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlXG4gICAgICB9KTtcbiAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlbCwgXCJfX3Z1ZVBhcmVudENvbXBvbmVudFwiLCB7XG4gICAgICAgIHZhbHVlOiBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlXG4gICAgICB9KTtcbiAgICB9XG4gICAgaWYgKGRpcnMpIHtcbiAgICAgIGludm9rZURpcmVjdGl2ZUhvb2sodm5vZGUsIG51bGwsIHBhcmVudENvbXBvbmVudCwgX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gICAgY29uc3QgcHJldiA9IG9sZFByb3BzW2tleV07XG4gICAgICAgICAgICBjb25zdCBuZXh0ID0gbmV3UHJvcHNba2V5XTtcbiAgICAgICAgICAgIGlmIChuZXh0ICE9PSBwcmV2IHx8IGtleSA9PT0gXCJ2YWx1ZVwiKSB7XG4gICAgICAgICAgICAgIGhvc3RQYXRjaFByb3AoXG4gICAgICAgICAgICAgICAgZWwsXG4gICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgIHByZXYsXG4gICAgICAgICAgICAgICAgbmV4dCxcbiAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgICAgICAgbjEuY2hpbGRyZW4sXG4gICAgICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICAgICAgICAgIHVubW91bnRDaGlsZHJlblxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHBhdGNoRmxhZyAmIDEpIHtcbiAgICAgICAgaWYgKG4xLmNoaWxkcmVuICE9PSBuMi5jaGlsZHJlbikge1xuICAgICAgICAgIGhvc3RTZXRFbGVtZW50VGV4dChlbCwgbjIuY2hpbGRyZW4pO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBlbHNlIGlmICghb3B0aW1pemVkICYmIGR5bmFtaWNDaGlsZHJlbiA9PSBudWxsKSB7XG4gICAgICBwYXRjaFByb3BzKFxuICAgICAgICBlbCxcbiAgICAgICAgbjIsXG4gICAgICAgIG9sZFByb3BzLFxuICAgICAgICBuZXdQcm9wcyxcbiAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgbmFtZXNwYWNlXG4gICAgICApO1xuICAgIH1cbiAgICBpZiAoKHZub2RlSG9vayA9IG5ld1Byb3BzLm9uVm5vZG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lLCBvbGRQcm9wcywgbmV3UHJvcHMsIHBhcmVudENvbXBvbmVudCwgcGFyZW50U3VzcGVuc2UsIG5hbWVzcGFjZSkgPT4ge1xuICAgIGlmIChvbGRQcm9wcyAhPT0gbmV3UHJvcHMpIHtcbiAgICAgIGlmIChvbGRQcm9wcyAhPT0gRU1QVFlfT0JKKSB7XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIG9sZFByb3BzKSB7XG4gICAgICAgICAgaWYgKCFpc1Jlc2VydmVkUHJvcChrZXkpICYmICEoa2V5IGluIG5ld1Byb3BzKSkge1xuICAgICAgICAgICAgaG9zdFBhdGNoUHJvcChcbiAgICAgICAgICAgICAgZWwsXG4gICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgb2xkUHJvcHNba2V5XSxcbiAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgICAgICB2bm9kZS5jaGlsZHJlbixcbiAgICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICAgICAgdW5tb3VudENoaWxkcmVuXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZm9yIChjb25zdCBrZXkgaW4gbmV3UHJvcHMpIHtcbiAgICAgICAgaWYgKGlzUmVzZXJ2ZWRQcm9wKGtleSkpXG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIGNvbnN0IG5leHQgPSBuZXdQcm9wc1trZXldO1xuICAgICAgICBjb25zdCBwcmV2ID0gb2xkUHJvcHNba2V5XTtcbiAgICAgICAgaWYgKG5leHQgIT09IHByZXYgJiYga2V5ICE9PSBcInZhbHVlXCIpIHtcbiAgICAgICAgICBob3N0UGF0Y2hQcm9wKFxuICAgICAgICAgICAgZWwsXG4gICAgICAgICAgICBrZXksXG4gICAgICAgICAgICBwcmV2LFxuICAgICAgICAg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biAgICAgICAgICBuMi5rZXkgIT0gbnVsbCB8fCBwYXJlbnRDb21wb25lbnQgJiYgbjIgPT09IHBhcmVudENvbXBvbmVudC5zdWJUcmVlXG4gICAgICAgICkge1xuICAgICAgICAgIHRyYXZlcnNlU3RhdGljQ2hpbGRyZW4oXG4gICAgICAgICAgICBuMSxcbiAgICAgICAgICAgIG4yLFxuICAgICAgICAgICAgdHJ1ZVxuICAgICAgICAgICAgLyogc2hhbGxvdyAqL1xuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBhdGNoQ2hpbGRyZW4oXG4gICAgICAgICAgbjEsXG4gICAgICAgICAgbjIsXG4gICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgIGZyYWdtZW50RW5kQW5jaG9yLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICApO1xuICAgICAgfVxuICAgIH1cbiAgfTtcbiAgY29uc3QgcHJvY2Vzc0NvbXBvbmVudCA9IChuMSwgbjIsIGNvbnRhaW5lciwgYW5jaG9yLCBwYXJlbnRDb21wb25lbnQsIHBhcmVudFN1c3BlbnNlLCBuYW1lc3BhY2UsIHNsb3RTY29wZUlkcywgb3B0aW1pemVkKSA9PiB7XG4gICAgbjIuc2xvdFNjb3BlSWRzID0gc2xvdFNjb3BlSWRzO1xuICAgIGlmIChuMSA9PSBudWxsKSB7XG4gICAgICBpZiAobjIuc2hhcGVGbGFnICYgNTEyKSB7XG4gICAgICAgIHBhcmVudENvbXBvbmVudC5jdHguYWN0aXZhdGUoXG4gICAgICAgICAgbjIsXG4gICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgIGFuY2hvcixcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBtb3VudENvbXBvbmVudChcbiAgICAgICAgICBuMixcbiAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHVwZGF0ZUNvbXBvbmVudChuMSwgbjIsIG9wdGltaXplZCk7XG4gICAgfVxuICB9O1xuICBjb25zdCBtb3VudENvbXBvbmVudCA9IChpbml0aWFsVk5vZGUsIGNvbnRhaW5lciwgYW5jaG9yLCBwYXJlbnRDb21wb25lbnQsIHBhcmVudFN1c3BlbnNlLCBuYW1lc3BhY2UsIG9wdGltaXplZCkgPT4ge1xuICAgIGNvbnN0IGluc3RhbmNlID0gKGluaXRpYWxWTm9kZS5jb21wb25lbnQgPSBjcmVhdGVDb21wb25lbnRJbnN0YW5jZShcbiAgICAgIGluaXRpYWxWTm9kZSxcbiAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgIHBhcmVudFN1c3BlbnNlXG4gICAgKSk7XG4gICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikgJiYgaW5zdGFuY2UudHlwZS5fX2htcklkKSB7XG4gICAgICByZWdpc3RlckhNUihpbnN0YW5jZSk7XG4gICAgfVxuICAgIGlmICghIShwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpKSB7XG4gICAgICBwdXNoV2FybmluZ0NvbnRleHQoaW5pdGlhbFZOb2RlKTtcbiAgICAgIHN0YXJ0TWVhc3VyZShpbnN0YW5jZSwgYG1vdW50YCk7XG4gICAgfVxuICAgIGlmIChpc0tl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RU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICAgICAgc3RhcnRNZWFzdXJlKGluc3RhbmNlLCBgcmVuZGVyYCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpbnN0YW5jZS5zdWJUcmVlID0gcmVuZGVyQ29tcG9uZW50Um9vdChpbnN0YW5jZSk7XG4gICAgICAgICAgICBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgICAgICBlbmRNZWFzdXJlKGluc3RhbmNlLCBgcmVuZGVyYCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgICAgICBzdGFydE1lYXN1cmUoaW5zdGFuY2UsIGBoeWRyYXRlYCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBoeWRyYXRlTm9kZShcbiAgICAgICAgICAgICAgZWwsXG4gICAgICAgICAgICAgIGluc3RhbmNlLnN1YlRyZWUsXG4gICAgICAgICAgICAgIGluc3RhbmNlLFxuICAgICAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmICghIShwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpKSB7XG4gICAgICAgICAgICAgIGVuZE1lYXN1cmUoaW5zdGFuY2UsIGBoeWRyYXRlYCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgICBpZiAoaXNBc3luY1dyYXBwZXJWTm9kZSkge1xuICAgICAgICAgICAgaW5pdGlhbFZOb2RlLnR5cGUuX19hc3luY0xvYWRlcigpLnRoZW4oXG4gICAgICAgICAgICAgIC8vIG5vdGU6IHdlIGFyZSBtb3ZpbmcgdGhlIHJlbmRlciBj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ICAgIH1cbiAgICAgICAgICBwYXRjaChcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICBzdWJUcmVlLFxuICAgICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgICAgaW5zdGFuY2UsXG4gICAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICAgIG5hbWVzcGFjZVxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICAgIGVuZE1lYXN1cmUoaW5zdGFuY2UsIGBwYXRjaGApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpbml0aWFsVk5vZGUuZWwgPSBzdWJUcmVlLmVsO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtKSB7XG4gICAgICAgICAgcXVldWVQb3N0UmVuZGVyRWZmZWN0KG0sIHBhcmVudFN1c3BlbnNlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIWlzQXN5bmNXcmFwcGVyVk5vZGUgJiYgKHZub2RlSG9vayA9IHByb3BzICYmIHByb3BzLm9uVm5vZGVNb3VudGVkKSkge1xuICAgICAgICAgIGNvbnN0IHNjb3BlZEluaXRpYWxWTm9kZSA9IGluaXRpYWxWTm9kZTtcbiAgICAgICAgICBxdWV1ZVBvc3RSZW5kZXJFZmZlY3QoXG4gICAgICAgICAgICAoKSA9PiBpbnZva2VWTm9kZUhvb2sodm5vZGVIb29rLCBwYXJlbnQsIHNjb3BlZEluaXRpYWxWTm9kZSksXG4gICAgICAgICAgICBwYXJlbnRTdXNwZW5zZVxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGluaXRpYWxWTm9kZS5zaGFwZUZsYWcgJiAyNTYgfHwgcGFyZW50ICYmIGlzQXN5bmNXcmFwcGVyKHBhcmVudC52bm9kZSkgJiYgcGFyZW50LnZub2RlLnNoY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7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxldCBvcmlnaW5OZXh0ID0gbmV4dDtcbiAgICAgICAgbGV0IHZub2RlSG9vaztcbiAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICBwdXNoV2FybmluZ0NvbnRleHQobmV4dCB8fCBpbnN0YW5jZS52bm9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgdG9nZ2xlUmVjdXJzZShpbnN0YW5jZSwgZmFsc2UpO1xuICAgICAgICBpZiAobmV4dCkge1xuICAgICAgICAgIG5leHQuZWwgPSB2bm9kZS5lbDtcbiAgICAgICAgICB1cGRhdGVDb21wb25lbnRQcmVSZW5kZXIoaW5zdGFuY2UsIG5leHQsIG9wdGltaXplZCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV4dCA9IHZub2RlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChidSkge1xuICAgICAgICAgIGludm9rZUFycmF5Rm5zKGJ1KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodm5vZGVIb29rID0gbmV4dC5wcm9wcyAmJiBuZXh0LnByb3BzLm9uVm5vZGVCZWZvcmVVcGRhdGUpIHtcbiAgICAgICAgICBpbnZva2VWTm9kZUhvb2sodm5vZGVIb29rLCBwYXJlbnQsIG5leHQsIHZub2RlKTtcbiAgICAgICAgfVxuICAgICAgICB0b2dnbGVSZWN1cnNlKGluc3RhbmNlLCB0cnVlKTtcbiAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICBzdGFydE1lYXN1cmUoaW5zdGFuY2UsIGByZW5kZXJgKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBuZXh0VHJlZSA9IHJlbmRlckNvbXBvbmVudFJvb3QoaW5zdGFuY2UpO1xuICAgICAgICBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgIGVuZE1lYXN1cmUoaW5zdGFuY2UsIGByZW5kZXJgKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBwcmV2VHJlZSA9IGluc3RhbmNlLnN1YlRyZWU7XG4gICAgICAgIGluc3RhbmNlLnN1YlRyZWUgPSBuZXh0VHJlZTtcbiAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICBzdGFydE1lYXN1cmUoaW5zdGFuY2UsIGBwYXRjaGApO1xuICAgICAgICB9XG4gICAgICAgIHBhdGNoKFxuICAgICAgICAgIHByZXZUcmVlLFxuICAgICAgICAgIG5leHRUcmVlLFxuICAgICAgICAgIC8vIHBhcmVudCBtYXkgaGF2ZSBjaGFuZ2VkIGlmIGl0J3MgaW4gYSB0ZWxlcG9ydFxuICAgICAgICAgIGhvc3RQYXJlbnROb2RlKHByZXZUcmVlLmVsKSxcbiAgICAgICAgICAvLyBhbmNob3IgbWF5IGhhdmUgY2hhbmdlZCBpZiBpdCdzIGluIGEgZnJhZ21lbnRcbiAgICAgICAgICBnZXROZXh0SG9zdE5vZGUocHJldlRyZWUpLFxuICAgICAgICAgIGluc3RhbmNlLFxuICAgICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICAgIG5hbWVzcGFjZVxuICAgICAgICApO1xuICAgICAgICBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgIGVuZE1lYXN1cmUoaW5zdGFuY2UsIGBwYXRjaGApO1xuICAgICAgICB9XG4gICAgICAgIG5leHQuZWwgPSBuZXh0VHJlZS5lbDtcbiAgICAgICAgaWYgKG9yaWdpbk5leHQgPT09IG51bGwpIHtcbiAgICAgICAgICB1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raW5nKCk7XG4gICAgZmx1c2hQcmVGbHVzaENicyhpbnN0YW5jZSk7XG4gICAgcmVzZXRUcmFja2luZygpO1xuICB9O1xuICBjb25zdCBwYXRjaENoaWxkcmVuID0gKG4xLCBuMiwgY29udGFpbmVyLCBhbmNob3IsIHBhcmVudENvbXBvbmVudCwgcGFyZW50U3VzcGVuc2UsIG5hbWVzcGFjZSwgc2xvdFNjb3BlSWRzLCBvcHRpbWl6ZWQgPSBmYWxzZSkgPT4ge1xuICAgIGNvbnN0IGMxID0gbjEgJiYgbjEuY2hpbGRyZW47XG4gICAgY29uc3QgcHJldlNoYXBlRmxhZyA9IG4xID8gbjEuc2hhcGVGbGFnIDogMDtcbiAgICBjb25zdCBjMiA9IG4yLmNoaWxkcmVuO1xuICAgIGNvbnN0IHsgcGF0Y2hGbGFnLCBzaGFwZUZsYWcgfSA9IG4yO1xuICAgIGlmIChwYXRjaEZsYWcgPiAwKSB7XG4gICAgICBpZiAocGF0Y2hGbGFnICYgMTI4KSB7XG4gICAgICAgIHBhdGNoS2V5ZWRDaGlsZHJlbihcbiAgICAgICAgICBjMSxcbiAgICAgICAgICBjMixcbiAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICApO1xuICAgICAgICByZXR1cm47XG4gICAgICB9IGVsc2UgaWYgKHBhdGNoRmxhZyAmIDI1Nikge1xuICAgICAgICBwYXRjaFVua2V5ZWRDaGlsZHJlbihcbiAgICAgICAgICBjMSxcbiAgICAgICAgICBjMixcbiAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICApO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgfVxuICAgIGlmIChzaGFwZUZsYWcgJiA4KSB7XG4gICAgICBpZiAocHJldlNoYXBlRmxhZyAmIDE2KSB7XG4gICAgICAgIHVubW91bnRDaGlsZHJlbihjMSwgcGFyZW50Q29tcG9uZW50LCBwYXJlbnRTdXNwZW5zZSk7XG4gICAgICB9XG4gICAgICBpZiAoYzIgIT09IGMxKSB7XG4gICAgICAgIGhvc3RTZXRFbGVtZW50VGV4dChjb250YWluZXIsIGMyKTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKHByZXZTaGFwZUZsYWcgJiAxNikge1xuICAgICAgICBpZiAoc2hhcGVGbGFnICYgMTYpIHtcbiAgICAgICAgICBwYXRjaEtleWVkQ2hpbGRyZW4oXG4gICAgICAgICAgICBjMSxcbiAgICAgICAgICAgIGMyLFxuICAgICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgICBzbG90U2NvcGVJZHMsXG4gICAgICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHVubW91bnRDaGlsZHJlbihjMSwgcGFyZW50Q29tcG9uZW50LCBwYXJlbnRTdXNwZW5zZSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChwcmV2U2hhcGVGbGFnICYgOCkge1xuICAgICAgICAgIGhvc3RTZXRFbGVtZW50VGV4dChjb250YWluZXIsIFwiXCIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzaGFwZUZsYWcgJiAxNikge1xuICAgICAgICAgIG1vdW50Q2hpbGRyZW4oXG4gICAgICAgICAgICBjMixcbiAgICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICAgIGFuY2hvcixcbiAgICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfTtcbiAgY29uc3QgcGF0Y2hVbmtleWVkQ2hpbGRyZW4gPSAoYzEsIGMyLCBjb250YWluZXIsIGFuY2hvciwgcGFyZW50Q29tcG9uZW50LCBwYXJlbnRTdXNwZW5zZSwgbmFtZXNwYWNlLCBzbG90U2NvcGVJZHMsIG9wdGltaXplZCkgPT4ge1xuICAgIGMxID0gYzEgfHwgRU1QVFlfQVJSO1xuICAgIGMyID0gYzIgfHwgRU1QVFlfQVJSO1xuICAgIGNvbnN0IG9sZExlbmd0aCA9IGMxLmxlbmd0aDtcbiAgICBjb25zdCBuZXdMZW5ndGggPSBjMi5sZW5ndGg7XG4gICAgY29uc3QgY29tbW9uTGVuZ3RoID0gTWF0aC5taW4ob2xkTGVuZ3RoLCBuZXdMZW5ndGgpO1xuICAgIGxldCBpO1xuICAgIGZvciAoaSA9IDA7IGkgPCBjb21tb25MZW5ndGg7IGkrKykge1xuICAgICAgY29uc3QgbmV4dENoaWxkID0gYzJbaV0gPSBvcHRpbWl6ZWQgPyBjbG9uZUlmTW91bnRlZChjMltpXSkgOiBub3JtYWxpemVWTm9kZShjMltpXSk7XG4gICAgICBwYXRjaChcbiAgICAgICAgYzFbaV0sXG4gICAgICAgIG5leHRDaGlsZCxcbiAgICAgICAgY29udGFpbmVyLFxuICAgICAgICBudWxsLF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YzFbaV07XG4gICAgICBjb25zdCBuMiA9IGMyW2ldID0gb3B0aW1pemVkID8gY2xvbmVJZk1vdW50ZWQoYzJbaV0pIDogbm9ybWFsaXplVk5vZGUoYzJbaV0pO1xuICAgICAgaWYgKGlzU2FtZVZOb2RlVHlwZShuMSwgbjIpKSB7XG4gICAgICAgIHBhdGNoKFxuICAgICAgICAgIG4xLFxuICAgICAgICAgIG4yLFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBudWxsLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgIG9wdGltaXplZFxuICAgICAgICApO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICAgIHdoaWxlIChpIDw9IGUxICYmIGkgPD0gZTIpIHtcbiAgICAgIGNvbnN0IG4xID0gYzFbZTFdO1xuICAgICAgY29uc3QgbjIgPSBjMltlMl0gPSBvcHRpbWl6ZWQgPyBjbG9uZUlmTW91bnRlZChjMltlMl0pIDogbm9ybWFsaXplVk5vZGUoYzJbZTJdKTtcbiAgICAgIGlmIChpc1NhbWVWTm9kZVR5cGUobjEsIG4yKSkge1xuICAgICAgICBwYXRjaChcbiAgICAgICAgICBuMSxcbiAgICAgICAgICBuMixcbiAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgbnVsbCxcbiAgICAgICAgICBwYXJlbnRDb21wb25lbnQsXG4gICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgIHNsb3RTY29wZUlkcyxcbiAgICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICAgKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgZTEtLTtcbiAgICAgIGUyLS07XG4gICAgfVxuICAgIGlmIChpID4gZTEpIHtcbiAgICAgIGlmIChpIDw9IGUyKSB7XG4gICAgICAgIGNvbnN0IG5leHRQb3MgPSBlMiArIDE7XG4gICAgICAgIGNvbnN0IGFuY2hvciA9IG5leHRQb3MgPCBsMiA/IGMyW25leHRQb3NdLmVsIDogcGFyZW50QW5jaG9yO1xuICAgICAgICB3aGlsZSAoaSA8PSBlMikge1xuICAgICAgICAgIHBhdGNoKFxuICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgIGMyW2ldID0gb3B0aW1pemVkID8gY2xvbmVJZk1vdW50ZWQoYzJbaV0pIDogbm9ybWFsaXplVk5vZGUoYzJbaV0pLFxuICAgICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgICAgYW5jaG9yLFxuICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgICBzbG90U2NvcGVJZHMsXG4gICAgICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICAgICApO1xuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSBpZiAoaSA+IGUyKSB7XG4gICAgICB3aGlsZSAoaSA8PSBlMSkge1xuICAgICAgICB1bm1vdW50KGMxW2ldLCBwYXJlbnRDb21wb25lbnQsIHBhcmVudFN1c3BlbnNlLCB0cnVlKTtcbiAgICAgICAgaSsrO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBjb25zdCBzMSA9IGk7XG4gICAgICBjb25zdCBzMiA9IGk7XG4gICAgICBjb25zdCBrZXlUb05ld0luZGV4TWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTtcbiAgICAgIGZvciAoaSA9IHMyOyBpIDw9IGUyOyBpKyspIHtcbiAgICAgICAgY29uc3QgbmV4dENoaWxkID0gYz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dG9CZVBhdGNoZWQpIHtcbiAgICAgICAgICB1bm1vdW50KHByZXZDaGlsZCwgcGFyZW50Q29tcG9uZW50LCBwYXJlbnRTdXNwZW5zZSwgdHJ1ZSk7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IG5ld0luZGV4O1xuICAgICAgICBpZiAocHJldkNoaWxkLmtleSAhPSBudWxsKSB7XG4gICAgICAgICAgbmV3SW5kZXggPSBrZXlUb05ld0luZGV4TWFwLmdldChwcmV2Q2hpbGQua2V5KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBmb3IgKGogPSBzMjsgaiA8PSBlMjsgaisrKSB7XG4gICAgICAgICAgICBpZiAobmV3SW5kZXhUb09sZEluZGV4TWFwW2ogLSBzMl0gPT09IDAgJiYgaXNTYW1lVk5vZGVUeXBlKHByZXZDaGlsZCwgYzJbal0pKSB7XG4gICAgICAgICAgICAgIG5ld0luZGV4ID0gajtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChuZXdJbmRleCA9PT0gdm9pZCAwKSB7XG4gICAgICAgICAgdW5tb3VudChwcmV2Q2hpbGQsIHBhcmVudENvbXBvbmVudCwgcGFyZW50U3VzcGVuc2UsIHRydWUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG5ld0luZGV4VG9PbGRJbmRleE1hcFtuZXdJbmRleCAtIHMyXSA9IGkgKyAxO1xuICAgICAgICAgIGlmIChuZXdJbmRleCA+PSBtYXhOZXdJbmRleFNvRmFyKSB7XG4gICAgICAgICAgICBtYXhOZXdJbmRleFNvRmFyID0gbmV3SW5kZXg7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG1vdmVkID0gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcGF0Y2goXG4gICAgICAgICAgICBwcmV2Q2hpbGQsXG4gICAgICAgICAgICBjMltuZXdJbmRleF0sXG4gICAgICAgICAgICBjb250YWluZXIsXG4gICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgcGFyZW50Q29tcG9uZW50LFxuICAgICAgICAgICAgcGFyZW50U3VzcGVuc2UsXG4gICAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgICBzbG90U2NvcGVJZHMsXG4gICAgICAgICAgICBvcHRpbWl6ZWRcbiAgICAgICAgICApO1xuICAgICAgICAgIHBhdGNoZWQrKztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgY29uc3QgaW5jcmVhc2luZ05ld0luZGV4U2VxdWVuY2UgPSBtb3ZlZCA/IGdldFNlcXVlbmNlKG5ld0luZGV4VG9PbGRJbmRleE1hcCkgOiBFTVBUWV9BUlI7XG4gICAgICBqID0gaW5jcmVhc2luZ05ld0luZGV4U2VxdWVuY2UubGVuZ3RoIC0gMTtcbiAgICAgIGZvciAoaSA9IHRvQmVQYXRjaGVkIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgY29uc3QgbmV4dEluZGV4ID0gczIgKyBpO1xuICAgICAgICBjb25zdCBuZXh0Q2hpbGQgPSBjMltuZXh0SW5kZXhdO1xuICAgICAgICBjb25zdCBhbmNob3IgPSBuZXh0SW5kZXggKyAxIDwgbDIgPyBjMltuZXh0SW5kZXggKyAxXS5lbCA6IHBhcmVudEFuY2hvcjtcbiAgICAgICAgaWYgKG5ld0luZGV4VG9PbGRJbmRleE1hcFtpXSA9PT0gMCkge1xuICAgICAgICAgIHBhdGNoKFxuICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgIG5leHRDaGlsZCxcbiAgICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICAgIGFuY2hvcixcbiAgICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICAgIHBhcmVudFN1c3BlbnNlLFxuICAgICAgICAgICAgbmFtZXNwYWNlLFxuICAgICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgICAgb3B0aW1pemVkXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBlbHNlIGlmIChtb3ZlZCkge1xuICAgICAgICAgIGlmIChqIDwgMCB8fCBpICE9PSBpbmNyZWFzaW5nTmV3SW5kZXhTZXF1ZW5jZVtqXSkge1xuICAgICAgICAgICAgbW92ZShuZXh0Q2hpbGQsIGNvbnRhaW5lciwgYW5jaG9yLCAyKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgai0tO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfTtcbiAgY29uc3QgbW92ZSA9ICh2bm9kZSwgY29udGFpbmVyLCBhbmNob3IsIG1vdmVUeXBlLCBwYXJlbnRTdXNwZW5zZSA9IG51bGwpID0+IHtcbiAgICBjb25zdCB7IGVsLCB0eXBlLCB0cmFuc2l0aW9uLCBjaGlsZHJlbiwgc2hhcGVGbGFnIH0gPSB2bm9kZTtcbiAgICBpZiAoc2hhcGVGbGFnICYgNikge1xuICAgICAgbW92ZSh2bm9kZS5jb21wb25lbnQuc3ViVHJlZSwgY29udGFpbmVyLCBhbmNob3IsIG1vdmVUeXBlKTtcbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHNoYXBlRmxhZyAmIDEyOCkge1xuICAgICAgdm5vZGUuc3VzcGVuc2UubW92ZShjb250YWluZXIsIGFuY2hvciwgbW92ZVR5cGUpO1xuICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBpZiAoc2hhcGVGbGFnICYgNjQpIHtcbiAgICAgIHR5cGUubW92ZSh2bm9kZSwgY29udGFpbmVyLCBhbmNob3IsIGludGVybmFscyk7XG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGlmICh0eXBlID09PSBGcmFnbWVudCkge1xuICAgICAgaG9zdEluc2VydChlbCwgY29udGFpbmVyLCBhbmNob3IpO1xuICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaG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AgdHJhdmVyc2VTdGF0aWNDaGlsZHJlbihuMSwgbjIsIHRydWUpO1xuICAgICAgfSBlbHNlIGlmICghb3B0aW1pemVkKSB7XG4gICAgICAgIHBhdGNoQ2hpbGRyZW4oXG4gICAgICAgICAgbjEsXG4gICAgICAgICAgbjIsXG4gICAgICAgICAgY3VycmVudENvbnRhaW5lcixcbiAgICAgICAgICBjdXJyZW50QW5jaG9yLFxuICAgICAgICAgIHBhcmVudENvbXBvbmVudCxcbiAgICAgICAgICBwYXJlbnRTdXNwZW5zZSxcbiAgICAgICAgICBuYW1lc3BhY2UsXG4gICAgICAgICAgc2xvdFNjb3BlSWRzLFxuICAgICAgICAgIGZhbHNlXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBpZiAoZGlzYWJsZWQpIHtcbiAgICAgICAgaWYgKCF3YXNEaXNhYmxlZCkge1xuICAgICAgICAgIG1vdmVUZWxlcG9ydChcbiAgICAgICAgICAgIG4yLFxuICAgICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgICAgbWFpbkFuY2hvcixcbiAgICAgICAgICAgIGludGVybmFscyxcbiAgICAgICAgICAgIDFcbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChuMi5wcm9wcyAmJiBuMS5wcm9wcyAmJiBuMi5wcm9wcy50byAhPT0gbjEucHJvcHMudG8pIHtcbiAgICAgICAgICAgIG4yLnByb3BzLnRvID0gbjEucHJvcHMudG87XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoKG4yLnByb3BzICYmIG4yLnByb3BzLnRvKSAhPT0gKG4xLnByb3BzICYmIG4xLnByb3BzLnRvKSkge1xuICAgICAgICAgIGNvbnN0IG5leHRUYXJnZXQgPSBuMi50YXJnZXQgPSByZXNvbHZlVGFyZ2V0KFxuICAgICAgICAgICAgbjIucHJvcHMsXG4gICAgICAgICAgICBxdWVyeVNlbGVjdG9yXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAobmV4dFRhcmdldCkge1xuICAgICAgICAgICAgbW92ZVRlbGVwb3J0KFxuICAgICAgICAgICAgICBuMixcbiAgICAgICAgICAgICAgbmV4dFRhcmdldCxcbiAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgaW50ZXJuYWxzLFxuICAgICAgICAgICAgICAwXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0gZWxzZSBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgICAgd2FybiQxKFxuICAgICAgICAgICAgICBcIkludmFsaWQgVGVsZXBvcnQgdGFyZ2V0IG9uIHVwZGF0ZTpcIixcbiAgICAgICAgICAgICAgdGFyZ2V0LFxuICAgICAgICAgICAgICBgKCR7dHlwZW9mIHRhcmdldH0pYFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAod2FzRGlzYWJsZWQpIHtcbiAgICAgICAgICBtb3ZlVGVsZXBvcnQoXG4gICAgICAgICAgICBuMixcbiAgICAgICAgICAgIHRhcmdldCxcbiAgICAgICAgICAgIHRhcmdldEFuY2hvcixcbiAgICAgICAgICAgIGludGVybmFscyxcbiAgICAgICAgICAgIDFcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIHVwZGF0ZUNzc1ZhcnMobjIpO1xuICB9LFxuICByZW1vdmUodm5vZGUsIHBhcmVudENvbXBvbmVudCwgcGFyZW50U3VzcGVuc2UsIG9wdGltaXplZCwgeyB1bTogdW5tb3VudCwgbzogeyByZW1vdmU6IGhvc3RSZW1vdmUgfSB9LCBkb1JlbW92ZSkge1xuICAgIGNvbnN0IHsgc2hhcGVGbGFnLCBjaGlsZHJlbiwgYW5jaG9yLCB0YXJnZXRBbmNob3IsIHRhcmdldCwgcHJvcHMgfSA9IHZub2RlO1xuICAgIGlmICh0YXJnZXQ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G4gICAgICBjb25zdCB0ZW1wbGF0ZSA9IENvbXBvbmVudC50ZW1wbGF0ZSB8fCByZXNvbHZlTWVyZ2VkT3B0aW9ucyhpbnN0YW5jZSkudGVtcGxhdGU7XG4gICAgICBpZiAodGVtcGxhdGUpIHtcbiAgICAgICAgaWYgKCEhKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSBcInByb2R1Y3Rpb25cIikpIHtcbiAgICAgICAgICBzdGFydE1lYXN1cmUoaW5zdGFuY2UsIGBjb21waWxlYCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgeyBpc0N1c3RvbUVsZW1lbnQsIGNvbXBpbGVyT3B0aW9ucyB9ID0gaW5zdGFuY2UuYXBwQ29udGV4dC5jb25maWc7XG4gICAgICAgIGNvbnN0IHsgZGVsaW1pdGVycywgY29tcGlsZXJPcHRpb25zOiBjb21wb25lbnRDb21waWxlck9wdGlvbnMgfSA9IENvbXBvbmVudDtcbiAgICAgICAgY29uc3QgZmluYWxDb21waWxlck9wdGlvbnMgPSBleHRlbmQoXG4gICAgICAgICAgZXh0ZW5kKFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpc0N1c3RvbUVsZW1lbnQsXG4gICAgICAgICAgICAgIGRlbGltaXRlcnNcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjb21waWxlck9wdGlvbnNcbiAgICAgICAgICApLFxuICAgICAgICAgIGNvbXBvbmVudENvbXBpbGVyT3B0aW9uc1xuICAgICAgICApO1xuICAgICAgICBDb21wb25lbnQucmVuZGVyID0gY29tcGlsZSh0ZW1wbGF0ZSwgZmluYWxDb21waWxlck9wdGlvbnMpO1xuICAgICAgICBpZiAoISEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgICAgICAgIGVuZE1lYXN1cmUoaW5zdGFuY2UsIGBjb21waWxlYCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgaW5zdGFuY2Uuc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lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSkge1xuICAgIHJldHVybiBPYmplY3QuZnJlZXplKHtcbiAgICAgIGdldCBhdHRycygpIHtcbiAgICAgICAgcmV0dXJuIGdldEF0dHJzUHJveHkoaW5zdGFuY2UpO1xuICAgICAgfSxcbiAgICAgIGdldCBzbG90cygpIHtcbiAgICAgICAgcmV0dXJuIGdldFNsb3RzUHJveHkoaW5zdGFuY2UpO1xuICAgICAgfSxcbiAgICAgIGdldCBlbWl0KCkge1xuICAgICAgICByZXR1cm4gKGV2ZW50LCAuLi5hcmdzKSA9PiBpbnN0YW5jZS5lbWl0KGV2ZW50LCAuLi5hcmdzKTtcbiAgICAgIH0sXG4gICAgICBleHBvc2VcbiAgICB9KTtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4ge1xuICAgICAgZ2V0IGF0dHJzKCkge1xuICAgICAgICByZXR1cm4gZ2V0QXR0cnNQcm94eShpbnN0YW5jZSk7XG4gICAgICB9LFxuICAgICAgc2xvdHM6IGluc3RhbmNlLnNsb3RzLFxuICAgICAgZW1pdDogaW5zdGFuY2UuZW1pdCxcbiAgICAgIGV4cG9zZVxuICAgIH07XG4gIH1cbn1cbmZ1bmN0aW9uIGdldEV4cG9zZVByb3h5KGluc3RhbmNlKSB7XG4gIGlmIChpbnN0YW5jZS5leHBvc2VkKSB7XG4gICAgcmV0dXJuIGluc3RhbmNlLmV4cG9zZVByb3h5IHx8IChpbnN0YW5jZS5leHBvc2VQcm94eSA9IG5ldyBQcm94eShwcm94eVJlZnMobWFya1JhdyhpbnN0YW5jZS5leHBvc2VkKSksIHtcbiAgICAgIGdldCh0YXJnZXQsIGtleSkge1xuICAgICAgICBpZiAoa2V5IGluIHRhcmdldCkge1xuICAgICAgICAgIHJldHVybiB0YXJnZXRba2V5XTtcbiAgICAgICAgfSBlbHNlIGlmIChrZXkgaW4gcHVibGljUHJvcGVydGllc01hcCkge1xuICAgICAgICAgIHJldHVybiBwdWJsaWN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AgICAgW1wic3BhblwiLCB2dWVTdHlsZSwgaXNTaGFsbG93KG9iaikgPyBcIlNoYWxsb3dSZWFjdGl2ZVwiIDogXCJSZWFjdGl2ZVwiXSxcbiAgICAgICAgICBcIjxcIixcbiAgICAgICAgICBmb3JtYXRWYWx1ZShvYmopLFxuICAgICAgICAgIGA+JHtpc1JlYWRvbmx5KG9iaikgPyBgIChyZWFkb25seSlgIDogYGB9YFxuICAgICAgICBdO1xuICAgICAgfSBlbHNlIGlmIChpc1JlYWRvbmx5KG9iaikpIHtcbiAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgIHt9LFxuICAgICAgICAgIFtcInNwYW5cIiwgdnVlU3R5bGUsIGlzU2hhbGxvdyhvYmopID8gXCJTaGFsbG93UmVhZG9ubHlcIiA6IFwiUmVhZG9ubHlcIl0sXG4gICAgICAgICAgXCI8XCIsXG4gICAgICAgICAgZm9ybWF0VmFsdWUob2JqKSxcbiAgICAgICAgICBcIj5cIlxuICAgICAgICBdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfSxcbiAgICBoYXNCb2R5KG9iaikge1xuICAgICAgcmV0dXJuIG9iaiAmJiBvYmouX19pc1Z1ZTtcbiAgICB9LFxuICAgIGJvZHkob2JqKSB7XG4gICAgICBpZiAob2JqICYmIG9iai5fX2lzVnVlKSB7XG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICB7fSxcbiAgICAgICAgICAuLi5mb3JtYXRJbnN0YW5jZShvYmouJClcbiAgICAgICAgXTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG4gIGZ1bmN0aW9uIGZvcm1hdEluc3RhbmNlKGluc3RhbmNlKSB7XG4gICAgY29uc3QgYmxvY2tzID0gW107XG4gICAgaWYgKGluc3RhbmNlLnR5cGUucHJvcHMgJiYgaW5zdGFuY2UucHJvcHMpIHtcbiAgICAgIGJsb2Nrcy5wdXNoK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bGw7XG4gICAgICAgICAgICB0aGlzLl91cGRhdGUoKTtcbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGRpc3BhdGNoID0gKGV2ZW50LCBhcmdzKSA9PiB7XG4gICAgICAgICAgdGhpcy5kaXNwYXRjaEV2ZW50KFxuICAgICAgICAgICAgbmV3IEN1c3RvbUV2ZW50KGV2ZW50LCB7XG4gICAgICAgICAgICAgIGRldGFpbDogYXJnc1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICApO1xuICAgICAgICB9O1xuICAgICAgICBpbnN0YW5jZS5lbWl0ID0gKGV2ZW50LCAuLi5hcmdzKSA9PiB7XG4gICAgICAgICAgZGlzcGF0Y2goZXZlbnQsIGFyZ3MpO1xuICAgICAgICAgIGlmIChoeXBoZW5hdGUoZXZlbnQpICE9PSBldmVudCkge1xuICAgICAgICAgICAgZGlzcGF0Y2goaHlwaGVuYXRlKGV2ZW50KSwgYXJncyk7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBsZXQgcGFyZW50ID0gdGhpcztcbiAgICAgICAgd2hpbGUgKHBhcmVudCA9IHBhcmVudCAmJiAocGFyZW50LnBhcmVudE5vZGUgfHwgcGFyZW50Lmhvc3QpKSB7XG4gICAgICAgICAgaWYgKHBhcmVudCBpbnN0YW5jZW9mIFZ1ZUVsZW1lbnQpIHtcbiAgICAgICAgICAgIGluc3RhbmNlLnBhcmVudCA9IHBhcmVudC5faW5zdGFuY2U7XG4gICAgICAgICAgICBpbnN0YW5jZS5wcm92aWRlcyA9IHBhcmVudC5faW5zdGFuY2UucHJvdmlkZXM7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuICAgIHJldHVybiB2bm9kZTtcbiAgfVxuICBfYXBwbHlTdHlsZXMoc3R5bGVzKSB7XG4gICAgaWYgKHN0eWxlcykge1xuICAgICAgc3R5bGVzLmZvckVhY2goKGNzcykgP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XG4vKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4vKipcbiAqIFRyYW5zZm9ybSBmbGF0IGpzb24gaW4gb2JqIHRvIG5vcm1hbCBqc29uIGluIG9ialxuICovXG5mdW5jdGlvbiBoYW5kbGVGbGF0SnNvbihvYmopIHtcbiAgICAvLyBjaGVjayBvYmpcbiAgICBpZiAoIXNoYXJlZC5pc09iamVjdChvYmopKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIGZvciAoY29uc3Qga2V5IGluIG9iaikge1xuICAgICAgICAvLyBjaGVjayBrZXlcbiAgICAgICAgaWYgKCFzaGFyZWQuaGFzT3duKG9iaiwga2V5KSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgLy8gaGFuZGxlIGZvciBub3JtYWwganNvblxuICAgICAgICBpZiAoIWtleS5pbmNsdWRlcygnLicpKSB7XG4gICAgICAgICAgICAvLyByZWN1cnNpdmUgcHJvY2VzcyB2YWx1ZSBpZiB2YWx1ZSBpcyBhbHNvIGEgb2JqZWN0XG4gICAgICAgICAgICBpZiAoc2hhcmVkLmlzT2JqZWN0KG9ialtrZXldKSkge1xuICAgICAgICAgICAgICAgIGhhbmRsZUZsYXRKc29uKG9ialtrZXldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBoYW5kbGUgZm9yIGZsYXQganNvbiwgdHJhbnNmb3JtIHRvIG5vcm1hbCBqc29uXG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gZ28gdG8gdGhlIGxhc3Qgb2JqZWN0XG4gICAgICAgICAgICBjb25zdCBzdWJLZXlzID0ga2V5LnNwbGl0KCcuJyk7XG4gICAgICAgICAgICBjb25zdCBsYXN0SW5kZXggPSBzdWJLZXlzLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICBsZXQgY3VycmVudE9iaiA9IG9iajtcbiAgICAgICAgICAgIGxldCBoYXNTdHJpbmdWYWx1ZSA9IGZhbHNlO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsYXN0SW5kZXg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmICghKHN1YktleXNbaV0gaW4gY3VycmVudE9iaikpIHtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudE9ialtzdWJLZXlzW2ldXSA9IHt9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIXNoYXJlZC5pc09iamVjdChjdXJyZW50T2JqW3N1YktleXNbaV1dKSkge1xuICAgICAgICAgICAgICAgICAgICBzaGFyZWQud2FybihnZXRXYXJuTWVzc2FnZShJMThuV2FybkNvZGVzLklHTk9SRV9PQkpfRkxBVFRFTiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogc3ViS2V5c1tpXVxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBoYXNTdHJpbmdWYWx1ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjdXJyZW50T2JqID0gY3VycmVudE9ialtzdWJLZXlzW2ldXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIHVwZGF0ZSBsYXN0IG9iamVjdCB2YWx1ZSwgZGVsZXRlIG9sZCBwcm9wZXJ0eVxuICAgICAgICAgICAgaWYgKCFoYXNTdHJpbmdWYWx1ZSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRPYmpbc3ViS2V5c1tsYXN0SW5kZXhdXSA9IG9ialtrZXldO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBvYmpba2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIHJlY3Vyc2l2ZSBwcm9jZXNzIHZhbHVlIGlmIHZhbHVlIGlzIGFsc28gYSBvYmplY3RcbiAgICAgICAgICAgIGlmIChzaGFyZWQuaXNPYmplY3QoY3VycmVudE9ialtzdWJLZXlzW2xhc3RJbmRleF1dKSkge1xuICAgICAgICAgICAgICAgIGhhbmRsZUZsYXRKc29uKGN1cnJlbnRPYmpbc3ViS2V5c1tsYXN0SW5kZXhdXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG9iajtcbn1cbmZ1bmN0aW9uIGdldExvY2FsZU1lc3NhZ2VzKGxvY2FsZSwgb3B0aW9ucykge1xuICAgIGNvbnN0IHsgbWVzc2FnZXMsIF9faTE4biwgbWVzc2FnZVJlc29sdmVyLCBmbGF0SnNvbiB9ID0gb3B0aW9ucztcbiAgICAvLyBwcmV0dGllci1pZ25vcmVcbiAgICBjb25zdCByZXQgPSAoc2hhcmVkLmlzUGxhaW5PYmplY3QobWVzc2FnZXMpXG4gICAgICAgID8gbWVzc2FnZXNcbiAgICAgICAgOiBzaGFyZWQuaXNBcnJheShfX2kxOG4pXG4gICAgICAgICAgICA/IHt9XG4gICAgICAgICAgICA6IHsgW2xvY2FsZV06IHt9IH0pO1xuICAgIC8vIG1lcmdlIGxvY2FsZSBtZXNzYWdlcyBvZiBpMThuIGN1c3RvbSBibG9ja1xuICAgIGlmIChzaGFyZWQuaXNBcnJheShfX2kxOG4pKSB7XG4gICAgICAgIF9faTE4bi5mb3JFYWNoKGN1c3RvbSA9PiB7XG4gICAgICAgICAgICBpZiAoJ2xvY2FsZScgaW4gY3VzdG9tICYmICdyZXNvdXJjZScgaW4gY3VzdG9tKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyBsb2NhbGUsIHJlc291cmNlIH0gPSBjdXN0b207XG4gICAgICAgICAgICAgICAgaWYgKGxvY2FsZSkge1xuICAgICAgICAgICAgICAgICAgICByZXRbbG9jYWxlXSA9IHJldFtsb2NhbGVdIHx8IHt9O1xuICAgICAgICAgICAgICAgICAgICBzaGFyZWQuZGVlcENvcHkocmVzb3VyY2UsIHJldFtsb2NhbGVdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNoYXJlZC5kZWVwQ29weShyZXNvdXJjZSwgcmV0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBzaGFyZWQuaXNTdHJpbmcoY3VzdG9tKSAmJiBzaGFyZWQuZGVlcENvcHkoSlNPTi5wYXJzZShjdXN0b20pLCByZXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG4gICAgLy8gaGFuZGxlIG1lc3NhZ2VzIGZvciBmbGF0IGpzb25cbiAgICBpZiAobWVzc2FnZVJlc29sdmVyID09IG51bGwgJiYgZmxhdEpzb24pIHtcbiAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcmV0KSB7XG4gICAgICAgICAgICBpZiAoc2hhcmVkLmhhc093bihyZXQsIGtleSkpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVGbGF0SnNvbihyZXRba2V5XSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJldDtcbn1cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55XG5mdW5jdGlvbiBnZXRDb21wb25lbnRPcHRpb25zKGluc3RhbmNlKSB7XG4gICAgcmV0dXJuIGluc3RhbmNlLnR5cGUgO1xufVxuZnVuY3Rpb24gYWRqdXN0STE4blJlc291cmNlcyhnbCwgb3B0aW9ucywgY29tcG9uZW50T3B0aW9ucyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbikge1xuICAgIGxldCBtZXNzYWdlcyA9IHNoYXJlZC5pc09iamVjdChvcHRpb25zLm1lc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W1ldGVyLFxuICAgICAgICAgICAgbWVzc2FnZVJlc29sdmVyOiBvcHRpb25zLm1lc3NhZ2VSZXNvbHZlcixcbiAgICAgICAgICAgIG1lc3NhZ2VDb21waWxlcjogb3B0aW9ucy5tZXNzYWdlQ29tcGlsZXIsXG4gICAgICAgICAgICBfX21ldGE6IHsgZnJhbWV3b3JrOiAndnVlJyB9XG4gICAgICAgIH07XG4gICAgICAgIHtcbiAgICAgICAgICAgIGN0eE9wdGlvbnMuZGF0ZXRpbWVGb3JtYXRzID0gX2RhdGV0aW1lRm9ybWF0cy52YWx1ZTtcbiAgICAgICAgICAgIGN0eE9wdGlvbnMubnVtYmVyRm9ybWF0cyA9IF9udW1iZXJGb3JtYXRzLnZhbHVlO1xuICAgICAgICAgICAgY3R4T3B0aW9ucy5fX2RhdGV0aW1lRm9ybWF0dGVycyA9IHNoYXJlZC5pc1BsYWluT2JqZWN0KF9jb250ZXh0KVxuICAgICAgICAgICAgICAgID8gX2NvbnRleHQuX19kYXRldGltZUZvcm1hdHRlcnNcbiAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIGN0eE9wdGlvbnMuX19udW1iZXJGb3JtYXR0ZXJzID0gc2hhcmVkLmlzUGxhaW5PYmplY3QoX2NvbnRleHQpXG4gICAgICAgICAgICAgICAgPyBfY29udGV4dC5fX251bWJlckZvcm1hdHRlcnNcbiAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgfVxuICAgICAgICB7XG4gICAgICAgICAgICBjdHhPcHRpb25zLl9fdl9lbWl0dGVyID0gc2hhcmVkLmlzUGxhaW5PYmplY3QoX2NvbnRleHQpXG4gICAgICAgICAgICAgICAgPyBfY29udGV4dC5fX3ZfZW1pdHRlclxuICAgICAgICAgICAgICAgIDogdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGN0eCA9IGNvcmVCYXNlLmNyZWF0ZUNvcmVDb250ZXh0KGN0eE9wdG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cbiAgICAgICAgICAgIGlmICh0cnVlIHx8IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgY29yZUJhc2Uuc2V0QWRkaXRpb25hbE1ldGEoZ2V0TWV0YUluZm8oKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIV9pc0dsb2JhbCkge1xuICAgICAgICAgICAgICAgIF9jb250ZXh0LmZhbGxiYWNrQ29udGV4dCA9IF9fcm9vdFxuICAgICAgICAgICAgICAgICAgICA/IGNvcmVCYXNlLmdldEZhbGxiYWNrQ29udGV4dCgpXG4gICAgICAgICAgICAgICAgICAgIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0ID0gZm4oX2NvbnRleHQpO1xuICAgICAgICB9XG4gICAgICAgIGZpbmFsbHkge1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNvcmVCYXNlLnNldEFkZGl0aW9uYWxNZXRhKG51bGwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFfaXNHbG9iYWwpIHtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5mYWxsYmFja0NvbnRleHQgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCh3YXJuVHlwZSAhPT0gJ3RyYW5zbGF0ZSBleGlzdHMnICYmIC8vIGZvciBub3QgYHRlYCAoZS5nIGB0YClcbiAgICAgICAgICAgIHNoYXJlZC5pc051bWJlcihyZXQpICYmXG4gICAgICAgICAgICByZXQgPT09IGNvcmVCYXNlLk5PVF9SRU9TTFZFRCkgfHxcbiAgICAgICAgICAgICh3YXJuVHlwZSA9PT0gJ3RyYW5zbGF0ZSBleGlzdHMnICYmICFyZXQpIC8vIGZvciBgdGVgXG4gICAgICAgICkge1xuICAgICAgICAgICAgY29uc3QgW2tleSwgYXJnMl0gPSBhcmd1bWVudFBhcnNlcigpO1xuICAgICAgICAgICAgaWYgKF9fcm9vdCAmJlxuICAgICAgICAgICAgICAgIHNoYXJlZC5pc1N0cmluZyhrZXkpICYmXG4gICAgICAgICAgICAgICAgaXNSZXNvbHZlZFRyYW5zbGF0ZU1lc3NhZ2Uod2FyblR5cGUsIGFyZzIpKSB7XG4gICAgICAgICAgICAgICAgaWYgKF9mYWxsYmFja1Jvb3QgJiZcbiAgICAgICAgICAgICAgICAgICAgKGNvcmVCYXNlLmlzVHJhbnNsYXRlRmFsbGJhY2tXYXJuKF9mYWxsYmFja1dhcm4sIGtleSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvcmVCYXNlLmlzVHJhbnNsYXRlTWlzc2luZ1dhcm4oX21pc3NpbmdXYXJuLCBrZXkpKSkge1xuICAgICAgICAgICAgICAgICAgICBzaGFyZWQud2FybihnZXRXYXJuTWVzc2FnZShJMThuV2FybkNvZGVzLkZBTExCQUNLX1RPX1JPT1QsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHdhcm5UeXBlXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZm9yIHZ1ZS1kZXZ0b29scyB0aW1lbGluZSBldmVudFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBfX3ZfZW1pdHRlcjogZW1pdHRlciB9ID0gX2NvbnRleHQ7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlbWl0dGVyICYmIF9mYWxsYmFja1Jvb3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVtaXR0ZXIuZW1pdChcImZhbGxiYWNrXCIgLyogVnVlRGV2VG9vbHNUaW1lbGluZUV2ZW50cy5GQUxCQUNLICovLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogd2FyblR5cGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvOiAnZ2xvYmFsJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBncm91cElkOiBgJHt3YXJuVHlwZX06JHtrZXl9YFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gX19yb290ICYmIF9mYWxsYmFja1Jvb3RcbiAgICAgICAgICAgICAgICA/IGZhbGxiYWNrU3VjY2VzcyhfX3Jvb3QpXG4gICAgICAgICAgICAgICAgOiBmYWxsYmFja0ZhaWwoa2V5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChzdWNjZXNzQ29uZGl0aW9uKHJldCkpIHtcbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICAgICAgdGhyb3cgY3JlYXRlSTE4bkVycm9yKEkxOG5FcnJvckNvZGVzLlVORVhQRUNURURfUkVUVVJOX1RZUEUpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICAvLyB0XG4gICAgZnVuY3Rpb24gdCguLi5hcmdzKSB7XG4gICAgICAgIHJldHVybiB3cmFwV2l0aERlcHMoY29udGV4dCA9PiBSZWZsZWN0LmFwcGx5KGNvcmVCYXNlLnRyYW5zbGF0ZSwgbnVsbCwgW2NvbnRleHQsIC4uLmFyZ3NdKSwgKCkgPT4gY29yZUJhc2UucGFyc2VUcmFuc2xhdGVBcmdzKC4uLmFyZ3MpLCAndHJhbnNsYXRlJywgcm9vdCA9PiBSZWZsZWN0LmFwcGx5KHJvb3QudCwgcm9vdCwgWy4uLmFyZ3NdKSwga2V5ID0+IGtleSwgdmFsID0+IHNoYXJlZC5pc1N0cmluZyh2YWwpKTtcbiAgICB9XG4gICAgLy8gcnRcbiAgICBmd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gICAgICAgICAgICBfZmFsbGJhY2tMb2NhbGUudmFsdWUgPSBfX3Jvb3QuZmFsbGJhY2tMb2NhbGUudmFsdWU7XG4gICAgICAgICAgICAgICAgY29yZUJhc2UudXBkYXRlRmFsbGJhY2tMb2NhbGUoX2NvbnRleHQsIF9sb2NhbGUudmFsdWUsIF9mYWxsYmFja0xvY2FsZS52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBhdmFpbGFibGVMb2NhbGVzKCkge1xuICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKF9tZXNzYWdlcy52YWx1ZSkuc29ydCgpO1xuICAgICAgICB9LFxuICAgICAgICBtZXNzYWdlcyxcbiAgICAgICAgZ2V0IG1vZGlmaWVycygpIHtcbiAgICAgICAgICAgIHJldHVybiBfbW9kaWZpZXJzO1xuICAgICAgICB9LFxuICAgICAgICBnZXQgcGx1cmFsUnVsZXMoKSB7XG4gICAgICAgICAgICByZXR1cm4gX3BsdXJhbFJ1bGVzIHx8IHt9O1xuICAgICAgICB9LFxuICAgICAgICBnZXQgaXNHbG9iYWwoKSB7XG4gICAgICAgICAgICByZXR1cm4gX2lzR2xvYmFsO1xuICAgICAgICB9LFxuICAgICAgICBnZXQgbWlzc2luZ1dhcm4oKSB7XG4gICAgICAgICAgICByZXR1cm4gX21pc3NpbmdXYXJuO1xuICAgICAgICB9LFxuICAgICAgICBzZXQgbWlzc2luZ1dhcm4odmFsKSB7XG4gICAgICAgICAgICBfbWlzc2luZ1dhcm4gPSB2YWw7XG4gICAgICAgICAgICBfY29udGV4dC5taXNzaW5nV2FybiA9IF9taXNzaW5nV2FybjtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGZhbGxiYWNrV2FybigpIHtcbiAgICAgICAgICAgIHJldHVybiBfZmFsbGJhY2tXYXJuO1xuICAgICAgICB9LFxuICAgICAgICBzZXQgZmFsbGJhY2tXYXJuKHZhbCkge1xuICAgICAgICAgICAgX2Z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BsaWNpdC1tb2R1bGUtYm91bmRhcnktdHlwZXNcbmZ1bmN0aW9uIGNyZWF0ZVZ1ZUkxOG4ob3B0aW9ucyA9IHt9LCBWdWVJMThuTGVnYWN5KSB7XG4gICAge1xuICAgICAgICBjb25zdCBjb21wb3NlciA9IGNyZWF0ZUNvbXBvc2VyKGNvbnZlcnRDb21wb3Nlck9wdGlvbnMob3B0aW9ucykpO1xuICAgICAgICBjb25zdCB7IF9fZXh0ZW5kZXIgfSA9IG9wdGlvbnM7XG4gICAgICAgIC8vIGRlZmluZXMgVnVlSTE4blxuICAgICAgICBjb25zdCB2dWVJMThuID0ge1xuICAgICAgICAgICAgLy8gaWRcbiAgICAgICAgICAgIGlkOiBjb21wb3Nlci5pZCxcbiAgICAgICAgICAgIC8vIGxvY2FsZVxuICAgICAgICAgICAgZ2V0IGxvY2FsZSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9zZXIubG9jYWxlLnZhbHVlO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNldCBsb2NhbGUodmFsKSB7XG4gICAgICAgICAgICAgICAgY29tcG9zZXIubG9jYWxlLnZhbHVlID0gdmFsO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGZhbGxiYWNrTG9jYWxlXG4gICAgICAgICAgICBnZXQgZmFsbGJhY2tMb2NhbGUoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvc2VyLmZhbGxiYWNrTG9jYWxlLnZhbHVlO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNldCBmYWxsYmFja0xvY2FsZSh2YWwpIHtcbiAgICAgICAgICAgICAgICBjb21wb3Nlci5mYWxsYmFja0xvY2FsZS52YWx1ZSA9IHZhbDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBtZXNzYWdlc1xuICAgICAgICAgICAgZ2V0IG1lc3NhZ2VzKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb3Nlci5tZXNzYWdlcy52YWx1ZTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBkYXRldGltZUZvcm1hdHNcbiAgICAgICAgICAgIGdldCBkYXRldGltZUZvcm1hdHMoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvc2VyLmRhdGV0aW1lRm9ybWF0cy52YWx1ZTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBudW1iZXJGb3JtYXRzXG4gICAgICAgICAgICBnZXQgbnVtYmVyRm9ybWF0cygpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9zZXIubnVtYmVyRm9ybWF0cy52YWx1ZTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBhdmFpbGFibGVMb2NhbGVzXG4gICAgICAgICAgICBnZXQgYXZhaWxhYmxlTG9jYWxlcygpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9zZXIuYXZhaWxhYmxlTG9jYWxlcztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBmb3JtYXR0ZXJcbiAgICAgICAgICAgIGdldCBmb3JtYXR0ZXIoKSB7XG4gICAgICAgICAgICAgICAgc2hhcmVkLndhcm4oZ2V0V2Fybk1lc3NhZ2UoSTE4bldhcm5Db2Rlcy5OT1RfU1VQUE9SVEVEX0ZPUk1BVFRFUikpO1xuICAgICAgICAgICAgICAgIC8vIGR1bW15XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgaW50ZXJwb2xhdGUoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNldCBmb3JtYXR0ZXIodmFsKSB7XG4gICAgICAgICAgICAgICAgc2hhcmVkLndhcm4oZ2V0V2Fybk1lc3NhZ2UoSTE4bldhcm5Db2Rlcy5OT1RfU1VQUE9SVEVEX0ZPUk1BVFRFUikpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIG1pc3NpbmdcbiAgICAgICAgICAgIGdldCBtaXNzaW5nKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb3Nlci5nZXRNaXNzaW5nSGFuZGxlcigpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNldCBtaXNzaW5nKGhhbmRsZXIpIHtcbiAgICAgICAgICAgICAgICBjb21wb3Nlci5zZXRNaXNzaW5nSGFuZGxlcihoYW5kbGVyKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBzaWxlbnRUcmFuc2xhdGlvbldhcm5cbiAgICAgICAgICAgIGdldCBzaWxlbnRUcmFuc2xhdGlvbldhcm4oKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHNoYXJlZC5pc0Jvb2xlYW4oY29tcG9zZXIubWlzc2luZ1dhcm4pXG4gICAgICAgICAgICAgICAgICAgID8gIWNvbXBvc2VyLm1pc3NpbmdXYXJuXG4gICAgICAgICAgICAgICAgICAgIDogY29tcG9zZXIubWlzc2luZ1dhcm47XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2V0IHNpbGVudFRyYW5zbGF0aW9uV2Fybih2YWwpIHtcbiAgICAgICAgICAgICAgICBjb21wb3Nlci5taXNzaW5nV2FybiA9IHNoYXJlZC5pc0Jvb2xlYW4odmFsKSA/ICF2YWwgOiB2YWw7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gc2lsZW50RmFsbGJhY2tXYXJuXG4gICAgICAgICAgICBnZXQgc2lsZW50RmFsbGJhY2tXYXJuKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBzaGFyZWQuaXNCb29sZWFuKGNvbXBvc2VyLmZhbGxiYWNrV2FybilcbiAgICAgICAgICAgICAgICAgICAgPyAhY29tcG9zZXIuZmFsbGJhY2tXYXJuXG4gICAgICAgICAgICAgICAgICAgIDogY29tcG9zZXIuZmFsbGJhY2tXYXJuO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNldCBzaWxlbnRGYWxsYmFja1dhcm4odmFsKSB7XG4gICAgICAgICAgICAgICAgY29tcG9zZXIuZmFsbGJhY2tXYXJuID0gc2hhcmVkLmlzQm9vbGVhbih2YWwpID8gIXZhbCA6IHZhbDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBtb2RpZmllcnNcbiAgICAgICAgICAgIGdldCBtb2RpZmllcnMoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvc2VyLm1vZGlmaWVycztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBmb3JtYXRGYWxsYmFja01lc3NhZ2VzXG4gICAgICAgICAgICBnZXQgZm9ybWF0RmFsbGJhY2tNZXNzYWdlcygpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9zZXIuZmFsbGJhY2tGb3JtYXQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2V0IGZvcm1hdEZhbGxiYWNrTWVzc2FnZXModmFsKSB7XG4gICAgICAgICAgICAgICAgY29tcG9zZXIuZmFsbGJhY2tGb3JtYXQgPSB2YWw7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gcG9zdFRyYW5zbGF0aW9uXG4gICAgICAgICAgICBnZXQgcG9zdFRyYW5zbGF0aW9uKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb3Nlci5nZXRQb3N0VHJhbnNsYXRpb25IYW5kbGVyKCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2V0IHBvc3RUcmFuc2xhdGlvbihoYW5kbGVyKSB7XG4gICAgICAgICAgICAgICAgY29tcG9zZXIuc2V0UG9zdFRyYW5zbGF0aW9uSGFuZGxlcihoYW5kbGVyKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBzeW5jXG4gICAgICAgICAgICBnZXQgc3luYygpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9zZXIuaW5oZXJpdExvY2FsZTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzZXQgc3luYyh2YWwpIHtcbiAgICAgICAgICAgICAgICBjb21wb3Nlci5pbmhlcml0TG9jYWxlID0gdmFsO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIHdhcm5Jbkh0bWxNZXNzYWdlXG4gICAgICAgICAgICBnZXQgd2Fybkh0bWxJbk1lc3NhZ2UoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvc2VyLndhcm5IdG1sTWVzc2FnZSA/ICd3YXJuJyA6ICdvZmYnO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNldCB3YXJuSHRtbEluTWVzc2FnZSh2YWwpIHtcbiAgICAgICAgICAgICAgICBjb21wb3Nlci53YXJuSHRtbE1lc3NhZ2UgPSB2YWwgIT09ICdvZmYnO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGVzY2FwZVBhcmFtZXRlckh0bWxcbiAgICAgICAgICAgIGdldCBlc2NhcGVQYXJhbWV0ZXJIdG1sKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb3Nlci5lc2NhcGVQYXJhbWV0ZXI7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2V0IGVzY2FwZVBhcmFtZXRlckh0bWwodmFsKSB7XG4gICAgICAgICAgICAgICAgY29tcG9zZXIuZXNjYXBlUGFyYW1ldGVyID0gdmFsO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIHByZXNlcnZlRGlyZWN0aXZlQ29udGVudFxuICAgICAgICAgICAgZ2V0IHByZXNlcnZlRGlyZWN0aXZlQ29udGVudCgpIHtcbiAgICAgICAgICAgICAgICBzaGFyZWQud2FybihnZXRXYXJuTWVzc2FnZShJMThuV2FybkNvZGVzLk5PVF9TVVBQT1JURURfUFJFU0VSVkVfRElSRUNUSVZFKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2V0IHByZXNlcnZlRGlyZWN0aXZlQ29udGVudCh2YWwpIHtcbiAgICAgICAgICAgICAgICBzaGFyZWQud2FybihnZXRXYXJuTWVzc2FnZShJMThuV2FybkNvZGVzLk5PVF9TVVBQT1JURURfUFJFU0VSVkVfRElSRUNUSVZFKSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gcGx1cmFsaXphdGlvblJ1bGVzXG4gICAgICAgICAgICBnZXQgcGx1cmFsaXphdGlvblJ1bGVzKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb3Nlci5wbHVyYWxSdWxlcyB8fCB7fTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBmb3IgaW50ZXJuYWxcbiAgICAgICAgICAgIF9fY29tcG9zZXI6IGNvbXBvc2VyLFxuICAgICAgICAgICAgLy8gdFxuICAgICAgICAgICAgdCguLi5hcmdzKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgW2FyZzEsIGFyZzIsIGFyZzNdID0gYXJncztcbiAgICAgICAgICAgICAgICBjb25zdCBvcHRpb25zID0ge307XG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBudWxsO1xuICAgICAgICAgICAgICAgIGxldCBuYW1lZCA9IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKCFzaGFyZWQuaXNTdHJpbmcoYXJnMSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgY3JlYXRlSTE4bkVycm9yKEkxOG5FcnJvckNvZGVzLklOVkFMSURfQVJHVU1FTlQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSBhcmcxO1xuICAgICAgICAgICAgICAgIGlmIChzaGFyZWQuaXNTdHJpbmcoYXJnMikpIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5sb2NhbGUgPSBhcmcyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChzaGFyZWQuaXNBcnJheShhcmcyKSkge1xuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gYXJnMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2hhcmVkLmlzUGxhaW5PYmplY3QoYXJnMikpIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZWQgPSBhcmcyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2hhcmVkLmlzQXJyYXkoYXJnMykpIHtcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGFyZzM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNoYXJlZC5pc1BsYWluT2JqZWN0KGFyZzMpKSB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWVkID0gYXJnMztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gcmV0dXJuIGNvbXBvc2VyLnQoa2V5LCAobGlzdCB8fCBuYW1lZCB8fCB7fSkgYXMgYW55LCBvcHRpb25zKVxuICAgICAgICAgICAgICAgIHJldHVybiBSZWZsZWN0LmFwcGx5KGNvbXBvc2VyLnQsIGNvbXBvc2VyLCBbXG4gICAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICAgICAgKGxpc3QgfHwgbmFtZWQgfHwge30pLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcnQoLi4uYXJncykge1xuICAgICAgICAgICAgICAgIHJldHVybiBSZWZsZWN0LmFwcGx5KGNvbXBvc2VyLnJ0LCBjb21wb3NlciwgWy4uLmFyZ3NdKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyB0Y1xuICAgICAgICAgICAgdGMoLi4uYXJncykge1xuICAgICAgICAgICAgICAgIGNvbnN0IFthcmcxLCBhcmcyLCBhcmczXSA9IGFyZ3M7XG4gICAgICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHsgcGx1cmFsOiAxIH07XG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBudWxsO1xuICAgICAgICAgICAgICAgIGxldCBuYW1lZCA9IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKCFzaGFyZWQuaXNTdHJpbmcoYXJnMSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgY3JlYXRlSTE4bkVycm9yKEkxOG5FcnJvckNvZGVzLklOVkFMSURfQVJHVU1FTlQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSBhcmcxO1xuICAgICAgICAgICAgICAgIGlmIChzaGFyZWQuaXNTdHJpbmcoYXJnMikpIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5sb2NhbGUgPSBhcmcyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChzaGFyZWQuaXNOdW1iZXIoYXJnMikpIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5wbHVyYWwgPSBhcmcyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChzaGFyZWQuaXNBcnJheShhcmcyKSkge1xuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gYXJnMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2hhcmVkLmlzUGxhaW5PYmplY3QoYXJnMikpIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZWQgPSBhcmcyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2hhcmVkLmlzU3RyaW5nKGFyZzMpKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMubG9jYWxlID0gYXJnMztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2hhcmVkLmlzQXJyYXkoYXJnMykpIHtcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGFyZzM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNoYXJlZC5pc1BsYWluT2JqZWN0KGFyZzMpKSB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWVkID0gYXJnMztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gcmV0dXJuIGNvbXBvc2VyLnQoa2V5LCAobGlzdCB8fCBuYW1lZCB8fCB7fSkgYXMgYW55LCBvcHRpb25zKVxuICAgICAgICAgICAgICAgIHJldHVybiBSZWZsZWN0LmFwcGx5KGNvbXBvc2VyLnQsIGNvbXBvc2VyLCBbXG4gICAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICAgICAgKGxpc3QgfHwgbmFtZWQgfHwge30pLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gdGVcbiAgICAgICAgICAgIHRlKGtleSwgbG9jYWxlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvc2VyLnRlKGtleSwgbG9jYWxlKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyB0bVxuICAgICAgICAgICAgdG0oa2V5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvc2VyLnRtKGtleSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gZ2V0TG9jYWxlTWVzc2FnZVxuICAgICAgICAgICAgZ2V0TG9jYWxlTWVzc2FnZShsb2NhbGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9zZXIuZ2V0TG9jYWxlTWVzc2FnZShsb2NhbGUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIHNldExvY2FsZU1lc3NhZ2VcbiAgICAgICAgICAgIHNldExvY2FsZU1lc3NhZ2UobG9jYWxlLCBtZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgY29tcG9zZXIuc2V0TG9jYWxlTWVzc2FnZShsb2NhbGUsIG1lc3NhZ2UpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIG1lcmdlTG9jYWxlTWVzc2FnZVxuICAgICAgICAgICAgbWVyZ2VMb2NhbGVNZXNzYWdlKGxvY2FsZSwgbWVzc2FnZSkge1xuICAgICAgICAgICAgICAgIGNvbXBvc2VyLm1lcmdlTG9jYWxlTWVzc2FnZShsb2NhbGUsIG1lc3NhZ2UpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGRcbiAgICAgICAgICAgIGQoLi4uYXJncykge1xuICAgICAgICAgICAgICAgIHJldHVybiBSZWZsZWN0LmFwcGx5KGNvbXBvc2VyLmQsIGNvbXBvc2VyLCBbLi4uYXJnc10pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGdldERhdGVUaW1lRm9ybWF0XG4gICAgICAgICAgICBnZXREYXRlVGltZUZvcm1hdChsb2NhbGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9zZXIuZ2V0RGF0ZVRpbWVGb3JtYXQobG9jYWxlKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBzZXREYXRlVGltZUZvcm1hdFxuICAgICAgICAgICAgc2V0RGF0ZVRpbWVGb3JtYXQobG9jYWxlLCBmb3JtYXQpIHtcbiAgICAgICAgICAgICAgICBjb21wb3Nlci5zZXREYXRlVGltZUZvcm1hdChsb2NhbGUsIGZvcm1hdCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gbWVyZ2VEYXRlVGltZUZvcm1hdFxuICAgICAgICAgICAgbWVyZ2VEYXRlVGltZUZvcm1hdChsb2NhbGUsIGZvcm1hdCkge1xuICAgICAgICAgICAgICAgIGNvbXBvc2VyLm1lcmdlRGF0ZVRpbWVGb3JtYXQobG9jYWxlLCBmb3JtYXQpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIG5cbiAgICAgICAgICAgIG4oLi4uYXJncykge1xuICAgICAgICAgICAgICAgIHJldHVybiBSZWZsZWN0LmFwcGx5KGNvbXBvc2VyLm4sIGNvbXBvc2VyLCBbLi4uYXJnc10pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGdldE51bWJlckZvcm1hdFxuICAgICAgICAgICAgZ2V0TnVtYmVyRm9ybWF0KGxvY2FsZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb3Nlci5nZXROdW1iZXJGb3JtYXQobG9jYWxlKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBzZXROdW1iZXJGb3JtYXRcbiAgICAgICAgICAgIHNldE51bWJlckZvcm1hdChsb2NhbGUsIGZvcm1hdCkge1xuICAgICAgICAgICAgICAgIGNvbXBvc2VyLnNldE51bWJlckZvcm1hdChsb2NhbGUsIGZvcm1hdCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gbWVyZ2VOdW1iZXJGb3JtYXRcbiAgICAgICAgICAgIG1lcmdlTnVtYmVyRm9ybWF0KGxvY2FsZSwgZm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgY29tcG9zZXIubWVyZ2VOdW1iZXJGb3JtYXQobG9jYWxlLCBmb3JtYXQpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGdldENob2ljZUluZGV4XG4gICAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzXG4gICAgICAgICAgICBnZXRDaG9pY2VJbmRleChjaG9pY2UsIGNob2ljZXNMZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBzaGFyZWQud2FybihnZXRXYXJuTWVzc2FnZShJMThuV2FybkNvZGVzLk5PVF9TVVBQT1JURURfR0VUX0NIT0lDRV9JTkRFWCkpO1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgdnVlSTE4bi5fX2V4dGVuZGVyID0gX19leHRlbmRlcjtcbiAgICAgICAgLy8gZm9yIHZ1ZS1kZXZ0b29scyB0aW1lbGluZSBldmVudFxuICAgICAgICB7XG4gICAgICAgICAgICB2dWVJMThuLl9fZW5hYmxlRW1pdHRlciA9IChlbWl0dGVyKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgX19jb21wb3NlciA9IGNvbXBvc2VyO1xuICAgICAgICAgICAgICAgIF9fY29tcG9zZXJbRW5hYmxlRW1pdHRlcl0gJiYgX19jb21wb3NlcltFbmFibGVFbWl0dGVyXShlbWl0dGVyKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2dWVJMThuLl9fZGlzYWJsZUVtaXR0ZXIgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgX19jb21wb3NlciA9IGNvbXBvc2VyO1xuICAgICAgICAgICAgICAgIF9fY29tcG9zZXJbRGlzYWJsZUVtaXR0ZXJdICYmIF9fY29tcG9zZXJbRGlzYWJsZUVtaXR0ZXJdKCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB2dWVJMThuO1xuICAgIH1cbn1cbi8qIGVzbGludC1lbmFibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuXG5jb25zdCBiYXNlRm9ybWF0UHJvcHMgPSB7XG4gICAgdGFnOiB7XG4gICAgICAgIHR5cGU6IFtTdHJpbmcsIE9iamVjdF1cbiAgICB9LFxuICAgIGxvY2FsZToge1xuICAgICAgICB0eXBlOiBTdHJpbmdcbiAgICB9LFxuICAgIHNjb3B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OiAodmFsKSA9PiBzaGFyZWQuaXNOdW1iZXIodmFsKSB8fCAhaXNOYU4odmFsKVxuICAgICAgICB9XG4gICAgfSwgYmFzZUZvcm1hdFByb3BzKSxcbiAgICAvKiBlc2xpbnQtZW5hYmxlICovXG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbiAgICBzZXR1cChwcm9wcywgY29udGV4dCkge1xuICAgICAgICBjb25zdCB7IHNsb3RzLCBhdHRycyB9ID0gY29udGV4dDtcbiAgICAgICAgLy8gTk9URTogYXZvaWQgaHR0cHM6Ly9naXRodWIuY29tL21pY3Jvc29mdC9ydXNoc3RhY2svaXNzdWVzLzEwNTBcbiAgICAgICAgY29uc3QgaTE4biA9IHByb3BzLmkxOG4gfHxcbiAgICAgICAgICAgIHVzZUkxOG4oe1xuICAgICAgICAgICAgICAgIHVzZVNjb3BlOiBwcm9wcy5zY29wZSxcbiAgICAgICAgICAgICAgICBfX3VzZUNvbXBvbmVudDogdHJ1ZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiAoKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBrZXlzID0gT2JqZWN0LmtleXMoc2xvdHMpLmZpbHRlcihrZXkgPT4ga2V5ICE9PSAnXycpO1xuICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHt9O1xuICAgICAgICAgICAgaWYgKHByb3BzLmxvY2FsZSkge1xuICAgICAgICAgICAgICAgIG9wdGlvbnMubG9jYWxlID0gcHJvcHMubG9jYWxlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHByb3BzLnBsdXJhbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5wbHVyYWwgPSBzaGFyZWQuaXNTdHJpbmcocHJvcHMucGx1cmFsKSA/ICtwcm9wcy5wbHVyYWwgOiBwcm9wcy5wbHVyYWw7XG4gICA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V4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbiAgICAgICAgICAgICAgICBvcHRpb25zLmtleSA9IHByb3BzLmZvcm1hdC5rZXk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBGaWx0ZXIgb3V0IG51bWJlciBmb3JtYXQgb3B0aW9ucyBvbmx5XG4gICAgICAgICAgICBvdmVycmlkZXMgPSBPYmplY3Qua2V5cyhwcm9wcy5mb3JtYXQpLnJlZHVjZSgob3B0aW9ucywgcHJvcCkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBzbG90S2V5cy5pbmNsdWRlcyhwcm9wKVxuICAgICAgICAgICAgICAgICAgICA/IHNoYXJlZC5hc3NpZ24oe30sIG9wdGlvbnMsIHsgW3Byb3BdOiBwcm9wcy5mb3JtYXRbcHJvcF0gfSkgLy8gZXNsaW50LWRpc2FibGUtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55XG4gICAgICAgICAgICAgICAgICAgIDogb3B0aW9ucztcbiAgICAgICAgICAgIH0sIHt9KTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBwYXJ0cyA9IHBhcnRGb3JtYXR0ZXIoLi4uW3Byb3BzLnZhbHVlLCBvcHRpb25zLCBvdmVycmlkZXNdKTtcbiAgICAgICAgbGV0IGNoaWxkcmVuID0gW29wdGlvbnMua2V5XTtcbiAgICAgICAgaWYgKHNoYXJlZC5pc0FycmF5KHBhcnRzKSkge1xuICAgICAgICAgICAgY2hpbGRyZW4gPSBwYXJ0cy5tYXAoKHBhcnQsIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2xvdCA9IHNsb3RzW3BhcnQudHlwZV07XG4gICAgICAgICAgICAgICAgY29uc3Qgbm9kZSA9IHNsb3RcbiAgICAgICAgICAgICAgICAgICAgPyBzbG90KHsgW3BhcnQudHlwZV06IHBhcnQudmFsdWUsIGluZGV4LCBwYXJ0cyB9KVxuICAgICAgICAgICAgICAgICAgICA6IFtwYXJ0LnZhbHVlXTtcbiAgICAgICAgICAgICAgICBpZiAoaXNWTm9kZShub2RlKSkge1xuICAgICAgICAgICAgICAgICAgICBub2RlWzBdLmtleSA9IGAke3BhcnQudHlwZX0tJHtpbmRleH1gO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHNoYXJlZC5pc1N0cmluZyhwYXJ0cykpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gW3BhcnRzXTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBhc3NpZ25lZEF0dHJzID0gc2hhcmVkLmFzc2lnbih7fSwgYXR0cnMpO1xuICAgICAgICBjb25zdCB0YWcgPSBzaGFyZWQuaXNTdHJpbmcocHJvcHMudGFnKSB8fCBzaGFyZWQuaXNPYmplY3QocHJvcHMudGFnKVxuICAgICAgICAgICAgPyBwcm9wcy50YWdcbiAgICAgICAgICAgIDogZ2V0RnJhZ21lbnRhYmxlVGFnKCk7XG4gICAgICAgIHJldHVybiB2dWUuaCh0YWcsIGFzc2lnbmVkQXR0cnMsIGNoaWxkcmVuKTtcbiAgICB9O1xufVxuXG5jb25zdCBOdW1iZXJGb3JtYXRJbXBsID0gLyojX19QVVJFX18qLyB2dWUuZGVmaW5lQ29tcG9uZW50KHtcbiAgICAvKiBlc2xpbnQtZGlzYWJsZSAqL1xuICAgIG5hbWU6ICdpMThuLW4nLFxuICAgIHByb3BzOiBzaGFyZWQuYXNzaWduKHtcbiAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgIHR5cGU6IE51bWJlcixcbiAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlXG4gICAgICAgIH0sXG4gICAgICAgIGZvcm1hdDoge1xuICAgICAgICAgICAgdHlwZTogW1N0cmluZywgT2JqZWN0XVxuICAgICAgICB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ZXRDdXJyZW50SW5zdGFuY2UoKTtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICAgICAgaWYgKCFpbnN0YW5jZSkge1xuICAgICAgICAgICAgICAgIHRocm93IGNyZWF0ZUkxOG5FcnJvcihJMThuRXJyb3JDb2Rlcy5VTkVYUEVDVEVEX0VSUk9SKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IG9wdGlvbnMgPSB0aGlzLiRvcHRpb25zO1xuICAgICAgICAgICAgaWYgKG9wdGlvbnMuaTE4bikge1xuICAgICAgICAgICAgICAgIGNvbnN0IG9wdGlvbnNJMThuID0gb3B0aW9ucy5pMThuO1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLl9faTE4bikge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zSTE4bi5fX2kxOG4gPSBvcHRpb25zLl9faTE4bjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3B0aW9uc0kxOG4uX19yb290ID0gY29tcG9zZXI7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMgPT09IHRoaXMuJHJvb3QpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gbWVyZ2Ugb3B0aW9uIGFuZCBndHRhY2ggZ2xvYmFsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuJGkxOG4gPSBtZXJnZVRvR2xvYmFsKHZ1ZWkxOG4sIG9wdGlvbnNJMThuKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnNJMThuLl9faW5qZWN0V2l0aE9wdGlvbiA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnNJMThuLl9fZXh0ZW5kZXIgPSBpMThuLl9fdnVlSTE4bkV4dGVuZDtcbiAgICAgICAgICAgICAgICAgICAgLy8gYXR0dGFjaCBsb2NhbCBWdWVJMThuIGluc3RhbmNlXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuJGkxOG4gPSBjcmVhdGVWdWVJMThuKG9wdGlvbnNJMThuKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gZXh0ZW5kIFZ1ZUkxOG4gaW5zdGFuY2VcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgX3Z1ZUkxOG4gPSB0aGlzLiRpMThuO1xuICAgICAgICAgICAgICAgICAgICBpZiAoX3Z1ZUkxOG4uX19leHRlbmRlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3Z1ZUkxOG4uX19kaXNwb3NlciA9IF92dWVJMThuLl9fZXh0ZW5kZXIodGhpcy4kaTE4bik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChvcHRpb25zLl9faTE4bikge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzID09PSB0aGlzLiRyb290KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG1lcmdlIG9wdGlvbiBhbmQgZ3R0YWNoIGdsb2JhbFxuICAgICAgICAgICAgICAgICAgICB0aGlzLiRpMThuID0gbWVyZ2VUb0dsb2JhbCh2dWVpMThuLCBvcHRpb25zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGF0dHRhY2ggbG9jYWwgVnVlSTE4biBpbnN0YW5jZVxuICAgICAgICAgICAgICAgICAgICB0aGlzLiRpMThuID0gY3JlYXRlVnVlSTE4bih7XG4gICAgICAgICAgICAgICAgICAgICAgICBfX2kxOG46IG9wdGlvbnMuX19pMThuLFxuICAgICAgICAgICAgICAgICAgICAgICAgX19pbmplY3RXaXRoT3B0aW9uOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgX19leHRlbmRlcjogaTE4bi5fX3Z1ZUkxOG5FeHRlbmQsXG4gICAgICAgICAgICAgICAgICAgICAgICBfX3Jvb3Q6IGNvbXBvc2VyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAvLyBleHRlbmQgVnVlSTE4biBpbnN0YW5jZVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBfdnVlSTE4biA9IHRoaXMuJGkxOG47XG4gICAgICAgICAgICAgICAgICAgIGlmIChfdnVlSTE4bi5fX2V4dGVuZGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdnVlSTE4bi5fX2Rpc3Bvc2VyID0gX3Z1ZUkxOG4uX19leHRlbmRlcih0aGlzLiRpMThuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIGF0dGFjaCBnbG9iYWwgVnVlSTE4biBpbnN0YW5jZVxuICAgICAgICAgICAgICAgIHRoaXMuJGkxOG4gPSB2dWVpMThuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG9wdGlvbnMuX19pMThuR2xvYmFsKSB7XG4gICAgICAgICAgICAgICAgYWRqdXN0STE4blJlc291cmNlcyhjb21wb3Nlciwgb3B0aW9ucywgb3B0aW9ucyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBkZWZpbmVzIHZ1ZS1pMThuIGxlZ2FjeSBBUElzXG4gICAgICAgICAgICB0aGlzLiR0ID0gKC4uLmFyZ3MpID0+IHRoaXMuJGkxOG4udCguLi5hcmdzKTtcbiAgICAgICAgICAgIHRoaXMuJHJ0ID0gKC4uLmFyZ3MpID0+IHRoaXMuJGkxOG4ucnQoLi4uYXJncyk7XG4gICAgICAgICAgICB0aGlzLiR0YyA9ICguLi5hcmdzKSA9PiB0aGlzLiRpMThuLnRjKC4uLmFyZ3MpO1xuICAgICAgICAgICAgdGhpcy4kdGUgPSAoa2V5LCBsb2NhbGUpID0+IHRoaXMuJGkxOG4udGUoa2V5LCBsb2NhbGUpO1xuICAgICAgICAgICAgdGhpcy4kZCA9ICguLi5hcmdzKSA9PiB0aGlzLiRpMThuLmQoLi4uYXJncyk7XG4gICAgICAgICAgICB0aGlzLiRuID0gKC4uLmFyZ3MpID0+IHRoaXMuJGkxOG4ubiguLi5hcmdzKTtcbiAgICAgICAgICAgIHRoaXMuJHRtID0gKGtleSkgPT4gdGhpcy4kaTE4bi50bShrZXkpO1xuICAgICAgICAgICAgaTE4bi5fX3NldEluc3RhbmNlKGluc3RhbmNlLCB0aGlzLiRpMThuKTtcbiAgICAgICAgfSxcbiAgICAgICAgbW91bnRlZCgpIHtcbiAgICAgICAgfSxcbiAgICAgICAgdW5tb3VudGVkKCkge1xuICAgICAgICAgICAgY29uc3QgaW5zdGFuY2UgPSB2dWUuZ2V0Q3VycmVudEluc3RhbmNlKCk7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICAgICAgICAgIGlmICghaW5zdGFuY2UpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBjcmVhdGVJMThuRXJyb3IoSTE4bkVycm9yQ29kZXMuVU5FWFBFQ1RFRF9FUlJPUik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBfdnVlSTE4biA9IHRoaXMuJGkxOG47XG4gICAgICAgICAgICBkZWxldGUgdGhpcy4kdDtcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLiRydDtcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLiR0YztcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLiR0ZTtcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLiRkO1xuICAgICAgICAgICAgZGVsZXRlIHRoaXMuJG47XG4gICAgICAgICAgICBkZWxldGUgdGhpcy4kdG07XG4gICAgICAgICAgICBpZiAoX3Z1ZUkxOG4uX19kaXNwb3Nlcikge1xuICAgICAgICAgICAgICAgIF92dWVJMThuLl9fZGlzcG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AgICAgICAvLyBtb2RlXG4gICAgICAgICAgICBnZXQgbW9kZSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX19sZWdhY3lNb2RlXG4gICAgICAgICAgICAgICAgICAgID8gJ2xlZ2FjeSdcbiAgICAgICAgICAgICAgICAgICAgOiAnY29tcG9zaXRpb24nO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGFsbG93Q29tcG9zaXRpb25cbiAgICAgICAgICAgIGdldCBhbGxvd0NvbXBvc2l0aW9uKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBfX2FsbG93Q29tcG9zaXRpb247XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gaW5zdGFsbCBwbHVnaW5cbiAgICAgICAgICAgIGFzeW5jIGluc3RhbGwoYXBwLCAuLi5vcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgLy8gc2V0dXAgZ2xvYmFsIHByb3ZpZGVyXG4gICAgICAgICAgICAgICAgYXBwLl9fVlVFX0kxOE5fU1lNQk9MX18gPSBzeW1ib2w7XG4gICAgICAgICAgICAgICAgYXBwLnByb3ZpZGUoYXBwLl9fVlVFX0kxOE5fU1lNQk9MX18sIGkxOG4pO1xuICAgICAgICAgICAgICAgIC8vIHNldCBjb21wb3NlciAmIHZ1ZWkxOG4gZXh0ZW5kIGhvb2sgb3B0aW9ucyBmcm9tIHBsdWdpbiBvcHRpb25zXG4gICAgICAgICAgICAgICAgaWYgKHNoYXJlZC5pc1BsYWluT2JqZWN0KG9wdGlvbnNbMF0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG9wdHMgPSBvcHRpb25zWzBdO1xuICAgICAgICAgICAgICAgICAgICBpMThuLl9fY29tcG9zZXJFeHRlbmQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0cy5fX2NvbXBvc2VyRXh0ZW5kO1xuICAgICAgICAgICAgICAgICAgICBpMThuLl9fdnVlSTE4bkV4dGVuZCA9XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRzLl9fdnVlSTE4bkV4dGVuZDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZ2xvYmFsIG1ldGhvZCBhbmQgcHJvcGVydGllcyBpbmplY3Rpb24gZm9yIENvbXBvc2l0aW9uIEFQSVxuICAgICAgICAgICAgICAgIGxldCBnbG9iYWxSZWxlYXNlSGFuZGxlciA9IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKCFfX2xlZ2FjeU1vZGUgJiYgX19nbG9iYWxJbmplY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsUmVsZWFzZUhhbmRsZXIgPSBpbmplY3RHbG9iYWxGaWVsZHMoYXBwLCBpMThuLmdsb2JhbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGluc3RhbGwgYnVpbHQtaW4gY29tcG9uZW50cyBhbmQgZGlyZWN0aXZlXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBhcHBseShhcHAsIGkxOG4sIC4uLm9wdGlvbnMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBzZXR1cCBtaXhpbiBmb3IgTGVnYWN5IEFQSVxuICAgICAgICAgICAgICAgIGlmIChfX2xlZ2FjeU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgYXBwLm1peGluKGRlZmluZU1peGluKF9fZ2xvYmFsLCBfX2dsb2JhbC5fX2NvbXBvc2VyLCBpMThuKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHJlbGVhc2UgZ2xvYmFsIHNjb3BlXG4gICAgICAgICAgICAgICAgY29uc3QgdW5tb3VudEFwcCA9IGFwcC51bm1vdW50O1xuICAgICAgICAgICAgICAgIGFwcC51bm1vdW50ID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBnbG9iYWxSZWxlYXNlSGFuZGxlciAmJiBnbG9iYWxSZWxlYXNlSGFuZGxlcigpO1xuICAgICAgICAgICAgICAgICAgICBpMThuLmRpc3Bvc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgdW5tb3VudEFwcCgpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gZ2xvYmFsIGFjY2Vzc29yXG4gICAgICAgICAgICBnZXQgZ2xvYmFsKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBfX2dsb2JhbDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBkaXNwb3NlKCkge1xuICAgICAgICAgICAgICAgIGdsb2JhbFNjb3BlLnN0b3AoKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBAaW50ZXJuYWxcbiAgICAgICAgICAgIF9faW5zdGFuY2VzLFxuICAgICAgICAgICAgLy8gQGludGVybmFsXG4gICAgICAgICAgICBfX2dldEluc3RhbmNlLFxuICAgICAgICAgICAgLy8gQGludGVybmFsXG4gICAgICAgICAgICBfX3NldEluc3RhbmNlLFxuICAgICAgICAgICAgLy8gQGludGVybmFsXG4gICAgICAgICAgICBfX2RlbGV0ZUluc3RhbmNlXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBpMThuO1xuICAgIH1cbn1cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvZXhwbGljaXQtbW9kdWxlLWJvdW5kYXJ5LXR5cGVzXG5mdW5jdGlvbiB1c2VJMThuKG9wdGlvbnMgPSB7fSkge1xuICAgIGNvbnN0IGluc3RhbmNlID0gdnVlLmdldEN1cnJlbnRJbnN0YW5jZSgpO1xuICAgIGlmIChpbnN0YW5jZSA9PSBudWxsKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUkxOG5FcnJvcihJMThuRXJyb3JDb2Rlcy5NVVNUX0JFX0NBTExfU0VUVVBfVE9QKTtcbiAgICB9XG4gICAgaWYgKCFpbnN0YW5jZS5pc0NFICYmXG4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1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBbc2NvcGUsIG9ial07XG4gICAgfVxufVxuZnVuY3Rpb24gZ2V0STE4bkluc3RhbmNlKGluc3RhbmNlKSB7XG4gICAge1xuICAgICAgICBjb25zdCBpMThuID0gdnVlLmluamVjdCghaW5zdGFuY2UuaXNDRVxuICAgICAgICAgICAgPyBpbnN0YW5jZS5hcHBDb250ZXh0LmFwcC5fX1ZVRV9JMThOX1NZTUJPTF9fXG4gICAgICAgICAgICA6IEkxOG5JbmplY3Rpb25LZXkpO1xuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICAgICAgaWYgKCFpMThuKSB7XG4gICAgICAgICAgICB0aHJvdyBjcmVhdGVJMThuRXJyb3IoIWluc3RhbmNlLmlzQ0VcbiAgICAgICAgICAgICAgICA/IEkxOG5FcnJvckNvZGVzLlVORVhQRUNURURfRVJST1JcbiAgICAgICAgICAgICAgICA6IEkxOG5FcnJvckNvZGVzLk5PVF9JTlNUQUxMRURfV0lUSF9QUk9WSURFKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaTE4bjtcbiAgICB9XG59XG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueVxuZnVuY3Rpb24gZ2V0U2NvcGUob3B0aW9ucywgY29tcG9uZW50T3B0aW9ucykge1xuICAgIC8vIHByZXR0aWVyLWlnbm9yZVxuICAgIHJldHVybiBzaGFyZWQuaXNFbXB0eU9iamVjdChvcHRpb25zKVxuICAgICAgICA/ICgnX19pMThuJyBpbiBjb21wb25lbnRPcHRpb25zKVxuICAgICAgICAgICAgPyAnbG9jYWwnXG4gICAgICAgICAgICA6ICdnbG9iYWwnXG4gICAgICAgIDogIW9wdGlvbnMudXNlU2NvcGVcbiAgICAgICAgICAgID8gJ2xvY2FsJ1xuICAgICAgICAgICAgOiBvcHRpb25zLnVzZVNjb3BlO1xufVxuZnVuY3Rpb24gZ2V0R2xvYmFsQ29tcG9zZXIoaTE4bikge1xuICAgIC8vIHByZXR0aWVyLWlnbm9yZVxuICAgIHJldHVybiBpMThuLm1vZGUgPT09ICdjb21wb3NpdGlvbidcbiAgICAgICAgICAgID8gaTE4bi5nbG9iYWxcbiAgICAgICAgICAgIDogaTE4bi5nbG9iYWwuX19jb21wb3NlclxuICAgICAgICA7XG59XG5mdW5jdGlvbiBnZXRDb21wb3NlcihpMThuLCB0YXJnZXQsIHVzZUNvbXBvbmVudCA9IGZhbHNlKSB7XG4gICAgbGV0IGNvbXBvc2VyID0gbnVsbDtcbiAgICBjb25zdCByb290ID0gdGFyZ2V0LnJvb3Q7XG4gICAgbGV0IGN1cnJlbnQgPSBnZXRQYXJlbnRDb21wb25lbnRJbnN0YW5jZSh0YXJnZXQsIHVzZUNvbXBvbmVudCk7XG4gICAgd2hpbGUgKGN1cnJlbnQgIT0gbnVsbCkge1xuICAgICAgICBjb25zdCBpMThuSW50ZXJuYWwgPSBpMThuO1xuICAgICAgICBpZiAoaTE4bi5tb2RlID09PSAnY29tcG9zaXRpb24nKSB7XG4gICAgICAgICAgICBjb21wb3NlciA9IGkxOG5JbnRlcm5hbC5fX2dldEluc3RhbmNlKGN1cnJlbnQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNvbnN0IHZ1ZUkxOG4gPSBpMThuSW50ZXJuYWwuX19nZXRJbnN0YW5jZShjdXJyZW50KTtcbiAgICAgICAgICAgICAgICBpZiAodnVlSTE4biAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBvc2VyID0gdnVlSTE4blxuICAgICAgICAgICAgICAgICAgICAgICAgLl9fY29tcG9zZXI7XG4gICAgICAgICAgICAgICAgICAgIGlmICh1c2VDb21wb25lbnQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvc2VyICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAhY29tcG9zZXJbSW5lamN0V2l0aE9wdGlvblN5bWJvbF0gLy8gZXNsaW50LWRpc2FibGUtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55XG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9zZXIgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChjb21wb3NlciAhPSBudWxsKSB7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocm9vdCA9PT0gY3VycmVudCkge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgY3VycmVudCA9IGN1cnJlbnQucGFyZW50O1xuICAgIH1cbiAgICByZXR1cm4gY29tcG9zZXI7XG59XG5mdW5jdGlvbiBnZXRQYXJlbnRDb21wb25lbnRJbnN0YW5jZSh0YXJnZXQsIHVzZUNvbXBvbmVudCA9IGZhbHNlKSB7XG4gICAgaWYgKHRhcmdldCA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICB7XG4gICAgICAgIC8vIGlmIGB1c2VDb21wb25lbnQ6IHRydWVgIHdpbGwgYmUgc3BlY2lmaWVkLCB3ZSBnZXQgbGV4aWNhbCBzY29wZSBvd25lciBpbnN0YW5jZSBmb3IgdXNlLWNhc2Ugc2xvdHNcbiAgICAgICAgcmV0dXJuICF1c2VDb21wb25lbnRcbiAgICAgICAgICAgID8gdGFyZ2V0LnBhcmVudFxuICAgICAgICAgICAgOiB0YXJnZXQudm5vZGUuY3R4IHx8IHRhcmdldC5wYXJlbnQ7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueVxuICAgIH1cbn1cbmZ1bmN0aW9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ICAgICAgICByZXR1cm4gX2NvbXBvc2VyLnZhbHVlID8gX2NvbXBvc2VyLnZhbHVlLmxvY2FsZS52YWx1ZSA6IF9sb2NhbGUudmFsdWU7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogdmFsID0+IHtcbiAgICAgICAgICAgIGlmIChfY29tcG9zZXIudmFsdWUpIHtcbiAgICAgICAgICAgICAgICBfY29tcG9zZXIudmFsdWUubG9jYWxlLnZhbHVlID0gdmFsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX2xvY2FsZS52YWx1ZSA9IHZhbDtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIC8vIGZhbGxiYWNrTG9jYWxlXG4gICAgY29uc3QgZmFsbGJhY2tMb2NhbGUgPSB2dWUuY29tcHV0ZWQoe1xuICAgICAgICBnZXQ6ICgpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBfY29tcG9zZXIudmFsdWVcbiAgICAgICAgICAgICAgICA/IF9jb21wb3Nlci52YWx1ZS5mYWxsYmFja0xvY2FsZS52YWx1ZVxuICAgICAgICAgICAgICAgIDogX2ZhbGxiYWNrTG9jYWxlLnZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IHZhbCA9PiB7XG4gICAgICAgICAgICBpZiAoX2NvbXBvc2VyLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgX2NvbXBvc2VyLnZhbHVlLmZhbGxiYWNrTG9jYWxlLnZhbHVlID0gdmFsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX2ZhbGxiYWNrTG9jYWxlLnZhbHVlID0gdmFsO1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgLy8gbWVzc2FnZXNcbiAgICBjb25zdCBtZXNzYWdlcyA9IHZ1ZS5jb21wdXRlZCgoKSA9PiB7XG4gICAgICAgIGlmIChfY29tcG9zZXIudmFsdWUpIHtcbiAgICAgICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwd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XQpO1xuICAgICAgICAgICAgX251bWJlckZvcm1hdHMudmFsdWVbbG9jYWxlXSA9IGZvcm1hdDtcbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBtZXJnZU51bWJlckZvcm1hdChsb2NhbGUsIGZvcm1hdCkge1xuICAgICAgICBpZiAoX2NvbXBvc2VyLnZhbHVlKSB7XG4gICAgICAgICAgICBfY29tcG9zZXIudmFsdWUubWVyZ2VOdW1iZXJGb3JtYXQobG9jYWxlLCBmb3JtYXQpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGNvbnN0IHdyYXBwZXIgPSB7XG4gICAgICAgIGdldCBpZCgpIHtcbiAgICAgICAgICAgIHJldHVybiBfY29tcG9zZXIudmFsdWUgPyBfY29tcG9zZXIudmFsdWUuaWQgOiAtMTtcbiAgICAgICAgfSxcbiAgICAgICAgbG9jYWxlLFxuICAgICAgICBmYWxsYmFja0xvY2FsZSxcbiAgICAgICAgbWVzc2FnZXMsXG4gICAgICAgIGRhdGV0aW1lRm9ybWF0cyxcbiAgICAgICAgbnVtYmVyRm9ybWF0cyxcbiAgICAgICAgZ2V0IGluaGVyaXRMb2NhbGUoKSB7XG4gICAgICAgICAgICByZXR1cm4gX2NvbXBvc2VyLnZhbHVlID8gX2NvbXBvc2VyLnZhbHVlLmluaGVyaXRMb2NhbGUgOiBfaW5oZXJpdExvY2FsZTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0IGluaGVyaXRMb2NhbGUodmFsKSB7XG4gICAgICAgICAgICBpZiAoX2NvbXBvc2VyLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgX2NvbXBvc2VyLnZhbHVlLmluaGVyaXRMb2NhbGUgPSB2YWw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBhdmFpbGFibGVMb2NhbGVzKCkge1xuICAgICAgICAgICAgcmV0dXJuIF9jb21wb3Nlci52YWx1ZVxuICAgICAgICAgICAgICAgID8gX2NvbXBvc2VyLnZhbHVlLmF2YWlsYWJsZUxvY2FsZXNcbiAgICAgICAgICAgICAgICA6IE9iamVjdC5rZXlzKF9tZXNzYWdlcy52YWx1ZSk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBtb2RpZmllcnMoKSB7XG4gICAgICAgICAgICByZXR1cm4gKF9jb21wb3Nlci52YWx1ZSA/IF9jb21wb3Nlci52YWx1ZS5tb2RpZmllcnMgOiBfbW9kaWZpZXJzKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IHBsdXJhbFJ1bGVzKCkge1xuICAgICAgICAgICAgcmV0dXJuIChfY29tcG9zZXIudmFsdWUgPyBfY29tcG9zZXIudmFsdWUucGx1cmFsUnVsZXMgOiBfcGx1cmFsUnVsZXMpO1xuICAgICAgICB9LFxuICAgICAgICBnZXQgaXNHbG9iYWwoKSB7XG4gICAgICAgICAgICByZXR1cm4gX2NvbXBvc2VyLnZhbHVlID8gX2NvbXBvc2VyLnZhbHVlLmlzR2xvYmFsIDogZmFsc2U7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBtaXNzaW5nV2FybigpIHtcbiAgICAgICAgICAgIHJldHVybiBfY29tcG9zZXIudmFsdWUgPyBfY29tcG9zZXIudmFsdWUubWlzc2luZ1dhcm4gOiBfbWlzc2luZ1dhcm47XG4gICAgICAgIH0sXG4gICAgICAgIHNldCBtaXNzaW5nV2Fybih2YWwpIHtcbiAgICAgICAgICAgIGlmIChfY29tcG9zZXIudmFsdWUpIHtcbiAgICAgICAgICAgICAgICBfY29tcG9zZXIudmFsdWUubWlzc2luZ1dhcm4gPSB2YWw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBmYWxsYmFja1dhcm4oKSB7XG4gICAgICAgICAgICByZXR1cm4gX2NvbXBvc2VyLnZhbHVlID8gX2NvbXBvc2VyLnZhbHVlLmZhbGxiYWNrV2FybiA6IF9mYWxsYmFja1dhcm47XG4gICAgICAgIH0sXG4gICAgICAgIHNldCBmYWxsYmFja1dhcm4odmFsKSB7XG4gICAgICAgICAgICBpZiAoX2NvbXBvc2VyLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgX2NvbXBvc2VyLnZhbHVlLm1pc3NpbmdXYXJuID0gdmFsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXQgZmFsbGJhY2tSb290KCkge1xuICAgICAgICAgICAgcmV0dXJuIF9jb21wb3Nlci52YWx1ZSA/IF9jb21wb3Nlci52YWx1ZS5mYWxsYmFja1Jvb3QgOiBfZmFsbGJhY2tSb290O1xuICAgICAgICB9LFxuICAgICAgICBzZXQgZmFsbGJhY2tSb290KHZhbCkge1xuICAgICAgICAgICAgaWYgKF9jb21wb3Nlci52YWx1ZSkge1xuICAgICAgICAgICAgICAgIF9jb21wb3Nlci52YWx1ZS5mYWxsYmFja1Jvb3QgPSB2YWw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBmYWxsYmFja0Zvcm1hdCgpIHtcbiAgICAgICAgICAgIHJldHVybiBfY29tcG9zZXIudmFsdWUgPyBfY29tcG9zZXIudmFsdWUuZmFsbGJhY2tGb3JtYXQgOiBfZmFsbGJhY2tGb3JtYXQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldCBmYWxsYmFja0Zvcm1hdCh2YWwpIHtcbiAgICAgICAgICAgIGlmIChfY29tcG9zZXIudmFsdWUpIHtcbiAgICAgICAgICAgICAgICBfY29tcG9zZXIudmFsdWUuZmFsbGJhY2tGb3JtYXQgPSB2YWw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGdldCB3YXJuSHRtbE1lc3NhZ2UoKSB7XG4gICAgICAgICAgICByZXR1cm4gX2NvbXBvc2VyLnZhbHVlXG4gICAgICAgICAgICAgICAgPyBfY29tcG9zZXIudmFsdWUud2Fybkh0bWxNZXNzYWdlXG4gICAgICAgICAgICAgICAgOiBfd2Fybkh0bWxNZXNzYWdlO1xuICAgICA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gICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbiAgICAgICAgICAgICAgICBzZXQodmFsKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlc2MudmFsdWUudmFsdWUgPSB2YWw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgOiB7XG4gICAgICAgICAgICAgICAgZ2V0KCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVzYy5nZXQgJiYgZGVzYy5nZXQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoaTE4biwgcHJvcCwgd3JhcCk7XG4gICAgfSk7XG4gICAgYXBwLmNvbmZpZy5nbG9iYWxQcm9wZXJ0aWVzLiRpMThuID0gaTE4bjtcbiAgICBnbG9iYWxFeHBvcnRNZXRob2RzLmZvckVhY2gobWV0aG9kID0+IHtcbiAgICAgICAgY29uc3QgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoY29tcG9zZXIsIG1ldGhvZCk7XG4gICAgICAgIGlmICghZGVzYyB8fCAhZGVzYy52YWx1ZSkge1xuICAgICAgICAgICAgdGhyb3cgY3JlYXRlSTE4bkVycm9yKEkxOG5FcnJvckNvZGVzLlVORVhQRUNURURfRVJST1IpO1xuICAgICAgICB9XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShhcHAuY29uZmlnLmdsb2JhbFByb3BlcnRpZXMsIGAkJHttZXRob2R9YCwgZGVzYyk7XG4gICAgfSk7XG4gICAgY29uc3QgZGlzcG9zZSA9ICgpID0+IHtcbiAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbiAgICAgICAgZGVsZXRlIGFw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nbXNTYXZlT3JPcGVuQmxvYicgaW4gX25hdmlnYXRvclxuICAgICAgICAgICAgICAgICAgICA/IG1zU2F2ZUFzXG4gICAgICAgICAgICAgICAgICAgIDogLy8gRmFsbGJhY2sgdG8gdXNpbmcgRmlsZVJlYWRlciBhbmQgYSBwb3B1cFxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZVNhdmVyU2F2ZUFzO1xuZnVuY3Rpb24gZG93bmxvYWRTYXZlQXMoYmxvYiwgbmFtZSA9ICdkb3dubG9hZCcsIG9wdHMpIHtcbiAgICBjb25zdCBhID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYScpO1xuICAgIGEuZG93bmxvYWQgPSBuYW1lO1xuICAgIGEucmVsID0gJ25vb3BlbmVyJzsgLy8gdGFibmFiYmluZ1xuICAgIC8vIFRPRE86IGRldGVjdCBjaHJvbWUgZXh0ZW5zaW9ucyAmIHBhY2thZ2VkIGFwcHNcbiAgICAvLyBhLnRhcmdldCA9ICdfYmxhbmsnXG4gICAgaWYgKHR5cGVvZiBibG9iID09PSAnc3RyaW5nJykge1xuICAgICAgICAvLyBTdXBwb3J0IHJlZ3VsYXIgbGlua3NcbiAgICAgICAgYS5ocmVmID0gYmxvYjtcbiAgICAgICAgaWYgKGEub3JpZ2luICE9PSBsb2NhdGlvbi5vcmlnaW4pIHtcbiAgICAgICAgICAgIGlmIChjb3JzRW5hYmxlZChhLmhyZWYpKSB7XG4gICAgICAgICAgICAgICAgZG93bmxvYWQoYmxvYiwgbmFtZSwgb3B0cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBhLnRhcmdldCA9ICdfYmxhbmsnO1xuICAgICAgICAgICAgICAgIGNsaWNrKGEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgY2xpY2soYSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZWxzZSB7XG4gICAgIC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9ubG9hZGVuZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGxldCB1cmwgPSByZWFkZXIucmVzdWx0O1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB1cmwgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgcG9wdXAgPSBudWxsO1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignV3JvbmcgcmVhZGVyLnJlc3VsdCB0eXBlJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB1cmwgPSBpc0Nocm9tZUlPU1xuICAgICAgICAgICAgICAgID8gdXJsXG4gICAgICAgICAgICAgICAgOiB1cmwucmVwbGFjZSgvXmRhdGE6W147XSo7LywgJ2RhdGE6YXR0YWNobWVudC9maWxlOycpO1xuICAgICAgICAgICAgaWYgKHBvcHVwKSB7XG4gICAgICAgICAgICAgICAgcG9wdXAubG9jYXRpb24uaHJlZiA9IHVybDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvY2F0aW9uLmFzc2lnbih1cmwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcG9wdXAgPSBudWxsOyAvLyByZXZlcnNlLXRhYm5hYmJpbmcgIzQ2MFxuICAgICAgICB9O1xuICAgICAgICByZWFkZXIucmVhZEFzRGF0YVVSTChibG9iKTtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIGNvbnN0IHVybCA9IFVSTC5jcmVhdGVPYmplY3RVUkwoYmxvYik7XG4gICAgICAgIGlmIChwb3B1cClcbiAgICAgICAgICAgIHBvcHVwLmxvY2F0aW9uLmFzc2lnbih1cmwpO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gdXJsO1xuICAgICAgICBwb3B1cCA9IG51bGw7IC8vIHJldmVyc2UtdGFibmFiYmluZyAjNDYwXG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1x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cmUuJGlkLFxuICAgICAgICB9O1xufVxuZnVuY3Rpb24gZm9ybWF0U3RvcmVGb3JJbnNwZWN0b3JTdGF0ZShzdG9yZSkge1xuICAgIGlmIChpc1BpbmlhKHN0b3JlKSkge1xuICAgICAgICBjb25zdCBzdG9yZU5hbWVzID0gQXJyYXkuZnJvbShzdG9yZS5fcy5rZXlzKCkpO1xuICAgICAgICBjb25zdCBzdG9yZU1hcCA9IHN0b3JlLl9zO1xuICAgICAgICBjb25zdCBzdGF0ZSA9IHtcbiAgICAgICAgICAgIHN0YXRlOiBzdG9yZU5hbWVzLm1hcCgoc3RvcmVJZCkgPT4gKHtcbiAgICAgICAgICAgICAgICBlZGl0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBrZXk6IHN0b3JlSWQsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHN0b3JlLnN0YXRlLnZhbHVlW3N0b3JlSWRdLFxuICAgICAgICAgICAgfSkpLFxuICAgICAgICAgICAgZ2V0dGVyczogc3RvcmVOYW1lc1xuICAgICAgICAgICAgICAgIC5maWx0ZXIoKGlkKSA9PiBzdG9yZU1hcC5nZXQoaWQpLl9nZXR0ZXJzKVxuICAgICAgICAgICAgICAgIC5tYXAoKGlkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3RvcmUgPSBzdG9yZU1hcC5nZXQoaWQpO1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGVkaXRhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAga2V5OiBpZCxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHN0b3JlLl9nZXR0ZXJzLnJlZHVjZSgoZ2V0dGVycywga2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZXR0ZXJzW2tleV0gPSBzdG9yZVtrZXldO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldHRlcnM7XG4gICAgICAgICAgICAgICAgICAg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ZlbnRzKVxuICAgICAgICByZXR1cm4ge307XG4gICAgaWYgKEFycmF5LmlzQXJyYXkoZXZlbnRzKSkge1xuICAgICAgICAvLyBUT0RPOiBoYW5kbGUgYWRkIGFuZCBkZWxldGUgZm9yIGFycmF5cyBhbmQgb2JqZWN0c1xuICAgICAgICByZXR1cm4gZXZlbnRzLnJlZHVjZSgoZGF0YSwgZXZlbnQpID0+IHtcbiAgICAgICAgICAgIGRhdGEua2V5cy5wdXNoKGV2ZW50LmtleSk7XG4gICAgICAgICAgICBkYXRhLm9wZXJhdGlvbnMucHVzaChldmVudC50eXBlKTtcbiAgICAgICAgICAgIGRhdGEub2xkVmFsdWVbZXZlbnQua2V5XSA9IGV2ZW50Lm9sZFZhbHVlO1xuICAgICAgICAgICAgZGF0YS5uZXdWYWx1ZVtldmVudC5rZXldID0gZXZlbnQubmV3VmFsdWU7XG4gICAgICAgICAgICByZXR1cm4gZGF0YTtcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgb2xkVmFsdWU6IHt9LFxuICAgICAgICAgICAga2V5czogW10sXG4gICAgICAgICAgICBvcGVyYXRpb25zOiBbXSxcbiAgICAgICAgICAgIG5ld1ZhbHVlOiB7fSxcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgb3BlcmF0aW9uOiBmb3JtYXREaXNwbGF5KGV2ZW50cy50eXBlKSxcbiAgICAgICAgICAgIGtleTogZm9ybWF0RGlzcGxheShldmVudHMua2V5KSxcbiAgICAgICAgICAgIG9sZFZhbHVlOiBldmVudHMub2xkVmFsdWUsXG4gICAgICAgICAgICBuZXdWYWx1ZTogZXZlbnRzLm5ld1ZhbHVlLFxuICAgICAgICB9O1xuICAgIH1cbn1cbmZ1bmN0aW9uIGZvcm1hdE11dGF0aW9uVHlwZSh0eXBlKSB7XG4gICAgc3dpdGNoICh0eXBlKSB7XG4gICAgICAgIGNhc2UgTXV0YXRpb25UeXBlLmRp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SW5zcGVjdG9yKHtcbiAgICAgICAgICAgIGlkOiBJTlNQRUNUT1JfSUQsXG4gICAgICAgICAgICBsYWJlbDogJ1BpbmlhIPCfjY0nLFxuICAgICAgICAgICAgaWNvbjogJ3N0b3JhZ2UnLFxuICAgICAgICAgICAgdHJlZUZpbHRlclBsYWNlaG9sZGVyOiAnU2VhcmNoIHN0b3JlcycsXG4gICAgICAgICAgICBhY3Rpb25zOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBpY29uOiAnY29udGVudF9jb3B5JyxcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb25HbG9iYWxDb3B5U3RhdGUocGluaWEpO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwOiAnU2VyaWFsaXplIGFuZCBjb3B5IHRoZSBzdGF0ZScsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGljb246ICdjb250ZW50X3Bhc3RlJyxcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiBhc3luYyAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCBhY3Rpb25HbG9iYWxQYXN0ZVN0YXRlKHBpbmlhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwaS5zZW5kSW5zcGVjdG9yVHJlZShJTlNQRUNUT1JfSUQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBpLnNlbmRJbnNwZWN0b3JTdGF0ZShJTlNQRUNUT1JfSUQpO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwOiAnUmVwbGFjZSB0aGUgc3RhdGUgd2l0aCB0aGUgY29udGVudCBvZiB5b3VyIGNsaXBib2FyZCcsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGljb246ICdzYXZlJyxcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb25HbG9iYWxTYXZlU3RhdGUocGluaWEpO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwOiAnU2F2ZSB0aGUgc3RhdGUgYXMgYSBKU09OIGZpbGUnLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBpY29uOiAnZm9sZGVyX29wZW4nLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb246IGFzeW5jICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IGFjdGlvbkdsb2JhbE9wZW5TdGF0ZUZpbGUocGluaWEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBpLnNlbmRJbnNwZWN0b3JUcmVlKElOU1BFQ1RPUl9JRCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcGkuc2VuZEluc3BlY3RvclN0YXRlKElOU1BFQ1RPUl9JRCk7XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHRvb2x0aXA6ICdJbXBvcnQgdGhlIHN0YXRlIGZyb20gYSBKU09OIGZpbGUnLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgbm9kZUFjdGlvbnM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGljb246ICdyZXN0b3JlJyxcbiAgICAgICAgICAgICAgICAgICAgdG9vbHRpcDogJ1Jlc2V0IHRoZSBzdGF0ZSAod2l0aCBcIiRyZXNldFwiKScsXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbjogKG5vZGVJZCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RvcmUgPSBwaW5pYS5fcy5nZXQobm9kZUlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc3RvcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdE1lc3NhZ2UoYENhbm5vdCByZXNldCBcIiR7bm9kZUlkfVwiIHN0b3JlIGJlY2F1c2UgaXQgd2Fzbid0IGZvdW5kLmAsICd3YXJuJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0eXBlb2Ygc3RvcmUuJHJlc2V0ICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3RNZXNzYWdlKGBDYW5ub3QgcmVzZXQgXCIke25vZGVJZH1cIiBzdG9yZSBiZWNhdXNlIGl0IGRvZXNuJ3QgaGF2ZSBhIFwiJHJlc2V0XCIgbWV0aG9kIGltcGxlbWVudGVkLmAsICd3YXJuJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdG9yZS4kcmVzZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdE1lc3NhZ2UoYFN0b3JlIFwiJHtub2RlSWR9XCIgcmVzZXQuYCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgIH0pO1xuICAgICAgICBhcGkub24uaW5zcGVjdENvbXBvbmVudCgocGF5bG9hZCwgY3R4KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBwcm94eSA9IChwYXlsb2FkLmNvbXBvbmVudEluc3RhbmNlICYmXG4gICAgICAgICAgICAgICAgcGF5bG9hZC5jb21wb25lbnRJbnN0YW5jZS5wcm94eSk7XG4gICAgICAgICAgICBpZiAocHJveHkgJiYgcHJveHkuX3BTdG9yZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwaW5pYVN0b3JlcyA9IHBheWxvYWQuY29tcG9uZW50SW5zdGFuY2UucHJveHkuX3BTdG9yZXM7XG4gICAgICAgICAgICAgICAgT2JqZWN0LnZhbHVlcyhwaW5pYVN0b3JlcykuZm9yRWFjaCgoc3RvcmUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcGF5bG9hZC5pbnN0YW5jZURhdGEuc3RhdGUucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBnZXRTdG9yZVR5cGUoc3RvcmUuJGlkKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleTogJ3N0YXRlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHN0b3JlLl9pc09wdGlvbnNBUElcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2N1c3RvbToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHRvUmF3KHN0b3JlLiRzdGF0ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb25zOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAncmVzdG9yZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvb2x0aXA6ICdSZXNldCB0aGUgc3RhdGUgb2YgdGhpcyBzdG9yZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbjogKCkgPT4gc3RvcmUuJHJlc2V0KCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogLy8gTk9URTogd29ya2Fyb3VuZCB0byB1bndyYXAgdHJhbnNmZXJyZWQgcmVmc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhzdG9yZS4kc3RhdGUpLnJlZHVjZSgoc3RhdGUsIGtleSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVba2V5XSA9IHN0b3JlLiRzdGF0ZVtrZXldO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7fSksXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RvcmUuX2dldHRlcnMgJiYgc3RvcmUuX2dldHRlcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXlsb2FkLmluc3RhbmNlRGF0YS5zdGF0ZS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBnZXRTdG9yZVR5cGUoc3RvcmUuJGlkKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6ICdnZXR0ZXJzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlZGl0YWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHN0b3JlLl9nZXR0ZXJzLnJlZHVjZSgoZ2V0dGVycywga2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXR0ZXJzW2tleV0gPSBzdG9yZVtrZXldO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvcjogd2UganVzdCB3YW50IHRvIHNob3cgaXQgaW4gZGV2dG9vbHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldHRlcnNba2V5XSA9IGVycm9yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXR0ZXJzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHt9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBhcGkub24uZ2V0SW5zcGVjdG9yVHJlZSgocGF5bG9hZCkgPT4ge1xuICAgICAgICAgICAgaWYgKHBheWxvYWQuYXBwID09PSBhcHAgJiYgcGF5bG9hZC5pbnNwZWN0b3JJZCA9PT0gSU5TUEVDVE9SX0lEKSB7XG4gICAgICAgICAgICAgICAgbGV0IHN0b3JlcyA9IFtwaW5pYV07XG4gICAgICAgICAgICAgICAgc3RvcmVzID0gc3RvcmVzLmNvbmNhdChBcnJheS5mcm9tKHBpbmlhLl9zLnZhbHVlcygpKSk7XG4gICAgICAgICAgICAgICAgcGF5bG9hZC5yb290Tm9kZXMgPSAocGF5bG9hZC5maWx0ZXJcbiAgICAgICAgICAgICAgICAgICAgPyBzdG9yZXMuZmlsdGVyKChzdG9yZSkgPT4gJyRpZCcgaW4gc3RvcmVcbiAgICAgICAgICAgICAgICAgICAgICAgID8gc3RvcmUuJGlkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRvTG93ZXJDYXNlKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuaW5jbHVkZXMocGF5bG9hZC5maWx0ZXIudG9Mb3dlckNhc2UoKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIDogUElOSUFfUk9PVF9MQUJFTC50b0xvd2VyQ2FzZSgpLmluY2x1ZGVzKHBheWxvYWQuZmlsdGVyLnRvTG93ZXJDYXNlKCkpKVxuICAgICAgICAgICAgICAgICAgICA6IHN0b3JlcykubWFwKGZvcm1hdFN0b3JlRm9ySW5zcGVjdG9yVHJlZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICAvLyBFeHBvc2UgcGluaWEgaW5zdGFuY2UgYXMgJHBpbmlhIHRvIHdpbmRvd1xuICAgICAgICBnbG9iYWxUaGlzLiRwaW5pYSA9IHBpbmlhO1xuICAgICAgICBhcGkub24uZ2V0SW5zcGVjdG9yU3RhdGUoKHBheWxvYWQpID0+IHtcbiAgICAgICAgICAgIGlmIChwYXlsb2FkLmFwcCA9PT0gYXBwICYmIHBheWxvYWQuaW5zcGVjdG9ySWQgPT09IElOU1BFQ1RPUl9JRCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGluc3BlY3RlZFN0b3JlID0gcGF5bG9hZC5ub2RlSWQgPT09IFBJTklBX1JPT1RfSURcbiAgICAgICAgICAgICAgICAgICAgPyBwaW5pYVxuICAgICAgICAgICAgICAgICAgICA6IHBpbmlhLl9zLmdldChwYXlsb2FkLm5vZGVJZCk7XG4gICAgICAgICAgICAgICAgaWYgKCFpbnNwZWN0ZWRTdG9yZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGNvdWxkIGJlIHRoZSBzZWxlY3RlZCBzdG9yZSByZXN0b3JlZCBmb3IgYSBkaWZmZXJlbnQgcHJvamVjdFxuICAgICAgICAgICAgICAgICAgICAvLyBzbyBpdCdzIGJldHRlciBub3QgdG8gc2F5IGFueXRoaW5nIGhlcmVcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaW5zcGVjdGVkU3RvcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gRXhwb3NlIHNlbGVjdGVkIHN0b3JlIGFzICRzdG9yZSB0byB3aW5kb3dcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBheWxvYWQubm9kZUlkICE9PSBQSU5JQV9ST09UX0lEKVxuICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsVGhpcy4kc3RvcmUgPSB0b1JhdyhpbnNwZWN0ZWRTdG9yZSk7XG4gICAgICAgICAgICAgICAgICAgIHBheWxvYWQuc3RhdGUgPSBmb3JtYXRTdG9yZUZvckluc3BlY3RvclN0YXRlKGluc3BlY3RlZFN0b3JlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBhcGkub24uZWRpdEluc3BlY3RvclN0YXRlKChwYXlsb2FkLCBjdHgpID0+IHtcbiAgICAgICAgICAgIGlmIChwYXlsb2FkLmFwcCA9PT0gYXBwICYmIHBheWxvYWQuaW5zcGVjdG9ySWQgPT09IElOU1BFQ1RPUl9JRCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGluc3BlY3RlZFN0b3JlID0gcGF5bG9hZC5ub2RlSWQgPT09IFBJTklBX1JPT1RfSURcbiAgICAgICAgICAgICAgICAgICAgPyBwaW5pYVxuICAgICAgICAgICAgICAgICAgICA6IHBpbmlhLl9zLmdldChwYXlsb2FkLm5vZGVJZCk7XG4gICAgICAgICAgICAgICAgaWYgKCFpbnNwZWN0ZWRTdG9yZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9hc3RNZXNzYWdlKGBzdG9yZSBcIiR7cGF5bG9hZC5ub2RlSWR9XCIgbm90IGZvdW5kYCwgJ2Vycm9yJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHsgcGF0aCB9ID0gcGF5bG9hZDtcbiAgICAgICAgICAgICAgICBpZiAoIWlzUGluaWEoaW5zcGVjdGVkU3RvcmUpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGFjY2VzcyBvbmx5IHRoZSBzdGF0ZVxuICAgICAgICAgICAgICAgICAgICBpZiAocGF0aC5sZW5ndGggIT09IDEgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICFpbnNwZWN0ZWRTdG9yZS5fY3VzdG9tUHJvcGVydGllcy5oYXMocGF0aFswXSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhbMF0gaW4gaW5zcGVjdGVkU3RvcmUuJHN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoLnVuc2hpZnQoJyRzdGF0ZScpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBSb290IGFjY2Vzcywgd2UgY2FuIG9taXQgdGhlIGAudmFsdWVgIGJlY2F1c2UgdGhlIGRldnRvb2xzIEFQSSBkb2VzIGl0IGZvciB1c1xuICAgICAgICAgICAgICAgICAgICBwYXRoLnVuc2hpZnQoJ3N0YXRlJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlzVGltZWxpbmVBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBwYXlsb2FkLnNldChpbnNwZWN0ZWRTdG9yZSwgcGF0aCwgcGF5bG9hZC5zdGF0ZS52YWx1ZSk7XG4gICAgICAgICAgICAgICAgaXNUaW1lbGluZUFjdGl2ZSA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBhcGkub24uZWRpdENvbXBvbmVudFN0YXRlKChwYXlsb2FkKSA9PiB7XG4gICAgICAgICAgICBpZiAocGF5bG9hZC50eXBlLnN0YXJ0c1dpdGgoJ/CfjY0nKSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0b3JlSWQgPSBwYXlsb2FkLnR5cGUucmVwbGFjZSgvXvCfjY1cXHMqLywgJycpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0b3JlID0gcGluaWEuX3MuZ2V0KHN0b3JlSWQpO1xuICAgICAgICAgICAgICAgIGlmICghc3RvcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRvYXN0TWVzc2FnZShgc3RvcmUgXCIke3N0b3JlSWR9XCIgbm90IGZvdW5kYCwgJ2Vycm9yJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHsgcGF0aCB9ID0gcGF5bG9hZDtcbiAgICAgICAgICAgICAgICBpZiAocGF0aFswXSAhPT0gJ3N0YXRlJykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9hc3RNZXNzYWdlKGBJbnZhbGlkIHBhdGggZm9yIHN0b3JlIFwiJHtzdG9yZUlkfVwiOlxcbiR7cGF0aH1cXG5Pbmx5IHN0YXRlIGNhbiBiZSBtb2RpZmllZC5gKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gcmV3cml0ZSB0aGUgZmlyc3QgZW50cnkgdG8gYmUgYWJsZSB0byBkaXJlY3RseSBzZXQgdGhlIHN0YXRlIGFzXG4gICAgICAgICAgICAgICAgLy8gd2VsbCBhcyBhbnkgb3RoZXIgcGF0aFxuICAgICAgICAgICAgICAgIHBhdGhbMF0gPSAnJHN0YXRlJztcbiAgICAgICAgICAgICAgICBpc1RpbWVsaW5lQWN0aXZlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcGF5bG9hZC5zZXQoc3RvcmUsIHBhdGgsIHBheWxvYWQuc3RhdGUudmFsdWUpO1xuICAgICAgICAgICAgICAgIGlzVGltZWxpbmVBY3RpdmUgPSB0cnVlO1xuICAgICAgICAgICAgfVxuIC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G4gICAgICAgIH0sXG4gICAgfSwgKGFwaSkgPT4ge1xuICAgICAgICAvLyBncmFjZWZ1bGx5IGhhbmRsZSBlcnJvcnNcbiAgICAgICAgY29uc3Qgbm93ID0gdHlwZW9mIGFwaS5ub3cgPT09ICdmdW5jdGlvbicgPyBhcGkubm93LmJpbmQoYXBpKSA6IERhdGUubm93O1xuICAgICAgICBzdG9yZS4kb25BY3Rpb24oKHsgYWZ0ZXIsIG9uRXJyb3IsIG5hbWUsIGFyZ3MgfSkgPT4ge1xuICAgICAgICAgICAgY29uc3QgZ3JvdXBJZCA9IHJ1bm5pbmdBY3Rpb25JZCsrO1xuICAgICAgICAgICAgYXBpLmFkZFRpbWVsaW5lRXZlbnQoe1xuICAgICAgICAgICAgICAgIGxheWVySWQ6IE1VVEFUSU9OU19MQVlFUl9JRCxcbiAgICAgICAgICAgICAgICBldmVudDoge1xuICAgICAgICAgICAgICAgICAgICB0aW1lOiBub3coKSxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfwn5urICcgKyBuYW1lLFxuICAgICAgICAgICAgICAgICAgICBzdWJ0aXRsZTogJ3N0YXJ0JyxcbiAgICAgICAgICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmU6IGZvcm1hdERpc3BsYXkoc3RvcmUuJGlkKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbjogZm9ybWF0RGlzcGxheShuYW1lKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3MsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGdyb3VwSWQsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgYWZ0ZXIoKHJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgIGFjdGl2ZUFjdGlvbiA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBhcGkuYWRkVGltZWxpbmVFdmVudCh7XG4gICAgICAgICAgICAgICAgICAgIGxheWVySWQ6IE1VVEFUSU9OU19MQVlFUl9JRCxcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbWU6IG5vdygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfwn5usICcgKyBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3VidGl0bGU6ICdlbmQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JlOiBmb3JtYXREaXNwbGF5KHN0b3JlLiRpZCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiBmb3JtYXREaXNwbGF5KG5hbWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwSWQsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIG9uRXJyb3IoKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgYWN0aXZlQWN0aW9uID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGFwaS5hZGRUaW1lbGluZUV2ZW50KHtcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXJJZDogTVVUQVRJT05TX0xBWUVSX0lELFxuICAgICAgICAgICAgICAgICAgICBldmVudDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGltZTogbm93KCksXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dUeXBlOiAnZXJyb3InLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfwn5KlICcgKyBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3VidGl0bGU6ICdlbmQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JlOiBmb3JtYXREaXNwbGF5KHN0b3JlLiRpZCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiBmb3JtYXREaXNwbGF5KG5hbWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IsXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXBJZCxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LCB0cnVlKTtcbiAgICAgICAgc3RvcmUuX2N1c3RvbVByb3BlcnRpZXMuZm9yRWFjaCgobmFtZSkgPT4ge1xuICAgICAgICAgICAgd2F0Y2goKCkgPT4gdW5yZWYoc3RvcmVbbmFtZV0pLCAobmV3VmFsdWUsIG9sZFZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgYXBpLm5vdGlmeUNvbXBvbmVudFVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgIGFwaS5zZW5kSW5zcGVjdG9yU3RhdGUoSU5TUEVDVE9SX0lEKTtcbiAgICAgICAgICAgICAgICBpZiAoaXNUaW1lbGluZUFjdGl2ZSkge1xuICAgICAgICAgICAgICAgICAgICBhcGkuYWRkVGltZWxpbmVFdmVudCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXllcklkOiBNVVRBVElPTlNfTEFZRVJfSUQsXG4gICAgICAgICAgICAgICAgICAgICAgICBldmVudDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWU6IG5vdygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnQ2hhbmdlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJ0aXRsZTogbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGRWYWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwSWQ6IGFjdGl2ZUFjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIHsgZGVlcDogdHJ1ZSB9KTtcbiAgICAgICAgfSk7XG4gICAgICAgIHN0b3JlLiRzdWJzY3JpYmUoKHsgZXZlbnRzLCB0eXBlIH0sIHN0YXRlKSA9PiB7XG4gICAgICAgICAgICBhcGkubm90aWZ5Q29tcG9uZW50VXBkYXRlKCk7XG4gICAgICAgICAgICBhcGkuc2VuZEluc3BlY3RvclN0YXRlKElOU1BFQ1RPUl9JRCk7XG4gICAgICAgICAgICBpZiAoIWlzVGltZWxpbmVBY3RpdmUpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgLy8gcm9vdFN0b3JlLnN0YXRlW3N0b3JlLmlkXSA9IHN0YXRlXG4gICAgICAgICAgICBjb25zdCBldmVudERhdGEgPSB7XG4gICAgICAgICAgICAgICAgdGltZTogbm93KCksXG4gICAgICAgICAgICAgICAgdGl0bGU6IGZvcm1hdE11dGF0aW9uVHlwZSh0eXBlKSxcbiAgICAgICAgICAgICAgICBkYXRhOiBhc3NpZ24kMSh7IHN0b3JlOiBmb3JtYXREaXNwbGF5KHN0b3JlLiRpZCkgfSwgZm9ybWF0RXZlbnREYXRhKGV2ZW50cykpLFxuICAgICAgICAgICAgICAgIGdyb3VwSWQ6IGFjdGl2ZUFjdGlvbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gTXV0YXRpb25UeXBlLnBhdGNoRnVuY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBldmVudERhdGEuc3VidGl0bGUgPSAn4qS177iPJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT09IE11dGF0aW9uVHlwZS5wYXRjaE9iamVjdCkge1xuICAgICAgICAgICAgICAgIGV2ZW50RGF0YS5zdWJ0aXRsZSA9ICfwn6epJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGV2ZW50cyAmJiAhQXJyYXkuaXNBcnJheShldmVudHMpKSB7XG4gICAgICAgICAgICAgICAgZXZlbnREYXRhLnN1YnRpdGxlID0gZXZlbnRzLnR5cGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXZlbnRzKSB7XG4gICAgICAgICAgICAgICAgZXZlbnREYXRhLmRhdGFbJ3Jhd0V2ZW50KHMpJ10gPSB7XG4gICAgICAgICAgICAgICAgICAgIF9jdXN0b206IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdEZWJ1Z2dlckV2ZW50JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG9vbHRpcDogJ3JhdyBEZWJ1Z2dlckV2ZW50W10nLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGV2ZW50cyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYXBpLmFkZFRpbWVsaW5lRXZlbnQoe1xuICAgICAgICAgICAgICAgIGxheWVySWQ6IE1VVEFUSU9OU19MQVlFUl9JRCxcbiAgICAgICAgICAgICAgICBldmVudDogZXZlbnREYXRhLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sIHsgZGV0YWNoZWQ6IHRydWUsIGZsdXNoOiAnc3luYycgfSk7XG4gICAgICAgIGNvbnN0IGhvdFVwZGF0ZSA9IHN0b3JlLl9ob3RVcGRhdGU7XG4gICAgICAgIHN0b3JlLl9ob3RVcGRhdGUgPSBtYXJrUmF3KChuZXdTdG9yZSkgPT4ge1xuICAgICAgICAgICAgaG90VXBkYXRlKG5ld1N0b3JlKTtcbiAgICAgICAgICAgIGFwaS5hZGRUaW1lbGluZUV2ZW50KHtcbiAgICAgICAgICAgICAgICBsYXllcklkOiBNVVRBVElPTlNfTEFZRVJfSUQsXG4gICAgICAgICAgICAgICAgZXZlbnQ6IHtcbiAgICAgICAgICAgICAgICAgICAgdGltZTogbm93KCksXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn8J+UpSAnICsgc3RvcmUuJGlkLFxuICAgICAgICAgICAgICAgICAgICBzdWJ0aXRsZTogJ0hNUiB1cGRhdGUnLFxuICAgICAgICAgICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yZTogZm9ybWF0RGlzcGxheShzdG9yZS4kaWQpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5mbzogZm9ybWF0RGlzcGxheShgSE1SIHVwZGF0ZWApLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIC8vIHVwZGF0ZSB0aGUgZGV2dG9vbHMgdG9vXG4gICAgICAgICAgICBhcGkubm90aWZ5Q29tcG9uZW50VXBkYXRlKCk7XG4gICAgICAgICAgICBhcGkuc2VuZEluc3BlY3RvclRyZWUoSU5TUEVDVE9SX0lEKTtcbiAgICAgICAgICAgIGFwaS5zZW5kSW5zcGVjdG9yU3RhdGUoSU5TUEVDVE9SX0lEKTtcbiAgICAgICAgfSk7XG4gICAgICAgIGNvbnN0IHsgJGRpc3Bvc2UgfSA9IHN0b3JlO1xuICAgICAgICBzdG9y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uc3QgX2FjdGlvbklkID0gcnVubmluZ0FjdGlvbklkO1xuICAgICAgICAgICAgY29uc3QgdHJhY2tlZFN0b3JlID0gd3JhcFdpdGhQcm94eVxuICAgICAgICAgICAgICAgID8gbmV3IFByb3h5KHN0b3JlLCB7XG4gICAgICAgICAgICAgICAgICAgIGdldCguLi5hcmdzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVBY3Rpb24gPSBfYWN0aW9uSWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmVmbGVjdC5nZXQoLi4uYXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHNldCguLi5hcmdzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVBY3Rpb24gPSBfYWN0aW9uSWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmVmbGVjdC5zZXQoLi4uYXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICA6IHN0b3JlO1xuICAgICAgICAgICAgLy8gRm9yIFNldHVwIFN0b3JlcyB3ZSBuZWVkIGh0dHBzOi8vZ2l0aHViLmNvbS90YzM5L3Byb3Bvc2FsLWFzeW5jLWNvbnRleHRcbiAgICAgICAgICAgIGFjdGl2ZUFjdGlvbiA9IF9hY3Rpb25JZDtcbiAgICAgICAgICAgIGNvbnN0IHJldFZhbHVlID0gYWN0aW9uc1thY3Rpb25OYW1lXS5hcHBseSh0cmFja2VkU3RvcmUsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAvLyB0aGlzIGlzIHNhZmVyIGFzIGFzeW5jIGFjdGlvbnMgaW4gU2V0dXAgU3RvcmVzIHdvdWxkIGFzc29jaWF0ZSBtdXRhdGlvbnMgZG9uZSBvdXRzaWRlIG9mIHRoZSBhY3Rpb25cbiAgICAgICAgICAgIGFjdGl2ZUFjdGlvbiA9IHVuZG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gICAgIGlmICghaXNWdWUyKSB7XG4gICAgICAgICAgICAgICAgcGluaWEuX2EgPSBhcHA7XG4gICAgICAgICAgICAgICAgYXBwLnByb3ZpZGUocGluaWFTeW1ib2wsIHBpbmlhKTtcbiAgICAgICAgICAgICAgICBhcHAuY29uZmlnLmdsb2JhbFByb3BlcnRpZXMuJHBpbmlhID0gcGluaWE7XG4gICAgICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgICAgICAgICBpZiAoKCgocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJykgfHwgKHR5cGVvZiBfX1ZVRV9QUk9EX0RFVlRPT0xTX18gIT09ICd1bmRlZmluZWQnICYmIF9fVlVFX1BST0RfREVWVE9PTFNfXykpICYmICEocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICd0ZXN0JykpICYmIElTX0NMSUVOVCkge1xuICAgICAgICAgICAgICAgICAgICByZWdpc3RlclBpbmlhRGV2dG9vbHMoYXBwLCBwaW5pYSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRvQmVJbnN0YWxsZWQuZm9yRWFjaCgocGx1Z2luKSA9PiBfcC5wdXNoKHBsdWdpbikpO1xuICAgICAgICAgICAgICAgIHRvQmVJbnN0YWxsZWQgPSBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgdXNlKHBsdWdpbikge1xuICAgICAgICAgICAgaWYgKCF0aGlzLl9hICYmICFpc1Z1ZTIpIHtcbiAgICAgICAgICAgICAgICB0b0JlSW5zdGFsbGVkLnB1c2gocGx1Z2luKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIF9wLnB1c2gocGx1Z2luKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuICAgICAgICBfcCxcbiAgICAgICAg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IXBpbmlhKSB7XG4gICAgICAgICAgICAvLyB0aGlzIHN0b3JlIGlzIHN0aWxsIG5vdCB1c2VkXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgLy8gcHJlc2VydmUgdGhlIHBpbmlhIGluc3RhbmNlIGFjcm9zcyBsb2Fkc1xuICAgICAgICBob3QuZGF0YS5waW5pYSA9IHBpbmlhO1xuICAgICAgICAvLyBjb25zb2xlLmxvZygnZ290IGRhdGEnLCBuZXdTdG9yZSlcbiAgICAgICAgZm9yIChjb25zdCBleHBvcnROYW1lIGluIG5ld01vZHVsZSkge1xuICAgICAgICAgICAgY29uc3QgdXNlU3RvcmUgPSBuZXdNb2R1bGVbZXhwb3J0TmFtZV07XG4gICAgICAgICAgICAvLyBjb25zb2xlLmxvZygnY2hlY2tpbmcgZm9yJywgZXhwb3J0TmFtZSlcbiAgICAgICAgICAgIGlmIChpc1VzZVN0b3JlKHVzZVN0b3JlKSAmJiBwaW5pYS5fcy5oYXModXNlU3RvcmUuJGlkKSkge1xuICAgICAgICAgICAgICAgIC8vIGNvbnNvbGUubG9nKCdBY2NlcHRpbmcgdXBkYXRlIGZvcicsIHVzZVN0b3JlLiRpZClcbiAgICAgICAgICAgICAgICBjb25zdCBpZCA9IHVzZVN0b3JlLiRpZDtcbiAgICAgICAgICAgICAgICBpZiAoaWQgIT09IGluaXRpYWxVc2VTdG9yZS4kaWQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKGBUaGUgaWQgb2YgdGhlIHN0b3JlIGNoYW5nZWQgZnJvbSBcIiR7aW5pdGlhbFVzZVN0b3JlLiRpZH1cIiB0byBcIiR7aWR9XCIuIFJlbG9hZGluZy5gKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuIGltcG9ydC5tZXRhLmhvdC5pbnZhbGlkYXRlKClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhvdC5pbnZhbGlkYXRlKCk7XG4gICAgICA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0gW107XG4gICAgICAgICAgICBmdW5jdGlvbiBhZnRlcihjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIGFmdGVyQ2FsbGJhY2tMaXN0LnB1c2goY2FsbGJhY2spO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gb25FcnJvcihjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIG9uRXJyb3JDYWxsYmFja0xpc3QucHVzaChjYWxsYmFjayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yXG4gICAgICAgICAgICB0cmlnZ2VyU3Vic2NyaXB0aW9ucyhhY3Rpb25TdWJzY3JpcHRpb25zLCB7XG4gICAgICAgICAgICAgICAgYXJncyxcbiAgICAgICAgICAgICAgICBuYW1lOiB3cmFwcGVkQWN0aW9uW0FDVElPTl9OQU1FXSxcbiAgICAgICAgICAgICAgICBzdG9yZSxcbiAgICAgICAgICAgICAgICBhZnRlcixcbiAgICAgICAgICAgICAgICBvbkVycm9yLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBsZXQgcmV0O1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICByZXQgPSBmbi5hcHBseSh0aGlzICYmIHRoaXMuJGlkID09PSAkaWQgPyB0aGlzIDogc3RvcmUsIGFyZ3MpO1xuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBzeW5jIGVycm9yc1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgdHJpZ2dlclN1YnNjcmlwdGlvbnMob25FcnJvckNhbGxiYWNrTGlzdCwgZXJyb3IpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHJldCBpbnN0YW5jZW9mIFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0XG4gICAgICAgICAgICAgICAgIC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sb2FkID0gLyojX19QVVJFX18qLyBtYXJrUmF3KHtcbiAgICAgICAgYWN0aW9uczoge30sXG4gICAgICAgIGdldHRlcnM6IHt9LFxuICAgICAgICBzdGF0ZTogW10sXG4gICAgICAgIGhvdFN0YXRlLFxuICAgIH0pO1xuICAgIGNvbnN0IHBhcnRpYWxTdG9yZSA9IHtcbiAgICAgICAgX3A6IHBpbmlhLFxuICAgICAgICAvLyBfczogc2NvcGUsXG4gICAgICAgICRpZCxcbiAgICAgICAgJG9uQWN0aW9uOiBhZGRTdWJzY3JpcHRpb24uYmluZChudWxsLCBhY3Rpb25TdWJzY3JpcHRpb25zKSxcbiAgICAgICAgJHBhdGNoLFxuICAgICAgICAkcmVzZXQsXG4gICAgICAgICRzdWJzY3JpYmUoY2FsbGJhY2ssIG9wdGlvbnMgPSB7fSkge1xuICAgICAgICAgICAgY29uc3QgcmVtb3ZlU3Vic2NyaXB0aW9uID0gYWRkU3Vic2NyaXB0aW9uKHN1YnNjcmlwdGlvbnMsIGNhbGxiYWNrLCBvcHRpb25zLmRldGFjaGVkLCAoKSA9PiBzdG9wV2F0Y2hlcigpKTtcbiAgICAgICAgICAgIGNvbnN0IHN0b3BXYXRjaGVyID0gc2NvcGUucnVuKCgpID0+IHdhdGNoKCgpID0+IHBpbmlhLnN0YXRlLnZhbHVlWyRpZF0sIChzdGF0ZSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmZsdXNoID09PSAnc3luYycgPyBpc1N5bmNMaXN0ZW5pbmcgOiBpc0xpc3RlbmluZykge1xuICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayh7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yZUlkOiAkaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBNdXRhdGlvblR5cGUuZGlyZWN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRzOiBkZWJ1Z2dlckV2ZW50cyxcbiAgICAgICAgICAgICAgICAgICAgfS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XksIHRvUmVmKHNldHVwU3RvcmUsIGtleSkpO1xuICAgICAgICAgICAgICAgIC8vIGNyZWF0ZU9wdGlvblN0b3JlIGRpcmVjdGx5IHNldHMgdGhlIHN0YXRlIGluIHBpbmlhLnN0YXRlLnZhbHVlIHNvIHdlXG4gICAgICAgICAgICAgICAgLy8gY2FuIGp1c3Qgc2tpcCB0aGF0XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICghaXNPcHRpb25zU3RvcmUpIHtcbiAgICAgICAgICAgICAgICAvLyBpbiBzZXR1cCBzdG9yZXMgd2UgbXVzdCBoeWRyYXRlIHRoZSBzdGF0ZSBhbmQgc3luYyBwaW5pYSBzdGF0ZSB0cmVlIHdpdGggdGhlIHJlZnMgdGhlIHVzZXIganVzdCBjcmVhdGVkXG4gICAgICAgICAgICAgICAgaWYgKGluaXRpYWxTdGF0ZSAmJiBzaG91bGRIeWRyYXRlKHByb3ApKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc1JlZihwcm9wKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcC52YWx1ZSA9IGluaXRpYWxTdGF0ZVtrZXldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHJvYmFibHkgYSByZWFjdGl2ZSBvYmplY3QsIGxldHMgcmVjdXJzaXZlbHkgYXNzaWduXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yOiBwcm9wIGlzIHVua25vd25cbiAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlUmVhY3RpdmVPYmplY3RzKHByb3AsIGluaXRpYWxTdGF0ZVtrZXldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyB0cmFuc2ZlciB0aGUgcmVmIHRvIHRoZSBwaW5pYSBzdGF0ZSB0byBrZWVwIGV2ZXJ5dGhpbmcgaW4gc3luY1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICAgICAgICAgIGlmIChpc1Z1ZTIpIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0KHBpbmlhLnN0YXRlLnZhbHVlWyRpZF0sIGtleSwgcHJvcCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwaW5pYS5zdGF0ZS52YWx1ZVskaWRdW2tleV0gPSBwcm9wO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICBpZiAoKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpKSB7XG4gICAgICAgICAgICAgICAgX2htclBheWxvYWQuc3RhdGUucHVzaChrZXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gYWN0aW9uXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHByb3AgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIGNvbnN0IGFjdGlvblZhbHVlID0gKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpICYmIGhvdCA/IHByb3AgOiBhY3Rpb24ocHJvcCwga2V5KTtcbiAgICAgICAgICAgIC8vIHRoaXMgYSBob3QgbW9kdWxlIHJlcGxhY2VtZW50IHN0b3JlIGJlY2F1c2UgdGhlIGhvdFVwZGF0ZSBtZXRob2QgbmVlZHNcbiAgICAgICAgICAgIC8vIHRvIGRvIGl0IHdpdGggdGhlIHJpZ2h0IGNvbnRleHRcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICAgICAgaWYgKGlzVnVlMikge1xuICAgICAgICAgICAgICAgIHNldChzZXR1cFN0b3JlLCBrZXksIGFjdGlvblZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3JcbiAgICAgICAgICAgICAgICBzZXR1cFN0b3JlW2tleV0gPSBhY3Rpb25WYWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICBpZiAoKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpKSB7XG4gICAgICAgICAgICAgICAgX2htclBheWxvYWQuYWN0aW9uc1trZXldID0gcHJvcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGxpc3QgYWN0aW9ucyBzbyB0aGV5IGNhbiBiZSB1c2VkIGluIHBsdWdpbnNcbiAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3JcbiAgICAgICAgICAgIG9wdGlvbnNGb3JQbHVnaW4uYWN0aW9uc1trZXldID0gcHJvcDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICgocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJykpIHtcbiAgICAgICAgICAgIC8vIGFkZCBnZXR0ZXJzIGZvciBkZXZ0b29sc1xuICAgICAgICAgICAgaWYgKGlzQ29tcHV0ZWQocHJvcCkpIHtcbiAgICAgICAgICAgICAgICBfaG1yUGF5bG9hZC5nZXR0ZXJzW2tleV0gPSBpc09wdGlvbnNTdG9yZVxuICAgICAgICAgICAgICAgICAgICA/IC8vIEB0cy1leHBlY3QtZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZ2V0dGVyc1trZXldXG4gICAgICAgICAgICAgICAgICAgIDogcHJvcDtcbiAgICAgICAgICAgICAgICBpZiAoSVNfQ0xJRU5UKSB7XG4gICAgICA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RhdGUgPSBtYXJrUmF3KChuZXdTdG9yZSkgPT4ge1xuICAgICAgICAgICAgc3RvcmUuX2hvdFVwZGF0aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIG5ld1N0b3JlLl9obXJQYXlsb2FkLnN0YXRlLmZvckVhY2goKHN0YXRlS2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXRlS2V5IGluIHN0b3JlLiRzdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdTdGF0ZVRhcmdldCA9IG5ld1N0b3JlLiRzdGF0ZVtzdGF0ZUtleV07XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG9sZFN0YXRlU291cmNlID0gc3RvcmUuJHN0YXRlW3N0YXRlS2V5XTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBuZXdTdGF0ZVRhcmdldCA9PT0gJ29iamVjdCcgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzUGxhaW5PYmplY3QobmV3U3RhdGVUYXJnZXQpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBpc1BsYWluT2JqZWN0KG9sZFN0YXRlU291cmNlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGF0Y2hPYmplY3QobmV3U3RhdGVUYXJnZXQsIG9sZFN0YXRlU291cmNlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRyYW5zZmVyIHRoZSByZWZcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1N0b3JlLiRzdGF0ZVtzdGF0ZUtleV0gPSBvbGRTdGF0ZVNvdXJjZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBwYXRjaCBkaXJlY3QgYWNjZXNzIHByb3BlcnRpZXMgdG8gYWxsb3cgc3RvcmUuc3RhdGVQcm9wZX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XdTdG9yZVthY3Rpb25OYW1lXTtcbiAgICAgICAgICAgICAgICBzZXQoc3RvcmUsIGFjdGlvbk5hbWUsIGFjdGlvbihhY3Rpb25GbiwgYWN0aW9uTmFtZSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVE9ETzogZG9lcyB0aGlzIHdvcmsgaW4gYm90aCBzZXR1cCBhbmQgb3B0aW9uIHN0b3JlP1xuICAgICAgICAgICAgZm9yIChjb25zdCBnZXR0ZXJOYW1lIGluIG5ld1N0b3JlLl9obXJQYXlsb2FkLmdldHRlcnMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBnZXR0ZXIgPSBuZXdTdG9yZS5faG1yUGF5bG9hZC5nZXR0ZXJzW2dldHRlck5hbWVdO1xuICAgICAgICAgICAgICAgIGNvbnN0IGdldHRlclZhbHVlID0gaXNPcHRpb25zU3RvcmVcbiAgICAgICAgICAgICAgICAgICAgPyAvLyBzcGVjaWFsIGhhbmRsaW5nIG9mIG9wdGlvbnMgYXBpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlZCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0QWN0aXZlUGluaWEocGluaWEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXR0ZXIuY2FsbChzdG9yZSwgc3RvcmUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgOiBnZXR0ZXI7XG4gICAgICAgICAgICAgICAgc2V0KHN0b3JlLCBnZXR0ZXJOYW1lLCBnZXR0ZXJWYWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyByZW1vdmUgZGVsZXRlZCBnZXR0ZXJzXG4gICAgICAgICAgICBPYmplY3Qua2V5cyhzdG9yZS5faG1yUGF5bG9hZC5nZXR0ZXJzKS5mb3JFYWNoKChrZXkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIShrZXkgaW4g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AgICAgICAgICAgIHN0b3JlOiBzdG9yZSxcbiAgICAgICAgICAgICAgICBhcHA6IHBpbmlhLl9hLFxuICAgICAgICAgICAgICAgIHBpbmlhLFxuICAgICAgICAgICAgICAgIG9wdGlvbnM6IG9wdGlvbnNGb3JQbHVnaW4sXG4gICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICBPYmplY3Qua2V5cyhleHRlbnNpb25zIHx8IHt9KS5mb3JFYWNoKChrZXkpID0+IHN0b3JlLl9jdXN0b21Qcm9wZXJ0aWVzLmFkZChrZXkpKTtcbiAgICAgICAgICAgIGFzc2lnbihzdG9yZSwgZXh0ZW5zaW9ucyk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBhc3NpZ24oc3RvcmUsIHNjb3BlLnJ1bigoKSA9PiBleHRlbmRlcih7XG4gICAgICAgICAgICAgICAgc3RvcmU6IHN0b3JlLFxuICAgICAgICAgICAgICAgIGFwcDogcGluaWEuX2EsXG4gICAgICAgICAgICAgICAgcGluaWEsXG4gICAgICAgICAgICAgICAgb3B0aW9uczogb3B0aW9uc0ZvclBsdWdpbixcbiAgICAgICAgICAgIH0pKSk7XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBpZiAoKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpICYmXG4gICAgICAgIHN0b3JlLiRzdGF0ZSAmJlxuICAgICAgICB0eXBlb2Ygc3RvcmUuJHN0YXRlID09PSAnb2JqZWN0JyAmJlxuICAgICAgICB0eXBlb2Ygc3RvcmUuJHN0YXRlLmNvbnN0cnVjdG9yID09PSAnZnVuY3Rpb24nICYmXG4gICAgICAgICFzdG9yZS4kc3RhdGUuY29uc3RydWN0b3IudG9TdHJpbmcoKS5pbmNsdWRlcygnW25hdGl2ZSBjb2RlXScpKSB7XG4gICAgICAgIGNvbnNvbGUud2FybihgW/CfjY1dOiBUaGUgXCJzdGF0ZVwiIG11c3QgYmUgYSBwbGFpbiB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YgYSBjb21wb25lbnQuXG4gKlxuICogQHBhcmFtIHVzZVN0b3JlIC0gc3RvcmUgdG8gbWFwIGZyb21cbiAqIEBwYXJhbSBrZXlzT3JNYXBwZXIgLSBhcnJheSBvciBvYmplY3RcbiAqL1xuZnVuY3Rpb24gbWFwU3RhdGUodXNlU3RvcmUsIGtleXNPck1hcHBlcikge1xuICAgIHJldHVybiBBcnJheS5pc0FycmF5KGtleXNPck1hcHBlcilcbiAgICAgICAgPyBrZXlzT3JNYXBwZXIucmVkdWNlKChyZWR1Y2VkLCBrZXkpID0+IHtcbiAgICAgICAgICAgIHJlZHVjZWRba2V5XSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdXNlU3RvcmUodGhpcy4kcGluaWEpW2tleV07XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIHJlZHVjZWQ7XG4gICAgICAgIH0sIHt9KVxuICAgICAgICA6IE9iamVjdC5rZXlzKGtleXNPck1hcHBlcikucmVkdWNlKChyZWR1Y2VkLCBrZXkpID0+IHtcbiAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3JcbiAgICAgICAgICAgIHJlZHVjZWRba2V5XSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzdG9yZSA9IHVzZVN0b3JlKHRoaXMuJHBpbmlhKTtcbiAgICAgICAgICAgICAgICBjb25zdCBzdG9yZUtleSA9IGtleXNPck1hcHBlcltrZXldO1xuICAgICAgICAgICAgICAgIC8vIGZvciBzb21lIHJlYXNvbiBUUyBpcyB1bmFibGUgdG8gaW5mZXIgdGhlIHR5cGUgb2Ygc3RvcmVLZXkgdG8gYmUgYVxuICAgICAgICAgICAgICAgIC8vIGZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBzdG9yZUtleSA9PT0gJ2Z1bmN0aW9uJ1xuICAgICAgICAgICAgICAgICAgICA/IHN0b3JlS2V5L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AgICA/IGtleXNPck1hcHBlci5yZWR1Y2UoKHJlZHVjZWQsIGtleSkgPT4ge1xuICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgcmVkdWNlZFtrZXldID0ge1xuICAgICAgICAgICAgICAgIGdldCgpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvcjogRklYTUU6IHNob3VsZCB3b3JrP1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXNlU3RvcmUodGhpcy4kcGluaWEpW2tleV07XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBzZXQodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvcjogRklYTUU6IHNob3VsZCB3b3JrP1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKHVzZVN0b3JlKHRoaXMuJHBpbmlhKVtrZXldID0gdmFsdWUpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIHJlZHVjZWQ7XG4gICAgICAgIH0sIHt9KVxuICAgICAgICA6IE9iamVjdC5rZXlzKGtleXNPck1hcHBlcikucmVkdWNlKChyZWR1Y2VkLCBrZXkpID0+IHtcbiAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgIHJlZHVjZWRba2V5XSA9IHtcbiAgICAgICAgICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3I6IEZJWE1FOiBzaG91bGQgd29yaz9cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVzZVN0b3JlKHRoaXMuJHBpbmlhKVtrZXlzT3JNYXBwZXJba2V5XV07XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBzZXQodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvcj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H1cbiAgICAgICAgICAgICAgICB0aGlzLl9wcm92aWRlZFtwaW5pYVN5bWJvbF0gPSBwaW5pYTtcbiAgICAgICAgICAgICAgICAvLyBwcm9wYWdhdGUgdGhlIHBpbmlhIGluc3RhbmNlIGluIGFuIFNTUiBmcmllbmRseSB3YXlcbiAgICAgICAgICAgICAgICAvLyBhdm9pZCBhZGRpbmcgaXQgdG8gbnV4dCB0d2ljZVxuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLiRwaW5pYSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLiRwaW5pYSA9IHBpbmlhO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwaW5pYS5fYSA9IHRoaXM7XG4gICAgICAgICAgICAgICAgaWYgKElTX0NMSUVOVCkge1xuICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGFsbG93cyBjYWxsaW5nIHVzZVN0b3JlKCkgb3V0c2lkZSBvZiBhIGNvbXBvbmVudCBzZXR1cCBhZnRlclxuICAgICAgICAgICAgICAgICAgICAvLyBpbnN0YWxsaW5nIHBpbmlhJ3MgcGx1Z2luXG4gICAgICAgICAgICAgICAgICAgIHNldEFjdGl2ZVBpbmlhKHBpbmlhKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCgoKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHx8ICh0eXBlb2YgX19WVUVfUFJPRF9ERVZUT09MU19fICE9PSAndW5kZWZpbmVkJyAmJiBfX1ZVRV9QUk9EX0RFVlRPT0xTX18pKSAmJiAhKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAndGVzdCcpKSAmJiBJU19DTElFTlQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJQaW5pYURldnRvb2xzKHBpbmlhLl9hLCBwaW5pYSk7XG4gICAgIC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cInZpZXctY2xhc3NcIjogdW5yZWYobnMpLmJlKFwic3Bpbm5lclwiLCBcImxpc3RcIiksXG4gICAgICAgICAgICBub3Jlc2l6ZTogXCJcIixcbiAgICAgICAgICAgIHRhZzogXCJ1bFwiLFxuICAgICAgICAgICAgb25Nb3VzZWVudGVyOiAoJGV2ZW50KSA9PiBlbWl0U2VsZWN0UmFuZ2UoaXRlbSksXG4gICAgICAgICAgICBvbk1vdXNlbW92ZTogKCRldmVudCkgPT4gYWRqdXN0Q3VycmVudFNwaW5uZXIoaXRlbSlcbiAgICAgICAgICB9LCB7XG4gICAgICAgICAgICBkZWZhdWx0OiB3aXRoQ3R4KCgpID0+IFtcbiAgICAgICAgICAgICAgKG9wZW5CbG9jayh0cnVlKSwgY3JlYXRlRWxlbWVudEJsb2NrKEZyYWdtZW50LCBudWxsLCByZW5kZXJMaXN0KHVucmVmKHRpbWVMaXN0KVtpdGVtXSwgKGRpc2FibGVkLCBrZXkpID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gb3BlbkJsb2NrKCksIGNyZWF0ZUVsZW1lbnRCbG9jayhcImxpXCIsIHtcbiAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICAgIGNsYXNzOiBub3JtYWxpemVDbGFzcyhbXG4gICAgICAgICAgICAgICAgICAgIHVucmVmKG5zKS5iZShcInNwaW5uZXJcIiwgXCJpdGVtXCIpLFxuICAgICAgICAgICAgICAgICAgICB1bnJlZihucykuaXMoXCJhY3RpdmVcIiwga2V5ID09PSB1bnJlZih0aW1lUGFydGlhbHMpW2l0ZW1dKSxcbiAgICAgICAgICAgICAgICAgICAgdW5yZWYobnMpLmlzKFwiZGlzYWJsZWRcIiwgZGlzYWJsZWQpXG4gICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6ICgkZXZlbnQpID0+IGhhbmRsZUNsaWNrKGl0ZW0sIHsgdmFsdWU6IGtleSwgZGlzYWJsZWQgfSl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gICAgICAgcmV0dXJuIG9wZW5CbG9jaygpLCBjcmVhdGVFbGVtZW50QmxvY2soXCJkaXZcIiwge1xuICAgICAgICAgICAga2V5OiBpdGVtLFxuICAgICAgICAgICAgY2xhc3M6IG5vcm1hbGl6ZUNsYXNzKFt1bnJlZihucykuYmUoXCJzcGlubmVyXCIsIFwid3JhcHBlclwiKSwgdW5yZWYobnMpLmlzKFwiYXJyb3dcIildKSxcbiAgICAgICAgICAgIG9uTW91c2VlbnRlcjogKCRldmVudCkgPT4gZW1pdFNlbGVjdFJhbmdlKGl0ZW0pXG4gICAgICAgICAgfSwgW1xuICAgICAgICAgICAgd2l0aERpcmVjdGl2ZXMoKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayh1bnJlZihFbEljb24pLCB7XG4gICAgICAgICAgICAgIGNsYXNzOiBub3JtYWxpemVDbGFzcyhbXCJhcnJvdy11cFwiLCB1bnJlZihucykuYmUoXCJzcGlubmVyXCIsIFwiYXJyb3dcIildKVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICBkZWZhdWx0OiB3aXRoQ3R4KCgpID0+IFtcbiAgICAgICAgICAgICAgICBjcmVhdGVWTm9kZSh1bnJlZihBcnJvd1VwKSlcbiAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgIH0sIDgsIFtcImNsYXNzXCJdKSksIFtcbiAgICAgICAgICAgICAgW3VucmVmKHZSZXBlYXRDbGljayksIG9uRGVjcmVtZW50XVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICB3aXRoRGlyZWN0aXZlcygob3BlbkJsb2NrKCksIGNyZWF0ZUJsb2NrKHVucmVmKEVsSWNvbiksIHtcbiAgICAgICAgICAgICAgY2xhc3M6IG5vcm1hbGl6ZUNsYXNzKFtcImFycm93LWRvd25cIiwgdW5yZWYobnMpLmJlKFwic3Bpbm5lclwiLCBcImFycm93XCIpXSlcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgZGVmYXVsdDogd2l0aEN0eCgoKSA9PiBbXG4gICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUodW5yZWYoQXJyb3dEb3duKSlcbiAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgIH0sIDgsIFtcImNsYXNzXCJdKSksIFtcbiAgICAgICAgICAgICAgW3VucmVmKHZSZXBlYXRDbGljayksIG9uSW5jcmVtZW50XVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBjcmVhdGVFbGVtZW50Vk5vZGUoXCJ1bFwiLCB7XG4gICAgICAgICAgICAgIGNsYXNzOiBub3JtYWxpemVDbGFzcyh1bnJlZihucykuYmUoXCJzcGlubmVyXCIsIFwibGlzdFwiKSlcbiAgICAgICAgICAgIH0sIFtcbiAgICAgICAgICAgICAgKG9wZW5CbG9jayh0cnVlKSwgY3JlYXRlRWxlbWVudEJsb2NrKEZyYWdtZW50LCBudWxsLCByZW5kZXJMaXN0KHVucmVmKGFycm93Q29udHJvbFRpbWVMaXN0KVtpdGVtXSwgKHRpbWUsIGtleSkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBvcGVuQmxvY2soKSwgY3JlYXRlRWxlbWVudEJsb2NrKFwibGlcIiwge1xuICAgICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgICAgY2xhc3M6IG5vcm1hbGl6ZUNsYXNzKFtcbiAgICAgICAgICAgICAgICAgICAgdW5yZWYobnMpLmJlKFwic3Bpbm5lclwiLCBcIml0ZW1cIiksXG4gICAgICAgICAgICAgICAgICAgIHVucmVmKG5zKS5pcyhcImFjdGl2ZVwiLCB0aW1lID09PSB1bnJlZih0aW1lUGFydGlhbHMpW2l0ZW1dKSxcbiAgICAgICAgICAgICAgICAgICAgdW5yZWYobnMpLmlzKFwiZGlzYWJsZWRcIiwgdW5yZWYodGltZUxpc3QpW2l0ZW1dW3RpbWVdKVxuICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICB0eXBlb2YgdGltZSA9PT0gXCJudW1iZXJcIiA/IChvcGVuQmxvY2soKSwgY3JlYXRlRWxlbWVudEJsb2NrKEZyYWdtZW50LCB7IGtleTogMCB9LCBbXG4gICAgICAgICAgICAgICAgICAgIGl0ZW0gPT09IFwiaG91cnNcIiA/IChvcGVuQmxvY2soKSwgY3JlYXRlRWxlbWVudEJsb2NrKEZyYWdtZW50LCB7IGtleTogMCB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVGV4dFZOb2RlKHRvRGlzcGxheVN0cmluZygoXCIwXCIgKyAoX2N0eC5hbVBtTW9kZSA/IHRpbWUgJSAxMiB8fCAxMiA6IHRpbWUpKS5zbGljZSgtMikpICsgdG9EaXNwbGF5U3RyaW5nKGdldEFtUG1GbGFnKHRpbWUpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgXSwgNjQpKSA6IChvcGVuQmxvY2soKSwgY3JlYXRlRWxlbWVudEJsb2NrKEZyYWdtZW50LCB7IGtleTogMSB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVGV4dFZOb2RlKHRvRGlzcGxheVN0cmluZygoXCIwXCIgKyB0aW1lKS5zbGljZSgtMikpLCAxKVxuICAgICAgICAgICAgICAgICAgICBdLCA2NCkpXG4gICAgICAgICAgICAgICAgICBdLCA2NCkpIDogY3JlYXRlQ29tbWVudFZOb2RlKFwidi1pZlwiLCB0cnVlKVxuICAgICAgICAgICAgICAgIF0sIDIpO1xuICAgICAgICAgICAgICB9KSwgMTI4KSlcbiAgICAgICAgICAgIF0sIDIpXG4gICAgICAgICAgXSwgNDIsIF9ob2lzdGVkXzIpO1xuICAgICAgICB9KSwgMTI4KSkgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJ2LWlmXCIsIHRydWUpXG4gICAgICBdLCAyKTtcbiAgICB9O1xuICB9XG59KTtcbnZhciBUaW1lU3Bpbm5lciA9IC8qI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5kaXNhYmxlZCAmJiBfdGhpczcuJGVtaXQoJ3VwZGF0ZTptb2RlbFZhbHVlJywgdmFsdWUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24gZ2V0KGZpZWxkKSB7XG4gICAgICAgICAgICAgIF90aGlzNy52YWxpZChmaWVsZCk7XG5cbiAgICAgICAgICAgICAgcmV0dXJuIF90aGlzNy5tb2RlbFZhbHVlO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9uT2s6IGZ1bmN0aW9uIG9uT2soZm4pIHtcbiAgICAgICAgICAgICAgcmV0dXJuIF90aGlzNy5idXMuJG9uKCckb2snLCBmbik7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb25DbG9zZTogZnVuY3Rpb24gb25DbG9zZShmbikge1xuICAgICAgICAgICAgICByZXR1cm4gX3RoaXM3LmJ1cy4kb24oJyRjbG9zZScsIGZuKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7XG4gICAgICB9XG4gICAgfSxcbiAgICBtYWtlRm9vdGVyOiBmdW5jdGlvbiBtYWtlRm9vdGVyKCkge1xuICAgICAgdmFyIF90aGlzOCA9IHRoaXM7XG5cbiAgICAgIHZhciBfdGhpcyQkcHJvcHMgPSB0aGlzLiRwcm9wcyxcbiAgICAgICAgICBva0J0blRleHQgPSBfdGhpcyQkcHJvcHMub2tCdG5UZXh0LFxuICAgICAgICAgIGNsb3NlQnRuVGV4dCA9IF90aGlzJCRwcm9wcy5jbG9zZUJ0blRleHQsXG4gICAgICAgICAgY2xvc2VCdG4gPSBfdGhpcyQkcHJvcHMuY2xvc2VCdG4sXG4gICAgICAgICAgb2tCdG4gPSBfdGhpcyQkcHJvcHMub2tCdG4sXG4gICAgICAgICAgZm9vdGVyID0gX3RoaXMkJHByb3BzLmZvb3RlcjtcblxuIC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IHt9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgJHNldChvcmlnaW4sIGtleSwgY2xvbmUuX2Nsb25lKCkpO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG5zdCAmJiAkc2V0KG9yaWdpbiwga2V5LCB7fSk7XG4gICAgICAgIH1cblxuICAgICAgICBvcmlnaW5ba2V5XSA9IGRlZXBFeHRlbmQob3JpZ2luW2tleV0sIGNsb25lLCBtb2RlKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgICRzZXQob3JpZ2luLCBrZXksIGNsb25lKTtcblxuICAgICAgICBpZiAoIWlzLlVuZGVmKGNsb25lKSkge1xuICAgICAgICAgIGlmICghaXMuVW5kZWYoY2xvbmUuX19qc29uKSkge1xuICAgICAgICAgICAgb3JpZ2luW2tleV0uX19qc29uID0gY2xvbmUuX19qc29uO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICghaXMuVW5kZWYoY2xvbmUuX19vcmlnaW4pKSB7XG4gICAgICAgICAgICBvcmlnaW5ba2V5XS5fX29yaWdpbiA9IGNsb25lLl9fb3JpZ2luO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtb2RlICE9PSB1bmRlZmluZWQgJiYgQXJyYXkuaXNBcnJheShvcmlnaW4pID8gb3JpZ2luLmZpbHRlcihmdW5jdGlvbiAodikge1xuICAgIHJldHVybiAhdiB8fCAhdi5fX2N0cmw7XG4gIH0pIDogb3JpZ2luO1xufVxuZnVuY3Rpb24gZGVlcENvcHkodmFsdWUpIHtcbiAgcmV0dXJuIGRlZXBFeHRlbmQoe30sIHtcbiAgICB2YWx1ZTogdmFsdWVcbiAgfSkudmFsdWU7XG59XG5cbnZhciBfZXh0ZW5kcyA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gKGEpIHtcbiAgZm9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WxvYWRpbmcnLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaXRlbS4kZi5zZXRWYWx1ZShfdmFsKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGl0ZW0ucnVsZSA9IGRlZXBDb3B5KG4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgICAgZGVlcDogdHJ1ZVxuICAgIH0sXG4gICAgZXhwYW5kOiBmdW5jdGlvbiBleHBhbmQobikge1xuICAgICAgdmFyIGQgPSBuIC0gdGhpcy5tb2RlbFZhbHVlLmxlbmd0aDtcblxuICAgICAgaWYgKGQgPiAwKSB7XG4gICAgICAgIHRoaXMuZXhwYW5kUnVsZShkKTtcbiAgICAgIH1cbiAgICB9LFxuICAgIG1vZGVsVmFsdWU6IHtcbiAgICAgIGhhbmRsZXI6IGZ1bmN0aW9uIGhhbmRsZXIobikge1xuICAgICAgICB2YXIgX3RoaXMyID0gdGhpcztcblxuICAgICAgICBuID0gbiB8fCBbXTtcbiAgICAgICAgdmFyIGtleXMgPSB0aGlzLnNvcnQsXG4gICAgICAgICAgICB0b3RhbCA9IGtleXMubGVuZ3RoLFxuICAgICAgICAgICAgbGVuID0gdG90YWwgLSBuLmxlbmd0aDtcblxuICAgICAgICBpZiAobGVuIDwgMCkge1xuICAgICAgICAgIGZvciAodmFyIGkgPSBsZW47IGkgPCAwOyBpKyspIHtcbiAgICAgICAgICAgIHRoaXMuYWRkUnVsZShuLmxlbmd0aCArIGksIHRydWUpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCB0b3RhbDsgX2krKykge1xuICAgICAgICAgICAgdGhpcy5zZXRWYWx1ZShrZXlzW19pXSwgbltfaV0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAobGVuID4gMCkge1xuICAgICAgICAgICAgZm9yICh2YXIg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4ICsgc29ydF0gPSBhO1xuICAgICAgdGhpcy5mb3JtQ3JlYXRlSW5qZWN0LnN1YkZvcm0odGhpcy5zb3J0Lm1hcChmdW5jdGlvbiAoaykge1xuICAgICAgICByZXR1cm4gX3RoaXMxMC5jYWNoZVJ1bGVba10uJGY7XG4gICAgICB9KSk7XG4gICAgICB0aGlzLmZvcm1EYXRhKDApO1xuICAgIH0sXG4gICAgbWFrZUljb246IGZ1bmN0aW9uIG1ha2VJY29uKHRvdGFsLCBpbmRleCwga2V5KSB7XG4gICAgICB2YXIgX3RoaXMxMSA9IHRoaXM7XG5cbiAgICAgIGlmICh0aGlzLiRzbG90cy5idXR0b24pIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuJHNsb3RzLmJ1dHRvbih7XG4gICAgICAgICAgdG90YWw6IHRvdGFsLFxuICAgICAgICAgIGluZGV4OiBpbmRleCxcbiAgICAgICAgICB2bTogdGhpcyxcbiAgICAgICAgICBrZXk6IGtleSxcbiAgICAgICAgICBkZWw6IGZ1bmN0aW9uIGRlbCgpIHtcbiAgICAgICAgICAgIHJldHVybiBfdGhpczExLmRlbChpbmRleCwga2V5KTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGFkZDogdGhpcy5hZGRcbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHZhciBidG4gPSBbXTtcblxuICAgICAgaWYgKCghdGhpcy5tYXggfHwgdG90YWwgPCB0aGlzLm1heCkgJiYgdG90YWwgPT09IGluZGV4ICsgMSkge1xuICAgICAgICBidG4ucHVzaCh0aGlzLmFkZEljb24oa2V5KSk7XG4gICAgICB9XG5cbiAgICAgIGlmICh0b3RhbCA+IHRoaXMubWluKSB7XG4gICAgICAgIGJ0bi5wdXNoKHRoaXMuZGVsSWNvbihpbmRleCwga2V5KSk7XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLnNvcnRCdG4gJiYgaW5kZXgpIHtcbiAgICAgICAgYnRuLnB1c2godGhpcy5zb3J0VXBJY29uK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cm0sXG4gICAgICAgICAgaW5Gb3IgPSBfdG9SZWZzLmluRm9yO1xuXG4gICAgICB2YXIgZGF0YSA9IHJlYWN0aXZlKHtcbiAgICAgICAgY3R4SW5qZWN0OiB7fSxcbiAgICAgICAgZGVzdHJveWVkOiBmYWxzZSxcbiAgICAgICAgaXNTaG93OiB0cnVlLFxuICAgICAgICB1bmlxdWU6IDEsXG4gICAgICAgIHJlbmRlclJ1bGU6IF90b0NvbnN1bWFibGVBcnJheShydWxlLnZhbHVlIHx8IFtdKSxcbiAgICAgICAgdXBkYXRlVmFsdWU6IEpTT04uc3RyaW5naWZ5KG1vZGVsVmFsdWUudmFsdWUgfHwge30pXG4gICAgICB9KTtcbiAgICAgIHZhciBmYyA9IG5ldyBGb3JtQ3JlYXRlKHZtKTtcbiAgICAgIHZhciBmYXBpID0gZmMuYXBpKCk7XG4gICAgICB2YXIgaXNNb3JlID0gaW5Gb3IudmFsdWU7XG5cbiAgICAgIHZhciBhZGRTdWJGb3JtID0gZnVuY3Rpb24gYWRkU3ViRm9ybSgpIHtcbiAgICAgICAgaWYgKHBhcmVudCkge1xuICAgICAgICAgIHZhciBfaW5qZWN0ID0gX2dldEdyb3VwSW5qZWN0KHZtLCBwYXJlbnQpO1xuXG4gICAgICAgICAgaWYgKF9pbmplY3QpIHtcbiAgICAgICAgICAgIHZhciBzdWI7XG5cbiAgICAgICAgICAgIGlmIChpc01vcmUpIHtcbiAgICAgICAgICAgICAgc3ViID0gdG9BcnJheShfaW5qZWN0LmdldFN1YkZvcm0oKSk7XG4gICAgICAgICAgICAgIHN1Yi5wdXNoKGZhcGkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgc3ViID0gZmFwaTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgX2luamVjdC5zdWJGb3JtKHN1Yik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICB2YXIgcm1TdWJGb3JtID0gZnVuY3R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gKyAnOyc7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKGdsb2JhbENsYXNzW2tdLmNvbnRlbnQpIHtcbiAgICAgICAgICAgICAgc3ViQ3NzICs9IGdsb2JhbENsYXNzW2tdLmNvbnRlbnQgKyAnOyc7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChzdWJDc3MpIHtcbiAgICAgICAgICAgICAgY29udGVudCArPSBcIi5cIi5jb25jYXQoaywgXCJ7XCIpLmNvbmNhdChzdWJDc3MsIFwifVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIGlmIChwcm9wcy5vcHRpb24gJiYgcHJvcHMub3B0aW9uLnN0eWxlKSB7XG4gICAgICAgICAgICBjb250ZW50ICs9IHByb3BzLm9wdGlvbi5zdHlsZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoIXN0eWxlRWwpIHtcbiAgICAgICAgICAgIHN0eWxlRWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzdHlsZScpO1xuICAgICAgICAgICAgc3R5bGVFbC50eXBlID0gJ3RleHQvY3NzJztcbiAgICAgICAgICAgIGRvY3VtZW50LmhlYWQuYXBwZW5kQ2hpbGQoc3R5bGVFbCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc3R5bGVFbC5pbm5lckhUTUwgPSBjb250ZW50IHx8ICcnO1xuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICAgICAgdmFyIGVtaXQkdG9wRm9ybSA9IGRlYm91bmNlKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZmMuYnVzLiRlbWl0KCckbG9hZERhdGEuJHRvcEZvcm0nKTtcbiAgICAgIH0sIDEwMCk7XG4gICAgICB2YXIgZW1pdCRmb3JtID0gZGVib3VuY2UoZnVuY3Rpb24gKCkge1xuICAgICAgICBmYy5idXMuJGVtaXQoJyRsb2FkRGF0YS4kZm9ybScpO1xuICAgICAgfSwg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WYgKF9ub3JtYWxNZXJnZS5pbmRleE9mKGtleSkgPiAtMSkge1xuICAgICAgICAgIGFba2V5XSA9IF9vYmplY3RTcHJlYWQyKF9vYmplY3RTcHJlYWQyKHt9LCBhW2tleV0pLCBiW2tleV0pO1xuICAgICAgICB9IGVsc2UgaWYgKF90b0FycmF5TWVyZ2UuaW5kZXhPZihrZXkpID4gLTEpIHtcbiAgICAgICAgICB2YXIgYXJyQSA9IGFba2V5XSBpbnN0YW5jZW9mIEFycmF5ID8gYVtrZXldIDogW2Fba2V5XV07XG4gICAgICAgICAgdmFyIGFyckIgPSBiW2tleV0gaW5zdGFuY2VvZiBBcnJheSA/IGJba2V5XSA6IFtiW2tleV1dO1xuICAgICAgICAgIGFba2V5XSA9IFtdLmNvbmNhdChfdG9Db25zdW1hYmxlQXJyYXkoYXJyQSksIF90b0NvbnN1bWFibGVBcnJheShhcnJCKSk7XG4gICAgICAgIH0gZWxzZSBpZiAoX2Z1bmN0aW9uYWxNZXJnZS5pbmRleE9mKGtleSkgPiAtMSkge1xuICAgICAgICAgIGZvciAodmFyIGV2ZW50IGluIGJba2V5XSkge1xuICAgICAgICAgICAgaWYgKGFba2V5XVtldmVudF0pIHtcbiAgICAgICAgICAgICAgdmFyIF9hcnJBID0gYVtrZXldW2V2ZW50XSBpbnN0YW5jZW9mIEFycmF5ID8gYVtrZXldW2V2ZW50XSA6IFthW2tleV1bZXZlbnRdXTtcblxuICAgICAgICAgICAgICB2YXIgX2FyckIgPSBiW2tleV1bZXZlbnRdIGluc3RhbmNlb2YgQXJyYXkgPyBiW2tleV1bZXZlbnRdIDogW2Jba2V5XVtldmVudF1dO1xuXG4gICAgICAgICAgICAgIGFba2V5XVtldmVudF0gPSBbXS5jb25jYXQoX3RvQ29uc3VtYWJsZUFycmF5KF9hcnJBKSwgX3RvQ29uc3VtYWJsZUFycmF5KF9hcnJCKSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBhW2tleV1bZXZlbnRdID0gYltrZXldW2V2ZW50XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnaG9vaycpIHtcbiAgICAgICAgICBmb3IgKHZhciBob29rIGluIGJba2V5XSkge1xuICAgICAgICAgICAgaWYgKGFba2V5XVtob29rXSkge1xuICAgICAgICAgICAgICBhW2tleV1baG9va10gPSBtZXJnZUZuKGFba2V5XVtob29rXSwgYltrZXldW2hvb2tdKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGFba2V5XVtob29rXSA9IGJba2V5XVtob29rXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgYVtrZXldID0gYltrZXldO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoX25vcm1hbE1lcmdlLmluZGV4T2Yoa2V5KSA+IC0xIHx8IF9mdW5jdGlvbmFsTWVyZ2UuaW5kZXhPZihrZXkpID4gLTEgfHwgcHJvcHNNZXJnZS5pbmRleE9mKGtleSkgPiAtMSkge1xuICAgICAgICAgIGFba2V5XSA9IF9vYmplY3RTcHJlYWQyKHt9LCBiW2tleV0pO1xuICAgICAgICB9IGVsc2UgaWYgKF90b0FycmF5TWVyZ2UuaW5kZXhPZihrZXkpID4gLTEpIHtcbiAgICAgICAgICBhW2tleV0gPSBiW2tleV0gaW5zdGFuY2VvZiBBcnJheSA/IF90b0NvbnN1bWFibGVBcnJheShiW2tleV0pIDogX3R5cGVvZihiW2tleV0pID09PSAnb2JqZWN0JyA/IF9vYmplY3RTcHJlYWQyKHt9LCBiW2tleV0pIDogYltrZXldO1xuICAgICAgICB9IGVsc2UgYVtrZXldID0gYltrZXldO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBhO1xuICB9LCBpbml0aWFsKTtcbn07XG5cbnZhciBtZXJnZUZuID0gZnVuY3Rpb24gbWVyZ2V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AgICAgICAgdGhpcy5zZXRPcHRpb25zKGN0eCk7XG4gICAgICAgICAgdGhpcy5jdHhQcm9wKGN0eCk7XG4gICAgICAgICAgdmFyIHByb3AgPSBjdHgucHJvcDtcbiAgICAgICAgICBwcm9wLnByZXZpZXcgPSAhIShwcm9wLnByZXZpZXcgIT0gbnVsbCA/IHByb3AucHJldmlldyA6IHRoaXMudm0ucHJvcHMucHJldmlldyAhPT0gdW5kZWZpbmVkID8gdGhpcy52bS5wcm9wcy5wcmV2aWV3IDogdGhpcy5vcHRpb25zLnByZXZpZXcgfHwgZmFsc2UpO1xuICAgICAgICAgIHByb3AucHJvcHMuZm9ybUNyZWF0ZUluamVjdCA9IHRoaXMuaW5qZWN0UHJvcChjdHgpO1xuICAgICAgICAgIHZhciBjYWNoZUZsYWcgPSBwcm9wLmNhY2hlICE9PSBmYWxzZTtcbiAgICAgICAgICB2YXIgcHJldmlldyA9IHByb3AucHJldmlldztcblxuICAgICAgICAgIGlmIChwcm9wLmhpZGRlbikge1xuICAgICAgICAgICAgdGhpcy5zZXRDYWNoZShjdHgsIHVuZGVmaW5lZCwgcGFyZW50KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2biA9IGZ1bmN0aW9uIHZuKCkge1xuICAgICAgICAgICAgZm9yICh2YXIgX2xlbiA9IGFyZ3VtZW50cy5sZW5ndGgsIHNsb3RWYWx1ZSA9IG5ldyBBcnJheShfbGVuKSwgX2tleSA9IDA7IF9rZXkgPCBfbGVuOyBfa2V5KyspIHtcbiAgICAgICAgICAgICAgc2xvdFZhbHVlW19rZXldID0gYXJndW1lbnRzW19rZXldO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgaW5qZWN0ID0ge1xuICAgICAgICAgICAgICBydWxlOiBydWxlLFxuICAgICAgICAgICAgICBwcm9wOiBwcm9wLFxuICAgICAgICAgICAgICBwcmV2aWV3OiBwcmV2aWV3LFxuICAgICAgICAgICAgICBhcGk6IF90aGlzNC4kaGFuZGxlLmFwaSxcbiAgICAgICAgICAgICAgbW9kZWw6IHByb3AubW9kZWwgfHwge30sXG4gICAgICAgICAgICAgIHNsb3RWYWx1ZTogc2xvdFZhbHVlXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBpZiAoc2xvdFZhbHVlLmxlbmd0aCAmJiBydWxlLnNsb3RVcGRhdGUpIHtcbiAgICAgICAgICAgICAgaW52b2tlKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcnVsZS5zbG90VXBkYXRlKGluamVjdCk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgY2hpbGRyZW4gPSB7fTtcblxuICAgICAgICAgICAgdmFyIF9sb2FkID0gY3R4LmxvYWRDaGlsZHJlblBlbmRpbmcoKTtcblxuICAgICAgICAgICAgaWYgKGN0eC5wYXJzZXIucmVuZGVyQ2hpbGRyZW4pIHtcbiAgICAgICAgICAgICAgY2hpbGRyZW4gPSBjdHgucGFyc2VyLnJlbmRlckNoaWxkcmVuKF9sb2FkLCBjdHgpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjdHgucGFyc2VyLmxvYWRDaGlsZHJlbiAhPT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgY2hpbGRyZW4gPSBfdGhpczQucmVuZGVyQ2hpbGRyZW4oX2xvYWQsIGN0eCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBzbG90ID0gX3RoaXM0LmdldFR5cGVTbG90KGN0eCk7XG5cbiAgICAgICAgICAgIHZhciBfdm47XG5cbiAgICAgICAgICAgIGlmIChzbG90KSB7XG4gICAgICAgICAgICAgIGluamVjdC5jaGlsZHJlbiA9IGNoaWxkcmVuO1xuICAgICAgICAgICAgICBfdm4gPSBzbG90KGluamVjdCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBfdm4gPSBwcmV2aWV3ID8gY3R4LnBhcnNlci5wcmV2aWV3KGNvcHkkMShjaGlsZHJlbiksIGN0eCkgOiBjdHgucGFyc2VyLnJlbmRlcihjb3B5JDEoY2hpbGRyZW4pLCBjdHgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBfdm4gPSBfdGhpczQucmVuZGVyU2lkZXMoX3ZuLCBjdHgpO1xuXG4gICAgICAgICAgICBpZiAoISghY3R4LmlucHV0ICYmIGlzLlVuZGVmKHByb3BbXCJuYXRpdmVcIl0pKSAmJiBwcm9wW1wibmF0aXZlXCJdICE9PSB0cnVlKSB7XG4gICAgICAgICAgICAgIF90aGlzNC5mYy50YXJnZXRGb3JtRHJpdmVyKCd1cGRhdGVXcmFwJywgY3R4KTtcblxuICAgICAgICAgICAgICBfdm4gPSBfdGhpczQuJG1hbmFnZXIubWFrZVdyYXAoY3R4LCBfdm4pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY3R4Lm5vbmUpIHtcbiAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoX3ZuKSkge1xuICAgICAgICAgICAgICAgIF92biA9IF92bi5tYXAoZnVuY3Rpb24gKHYpIHtcbiAgICAgICAgICAgICAgICAgIGlmICghdiB8fCAhdi5fX3ZfaXNWTm9kZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdjtcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzNC5ub25lKHYpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIF92biA9IF90aGlzNC5ub25lKF92bik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FjaGVGbGFnICYmIF90aGlzNC5zZXRDYWNoZShjdHgsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIF90aGlzNC5zdGFibGUoX3ZuKTtcbiAgICAgICAgICAgIH0sIHBhcmVudCk7XG4gICAgICAgICAgICByZXR1cm4gX3ZuO1xuICAgICAgICAgIH07XG5cbiAgICAgICAgICB0aGlzLnNldENhY2hlKGN0eCwgdm4sIHBhcmVudCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHZhciBjYWNoZSA9IF90aGlzNC5nZXRDYWNoZShjdHgpO1xuXG4gICAgICAgICAgaWYgKGNhY2hlKSB7XG4gICAgICAgICAgICByZXR1cm4gY2FjaGUuYXBwbHkodm9pZCAwLCBhcmd1bWVudHMpO1xuICAgICAgICAgIH0gZWxzZSBpZiAoX3RoaXM0LmNhY2hlW2N0eC5pZF0pIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgX3ZuID0gX3RoaXM0LnJlbmRlckN0eChjdHgsIGN0eC5wYXJlbnQpO1xuXG4gICAgICAgICAgaWYgKF92bikge1xuICAgICAgICAgICAgcmV0dXJuIF92bigpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgY29uc29sZS5lcnJvcihlKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgIH0sXG4gICAgbm9uZTogZnVuY3Rpb24gbm9uZSh2bikge1xuICAgICAgaWYgKHZuKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHZuLnByb3BzW1wiY2xhc3NcIl0pKSB7XG4gICAgICAgICAgdm4ucHJvcHNbXCJjbGFzc1wiXS5wdXNoKCdmYy1ub25lJyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdm4ucHJvcHNbXCJjbGFzc1wiXSA9IHZuLnByb3BzW1wiY2xhc3NcIl0gPyBbdm4ucHJvcHNbXCJjbGFzc1wiXSwgJ2ZjLW5vbmUnXSA6ICdmYy1ub25lJztcbiAg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cm9wKGN0eCkge1xuICAgICAgdmFyIF90aGlzNiA9IHRoaXM7XG5cbiAgICAgIHZhciBzdGF0ZSA9IHRoaXMudm0uc2V0dXBTdGF0ZTtcblxuICAgICAgaWYgKCFzdGF0ZS5jdHhJbmplY3RbY3R4LmlkXSkge1xuICAgICAgICBzdGF0ZS5jdHhJbmplY3RbY3R4LmlkXSA9IHtcbiAgICAgICAgICBhcGk6IHRoaXMuJGhhbmRsZS5hcGksXG4gICAgICAgICAgZm9ybTogdGhpcy5mYy5jcmVhdGUsXG4gICAgICAgICAgc3ViRm9ybTogZnVuY3Rpb24gc3ViRm9ybShfc3ViRm9ybSkge1xuICAgICAgICAgICAgX3RoaXM2LiRoYW5kbGUuYWRkU3ViRm9ybShjdHgsIF9zdWJGb3JtKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGdldFN1YkZvcm06IGZ1bmN0aW9uIGdldFN1YkZvcm0oKSB7XG4gICAgICAgICAgICByZXR1cm4gX3RoaXM2LiRoYW5kbGUuc3ViRm9ybVtjdHguaWRdO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgb3B0aW9uczogW10sXG4gICAgICAgICAgY2hpbGRyZW46IFtdLFxuICAgICAgICAgIHByZXZpZXc6IGZhbHNlLFxuICAgICAgICAgIGlkOiBjdHguaWQsXG4gICAgICAgICAgZmllbGQ6IGN0eC5maWVsZCxcbiAgICAgICAgICBydWxlOiBjdHgucnVsZSxcbiAgICAgICAgICBpbnB1dDogY3R4LmlucHV0XG4gICAgICAgIH07XG4gICAgICB9XG5cbiAgICAgIHZhciBpbmplY3QgPSBzdGF0ZS5jdHhJbmplY3RbY3R4LmlkXTtcbiAgICAgIGV4dGVuZChpbmplY3QsIHtcbiAgICAgICAgcHJldmlldzogY3R4LnByb3AucHJldmlldyxcbiAgICAgICAgb3B0aW9uczogY3R4LnByb3Aub3B0aW9ucyxcbiAgICAgICAgY2hpbGRyZW46IGN0eC5sb2FkQ2hpbGRyZW5QZW5kaW5nKClcbiAg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mplY3QsIHRydWUpO1xuICAgICAgfSBlbHNlIGlmIChpcy5TdHJpbmcoZm4pKSB7XG4gICAgICAgIHZhciB2YWwgPSBwYXJzZUZuKGZuKTtcblxuICAgICAgICBpZiAodmFsICYmIGZuICE9PSB2YWwpIHtcbiAgICAgICAgICByZXR1cm4gdmFsLl9faW5qZWN0ID8gdGhpcy5wYXJzZUV2ZW50KHJ1bGUsIHZhbCwgaW5qZWN0LCB0cnVlKSA6IHZhbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgcGFyc2VFbWl0OiBmdW5jdGlvbiBwYXJzZUVtaXQoY3R4KSB7XG4gICAgICB2YXIgX3RoaXMyID0gdGhpcztcblxuICAgICAgdmFyIGV2ZW50ID0ge30sXG4gICAgICAgICAgcnVsZSA9IGN0eC5ydWxlLFxuICAgICAgICAgIGVtaXRQcmVmaXggPSBydWxlLmVtaXRQcmVmaXgsXG4gICAgICAgICAgZmllbGQgPSBydWxlLmZpZWxkLFxuICAgICAgICAgIG5hbWUgPSBydWxlLm5hbWUsXG4gICAgICAgICAgaW5qZWN0ID0gcnVsZS5pbmplY3Q7XG4gICAgICB2YXIgZW1pdCA9IHJ1bGUuZW1pdCB8fCBbXTtcblxuICAgICAgaWYgKGlzLnRydWVBcnJheShlbWl0KSkge1xuICAgICAgICBlbWl0LmZvckVhY2goZnVuY3Rpb24gKGV2ZW50TmFtZSkge1xuICAgICAgICAgIGlmICghZXZlbnROYW1lKSByZXR1cm47XG4gICAgICAgICAgdmFyIGV2ZW50SW5qZWN0O1xuICAgICAgICAgIHZhciBlbWl0S2V5ID0gZW1pdFByZWZpeCB8fCBmaWVsZCB8fCBuYW1lO1xuXG4gICAgICAgICAgaWYgKGlzLk9iamVjdChldmVudE5hbWUpKSB7XG4gICAgICAgICAgICBldmVudEluamVjdCA9IGV2ZW50TmFtZS5pbmplY3Q7XG4gICAgICAgICAgICBldmVudE5hbWUgPSBldmVudE5hbWUubmFtZTtcbiAgICAgICAgICAgIGVtaXRLZXkgPSBldmVudE5hbWUucHJlZml4IHx8IGVtaXRLZXk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGVtaXRLZXkpIHtcbiAgICAgICAgICAgIHZhciBmaWVsZEtleSA9IHRvTGluZShcIlwiLmNvbmNhdChlbWl0S2V5LCBcIi1cIikuY29uY2F0KGV2ZW50TmFtZSkpO1xuXG4gICAgICAgICAgICB2YXIgZm4gPSBmdW5jdGlvbiBmbigpIHtcbiAgICAgICAgICAgICAgdmFyIF90aGlzMiR2bSwgX3RoaXMyJHZtMiwgX3RoaXMyJGJ1cztcblxuICAgICAgICAgICAgICBpZiAoX3RoaXMyLnZtLmVtaXRzT3B0aW9ucykge1xuICAgICAgICAgICAgICAgIF90aGlzMi52bS5lbWl0c09wdGlvbnNbZmllbGRLZXldID0gbnVsbDtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGZvciAodmFyIF9sZW4gPSBhcmd1bWVudHMubGVuZ3RoLCBhcmcgPSBuZXcgQXJyYXkoX2xlbiksIF9rZXkgPSAwOyBfa2V5IDwgX2xlbjsgX2tleSsrKSB7XG4gICAgICAgICAgICAgICAgYXJnW19rZXldID0gYXJndW1lbnRzW19rZXldO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgKF90aGlzMiR2bSA9IF90aGlzMi52bSkuZW1pdC5hcHBseShfdGhpczIkdm0sIFtmaWVsZEtleV0uY29uY2F0KGFyZykpO1xuXG4gICAgICAgICAgICAgIChfdGhpczIkdm0yID0gX3RoaXMyLnZtKS5lbWl0LmFwcGx5KF90aGlzMiR2bTIsIFsnZW1pdC1ldmVudCcsIGZpZWxkS2V5XS5jb25jYXQoYXJnKSk7XG5cbiAgICAgICAgICAgICAgKF90aGlzMiRidXMgPSBfdGhpczIuYnVzKS4kZW1pdC5hcHBseShfdGhpczIkYnVzLCBbZmllbGRLZXldLmNvbmNhdChhcmcpKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGZuLl9fZW1pdCA9IHRydWU7XG5cbiAgICAgICAgICAgIGlmICghZXZlbnRJbmplY3QgJiYgaW5qZWN0ID09PSBmYWxzZSkge1xuICAgICAgICAgICAgICBldmVudFtldmVudE5hbWVdID0gZm47XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgX2luamVjdCA9IGV2ZW50SW5qZWN0IHx8IGluamVjdCB8fCBfdGhpczIub3B0aW9ucy5pbmplY3RFdmVudDtcblxuICAgICAgICAgICAgICBldmVudFtldmVudE5hbWVdID0gaXMuVW5kZWYoX2luamVjdCkgPyBmbiA6IF90aGlzMi5pbmplY3QocnVsZSwgZm4sIF9pbmplY3QpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIGN0eC5jb21wdXRlZC5vbiA9IGV2ZW50O1xuICAgICAgcmV0dXJuIGV2ZW50O1xuICAgIH0sXG4gICAgZ2V0SW5qZWN0RGF0YTogZnVuY3Rpb24gZ2V0SW5qZWN0RGF0YShzZWxmLCBpbmplY3QpIHtcbiAgICAgIHZhciAkYXBpID0gc2VsZi5fX2ZjX18gJiYgc2VsZi5fX2ZjX18uJGFwaTtcbiAgICAgIHZhciB2bSA9IHNlbGYuX19mY19fICYmIHNlbGYuX19mY19fLiRoYW5kbGUudm0gfHwgdGhpcy52bS5wcm9wcztcbiAgICAgIHZhciBfdm0kcHJvcHMgPSB2bS5wcm9wcyxcbiAgICAgICAgICBvcHRpb24gPSBfdm0kcHJvcHMub3B0aW9uLFxuICAgICAgICAgIHJ1bGUgPSBfdm0kcHJvcHMucnVsZTtcbiAgICAgIHJldHVybiB7XG4gICAgICAgICRmOiAkYXBpIHx8IHRoaXMuYXBpLFxuICAgICAgICBhcGk6ICRhcGkgfHwgdGhpcy5hcGksXG4gICAgICAgIHJ1bGU6IHJ1bGUsXG4gICAgICAgIHNlbGY6IHNlbGYuX19vcmlnaW5fXyxc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cnICYmIHN0ci5pbmRleE9mKCd7eycpID4gLTEgJiYgc3RyLmluZGV4T2YoJ319JykgPiAtMSkge1xuICAgICAgICB2YXIgdG1wID0gc3RyO1xuICAgICAgICB2YXIgdmFycyA9IGV4dHJhY3RWYXIoc3RyKTtcbiAgICAgICAgdmFyIGxhc3RWYWw7XG4gICAgICAgIHZhcnMuZm9yRWFjaChmdW5jdGlvbiAodikge1xuICAgICAgICAgIHZhciBzcGxpdCA9IHYuc3BsaXQoJ3x8Jyk7XG4gICAgICAgICAgdmFyIGZpZWxkID0gc3BsaXRbMF0udHJpbSgpO1xuXG4gICAgICAgICAgaWYgKGZpZWxkKSB7XG4gICAgICAgICAgICB2YXIgZGVmID0gKHNwbGl0WzFdIHx8ICcnKS50cmltKCk7XG4gICAgICAgICAgICB2YXIgdmFsID0gZ2V0ID8gZ2V0KGZpZWxkLCBkZWYpIDogX3RoaXMzLmZjLmdldExvYWREYXRhKGZpZWxkLCBkZWYpO1xuICAgICAgICAgICAgbGFzdFZhbCA9IHZhbDtcbiAgICAgICAgICAgIHN0ciA9IHN0ci5yZXBsYWNlQWxsKFwie3tcIi5jb25jYXQodiwgXCJ9fVwiKSwgdmFsID09IG51bGwgPyAnJyA6IHZhbCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAodmFycy5sZW5ndGggPT09IDEgJiYgdG1wID09PSBcInt7XCIuY29uY2F0KHZhcnNbMF0sIFwifX1cIikpIHtcbiAgICAgICAgICByZXR1cm4gbGFzdFZhbDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gc3RyO1xuICAgIH0sXG4gICAgbG9hZEZldGNoVmFyOiBmdW5jdGlvbiBsb2FkRmV0Y2hWYXIob3B0aW9ucywgZ2V0KSB7XG4gICAgICB2YXIgX3RoaXM0ID0gdGhpcztcblxuICAgICAgdmFyIGxvYWRWYWwgPSBmdW5jdGlvbiBsb2FkVmFsKHN0cikge1xuICAgICAgICByZXR1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UmVwZWF0KCkpIHtcbiAgICAgICAgICBfdGhpczYudm0uZW1pdCgncmVwZWF0LWZpZWxkJywgX3J1bGUsIF90aGlzNi5hcGkpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGN0eDtcbiAgICAgICAgdmFyIGlzQ29weSA9IGZhbHNlO1xuICAgICAgICB2YXIgaXNJbml0ID0gISFfcnVsZS5fX2ZjX187XG4gICAgICAgIHZhciBkZWZhdWx0VmFsdWUgPSBydWxlLnZhbHVlO1xuXG4gICAgICAgIGlmIChpc0luaXQpIHtcbiAgICAgICAgICBjdHggPSBfcnVsZS5fX2ZjX187XG4gICAgICAgICAgZGVmYXVsdFZhbHVlID0gY3R4LmRlZmF1bHRWYWx1ZTtcblxuICAgICAgICAgIGlmIChjdHguZGVsZXRlZCkge1xuICAgICAgICAgICAgaWYgKGlzQ3RybChjdHgpKSB7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY3R4LnVwZGF0ZShfdGhpczYpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoIWN0eC5jaGVjayhfdGhpczYpKSB7XG4gICAgICAgICAgICAgIGlmIChpc0N0cmwoY3R4KSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJ1bGVzW2luZGV4XSA9IF9ydWxlID0gX3J1bGUuX2Nsb25lID8gX3J1bGUuX2Nsb25lKCkgOiBjb3B5UnVsZShfcnVsZSk7XG4gICAgICAgICAgICAgIGN0eCA9IG51bGw7XG4gICAgICAgICAgICAgIGlzQ29weSA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFjdHgpIHtcbiAgICAgICAgICB2YXIgX3J1bGUyID0gX3RoaXM2LnBhcnNlUnVsZShfcnVsZSk7XG5cbiAgICAgICAgICBjdHggPSBuZXcgUn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WYubWV0aG9kO1xuXG4gICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICB2YWxpZCA/IGN0eC5jdHJsUnVsZS5wdXNoKHtcbiAgICAgICAgICAgICAgX19jdHJsOiB0cnVlLFxuICAgICAgICAgICAgICBjaGlsZHJlbjogcnVsZSxcbiAgICAgICAgICAgICAgdmFsaWQ6IHZhbGlkXG4gICAgICAgICAgICB9KSA6IGN0eC5jdHJsUnVsZS5zcGxpY2UoY3R4LmN0cmxSdWxlLmluZGV4T2YoY3RybCksIDEpO1xuICAgICAgICAgICAgaGlkZUxzdFt2YWxpZCA/ICdwdXNoJyA6ICd1bnNoaWZ0J10oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICBpZiAobWV0aG9kID09PSAnZGlzYWJsZWQnKSB7XG4gICAgICAgICAgICAgICAgX3RoaXM3LmFwaS5kaXNhYmxlZCghdmFsaWQsIHJ1bGUpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1ldGhvZCA9PT0gJ2Rpc3BsYXknKSB7XG4gICAgICAgICAgICAgICAgX3RoaXM3LmFwaS5kaXNwbGF5KHZhbGlkLCBydWxlKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChtZXRob2QgPT09ICdyZXF1aXJlZCcpIHtcbiAgICAgICAgICAgICAgICBydWxlLmZvckVhY2goZnVuY3Rpb24gKGl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgIF90aGlzNy5hcGkuc2V0RWZmZWN0KGl0ZW0sICdyZXF1aXJlZCcsIHZhbGlkKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmICghdmFsaWQpIHtcbiAgICAgICAgICAgICAgICAgIF90aGlzNy5hcGkuY2xlYXJWYWxpZGF0ZVN0YXRlKHJ1bGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfdGhpczcuYXBpLmhpZGRlbighdmFsaWQsIHJ1bGUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAodmFsaWQpIHtcbiAgICAgICAgICAgIGZsYWcgPSB0cnVlO1xuICAgICAgICAgICAgdmFyIHJ1bGVDb24gPSB7XG4gICAgICAgICAgICAgIHR5cGU6ICdmcmFnbWVudCcsXG4gICAgICAgICAgICAgIFwibmF0aXZlXCI6IHRydWUsXG4gICAgICAgICAgICAgIF9fY3RybDogdHJ1ZSxcbiAgICAgICAgICAgICAgY2hpbGRyZW46IHJ1bGVcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjdHguY3RybFJ1bGUucHVzaChydWxlQ29uKTtcblxuICAgICAgICAgICAgX3RoaXM3LmJ1cy4kb25jZSgnbG9hZC1zdGFydCcsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgLy8gdGhpcy5jeWNsZUxvYWQgPSB0cnVlO1xuICAgICAgICAgICAgICBpZiAocHJlcGVuZCkge1xuICAgICAgICAgICAgICAgIGFwaS5wcmVwZW5kKHJ1bGVDb24sIHByZXBlbmQsIGNoaWxkKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBlbmQgfHwgY2hpbGQpIHtcbiAgICAgICAgICAgICAgICBhcGkuYXBwZW5kKHJ1bGVDb24sIGFwcGVuZCB8fCBjdHguaWQsIGNoaWxkKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjdHgucm9vdC5zcGxpY2UoY3R4LnJvb3QuaW5kZXhPZihjdHgub3JpZ2luKSArIDEsIDAsIHJ1bGVDb24pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY3R4LmN0cmxSdWxlLnNwbGljZShjdHguY3RybFJ1bGUuaW5kZXhPZihjdHJsKSwgMSk7X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ncHJlZml4JywgJ3N1ZmZpeCddLmluZGV4T2Yoa2V5KSA+IC0xKSBuICYmIF90aGlzLmxvYWRGbihuLCBjdHgucnVsZSk7ZWxzZSBpZiAoa2V5ID09PSAndHlwZScpIHtcbiAgICAgICAgICAgIGN0eC51cGRhdGVUeXBlKCk7XG5cbiAgICAgICAgICAgIF90aGlzLmJpbmRQYXJzZXIoY3R4KTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGZsYWcpIHtcbiAgICAgICAgICAgIGlmIChpcy5GdW5jdGlvbihvKSkge1xuICAgICAgICAgICAgICBvID0gY3R4LmdldFBlbmRpbmcoJ2NoaWxkcmVuJywgW10pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaXMuRnVuY3Rpb24obikpIHtcbiAgICAgICAgICAgICAgbiA9IGN0eC5sb2FkQ2hpbGRyZW5QZW5kaW5nKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIF90aGlzLnVwZGF0ZUNoaWxkcmVuKGN0eCwgbiwgbyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX3RoaXMuJHJlbmRlci5jbGVhckNhY2hlKGN0eCk7XG5cbiAgICAgICAgICBfdGhpcy5yZWZyZXNoKCk7XG5cbiAgICAgICAgICBfdGhpcy53YXRjaGluZyA9IGZhbHNlO1xuICAgICAgICB9LCB7XG4gICAgICAgICAgZGVlcDogIWZsYWcsXG4gICAgICAgICAgc3luYzogZmxhZ1xuICAgICAgICB9KSk7XG4gICAgICB9KTtcblxuICAgICAgaWYgKGN0eC5pbnB1dCkge1xuICAgICAgICB2YXIgdmFsID0gdG9SZWYoY3R4LnJ1bGUsICd2YWx1ZScpO1xuICAgICAgICBjdHgud2F0Y2gucHVzaCh3YXRjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbC52YWx1ZTtcbiAgICAgICAgfSwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHZhciBmb3JtVmFsdWUgPSBjdHgucGFyc2VyLnRvRm9ybVZhbHVlKHZhbC52YWx1ZSwgY3R4KTtcblxuICAgICAgICAgIGlmIChfdGhpcy5pc0NoYW5nZShjdHgsIGZvcm1WYWx1ZSkpIHtcbiAgICAgICAgICAgIF90aGlzLnNldFZhbHVlKGN0eCwgdmFsLnZhbHVlLCBmb3JtVmFsdWUsIHRydWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSkpO1xuICAgICAgfVxuXG4gICAgICB0aGlzLmJ1cy4kb25jZSgnbG9hZC1lbmQnLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBjb21wdXRlZCA9IGN0eC5ydWxlLmNvbXB1dGVkO1xuXG4gICAgICAgIGlmICghY29tcHV0ZWQpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoX3R5cGVvZihjb21wdXRlZCkgIT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgY29tcHV0ZWQgPSB7XG4gICAgICAgICAgICB2YWx1ZTogY29tcHV0ZWRcbiAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgT2JqZWN0LmtleXMoY29tcHV0ZWQpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICBjdHgud2F0Y2gucHVzaCh3YXRjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgaXRlbSA9IGNvbXB1dGVkW2tdO1xuICAgICAgICAgICAgaWYgKCFpdGVtKSByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgdmFyIGZuO1xuXG4gICAgICAgICAgICBpZiAoX3R5cGVvZihpdGVtKSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgdmFyIGdyb3VwID0gY3R4LmdldFBhcmVudEdyb3VwKCk7XG5cbiAgICAgICAgICAgICAgdmFyIGNoZWNrQ29uZGl0aW9uID0gZnVuY3Rpb24gY2hlY2tDb25kaXRpb24oaXRlbSkge1xuICAgICAgICAgICAgICAgIGl0ZW0gPSBBcnJheS5pc0FycmF5KGl0ZW0pID8ge1xuICAgICAgICAgICAgICAgICAgbW9kZTogJ0FORCcsXG4gICAgICAgICAgICAgICAgICBncm91cDogaXRlbVxuICAgICAgICAgICAgICAgIH0gOiBpdGVtO1xuXG4gICAgICAgICAgICAgICAgaWYgKCFpcy50cnVlQXJyYXkoaXRlbS5ncm91cCkpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhciBvciA9IGl0ZW0ubW9kZSA9PT0gJ09SJztcbiAgICAgICAgICAgICAgICB2YXIgdmFsaWQgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpdGVtLmdyb3VwLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgb25lID0gaXRlbS5ncm91cFtpXTtcbiAgICAgICAgICAgICAgICAgIHZhciBmbGFnID0gdm9pZCAwO1xuXG4gICAgICAgICAgICAgICAgICBpZiAob25lLm1vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9IGNoZWNrQ29uZGl0aW9uKG9uZSk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCFjb25kaXRpb25bb25lLmNvbmRpdGlvbl0pIHtcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9IG5ldyBGdW5jdGlvbignXyQnLCAnXyR2YWwnLCAnJGZvcm0nLCAnX2dyb3VwJywgXCJ3aXRoKCRmb3JtKXt3aXRoKHRoaXMpe3dpdGgoX2dyb3VwKXsgcmV0dXJuIF8kWydcIi5jb25jYXQob25lLmNvbmRpdGlvbiwgXCInXShcIikuY29uY2F0KG9uZS5maWVsZCwgXCIsIFwiKS5jb25jYXQob25lLmNvbXBhcmUgPyBvbmUuY29tcGFyZSA6ICdfJHZhbCcsIFwiKTsgfX19XCIpKS5jYWxsKF90aGlzLmFwaS5mb3JtLCBjb25kaXRpb24sIG9uZS52YWx1ZSwgX3RoaXMuYXBpLnRvcC5mb3JtLCBncm91cCA/IF90aGlzLnN1YlJ1bGVEYXRhW2dyb3VwLmlkXSB8fCB7fSA6IHt9KTtcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgaWYgKG9yICYmIGZsYWcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGlmICghb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsaWQgPSB2YWxpZCAmJiBmbGFnO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiBvciA/IGZhbHNlIDogdmFsaWQ7XG4gICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgdmFyIF92YWwgPSBjaGVja0NvbmRpdGlvbihpdGVtKTtcblxuICAgICAgICAgICAgICByZXR1cm4gaXRlbS5pbnZlcnQgPT09IHRydWUgPyAhX3ZhbCA6IF92YWw7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzLkZ1bmN0aW9uKGl0ZW0pKSB7XG4gICAgICAgICAgICAgIGZuID0gZnVuY3Rpb24gZm4oKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW0oX3RoaXMuYXBpLmZvcm0sIF90aGlzLmFwaSk7XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgX2dyb3VwID0gY3R4LmdldFBhcmVudEdyb3VwKCk7XG5cbiAgICAgICAgICAgICAgZm4gPSBmdW5jdGlvbiBmbigpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZ1bmN0aW9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ICAgY3VzdG9tID0gX3JlZi5jdXN0b207XG4gICAgICBpZiAoIXR5cGUgfHwgWydmY0ZyYWdtZW50JywgJ2ZyYWdtZW50J10uaW5kZXhPZih0eXBlKSA+IC0xKSByZXR1cm47XG4gICAgICB2YXIgZWZmZWN0ID0gY3VzdG9tID8gY3VzdG9tIDogT2JqZWN0LmtleXMocnVsZSkucmVkdWNlKGZ1bmN0aW9uIChpLCBrKSB7XG4gICAgICAgIGlmIChrWzBdID09PSAnJCcpIHtcbiAgICAgICAgICBpW2suc3Vic3RyKDEpXSA9IHJ1bGVba107XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaTtcbiAgICAgIH0sIF9vYmplY3RTcHJlYWQyKHt9LCBydWxlLmVmZmVjdCB8fCB7fSkpO1xuICAgICAgT2JqZWN0LmtleXMoZWZmZWN0KS5mb3JFYWNoKGZ1bmN0aW9uIChhdHRyKSB7XG4gICAgICAgIHZhciBwID0gX3RoaXM0LnByb3ZpZGVyc1thdHRyXTtcbiAgICAgICAgaWYgKCFwIHx8IHAuaW5wdXQgJiYgIWlucHV0KSByZXR1cm47XG5cbiAgICAgICAgdmFyIF90eXBlO1xuXG4gICAgICAgIGlmICghcC5fYykge1xuICAgICAgICAgIF90eXBlID0gJyonO1xuICAgICAgICB9IGVsc2UgaWYgKHAuX3VzZWQuaW5kZXhPZih0eXBlKSA+IC0xKSB7XG4gICAgICAgICAgX3R5cGUgPSB0eXBlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBkYXRhID0gX29iamVjdFNwcmVhZDIoe1xuICAgICAgICAgIHZhbHVlOiBlZmZlY3RbYXR0cl0sXG4gICAgICAgICAgZ2V0VmFsdWU6IGZ1bmN0aW9uIGdldFZhbHVlKCkge1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzNC5nZXRFZmZlY3QocnVsZSwgYXR0cik7XG4gICAgICAgICAgfVxuICAgICAgICB9L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IHtcbiAgICAgICAgb3B0aW9uID0gX29iamVjdFNwcmVhZDIoX29iamVjdFNwcmVhZDIoe30sIG9wdGlvbiksIGl0ZW0pO1xuICAgICAgfVxuICAgIH1cblxuICAgIHZhciBfb25FcnJvciA9IG9wdGlvbi5vbkVycm9yO1xuXG4gICAgdmFyIGNoZWNrID0gZnVuY3Rpb24gY2hlY2soKSB7XG4gICAgICBpZiAoIWluamVjdC5nZXRWYWx1ZSgpKSB7XG4gICAgICAgIGluamVjdC5jbGVhclByb3AoKTtcbiAgICAgICAgYXBpLnN5bmMocnVsZSk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgIH07XG5cbiAgICBmZXRjaEF0dHIuX2ZuW2luamVjdC5pZF0gPSBmYy53YXRjaExvYWREYXRhKGRlYm91bmNlKGZ1bmN0aW9uIChnZXQsIGNoYW5nZSkge1xuICAgICAgaWYgKGNoYW5nZSAmJiBvcHRpb24ud2F0Y2ggPT09IGZhbHNlKSB7XG4gICAgICAgIHJldHVybiBmZXRjaEF0dHIuX2ZuW2luamVjdC5pZF0oKTtcbiAgICAgIH1cblxuICAgICAgdmFyIF9vcHRpb24gPSBmYy4kaGFuZGxlLmxvYWRGZXRjaFZhcihkZWVwQ29weShvcHRpb24pLCBnZXQpO1xuXG4gICAgICB2YXIgY29uZmlnID0gX29iamVjdFNwcmVhZDIoX29iamVjdFNwcmVhZDIoe1xuICAgICAgICBoZWFkZXJzOiB7fVxuICAgICAgfSwgX29wdGlvbiksIHt9LCB7XG4gICAgICAgIG9uU3VjY2VzczogZnVuY3Rpb24gb25TdWNjZXNzKGJvZHksIGZsYWcpIHtcbiAgICAgICAgICBpZiAoY2hlY2soKSkgcmV0dXJuO1xuXG4gICAgICAgICAgdmFyIGZuID0gZnVuY3Rpb24gZm4odikge1xuICAgICAgICAgICAgcmV0dXJuIGZsYWcgPyB2IDogaGFzUHJvcGVydHkodiwgJ2RhdGEnKSA/IHYuZGF0YSA6IHY7XG4gICAgICAgICAgfTtcblxuICAgICAgICAgIHZhciBwYXJzZSA9IHBhcnNlRm4oX29wdGlvbi5wYXJzZSk7XG5cbiAgICAgICAgICBpZiAoaXMuRnVuY3Rpb24ocGFyc2UpKSB7XG4gICAgICAgICAgICBmbiA9IHBhcnNlO1xuICAgICAgICAgIH0gZWxzZSBpZiAocGFyc2UgJiYgaXMuU3RyaW5nKHBhcnNlKSkge1xuICAgICAgICAgICAgZm4gPSBmdW5jdGlvbiBmbih2KSB7XG4gICAgICAgICAgICAgIHJldHVybiBkZWVwR2V0KHYsIHBhcnNlKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2V0KGZuKGJvZHksIHJ1bGUsIGFwaSkpO1xuICAgICAgICAgIGFwaS5zeW5jKHJ1bGUpO1xuICAgICAgICB9LFxuICAgICAgICBvbkVycm9yOiBmdW5jdGlvbiBvbkVycm9yKGUpIHtcbiAgICAgICAgICBzZXQodW5kZWZpbmVkKTtcbiAgICAgICAgICBpZiAoY2hlY2soKSkgcmV0dXJuO1xuXG4gICAgICAgICAgKF9vbkVycm9yIHx8IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICByZXR1cm4gZXJyKGUubWVzc2FnZSB8fCAnZmV0Y2ggZmFpbCAnICsgX29wdGlvbi5hY3Rpb24pO1xuICAgICAgICAgIH0pKGUsIHJ1bGUsIGFwaSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBmYy4kaGFuZGxlLmJlZm9yZUZldGNoKGNvbmZpZywge1xuICAgICAgICBydWxlOiBydWxlLFxuICAgICAgICBhcGk6IGFwaVxuICAgICAgfSkudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmIChpcy5GdW5jdGlvbihfb3B0aW9uLmFjdGlvbikpIHtcbiAgICAgICAgICBfb3B0aW9uLmFjdGlvbihydWxlLCBhcGkpLnRoZW4oZnVuY3Rpb24gKHZhbCkge1xuICAgICAgICAgICAgY29uZmlnLm9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yO1xuXG4gICAgICAgICAgcmV0dXJuIChfdGhpczMkcmVuZGVyRHJpdmVyID0gX3RoaXMzLnJlbmRlckRyaXZlcilbbWV0aG9kXS5hcHBseShfdGhpczMkcmVuZGVyRHJpdmVyLCBhcmdzKTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSxcbiAgICBnbG9iYWxEYXRhRHJpdmVyOiBmdW5jdGlvbiBnbG9iYWxEYXRhRHJpdmVyKGlkKSB7XG4gICAgICB2YXIgX3RoaXM0ID0gdGhpcztcblxuICAgICAgdmFyIHNwbGl0ID0gaWQuc3BsaXQoJy4nKTtcbiAgICAgIHZhciBrZXkgPSBzcGxpdC5zaGlmdCgpO1xuICAgICAgdmFyIG9wdGlvbiA9IHRoaXMub3B0aW9ucy52YWx1ZS5nbG9iYWxEYXRhICYmIHRoaXMub3B0aW9ucy52YWx1ZS5nbG9iYWxEYXRhW2tleV07XG5cbiAgICAgIGlmIChvcHRpb24pIHtcbiAgICAgICAgaWYgKG9wdGlvbi50eXBlID09PSAnc3RhdGljJykge1xuICAgICAgICAgIHJldHVybiBkZWVwR2V0KG9wdGlvbi5kYXRhLCBzcGxpdCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIHZhbDtcbiAgICAgICAgICB2YXIgcmVzID0gdGhpcy5mZXRjaENhY2hlLmdldChvcHRpb24pO1xuXG4gICAgICAgICAgaWYgKHJlcykge1xuICAgICAgICAgICAgaWYgKHJlcy5zdGF0dXMpIHtcbiAgICAgICAgICAgICAgdmFsID0gZGVlcEdldChyZXMuZGF0YSwgc3BsaXQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXJlcy5sb2FkaW5nKSB7XG4gICAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlcy5sb2FkaW5nID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLmZldGNoQ2FjaGUuc2V0KG9wdGlvbiwgcmVzKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5mZXRjaENhY2hlLnNldChvcHRpb24sIHtcbiAgICAgICAgICAgICAgc3RhdHVzOiBmYWxzZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIHJlbG9hZCA9IGRlYm91bmNlKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHVud2F0Y2goKTtcblxuICAgICAgICAgICAgdmFyIHJlcyA9IF90aGlzNC5mZXRjaENhY2hlLmdldChvcHRpb24pO1xuXG4gICAgICAgICAgICBpZiAoX3RoaXM0Lm9wdGlvbnMudmFsdWUuZ2xvYmFsRGF0YSAmJiBPYmplY3QudmFsdWVzKF90aGlzNC5vcHRpb25zLnZhbHVlLmdsb2JhbERhdGEpLmluZGV4T2Yob3B0aW9uKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgaWYgKHJlcykge1xuICAgICAgICAgICAgICAgIHJlcy5sb2FkaW5nID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIF90aGlzNC5mZXRjaENhY2hlLnNldChvcHRpb24sIHJlcyk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBfdGhpczQuYnVzLiRlbWl0KCckbG9hZERhdGEuJGdsb2JhbERhdGEuJyArIGtleSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBfdGhpczQuZmV0Y2hDYWNoZVtcImRlbGV0ZVwiXShvcHRpb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sIG9wdGlvbi53YWl0IHx8IDYwMCk7XG5cbiAgICAgICAgICB2YXIgX2VtaXQgPSBmdW5jdGlvbiBfZW1pdChkYXRhKSB7XG4gICAgICAgICAgICBfdGhpczQuZmV0Y2hDYWNoZS5zZXQob3B0aW9uLCB7XG4gICAgICAgICAgICAgIHN0YXR1czogdHJ1ZSxcbiAgICAgICAgICAgICAgZGF0YTogZGF0YVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIF90aGlzNC5idXMuJGVtaXQoJyRsb2FkRGF0YS4kZ2xvYmFsRGF0YS4nICsga2V5KTtcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgdmFyIGNhbGxiYWNrID0gZnVuY3Rpb24gY2FsbGJhY2soZ2V0LCBjaGFuZ2UpIHtcbiAgICAgICAgICAgIGlmIChjaGFuZ2UgJiYgb3B0aW9uLndhdGNoID09PSBmYWxzZSkge1xuICAgICAgICAgICAgICByZXR1cm4gdW53YXRjaCgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY2hhbmdlKSB7XG4gICAgICAgICAgICAgIHJlbG9hZCgpO1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvcHRpb25zID0gX3RoaXM0LiRoYW5kbGUubG9hZEZldGNoVmFyKGNvcHkkMShvcHRpb24pLCBnZXQpO1xuXG4gICAgICAgICAgICBfdGhpczQuJGhhbmRsZS5hcGkuZmV0Y2gob3B0aW9ucykudGhlbihmdW5jdGlvbiAocmVzKSB7XG4gICAgICAgICAgICAgIF9lbWl0KHJlcyk7XG4gICAgICAgICAgICB9KVtcImNhdGNoXCJdKGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgIF9lbWl0KG51bGwpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfTtcblxuICAgICAgICAgIHZhciB1bndhdGNoID0gdGhpcy53YXRjaExvYWREYXRhKGNhbGxiYWNrKTtcbiAgICAgICAgICB0aGlzLnVud2F0Y2gucHVzaCh1bndhdGNoKTtcbiAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcbiAgICBnbG9iYWxWYXJEcml2ZXI6IGZ1bmN0aW9uIGdsb2JhbFZhckRyaXZlcihpZCkge1xuICAgICAgdmFyIF90aGlzNSA9IHRoaXM7XG5cbiAgICAgIHZhciBzcGxpdCA9IGlkLnNwbGl0KCcuJyk7XG4gICAgICB2YXIga2V5ID0gc3BsaXQuc2hpZnQoKTtcbiAgICAgIHZhciBvcHRpb24gPSB0aGlzLm9wdGlvbnMudmFsdWUuZ2xvYmFsVmFyaWFibGUgJiYgdGhpcy5vcHRpb25zLnZhbHVlLmdsb2JhbFZhcmlhYmxlW2tleV07XG5cbiAgICAgIGlmIChvcHRpb24pIHtcbiAgICAgICAgdmFyIGhhbmRsZSA9IGlzLkZ1bmN0aW9uKG9wdGlvbikgPyBvcHRpb24gOiBvcHRpb24uaGFuZGxlO1xuXG4gICAgICAgIGlmIChoYW5kbGUpIHtcbiAgICAgICAgICB2YXIgdmFsO1xuICAgICAgICAgIHZhciB1bndhdGNoID0gdGhpcy53YXRjaExvYWREYXRhKGZ1bmN0aW9uIChnZXQsIGNoYW5nZSkge1xuICAgICAgICAgICAgaWYgKGNoYW5nZSkge1xuICAgICAgICAgICAgICB1bndhdGNoKCk7XG5cbiAgICAgICAgICAgICAgX3RoaXM1LmJ1cy4kZW1pdCgnJGxvYWREYXRhLiR2YXIuJyArIGtleSk7XG5cbiAgICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsID0gaW52b2tlKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShnZXQsIF90aGlzNS4kaGFuZGxlLmFwaSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICB0aGlzLnVud2F0Y2gucHVzaCh1bndhdGNoKTtcbiAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcbiAgICBnZXRMb2FkRGF0YTogZnVuY3Rpb24gZ2V0TG9hZERhdGEoaWQsIGRlZikge1xuICAgICAgdmFyIHZhbCA9IG51bGw7XG5cbiAgICAgIGlmIChpZCAhPSBudWxsKSB7XG4gICAgICA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Zm4pIHtcbiAgICAgIHZhciBfdGhpczYgPSB0aGlzO1xuXG4gICAgICB2YXIgdW53YXRjaCA9IHt9O1xuXG4gICAgICB2YXIgcnVuID0gZnVuY3Rpb24gcnVuKGZsYWcpIHtcbiAgICAgICAgaW52b2tlKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmbihnZXQsIGZsYWcpO1xuICAgICAgICB9KTtcbiAgICAgIH07XG5cbiAgICAgIHZhciBnZXQgPSBmdW5jdGlvbiBnZXQoaWQsIGRlZikge1xuICAgICAgICBpZiAodW53YXRjaFtpZF0pIHtcbiAgICAgICAgICByZXR1cm4gdW53YXRjaFtpZF0udmFsO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHZhbCA9IF90aGlzNi5nZXRMb2FkRGF0YShpZCwgZGVmKTtcblxuICAgICAgICB2YXIgc3BsaXQgPSBpZC5zcGxpdCgnLicpO1xuICAgICAgICB2YXIga2V5ID0gc3BsaXQuc2hpZnQoKTtcbiAgICAgICAgdmFyIGtleTIgPSBzcGxpdC5zaGlmdCgpIHx8ICcnO1xuICAgICAgICB2YXIgY2FsbGJhY2sgPSBkZWJvdW5jZShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKGtleSAhPT0gaWQpIHtcbiAgICAgICAgICAgIHZhciB0ZW1wID0gX3RoaXM2LmdldExvYWREYXRhKGlkLCBkZWYpO1xuXG4gICAgICAgICAgICBpZiAoSlNPTi5zdHJpbmdpZnkodGVtcCkgIT09IEpTT04uc3RyaW5naWZ5KHVud2F0Y2hbaWRdLnZhbCkpIHtcbiAgICAgICAgICAgICAgdW53YXRjaFtpZF0udmFsID0gdGVtcDtcbiAgICAgICAgICAgICAgcnVuKHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBydW4odHJ1ZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9LCAwKTtcblxuICAgICAgICBfdGhpczYuYnVzLiRvbignJGxvYWREYXRhLicgKyBrZXksIGNhbGxiYWNrKTtcblxuICAgICAgICBpZiAoa2V5Mikge1xuICAgICAgICAgIF90aGlzNi5idXMuJG9uKCckbG9hZERhdGEuJyArIGtleSArICcuJyArIGtleTIsIGNhbGxiYWNrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHVud2F0Y2hbaWRdID0ge1xuICAgICAgICAgIGZuOiBmdW5jdGlvbiBmbigpIHtcbiAgICAgICAgICAgIF90aGlzNi5idXMuJG9mZignJGxvYWREYXRhLicgKyBrZXksIGNhbGxiYWNrKTtcblxuICAgICAgICAgICAgaWYgKGtleTIpIHtcbiAgICAgICAgICAgICAgX3RoaXM2LmJ1cy4kb2ZmKCckbG9hZERhdGEuJyArIGtleSArICcuJyArIGtleTIsIGNhbGxiYWNrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9LFxuICAgICAgICAgIHZhbDogdmFsXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiB2YWw7XG4gICAgICB9O1xuXG4gICAgICBydW4oZmFsc2UpO1xuXG4gICAgICB2YXIgdW4gPSBmdW5jdGlvbiB1bigpIHtcbiAgICAgICAgT2JqZWN0LmtleXModW53YXRjaCkuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgIHJldHVybiB1bndhdGNoW2tdLmZuKCk7XG4gICAgICAgIH0pO1xuICAgICAgICB1bndhdGNoID0ge307XG4gICAgICB9O1xuXG4gICAgICB0aGlzLnVud2F0Y2gucHVzaCh1bik7XG4gICAgICByZXR1cm4gdW47XG4gICAgfSxcbiAgICBpc1N1YjogZnVuY3Rpb24gaXNTdWIoKSB7XG4gICAgICByZXR1cm4gdGhpcy52bS5zZXR1cFN0YXRlLnBhcmVudCAmJiB0aGlzLnZtLnByb3BzLmV4dGVuZE9wdGlvbjtcbiAgICB9LFxuICAgIGluaXRPcHRpb25zOiBmdW5jdGlvbiBpbml0T3B0aW9ucygpIHtcbiAgICAgIHRoaXMub3B0aW9ucy52YWx1ZSA9I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FJhKHIsIGYgPSB7fSwgbykge1xuICBsZXQgaSA9ICExO1xuICBmb3IgKGxldCB0IGluIGYpXG4gICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChmLCB0KSkge1xuICAgICAgbGV0IHMgPSBmW3RdO1xuICAgICAgaWYgKChpID0gQXJyYXkuaXNBcnJheShzKSkgfHwgZnQuT2JqZWN0KHMpKSB7XG4gICAgICAgIGxldCBkID0gclt0XSA9PT0gdm9pZCAwO1xuICAgICAgICBpZiAoaSlcbiAgICAgICAgICBpID0gITEsIGQgJiYgYW8ociwgdCwgW10pO1xuICAgICAgICBlbHNlIGlmIChzLl9jbG9uZSAmJiBvICE9PSB2b2lkIDApXG4gICAgICAgICAgaWYgKG8pXG4gICAgICAgICAgICBzID0gcy5nZXRSdWxlKCksIGQgJiYgYW8ociwgdCwge30pO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgYW8ociwgdCwgcy5fY2xvbmUoKSk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAgICBkICYmIGFvKHIsIHQsIHt9KTtcbiAgICAgICAgclt0XSA9IFJhKHJbdF0sIHMsIG8pO1xuICAgICAgfSBlbHNlXG4gICAgICAgIGFvKHIsIHQsIHMpLCBmdC5VbmRlZihzKSB8fCAoZnQuVW5kZWYocy5fX2pzb24pIHx8IChyW3RdLl9fanNvbiA9IHMuX19qc29uKSwgZnQuVW5kZWYocy5fX29yaWdpbikgfHwgKHJbdF0uX19vcmlnaW4gPSBzLl9fb3JpZ2luKSk7XG4gICAgfVxuICByZXR1cm4gbyAhPT0gdm9pZCAwICYmIEFycmF5LmlzQXJyYXkocikgPyByLmZpbHRlcigodCkgPT4gIXQgfHwgIXQuX19jdHJsKSA6IHI7XG59XG5mdW5jdGlvbiBWdChyKSB7XG4gIHJldHVybiBSYSh7fSwgeyB2YWx1ZTogciB9KS52YWx1ZTtcb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HtcbiAgICAgICAgICBjb25zdCBjID0gZFswXS5hcGkuZ2V0R2xvYmFsRXZlbnQocyk7XG4gICAgICAgICAgaWYgKGMpXG4gICAgICAgICAgICByZXR1cm4gYy5jYWxsKHRoaXMsIC4uLmQpO1xuICAgICAgICB9LCBvLl9fanNvbiA9IHIsIG8uX19pbmplY3QgPSAhMCwgbztcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChvLmluZGV4T2YoR2YpID09PSAwKVxuICAgICAgICAgIHJldHVybiBvID0gWWYoXCJmdW5jdGlvbigkaW5qZWN0KXtcIiArIG8ucmVwbGFjZShHZiwgXCJcIikgKyBcIn1cIiksIG8uX19qc29uID0gciwgby5fX2luamVjdCA9ICEwLCBvO1xuICAgICAgICAhZiAmJiBvLmluZGV4T2YobGEpID09PSAwICYmIG8gIT09IGxhICYmIChpID0gITApO1xuICAgICAgfVxuICAgICAgaWYgKCFpKVxuICAgICAgICByZXR1cm4gcjtcbiAgICAgIGNvbnN0IHQgPSBZZihvLmluZGV4T2YobGEpID09PSAtMSAmJiBvLmluZGV4T2YoXCIoXCIpICE9PSAwID8gbGEgKyBcIiBcIiArIG8gOiBvKTtcbiAgICAgIHJldHVybiB0Ll9fanNvbiA9IHIsIHQ7XG4gICAgfSBjYXRjaCAodCkge1xuICAgICAgVGgoYFxcdTg5RTNcXHU2NzkwXFx1NTkzMVxcdThEMjU6JHtvfVxuXG5lcnI6ICR7dH1gKTtcbiAgICAgIHJldHVybjtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHI7XG59XG5mdW5jdGlvbiBSaChyKSB7XG4gIGNvbnN0IGYgPSByLnJlcGxhY2UoLygtW2Etel0pL2csIGZ1bmN0aW9uKG8pIHtcbiAgICByZXR1cm4gby5yZXBsYWNlKFwiLVwiLCBcIlwiKS50b0xvY2FsZVVwcGVyQ2FzZSgpO1xuICB9KTtcbiAgcmV0dXJuIHhzKGYpO1xufVxuZnVuY3Rpb24geHMocikge1xuICByZXR1cm4gci5y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OiByKFwiZm9ybS5yZXNldEJ0blwiKVxuICAgIH0sXG4gICAge1xuICAgICAgdHlwZTogXCJGbkNvbmZpZ1wiLFxuICAgICAgZmllbGQ6IFwiPl9ldmVudFwiLFxuICAgICAgaW5mbzoge1xuICAgICAgICB0eXBlOiBcInRvb2x0aXBcIixcbiAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgZWZmZWN0OiBcImxpZ2h0XCIsXG4gICAgICAgIGFsaWduOiBcImxlZnRcIixcbiAgICAgICAgY29udGVudDogcihcImZvcm0uZG9jdW1lbnRcIikgKyAnXFx1RkYxQTxhIHRhcmdldD1cIl9ibGFua1wiIGhyZWY9XCJodHRwczovL2Zvcm0tY3JlYXRlLmNvbS92My9ndWlkZS9nbG9iYWwtZXZlbnRcIj5odHRwczovL2Zvcm0tY3JlYXRlLmNvbS92My9ndWlkZS9nbG9iYWwtZXZlbnQ8L2E+JyxcbiAgICAgICAgcmF3Q29udGVudDogITBcbiAgICAgIH0sXG4gICAgICB2YWx1ZToge30sXG4gICAgICBjb2w6IHsgc2hvdzogITAgfSxcbiAgICAgIHByb3BzOiB7XG4gICAgICAgIGV2ZW50Q29uZmlnOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgbmFtZTogXCJvblN1Ym1pdFwiLFxuICAgICAgICAgICAgYXJnczogW1wiZm9ybURhdGFcIiwgXCJhcGlcIl1cbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6IFwib25DcmVhdGVkXCIsXG4gICAgICAgICAgICBhcmdzOiBbXCJhcGlcIl1cbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6IFwib25Nb3VudGVkXCIsXG4gICAgICAgICAgICBhcmdzOiBbXCJhcGlcIl1cbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWU6IFwib25DaGFuZ2VcIixcbiAgICAgICAgICAgIGFyZ3M6IFtcImZpZWxk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ZpZWxkOiBcIm1pblwiLFxuICAgICAgICB0eXBlOiBcImlucHV0TnVtYmVyXCIsXG4gICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgbWluOiAwXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIGZpZWxkOiBcIm1heFwiLFxuICAgICAgICB0eXBlOiBcImlucHV0TnVtYmVyXCIsXG4gICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgbWluOiAwXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwiQ29sb3JJbnB1dFwiLFxuICAgICAgICBmaWVsZDogXCJ0ZXh0Q29sb3JcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJDb2xvcklucHV0XCIsXG4gICAgICAgIGZpZWxkOiBcImZpbGxcIlxuICAgICAgfVxuICAgIF0pO1xuICB9XG59LCB6aCA9IFwiXFx1OEY5M1xcdTUxNjVcXHU2ODQ2XCIsIExsID0gXCJpbnB1dFwiLCBWaCA9IHtcbiAgbWVudTogXCJtYWluXCIsXG4gIGljb246IFwiaWNvbi1pbnB1dFwiLFxuICBsYWJlbDogemgsXG4gIG5hbWU6IExsLFxuICBldmVudDogW1wiYmx1clwiLCBcImZvY3VzXCIsIFwiY2hhbmdlXCIsIFwiaW5wdXRcIiwgXCJjbGVhclwiXSxcbiAgdmFsaWRhdGU6IFtcInN0cmluZ1wiLCBcInVybFwiLCBcImVtYWlsXCJdLFxuICBydWxlKHsgdDogciB9KSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHR5cGU6IExsLFxuICAgICAgZmllbGQ6IF9lKCksXG4gICAgICB0aXRsZTogcihcImNvbS5pbnB1dC5uYW1lXCIpLFxuICAgICAgaW5mbzogXCJcIixcbiAgICAgICRyZXF1aXJlZDogITEsXG4gICAgICBwcm9wczoge31cbiAgICB9O1xuICB9LFxuICBwcm9wcyhyLCB7IHQ6IGYgfSkge1xuICAgIHJldHV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IFwiaW5wdXRcIixcbiAgICAgIGZpZWxkOiBfZSgpLFxuICAgICAgdGl0bGU6IHIoXCJjb20udGV4dGFyZWEubmFtZVwiKSxcbiAgICAgIGluZm86IFwiXCIsXG4gICAgICAkcmVxdWlyZWQ6ICExLFxuICAgICAgcHJvcHM6IHtcbiAgICAgICAgdHlwZTogXCJ0ZXh0YXJlYVwiXG4gICAgICB9XG4gICAgfTtcbiAgfSxcbiAgcHJvcHMociwgeyB0OiBmIH0pIHtcbiAgICByZXR1cm4gWmUoZiwgX2YgKyBcIi5wcm9wc1wiLCBbXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwic3dpdGNoXCIsXG4gICAgICAgIGZpZWxkOiBcImRpc2FibGVkXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwic3dpdGNoXCIsXG4gICAgICAgIGZpZWxkOiBcInJlYWRvbmx5XCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwiaW5wdXROdW1iZXJcIixcbiAgICAgICAgZmllbGQ6IFwibWF4bGVuZ3RoXCIsXG4gICAgICAgIHByb3BzOiB7IG1pbjogMCB9XG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcImlucHV0TnVtYmVyXCIsXG4gICAgICAgIGZpZWxkOiBcIm1pbmxlbmd0aFwiLFxuICAgICAgICBwcm9wczogeyBtaW46IDAgfVxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJzd2l0Y2hcIixcbiAgICAgICAgZmllbGQ6IFwic2hvd1dvcmRMaW1pdFwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcImlucHV0XCIsXG4gICAgICAgIGZpZWxkOiBcInBsYWNlaG9sZGVyXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwiaW5wdXROdW1iZXJcIixcbiAgICAgICAgZmllbGQ6IFwicm93c1wiLFxuICAgICAgICBwcm9wczoge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WJlclwiLFxuICAgICAgICBmaWVsZDogXCJtYXhsZW5ndGhcIixcbiAgICAgICAgcHJvcHM6IHsgbWluOiAwIH1cbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwiaW5wdXROdW1iZXJcIixcbiAgICAgICAgZmllbGQ6IFwibWlubGVuZ3RoXCIsXG4gICAgICAgIHByb3BzOiB7IG1pbjogMCB9XG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcImlucHV0XCIsXG4gICAgICAgIGZpZWxkOiBcInBsYWNlaG9sZGVyXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwic3dpdGNoXCIsXG4gICAgICAgIGZpZWxkOiBcImNsZWFyYWJsZVwiXG4gICAgICB9XG4gICAgXSk7XG4gIH1cbn0sIEtoID0gXCJcXHU4QkExXFx1NjU3MFxcdTU2NjhcIiwgQmwgPSBcImlucHV0TnVtYmVyXCIsIFhoID0ge1xuICBtZW51OiBcIm1haW5cIixcbiAgaWNvbjogXCJpY29uLW51bWJlclwiLFxuICBsYWJlbDogS2gsXG4gIG5hbWU6IEJsLFxuICBldmVudDogW1wiYmx1clwiLCBcImZvY3VzXCIsIFwiY2hhbmdlXCJdLFxuICB2YWxpZGF0ZTogW1wibnVtYmVyXCIsIFwiaW50ZWdlclwiLCBcImZsb2F0XCJdLFxuICBydWxlKHsgdDogciB9KSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHR5cGU6IEJsLFxuICAgICAgZmllbGQ6IF9lKCksXG4gICAgICB0aXRsZTogcihcImNvbS5pbnB1dE51bWJlci5uYW1lXCIpLFxuICAgICAgaW5mbzogXCJcIixcbiAgICAgICRyZXF1aXJlZDogITEsXG4gICAgICBwcm9wczoge31cbiAgICB9O1xuICB9LFxuICBwcm9wcyhyLCB7IHQ6IGYgfSkge1xuICAgIHJldHVybiBaZShmLCBCbCArIFwiLnByb3BzXCIsIFt7IHR5cGU6IFwic3dpdGNoXCIsIGZpZ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mVyXCIsIFwiYXJyYXlcIl0sXG4gIHJ1bGUoeyB0OiByIH0pIHtcbiAgICByZXR1cm4ge1xuICAgICAgdHlwZTogSGwsXG4gICAgICBmaWVsZDogX2UoKSxcbiAgICAgIHRpdGxlOiByKFwiY29tLnNlbGVjdC5uYW1lXCIpLFxuICAgICAgaW5mbzogXCJcIixcbiAgICAgIGVmZmVjdDoge1xuICAgICAgICBmZXRjaDogXCJcIlxuICAgICAgfSxcbiAgICAgICRyZXF1aXJlZDogITEsXG4gICAgICBwcm9wczoge30sXG4gICAgICBvcHRpb25zOiBOcihyKFwicHJvcHMub3B0aW9uXCIpLCB7IGxhYmVsOiBcImxhYmVsXCIsIHZhbHVlOiBcInZhbHVlXCIgfSwgMSlcbiAgICB9O1xuICB9LFxuICB3YXRjaDoge1xuICAgIG11bHRpcGxlKHsgcnVsZTogciB9KSB7XG4gICAgICByLmtleSA9IF9lKCk7XG4gICAgfVxuICB9LFxuICBwcm9wcyhyLCB7IHQ6IGYgfSkge1xuICAgIHJldHVybiBaZShmLCBIbCArIFwiLnByb3BzXCIsIFtcbiAgICAgIE1hKGYsIFwib3B0aW9uc1wiKSxcbiAgICAgIHsgdHlwZTogXCJzd2l0Y2hcIiwgZmllbGQ6IFwibXVsdGlwbGVcIiB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJkaXNhYmxlZFwiXG4gICAgICB9LFxuICAgICAgeyB0eXBlOiBcInN3aXRjaFwiLCBmaWVsZDogXCJjbGVhcmFibGVcIiB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJjb2xsYXBzZVRhZ3NcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJpbnB1dE51bWJlclwiLFxuICAgICAgICBmaWVsZDogXCJtdWx0aXBsZUxpbWl0XCIsXG4gICAgICAgIHByb3BzOiB7IG1pbjogMCB9XG4gICAgICB9LFxuICAgICAgeyB0eXBlOiBcImlucHV0XCIsIGZpZWxkOiBcInBsYWNlaG9sZGVyXCIgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJzd2l0Y2hcIixcbiAgICAgICAgZmllbGQ6IFwiZmlsdGVyYWJsZVwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJyZW1vdGVcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJGbkVkaXRvclwiLFxuICAgICAgICBmaWVsZDogXCJyZW1vdGVNZXRob2RcIixcbiAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICBib2R5OiAhMCxcbiAgICAgICAgICBidXR0b246ICEwLFxuICAgICAgICAgIGZueDogITAsXG4gICAgICAgICAgbmFtZTogXCJyZW1vdGVNZXRob2RcIixcbiAgICAgICAgICBhcmdzOiBbSGQoZildXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICB7IHR5cGU6IFwic3dpdGNoXCIsIGZpZWxkOiBcImFsbG93Q3JlYXRlXCIgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJpbnB1dFwiLFxuICAgICAgICBmaWVsZDogXCJub01hdGNoVGV4dFwiXG4gICAgICB9LFxuICAgICAgeyB0eXBlOiBcImlucHV0XCIsIGZpZWxkOiBcIm5vRGF0YVRleHRcIiB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJyZXNlcnZlS2V5d29yZFwiXG4gICAgICB9LFxuICAgICAgeyB0eXBlOiBcInN3aXRjaFwiLCBmaWVsZDogXCJkZWZhdWx0Rmlyc3RPcHRpb25cIiB9XG4gICAgXSk7XG4gIH1cbn0sIHFoID0gXCJcXHU1RjAwXFx1NTE3M1wiLCAkbCA9IFwic3dpdGNoXCIsIF9oID0ge1xuICBtZW51OiBcIm1haW5cIixc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ArIFwiLnByb3BzXCIsIFtcbiAgICAgIElhKHsgdDogZiwgdG86IFwicHJvcHMub3B0aW9uc1wiIH0pLFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJkaXNhYmxlZFwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJjbGVhcmFibGVcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJpbnB1dFwiLFxuICAgICAgICBmaWVsZDogXCJwbGFjZWhvbGRlclwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcIk9iamVjdFwiLFxuICAgICAgICBmaWVsZDogXCJwcm9wc1wiLFxuICAgICAgICBwcm9wczoge1xuICAgICAgICAgIHJ1bGU6IFplKGYsIHNhICsgXCIucHJvcHNPcHRcIiwgW3tcbiAgICAgICAgICAgIHR5cGU6IFwic3dpdGNoXCIsXG4gICAgICAgICAgICBmaWVsZDogXCJtdWx0aXBsZVwiXG4gICAgICAgICAgfSwge1xuICAgICAgICAgICAgdHlwZTogXCJzZWxlY3RcIixcbiAgICAgICAgICAgIGZpZWxkOiBcImV4cGFuZFRyaWdnZXJcIixcbiAgICAgICAgICAgIG9wdGlvbnM6IFh0KGYsIFt7IGxhYmVsOiBcImNsaWNrXCIsIHZhbHVlOiBcImNsaWNrXCIgfSwge1xuICAgICAgICAgICAgICBsYWJlbDogXCJob3ZlclwiLFxuICAgICAgICAgICAgICB2YWx1ZTogXCJob3ZlclwiXG4gICAgICAgICAgICB9XSlcbiAgICAgICAgICB9LCB7XG4gICAgICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICAgICAgZmllbGQ6IFwiY2hlY2tTdHJpY3RseVwiXG4gICAgICAgICAgfSwge1xuICAgICAgICAgICAgdHlwZTogXCJzd2l0Y2hcIixcbiAgICAgICAgICAgIGZpZWxkOiBcImVtaXRQYXRoXCIsXG4gICAgICAgICAgICB2YWx1ZTogITBcbiAgICAgICAgICB9LCB7XG4gICAgICAgICAgICB0eXBlOiBcImlucHV0XCIsXG4gICAgICAgICAgICBmaWVsZDogXCJ2YWx1ZVwiLFxuICAgICAgICAgICAgdmFsdWU6IFwidmFsdWVcIlxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIHR5cGU6IFwiaW5wdXRcIixcbiAgICAgICAgICAgIGZpZWxkOiBcImxhYmVsXCIsXG4gICAgICAgICAgICB2YWx1ZTogXCJsYWJlbFwiXG4gICAgICAgICAgfSwge1xuICAgICAgICAgICAgdHlwZTogXCJpbnB1dFwiLFxuICAgICAgICAgICAgZmllbGQ6IFwiY2hpbGRyZW5cIixcbiAgICAgICAgICAgIHZhbHVlOiBcImNoaWxkcmVuXCJcbiAgICAgICAgICB9LCB7XG4gICAgICAgICAgICB0eXBlOiBcImlucHV0XCIsXG4gICAgICAgICAgICBmaWVsZDogXCJkaXNhYmxlZFwiLFxuICAgICAgICAgICAgdmFsdWU6IFwiZGlzYWJsZWRcIlxuICAgICAgICAgIH0sIHsgdHlwZTogXCJpbnB1dFwiLCBmaWVsZDogXCJsZWFmXCIgfV0pXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwic3dpdGNoXCIsXG4gICAgICAgIGZpZWxkOiBcInNob3dBbGxMZXZlbHNcIixcbiAgICAgICAgdmFsdWU6ICEwXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJjb2xsYXBzZVRhZ3NcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJzd2l0Y2hcIixcbiAgICAgICAgZmllbGQ6IFwiY29sbGFwc2VUYWdzVG9vbHRpcFwiXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcImlucHV0XCIsXG4gICAgICAgIGZpZWxk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wiLFxuICAgICAgICBmaWVsZDogXCJtdWx0aXBsZUxpbWl0XCIsXG4gICAgICAgIHByb3BzOiB7IG1pbjogMCB9XG4gICAgICB9LFxuICAgICAgeyB0eXBlOiBcImlucHV0XCIsIGZpZWxkOiBcInBsYWNlaG9sZGVyXCIgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJUYWJsZU9wdGlvbnNcIixcbiAgICAgICAgZmllbGQ6IFwicHJvcHNcIixcbiAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICBjb2x1bW46IFt7IGxhYmVsOiBmKFwicHJvcHMua2V5XCIpLCBrZXk6IFwibGFiZWxcIiB9LCB7IGxhYmVsOiBmKFwicHJvcHMudmFsdWVcIiksIGtleTogXCJ2YWx1ZVwiIH1dLFxuICAgICAgICAgIHZhbHVlVHlwZTogXCJvYmplY3RcIlxuICAgICAgICB9XG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJyZW5kZXJBZnRlckV4cGFuZFwiLFxuICAgICAgICB2YWx1ZTogITBcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwic3dpdGNoXCIsXG4gICAgICAgIGZpZWxkOiBcImRlZmF1bHRFeHBhbmRBbGxcIlxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgdHlwZTogXCJzd2l0Y2hcIixcbiAgICAgICAgZmllbGQ6IFwiZXhwYW5kT25DbGlja05vZGVcIixcbiAgICAgICAgdmFsdWU6ICEwXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICB0eXBlOiBcInN3aXRjaFwiLFxuICAgICAgICBmaWVsZDogXCJjaGVja09uQ2xpY2tOb2RlXCJcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIHR5cGU6IFwiaW5wdXRcIixcbiAgICAgICAgZmllbGQ6IFwibm9kZUtleVwiXG4gICAgICB9XG4gICAgXSk7XG4gIH1cbn0sIHRtID0gXCJ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TZWxlY3RvcihmKTtcbiAgICAgICAgaWYgKHIud2Via2l0TWF0Y2hlc1NlbGVjdG9yKVxuICAgICAgICAgIHJldHVybiByLndlYmtpdE1hdGNoZXNTZWxlY3RvcihmKTtcbiAgICAgIH0gY2F0Y2gge1xuICAgICAgICByZXR1cm4gITE7XG4gICAgICB9XG4gICAgcmV0dXJuICExO1xuICB9XG59XG5mdW5jdGlvbiBnbShyKSB7XG4gIHJldHVybiByLmhvc3QgJiYgciAhPT0gZG9jdW1lbnQgJiYgci5ob3N0Lm5vZGVUeXBlID8gci5ob3N0IDogci5wYXJlbnROb2RlO1xufVxuZnVuY3Rpb24gS24ociwgZiwgbywgaSkge1xuICBpZiAocikge1xuICAgIG8gPSBvIHx8IGRvY3VtZW50O1xuICAgIGRvIHtcbiAgICAgIGlmIChmICE9IG51bGwgJiYgKGZbMF0gPT09IFwiPlwiID8gci5wYXJlbnROb2RlID09PSBvICYmIFNhKHIsIGYpIDogU2EociwgZikpIHx8IGkgJiYgciA9PT0gbylcbiAgICAgICAgcmV0dXJuIHI7XG4gICAgICBpZiAociA9PT0gbylcbiAgICAgICAgYnJlYWs7XG4gICAgfSB3aGlsZSAociA9IGdtKHIpKTtcbiAgfVxuICByZXR1cm4gbnVsbDtcbn1cbnZhciBsZCA9IC9cXHMrL2c7XG5mdW5jdGlvbiBibihyLCBmLCBvKSB7XG4gIGlmIChyICYmIGYpXG4gICAgaWYgKHIuY2xhc3NMaXN0KVxuICAgICAgci5jbGFzc0xpc3RbbyA/IFwiYWRkXCIgOiBcInJlbW92ZVwiXShmKTtcbiAgICBlbHNlIHtcbiAgICAgIHZhciBpID0gKFwiIFwiICsgci5jbGFzc05hbWUgKyBcIiBcIikucmVwbGFjZShsZCwgXCIgXCIpLnJlcGxhY2UoXCIgXCIgKyBmICsgXCIgXCIsIFwiIFwiKTtcbiAgICAgIHIuY2xhc3NOYW1lID0gKGkgKyAobyA/IFwiIFwiICsgZiA6IFwiXCIpKS5yZXBsYWNlKGx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ZilcbiAgICAgICAgICByZXR1cm4gbztcbiAgICAgICAgaSA9ICEwO1xuICAgICAgfVxuICAgIH1cbiAgd2hpbGUgKG8gPSBvLnBhcmVudE5vZGUpO1xuICByZXR1cm4gWG4oKTtcbn1cbmZ1bmN0aW9uIEFtKHIsIGYpIHtcbiAgaWYgKHIgJiYgZilcbiAgICBmb3IgKHZhciBvIGluIGYpXG4gICAgICBmLmhhc093blByb3BlcnR5KG8pICYmIChyW29dID0gZltvXSk7XG4gIHJldHVybiByO1xufVxuZnVuY3Rpb24gZnMociwgZikge1xuICByZXR1cm4gTWF0aC5yb3VuZChyLnRvcCkgPT09IE1hdGgucm91bmQoZi50b3ApICYmIE1hdGgucm91bmQoci5sZWZ0KSA9PT0gTWF0aC5yb3VuZChmLmxlZnQpICYmIE1hdGgucm91bmQoci5oZWlnaHQpID09PSBNYXRoLnJvdW5kKGYuaGVpZ2h0KSAmJiBNYXRoLnJvdW5kKHIud2lkdGgpID09PSBNYXRoLnJvdW5kKGYud2lkdGgpO1xufVxudmFyIG1vO1xuZnVuY3Rpb24gVWQociwgZikge1xuICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgaWYgKCFtbykge1xuICAgICAgdmFyIG8gPSBhcmd1bWVudHMsIGkgPSB0aGlzO1xuICAgICAgby5sZW5ndGggPT09IDEgPyByLmNhbGwoaSwgb1swXSkgOiByLmFwcGx5KGksIG8pLCBtbyA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgIG1vID0gdm9pZCAwO1xuICAgICAgfSwgZik7XG4gICAgfVxuICB9O1xufVxuZnVuY3Rpb24gYm0oKSB7XG4gIGNsZWFyVGltZW91dChtbyksIG1vID0gdm9pZCAwO1xufVxuZnVuY3Rpb24gemQociwgZiwgbykge1xuICByLnNjcm9sbExlZnQgKz0gZiwgci5zY3JvbGxUb3AgKz0gbztcbn1cbmZ1bmN0aW9uIFZkKHIpIHtcbiAgdmFyIGYgPSB3aW5kb3cuUG9seW1lciwgbyA9IHdpbmRvdy5qUXVlcnkgfHwgd2luZG93LlplcHRvO1xuICByZXR1cm4gZiAmJiBmLmRvbSA/IGYuZG9tKHIpLmNsb25lTm9kZSghMCkgOiBvID8gbyhyKS5jbG9uZSghMClbMF0gOiByLmNsb25lTm9kZSghMCk7XG59XG52YXIgU24gPSBcIlNvcnRhYmxlXCIgKyBuZXcgRGF0ZSgpLmdldFRpbWUoKTtcbmZ1bmN0aW9uIENtKCkge1xuICB2YXIgciA9IFtdLCBmO1xuICByZXR1cm4ge1xuICAgIGNhcHR1cmVBbmltYXRpb25TdGF0ZTogZnVuY3Rpb24oKSB7XG4gICAgICBpZiAociA9IFtdLCAhIXRoaXMub3B0aW9ucy5hbmltYXRpb24pIHtcbiAgICAgICAgdmFyIGkgPSBbXS5zbGljZS5jYWxsKHRoaXMuZWwuY2hpbGRyZW4pO1xuICAgICAgICBpLmZvckVhY2goZnVuY3Rpb24odCkge1xuICAgICAgICAgIGlmICghKFdlKHQsIFwiZGlzcGxheVwiKSA9PT0gXCJub25lXCIgfHwgdCA9PT0gR2UuZ2hvc3QpKSB7XG4gICAgICAgICAgICByLnB1c2goe1xuICAgICAgICAgICAgICB0YXJnZXQ6IHQsXG4gICAgICAgICAgICAgIHJlY3Q6IFd0KHQpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciBzID0gSm4oe30sIHJbci5sZW5ndGggLSAxXS5yZWN0KTtcbiAgICAgICAgICAgIGlmICh0LnRoaXNBbmltYXRpb25EdXJhdGlvbikge1xuICAgICAgICAgICAgICB2YXIgZCA9IFRpKHQsICEwKTtcbiAgICAgICAgICAgICAgZCAmJiAocy50b3AgLT0gZC5mLCBzLmxlZnQgLT0gZC5lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHQuZnJvbVJlY3QgPSBzO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSxcbiAgICBhZGRBbmltYXRpb25TdGF0ZTogZnVu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ICAgICAgZXZ0OiBmXG4gICAgICAgICAgICB9KSwgcyAmJiBmLmNhbmNlbGFibGUgJiYgZi5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChiICYmIChiID0gYi5zcGxpdChcIixcIikuc29tZShmdW5jdGlvbihTKSB7XG4gICAgICAgICAgaWYgKFMgPSBLbih2LCBTLnRyaW0oKSwgaSwgITEpLCBTKVxuICAgICAgICAgICAgcmV0dXJuIGxuKHtcbiAgICAgICAgICAgICAgc29ydGFibGU6IG8sXG4gICAgICAgICAgICAgIHJvb3RFbDogUyxcbiAgICAgICAgICAgICAgbmFtZTogXCJmaWx0ZXJcIixcbiAgICAgICAgICAgICAgdGFyZ2V0RWw6IHAsXG4gICAgICAgICAgICAgIGZyb21FbDogaSxcbiAgICAgICAgICAgICAgdG9FbDogaVxuICAgICAgICAgICAgfSksIHBuKFwiZmlsdGVyXCIsIG8sIHtcbiAgICAgICAgICAgICAgZXZ0OiBmXG4gICAgICAgICAgICB9KSwgITA7XG4gICAgICAgIH0pLCBiKSkge1xuICAgICAgICAgIHMgJiYgZi5jYW5jZWxhYmxlICYmIGYucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdC5oYW5kbGUgJiYgIUtuKHYsIHQuaGFuZGxlLCBpLCAhMSkgfHwgdGhpcy5fcHJlcGFyZURyYWdTdGFydChmLCBjLCBwKTtcbiAgICAgIH1cbiAgICB9XG4gIH0sXG4gIF9wcmVwYXJlRHJhZ1N0YXJ0OiBmdW5jdGlvbihmLCBvLCBpKSB7XG4gICAgdmFyIHQgPSB0aGlzLCBzID0gdC5lbCwgZCA9IHQub3B0aW9ucywgYyA9IHMub3duZXJEb2N1bWVudCwgcDtcbiAgICBpZiAoaSAmJiAhU2UgJiYgaS5wYXJlbnROb2RlID09PSBzKSB7XG4gICAgICB2YXIgdi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ybiBcIkNvZGVNaXJyb3IuUGFzc1wiO1xuICAgICAgfSB9LCBNZSA9IHsgc2Nyb2xsOiAhMSB9LCBZZSA9IHsgb3JpZ2luOiBcIiptb3VzZVwiIH0sIG50ID0geyBvcmlnaW46IFwiK21vdmVcIiB9O1xuICAgICAgZnVuY3Rpb24gZXQoZSwgbiwgbCkge1xuICAgICAgICBmb3IgKHZhciBhID0gMCwgdSA9IDA7IDsgKSB7XG4gICAgICAgICAgdmFyIGcgPSBlLmluZGV4T2YoXCJcdFwiLCBhKTtcbiAgICAgICAgICBnID09IC0xICYmIChnID0gZS5sZW5ndGgpO1xuICAgICAgICAgIHZhciBPID0gZyAtIGE7XG4gICAgICAgICAgaWYgKGcgPT0gZS5sZW5ndGggfHwgdSArIE8gPj0gbilcbiAgICAgICAgICAgIHJldHVybiBhICsgTWF0aC5taW4oTywgbiAtIHUpO1xuICAgICAgICAgIGlmICh1ICs9IGcgLSBhLCB1ICs9IGwgLSB1ICUgbCwgYSA9IGcgKyAxLCB1ID49IG4pXG4gICAgICAgICAgICByZXR1cm4gYTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdmFyIGd0ID0gW1wiXCJdO1xuICAgICAgZnVuY3Rpb24geXQoZSkge1xuICAgICAgICBmb3IgKDsgZ3QubGVuZ3RoIDw9IGU7IClcbiAgICAgICAgICBndC5wdXNoKEJlKGd0KSArIFwiIFwiKTtcbiAgICAgICAgcmV0dXJuIGd0W2VdO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQmUoZSkge1xuICAgICAgICByZXR1cm4gZVtlLmxlbmd0aCAtIDFdO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gcHQoZSwgbikge1xuICAgICAgICBmb3IgKHZhciBsID0gW10sIGEgPSAwOyBhIDwgZS5sZW5ndGg7IGErKylcbiAgICAgICAgICBsW2FdID0gbihlW2FdLCBhKTtcbiAgICAgICAgcmV0dXJuIGw7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBzb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gICAgICBmdW5jdGlvbiB4bihlKSB7XG4gICAgICAgIHJldHVybiBlLmNoYXJDb2RlQXQoMCkgPj0gNzY4ICYmIGduLnRlc3QoZSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBPdChlLCBuLCBsKSB7XG4gICAgICAgIGZvciAoOyAobCA8IDAgPyBuID4gMCA6IG4gPCBlLmxlbmd0aCkgJiYgeG4oZS5jaGFyQXQobikpOyApXG4gICAgICAgICAgbiArPSBsO1xuICAgICAgICByZXR1cm4gbjtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGF0KGUsIG4sIGwpIHtcbiAgICAgICAgZm9yICh2YXIgYSA9IG4gPiBsID8gLTEgOiAxOyA7ICkge1xuICAgICAgICAgIGlmIChuID09IGwpXG4gICAgICAgICAgICByZXR1cm4gbjtcbiAgICAgICAgICB2YXIgdSA9IChuICsgbCkgLyAyLCBnID0gYSA8IDAgPyBNYXRoLmNlaWwodSkgOiBNYXRoLmZsb29yKHUpO1xuICAgICAgICAgIGlmIChnID09IG4pXG4gICAgICAgICAgICByZXR1cm4gZShnKSA/IG4gOiBsO1xuICAgICAgICAgIGUoZykgPyBsID0gZyA6IG4gPSBnICsgYTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gdW4oZSwgbiwgbCwgYSkge1xuICAgICAgICBpZiAoIWUpXG4gICAgICAgICAgcmV0dXJuIGEobiwgbCwgXCJsdHJcIiwgMCk7XG4gICAgICAgIGZvciAodmFyIHUgPSAhMSwgZyA9IDA7IGcgPCBlLmxlbmd0aDsgKytnKSB7XG4gICAgICAgICAgdmFyIE8gPSBlW2ddO1xuICAgICAgICAgIChPLmZyb20gPCBsICYmIE8udG8gPiBuIHx8IG4gPT0gbCAmJiBPLnRvID09IG4pICYmIChhKE1hdGgubWF4KE8uZnJvbSwgbiksIE1hdGgubWluKE8udG8sIGwpLCBPLmxldmVsID09IDEgPyBcInJ0bFwiIDogXCJsdHJcIiwgZyksIHUgPSAhMCk7XG4gICAgICAgIH1cbiAgICAgICAgdSB8fCBhKG4sIGwsIFwibHRyXCIpO1xuICAgICAgfVxuICAgICAgdmFyIHFlID0gbnVsbDtcbiAgICAgIGZ1bmN0aW9uIERlKGUsIG4sIGwpIHtcbiAgICAgICAgdmFyIGE7XG4gICAgICAgIHFlID0gbnVsbDtcbiAgICAgICAgZm9yICh2YXIgdSA9IDA7IHUgPCBlLmxlbmd0aDsgKyt1KSB7XG4gICAgICAgICAgdmFyIGcgPSBlW3VdO1xuICAgICAgICAgIGlmIChnLmZyb20gPCBuICYmIGcudG8gPiBuKVxuICAgICAgICAgICAgcmV0dXJuIHU7XG4gICAgICAgICAgZy50byA9PSBuICYmIChnLmZyb20gIT0gZy50byAmJiBsID09IFwiYmVmb3JlXCIgPyBhID0gdSA6IHFlID0gdSksIGcuZnJvbSA9PSBuICYmIChnLmZyb20gIT0gZy50byAmJiBsICE9IFwiYmVmb3JlXCIgPyBhID0gdSA6IHFlID0gdSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGEgIT0gbnVsbCA/IGEgOiBxZTtcbiAgICAgIH1cbiAgICAgIHZhciB3ZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgZSA9IFwiYmJiYmJiYmJidHN0d3NiYmJiYmJiYmJiYmJiYnNzc3R3Tk4lJSVOTk5OTk4sTixOMTExMTExMTExMU5OTk5OTk5MTExMTExMTExMTExMTExMTExMTExMTExMTE5OTk5OTkxMTExMTExMTExMTExMTExMTExMTExMTExMTk5OTmJiYmJiYnNiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYixOJSUlJU5OTk5MTk5OTk4lJTExTkxOTk4xTE5OTk5OTExMTExMTExMTExMTExMTExMTExMTExOTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE5cIiwgbiA9IFwibm5ubm5uTk5yJSVyLHJOTm1tbW1tbW1tbW1tcnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycnJycn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PT0gYW4gPyB4dCA/IFwiTFwiIDogXCJSXCIgOiBZLCB3ciA9IEZ0OyB3ciA8IE50OyArK3dyKVxuICAgICAgICAgICAgICAgIF9bd3JdID0gdmk7XG4gICAgICAgICAgICAgIEZ0ID0gTnQgLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIGZvciAodmFyIFl0ID0gW10sIFFuLCBVdCA9IDA7IFV0IDwgZWU7IClcbiAgICAgICAgICAgIGlmIChPLnRlc3QoX1tVdF0pKSB7XG4gICAgICAgICAgICAgIHZhciBJbCA9IFV0O1xuICAgICAgICAgICAgICBmb3IgKCsrVXQ7IFV0IDwgZWUgJiYgTy50ZXN0KF9bVXRdKTsgKytVdClcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgIFl0LnB1c2gobmV3IEgoMCwgSWwsIFV0KSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgb3IgPSBVdCwgVXIgPSBZdC5sZW5ndGgsIHpyID0gRyA9PSBcInJ0bFwiID8gMSA6IDA7XG4gICAgICAgICAgICAgIGZvciAoKytVdDsgVXQgPCBlZSAmJiBfW1V0XSAhPSBcIkxcIjsgKytVdClcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgIGZvciAodmFyIFp0ID0gb3I7IFp0IDwgVXQ7IClcbiAgICAgICAgICAgICAgICBpZiAoTC50ZXN0KF9bWnRdKSkge1xuICAgICAgICAgICAgICAgICAgb3IgPCBadCAmJiAoWXQuc3BsaWNlKFVyLCAwLCBuZXcgSCgxLCBvciwgWnQpKSwgVXIgKz0genIpO1xuICAgICAgICAgICAgICAgICAgdmFyIG1pID0gWnQ7XG4gICAgICAgICAgICAgICAgICBmb3IgKCsrWnQ7IFp0IDwgVXQgJiYgTC50ZXN0KF9bWnRdKTsgKytadClcbiAgICAgICAgICAgICAgICAgICAgO1xuICAgICAgICAgICAgICAgICAgWXQuc3BsaWNlKFVyLCAwLCBuZXcgSCgyLCBtaSw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B7IG5hbWU6IG4gfSksIGUgPSBkcihuLCBlKSwgZS5uYW1lID0gbi5uYW1lO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICh0eXBlb2YgZSA9PSBcInN0cmluZ1wiICYmIC9eW1xcd1xcLV0rXFwvW1xcd1xcLV0rXFwreG1sJC8udGVzdChlKSlcbiAgICAgICAgICAgIHJldHVybiBmbihcImFwcGxpY2F0aW9uL3htbFwiKTtcbiAgICAgICAgICBpZiAodHlwZW9mIGUgPT0gXCJzdHJpbmdcIiAmJiAvXltcXHdcXC1dK1xcL1tcXHdcXC1dK1xcK2pzb24kLy50ZXN0KGUpKVxuICAgICAgICAgICAgcmV0dXJuIGZuKFwiYXBwbGljYXRpb24vanNvblwiKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHlwZW9mIGUgPT0gXCJzdHJpbmdcIiA/IHsgbmFtZTogZSB9IDogZSB8fCB7IG5hbWU6IFwibnVsbFwiIH07XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBabihlLCBuKSB7XG4gICAgICAgIG4gPSBmbihuKTtcbiAgICAgICAgdmFyIGwgPSBObltuLm5hbWVdO1xuICAgICAgICBpZiAoIWwpXG4gICAgICAgICAgcmV0dXJuIFpuKGUsIFwidGV4dC9wbGFpblwiKTtcbiAgICAgICAgdmFyIGEgPSBsKGUsIG4pO1xuICAgICAgICBpZiAodnIuaGFzT3duUHJvcGVydHkobi5uYW1lKSkge1xuICAgICAgICAgIHZhciB1ID0gdnJbbi5uYW1lXTtcbiAgICAgICAgICBmb3IgKHZhciBnIGluIHUpXG4gICAgICAgICAgICAhdS5oYXNPd25Qcm9wZXJ0eShnKSB8fCAoYS5oYXNPd25Qcm9wZXJ0eShnKSAmJiAoYVtcIl9cIiArIGddID0gYVtnXSksIGFbZ10gPSB1W2ddKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoYS5uYW1lID0gbi5uYW1lLCBuLmhlbHBlclR5cGUgJiYgKGEuaGVscGVyVHlwZSA9IG4uaGVscGVyVHlwZSksIG4ubW9kZVByb3BzKVxuICAgICAgICAgIGZvciAodmFyIE8gaW4gbi5tb2RlUHJvcHMpXG4gICAgICAgICAgICBhW09dID0gbi5tb2RlUHJvcHNbT107XG4gICAgICAgIHJldHVybiBhO1xuICAgICAgfVxuICAgICAgdmFyIHZyID0ge307XG4gICAgICBmdW5jdGlvbiBJbyhlLCBuKSB7XG4gICAgICAgIHZhciBsID0gdnIuaGFzT3duUHJvcGVydHkoZSkgPyB2cltlXSA6IHZyW2VdID0ge307XG4gICAgICAgIGxlKG4sIGwpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gcW4oZSwgbikge1xuICAgICAgICBpZiAobiA9PT0gITApXG4gICAgICAgICAgcmV0dXJuIG47XG4gICAgICAgIGlmIChlLmNvcHlTdGF0ZSlcbiAgICAgICAgICByZXR1cm4gZS5jb3B5U3RhdGUobik7XG4gICAgICAgIHZhciBsID0ge307XG4gICAgICAgIGZvciAodmFyIGEgaW4gbikge1xuICAgICAgICAgIHZhciB1ID0gblthXTtcbiAgICAgICAgICB1IGluc3RhbmNlb2YgQXJyYXkgJiYgKHUgPSB1LmNvbmNhdChbXSkpLCBsW2FdID0gdTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbDtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIG1yKGUsIG4pIHtcbiAgICAgICAgZm9yICh2YXIgbDsgZS5pbm5lck1vZGUgJiYgKGwgPSBlLmlubmVyTW9kZShuKSwgISghbCB8fCBsLm1vZGUgPT0gZSkpOyApXG4gICAgICAgICAgbiA9IGwuc3RhdGUsIGUgPSBsLm1vZGU7XG4gICAgICAgIHJldHVybiBsIHx8IHsgbW9kZTogZSwgc3RhdGU6IG4gfTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIE5pKGUsIG4sIGwpIHtcbiAgICAgICAgcmV0dXJuIGUuc3RhcnRTdGF0ZSA/IGUuc3RhcnRTdGF0ZShuLCBs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IGcgPSB1LmNodW5rU2l6ZSgpO1xuICAgICAgICAgICAgaWYgKG4gPCBnKSB7XG4gICAgICAgICAgICAgIGwgPSB1O1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG4gLT0gZztcbiAgICAgICAgICB9XG4gICAgICAgIHJldHVybiBsLmxpbmVzW25dO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gX24oZSwgbiwgbCkge1xuICAgICAgICB2YXIgYSA9IFtdLCB1ID0gbi5saW5lO1xuICAgICAgICByZXR1cm4gZS5pdGVyKG4ubGluZSwgbC5saW5lICsgMSwgZnVuY3Rpb24oZykge1xuICAgICAgICAgIHZhciBPID0gZy50ZXh0O1xuICAgICAgICAgIHUgPT0gbC5saW5lICYmIChPID0gTy5zbGljZSgwLCBsLmNoKSksIHUgPT0gbi5saW5lICYmIChPID0gTy5zbGljZShuLmNoKSksIGEucHVzaChPKSwgKyt1O1xuICAgICAgICB9KSwgYTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIFpyKGUsIG4sIGwpIHtcbiAgICAgICAgdmFyIGEgPSBbXTtcbiAgICAgICAgcmV0dXJuIGUuaXRlcihuLCBsLCBmdW5jdGlvbih1KSB7XG4gICAgICAgICAgYS5wdXNoKHUudGV4dCk7XG4gICAgICAgIH0pLCBhO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gRG4oZSwgbikge1xuICAgICAgICB2YXIgbCA9IG4gLSBlLmhlaWdodDtcbiAgICAgICAgaWYgKGwpXG4gICAgICAgICAgZm9yICh2YXIgYSA9IGU7IGE7IGEgPSBhLnBhcmVudClcbiAgICAgICAgICAgIGEuaGVpZ2h0ICs9IGw7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBzdChlKSB7XG4gICAgICAgIGlmIChlLnBhcmVudCA9PSBudWxsKVxuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICBmb3IgKHZhciBuID0gZS5wYXJlbnQsIGwgPSB0ZShuLmxpbmVzLCBlKSwgYSA9IG4ucGFyZW50OyBhOyBuID0gYSwgYSA9IGEucGFyZW50KVxuICAgICAgICAgIGZvciAodmFyIHUgPSAwOyBhLmNoaWxkcmVuW3VdICE9IG47ICsrdSlcbiAgICAgICAgICAgIGwgKz0gYS5jaGlsZHJlblt1XS5jaHVua1NpemUoKTtcbiAgICAgICAgcmV0dXJuIGwgKyBuLmZpcnN0O1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gem4oZSwgbikge1xuICAgICAgICB2YXIgbCA9IGUuZmlyc3Q7XG4gICAgICAgIGU6XG4gICAgICAgICAgZG8ge1xuICAgICAgICAgICAgZm9yICh2YXIgYSA9IDA7IGEgPCBlLmNoaWxkcmVuLmxlbmd0aDsgKythKSB7XG4gICAgICAgICAgICAgIHZhciB1ID0gZS5jaGlsZHJlblthXSwgZyA9IHUuaGVpZ2h0O1xuICAgICAgICAgICAgICBpZiAobiA8IGcpIHtcbiAgICAgICAgICAgICAgICBlID0gdTtcbiAgICAgICAgICAgICAgICBjb250aW51ZSBlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIG4gLT0gZywgbCArPSB1LmNodW5rU2l6ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGw7XG4gICAgICAgICAgfSB3aGlsZSAoIWUubGluZXMpO1xuICAgICAgICBmb3IgKHZhciBPID0gMDsgTyA8IGUubGluZXMubGVuZ3RoOyArK08pIHtcbiAgICAgICAgICB2YXIgTCA9IGUubGluZXNbT10sIEggPSBMLmhlaWdodDtcbiAgICAgICAgICBpZiAobiA8IEgpXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBuIC09IEg7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGwgKyBPO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24geihlLCBuKSB7XG4gICAgICAgIHJldHVybiBuID49IGUuZmlyc3QgJiYgbiA8IGUuZmlyc3QgKyBlLnNpem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zdGF0ZSkgOiB0aGlzLnN0YXRlO1xuICAgICAgICByZXR1cm4gdGhpcy5tYXhMb29rQWhlYWQgPiAwID8gbmV3IE5vKG4sIHRoaXMubWF4TG9va0FoZWFkKSA6IG47XG4gICAgICB9O1xuICAgICAgZnVuY3Rpb24gVXMoZSwgbiwgbCwgYSkge1xuICAgICAgICB2YXIgdSA9IFtlLnN0YXRlLm1vZGVHZW5dLCBnID0ge307XG4gICAgICAgIFlzKFxuICAgICAgICAgIGUsXG4gICAgICAgICAgbi50ZXh0LFxuICAgICAgICAgIGUuZG9jLm1vZGUsXG4gICAgICAgICAgbCxcbiAgICAgICAgICBmdW5jdGlvbihVLCBHKSB7XG4gICAgICAgICAgICByZXR1cm4gdS5wdXNoKFUsIEcpO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZyxcbiAgICAgICAgICBhXG4gICAgICAgICk7XG4gICAgICAgIGZvciAodmFyIE8gPSBsLnN0YXRlLCBMID0gZnVuY3Rpb24oVSkge1xuICAgICAgICAgIGwuYmFzZVRva2VucyA9IHU7XG4gICAgICAgICAgdmFyIEcgPSBlLnN0YXRlLm92ZXJsYXlzW1VdLCBZID0gMSwgZWUgPSAwO1xuICAgICAgICAgIGwuc3RhdGUgPSAhMCwgWXMoZSwgbi50ZXh0LCBHLm1vZGUsIGwsIGZ1bmN0aW9uKF8sIGFlKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBjZSA9IFk7IGVlIDwgXzsgKSB7XG4gICAgICAgICAgICAgIHZhciB5ZSA9IHVbWV07XG4gICAgICAgICAgICAgIHllID4gXyAmJiB1LnNwbGljZShZLCAxLCBfLCB1W1kgKyAxXSwgeWUpLCBZICs9IDIsIGVlID0gTWF0aC5taW4oXywgeWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCEhYWUpXG4gICAgICAgICAgICAgIGlmIChHLm9wYXF1ZSlcbiAgICAgICAgICAgICAgICB1LnNwbGljZShjZSwgWSAtIGNlLCBfLCBcIm92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Ml0pO1xuICAgICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGU7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBZcyhlLCBuLCBsLCBhLCB1LCBnLCBPKSB7XG4gICAgICAgIHZhciBMID0gbC5mbGF0dGVuU3BhbnM7XG4gICAgICAgIEwgPT0gbnVsbCAmJiAoTCA9IGUub3B0aW9ucy5mbGF0dGVuU3BhbnMpO1xuICAgICAgICB2YXIgSCA9IDAsIFUgPSBudWxsLCBHID0gbmV3IFN0KG4sIGUub3B0aW9ucy50YWJTaXplLCBhKSwgWSwgZWUgPSBlLm9wdGlvbnMuYWRkTW9kZUNsYXNzICYmIFtudWxsXTtcbiAgICAgICAgZm9yIChuID09IFwiXCIgJiYgUXMoVnMobCwgYS5zdGF0ZSksIGcpOyAhRy5lb2woKTsgKSB7XG4gICAgICAgICAgaWYgKEcucG9zID4gZS5vcHRpb25zLm1heEhpZ2hsaWdodExlbmd0aCA/IChMID0gITEsIE8gJiYgamEoZSwgbiwgYSwgRy5wb3MpLCBHLnBvcyA9IG4ubGVuZ3RoLCBZID0gbnVsbCkgOiBZID0gUXMoVWEobCwgRywgYS5zdGF0ZSwgZWUpLCBnKSwgZWUpIHtcbiAgICAgICAgICAgIHZhciBfID0gZWVbMF0ubmFtZTtcbiAgICAgICAgICAgIF8gJiYgKFkgPSBcIm0tXCIgKyAoWSA/IF8gKyBcIiBcIiArIFkgOiBfKSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghTCB8fCBVICE9IFkpIHtcbiAgICAgICAgICAgIGZvciAoOyBIIDwgRy5zdGFydDsgKVxuICAgICAgICAgICAgICBIID0gTWF0aC5taW4oRy5zdGFydCwgSCArIDVlMyksIHUoSCwgVSk7XG4gICAgICAgICAgICBVID0gWTtcbiAgICAgICAgICB9XG4gICAgICAgICAgRy5zdGFydCA9IEcucG9zO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoOyBIIDwgRy5wb3M7ICkge1xuICAgICAgICAgIHZhciBhZSA9IE1hdGgubWluKEcucG9zLCBIICsgNWUzKTtcbiAgICAgICAgICB1KGFlLCBVKSwgSCA9IGFlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB5YyhlLCBuLCBsKSB7XG4gICAgICAgIGZvciAodmFyIGEsIHUsIGcgPSBlLmRvYywgTyA9IGwgPyAtMSA6IG4gLSAoZS5kb2MubW9kZS5pbm5lck1vZGUgPyAxZTMgOiAxMDApLCBMID0gbjsgTCA+IE87IC0tTCkge1xuICAgICAgICAgIGlmIChMIDw9IGcuZmlyc3QpXG4gICAgICAgICAgICByZXR1cm4gZy5maXJzdDtcbiAgICAgICAgICB2YXIgSCA9IEZlKGcsIEwgLSAxKSwgVSA9IEguc3RhdGVBZnRlcjtcbiAgICAgICAgICBpZiAoVSAmJiAoIWwgfHwgTCArIChVIGluc3RhbmNlb2YgTm8gPyBVLmxvb2tBaGVhZCA6IDApIDw9IGcubW9kZUZyb250aWVyKSlcbiAgICAgICAgICAgIHJldHVybiBMO1xuICAgICAgICAgIHZhciBHID0gaWUoSC50ZXh0LCBudWxsLCBlLm9wdGlvbnMudGFiU2l6ZSk7XG4gICAgICAgICAgKHUgPT0gbnVsbCB8fCBhID4gRykgJiYgKHUgPSBMIC0gMSwgYSA9IEcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB1O1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQWMoZSwgbikge1xuICAgICAgICBpZiAoZS5tb2RlRnJvbnRpZXIgPSBNYXRoLm1pbihlLm1vZGVGcm9udGllciwgbiksICEoZS5oaWdobGlnaHRGcm9udGllciA8IG4gLSAxMCkpIHtcbiAgICAgICAgICBmb3IgKHZhciBsID0gZS5maXJzdCwgYSA9IG4gLSAxOyBhID4gbDsgYS0tKSB7XG4gICAgICAgICAgICB2YXIgdSA9IEZlKGUsIGEpLnN0YXRlQWZ0ZXI7XG4gICAgICAgICAgICBpZiAodSAmJiAoISh1IGluc3RhbmNlb2YgTm8pIHx8IGEgKyB1Lmxvb2tBaGVhZCA8IG4pKSB7XG4gICAgICAgICAgICAgIGwgPSBhICsgMTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGUuaGlnaGxpZ2h0RnJvbnRpZXIgPSBNYXRoLm1pbihlLmhpZ2hsaWdodEZyb250aWVyLCBsKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdmFyIEtzID0gITEsIGVyID0gITE7XG4gICAgICBmdW5jdGlvbiBiYygpIHtcbiAgICAgICAgS3MgPSAhMDtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIENjKCkge1xuICAgICAgICBlciA9ICEwO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gT28oZSwgbiwgbCkge1xuICAgICAgICB0aGlzLm1hcmtlciA9IGUsIHRoaXMuZnJvbSA9IG4sIHRoaXMudG8gPSBsO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gUGkoZSwgbikge1xuICAgICAgICBpZiAoZSlcbiAgICAgICAgICBmb3IgKHZhciBsID0gMDsgbCA8IGUubGVuZ3RoOyArK2wpIHtcbiAgICAgICAgICAgIHZhciBhID0gZVtsXTtcbiAgICAgICAgICAgIGlmIChhLm1hcmtlciA9PSBuKVxuICAgICAgICAgICAgICByZXR1cm4gYTtcbiAgICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBFYyhlLCBuKSB7XG4gICAgICAgIGZvciAodmFyIGwsIGEgPSAwOyBhIDwgZS5sZW5ndGg7ICsrYSlcbiAgICAgICAgICBlW2FdICE9IG4gJiYgKGwgfHwgKGwgPSBbXSkpLnB1c2goZVthXSk7XG4gICAgICAgIHJldHVybiBsO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gU2MoZSwgbiwgbCkge1xuICAgICAgICB2YXIgYSA9IGwgJiYgd2luZG93LldlYWtTZXQgJiYgKGwubWFya2VkU3BhbnMgfHwgK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AgICAgIGlmIChlKVxuICAgICAgICAgIGZvciAodmFyIHUgPSAwOyB1IDwgZS5sZW5ndGg7ICsrdSkge1xuICAgICAgICAgICAgdmFyIGcgPSBlW3VdLCBPID0gZy5tYXJrZXIsIEwgPSBnLnRvID09IG51bGwgfHwgKE8uaW5jbHVzaXZlUmlnaHQgPyBnLnRvID49IG4gOiBnLnRvID4gbik7XG4gICAgICAgICAgICBpZiAoTCB8fCBnLmZyb20gPT0gbiAmJiBPLnR5cGUgPT0gXCJib29rbWFya1wiICYmICghbCB8fCBnLm1hcmtlci5pbnNlcnRMZWZ0KSkge1xuICAgICAgICAgICAgICB2YXIgSCA9IGcuZnJvbSA9PSBudWxsIHx8IChPLmluY2x1c2l2ZUxlZnQgPyBnLmZyb20gPD0gbiA6IGcuZnJvbSA8IG4pO1xuICAgICAgICAgICAgICAoYSB8fCAoYSA9IFtdKSkucHVzaChuZXcgT28oXG4gICAgICAgICAgICAgICAgTyxcbiAgICAgICAgICAgICAgICBIID8gbnVsbCA6IGcuZnJvbSAtIG4sXG4gICAgICAgICAgICAgICAgZy50byA9PSBudWxsID8gbnVsbCA6IGcudG8gLSBuXG4gICAgICAgICAgICAgICkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGE7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB6YShlLCBuKSB7XG4gICAgICAgIGlmIChuLmZ1bGwpXG4gICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIHZhciBsID0geihlLCBuLmZyb20ubGluZSkgJiYgRmUoZSwgbi5mcm9tLmxpbmUpLm1hcmtlZFNwYW5zLCBhID0geihlLCBuLnRvLmxpbmUpICYmIEZlKGUsIG4udG8ubGluZSkubWFya2VkU3BhbnM7XG4gICAgICAgIGlmICghbCAmJiAhYSlcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgdmFyIHUgPSBuLmZyb20uY2gsIGcgPSBuLnRvLmNoLCBPID0gb2Uobi5mcm9tLCBuLnRvKSA9PSAwLCBMID0geGMobCwgdSwgTyksIEggPSB3YyhhLCBnLCBPKSwgVSA9IG4udGV4dC5sZW5ndGggPT0gMSwgRyA9IEJlKG4udGV4dCkubGVuZ3RoICsgKFUgPyB1IDogMCk7XG4gICAgICAgIGlmIChMKVxuICAgICAgICAgIGZvciAodmFyIFkgPSAwOyBZIDwgTC5sZW5ndGg7ICsrWSkge1xuICAgICAgICAgICAgdmFyIGVlID0gTFtZXTtcbiAgICAgICAgICAgIGlmIChlZS50byA9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBfID0gUGkoSCwgZWUubWFya2VyKTtcbiAgICAgICAgICAgICAgXyA/IFUgJiYgKGVlLnRvID0gXy50byA9PSBudWxsID8gbnVsbCA6IF8udG8gKyBHKSA6IGVlLnRvID0gdTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIGlmIChIKVxuICAgICAgICAgIGZvciAodmFyIGFlID0gMDsgYWUgPCBILmxlbmd0aDsgKythZSkge1xuICAgICAgICAgICAgdmFyIGNlID0gSFthZV07XG4gICAgICAgICAgICBpZiAoY2UudG8gIT0gbnVsbCAmJiAoY2UudG8gKz0gRyksIGNlLmZyb20gPT0gbnVsbCkge1xuICAgICAgICAgICAgICB2YXIgeWUgPSBQaShMLCBjZS5tYXJrZXIpO1xuICAgICAgICAgICAgICB5ZSB8fCAoY2UuZnJvbSA9IEcsIFUgJiYgKEwgfHwgKEwgPSBbXSkpLnB1c2goY2UpKTtcbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICBjZS5mcm9tICs9IEcsIFUgJiYgKEwgfHwgKEwgPSBbXSkpLnB1c2goY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgTCAmJiAoTCA9IFhzKEwpKSwgSCAmJiBIICE9IEwgJiYgKEggPSBYcyhIKSk7XG4gICAgICAgIHZhciBDZSA9IFtMXTtcbiAgICAgICAgaWYgKCFVKSB7XG4gICA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1xuICAgICAgICAgICAgICBjZS5yZWFkT25seSAmJiAoIWEgfHwgdGUoYSwgY2UpID09IC0xKSAmJiAoYSB8fCAoYSA9IFtdKSkucHVzaChjZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pLCAhYSlcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgZm9yICh2YXIgdSA9IFt7IGZyb206IG4sIHRvOiBsIH1dLCBnID0gMDsgZyA8IGEubGVuZ3RoOyArK2cpXG4gICAgICAgICAgZm9yICh2YXIgTyA9IGFbZ10sIEwgPSBPLmZpbmQoMCksIEggPSAwOyBIIDwgdS5sZW5ndGg7ICsrSCkge1xuICAgICAgICAgICAgdmFyIFUgPSB1W0hdO1xuICAgICAgICAgICAgaWYgKCEob2UoVS50bywgTC5mcm9tKSA8IDAgfHwgb2UoVS5mcm9tLCBMLnRvKSA+IDApKSB7XG4gICAgICAgICAgICAgIHZhciBHID0gW0gsIDFdLCBZID0gb2UoVS5mcm9tLCBMLmZyb20pLCBlZSA9IG9lKFUudG8sIEwudG8pO1xuICAgICAgICAgICAgICAoWSA8IDAgfHwgIU8uaW5jbHVzaXZlTGVmdCAmJiAhWSkgJiYgRy5wdXNoKHsgZnJvbTogVS5mcm9tLCB0bzogTC5mcm9tIH0pLCAoZWUgPiAwIHx8ICFPLmluY2x1c2l2ZVJpZ2h0ICYmICFlZSkgJiYgRy5wdXNoKHsgZnJvbTogTC50bywgdG86IFUudG8gfSksIHUuc3BsaWNlLmFwcGx5KHUsIEcpLCBIICs9IEcubGVuZ3RoIC0gMztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIHJldHVybiB1O1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gSnMoZSkge1xuICAgICAgICB2YXIgbiA9IGUubWFya2VkU3BhbnM7XG4gICAgICAgIGlmICghIW4pIHtcbiAgICAgICAgICBmb3IgKHZhciBsID0gMDsgbCA8IG4ubGVuZ3RoOyArK2wpXG4gICAgICAgICAgICBuW2xdLm1hcmtlci5kZXRhY2hMaW5lKGUpO1xuICAgICAgICAgIGUubWFya2VkU3BhbnMgPSBudWxsO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBacyhlLCBuKSB7XG4gICAgICAgIGlmICghIW4pIHtcbiAgICAgICAgICBmb3IgKHZhciBsID0gMDsgbCA8IG4ubGVuZ3RoOyArK2wpXG4gICAgICAgICAgICBuW2xdLm1hcmtlci5hdHRhY2hMaW5lKGUpO1xuICAgICAgICAgIGUubWFya2VkU3BhbnMgPSBuO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBQbyhlKSB7XG4gICAgICAgIHJldHVybiBlLmluY2x1c2l2ZUxlZnQgPyAtMSA6IDA7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBGbyhlKSB7XG4gICAgICAgIHJldHVybiBlLmluY2x1c2l2ZVJpZ2h0ID8gMSA6IDA7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBWYShlLCBuKSB7XG4gICAgICAgIHZhciBsID0gZS5saW5lcy5sZW5ndGggLSBuLmxpbmVzLmxlbmd0aDtcbiAgICAgICAgaWYgKGwgIT0gMClcbiAgICAgICAgICByZXR1cm4gbDtcbiAgICAgICAgdmFyIGEgPSBlLmZpbmQoKSwgdSA9IG4uZmluZCgpLCBnID0gb2UoYS5mcm9tLCB1LmZyb20pIHx8IFBvKGUpIC0gUG8obik7XG4gICAgICAgIGlmIChnKVxuICAgICAgICAgIHJldHVybiAtZztcbiAgICAgICAgdmFyIE8gPSBvZShhLnRvLCB1LnRvKSB8fCBGbyhlKSAtIEZvKG4pO1xuICAgICAgICByZXR1cm4gTyB8fCBuLmlkIC0gZS5pZDtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHFzKGUsIG4pIHtcbiAgICAgICAgdmFyIGwgPSBlciAmJiBlLm1hcmtlZFNwYW5zLCBhO1xuICAgICAgICBpZiAobClcbiAgICAgICAgICBmb3IgKHZhciB1ID0gdm9pZCAwLCBnID0gMDsgZyA8IGwubGVuZ3RoOyArK2cpXG4gICAgICAgICAgICB1ID0gbFtnXSwgdS5tYXJrZXIuY29sbGFwc2VkICYmIChuID8gdS5mcm9tIDogdS50bykgPT0gbnVsbCAmJiAoIWEgfHwgVmEoYSwgdS5tYXJrZXIpIDwgMCkgJiYgKGEgPSB1Lm1hcmtlcik7XG4gICAgICAgIHJldHVybiBhO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gX3MoZSkge1xuICAgICAgICByZXR1cm4gcXMoZSwgITApO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gTG8oZSkge1xuICAgICAgICByZXR1cm4gcXMoZSwgITEpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gRGMoZSwgbikge1xuICAgICAgICB2YXIgbCA9IGVyICYmIGUubWFya2VkU3BhbnMsIGE7XG4gICAgICAgIGlmIChsKVxuICAgICAgICAgIGZvciAodmFyIHUgPSAwOyB1IDwgbC5sZW5ndGg7ICsrdSkge1xuICAgICAgICAgICAgdmFyIGcgPSBsW3VdO1xuICAgICAgICAgICAgZy5tYXJrZXIuY29sbGFwc2VkICYmIChnLmZyb20gPT0gbnVsbCB8fCBnLmZyb20gPCBuKSAmJiAoZy50byA9PSBudWxsIHx8IGcudG8gPiBuKSAmJiAoIWEgfHwgVmEoYSwgZy5tYXJrZXIpIDwgMCkgJiYgKGEgPSBnLm1hcmtlcik7XG4gICAgICAgICAgfVxuICAgICAgICByZXR1cm4gYTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGV1KGUsIG4sIGwsIGEsIHUpIHtcbiAgICAgICAgdmFyIGcgPSBGZShlLCBuKSwgTyA9IGVyICYmIGcubWFya2VkU3BhbnM7XG4gICAgICAgIGlmIChPKVxuICAgICAgICAgIGZvciAodmFyIEwgPSAwOyBMIDwgTy5sZW5ndGg7ICsrTCkge1xuICAgICAgICAgICAgdmFyIEggPSBPW0xdO1xuICAgICAgICAg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k7XG4gICAgICAgIHJldHVybiBsO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gV2EoZSwgbikge1xuICAgICAgICB2YXIgbCA9IEZlKGUsIG4pLCBhID0gT24obCk7XG4gICAgICAgIHJldHVybiBsID09IGEgPyBuIDogc3QoYSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB0dShlLCBuKSB7XG4gICAgICAgIGlmIChuID4gZS5sYXN0TGluZSgpKVxuICAgICAgICAgIHJldHVybiBuO1xuICAgICAgICB2YXIgbCA9IEZlKGUsIG4pLCBhO1xuICAgICAgICBpZiAoIWdyKGUsIGwpKVxuICAgICAgICAgIHJldHVybiBuO1xuICAgICAgICBmb3IgKDsgYSA9IExvKGwpOyApXG4gICAgICAgICAgbCA9IGEuZmluZCgxLCAhMCkubGluZTtcbiAgICAgICAgcmV0dXJuIHN0KGwpICsgMTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGdyKGUsIG4pIHtcbiAgICAgICAgdmFyIGwgPSBlciAmJiBuLm1hcmtlZFNwYW5zO1xuICAgICAgICBpZiAobCkge1xuICAgICAgICAgIGZvciAodmFyIGEgPSB2b2lkIDAsIHUgPSAwOyB1IDwgbC5sZW5ndGg7ICsrdSlcbiAgICAgICAgICAgIGlmIChhID0gbFt1XSwgISFhLm1hcmtlci5jb2xsYXBzZWQpIHtcbiAgICAgICAgICAgICAgaWYgKGEuZnJvbSA9PSBudWxsKVxuICAgICAgICAgICAgICAgIHJldHVybiAhMDtcbiAgICAgICAgICAgICAgaWYgKCFhLm1hcmtlci53aWRnZXROb2RlICYmIGEuZnJvbSA9PSAwICYmIGEubWFya2VyLmluY2x1c2l2ZUxlZnQgJiYgR2EoZSwgbiwgYSkpXG4gICAgICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBHYShlLCBuLCBsKSB7XG4gICAgICAgIGlmIChsLnRvID09IG51bGwpIHtcbiAgICAgICAgICB2YXIgYSA9IGwubWFya2VyLmZpbmQoMSwgITApO1xuICAgICAgICAgIHJldHVybiBHYShlLCBhLmxpbmUsIFBpKGEubGluZS5tYXJrZWRTcGFucywgbC5tYXJrZXIpKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobC5tYXJrZXIuaW5jbHVzaXZlUmlnaHQgJiYgbC50byA9PSBuLnRleHQubGVuZ3RoKVxuICAgICAgICAgIHJldHVybiAhMDtcbiAgICAgICAgZm9yICh2YXIgdSA9IHZvaWQgMCwgZyA9IDA7IGcgPCBuLm1hcmtlZFNwYW5zLmxlbmd0aDsgKytnKVxuICAgICAgICAgIGlmICh1ID0gbi5tYXJrZWRTcGFuc1tnXSwgdS5tYXJrZXIuY29sbGFwc2VkICYmICF1Lm1hcmtlci53aWRnZXROb2RlICYmIHUuZnJvbSA9PSBsLnRvICYmICh1LnRvID09IG51bGwgfHwgdS50byAhPSBsLmZyb20pICYmICh1Lm1hcmtlci5pbmNsdXNpdmVMZWZ0IHx8IGwubWFya2VyLmluY2x1c2l2ZVJpZ2h0KSAmJiBHYShlLCBuLCB1KSlcbiAgICAgICAgICAgIHJldHVybiAhMDtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHRyKGUpIHtcbiAgICAgICAgZSA9IE9uKGUpO1xuICAgICAgICBmb3IgKHZhciBuID0gMCwgbCA9IGUucGFyZW50LCBhID0gMDsgYSA8IGwubGluZXMubGVuZ3RoOyArK2EpIHtcbiAgICAgICAgICB2YXIgdSA9IGwubGluZXNbYV07XG4gICAgICAgICAgaWYgKHUgPT0gZSlcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIG4gKz0gdS5oZWlnaHQ7XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIgZyA9IGwucGFyZW50OyBnOyBsID0gZywgZyA9IGwucGFyZW50KVxuICAgICAgICAgIGZvciAodmFyIE8gPSAwOyBPIDwgZy5jaGlsZHJlbi5sZW5ndGg7ICsrTykge1xuICAgICAgICAgICAgdmFyIEwgPSBnLmNoaWxkcmVuW09dO1xuICAgICAgICAgICAgaWYgKEwgPT0gbClcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBuICs9IEwuaGVpZ2h0O1xuICAgICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG47XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBCbyhlKSB7XG4gICAgICAgIGlmIChlLmhlaWdodCA9PSAwKVxuICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICBmb3IgKHZhciBuID0gZS50ZXh0Lmxlbmd0aCwgbCwgYSA9IGU7IGwgPSBfcyhhKTsgKSB7XG4gICAgICAgICAgdmFyIHUgPSBsLmZpbmQoMCwgITApO1xuICAgICAgICAgIGEgPSB1LmZyb20ubGluZSwgbiArPSB1LmZyb20uY2ggLSB1LnRvLmNoO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoYSA9IGU7IGwgPSBMbyhhKTsgKSB7XG4gICAgICAgICAgdmFyIGcgPSBsLmZpbmQoMCwgITApO1xuICAgICAgICAgIG4gLT0gYS50ZXh0Lmxlbmd0aCAtIGcuZnJvbS5jaCwgYSA9IGcudG8ubGluZSwgbiArPSBhLnRleHQubGVuZ3RoIC0gZy50by5jaDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbjtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIFFhKGUpIHtcbiAgICAgICAgdmFyIG4gPSBlLmRpc3BsYXksIGwgPSBlLmRvYztcbiAgICAgICAgbi5tYXhMaW5lID0gRmUobCwgbC5maXJzdCksIG4ubWF4TGluZUxlbmd0aCA9IEJvKG4ubWF4TGluZSksIG4ubWF4TGluZUNoYW5nZWQgPSAhMCwgbC5pdGVyKGZ1bmN0aW9uKGEpIHtcbiAgICAgICAgICB2YXIgdSA9IEJvKGEpO1xuICAgICAgICAgIHUgPiBuLm1heExpbmVMZW5ndGggJiYgKG4ubWF4TGluZUxlbmd0aCA9IH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DEpO1xuICAgICAgICAgICAgICBlLm1hcC5wdXNoKGUucG9zLCBlLnBvcyArIDEsIGNlKSwgZS5wb3MrKztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGUudHJhaWxpbmdTcGFjZSA9IEwuY2hhckNvZGVBdChuLmxlbmd0aCAtIDEpID09IDMyLCBsIHx8IGEgfHwgdSB8fCBVIHx8IGcgfHwgTykge1xuICAgICAgICAgICAgdmFyIFRlID0gbCB8fCBcIlwiO1xuICAgICAgICAgICAgYSAmJiAoVGUgKz0gYSksIHUgJiYgKFRlICs9IHUpO1xuICAgICAgICAgICAgdmFyIEVlID0gSShcInNwYW5cIiwgW0ddLCBUZSwgZyk7XG4gICAgICAgICAgICBpZiAoTylcbiAgICAgICAgICAgICAgZm9yICh2YXIgTmUgaW4gTylcbiAgICAgICAgICAgICAgICBPLmhhc093blByb3BlcnR5KE5lKSAmJiBOZSAhPSBcInN0eWxlXCIgJiYgTmUgIT0gXCJjbGFzc1wiICYmIEVlLnNldEF0dHJpYnV0ZShOZSwgT1tOZV0pO1xuICAgICAgICAgICAgcmV0dXJuIGUuY29udGVudC5hcHBlbmRDaGlsZChFZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGUuY29udGVudC5hcHBlbmRDaGlsZChHKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQmMoZSwgbikge1xuICAgICAgICBpZiAoZS5sZW5ndGggPiAxICYmICEvICAvLnRlc3QoZSkpXG4gICAgICAgICAgcmV0dXJuIGU7XG4gICAgICAgIGZvciAodmFyIGwgPSBuLCBhID0gXCJcIiwgdSA9IDA7IHUgPCBlLmxlbmd0aDsgdSsrKSB7XG4gICAgICAgICAgdmFyIGcgPSBlLmNoYXJBdCh1KTtcbiAgICAgICAgICBnID09IFwiIFwiICYmIGwgJiYgKHUgPT0gZS5sZW5ndGggLSAxIHx8IGUuY2hhckNvZGVBdCh1ICsgMSkgPT0gMzIpICY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JzcGFuXCIpKSksIHUuc2V0QXR0cmlidXRlKFwiY20tbWFya2VyXCIsIGwuaWQpKSwgdSAmJiAoZS5jbS5kaXNwbGF5LmlucHV0LnNldFVuZWRpdGFibGUodSksIGUuY29udGVudC5hcHBlbmRDaGlsZCh1KSksIGUucG9zICs9IG4sIGUudHJhaWxpbmdTcGFjZSA9ICExO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gJGMoZSwgbiwgbCkge1xuICAgICAgICB2YXIgYSA9IGUubWFya2VkU3BhbnMsIHUgPSBlLnRleHQsIGcgPSAwO1xuICAgICAgICBpZiAoIWEpIHtcbiAgICAgICAgICBmb3IgKHZhciBPID0gMTsgTyA8IGwubGVuZ3RoOyBPICs9IDIpXG4gICAgICAgICAgICBuLmFkZFRva2VuKG4sIHUuc2xpY2UoZywgZyA9IGxbT10pLCBudShsW08gKyAxXSwgbi5jbS5vcHRpb25zKSk7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIEwgPSB1Lmxlbmd0aCwgSCA9IDAsIFUgPSAxLCBHID0gXCJcIiwgWSwgZWUsIF8gPSAwLCBhZSwgY2UsIHllLCBDZSwgVGU7IDsgKSB7XG4gICAgICAgICAgaWYgKF8gPT0gSCkge1xuICAgICAgICAgICAgYWUgPSBjZSA9IHllID0gZWUgPSBcIlwiLCBUZSA9IG51bGwsIENlID0gbnVsbCwgXyA9IDEgLyAwO1xuICAgICAgICAgICAgZm9yICh2YXIgRWUgPSBbXSwgTmUgPSB2b2lkIDAsIGtlID0gMDsga2UgPCBhLmxlbmd0aDsgKytrZSkge1xuICAgICAgICAgICAgICB2YXIgSGUgPSBhW2tlXSwgWGUgPSBIZS5tYXJrZXI7XG4gICAgICAgICAgICAgIGlmIChYZS50eXBlID09IFwiYm9va21hcmtcIiAmJiBIZS5mcm9tID09IEggJiYgWGUud2lkZ2V0Tm9kZSlcbiAgICAgICAgICAgICAgICBFZS5wdXNoKFhlKTtcbiAgIC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A9IDA7IGp0IDwgTmUubGVuZ3RoOyBqdCArPSAyKVxuICAgICAgICAgICAgICAgIE5lW2p0ICsgMV0gPT0gXyAmJiAoY2UgKz0gXCIgXCIgKyBOZVtqdF0pO1xuICAgICAgICAgICAgaWYgKCFDZSB8fCBDZS5mcm9tID09IEgpXG4gICAgICAgICAgICAgIGZvciAodmFyIEN0ID0gMDsgQ3QgPCBFZS5sZW5ndGg7ICsrQ3QpXG4gICAgICAgICAgICAgICAgaXUobiwgMCwgRWVbQ3RdKTtcbiAgICAgICAgICAgIGlmIChDZSAmJiAoQ2UuZnJvbSB8fCAwKSA9PSBIKSB7XG4gICAgICAgICAgICAgIGlmIChpdShcbiAgICAgICAgICAgICAgICBuLFxuICAgICAgICAgICAgICAgIChDZS50byA9PSBudWxsID8gTCArIDEgOiBDZS50bykgLSBILFxuICAgICAgICAgICAgICAgIENlLm1hcmtlcixcbiAgICAgICAgICAgICAgICBDZS5mcm9tID09IG51bGxcbiAgICAgICAgICAgICAgKSwgQ2UudG8gPT0gbnVsbClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgIENlLnRvID09IEggJiYgKENlID0gITEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoSCA+PSBMKVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgZm9yICh2YXIgY24gPSBNYXRoLm1pbihMLCBfKTsgOyApIHtcbiAgICAgICAgICAgIGlmIChHKSB7XG4gICAgICAgICAgICAgIHZhciBybiA9IEggKyBHLmxlbmd0aDtcbiAgICAgICAgICAgICAgaWYgKCFDZSkge1xuICAgICAgICAgICAgICAgIHZhciBJdCA9IHJuID4gY24gPyBHLnNsaWNlKDAsIGNuIC0gSCkgOiBHO1xuICAgICAgICAgICAgICAgIG4uYWRkVG9rZW4oXG4gICAgICAgICAgICAgICAgICBuLFxuICAgICAgICAgICAgICAgICAgSXQsXG4gICAgICAgICAgICAgICAgICBZID8gWSArIGFlIDogYWUsXG4gICAgICAgICAgICAgICAgICB5ZSxcbiAgICAgICAgICAgICAgICAgIEggKyBJdC5sZW5ndGggPT0gXyA/IGNlIDogXCJcIixcbiAgICAgICAgICAgICAgICAgIGVlLFxuICAgICAgICAgICAgICAgICAgVGVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChybiA+PSBjbikge1xuICAgICAgICAgICAgICAgIEcgPSBHLnNsaWNlKGNuIC0gSCksIEggPSBjbjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBIID0gcm4sIHllID0gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIEcgPSB1LnNsaWNlKGcsIGcgPSBsW1UrK10pLCBZID0gbnUobFtVKytdLCBuLmNtLm9wdGlvbnMpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gb3UoZSwgbiwgbCkge1xuICAgICAgICB0aGlzLmxpbmUgPSBuLCB0aGlzLnJlc3QgPSBNYyhuKSwgdGhpcy5zaXplID0gdGhpcy5yZXN0ID8gc3QoQmUodGhpcy5yZXN0KSkgLSBsICsgMSA6IDEsIHRoaXMubm9kZSA9IHRoaXMudGV4dCA9IG51bGwsIHRoaXMuaGlkZGVuID0gZ3IoZSwgbik7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBIbyhlLCBuLCBsKSB7XG4gICAgICAgIGZvciAodmFyIGEgPSBbXSwgdSwgZyA9IG47IGcgPCBsOyBnID0gdSkge1xuICAgICAgICAgIHZhciBPID0gbmV3IG91KGUuZG9jLCBGZShlLmRvYywgZyksIGcpO1xuICAgICAgICAgIHUgPSBnICsgTy5zaXplLCBhLnB1c2goTyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGE7XG4gICAgICB9XG4gICAgICB2YXIgX3IgPSBudWxsO1xuICAgICAgZnVuY3Rpb24ga2MoZSkge1xuICAgICAgICBfciA/IF9yLm9wcy5wdXNoKGUpIDogZS5vd25zR3JvdXAgPSBfciA9IHtcbiAgICAgICAgICBvcHM6IFtlXSxcbiAgICAgICAgICBkZWxheWVkQ2FsbGJhY2tzOiBbXVxuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gamMoZSkge1xuICAgICAgICB2YXIgbiA9IGUuZGVsYXllZENhbGxiYWNrcywgbCA9IDA7XG4gICAgICAgIGRvIHtcbiAgICAgICAgICBmb3IgKDsgbCA8IG4ubGVuZ3RoOyBsKyspXG4gICAgICAgICAgICBuW2xdLmNhbGwobnVsbCk7XG4gICAgICAgICAgZm9yICh2YXIgYSA9IDA7IGEgPCBlLm9wcy5sZW5ndGg7IGErKykge1xuICAgICAgICAgICAgdmFyIHUgPSBlLm9wc1thXTtcbiAgICAgICAgICAgIGlmICh1LmN1cnNvckFjdGl2aXR5SGFuZGxlcnMpXG4gICAgICAgICAgICAgIGZvciAoOyB1LmN1cnNvckFjdGl2aXR5Q2FsbGVkIDwgdS5jdXJzb3JBY3Rpdml0eUhhbmRsZXJzLmxlbmd0aDsgKVxuICAgICAgICAgICAgICAgIHUuY3Vyc29yQWN0aXZpdHlIYW5kbGVyc1t1LmN1cnNvckFjdGl2aXR5Q2FsbGVkKytdLmNhbGwobnVsbCwgdS5jbSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlIChsIDwgbi5sZW5ndGgpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gVWMoZSwgbikge1xuICAgICAgICB2YXIgbCA9IGUub3duc0dyb3VwO1xuICAgICAgICBpZiAoISFsKVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBqYyhsKTtcbiAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgX3IgPSBudWxsLCBuKGwpO1xuICAgICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHZhciBGaSA9IG51bGw7XG4gICAgICBmdW5jd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biBKYShlLCBuKSB7XG4gICAgICAgIGlmIChuID49IGUuZGlzcGxheS52aWV3RnJvbSAmJiBuIDwgZS5kaXNwbGF5LnZpZXdUbylcbiAgICAgICAgICByZXR1cm4gZS5kaXNwbGF5LnZpZXdbQnIoZSwgbildO1xuICAgICAgICB2YXIgbCA9IGUuZGlzcGxheS5leHRlcm5hbE1lYXN1cmVkO1xuICAgICAgICBpZiAobCAmJiBuID49IGwubGluZU4gJiYgbiA8IGwubGluZU4gKyBsLnNpemUpXG4gICAgICAgICAgcmV0dXJuIGw7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBlaShlLCBuKSB7XG4gICAgICAgIHZhciBsID0gc3QobiksIGEgPSBKYShlLCBsKTtcbiAgICAgICAgYSAmJiAhYS50ZXh0ID8gYSA9IG51bGwgOiBhICYmIGEuY2hhbmdlcyAmJiAoYXUoZSwgYSwgbCwgdGwoZSkpLCBlLmN1ck9wLmZvcmNlVXBkYXRlID0gITApLCBhIHx8IChhID0gWGMoZSwgbikpO1xuICAgICAgICB2YXIgdSA9IGN1KGEsIG4sIGwpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGxpbmU6IG4sXG4gICAgICAgICAgdmlldzogYSxcbiAgICAgICAgICByZWN0OiBudWxsLFxuICAgICAgICAgIG1hcDogdS5tYXAsXG4gICAgICAgICAgY2FjaGU6IHUuY2FjaGUsXG4gICAgICAgICAgYmVmb3JlOiB1LmJlZm9yZSxcbiAgICAgICAgICBoYXNIZWlnaHRzOiAhMVxuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gR24oZSwgbiwgbCwgYSwgdSkge1xuICAgICAgICBuLmJlZm9yZSAmJiAobCA9IC0xKTtcbiAgICAgICAgdmFyIGcgPSBsICsgKGEgfHwgXCJcIiksIE87XG4gICAgICAgIHJldHVybiBuLmNhY2hlLmhhc093blByb3BlcnR5KGcpID8gTyA9IG4uY2FjaGVbZ10gOiAobi5yZWN0IHx8IChuLnJlY3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ZSAmJiAoYSArPSBCaShsW3VdKSk7XG4gICAgICAgIHJldHVybiBhO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24ga28oZSwgbiwgbCwgYSwgdSkge1xuICAgICAgICBpZiAoIXUpIHtcbiAgICAgICAgICB2YXIgZyA9IFphKG4pO1xuICAgICAgICAgIGwudG9wICs9IGcsIGwuYm90dG9tICs9IGc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGEgPT0gXCJsaW5lXCIpXG4gICAgICAgICAgcmV0dXJuIGw7XG4gICAgICAgIGEgfHwgKGEgPSBcImxvY2FsXCIpO1xuICAgICAgICB2YXIgTyA9IHRyKG4pO1xuICAgICAgICBpZiAoYSA9PSBcImxvY2FsXCIgPyBPICs9ICRvKGUuZGlzcGxheSkgOiBPIC09IGUuZGlzcGxheS52aWV3T2Zmc2V0LCBhID09IFwicGFnZVwiIHx8IGEgPT0gXCJ3aW5kb3dcIikge1xuICAgICAgICAgIHZhciBMID0gZS5kaXNwbGF5LmxpbmVTcGFjZS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcbiAgICAgICAgICBPICs9IEwudG9wICsgKGEgPT0gXCJ3aW5kb3dcIiA/IDAgOiBBdSh2ZShlKSkpO1xuICAgICAgICAgIHZhciBIID0gTC5sZWZ0ICsgKGEgPT0gXCJ3aW5kb3dcIiA/IDAgOiB5dSh2ZShlKSkpO1xuICAgICAgICAgIGwubGVmdCArPSBILCBsLnJpZ2h0ICs9IEg7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGwudG9wICs9IE8sIGwuYm90dG9tICs9IE8sIGw7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBidShlLCBuLCBsKSB7XG4gICAgICAgIGlmIChsID09IFwiZGl2XCIpXG4gICAgICAgICAgcmV0dXJuIG47XG4gICAgICAgIHZhciBhID0gbi5sZWZ0LCB1ID0gbi50b3A7XG4gICAgICAgIGlmIChsID09IFwicGFnZVwiKVxuICAgICAgICAgIGEgLT0geX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ICAgICAgIHZhciBhID0gZS5kb2M7XG4gICAgICAgIGlmIChsICs9IGUuZGlzcGxheS52aWV3T2Zmc2V0LCBsIDwgMClcbiAgICAgICAgICByZXR1cm4gcWEoYS5maXJzdCwgMCwgbnVsbCwgLTEsIC0xKTtcbiAgICAgICAgdmFyIHUgPSB6bihhLCBsKSwgZyA9IGEuZmlyc3QgKyBhLnNpemUgLSAxO1xuICAgICAgICBpZiAodSA+IGcpXG4gICAgICAgICAgcmV0dXJuIHFhKGEuZmlyc3QgKyBhLnNpemUgLSAxLCBGZShhLCBnKS50ZXh0Lmxlbmd0aCwgbnVsbCwgMSwgMSk7XG4gICAgICAgIG4gPCAwICYmIChuID0gMCk7XG4gICAgICAgIGZvciAodmFyIE8gPSBGZShhLCB1KTsgOyApIHtcbiAgICAgICAgICB2YXIgTCA9IF9jKGUsIE8sIHUsIG4sIGwpLCBIID0gRGMoTywgTC5jaCArIChMLnhSZWwgPiAwIHx8IEwub3V0c2lkZSA+IDAgPyAxIDogMCkpO1xuICAgICAgICAgIGlmICghSClcbiAgICAgICAgICAgIHJldHVybiBMO1xuICAgICAgICAgIHZhciBVID0gSC5maW5kKDEpO1xuICAgICAgICAgIGlmIChVLmxpbmUgPT0gdSlcbiAgICAgICAgICAgIHJldHVybiBVO1xuICAgICAgICAgIE8gPSBGZShhLCB1ID0gVS5saW5lKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gRXUoZSwgbiwgbCwgYSkge1xuICAgICAgICBhIC09IFphKG4pO1xuICAgICAgICB2YXIgdSA9IG4udGV4dC5sZW5ndGgsIGcgPSBhdChmdW5jdGlvbihPKSB7XG4gICAgICAgICAgcmV0dXJuIEduKGUsIGwsIE8gLSAxKS5ib3R0b20gPD0gYTtcbiAgICAgICAgfSwgdSwgMCk7XG4gICAgICAgIHJldHVybiB1ID0gYXQoZnVuY3Rpb24oTykge1xuICAgICAgICAgIHJldHVybiBHbihlLCBsLCBPKS50b3AgPiBhO1xu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iBlbChQbihcbiAgICAgICAgICAgIGUsXG4gICAgICAgICAgICBxKGwsIF8gPyBlZS50byA6IGVlLmZyb20sIF8gPyBcImJlZm9yZVwiIDogXCJhZnRlclwiKSxcbiAgICAgICAgICAgIFwibGluZVwiLFxuICAgICAgICAgICAgbixcbiAgICAgICAgICAgIGFcbiAgICAgICAgICApLCBnLCBPLCAhMCk7XG4gICAgICAgIH0sIDAsIHUubGVuZ3RoIC0gMSksIEggPSB1W0xdO1xuICAgICAgICBpZiAoTCA+IDApIHtcbiAgICAgICAgICB2YXIgVSA9IEgubGV2ZWwgIT0gMSwgRyA9IFBuKFxuICAgICAgICAgICAgZSxcbiAgICAgICAgICAgIHEobCwgVSA/IEguZnJvbSA6IEgudG8sIFUgPyBcImFmdGVyXCIgOiBcImJlZm9yZVwiKSxcbiAgICAgICAgICAgIFwibGluZVwiLFxuICAgICAgICAgICAgbixcbiAgICAgICAgICAgIGFcbiAgICAgICAgICApO1xuICAgICAgICAgIGVsKEcsIGcsIE8sICEwKSAmJiBHLnRvcCA+IE8gJiYgKEggPSB1W0wgLSAxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEg7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB0cChlLCBuLCBsLCBhLCB1LCBnLCBPKSB7XG4gICAgICAgIHZhciBMID0gRXUoZSwgbiwgYSwgTyksIEggPSBMLmJlZ2luLCBVID0gTC5lbmQ7XG4gICAgICAgIC9cXHMvLnRlc3Qobi50ZXh0LmNoYXJBdChVIC0gMSkpICYmIFUtLTtcbiAgICAgICAgZm9yICh2YXIgRyA9IG51bGwsIFkgPSBudWxsLCBlZSA9IDA7IGVlIDwgdS5sZW5ndGg7IGVlKyspIHtcbiAgICAgICAgICB2YXIgXyA9IHVbZWVdO1xuICAgICAgICAgIGlmICghKF8uZnJvbSA+PSBVIHx8IF8udG8gPD0gSCkpIHtcbiAgICAgICAgICAgIHZhciBhZSA9IF8ubGV2ZWwgIT0gMSwgY2UgPSB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gICAgICAgICAgdmFyIHUgPSBsKGEpO1xuICAgICAgICAgIHUgIT0gYS5oZWlnaHQgJiYgRG4oYSwgdSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gTHIoZSwgbiwgbCwgYSkge1xuICAgICAgICB2YXIgdSA9IGUuZGlzcGxheTtcbiAgICAgICAgaWYgKCFsICYmIGVuKG4pLmdldEF0dHJpYnV0ZShcImNtLW5vdC1jb250ZW50XCIpID09IFwidHJ1ZVwiKVxuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB2YXIgZywgTywgTCA9IHUubGluZVNwYWNlLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpO1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGcgPSBuLmNsaWVudFggLSBMLmxlZnQsIE8gPSBuLmNsaWVudFkgLSBMLnRvcDtcbiAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIEggPSBfYShlLCBnLCBPKSwgVTtcbiAgICAgICAgaWYgKGEgJiYgSC54UmVsID4gMCAmJiAoVSA9IEZlKGUuZG9jLCBILmxpbmUpLnRleHQpLmxlbmd0aCA9PSBILmNoKSB7XG4gICAgICAgICAgdmFyIEcgPSBpZShVLCBVLmxlbmd0aCwgZS5vcHRpb25zLnRhYlNpemUpIC0gVS5sZW5ndGg7XG4gICAgICAgICAgSCA9IHEoSC5saW5lLCBNYXRoLm1heCgwLCBNYXRoLnJvdW5kKChnIC0gZHUoZS5kaXNwbGF5KS5sZWZ0KSAvIG5pKGUuZGlzcGxheSkpIC0gRykpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBIO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQnIoZSwgbikge1xuICAgICAgICBpZiAobiA+PSBlLmRpc3BsYXkudmlld1RvIHx8IChuIC09IGUuZGlzcGxheS52aWV3RnJvbSwgbiA8IDApKVxuICAgICAgICA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AgdmFyIGcgPSBhLnZpZXdbQnIoZSwgbildO1xuICAgICAgICAgIGlmIChnLm5vZGUgIT0gbnVsbCkge1xuICAgICAgICAgICAgdmFyIE8gPSBnLmNoYW5nZXMgfHwgKGcuY2hhbmdlcyA9IFtdKTtcbiAgICAgICAgICAgIHRlKE8sIGwpID09IC0xICYmIE8ucHVzaChsKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIEFyKGUpIHtcbiAgICAgICAgZS5kaXNwbGF5LnZpZXdGcm9tID0gZS5kaXNwbGF5LnZpZXdUbyA9IGUuZG9jLmZpcnN0LCBlLmRpc3BsYXkudmlldyA9IFtdLCBlLmRpc3BsYXkudmlld09mZnNldCA9IDA7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBVbyhlLCBuLCBsLCBhKSB7XG4gICAgICAgIHZhciB1ID0gQnIoZSwgbiksIGcsIE8gPSBlLmRpc3BsYXkudmlldztcbiAgICAgICAgaWYgKCFlciB8fCBsID09IGUuZG9jLmZpcnN0ICsgZS5kb2Muc2l6ZSlcbiAgICAgICAgICByZXR1cm4geyBpbmRleDogdSwgbGluZU46IGwgfTtcbiAgICAgICAgZm9yICh2YXIgTCA9IGUuZGlzcGxheS52aWV3RnJvbSwgSCA9IDA7IEggPCB1OyBIKyspXG4gICAgICAgICAgTCArPSBPW0hdLnNpemU7XG4gICAgICAgIGlmIChMICE9IG4pIHtcbiAgICAgICAgICBpZiAoYSA+IDApIHtcbiAgICAgICAgICAgIGlmICh1ID09IE8ubGVuZ3RoIC0gMSlcbiAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICBnID0gTCArIE9bdV0uc2l6ZSAtIG4sIHUrKztcbiAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgIGcgPSBMIC0gbjtcbiAgICAgICAgICBuICs9IGcsIGwgKz0gZztcbiAgICAgICAgfVxuICAgICAgICBmb3IgKDsgV2EoZS5kb2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cbiAgICAgICAgcmV0dXJuIGw7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiAkaShlKSB7XG4gICAgICAgIGUuZGlzcGxheS5pbnB1dC5zaG93U2VsZWN0aW9uKGUuZGlzcGxheS5pbnB1dC5wcmVwYXJlU2VsZWN0aW9uKCkpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gVHUoZSwgbikge1xuICAgICAgICBuID09PSB2b2lkIDAgJiYgKG4gPSAhMCk7XG4gICAgICAgIHZhciBsID0gZS5kb2MsIGEgPSB7fSwgdSA9IGEuY3Vyc29ycyA9IGRvY3VtZW50LmNyZWF0ZURvY3VtZW50RnJhZ21lbnQoKSwgZyA9IGEuc2VsZWN0aW9uID0gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpLCBPID0gZS5vcHRpb25zLiRjdXN0b21DdXJzb3I7XG4gICAgICAgIE8gJiYgKG4gPSAhMCk7XG4gICAgICAgIGZvciAodmFyIEwgPSAwOyBMIDwgbC5zZWwucmFuZ2VzLmxlbmd0aDsgTCsrKVxuICAgICAgICAgIGlmICghKCFuICYmIEwgPT0gbC5zZWwucHJpbUluZGV4KSkge1xuICAgICAgICAgICAgdmFyIEggPSBsLnNlbC5yYW5nZXNbTF07XG4gICAgICAgICAgICBpZiAoIShILmZyb20oKS5saW5lID49IGUuZGlzcGxheS52aWV3VG8gfHwgSC50bygpLmxpbmUgPCBlLmRpc3BsYXkudmlld0Zyb20pKSB7XG4gICAgICAgICAgICAgIHZhciBVID0gSC5lbXB0eSgpO1xuICAgICAgICAgICAgICBpZiAoTykge1xuICAgICAgICAgICAgICAgIHZhciBHID0gTyhlLCBIKTtcbiAgICAgICAgICAgICAgICBHICYmIGlsKGUsIEcsIHUpO1xuICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAoVSB8fCBlLm9wdGlvbnMuc2hvd0N1cnNvcldoZW5TZWxlY3RpbmcpICYmIGlsKGUsIEguaGVhZCwgdSk7X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GUuZGlzcGxheS5zaXplcldpZHRoKSB7XG4gICAgICAgICAgICAgIHZhciBjZSA9IE1hdGguY2VpbChHIC8gbmkoZS5kaXNwbGF5KSk7XG4gICAgICAgICAgICAgIGNlID4gZS5kaXNwbGF5Lm1heExpbmVMZW5ndGggJiYgKGUuZGlzcGxheS5tYXhMaW5lTGVuZ3RoID0gY2UsIGUuZGlzcGxheS5tYXhMaW5lID0gTC5saW5lLCBlLmRpc3BsYXkubWF4TGluZUNoYW5nZWQgPSAhMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIE1hdGguYWJzKGcpID4gMiAmJiAobi5zY3JvbGxlci5zY3JvbGxUb3AgKz0gZyk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBSdShlKSB7XG4gICAgICAgIGlmIChlLndpZGdldHMpXG4gICAgICAgICAgZm9yICh2YXIgbiA9IDA7IG4gPCBlLndpZGdldHMubGVuZ3RoOyArK24pIHtcbiAgICAgICAgICAgIHZhciBsID0gZS53aWRnZXRzW25dLCBhID0gbC5ub2RlLnBhcmVudE5vZGU7XG4gICAgICAgICAgICBhICYmIChsLmhlaWdodCA9IGEub2Zmc2V0SGVpZ2h0KTtcbiAgICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBXbyhlLCBuLCBsKSB7XG4gICAgICAgIHZhciBhID0gbCAmJiBsLnRvcCAhPSBudWxsID8gTWF0aC5tYXgoMCwgbC50b3ApIDogZS5zY3JvbGxlci5zY3JvbGxUb3A7XG4gICAgICAgIGEgPSBNYXRoLmZsb29yKGEgLSAkbyhlKSk7XG4gICAgICAgIHZhciB1ID0gbCAmJiBsLmJvdHRvbSAhPSBudWxsID8gbC5ib3R0b20gOiBhICsgZS53cmFwcGVyLmNsaWVudEhlaWdodCwgZyA9IHpuKG4sIGEpLCBPID0gem4obiwgdSk7XG4gICAgICAgIGlmIChsICYmIGwuZW5zdXJlKSB7XG4gICAgICAgICAgdmFyIEwgPSBsLmVuc3VyZS5mcm9tLmxpbmUsIEggPSBsLmVuc3VyZS50by5saW5lO1xuICAgICAgICAgIEwgPCBnID8gKGcgPSBMLCBPID0gem4obiwgdHIoRmUobiwgTCkpICsgZS53cmFwcGVyLmNsaWVudEhlaWdodCkpIDogTWF0aC5taW4oSCwgbi5sYXN0TGluZSgpKSA+PSBPICYmIChnID0gem4obiwgdHIoRmUobiwgSCkpIC0gZS53cmFwcGVyLmNsaWVudEhlaWdodCksIE8gPSBIKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geyBmcm9tOiBnLCB0bzogTWF0aC5tYXgoTywgZyArIDEpIH07XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBpcChlLCBuKSB7XG4gICAgICAgIGlmICghUWUoZSwgXCJzY3JvbGxDdXJzb3JJbnRvVmlld1wiKSkge1xuICAgICAgICAgIHZhciBsID0gZS5kaXNwbGF5LCBhID0gbC5zaXplci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKSwgdSA9IG51bGwsIGcgPSBsLndyYXBwZXIub3duZXJEb2N1bWVudDtcbiAgICAgICAgICBpZiAobi50b3AgKyBhLnRvcCA8IDAgPyB1ID0gITAgOiBuLmJvdHRvbSArIGEudG9wID4gKGcuZGVmYXVsdFZpZXcuaW5uZXJIZWlnaHQgfHwgZy5kb2N1bWVudEVsZW1lbnQuY2xpZW50SGVpZ2h0KSAmJiAodSA9ICExKSwgdSAhPSBudWxsICYmICF3KSB7XG4gICAgICAgICAgICB2YXIgTyA9IEkoXCJkaXZcIiwgXCJcXHUyMDBCXCIsIG51bGwsIGBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiBgICsgKG4udG9wIC0gbC52aWV3T2Zmc2V0IC0gJG8oZS5kaXNwbGF5KSkgKyBgcHg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBgICsgKG4uYm90dG9tIC0gbi50b3AgKyBXbihlKSAr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0ubGluZXMubGVuZ3RoICYmIFBlKE9bSF0sIFwidW5oaWRlXCIpO1xuICAgICAgICBsLndyYXBwZXIub2Zmc2V0SGVpZ2h0ICYmIChhLnNjcm9sbFRvcCA9IG4uZGlzcGxheS5zY3JvbGxlci5zY3JvbGxUb3ApLCBlLmNoYW5nZU9ianMgJiYgUGUobiwgXCJjaGFuZ2VzXCIsIG4sIGUuY2hhbmdlT2JqcyksIGUudXBkYXRlICYmIGUudXBkYXRlLmZpbmlzaCgpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gZG4oZSwgbikge1xuICAgICAgICBpZiAoZS5jdXJPcClcbiAgICAgICAgICByZXR1cm4gbigpO1xuICAgICAgICBrcihlKTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gbigpO1xuICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgIGpyKGUpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiAkdChlLCBuKSB7XG4gICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgICBpZiAoZS5jdXJPcClcbiAgICAgICAgICAgIHJldHVybiBuLmFwcGx5KGUsIGFyZ3VtZW50cyk7XG4gICAgICAgICAga3IoZSk7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJldHVybiBuLmFwcGx5KGUsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgIGpyKGUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIEp0KGUpIHtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkge1xuICAgICAgICAgIGlmICh0aGlzLmN1ck9wKVxuICAgICAgICAgICAgcmV0dXJuIGUuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICBrcih0aGlzKTtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmV0dXJuIGUuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAganIodGhpcyk7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24ga3QoZSkge1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgdmFyIG4gPSB0aGlzLmNtO1xuICAgICAgICAgIGlmICghbiB8fCBuLmN1ck9wKVxuICAgICAgICAgICAgcmV0dXJuIGUuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICBrcihuKTtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmV0dXJuIGUuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAganIobik7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gVmkoZSwgbikge1xuICAgICAgICBlLmRvYy5oaWdobGlnaHRGcm9udGllciA8IGUuZGlzcGxheS52aWV3VG8gJiYgZS5zdGF0ZS5oaWdobGlnaHQuc2V0KG4sIG1lKHZwLCBlKSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB2cChlKSB7XG4gICAgICAgIHZhciBuID0gZS5kb2M7XG4gICAgICAgIGlmICghKG4uaGlnaGxpZ2h0RnJvbnRpZXIgPj0gZS5kaXNwbGF5LnZpZXdUbykpIHtcbiAgICAgICAgICB2YXIgbCA9ICtuZXcgRGF0ZSgpICsgZS5vcHRpb25zLndvcmtUaW1lLCBhID0gT2koZSwgbi5oaWdobGlnaHRGcm9udGllciksIHUgPSBbXTtcbiAgICAgICAgICBuLml0ZXIoYS5saW5lLCBNYXRoLm1pbihuLmZpcnN0ICsgbi5zaXplLCBlLmRpc3BsYXkudmlld1RvICsgNTAwKSwgZnVuY3Rpb24oZykge1xuICAgICAgICAgICAgaWYgKGEubGlu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dmFyIGEgPSBVaShlKTtcbiAgICAgICAgICAkaShlKSwgb2koZSwgYSksIHBsKGUsIGEpLCBsLmZpbmlzaCgpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBBcChlLCBuLCBsKSB7XG4gICAgICAgIHZhciBhID0gZS5kaXNwbGF5LCB1ID0gZS5vcHRpb25zLmxpbmVOdW1iZXJzLCBnID0gYS5saW5lRGl2LCBPID0gZy5maXJzdENoaWxkO1xuICAgICAgICBmdW5jdGlvbiBMKGFlKSB7XG4gICAgICAgICAgdmFyIGNlID0gYWUubmV4dFNpYmxpbmc7XG4gICAgICAgICAgcmV0dXJuIGIgJiYgTSAmJiBlLmRpc3BsYXkuY3VycmVudFdoZWVsVGFyZ2V0ID09IGFlID8gYWUuc3R5bGUuZGlzcGxheSA9IFwibm9uZVwiIDogYWUucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChhZSksIGNlO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIEggPSBhLnZpZXcsIFUgPSBhLnZpZXdGcm9tLCBHID0gMDsgRyA8IEgubGVuZ3RoOyBHKyspIHtcbiAgICAgICAgICB2YXIgWSA9IEhbR107XG4gICAgICAgICAgaWYgKCFZLmhpZGRlbilcbiAgICAgICAgICAgIGlmICghWS5ub2RlIHx8IFkubm9kZS5wYXJlbnROb2RlICE9IGcpIHtcbiAgICAgICAgICAgICAgdmFyIGVlID0gUWMoZSwgWSwgVSwgbCk7XG4gICAgICAgICAgICAgIGcuaW5zZXJ0QmVmb3JlKGVlLCBPKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGZvciAoOyBPICE9IFkubm9kZTsgKVxuICAgICAgICAgICAgICAgIE8gPSBMKE8pO1xuICAgICAgICAgICAgICB2YXIgXyA9IHUgJiYgbiAhPSBudWxsICYmIG4gPD0gVSAmJiBZLmxpbmVOdW1iZXI7XG4gICAgICAgICAgICAgIFkuY2hhbmdlcyAmJiAodGUoWS5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ICAgIFwiZGl2XCIsXG4gICAgICAgICAgICBbSShcImRpdlwiLCBsKV0sXG4gICAgICAgICAgICBcIkNvZGVNaXJyb3ItbGluZW51bWJlciBDb2RlTWlycm9yLWd1dHRlci1lbHRcIlxuICAgICAgICAgICkpLCBnID0gdS5maXJzdENoaWxkLm9mZnNldFdpZHRoLCBPID0gdS5vZmZzZXRXaWR0aCAtIGc7XG4gICAgICAgICAgcmV0dXJuIGEubGluZUd1dHRlci5zdHlsZS53aWR0aCA9IFwiXCIsIGEubGluZU51bUlubmVyV2lkdGggPSBNYXRoLm1heChnLCBhLmxpbmVHdXR0ZXIub2Zmc2V0V2lkdGggLSBPKSArIDEsIGEubGluZU51bVdpZHRoID0gYS5saW5lTnVtSW5uZXJXaWR0aCArIE8sIGEubGluZU51bUNoYXJzID0gYS5saW5lTnVtSW5uZXJXaWR0aCA/IGwubGVuZ3RoIDogLTEsIGEubGluZUd1dHRlci5zdHlsZS53aWR0aCA9IGEubGluZU51bVdpZHRoICsgXCJweFwiLCBjbChlLmRpc3BsYXkpLCAhMDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gITE7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBobChlLCBuKSB7XG4gICAgICAgIGZvciAodmFyIGwgPSBbXSwgYSA9ICExLCB1ID0gMDsgdSA8IGUubGVuZ3RoOyB1KyspIHtcbiAgICAgICAgICB2YXIgZyA9IGVbdV0sIE8gPSBudWxsO1xuICAgICAgICAgIGlmICh0eXBlb2YgZyAhPSBcInN0cmluZ1wiICYmIChPID0gZy5zdHlsZSwgZyA9IGcuY2xhc3NOYW1lKSwgZyA9PSBcIkNvZGVNaXJyb3ItbGluZW51bWJlcnNcIilcbiAgICAgICAgICAgIGlmIChuKVxuICAgICAgICAgICAgICBhID0gITA7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIGwucHVzaCh7IGNsYXNzTmFtZTogZywgc3R5bGU6IE8gf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TC5jbGllbnRXaWR0aCwgVSA9IEwuc2Nyb2xsSGVpZ2h0ID4gTC5jbGllbnRIZWlnaHQ7XG4gICAgICAgIGlmICghIShhICYmIEggfHwgdSAmJiBVKSkge1xuICAgICAgICAgIGlmICh1ICYmIE0gJiYgYikge1xuICAgICAgICAgICAgZTpcbiAgICAgICAgICAgICAgZm9yICh2YXIgRyA9IG4udGFyZ2V0LCBZID0gTy52aWV3OyBHICE9IEw7IEcgPSBHLnBhcmVudE5vZGUpXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgZWUgPSAwOyBlZSA8IFkubGVuZ3RoOyBlZSsrKVxuICAgICAgICAgICAgICAgICAgaWYgKFlbZWVdLm5vZGUgPT0gRykge1xuICAgICAgICAgICAgICAgICAgICBlLmRpc3BsYXkuY3VycmVudFdoZWVsVGFyZ2V0ID0gRztcbiAgICAgICAgICAgICAgICAgICAgYnJlYWsgZTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGEgJiYgIXQgJiYgIW0gJiYgZyAhPSBudWxsKSB7XG4gICAgICAgICAgICB1ICYmIFUgJiYgamkoZSwgTWF0aC5tYXgoMCwgTC5zY3JvbGxUb3AgKyB1ICogZykpLCBIcihlLCBNYXRoLm1heCgwLCBMLnNjcm9sbExlZnQgKyBhICogZykpLCAoIXUgfHwgdSAmJiBVKSAmJiBsdChuKSwgTy53aGVlbFN0YXJ0WCA9IG51bGw7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh1ICYmIGcgIT0gbnVsbCkge1xuICAgICAgICAgICAgdmFyIF8gPSB1ICogZywgYWUgPSBlLmRvYy5zY3JvbGxUb3AsIGNlID0gYWUgKyBPLndyYXBwZXIuY2xpZW50SGVpZ2h0O1xuICAgICAgICAgICAgXyA8IDAgPyBhZSA9IE1hdGgubWF4KDAsIGFlICsgXyAtIDUwKSA6IGNlID0gTWF0aC5taW4oZS5kb2MuaGVp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QW4ucHJvdG90eXBlLmNvbnRhaW5zID0gZnVuY3Rpb24oZSwgbikge1xuICAgICAgICBuIHx8IChuID0gZSk7XG4gICAgICAgIGZvciAodmFyIGwgPSAwOyBsIDwgdGhpcy5yYW5nZXMubGVuZ3RoOyBsKyspIHtcbiAgICAgICAgICB2YXIgYSA9IHRoaXMucmFuZ2VzW2xdO1xuICAgICAgICAgIGlmIChvZShuLCBhLmZyb20oKSkgPj0gMCAmJiBvZShlLCBhLnRvKCkpIDw9IDApXG4gICAgICAgICAgICByZXR1cm4gbDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gLTE7XG4gICAgICB9O1xuICAgICAgdmFyIHV0ID0gZnVuY3Rpb24oZSwgbikge1xuICAgICAgICB0aGlzLmFuY2hvciA9IGUsIHRoaXMuaGVhZCA9IG47XG4gICAgICB9O1xuICAgICAgdXQucHJvdG90eXBlLmZyb20gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIFB0KHRoaXMuYW5jaG9yLCB0aGlzLmhlYWQpO1xuICAgICAgfSwgdXQucHJvdG90eXBlLnRvID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiBydCh0aGlzLmFuY2hvciwgdGhpcy5oZWFkKTtcbiAgICAgIH0sIHV0LnByb3RvdHlwZS5lbXB0eSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5oZWFkLmxpbmUgPT0gdGhpcy5hbmNob3IubGluZSAmJiB0aGlzLmhlYWQuY2ggPT0gdGhpcy5hbmNob3IuY2g7XG4gICAgICB9O1xuICAgICAgZnVuY3Rpb24gRm4oZSwgbiwgbCkge1xuICAgICAgICB2YXIgYSA9IGUgJiYgZS5vcHRpb25zLnNlbGVjdGlvbnNNYXlUb3VjaCwgdSA9IG5bbF07XG4gICAgICAgIG4uc29ydChmdW5jdGlvbihlZSwgXykge1xuICAgICAgICAgIHJldHVybiBvZShlZS5mcm9tKCksIF8uZnJvbSgpKTtcbiAgICAgICAgfSksIGwgPSB0ZShuLCB1KTtcbiAgICAgICAgZm9yICh2YXIgZyA9IDE7IGcgPCBuLmxlbmd0aDsgZysrKSB7XG4gICAgICAgICAgdmFyIE8gPSBuW2ddLCBMID0gbltnIC0gMV0sIEggPSBvZShMLnRvKCksIE8uZnJvbSgpKTtcbiAgICAgICAgICBpZiAoYSAmJiAhTy5lbXB0eSgpID8gSCA+IDAgOiBIID49IDApIHtcbiAgICAgICAgICAgIHZhciBVID0gUHQoTC5mcm9tKCksIE8uZnJvbSgpKSwgRyA9IHJ0KEwudG8oKSwgTy50bygpKSwgWSA9IEwuZW1wdHkoKSA/IE8uZnJvbSgpID09IE8uaGVhZCA6IEwuZnJvbSgpID09IEwuaGVhZDtcbiAgICAgICAgICAgIGcgPD0gbCAmJiAtLWwsIG4uc3BsaWNlKC0tZywgMiwgbmV3IHV0KFkgPyBHIDogVSwgWSA/IFUgOiBHKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXcgQW4obiwgbCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBicihlLCBuKSB7XG4gICAgICAgIHJldHVybiBuZXcgQW4oW25ldyB1dChlLCBuIHx8IGUpXSwgMCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBDcihlKSB7XG4gICAgICAgIHJldHVybiBlLnRleHQgPyBxKFxuICAgICAgICAgIGUuZnJvbS5saW5lICsgZS50ZXh0Lmxlbmd0aCAtIDEsXG4gICAgICAgICAgQmUoZS50ZXh0KS5sZW5ndGggKyAoZS50ZXh0Lmxlbmd0aCA9PSAxID8gZS5mcm9tLmNoIDogMClcbiAgICAgICAgKSA6IGUudG87XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBqdShlLCBuKSB7XG4gICAgICAgIGlmIChvZShlLCBuLmZyb20pIDwgMClcbiAgICAgICAgICByZXR1cm4gZTtcbiAgICAgICAgaWYgKG9lKGUsIG4udG8pIDw9IDApXG4gICAgICAgICAgcmV0dXJuIENyKG4pO1xuICAgICAgICB2YXIgbCA9IGUubGluZSArIG4udGV4dC5sZW5ndGggLSAobi50by5saW5lIC0gbi5mcm9tLmxpbmUpIC0gMSwgYSA9IGUuY2g7XG4gICAgICAgIHJldHVybiBlLmxpbmUgPT0gbi50by5saW5lICYmIChhICs9IENyKG4pLmNoIC0gbi50by5jaCksIHEobCwgYSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB2bChlLCBuKSB7XG4gICAgICAgIGZvciAodmFyIGwgPSBbXSwgYSA9IDA7IGEgPCBlLnNlbC5yYW5nZXMubGVuZ3RoOyBhKyspIHtcbiAgICAgICAgICB2YXIgdSA9IGUuc2VsLnJhbmdlc1thXTtcbiAgICAgICAgICBsLnB1c2gobmV3IHV0KFxuICAgICAgICAgICAganUodS5hbmNob3IsIG4pLFxuICAgICAgICAgICAganUodS5oZWFkLCBuKVxuICAgICAgICAgICkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGbihlLmNtLCBsLCBlLnNlbC5wcmltSW5kZXgpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gVXUoZSwgbiwgbCkge1xuICAgICAgICByZXR1cm4gZS5saW5lID09IG4ubGluZSA/IHEobC5saW5lLCBlLmNoIC0gbi5jaCArIGwuY2gpIDogcShsLmxpbmUgKyAoZS5saW5lIC0gbi5saW5lKSwgZS5jaCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBFcChlLCBuLCBsKSB7XG4gICAgICAgIGZvciAodmFyIGEgPSBbXSwgdSA9IHEoZS5maXJzdCwgMCksIGcgPSB1LCBPID0gMDsgTyA8IG4ubGVuZ3RoOyBPKyspIHtcbiAgICAgICAgICB2YXIgTCA9IG5bT10sIEggPSBVdShMLmZyb20sIHUsIGcpLCBVID0gVXUoQ3IoTCksIHUsIGcpO1xuICAgICAgICAgIGlmICh1ID0gTC50bywgZyA9IFUsIGwgPT0gXCJhcm91bmRcIikge1xuICAgICAgICAgICAgdmFyIEcgP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BPKDEsIFUubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICB5ZS5wdXNoKG5ldyBxcihlZSArIEcudGV4dC5zbGljZShILmNoKSwgXywgYSkpLCBnKEcsIEcudGV4dC5zbGljZSgwLCBMLmNoKSArIFVbMF0sIHUoMCkpLCBlLmluc2VydChMLmxpbmUgKyAxLCB5ZSk7XG4gICAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChVLmxlbmd0aCA9PSAxKVxuICAgICAgICAgIGcoRywgRy50ZXh0LnNsaWNlKDAsIEwuY2gpICsgVVswXSArIFkudGV4dC5zbGljZShILmNoKSwgdSgwKSksIGUucmVtb3ZlKEwubGluZSArIDEsIGFlKTtcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgZyhHLCBHLnRleHQuc2xpY2UoMCwgTC5jaCkgKyBVWzBdLCB1KDApKSwgZyhZLCBlZSArIFkudGV4dC5zbGljZShILmNoKSwgXyk7XG4gICAgICAgICAgdmFyIENlID0gTygxLCBVLmxlbmd0aCAtIDEpO1xuICAgICAgICAgIGFlID4gMSAmJiBlLnJlbW92ZShMLmxpbmUgKyAxLCBhZSAtIDEpLCBlLmluc2VydChMLmxpbmUgKyAxLCBDZSk7XG4gICAgICAgIH1cbiAgICAgICAgSHQoZSwgXCJjaGFuZ2VcIiwgZSwgbik7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBFcihlLCBuLCBsKSB7XG4gICAgICAgIGZ1bmN0aW9uIGEodSwgZywgTykge1xuICAgICAgICAgIGlmICh1LmxpbmtlZClcbiAgICAgICAgICAgIGZvciAodmFyIEwgPSAwOyBMIDwgdS5saW5rZWQubGVuZ3RoOyArK0wpIHtcbiAgICAgICAgICAgICAgdmFyIEggPSB1LmxpbmtlZFtMXTtcbiAgICAgICAgICAgICAgaWYgKEguZG9jICE9IGcpIHtcbiAgICAgICAgICAgICAgICB2YXIgVSA9IE8gJiYgSC5zaGFyZWRIaXN0O1xuICAgICAgICAgICAgICAgIGwgJiYgIVUg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PcmlnaW4gPSBudWxsLCB0aGlzLmdlbmVyYXRpb24gPSB0aGlzLm1heEdlbmVyYXRpb24gPSBlID8gZS5tYXhHZW5lcmF0aW9uIDogMTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHlsKGUsIG4pIHtcbiAgICAgICAgdmFyIGwgPSB7IGZyb206IHR0KG4uZnJvbSksIHRvOiBDcihuKSwgdGV4dDogX24oZSwgbi5mcm9tLCBuLnRvKSB9O1xuICAgICAgICByZXR1cm4gWXUoZSwgbCwgbi5mcm9tLmxpbmUsIG4udG8ubGluZSArIDEpLCBFcihlLCBmdW5jdGlvbihhKSB7XG4gICAgICAgICAgcmV0dXJuIFl1KGEsIGwsIG4uZnJvbS5saW5lLCBuLnRvLmxpbmUgKyAxKTtcbiAgICAgICAgfSwgITApLCBsO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gR3UoZSkge1xuICAgICAgICBmb3IgKDsgZS5sZW5ndGg7ICkge1xuICAgICAgICAgIHZhciBuID0gQmUoZSk7XG4gICAgICAgICAgaWYgKG4ucmFuZ2VzKVxuICAgICAgICAgICAgZS5wb3AoKTtcbiAgICAgICAgICBlbHNlXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24geHAoZSwgbikge1xuICAgICAgICBpZiAobilcbiAgICAgICAgICByZXR1cm4gR3UoZS5kb25lKSwgQmUoZS5kb25lKTtcbiAgICAgICAgaWYgKGUuZG9uZS5sZW5ndGggJiYgIUJlKGUuZG9uZSkucmFuZ2VzKVxuICAgICAgICAgIHJldHVybiBCZShlLmRvbmUpO1xuICAgICAgICBpZiAoZS5kb25lLmxlbmd0aCA+IDEgJiYgIWUuZG9uZVtlLmRvbmUubGVuZ3RoIC0gMl0ucmFuZ2VzKVxuICAgICAgICAgIHJldHVybiBlLmRvbmUucG9wKCksIEJlKGUuZG9uZSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBRdShlLCBuLCBs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AgIGEucHVzaChEcChsW3VdKSk7XG4gICAgICAgIHJldHVybiBhO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gS3UoZSwgbikge1xuICAgICAgICB2YXIgbCA9IFJwKGUsIG4pLCBhID0gemEoZSwgbik7XG4gICAgICAgIGlmICghbClcbiAgICAgICAgICByZXR1cm4gYTtcbiAgICAgICAgaWYgKCFhKVxuICAgICAgICAgIHJldHVybiBsO1xuICAgICAgICBmb3IgKHZhciB1ID0gMDsgdSA8IGwubGVuZ3RoOyArK3UpIHtcbiAgICAgICAgICB2YXIgZyA9IGxbdV0sIE8gPSBhW3VdO1xuICAgICAgICAgIGlmIChnICYmIE8pIHtcbiAgICAgICAgICAgIGU6XG4gICAgICAgICAgICAgIGZvciAodmFyIEwgPSAwOyBMIDwgTy5sZW5ndGg7ICsrTCkge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIEggPSBPW0xdLCBVID0gMDsgVSA8IGcubGVuZ3RoOyArK1UpXG4gICAgICAgICAgICAgICAgICBpZiAoZ1tVXS5tYXJrZXIgPT0gSC5tYXJrZXIpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIGU7XG4gICAgICAgICAgICAgICAgZy5wdXNoKEgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICBPICYmIChsW3VdID0gTyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGw7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBhaShlLCBuLCBsKSB7XG4gICAgICAgIGZvciAodmFyIGEgPSBbXSwgdSA9IDA7IHUgPCBlLmxlbmd0aDsgKyt1KSB7XG4gICAgICAgICAgdmFyIGcgPSBlW3VdO1xuICAgICAgICAgIGlmIChnLnJhbmdlcykge1xuICAgICAgICAgICAgYS5wdXNoKGwgPyBBbi5wcm90b3R5cGUuZGVlcENvcHkuY2FsbChnKSA6IGcpO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBPID0gZy5jaGFuZ2VzLCBMID0gW107XG4gICAgICAgICAgYS5wdXNoKHsgY2hhbmdlczogTCB9KTtcbiAgICAgICAgICBmb3IgKHZhciBIID0gMDsgSCA8IE8ubGVuZ3RoOyArK0gpIHtcbiAgICAgICAgICAgIHZhciBVID0gT1tIXSwgRyA9IHZvaWQgMDtcbiAgICAgICAgICAgIGlmIChMLnB1c2goeyBmcm9tOiBVLmZyb20sIHRvOiBVLnRvLCB0ZXh0OiBVLnRleHQgfSksIG4pXG4gICAgICAgICAgICAgIGZvciAodmFyIFkgaW4gVSlcbiAgICAgICAgICAgICAgICAoRyA9IFkubWF0Y2goL15zcGFuc18oXFxkKykkLykpICYmIHRlKG4sIE51bWJlcihHWzFdKSkgPiAtMSAmJiAoQmUoTClbWV0gPSBVW1ldLCBkZWxldGUgVVtZXSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBhO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQWwoZSwgbiwgbCwgYSkge1xuICAgICAgICBpZiAoYSkge1xuICAgICAgICAgIHZhciB1ID0gZS5hbmNob3I7XG4gICAgICAgICAgaWYgKGwpIHtcbiAgICAgICAgICAgIHZhciBnID0gb2UobiwgdSkgPCAwO1xuICAgICAgICAgICAgZyAhPSBvZShsLCB1KSA8IDAgPyAodSA9IG4sIG4gPSBsKSA6IGcgIT0gb2UobiwgbCkgPCAwICYmIChuID0gbCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgdXQodSwgbik7XG4gICAgICAgIH0gZWxzZVxuICAgICAgICAgIHJldHVybiBuZXcgdXQobCB8fCBuLCBuKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIEpvKGUsIG4sIGwsIGEsIHUpIHtcbiAgICAgICAgdSA9PSBudWxsICYmICh1ID0gZS5jbSAmJiAoZS5jbS5kaXNwbGF5LnNoaWZ0IHx8IGUuZXh0ZW5kKSksI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kgOiBuO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gbGkoZSwgbiwgbCwgYSwgdSkge1xuICAgICAgICB2YXIgZyA9IEZlKGUsIG4ubGluZSk7XG4gICAgICAgIGlmIChnLm1hcmtlZFNwYW5zKVxuICAgICAgICAgIGZvciAodmFyIE8gPSAwOyBPIDwgZy5tYXJrZWRTcGFucy5sZW5ndGg7ICsrTykge1xuICAgICAgICAgICAgdmFyIEwgPSBnLm1hcmtlZFNwYW5zW09dLCBIID0gTC5tYXJrZXIsIFUgPSBcInNlbGVjdExlZnRcIiBpbiBIID8gIUguc2VsZWN0TGVmdCA6IEguaW5jbHVzaXZlTGVmdCwgRyA9IFwic2VsZWN0UmlnaHRcIiBpbiBIID8gIUguc2VsZWN0UmlnaHQgOiBILmluY2x1c2l2ZVJpZ2h0O1xuICAgICAgICAgICAgaWYgKChMLmZyb20gPT0gbnVsbCB8fCAoVSA/IEwuZnJvbSA8PSBuLmNoIDogTC5mcm9tIDwgbi5jaCkpICYmIChMLnRvID09IG51bGwgfHwgKEcgPyBMLnRvID49IG4uY2ggOiBMLnRvID4gbi5jaCkpKSB7XG4gICAgICAgICAgICAgIGlmICh1ICYmIChQZShILCBcImJlZm9yZUN1cnNvckVudGVyXCIpLCBILmV4cGxpY2l0bHlDbGVhcmVkKSlcbiAgICAgICAgICAgICAgICBpZiAoZy5tYXJrZWRTcGFucykge1xuICAgICAgICAgICAgICAgICAgLS1PO1xuICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgaWYgKCFILmF0b21pYylcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgaWYgKGwpIHtcbiAgICAgICAgICAgICAgICB2YXIgWSA9IEguZmluZChhIDwgMCA/IDEgOiAtMSksIGVlID0gdm9pZCAwO1xuICAgICAgICAgICAgICAgIGlmICgoYSA8IDAgPy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LCBnKSB7XG4gICAgICAgICAgICAhZyAmJiB0ZShhLCB1Lmhpc3RvcnkpID09IC0xICYmICh1Zih1Lmhpc3RvcnksIG4pLCBhLnB1c2godS5oaXN0b3J5KSksIFFpKHUsIG4sIG51bGwsIHphKHUsIG4pKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gX28oZSwgbiwgbCkge1xuICAgICAgICB2YXIgYSA9IGUuY20gJiYgZS5jbS5zdGF0ZS5zdXBwcmVzc0VkaXRzO1xuICAgICAgICBpZiAoIShhICYmICFsKSkge1xuICAgICAgICAgIGZvciAodmFyIHUgPSBlLmhpc3RvcnksIGcsIE8gPSBlLnNlbCwgTCA9IG4gPT0gXCJ1bmRvXCIgPyB1LmRvbmUgOiB1LnVuZG9uZSwgSCA9IG4gPT0gXCJ1bmRvXCIgPyB1LnVuZG9uZSA6IHUuZG9uZSwgVSA9IDA7IFUgPCBMLmxlbmd0aCAmJiAoZyA9IExbVV0sICEobCA/IGcucmFuZ2VzICYmICFnLmVxdWFscyhlLnNlbCkgOiAhZy5yYW5nZXMpKTsgVSsrKVxuICAgICAgICAgICAgO1xuICAgICAgICAgIGlmIChVICE9IEwubGVuZ3RoKSB7XG4gICAgICAgICAgICBmb3IgKHUubGFzdE9yaWdpbiA9IHUubGFzdFNlbE9yaWdpbiA9IG51bGw7IDsgKVxuICAgICAgICAgICAgICBpZiAoZyA9IEwucG9wKCksIGcucmFuZ2VzKSB7XG4gICAgICAgICAgICAgICAgaWYgKFhvKGcsIEgpLCBsICYmICFnLmVxdWFscyhlLnNlbCkpIHtcbiAgICAgICAgICAgICAgICAgIFF0KGUsIGcsIHsgY2xlYXJSZWRvOiAhMSB9KTtcbiAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgTyA9IGc7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoYSkge1xuICAgICAgICAgICAgIC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nVsbCwgS3UoRWUsIHllKSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSwgXyA9IGcuY2hhbmdlcy5sZW5ndGggLSAxOyBfID49IDA7IC0tXykge1xuICAgICAgICAgICAgICB2YXIgYWUgPSBlZShfKTtcbiAgICAgICAgICAgICAgaWYgKGFlKVxuICAgICAgICAgICAgICAgIHJldHVybiBhZS52O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gYWYoZSwgbikge1xuICAgICAgICBpZiAobiAhPSAwICYmIChlLmZpcnN0ICs9IG4sIGUuc2VsID0gbmV3IEFuKHB0KGUuc2VsLnJhbmdlcywgZnVuY3Rpb24odSkge1xuICAgICAgICAgIHJldHVybiBuZXcgdXQoXG4gICAgICAgICAgICBxKHUuYW5jaG9yLmxpbmUgKyBuLCB1LmFuY2hvci5jaCksXG4gICAgICAgICAgICBxKHUuaGVhZC5saW5lICsgbiwgdS5oZWFkLmNoKVxuICAgICAgICAgICk7XG4gICAgICAgIH0pLCBlLnNlbC5wcmltSW5kZXgpLCBlLmNtKSkge1xuICAgICAgICAgIHRuKGUuY20sIGUuZmlyc3QsIGUuZmlyc3QgLSBuLCBuKTtcbiAgICAgICAgICBmb3IgKHZhciBsID0gZS5jbS5kaXNwbGF5LCBhID0gbC52aWV3RnJvbTsgYSA8IGwudmlld1RvOyBhKyspXG4gICAgICAgICAgICB5cihlLmNtLCBhLCBcImd1dHRlclwiKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gUWkoZSwgbiwgbCwgYSkge1xuICAgICAgICBpZiAoZS5jbSAmJiAhZS5jbS5jdXJPcClcbiAgICAgICAgICByZXR1cm4gJHQoZS5jbSwgUWkpKGUsIG4sIGwsIGEpO1xuICAgICAgICBpZiAobi50by5saW5lIDwgZS5maXJzdCkge1xuICAgICAgICAgIGFmKGUsIG4udGV4dC5sZW5ndGggLSAxIC0gKG4udG8ubGluZSAtIG4uZnJvbS5saW5lKSk7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmICghKG4uZnJvbS5saW5lID4gZS5sYXN0TGluZSgpKSkge1xuICAgICAgICAgIGlmIChuLmZyb20ubGluZSA8IGUuZmlyc3QpIHtcbiAgICAgICAgICAgIHZhciB1ID0gbi50ZXh0Lmxlbmd0aCAtIDEgLSAoZS5maXJzdCAtIG4uZnJvbS5saW5lKTtcbiAgICAgICAgICAgIGFmKGUsIHUpLCBuID0ge1xuICAgICAgICAgICAgICBmcm9tOiBxKGUuZmlyc3QsIDApLFxuICAgICAgICAgICAgICB0bzogcShuLnRvLmxpbmUgKyB1LCBuLnRvLmNoKSxcbiAgICAgICAgICAgICAgdGV4dDogW0JlKG4udGV4dCldLFxuICAgICAgICAgICAgICBvcmlnaW46IG4ub3JpZ2luXG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgZyA9IGUubGFzdExpbmUoKTtcbiAgICAgICAgICBuLnRvLmxpbmUgPiBnICYmIChuID0ge1xuICAgICAgICAgICAgZnJvbTogbi5mcm9tLFxuICAgICAgICAgICAgdG86IHEoZywgRmUoZSwgZykudGV4dC5sZW5ndGgpLFxuICAgICAgICAgICAgdGV4dDogW24udGV4dFswXV0sXG4gICAgICAgICAgICBvcmlnaW46IG4ub3JpZ2luXG4gICAgICAgICAgfSksIG4ucmVtb3ZlZCA9IF9uKGUsIG4uZnJvbSwgbi50byksIGwgfHwgKGwgPSB2bChlLCBuKSksIGUuY20gPyBJcChlLmNtLCBuLCBhKSA6IGdsKGUsIG4sIGEpLCBabyhlLCBsLCBNZSksIGUuY2FudEVkaXQgJiYgcW8oZSwgcShlLmZpcnN0TGluZSgpLCAwKSkgJiYgKGUuY2FudEVkaXQgPSAhMSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIElwKGUsIG4sIGwpIHtcbiAgICAg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BlW3VdLCBPID0gITA7XG4gICAgICAgICAgaWYgKGcucmFuZ2VzKSB7XG4gICAgICAgICAgICBnLmNvcGllZCB8fCAoZyA9IGVbdV0gPSBnLmRlZXBDb3B5KCksIGcuY29waWVkID0gITApO1xuICAgICAgICAgICAgZm9yICh2YXIgTCA9IDA7IEwgPCBnLnJhbmdlcy5sZW5ndGg7IEwrKylcbiAgICAgICAgICAgICAgbGYoZy5yYW5nZXNbTF0uYW5jaG9yLCBuLCBsLCBhKSwgbGYoZy5yYW5nZXNbTF0uaGVhZCwgbiwgbCwgYSk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZm9yICh2YXIgSCA9IDA7IEggPCBnLmNoYW5nZXMubGVuZ3RoOyArK0gpIHtcbiAgICAgICAgICAgIHZhciBVID0gZy5jaGFuZ2VzW0hdO1xuICAgICAgICAgICAgaWYgKGwgPCBVLmZyb20ubGluZSlcbiAgICAgICAgICAgICAgVS5mcm9tID0gcShVLmZyb20ubGluZSArIGEsIFUuZnJvbS5jaCksIFUudG8gPSBxKFUudG8ubGluZSArIGEsIFUudG8uY2gpO1xuICAgICAgICAgICAgZWxzZSBpZiAobiA8PSBVLnRvLmxpbmUpIHtcbiAgICAgICAgICAgICAgTyA9ICExO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgTyB8fCAoZS5zcGxpY2UoMCwgdSArIDEpLCB1ID0gMCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHVmKGUsIG4pIHtcbiAgICAgICAgdmFyIGwgPSBuLmZyb20ubGluZSwgYSA9IG4udG8ubGluZSwgdSA9IG4udGV4dC5sZW5ndGggLSAoYSAtIGwpIC0gMTtcbiAgICAgICAgc2YoZS5kb25lLCBsLCBhLCB1KSwgc2YoZS51bmRvbmUsIGwsIGEsIHUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb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B9LFxuICAgICAgICBpbnNlcnRJbm5lcjogZnVuY3Rpb24oZSwgbiwgbCkge1xuICAgICAgICAgIHRoaXMuaGVpZ2h0ICs9IGwsIHRoaXMubGluZXMgPSB0aGlzLmxpbmVzLnNsaWNlKDAsIGUpLmNvbmNhdChuKS5jb25jYXQodGhpcy5saW5lcy5zbGljZShlKSk7XG4gICAgICAgICAgZm9yICh2YXIgYSA9IDA7IGEgPCBuLmxlbmd0aDsgKythKVxuICAgICAgICAgICAgblthXS5wYXJlbnQgPSB0aGlzO1xuICAgICAgICB9LFxuICAgICAgICBpdGVyTjogZnVuY3Rpb24oZSwgbiwgbCkge1xuICAgICAgICAgIGZvciAodmFyIGEgPSBlICsgbjsgZSA8IGE7ICsrZSlcbiAgICAgICAgICAgIGlmIChsKHRoaXMubGluZXNbZV0pKVxuICAgICAgICAgICAgICByZXR1cm4gITA7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICBmdW5jdGlvbiBYaShlKSB7XG4gICAgICAgIHRoaXMuY2hpbGRyZW4gPSBlO1xuICAgICAgICBmb3IgKHZhciBuID0gMCwgbCA9IDAsIGEgPSAwOyBhIDwgZS5sZW5ndGg7ICsrYSkge1xuICAgICAgICAgIHZhciB1ID0gZVthXTtcbiAgICAgICAgICBuICs9IHUuY2h1bmtTaXplKCksIGwgKz0gdS5oZWlnaHQsIHUucGFyZW50ID0gdGhpcztcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNpemUgPSBuLCB0aGlzLmhlaWdodCA9IGwsIHRoaXMucGFyZW50ID0gbnVsbDtcbiAgICAgIH1cbiAgICAgIFhpLnByb3RvdHlwZSA9IHtcbiAgICAgICAgY2h1bmtTaXplOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5zaXplO1xuICAgICAgICB9LFxuICAgICAgICByZW1vdmVJbm5lcjogZnVuY3Rpb24oZSwgbikge1xuICAgICAgICAgIHRoaXMuc2l6ZSAtPSBuO1xuICAgICAgICAgI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AgICAgZG8ge1xuICAgICAgICAgICAgICB2YXIgbiA9IGUuY2hpbGRyZW4uc3BsaWNlKGUuY2hpbGRyZW4ubGVuZ3RoIC0gNSwgNSksIGwgPSBuZXcgWGkobik7XG4gICAgICAgICAgICAgIGlmIChlLnBhcmVudCkge1xuICAgICAgICAgICAgICAgIGUuc2l6ZSAtPSBsLnNpemUsIGUuaGVpZ2h0IC09IGwuaGVpZ2h0O1xuICAgICAgICAgICAgICAgIHZhciB1ID0gdGUoZS5wYXJlbnQuY2hpbGRyZW4sIGUpO1xuICAgICAgICAgICAgICAgIGUucGFyZW50LmNoaWxkcmVuLnNwbGljZSh1ICsgMSwgMCwgbCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGEgPSBuZXcgWGkoZS5jaGlsZHJlbik7XG4gICAgICAgICAgICAgICAgYS5wYXJlbnQgPSBlLCBlLmNoaWxkcmVuID0gW2EsIGxdLCBlID0gYTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBsLnBhcmVudCA9IGUucGFyZW50O1xuICAgICAgICAgICAgfSB3aGlsZSAoZS5jaGlsZHJlbi5sZW5ndGggPiAxMCk7XG4gICAgICAgICAgICBlLnBhcmVudC5tYXliZVNwaWxsKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpdGVyTjogZnVuY3Rpb24oZSwgbiwgbCkge1xuICAgICAgICAgIGZvciAodmFyIGEgPSAwOyBhIDwgdGhpcy5jaGlsZHJlbi5sZW5ndGg7ICsrYSkge1xuICAgICAgICAgICAgdmFyIHUgPSB0aGlzLmNoaWxkcmVuW2FdLCBnID0gdS5jaHVua1NpemUoKTtcbiAgICAgICAgICAgIGlmIChlIDwgZykge1xuICAgICAgICAgICAgICB2YXIgTyA9IE1hdGgubWluKG4sIGcgLSBlKTtcbiAgICAgICAgICAgICAgaWYgKHUuaXRlck4oZSwgTywgbCkpXG4gICAgICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgICAgICBpZiAoKG4gLT0gTykgPT0gMClcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgZSA9IDA7XG4gICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgZSAtPSBnO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfTtcbiAgICAgIHZhciBKaSA9IGZ1bmN0aW9uKGUsIG4sIGwpIHtcbiAgICAgICAgaWYgKGwpXG4gICAgICAgICAgZm9yICh2YXIgYSBpbiBsKVxuICAgICAgICAgICAgbC5oYXNPd25Qcm9wZXJ0eShhKSAmJiAodGhpc1thXSA9IGxbYV0pO1xuICAgICAgICB0aGlzLmRvYyA9IGUsIHRoaXMubm9kZSA9IG47XG4gICAgICB9O1xuICAgICAgSmkucHJvdG90eXBlLmNsZWFyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBlID0gdGhpcy5kb2MuY20sIG4gPSB0aGlzLmxpbmUud2lkZ2V0cywgbCA9IHRoaXMubGluZSwgYSA9IHN0KGwpO1xuICAgICAgICBpZiAoIShhID09IG51bGwgfHwgIW4pKSB7XG4gICAgICAgICAgZm9yICh2YXIgdSA9IDA7IHUgPCBuLmxlbmd0aDsgKyt1KVxuICAgICAgICAgICAgblt1XSA9PSB0aGlzICYmIG4uc3BsaWNlKHUtLSwgMSk7XG4gICAgICAgICAgbi5sZW5ndGggfHwgKGwud2lkZ2V0cyA9IG51bGwpO1xuICAgICAgICAgIHZhciBnID0gQmkodGhpcyk7XG4gICAgICAgICAgRG4obCwgTWF0aC5tYXgoMCwgbC5oZWlnaHQgLSBnKSksIGUgJiYgKGRuKGUsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgZmYoZSwgbCwgLWcpLCB5cihlLCBhLCBcIndpZGdldFwiKTtcbiAgICAgICAgICB9KSwgSHQoZSwgXCJsaW5lV2lkZ2V0Q2xlYXJlZFwiLCBlLCB0aGlzLCBhKSk7XG4gICAgICAgI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fVxuICAgICAgfSwgWmkucHJvdG90eXBlLmZpbmQgPSBmdW5jdGlvbihlLCBuKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByaW1hcnkuZmluZChlLCBuKTtcbiAgICAgIH0sIG10KFppKTtcbiAgICAgIGZ1bmN0aW9uIE9wKGUsIG4sIGwsIGEsIHUpIHtcbiAgICAgICAgYSA9IGxlKGEpLCBhLnNoYXJlZCA9ICExO1xuICAgICAgICB2YXIgZyA9IFtmaShlLCBuLCBsLCBhLCB1KV0sIE8gPSBnWzBdLCBMID0gYS53aWRnZXROb2RlO1xuICAgICAgICByZXR1cm4gRXIoZSwgZnVuY3Rpb24oSCkge1xuICAgICAgICAgIEwgJiYgKGEud2lkZ2V0Tm9kZSA9IEwuY2xvbmVOb2RlKCEwKSksIGcucHVzaChmaShILCBWZShILCBuKSwgVmUoSCwgbCksIGEsIHUpKTtcbiAgICAgICAgICBmb3IgKHZhciBVID0gMDsgVSA8IEgubGlua2VkLmxlbmd0aDsgKytVKVxuICAgICAgICAgICAgaWYgKEgubGlua2VkW1VdLmlzUGFyZW50KVxuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgTyA9IEJlKGcpO1xuICAgICAgICB9KSwgbmV3IFppKGcsIE8pO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gY2YoZSkge1xuICAgICAgICByZXR1cm4gZS5maW5kTWFya3MocShlLmZpcnN0LCAwKSwgZS5jbGlwUG9zKHEoZS5sYXN0TGluZSgpKSksIGZ1bmN0aW9uKG4pIHtcbiAgICAgICAgICByZXR1cm4gbi5wYXJlbnQ7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gUHAoZSwgbikge1xuICAgICAgICBmb3IgKHZhciBsID0gMDsgbCA8IG4ubGVuZ3RoOyBsKyspIHtcbiAgICAgICAgICB2YXIgYSA9IG5bbF0sIHUgPSBhLmZpbmQoKSwgZyA9IGUuY2xpcFBvcyh1LmZyb20pLCBPID0gZS5jbGlwUG9zKHUudG8pO1xuICAgICAgICAgIGlmIChvZShnLCBPKSkge1xuICAgICAgICAgICAgdmFyIEwgPSBmaShlLCBnLCBPLCBhLnByaW1hcnksIGEucHJpbWFyeS50eXBlKTtcbiAgICAgICAgICAgIGEubWFya2Vycy5wdXNoKEwpLCBMLnBhcmVudCA9IGE7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBGcChlKSB7XG4gICAgICAgIGZvciAodmFyIG4gPSBmdW5jdGlvbihhKSB7XG4gICAgICAgICAgdmFyIHUgPSBlW2FdLCBnID0gW3UucHJpbWFyeS5kb2NdO1xuICAgICAgICAgIEVyKHUucHJpbWFyeS5kb2MsIGZ1bmN0aW9uKEgpIHtcbiAgICAgICAgICAgIHJldHVybiBnLnB1c2goSCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgZm9yICh2YXIgTyA9IDA7IE8gPCB1Lm1hcmtlcnMubGVuZ3RoOyBPKyspIHtcbiAgICAgICAgICAgIHZhciBMID0gdS5tYXJrZXJzW09dO1xuICAgICAgICAgICAgdGUoZywgTC5kb2MpID09IC0xICYmIChMLnBhcmVudCA9IG51bGwsIHUubWFya2Vycy5zcGxpY2UoTy0tLCAxKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9LCBsID0gMDsgbCA8IGUubGVuZ3RoOyBsKyspXG4gICAgICAgICAgbihsKTtcbiAgICAgIH1cbiAgICAgIHZhciBMcCA9IDAsIG5uID0gZnVuY3Rpb24oZSwgbiwgbCwgYSwgdSkge1xuICAgICAgICBpZiAoISh0aGlzIGluc3RhbmNlb2Ygbm4pKVxuICAgICAgICAgIHJldHVybiBuZXcgbm4oZSwgbiwgbCwgYSwgdSk7XG4gICAgICAgIGwgPT0gbnVsbCAmJiAobCA9IDApLCBYaS5jYWxsKHRoaXMsIFtuZXcgS2koW25ldyBxcihcIlwiLCBudWxsKV0pXSksIHRoaXMuZmlyc3QgPSBsLCB0aGlzLnNjc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bm5lcihlIC0gdGhpcy5maXJzdCwgbiwgbCk7XG4gICAgICAgIH0sXG4gICAgICAgIHJlbW92ZTogZnVuY3Rpb24oZSwgbikge1xuICAgICAgICAgIHRoaXMucmVtb3ZlSW5uZXIoZSAtIHRoaXMuZmlyc3QsIG4pO1xuICAgICAgICB9LFxuICAgICAgICBnZXRWYWx1ZTogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHZhciBuID0gWnIodGhpcywgdGhpcy5maXJzdCwgdGhpcy5maXJzdCArIHRoaXMuc2l6ZSk7XG4gICAgICAgICAgcmV0dXJuIGUgPT09ICExID8gbiA6IG4uam9pbihlIHx8IHRoaXMubGluZVNlcGFyYXRvcigpKTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0VmFsdWU6IGt0KGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICB2YXIgbiA9IHEodGhpcy5maXJzdCwgMCksIGwgPSB0aGlzLmZpcnN0ICsgdGhpcy5zaXplIC0gMTtcbiAgICAgICAgICBzaSh0aGlzLCB7XG4gICAgICAgICAgICBmcm9tOiBuLFxuICAgICAgICAgICAgdG86IHEobCwgRmUodGhpcywgbCkudGV4dC5sZW5ndGgpLFxuICAgICAgICAgICAgdGV4dDogdGhpcy5zcGxpdExpbmVzKGUpLFxuICAgICAgICAgICAgb3JpZ2luOiBcInNldFZhbHVlXCIsXG4gICAgICAgICAgICBmdWxsOiAhMFxuICAgICAgICAgIH0sICEwKSwgdGhpcy5jbSAmJiBraSh0aGlzLmNtLCAwLCAwKSwgUXQodGhpcywgYnIobiksIE1lKTtcbiAgICAgICAgfSksXG4gICAgICAgIHJlcGxhY2VSYW5nZTogZnVuY3Rpb24oZSwgbiwgbCwgYSkge1xuICAgICAgICAgIG4gPSBWZSh0aGlzLCBuKSwgbCA9IGwgPyBWZSh0aGlzLCBsKSA6IG4sIHVpKHRoaXMsIGUsIG4sIGwsIGEpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRSYW5nZTogZnVuY3Rpb24oZSwgbiwgbCkge1xuICAgICAgICAgIHZhciBhID0gX24odGhpcywgVmUodGhpcywgZSksIFZlKHRoaXMsIG4pKTtcbiAgICAgICAgICByZXR1cm4gbCA9PT0gITEgPyBhIDogbCA9PT0gXCJcIiA/IGEuam9pbihcIlwiKSA6IGEuam9pbihsIHx8IHRoaXMubGluZVNlcGFyYXRvcigpKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0TGluZTogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHZhciBuID0gdGhpcy5nZXRMaW5lSGFuZGxlKGUpO1xuICAgICAgICAgIHJldHVybiBuICYmIG4udGV4dDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0TGluZUhhbmRsZTogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIGlmICh6KHRoaXMsIGUpKVxuICAgICAgICAgICAgcmV0dXJuIEZlKHRoaXMsIGUpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRMaW5lTnVtYmVyOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIHN0KGUpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRMaW5lSGFuZGxlVmlzdWFsU3RhcnQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICByZXR1cm4gdHlwZW9mIGUgPT0gXCJudW1iZXJcIiAmJiAoZSA9IEZlKHRoaXMsIGUpKSwgT24oZSk7XG4gICAgICAgIH0sXG4gICAgICAgIGxpbmVDb3VudDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuc2l6ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZmlyc3RMaW5lOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5maXJzdDtcbiAgICAgICAgfSxcbiAgICAgICAgbGFzdExpbmU6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzLmZpcnN0ICsgdGhpcy5zaXplIC0gMTtcbiAgICAgICAgfSxcbiA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hckd1dHRlcjoga3QoZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHZhciBuID0gdGhpcztcbiAgICAgICAgICB0aGlzLml0ZXIoZnVuY3Rpb24obCkge1xuICAgICAgICAgICAgbC5ndXR0ZXJNYXJrZXJzICYmIGwuZ3V0dGVyTWFya2Vyc1tlXSAmJiBZaShuLCBsLCBcImd1dHRlclwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGwuZ3V0dGVyTWFya2Vyc1tlXSA9IG51bGwsIGtuKGwuZ3V0dGVyTWFya2VycykgJiYgKGwuZ3V0dGVyTWFya2VycyA9IG51bGwpLCAhMDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9KSxcbiAgICAgICAgbGluZUluZm86IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICB2YXIgbjtcbiAgICAgICAgICBpZiAodHlwZW9mIGUgPT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgaWYgKCF6KHRoaXMsIGUpIHx8IChuID0gZSwgZSA9IEZlKHRoaXMsIGUpLCAhZSkpXG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgIH0gZWxzZSBpZiAobiA9IHN0KGUpLCBuID09IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgbGluZTogbixcbiAgICAgICAgICAgIGhhbmRsZTogZSxcbiAgICAgICAgICAgIHRleHQ6IGUudGV4dCxcbiAgICAgICAgICAgIGd1dHRlck1hcmtlcnM6IGUuZ3V0dGVyTWFya2VycyxcbiAgICAgICAgICAgIHRleHRDbGFzczogZS50ZXh0Q2xhc3MsXG4gICAgICAgICAgICBiZ0NsYXNzOiBlLmJnQ2xhc3MsXG4gICAgICAgICAgICB3cmFwQ2xhc3M6IGUud3JhcENsYXNzLFxuICAgICAgICAgICAgd2lkZ2V0czogZS53aWRnZXRzXG4gICAgICAg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gICAgIGlmIChsID09IG51bGwpXG4gICAgICAgICAgICAgICAgYVt1XSA9IG51bGw7XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBPID0gZy5tYXRjaChoKGwpKTtcbiAgICAgICAgICAgICAgICBpZiAoIU8pXG4gICAgICAgICAgICAgICAgICByZXR1cm4gITE7XG4gICAgICAgICAgICAgICAgdmFyIEwgPSBPLmluZGV4ICsgT1swXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgYVt1XSA9IGcuc2xpY2UoMCwgTy5pbmRleCkgKyAoIU8uaW5kZXggfHwgTCA9PSBnLmxlbmd0aCA/IFwiXCIgOiBcIiBcIikgKyBnLnNsaWNlKEwpIHx8IG51bGw7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgcmV0dXJuICExO1xuICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9KSxcbiAgICAgICAgYWRkTGluZVdpZGdldDoga3QoZnVuY3Rpb24oZSwgbiwgbCkge1xuICAgICAgICAgIHJldHVybiBOcCh0aGlzLCBlLCBuLCBsKTtcbiAgICAgICAgfSksXG4gICAgICAgIHJlbW92ZUxpbmVXaWRnZXQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICBlLmNsZWFyKCk7XG4gICAgICAgIH0sXG4gICAgICAgIG1hcmtUZXh0OiBmdW5jdGlvbihlLCBuLCBsKSB7XG4gICAgICAgICAgcmV0dXJuIGZpKHRoaXMsIFZlKHRoaXMsIGUpLCBWZSh0aGlzLCBuKSwgbCwgbCAmJiBsLnR5cGUgfHwgXCJyYW5nZVwiKTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0Qm9va21hcms6IGZ1bmN0aW9uKGUsIG4pIHtcbiAgICAgICAgICB2YXIgbCA9IHtcbiAgICAgICAgICAgIHJlcGxhY2VkV2l0aDogbiAmJiAobi5ub2RlVHlwZSA9PSBudWxsID8gbi53aWRnZXQgOiBuKSxcbiAgICAgICAgICAgIGluc2VydExlZnQ6IG4gJiYgbi5pbnNlcnRMZWZ0LFxuICAgICAgICAgICAgY2xlYXJXaGVuRW1wdHk6ICExLFxuICAgICAgICAgICAgc2hhcmVkOiBuICYmIG4uc2hhcmVkLFxuICAgICAgICAgICAgaGFuZGxlTW91c2VFdmVudHM6IG4gJiYgbi5oYW5kbGVNb3VzZUV2ZW50c1xuICAgICAgICAgIH07XG4gICAgICAgICAgcmV0dXJuIGUgPSBWZSh0aGlzLCBlKSwgZmkodGhpcywgZSwgZSwgbCwgXCJib29rbWFya1wiKTtcbiAgICAgICAgfSxcbiAgICAgICAgZmluZE1hcmtzQXQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICBlID0gVmUodGhpcywgZSk7XG4gICAgICAgICAgdmFyIG4gPSBbXSwgbCA9IEZlKHRoaXMsIGUubGluZSkubWFya2VkU3BhbnM7XG4gICAgICAgICAgaWYgKGwpXG4gICAgICAgICAgICBmb3IgKHZhciBhID0gMDsgYSA8IGwubGVuZ3RoOyArK2EpIHtcbiAgICAgICAgICAgICAgdmFyIHUgPSBsW2FdO1xuICAgICAgICAgICAgICAodS5mcm9tID09IG51bGwgfHwgdS5mcm9tIDw9IGUuY2gpICYmICh1LnRvID09IG51bGwgfHwgdS50byA+PSBlLmNoKSAmJiBuLnB1c2godS5tYXJrZXIucGFyZW50IHx8IHUubWFya2VyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gbjtcbiAgICAgICAgfSxcbiAgICAgICAgZmluZE1hcmtzOiBmdW5jdGlvbihlLCBuLCBsKSB7XG4gICAgICAgICAgZSA9IFZlKHRoaXMsIGUpLCBuID0gVmUodGhpcywgbik7XG4gICAgICAgICAgdmFyIGEgPSBbXSwgdSA9IGUubGluZTtcbiAgICAgICAgICByZXR1cm4gdGhpcy5pdGVyKGUubGluZSwgbi5saW5lICsgMSwgZnVuY3Rpb24oZykge1xuICAgICAgICAgICAgdmFyIE8gPSBnLm1hcmtlZFNwYW5zO1xuICAgICAgICAgICAgaWYgKE8pXG4gICAgICAgICAgICAgIGZvciAodmFyIEwgPSAwOyBMIDwgTy5sZW5ndGg7IEwrKykge1xuICAgICAgICAgICAgICAgIHZhciBIID0gT1tMXTtcbiAgICAgICAgICAgICAgICAhKEgudG8gIT0gbnVsbCAmJiB1ID09IGUubGluZSAmJiBlLmNoID49IEgudG8gfHwgSC5mcm9tID09IG51bGwgJiYgdSAhPSBlLmxpbmUgfHwgSC5mcm9tICE9IG51bGwgJiYgdSA9PSBuLmxpbmUgJiYgSC5mcm9tID49IG4uY2gpICYmICghbCB8fCBsKEgubWFya2VyKSkgJiYgYS5wdXNoKEgubWFya2VyLnBhcmVudCB8fCBILm1hcmtlcik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICsrdTtcbiAgICAgICAgICB9KSwgYTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0QWxsTWFya3M6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZhciBlID0gW107XG4gICAgICAgICAgcmV0dXJuIHRoaXMuaXRlcihmdW5jdGlvbihuKSB7XG4gICAgICAgICAgICB2YXIgbCA9IG4ubWFya2VkU3BhbnM7XG4gICAgICAgICAgICBpZiAobClcbiAgICAgICAgICAgICAgZm9yICh2YXIgYSA9IDA7IGEgPCBsLmxlbmd0aDsgKythKVxuICAgICAgICAgICAgICAgIGxbYV0uZnJvbSAhPSBudWxsICYmIGUucHVzaChsW2FdLm1hcmtlcik7XG4gICAgICAgICAgfSksIGU7XG4gICAgICAgIH0sXG4gICAgICAgIHBvc0Zyb21JbmRleDogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHZhciBuLCBsID0gdGhpcy5maXJzdCwgYSA9IHRoaXMubGluZVNlcGFyYXRvcigpLmxlbmd0aDtcbiAgICAgICAgICByZXR1cm4gdGhpcy5pdGVyKGZ1bmN0aW9uKHUpIHtcbiAgICAgICAgICAgIHZhciBnID0gdS50ZXh0Lmxlbmd0aCArIGE7XG4gICAgICAgICAgICBpZiAoZyA+IGUpXG4gICAgICAgICAgICAgIHJldHVybiBuID0gZSwgITA7XG4gICAgICAgICAgICBlIC09IGcsICsrbDtcbiAgICAgICAgICB9KSwgVmUodGhpcywgcShsLCBuKSk7XG4gICAgICAgIH0sXG4gICAgICAgIGluZGV4RnJvbVBvczogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIGUgPSBWZSh0aGlzLCBlKTtcbiAgICAgICAgICB2YXIgbiA9IGUuY2g7XG4gICAgICAgICAgaWYgKGUubGluZSA8IHRoaXMuZmlyc3QgfHwgZS5jaCA8IDApXG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICB2YXIgbCA9IHRoaXMubGluZVNlcGFyYXRvcigpLmxlbmd0aDtcbiAgICAgICAgICByZXR1cm4gdGhpcy5pdGVyKHRoaXMuZmlyc3QsIGUubGluZSwgZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgbiArPSBhLnRleHQubGVuZ3RoICsgbDtcbiAgICAgICAgICB9KSwgbjtcbiAgICAgICAgfSxcbiAgICAgICAgY29weTogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHZhciBuID0gbmV3IG5uKFxuICAgICAgICAgICAgWnIodGhpcywgdGhpcy5maXJzdCwgdGhpcy5maXJzdCArIHRoaXMuc2l6ZSksXG4gICAgICAgICAgICB0aGlzLm1vZGVPcHRpb24sXG4gICAgICAgICAgICB0aGlzLmZpcnN0LFxuICAgICAgICAgICAgdGhpcy5saW5lU2VwLFxuICAgICAgICAgICAgdGhpcy5kaXJlY3Rpb25cbiAgICAgICAgICApO1xuICAgICAgICAgIHJldHVybiBuLnNjcm9sbFRvcCA9IHRoaXMuc2Nyb2xsVG9wLCBuLnNjcm9sbExlZnQgPSB0aGlzLnNjcm9sbExlZnQsIG4uc2VsID0gdGhpcy5zZWwsIG4uZXh0ZW5kID0gITEsIGUgJiYgKG4uaGlzdG9yeS51bmR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hpcy5saW5rZWRbbl07XG4gICAgICAgICAgICAgIGlmIChsLmRvYyA9PSBlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5saW5rZWQuc3BsaWNlKG4sIDEpLCBlLnVubGlua0RvYyh0aGlzKSwgRnAoY2YodGhpcykpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGUuaGlzdG9yeSA9PSB0aGlzLmhpc3RvcnkpIHtcbiAgICAgICAgICAgIHZhciBhID0gW2UuaWRdO1xuICAgICAgICAgICAgRXIoZSwgZnVuY3Rpb24odSkge1xuICAgICAgICAgICAgICByZXR1cm4gYS5wdXNoKHUuaWQpO1xuICAgICAgICAgICAgfSwgITApLCBlLmhpc3RvcnkgPSBuZXcgS28obnVsbCksIGUuaGlzdG9yeS5kb25lID0gYWkodGhpcy5oaXN0b3J5LmRvbmUsIGEpLCBlLmhpc3RvcnkudW5kb25lID0gYWkodGhpcy5oaXN0b3J5LnVuZG9uZSwgYSk7XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpdGVyTGlua2VkRG9jczogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIEVyKHRoaXMsIGUpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRNb2RlOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5tb2RlO1xuICAgICAgICB9LFxuICAgICAgICBnZXRFZGl0b3I6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzLmNtO1xuICAgICAgICB9LFxuICAgICAgICBzcGxpdExpbmVzOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMubGluZVNlcCA/IGUuc3BsaXQodGhpcy5saW5lU2VwKSA6IElpKGUpO1xuICAgICAgICB9LFxuICAgICAgICBsaW5lU2VwYXJhdG9yOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5saW5lU2VwIHx8IGBcbmA7XG4gICAgICAgIH0sXG4gICAgICAgIHNldERpcmVjdGlvbjoga3QoZnVuY3Rpb24oZSkge1xuICAgICAgICAgIGUgIT0gXCJydGxcIiAmJiAoZSA9IFwibHRyXCIpLCBlICE9IHRoaXMuZGlyZWN0aW9uICYmICh0aGlzLmRpcmVjdGlvbiA9IGUsIHRoaXMuaXRlcihmdW5jdGlvbihuKSB7XG4gICAgICAgICAgICByZXR1cm4gbi5vcmRlciA9IG51bGw7XG4gICAgICAgICAgfSksIHRoaXMuY20gJiYgU3AodGhpcy5jbSkpO1xuICAgICAgICB9KVxuICAgICAgfSksIG5uLnByb3RvdHlwZS5lYWNoTGluZSA9IG5uLnByb3RvdHlwZS5pdGVyO1xuICAgICAgdmFyIHBmID0gMDtcbiAgICAgIGZ1bmN0aW9uIEJwKGUpIHtcbiAgICAgICAgdmFyIG4gPSB0aGlzO1xuICAgICAgICBpZiAoaGYobiksICEoUWUobiwgZSkgfHwgbnIobi5kaXNwbGF5LCBlKSkpIHtcbiAgICAgICAgICBsdChlKSwgcCAmJiAocGYgPSArbmV3IERhdGUoKSk7XG4gICAgICAgICAgdmFyIGwgPSBMcihuLCBlLCAhMCksIGEgPSBlLmRhdGFUcmFuc2Zlci5maWxlcztcbiAgICAgICAgICBpZiAoISghbCB8fCBuLmlzUmVhZE9ubHkoKSkpXG4gICAgICAgICAgICBpZiAoYSAmJiBhLmxlbmd0aCAmJiB3aW5kb3cuRmlsZVJlYWRlciAmJiB3aW5kb3cuRmlsZSlcbiAgICAgICAgICAgICAgZm9yICh2YXIgdSA9IGEubGVuZ3RoLCBnID0gQXJyYXkodSksIE8gPSAwLCBMID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgKytPID09IHUgJiYgJHQobiwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICBsID0gVmUobi5kb2MsIGwpO1xuICAgICAgICAgICAgICAgICAgdmFyIF8gPSB7XG4gICAgICAgICAgICAgICAgICAgIGZyb206IGwsXG4gICAgICAgICAgICAgICAgICAgIHRvOiBsLFxuICAgICAgICAgICAgICAgICAgICB0ZXh0OiBuLmRvYy5zcGxpdExpbmVzKFxuICAgICAgICAgICAgICAgICAgICAgIGcuZmlsdGVyKGZ1bmN0aW9uKGFlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWUgIT0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICB9KS5qb2luKG4uZG9jLmxpbmVTZXBhcmF0b3IoKSlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgb3JpZ2luOiBcInBhc3RlXCJcbiAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICBzaShuLmRvYywgXyksIFp1KG4uZG9jLCBicihWZShuLmRvYywgbCksIFZlKG4uZG9jLCBDcihfKSkpKTtcbiAgICAgICAgICAgICAgICB9KSgpO1xuICAgICAgICAgICAgICB9LCBIID0gZnVuY3Rpb24oXywgYWUpIHtcbiAgICAgICAgICAgICAgICBpZiAobi5vcHRpb25zLmFsbG93RHJvcEZpbGVUeXBlcyAmJiB0ZShuLm9wdGlvbnMuYWxsb3dEcm9wRmlsZVR5cGVzLCBfLnR5cGUpID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICBMKCk7XG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBjZSA9IG5ldyBGaWxlUmVhZGVyKCk7XG4gICAgICAgICAgICAgICAgY2Uub25lcnJvciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIEwoKTtcbiAgICAgICAgICAgICAgICB9LCBjZS5vbmxvYWQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgIHZhciB5ZSA9IGNlLnJlc3VsdDtcbiAgICAgICAgICAgICAgICAgIGlmICgvW1xceDAwLVxceDA4XFx4MGUtXFx4MWZdezJ9Ly50ZXN0KHllKSkge1xuICAgICAgICAgICAgICAgICAgICBMKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGdbYWVdID0geWUsIEwoKTtcbiAgICAgICAgICAgICAgICB9LCBjZS5yZWFkQXNUZXh0KF8pO1xuICAgICAgICAgICAgICB9LCBVID0gMDsgVSA8IGEubGVuZ3RoOyBVKyspXG4gICAgICAgICAgICAgICAgSChhW1VdLCBVKTtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBpZiAobi5zdGF0ZS5kcmFnZ2luZ1RleHQgJiYgbi5kb2Muc2VsLmNvbnRhaW5zKGwpID4gLTEpIHtcbiAgICAgICAgICAgICAgICBuLnN0YXRlLmRyYWdnaW5nVGV4dChlKSwgc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBuLmRpc3BsYXkuaW5wdXQuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9LCAyMCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgdmFyIEcgPSBlLmRhdGFUcmFuc2Zlci5nZXREYXRhKFwiVGV4dFwiKTtcbiAgICAgICAgICAgICAgICBpZiAoRykge1xuICAgICAgICAgICAgICAgICAgdmFyIFk7XG4gICAgICAgICAgICAgICAgICBpZiAobi5zdGF0ZS5kcmFnZ2luZ1RleHQgJiYgIW4uc3RhdGUuZHJhZ2dpbmdUZXh0LmNvcHkgJiYgKFkgPSBuLmxpc3RTZWxlY3Rpb25zKCkpLCBabyhuLmRvYywgYnIobCwgbCkpLCBZKVxuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBlZSA9IDA7IGVlIDwgWS5sZW5ndGg7ICsrZWUpXG4gICAgICAgICAgICAgICAgICAgIC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ndGg7IGErKykge1xuICAgICAgICAgICAgdmFyIHUgPSBuW2FdLkNvZGVNaXJyb3I7XG4gICAgICAgICAgICB1ICYmIGwucHVzaCh1KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgbC5sZW5ndGggJiYgbFswXS5vcGVyYXRpb24oZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBnID0gMDsgZyA8IGwubGVuZ3RoOyBnKyspXG4gICAgICAgICAgICAgIGUobFtnXSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHZhciBtZiA9ICExO1xuICAgICAgZnVuY3Rpb24ga3AoKSB7XG4gICAgICAgIG1mIHx8IChqcCgpLCBtZiA9ICEwKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGpwKCkge1xuICAgICAgICB2YXIgZTtcbiAgICAgICAgbmUod2luZG93LCBcInJlc2l6ZVwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICBlID09IG51bGwgJiYgKGUgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgZSA9IG51bGwsIHZmKFVwKTtcbiAgICAgICAgICB9LCAxMDApKTtcbiAgICAgICAgfSksIG5lKHdpbmRvdywgXCJibHVyXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB2ZihyaSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gVXAoZSkge1xuICAgICAgICB2YXIgbiA9IGUuZGlzcGxheTtcbiAgICAgICAgbi5jYWNoZWRDaGFyV2lkdGggPSBuLmNhY2hlZFRleHRIZWlnaHQgPSBuLmNhY2hlZFBhZGRpbmdIID0gbnVsbCwgbi5zY3JvbGxiYXJzQ2xpcHBlZCA9ICExLCBlLnNldFNpemUoKTtcbiAgICAgIH1cbiAgICAgIGZvciAodmFyIHhyID0ge1xuICAgICAgICAzOiBcIlBhdXNlXCIsXG4gICAgICAgIDg6IFwiQmFja3NwYWNlXCIsXG4gICAgICAgIDk6IFwiVGFiXCIsXG4gICAgICAgIDEzOiBcIkVudGVyXCIsXG4gICAgICAgIDE2OiBcIlNoaWZ0XCIsXG4gICAgICAgIDE3OiBcIkN0cmxcIixcbiAgICAgICAgMTg6IFwiQWx0XCIsXG4gICAgICAgIDE5OiBcIlBhdXNlXCIsXG4gICAgICAgIDIwOiBcIkNhcHNMb2NrXCIsXG4gICAgICAgIDI3OiBcIkVzY1wiLFxuICAgICAgICAzMjogXCJTcGFjZVwiLFxuICAgICAgICAzMzogXCJQYWdlVXBcIixcbiAgICAgICAgMzQ6IFwiUGFnZURvd25cIixcbiAgICAgICAgMzU6IFwiRW5kXCIsXG4gICAgICAgIDM2OiBcIkhvbWVcIixcbiAgICAgICAgMzc6IFwiTGVmdFwiLFxuICAgICAgICAzODogXCJVcFwiLFxuICAgICAgICAzOTogXCJSaWdodFwiLFxuICAgICAgICA0MDogXCJEb3duXCIsXG4gICAgICAgIDQ0OiBcIlByaW50U2NyblwiLFxuICAgICAgICA0NTogXCJJbnNlcnRcIixcbiAgICAgICAgNDY6IFwiRGVsZXRlXCIsXG4gICAgICAgIDU5OiBcIjtcIixcbiAgICAgICAgNjE6IFwiPVwiLFxuICAgICAgICA5MTogXCJNb2RcIixcbiAgICAgICAgOTI6IFwiTW9kXCIsXG4gICAgICAgIDkzOiBcIk1vZFwiLFxuICAgICAgICAxMDY6IFwiKlwiLFxuICAgICAgICAxMDc6IFwiPVwiLFxuICAgICAgICAxMDk6IFwiLVwiLFxuICAgICAgICAxMTA6IFwiLlwiLFxuICAgICAgICAxMTE6IFwiL1wiLFxuICAgICAgICAxNDU6IFwiU2Nyb2xsTG9ja1wiLFxuICAgICAgICAxNzM6IFwiLVwiLFxuICAgICAgICAxODY6IFwiO1wiLFxuICAgICAgICAxODc6IFwiPVwiLFxuICAgICAgICAxODg6IFwiLFwiLFxuICAgICAgICAxODk6IFwiLVwiLFxuICAgICAgICAxOTA6IFwiLlw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ZhdWx0ID0gTSA/IGlyLm1hY0RlZmF1bHQgOiBpci5wY0RlZmF1bHQ7XG4gICAgICBmdW5jdGlvbiB6cChlKSB7XG4gICAgICAgIHZhciBuID0gZS5zcGxpdCgvLSg/ISQpLyk7XG4gICAgICAgIGUgPSBuW24ubGVuZ3RoIC0gMV07XG4gICAgICAgIGZvciAodmFyIGwsIGEsIHUsIGcsIE8gPSAwOyBPIDwgbi5sZW5ndGggLSAxOyBPKyspIHtcbiAgICAgICAgICB2YXIgTCA9IG5bT107XG4gICAgICAgICAgaWYgKC9eKGNtZHxtZXRhfG0pJC9pLnRlc3QoTCkpXG4gICAgICAgICAgICBnID0gITA7XG4gICAgICAgICAgZWxzZSBpZiAoL15hKGx0KT8kL2kudGVzdChMKSlcbiAgICAgICAgICAgIGwgPSAhMDtcbiAgICAgICAgICBlbHNlIGlmICgvXihjfGN0cmx8Y29udHJvbCkkL2kudGVzdChMKSlcbiAgICAgICAgICAgIGEgPSAhMDtcbiAgICAgICAgICBlbHNlIGlmICgvXnMoaGlmdCk/JC9pLnRlc3QoTCkpXG4gICAgICAgICAgICB1ID0gITA7XG4gICAgICAgICAgZWxzZVxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5yZWNvZ25pemVkIG1vZGlmaWVyIG5hbWU6IFwiICsgTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGwgJiYgKGUgPSBcIkFsdC1cIiArIGUpLCBhICYmIChlID0gXCJDdHJsLVwiICsgZSksIGcgJiYgKGUgPSBcIkNtZC1cIiArIGUpLCB1ICYmIChlID0gXCJTaGlmdC1cIiArIGUpLCBlO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gVnAoZSkge1xuICAgICAgICB2YXIgbiA9IHt9O1xuICAgICAgICBmb3IgKHZhciBsIGluIGUpXG4gICAgICAgICAgaWYgKGUuaGFzT3duUHJvcGVydHkobCkpIHtcbiAgICAgICAgICAgIHZhciBhID0gZVtsXTtcbiAgICAgICAgICAgIGlmICgvXihuYW1lfGZhbGx0aHJvdWdofChkZXxhdCl0YWNoKSQvLnRlc3QobCkpXG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgaWYgKGEgPT0gXCIuLi5cIikge1xuICAgICAgICAgICAgICBkZWxldGUgZVtsXTtcbiAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKHZhciB1ID0gcHQobC5zcGxpdChcIiBcIiksIHpwKSwgZyA9IDA7IGcgPCB1Lmxlbmd0aDsgZysrKSB7XG4gICAgICAgICAgICAgIHZhciBPID0gdm9pZCAwLCBMID0gdm9pZCAwO1xuICAgICAgICAgICAgICBnID09IHUubGVuZ3RoIC0gMSA/IChMID0gdS5qb2luKFwiIFwiKSwgTyA9IGEpIDogKEwgPSB1LnNsaWNlKDAsIGcgKyAxKS5qb2luKFwiIFwiKSwgTyA9IFwiLi4uXCIpO1xuICAgICAgICAgICAgICB2YXIgSCA9IG5bTF07XG4gICAgICAgICAgICAgIGlmICghSClcbiAgICAgICAgICAgICAgICBuW0xdID0gTztcbiAgICAgICAgICAgICAgZWxzZSBpZiAoSCAhPSBPKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkluY29uc2lzdGVudCBiaW5kaW5ncyBmb3IgXCIgKyBMKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlbGV0ZSBlW2xdO1xuICAgICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIgVSBpbiBuKVxuICAgICAgICAgIGVbVV0gPSBuW1VdO1xuICAgICAgICByZXR1cm4gZTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGRpKGUsIG4sIGwsIGEpIHtcbiAgICAgICAgbiA9IHRhKG4pO1xuICAgICAgICB2YXIgdSA9IG4uY2FsbCA/IG4uY2FsbChlLCBhKSA6IG5bZV07XG4gICAgICAgIGlmICh1ID09PSAhMSlcbiAgICAgICAgICByZXR1c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WkobiwgbCk7XG4gICAgICAgICAgICAgIFUgPSB1IDwgMCA/IGwudGV4dC5sZW5ndGggLSAxIDogMDtcbiAgICAgICAgICAgICAgdmFyIFkgPSBHbihuLCBHLCBVKS50b3A7XG4gICAgICAgICAgICAgIFUgPSBhdChmdW5jdGlvbihlZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBHbihuLCBHLCBlZSkudG9wID09IFk7XG4gICAgICAgICAgICAgIH0sIHUgPCAwID09IChPLmxldmVsID09IDEpID8gTy5mcm9tIDogTy50byAtIDEsIFUpLCBIID09IFwiYmVmb3JlXCIgJiYgKFUgPSBDbChsLCBVLCAxKSk7XG4gICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgVSA9IHUgPCAwID8gTy50byA6IE8uZnJvbTtcbiAgICAgICAgICAgIHJldHVybiBuZXcgcShhLCBVLCBIKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ldyBxKGEsIHUgPCAwID8gbC50ZXh0Lmxlbmd0aCA6IDAsIHUgPCAwID8gXCJiZWZvcmVcIiA6IFwiYWZ0ZXJcIik7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBXcChlLCBuLCBsLCBhKSB7XG4gICAgICAgIHZhciB1ID0gVWUobiwgZS5kb2MuZGlyZWN0aW9uKTtcbiAgICAgICAgaWYgKCF1KVxuICAgICAgICAgIHJldHVybiBFbChuLCBsLCBhKTtcbiAgICAgICAgbC5jaCA+PSBuLnRleHQubGVuZ3RoID8gKGwuY2ggPSBuLnRleHQubGVuZ3RoLCBsLnN0aWNreSA9IFwiYmVmb3JlXCIpIDogbC5jaCA8PSAwICYmIChsLmNoID0gMCwgbC5zdGlja3kgPSBcImFmdGVyXCIpO1xuICAgICAgICB2YXIgZyA9IERlKHUsIGwuY2gsIGwuc3RpY2t5KSwgTyA9IHVbZ107XG4gICAgICAgIGlmIChlLmRvYy5kaXJlY3Rpb24gPT0gXCJsdHJcIiAmJiBPLmx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ICAgICAga2lsbExpbmU6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICByZXR1cm4gY2koZSwgZnVuY3Rpb24obikge1xuICAgICAgICAgICAgaWYgKG4uZW1wdHkoKSkge1xuICAgICAgICAgICAgICB2YXIgbCA9IEZlKGUuZG9jLCBuLmhlYWQubGluZSkudGV4dC5sZW5ndGg7XG4gICAgICAgICAgICAgIHJldHVybiBuLmhlYWQuY2ggPT0gbCAmJiBuLmhlYWQubGluZSA8IGUubGFzdExpbmUoKSA/IHsgZnJvbTogbi5oZWFkLCB0bzogcShuLmhlYWQubGluZSArIDEsIDApIH0gOiB7IGZyb206IG4uaGVhZCwgdG86IHEobi5oZWFkLmxpbmUsIGwpIH07XG4gICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgcmV0dXJuIHsgZnJvbTogbi5mcm9tKCksIHRvOiBuLnRvKCkgfTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgZGVsZXRlTGluZTogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHJldHVybiBjaShlLCBmdW5jdGlvbihuKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICBmcm9tOiBxKG4uZnJvbSgpLmxpbmUsIDApLFxuICAgICAgICAgICAgICB0bzogVmUoZS5kb2MsIHEobi50bygpLmxpbmUgKyAxLCAwKSlcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGRlbExpbmVMZWZ0OiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGNpKGUsIGZ1bmN0aW9uKG4pIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgIGZyb206IHEobi5mcm9tKCkubGluZSwgMCksXG4gICAgICAgICAgICAgIHRvOiBuLmZyb20oKVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgZGVsV3JhcH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tcbiAgICAgICAgfSxcbiAgICAgICAgZ29Eb2NTdGFydDogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHJldHVybiBlLmV4dGVuZFNlbGVjdGlvbihxKGUuZmlyc3RMaW5lKCksIDApKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29Eb2NFbmQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICByZXR1cm4gZS5leHRlbmRTZWxlY3Rpb24ocShlLmxhc3RMaW5lKCkpKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29MaW5lU3RhcnQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICByZXR1cm4gZS5leHRlbmRTZWxlY3Rpb25zQnkoXG4gICAgICAgICAgICBmdW5jdGlvbihuKSB7XG4gICAgICAgICAgICAgIHJldHVybiBiZihlLCBuLmhlYWQubGluZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgeyBvcmlnaW46IFwiK21vdmVcIiwgYmlhczogMSB9XG4gICAgICAgICAgKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29MaW5lU3RhcnRTbWFydDogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHJldHVybiBlLmV4dGVuZFNlbGVjdGlvbnNCeShcbiAgICAgICAgICAgIGZ1bmN0aW9uKG4pIHtcbiAgICAgICAgICAgICAgcmV0dXJuIENmKGUsIG4uaGVhZCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgeyBvcmlnaW46IFwiK21vdmVcIiwgYmlhczogMSB9XG4gICAgICAgICAgKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29MaW5lRW5kOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGUuZXh0ZW5kU2VsZWN0aW9uc0J5KFxuICAgICAgICAgICAgZnVuY3Rpb24obikge1xuICAgICAgICAgICAgICByZXR1cm4gR3AoZSwgbi5oZWFkLmxpbmUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHsgb3JpZ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xTLykgPyBDZihlLCBuLmhlYWQpIDogYTtcbiAgICAgICAgICB9LCBudCk7XG4gICAgICAgIH0sXG4gICAgICAgIGdvTGluZVVwOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGUubW92ZVYoLTEsIFwibGluZVwiKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29MaW5lRG93bjogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHJldHVybiBlLm1vdmVWKDEsIFwibGluZVwiKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29QYWdlVXA6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICByZXR1cm4gZS5tb3ZlVigtMSwgXCJwYWdlXCIpO1xuICAgICAgICB9LFxuICAgICAgICBnb1BhZ2VEb3duOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGUubW92ZVYoMSwgXCJwYWdlXCIpO1xuICAgICAgICB9LFxuICAgICAgICBnb0NoYXJMZWZ0OiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGUubW92ZUgoLTEsIFwiY2hhclwiKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29DaGFyUmlnaHQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICByZXR1cm4gZS5tb3ZlSCgxLCBcImNoYXJcIik7XG4gICAgICAgIH0sXG4gICAgICAgIGdvQ29sdW1uTGVmdDogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHJldHVybiBlLm1vdmVIKC0xLCBcImNvbHVtblwiKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ29Db2x1bW5SaWdodDogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHJldHVybiBlLm1vdmVIKDEsIFwiY29sdW1uXCIpO1xuICAgICAgICB9LFxuICAgICAgICBnb1dvcmRMZWZ0OiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGUubW92ZUgoLTEsIFwid29yZFwiKTtcbiAgICAgICAgfSx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VDaGFyczogZnVuY3Rpb24oZSkge1xuICAgICAgICAgIHJldHVybiBkbihlLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGZvciAodmFyIG4gPSBlLmxpc3RTZWxlY3Rpb25zKCksIGwgPSBbXSwgYSA9IDA7IGEgPCBuLmxlbmd0aDsgYSsrKVxuICAgICAgICAgICAgICBpZiAoISFuW2FdLmVtcHR5KCkpIHtcbiAgICAgICAgICAgICAgICB2YXIgdSA9IG5bYV0uaGVhZCwgZyA9IEZlKGUuZG9jLCB1LmxpbmUpLnRleHQ7XG4gICAgICAgICAgICAgICAgaWYgKGcpIHtcbiAgICAgICAgICAgICAgICAgIGlmICh1LmNoID09IGcubGVuZ3RoICYmICh1ID0gbmV3IHEodS5saW5lLCB1LmNoIC0gMSkpLCB1LmNoID4gMClcbiAgICAgICAgICAgICAgICAgICAgdSA9IG5ldyBxKHUubGluZSwgdS5jaCArIDEpLCBlLnJlcGxhY2VSYW5nZShcbiAgICAgICAgICAgICAgICAgICAgICBnLmNoYXJBdCh1LmNoIC0gMSkgKyBnLmNoYXJBdCh1LmNoIC0gMiksXG4gICAgICAgICAgICAgICAgICAgICAgcSh1LmxpbmUsIHUuY2ggLSAyKSxcbiAgICAgICAgICAgICAgICAgICAgICB1LFxuICAgICAgICAgICAgICAgICAgICAgIFwiK3RyYW5zcG9zZVwiXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBlbHNlIGlmICh1LmxpbmUgPiBlLmRvYy5maXJzdCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgTyA9IEZlKGUuZG9jLCB1LmxpbmUgLSAxKS50ZXh0O1xuICAgICAgICAgICAgICAgICAgICBPICYmICh1ID0gbmV3IHEodS5saW5lLCAxKSwgZS5yZXBsYWNlUmFuZ2UoXG4gICAgICAgICAgICAgICAgICAgICAgZy5jaGFyQXQoMCkgKyBlLmRvYy5saW5lU2VwYXJhdG9yKCkgKyBPLmNoYXJBdChPLmxlbmd0aCAtIDEpLFxuICAgICAgICAgICAgICAgICAgICAgIHEodS5saW5lIC0gMSwgTy5sZW5ndGggLSAxKSxcbiAgICAgICAgICAgICAgICAgICAgICB1LFxuICAgICAgICAgICAgICAgICAgICAgIFwiK3RyYW5zcG9zZVwiXG4gICAgICAgICAgICAgICAgICAgICkpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsLnB1c2gobmV3IHV0KHUsIHUpKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgZS5zZXRTZWxlY3Rpb25zKGwpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBuZXdsaW5lQW5kSW5kZW50OiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGRuKGUsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgZm9yICh2YXIgbiA9IGUubGlzdFNlbGVjdGlvbnMoKSwgbCA9IG4ubGVuZ3RoIC0gMTsgbCA+PSAwOyBsLS0pXG4gICAgICAgICAgICAgIGUucmVwbGFjZVJhbmdlKGUuZG9jLmxpbmVTZXBhcmF0b3IoKSwgbltsXS5hbmNob3IsIG5bbF0uaGVhZCwgXCIraW5wdXRcIik7XG4gICAgICAgICAgICBuID0gZS5saXN0U2VsZWN0aW9ucygpO1xuICAgICAgICAgICAgZm9yICh2YXIgYSA9IDA7IGEgPCBuLmxlbmd0aDsgYSsrKVxuICAgICAgICAgICAgICBlLmluZGVudExpbmUoblthXS5mcm9tKCkubGluZSwgbnVsbCwgITApO1xuICAgICAgICAgICAgaWkoZSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIG9wZW5MaW5lOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgcmV0dXJuIGUucmVwbGFjZVNlbGVjdGlvbihgXG5gLCBcInN0YXJ0XCIpO1xuICAgICAgICB9LFxuICAgICAgICB0b2dnbGVPdmVyd3JpdGU6IGZ1b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bGxlciwgXCJkcmFnc3RhcnRcIiwgSCksIG5lKHUuc2Nyb2xsZXIsIFwiZHJvcFwiLCBPKSwgZS5zdGF0ZS5kZWxheWluZ0JsdXJFdmVudCA9ICEwLCBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB1LmlucHV0LmZvY3VzKCk7XG4gICAgICAgIH0sIDIwKSwgdS5zY3JvbGxlci5kcmFnRHJvcCAmJiB1LnNjcm9sbGVyLmRyYWdEcm9wKCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBSZihlLCBuLCBsKSB7XG4gICAgICAgIGlmIChsID09IFwiY2hhclwiKVxuICAgICAgICAgIHJldHVybiBuZXcgdXQobiwgbik7XG4gICAgICAgIGlmIChsID09IFwid29yZFwiKVxuICAgICAgICAgIHJldHVybiBlLmZpbmRXb3JkQXQobik7XG4gICAgICAgIGlmIChsID09IFwibGluZVwiKVxuICAgICAgICAgIHJldHVybiBuZXcgdXQocShuLmxpbmUsIDApLCBWZShlLmRvYywgcShuLmxpbmUgKyAxLCAwKSkpO1xuICAgICAgICB2YXIgYSA9IGwoZSwgbik7XG4gICAgICAgIHJldHVybiBuZXcgdXQoYS5mcm9tLCBhLnRvKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIG5oKGUsIG4sIGwsIGEpIHtcbiAgICAgICAgcCAmJiBhbChlKTtcbiAgICAgICAgdmFyIHUgPSBlLmRpc3BsYXksIGcgPSBlLmRvYztcbiAgICAgICAgbHQobik7XG4gICAgICAgIHZhciBPLCBMLCBIID0gZy5zZWwsIFUgPSBILnJhbmdlcztcbiAgICAgICAgaWYgKGEuYWRkTmV3ICYmICFhLmV4dGVuZCA/IChMID0gZy5zZWwuY29udGFpbnMobCksIEwgPiAtMSA/IE8gPSBVW0xdIDogTyA9IG5ldyB1dChsLCBsKSkgOiAoTyA9IGcuc2VsLnByaW1hcnkoKSwgTCA9IGcuc2VsLnByaW1JbmRleCksIGEudW5pdCA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24uZnJvbSgpLCBHdC5hbmNob3IpKSA6IChOdCA9IEd0LmFuY2hvciwgRnQgPSBydChvbi50bygpLCBHdC5oZWFkKSk7XG4gICAgICAgICAgICAgIHZhciB4dCA9IEgucmFuZ2VzLnNsaWNlKDApO1xuICAgICAgICAgICAgICB4dFtMXSA9IHJoKGUsIG5ldyB1dChWZShnLCBGdCksIE50KSksIFF0KGcsIEZuKGUsIHh0LCBMKSwgWWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHZhciBfID0gdS53cmFwcGVyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLCBhZSA9IDA7XG4gICAgICAgIGZ1bmN0aW9uIGNlKEVlKSB7XG4gICAgICAgICAgdmFyIE5lID0gKythZSwga2UgPSBMcihlLCBFZSwgITAsIGEudW5pdCA9PSBcInJlY3RhbmdsZVwiKTtcbiAgICAgICAgICBpZiAoISFrZSlcbiAgICAgICAgICAgIGlmIChvZShrZSwgWSkgIT0gMCkge1xuICAgICAgICAgICAgICBlLmN1ck9wLmZvY3VzID0gWCh2ZShlKSksIGVlKGtlKTtcbiAgICAgICAgICAgICAgdmFyIEhlID0gV28odSwgZyk7XG4gICAgICAgICAgICAgIChrZS5saW5lID49IEhlLnRvIHx8IGtlLmxpbmUgPCBIZS5mcm9tKSAmJiBzZXRUaW1lb3V0KCR0KGUsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGFlID09IE5lICYmIGNlKEVlKTtcbiAgICAgICAgICAgICAgfSksIDE1MCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgWGUgPSBFZS5jbGllbnRZIDwgXy50b3AgPyAtMjAgOiBFZS5jbGllbnRZID4gXy5ib3R0b20gPyAyMCA6IDA7XG4gICAgICAgICAgICAgIFhlICYmIHNldFRpbWVvdXQoJHQoZSwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgYWUgPT0gTmUgJiYgKHUuc2Nyb2xsZXIuc2Nyb2xsVG9wICs9IFhlLCBjZShFZSkpO1xuICAgICAgICAgICAgICB9KSwgNTApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIHllKEVlKSB7XG4gICAgICAgICAgZS5zdGF0ZS5zZWxlY3RpbmdUZXh0ID0gITEsIGFlID0gMSAvIDAsIEVlICYmIChsdChFZSksIHUuaW5wdXQuZm9jdXMoKSksIE9lKHUud3JhcHBlci5vd25lckRvY3VtZW50LCBcIm1vdXNlbW92ZVwiLCBDZSksIE9lKHUud3JhcHBlci5vd25lckRvY3VtZW50LCBcIm1vdXNldXBcIiwgVGUpLCBnLmhpc3RvcnkubGFzdFNlbE9yaWdpbiA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIENlID0gJHQoZSwgZnVuY3Rpb24oRWUpIHtcbiAgICAgICAgICBFZS5idXR0b25zID09PSAwIHx8ICFNaShFZSkgPyB5ZShFZSkgOiBjZShFZSk7XG4gICAgICAgIH0pLCBUZSA9ICR0KGUsIHllKTtcbiAgICAgICAgZS5zdGF0ZS5zZWxlY3RpbmdUZXh0ID0gVGUsIG5lKHUud3JhcHBlci5vd25lckRvY3VtZW50LCBcIm1vdXNlbW92ZVwiLCBDZSksIG5lKHUud3JhcHBlci5vd25lckRvY3VtZW50LCBcIm1vdXNldXBcIiwgVGUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gcmgoZSwgbikge1xuICAgICAgICB2YXIgbCA9IG4uYW5jaG9yLCBhID0gbi5oZWFkLCB1ID0gRmUoZS5kb2MsIGwubGluZSk7XG4gICAgICAgIGlmIChvZShsLCBhKSA9PSAwICYmIGwuc3RpY2t5ID09IGEuc3RpY2t5KVxuICAgICAgICAgIHJldHVybiBuO1xuICAgICAgICB2YXIgZyA9IFVlKHUpO1xuICAgICAgICBpZiAoIWcpXG4gICAgICAgICAgcmV0dXJuIG47XG4gICAgICAgIHZhciBPID0gRGUoZywgbC5jaCwgbC5zdGlja3kpLCBMID0gZ1tPXTtcbiAgICAgICAgaWYgKEwuZnJvbSAhPSBsLmNoICYmIEwudG8gIT0gbC5jaClcbiAgICAgICAgICByZXR1cm4gbjtcbiAgICAgICAgdmFyIEggPSBPICsgKEwuZnJvbSA9PSBsLmNoID09IChMLmxldmVsICE9IDEpID8gMCA6IDEpO1xuICAgICAgICBpZiAoSCA9PSAwIHx8IEggPT0gZy5sZW5ndGgpXG4gICAgICAgICAgcmV0dXJuIG47XG4gICAgICAgIHZhciBVO1xuICAgICAgICBpZiAoYS5saW5lICE9IGwubGluZSlcbiAgICAgICAgICBVID0gKGEubGluZSAtIGwubGluZSkgKiAoZS5kb2MuZGlyZWN0aW9uID09IFwibHRyXCIgPyAxIDogLTEpID4gMDtcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgdmFyIEcgPSBEZShnLCBhLmNoLCBhLnN0aWNreSksIFkgPSBHIC0gTyB8fCAoYS5jaCAtIGwuY2gpICogKEwubGV2ZWwgPT0gMSA/IC0xIDogMSk7XG4gICAgICAgICAgRyA9PSBIIC0gMSB8fCBHID09IEggPyBVID0gWSA8IDAgOiBVID0gWSA+IDA7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGVlID0gZ1tIICsgKFUgPyAtMSA6IDApXSwgXyA9IFUgPT0gKGVlLmxldmVsID09IDEpLCBhZSA9IF8gPyBlZS5mcm9tIDogZWUudG8sIGNlID0gXyA/IFwiYWZ0ZXJcIiA6IFwiYmVmb3JlXCI7XG4gICAgICAgIHJldHVybiBsLmNoID09IGFlICYmIGwuc3RpY2t5ID09IGNlID8gbiA6IG5ldyB1dChuZXcgcShsLmxpbmUsIGFlLCBjZSksIGEpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gTWYoZSwgbiwgbCwgYSkge1xuICAgICAgICB2YXIgdSwgZztcbiAgICAgICAgaWYgKG4udG91Y2hlcylcbiAgICAgICAgICB1ID0gbi50b3VjaGVzWzBdLmNsaWVudFgsIGcgPSBuL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bCwgZS5Jbml0ID0gcGksIGwoXCJ2YWx1ZVwiLCBcIlwiLCBmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgcmV0dXJuIGEuc2V0VmFsdWUodSk7XG4gICAgICAgIH0sICEwKSwgbChcIm1vZGVcIiwgbnVsbCwgZnVuY3Rpb24oYSwgdSkge1xuICAgICAgICAgIGEuZG9jLm1vZGVPcHRpb24gPSB1LCBtbChhKTtcbiAgICAgICAgfSwgITApLCBsKFwiaW5kZW50VW5pdFwiLCAyLCBtbCwgITApLCBsKFwiaW5kZW50V2l0aFRhYnNcIiwgITEpLCBsKFwic21hcnRJbmRlbnRcIiwgITApLCBsKFwidGFiU2l6ZVwiLCA0LCBmdW5jdGlvbihhKSB7XG4gICAgICAgICAgR2koYSksIEhpKGEpLCB0bihhKTtcbiAgICAgICAgfSwgITApLCBsKFwibGluZVNlcGFyYXRvclwiLCBudWxsLCBmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgaWYgKGEuZG9jLmxpbmVTZXAgPSB1LCAhIXUpIHtcbiAgICAgICAgICAgIHZhciBnID0gW10sIE8gPSBhLmRvYy5maXJzdDtcbiAgICAgICAgICAgIGEuZG9jLml0ZXIoZnVuY3Rpb24oSCkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBVID0gMDsgOyApIHtcbiAgICAgICAgICAgICAgICB2YXIgRyA9IEgudGV4dC5pbmRleE9mKHUsIFUpO1xuICAgICAgICAgICAgICAgIGlmIChHID09IC0xKVxuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgVSA9IEcgKyB1Lmxlbmd0aCwgZy5wdXNoKHEoTywgRykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIE8rKztcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZm9yICh2YXIgTCA9IGcubGVuZ3RoIC0gMTsgTCA+PSAwOyBMLS0pXG4gICAgICAgICAgICAgIHVpKGEuZG9jLCB1LCBnW0xdLC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gICAgICAgIEpvKGUuZG9jLCBHLmFuY2hvciwgRy5oZWFkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0pKSA6IG5lKG4uc2Nyb2xsZXIsIFwiZGJsY2xpY2tcIiwgZnVuY3Rpb24oSCkge1xuICAgICAgICAgIHJldHVybiBRZShlLCBIKSB8fCBsdChIKTtcbiAgICAgICAgfSksIG5lKG4uc2Nyb2xsZXIsIFwiY29udGV4dG1lbnVcIiwgZnVuY3Rpb24oSCkge1xuICAgICAgICAgIHJldHVybiBJZihlLCBIKTtcbiAgICAgICAgfSksIG5lKG4uaW5wdXQuZ2V0RmllbGQoKSwgXCJjb250ZXh0bWVudVwiLCBmdW5jdGlvbihIKSB7XG4gICAgICAgICAgbi5zY3JvbGxlci5jb250YWlucyhILnRhcmdldCkgfHwgSWYoZSwgSCk7XG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgbCwgYSA9IHsgZW5kOiAwIH07XG4gICAgICAgIGZ1bmN0aW9uIHUoKSB7XG4gICAgICAgICAgbi5hY3RpdmVUb3VjaCAmJiAobCA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZXR1cm4gbi5hY3RpdmVUb3VjaCA9IG51bGw7XG4gICAgICAgICAgfSwgMWUzKSwgYSA9IG4uYWN0aXZlVG91Y2gsIGEuZW5kID0gK25ldyBEYXRlKCkpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGcoSCkge1xuICAgICAgICAgIGlmIChILnRvdWNoZXMubGVuZ3RoICE9IDEpXG4gICAgICAgICAgICByZXR1cm4gITE7XG4gICAgICAgICAgdmFyIFUgPSBILnRvdWNoZXNbMF07XG4gICAgICAgICAgcmV0dXJuIFUucmFkaXVzWCA8PSAxICYmIFUucmFkaXVzWSA8PSAxO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIE8oSCwgVSkge1xuICAgICAgICAgIGlmIChVLmxlZnQgPT0gbnV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mV0dXJuIG4ud3JhcHBlci5zY3JvbGxUb3AgPSBuLndyYXBwZXIuc2Nyb2xsTGVmdCA9IDA7XG4gICAgICAgIH0pLCBuLmRyYWdGdW5jdGlvbnMgPSB7XG4gICAgICAgICAgZW50ZXI6IGZ1bmN0aW9uKEgpIHtcbiAgICAgICAgICAgIFFlKGUsIEgpIHx8IEluKEgpO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgb3ZlcjogZnVuY3Rpb24oSCkge1xuICAgICAgICAgICAgUWUoZSwgSCkgfHwgKCRwKGUsIEgpLCBJbihIKSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBzdGFydDogZnVuY3Rpb24oSCkge1xuICAgICAgICAgICAgcmV0dXJuIEhwKGUsIEgpO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZHJvcDogJHQoZSwgQnApLFxuICAgICAgICAgIGxlYXZlOiBmdW5jdGlvbihIKSB7XG4gICAgICAgICAgICBRZShlLCBIKSB8fCBoZihlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIHZhciBMID0gbi5pbnB1dC5nZXRGaWVsZCgpO1xuICAgICAgICBuZShMLCBcImtleXVwXCIsIGZ1bmN0aW9uKEgpIHtcbiAgICAgICAgICByZXR1cm4gd2YuY2FsbChlLCBIKTtcbiAgICAgICAgfSksIG5lKEwsIFwia2V5ZG93blwiLCAkdChlLCB4ZikpLCBuZShMLCBcImtleXByZXNzXCIsICR0KGUsIFRmKSksIG5lKEwsIFwiZm9jdXNcIiwgZnVuY3Rpb24oSCkge1xuICAgICAgICAgIHJldHVybiBsbChlLCBIKTtcbiAgICAgICAgfSksIG5lKEwsIFwiYmx1clwiLCBmdW5jdGlvbihIKSB7XG4gICAgICAgICAgcmV0dXJuIHJpKGUsIEgpO1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIHZhciBEbCA9IFtdO1xuICAgICAgQXQuZGVmaW5lSW5pdEhvb2sgPSBmdW5jdGlvbihlKSB7XG4gIC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CwgTCA9IHUgPT0gXCJwYXN0ZVwiIHx8IGUuc3RhdGUucGFzdGVJbmNvbWluZyA+IE8sIEggPSBJaShuKSwgVSA9IG51bGw7XG4gICAgICAgIGlmIChMICYmIGEucmFuZ2VzLmxlbmd0aCA+IDEpXG4gICAgICAgICAgaWYgKExuICYmIExuLnRleHQuam9pbihgXG5gKSA9PSBuKSB7XG4gICAgICAgICAgICBpZiAoYS5yYW5nZXMubGVuZ3RoICUgTG4udGV4dC5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICBVID0gW107XG4gICAgICAgICAgICAgIGZvciAodmFyIEcgPSAwOyBHIDwgTG4udGV4dC5sZW5ndGg7IEcrKylcbiAgICAgICAgICAgICAgICBVLnB1c2goZy5zcGxpdExpbmVzKExuLnRleHRbR10pKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgIEgubGVuZ3RoID09IGEucmFuZ2VzLmxlbmd0aCAmJiBlLm9wdGlvbnMucGFzdGVMaW5lc1BlclNlbGVjdGlvbiAmJiAoVSA9IHB0KEgsIGZ1bmN0aW9uKENlKSB7XG4gICAgICAgICAgICAgIHJldHVybiBbQ2VdO1xuICAgICAgICAgICAgfSkpO1xuICAgICAgICBmb3IgKHZhciBZID0gZS5jdXJPcC51cGRhdGVJbnB1dCwgZWUgPSBhLnJhbmdlcy5sZW5ndGggLSAxOyBlZSA+PSAwOyBlZS0tKSB7XG4gICAgICAgICAgdmFyIF8gPSBhLnJhbmdlc1tlZV0sIGFlID0gXy5mcm9tKCksIGNlID0gXy50bygpO1xuICAgICAgICAgIF8uZW1wdHkoKSAmJiAobCAmJiBsID4gMCA/IGFlID0gcShhZS5saW5lLCBhZS5jaCAtIGwpIDogZS5zdGF0ZS5vdmVyd3JpdGUgJiYgIUwgPyBjZSA9IHEoY2UubGluZSwgTWF0aC5taW4oRmUoZywgY2UubGluZSkudGV4dC5sZW5ndGgsIGNlLmNoICsgQmUoSCkubGVuZ3RoKSkgOiBMICYmIExuICYmIExuLmxpbmVXaXNlICYmIExuLnRleHQuam9pbihgXG5gKSA9PSBILmpvaW4oYFxuYCkgJiYgKGFlID0gY2UgPSBxKGFlLmxpbmUsIDApKSk7XG4gICAgICAgICAgdmFyIHllID0ge1xuICAgICAgICAgICAgZnJvbTogYWUsXG4gICAgICAgICAgICB0bzogY2UsXG4gICAgICAgICAgICB0ZXh0OiBVID8gVVtlZSAlIFUubGVuZ3RoXSA6IEgsXG4gICAgICAgICAgICBvcmlnaW46IHUgfHwgKEwgPyBcInBhc3RlXCIgOiBlLnN0YXRlLmN1dEluY29taW5nID4gTyA/IFwiY3V0XCIgOiBcIitpbnB1dFwiKVxuICAgICAgICAgIH07XG4gICAgICAgICAgc2koZS5kb2MsIHllKSwgSHQoZSwgXCJpbnB1dFJlYWRcIiwgZSwgeWUpO1xuICAgICAgICB9XG4gICAgICAgIG4gJiYgIUwgJiYgRmYoZSwgbiksIGlpKGUpLCBlLmN1ck9wLnVwZGF0ZUlucHV0IDwgMiAmJiAoZS5jdXJPcC51cGRhdGVJbnB1dCA9IFkpLCBlLmN1ck9wLnR5cGluZyA9ICEwLCBlLnN0YXRlLnBhc3RlSW5jb21pbmcgPSBlLnN0YXRlLmN1dEluY29taW5nID0gLTE7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBQZihlLCBuKSB7XG4gICAgICAgIHZhciBsID0gZS5jbGlwYm9hcmREYXRhICYmIGUuY2xpcGJvYXJkRGF0YS5nZXREYXRhKFwiVGV4dFwiKTtcbiAgICAgICAgaWYgKGwpXG4gICAgICAgICAgcmV0dXJuIGUucHJldmVudERlZmF1bHQoKSwgIW4uaXNSZWFkT25seSgpICYmICFuLm9wdGlvbnMuZGlzYWJsZUlucHV0ICYmIG4uaGFzRm9jdXMoKSAmJiBkbihuLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiBSbChuLCBsLCAwLCBudWxsLCBcInBhc3RlXCIpO1xuICAgICAgICAgIH0p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7XG4gICAgICAgICAgICB0aGlzLnN0YXRlLmtleU1hcHNbdSA/IFwicHVzaFwiIDogXCJ1bnNoaWZ0XCJdKHRhKGEpKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIHJlbW92ZUtleU1hcDogZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgZm9yICh2YXIgdSA9IHRoaXMuc3RhdGUua2V5TWFwcywgZyA9IDA7IGcgPCB1Lmxlbmd0aDsgKytnKVxuICAgICAgICAgICAgICBpZiAodVtnXSA9PSBhIHx8IHVbZ10ubmFtZSA9PSBhKVxuICAgICAgICAgICAgICAgIHJldHVybiB1LnNwbGljZShnLCAxKSwgITA7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBhZGRPdmVybGF5OiBKdChmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgICB2YXIgZyA9IGEudG9rZW4gPyBhIDogZS5nZXRNb2RlKHRoaXMub3B0aW9ucywgYSk7XG4gICAgICAgICAgICBpZiAoZy5zdGFydFN0YXRlKVxuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJPdmVybGF5cyBtYXkgbm90IGJlIHN0YXRlZnVsLlwiKTtcbiAgICAgICAgICAgIHNuKFxuICAgICAgICAgICAgICB0aGlzLnN0YXRlLm92ZXJsYXlzLFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgbW9kZTogZyxcbiAgICAgICAgICAgICAgICBtb2RlU3BlYzogYSxcbiAgICAgICAgICAgICAgICBvcGFxdWU6IHUgJiYgdS5vcGFxdWUsXG4gICAgICAgICAgICAgICAgcHJpb3JpdHk6IHUgJiYgdS5wcmlvcml0eSB8fCAwXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGZ1bmN0aW9uKE8pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gTy5wcmlvcml0eTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKSwgdGhpcy5zdGF0ZS5tb2RlR2VuKyssIHRuKHRoaXMpO1xuICAgICAgICAgIH0pLFxuICAgICAgICAgIHJlbW92ZU92ZXJsYXk6IEp0KGZ1bmN0aW9uKGEpIHtcbiAgICAgICAgICAgIGZvciAodmFyIHUgPSB0aGlzLnN0YXRlLm92ZXJsYXlzLCBnID0gMDsgZyA8IHUubGVuZ3RoOyArK2cpIHtcbiAgICAgICAgICAgICAgdmFyIE8gPSB1W2ddLm1vZGVTcGVjO1xuICAgICAgICAgICAgICBpZiAoTyA9PSBhIHx8IHR5cGVvZiBhID09IFwic3RyaW5nXCIgJiYgTy5uYW1lID09IGEpIHtcbiAgICAgICAgICAgICAgICB1LnNwbGljZShnLCAxKSwgdGhpcy5zdGF0ZS5tb2RlR2VuKyssIHRuKHRoaXMpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLFxuICAgICAgICAgIGluZGVudExpbmU6IEp0KGZ1bmN0aW9uKGEsIHUsIGcpIHtcbiAgICAgICAgICAgIHR5cGVvZiB1ICE9IFwic3RyaW5nXCIgJiYgdHlwZW9mIHUgIT0gXCJudW1iZXJcIiAmJiAodSA9PSBudWxsID8gdSA9IHRoaXMub3B0aW9ucy5zbWFydEluZGVudCA/IFwic21hcnRcIiA6IFwicHJldlwiIDogdSA9IHUgPyBcImFkZFwiIDogXCJzdWJ0cmFjdFwiKSwgeih0aGlzLmRvYywgYSkgJiYgaW8odGhpcywgYSwgdSwgZyk7XG4gICAgICAgICAgfSksXG4gICAgICAgICAgaW5kZW50U2VsZWN0aW9uOiBKdChmdW5jdGlvbihhKSB7XG4gICAgICAgICAgICBmb3IgKHZhciB1ID0gdGhpcy5kb2Muc2VsLnJhbmdlcywgZyA9IC0xLCBPID0gMDsgTyA8IHUubGVuZ3RoOyBPKyspIHtcbiAgICAgICAgICAgICAgdmFyIEwgPSB1W09dO1xuICAgICAgICAgICAgICBpZiAoTC5lbXB0eSgpKVxuICAgICAgICAgICAgICAgIEwuaGVhZC5saW5lID4gZyAmJiAoaW8odGhpcywgTC5oZWFkLmxpbmUsIGEsICEwKSwgZyA9IEwuaGVhZC5saW5lLCBPID09IHRoaXMuZG9jLnNlbC5wcmltSW5kZXggJiYgaWkodGhpcykpO1xuICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgSCA9IEwuZnJvbSgpLCBVID0gTC50bygpLCBHID0gTWF0aC5tYXgoZywgSC5saW5lKTtcbiAgICAgICAgICAgICAgICBnID0gTWF0aC5taW4odGhpcy5sYXN0TGluZSgpLCBVLmxpbmUgLSAoVS5jaCA/IDAgOiAxKSkgKyAxO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIFkgPSBHOyBZIDwgZzsgKytZKVxuICAgICAgICAgICAgICAgICAgaW8odGhpcywgWSwgYSk7XG4gICAgICAgICAgICAgICAgdmFyIGVlID0gdGhpcy5kb2Muc2VsLnJhbmdlcztcbiAgICAgICAgICAgICAgICBILmNoID09IDAgJiYgdS5sZW5ndGggPT0gZWUubGVuZ3RoICYmIGVlW09dLmZyb20oKS5jaCA+IDAgJiYgYmwodGhpcy5kb2MsIE8sIG5ldyB1dChILCBlZVtPXS50bygpKSwgTWUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksXG4gICAgICAgICAgZ2V0VG9rZW5BdDogZnVuY3Rpb24oYSwgdSkge1xuICAgICAgICAgICAgcmV0dXJuIEdzKHRoaXMsIGEsIHUpO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZ2V0TGluZVRva2VuczogZnVuY3Rpb24oYSwgdSkge1xuICAgICAgICAgICAgcmV0dXJuIEdzKHRoaXMsIHEoYSksIHUsICEwKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGdldFRva2VuVHlwZUF0OiBmdW5jdGlvbihhKSB7XG4gICAgICAgICAgICBhID0gVmUodGhpcy5kb2MsIGEpO1xuICAgICAgICAgICAgdmFyIHUgPSB6cyh0aGlzLCBGZSh0aGlzLmRvYywgYS5saW5lKSksIGcgPSAwLCBPID0gKHUubGVuZ3RoIC0gMSkgLyAyLCBMID0gYS5jaCwgSDtcbiAgICAgICAgICAgIGlmIChMID09IDApXG4gICAgICAgICAgICAgIEggPSB1WzJdO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICBmb3IgKDsgOyApIHtcbiAgICAgICAgICAgICAgICB2YXIgVSA9IGcgKyBPID4+IDE7XG4gICAgICAgICAgICAgICAgaWYgKChVID8gdVtVICogMiAtIDFdIDogMCkgPj0gTClcbiAgICAgICAgICAgICAgICAgIE8gPSBVO1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHVbVSAqIDIgKyAxXSA8IEwpXG4gICAgICAgICAgICAgICAgICBnID0gVSArIDE7XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICBIID0gdVtVICogMiArIDJdO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgRyA9IEggPyBILmluZGV4T2YoXCJvdmVybGF5IFwiKSA6IC0xO1xuICAgICAgICAgICAgcmV0dXJuIEcgPCAwID8gSCA6IEcgPT0gMCA/IG51bGwgOiBILnNsaWNlKDAsIEcgLSAxKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGdldE1vZGVBdDogZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgdmFyIHUgPSB0aGlzLmRvYy5tb2RlO1xuICAgICAgICAgICAgcmV0dXJuIHUuaW5uZXJNb2RlID8gZS5pbm5lck1vZGUodSwgdGhpcy5nZXRUb2tlbkF0KGEpLnN0YXRlKS5tb2RlIDogdTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGdldEhlbHBlcjogZnVuY3Rpb24oYSwgdSkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0SGVscGVycyhhLCB1KVswXTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGdldEhlbHBlcnM6IGZ1bmN0aW9uKGEsIHUpIHtcbiAgICAgICAgICAgIHZhciBnID0gW107XG4gICAgICAgICAgICBpZiAoIWwuaGFzT3duUHJvcGVydHkodSkpXG4gICAgICAgICAgICAgIHJldHVybiBnO1xuICAgICAgICAgICAgdmFyIE8gPSBsW3VdLCBMID0gdGhpcy5nZXRNb2RlQXQoYSk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIExbdV0gPT0gXCJzdHJpbmdcIilcbiAgICAgICAgICAgICAgT1tMW3VdXSAmJiBnLnB1c2goT1tMW3VdXSk7XG4gICAgICAgICAgICBlbHNlIGlmIChMW3VdKVxuICAgICAgICAgICAgICBmb3IgKHZhciBIID0gMDsgSCA8IExbdV0ubGVuZ3RoOyBIKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgVSA9IE9bTFt1XVtIXV07XG4gICAgICAgICAgICAgICAgVSAmJiBnLnB1c2goVSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgTC5oZWxwZXJUeXBlICYmIE9bTC5oZWxwZXJUeXBlXSA/IGcucHVzaChPW0wuaGVscGVyVHlwZV0pIDogT1tMLm5hbWVdICYmIGcucHVzaChPW0wubmFtZV0pO1xuICAgICAgICAgICAgZm9yICh2YXIgRyA9IDA7IEcgPCBPLl9nbG9iYWwubGVuZ3RoOyBHKyspIHtcbiAgICAgICAgICAgICAgdmFyIFkgPSBPLl9nbG9iYWxbR107XG4gICAgICAgICAgICAgIFkucHJlZChMLCB0aGlzKSAmJiB0ZShnLCBZLnZhbCkgPT0gLTEgJiYgZy5wdXNoKFkudmFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBnO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZ2V0U3RhdGVBZnRlcjogZnVuY3Rpb24oYSwgdSkge1xuICAgICAgICAgICAgdmFyIGcgPSB0aGlzLmRvYztcbiAgICAgICAgICAgIHJldHVybiBhID0geW4oZywgYSA9PSBudWxsID8gZy5maXJzdCArIGcuc2l6ZSAtIDEgOiBhKSwgT2kodGhpcywgYSArIDEsIHUpLnN0YXRlO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgY3Vyc29yQ29vcmRzOiBmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgICB2YXIgZywgTyA9IHRoaXMuZG9jLnNlbC5wcmltYXJ5KCk7XG4gICAgICAgICAgICByZXR1cm4gYSA9PSBudWxsID8gZyA9IE8uaGVhZCA6IHR5cGVvZiBhID09IFwib2JqZWN0XCIgPyBnID0gVmUodGhpcy5kb2MsIGEpIDogZyA9IGEgPyBPLmZyb20oKSA6IE8udG8oKSwgUG4odGhpcywgZywgdSB8fCBcInBhZ2VcIik7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBjaGFyQ29vcmRzOiBmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgICByZXR1cm4gam8odGhpcywgVmUodGhpcy5kb2MsIGEpLCB1IHx8IFwicGFnZVwiKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGNvb3Jkc0NoYXI6IGZ1bmN0aW9uKGEsIHUpIHtcbiAgICAgICAgICAgIHJldHVybiBhID0gYnUodGhpcywgYSwgdSB8fCBcInBhZ2VcIiksIF9hKHRoaXMsIGEubGVmdCwgYS50b3ApO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgbGluZUF0SGVpZ2h0OiBmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgICByZXR1cm4gYSA9IGJ1KHRoaXMsIHsgdG9wOiBhLCBsZWZ0OiAwIH0sIHUgfHwgXCJwYWdlXCIpLnRvcCwgem4odGhpcy5kb2MsIGEgKyB0aGlzLmRpc3BsYXkudmlld09mZnNldCk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBoZWlnaHRBdExpbmU6IGZ1bmN0aW9uKGEsIHUsIGcpIHtcbiAgICAgICAgICAgIHZhciBPID0gITEsIEw7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGEgPT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICB2YXIgSCA9IHRoaXMuZG9jLmZpcnN0ICsgdGhpcy5kb2Muc2l6ZSAtIDE7XG4gICAgICAgICAgICAgIGEgPCB0aGlzLmRvYy5maXJzdCA/IGEgPSB0aGlzLmRvYy5maXJzdCA6IGEgPiBIICYmIChhID0gSCwgTyA9ICEwKSwgTCA9IEZlKHRoaXMuZG9jLCBhKTtcbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICBMID0gYTtcbiAgICAgICAgICAgIHJldHVybiBrbyh0aGlzLCBMLCB7IHRvcDogMCwgbGVmdDogMCB9LCB1IHx8IFwicGFnZVwiLCBnIHx8IE8pLnRvcCArIChPID8gdGhpcy5kb2MuaGVpZ2h0IC0gdHIoTCkgOiAwKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGRlZmF1bHRUZXh0SGVpZ2h0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiB0aSh0aGlzLmRpc3BsYXkpO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZGVmYXVsdENoYXJXaWR0aDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZXR1cm4gbmkodGhpcy5kaXNwbGF5KTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGdldFZpZXdwb3J0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiB7IGZyb206IHRoaXMuZGlzcGxheS52aWV3RnJvbSwgdG86IHRoaXMuZGlzcGxheS52aWV3VG8gfTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGFkZFdpZGdldDogZnVuY3Rpb24oYSwgdSwgZywgTywgTCkge1xuICAgICAgICAgICAgdmFyIEggPSB0aGlzLmRpc3BsYXk7XG4gICAgICAgICAgICBhID0gUG4odGhpcywgVmUodGhpcy5kb2MsIGEpKTtcbiAgICAgICAgICAgIHZhciBVID0gYS5ib3R0b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ikgOiAoTCA9PSBcImxlZnRcIiA/IEcgPSAwIDogTCA9PSBcIm1pZGRsZVwiICYmIChHID0gKEguc2l6ZXIuY2xpZW50V2lkdGggLSB1Lm9mZnNldFdpZHRoKSAvIDIpLCB1LnN0eWxlLmxlZnQgPSBHICsgXCJweFwiKSwgZyAmJiBhcCh0aGlzLCB7IGxlZnQ6IEcsIHRvcDogVSwgcmlnaHQ6IEcgKyB1Lm9mZnNldFdpZHRoLCBib3R0b206IFUgKyB1Lm9mZnNldEhlaWdodCB9KTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIHRyaWdnZXJPbktleURvd246IEp0KHhmKSxcbiAgICAgICAgICB0cmlnZ2VyT25LZXlQcmVzczogSnQoVGYpLFxuICAgICAgICAgIHRyaWdnZXJPbktleVVwOiB3ZixcbiAgICAgICAgICB0cmlnZ2VyT25Nb3VzZURvd246IEp0KERmKSxcbiAgICAgICAgICBleGVjQ29tbWFuZDogZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgaWYgKGVvLmhhc093blByb3BlcnR5KGEpKVxuICAgICAgICAgICAgICByZXR1cm4gZW9bYV0uY2FsbChudWxsLCB0aGlzKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIHRyaWdnZXJFbGVjdHJpYzogSnQoZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgRmYodGhpcywgYSk7XG4gICAgICAgICAgfSksXG4gICAgICAgICAgZmluZFBvc0g6IGZ1bmN0aW9uKGEsIHUsIGcsIE8pIHtcbiAgICAgICAgICAgIHZhciBMID0gMTtcbiAgICAgICAgICAgIHUgPCAwICYmIChMID0gLTEsIHUgPSAtdSk7XG4gICAgICAgICAgICBmb3IgKHZhciBIID0gVmUodGhpcy5kb2MsIGEpLCBVID0gMDsgVSA8IHUgJiYgKEggPSBNbCh0aGlzLmRvYywgSCwgTCwgZywgTyksICFILmhpdFNpZGUpOyArK1UpXG4gICAgICAgICAgICAgIDtcbiAgICAgICAgICAgIHJldHVybiBIO1xuICAg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EcgPCB1OyArK0cpIHtcbiAgICAgICAgICAgICAgdmFyIFkgPSBQbih0aGlzLCBVLCBcImRpdlwiKTtcbiAgICAgICAgICAgICAgaWYgKEggPT0gbnVsbCA/IEggPSBZLmxlZnQgOiBZLmxlZnQgPSBILCBVID0gJGYodGhpcywgWSwgTCwgZyksIFUuaGl0U2lkZSlcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBVO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgbW92ZVY6IEp0KGZ1bmN0aW9uKGEsIHUpIHtcbiAgICAgICAgICAgIHZhciBnID0gdGhpcywgTyA9IHRoaXMuZG9jLCBMID0gW10sIEggPSAhdGhpcy5kaXNwbGF5LnNoaWZ0ICYmICFPLmV4dGVuZCAmJiBPLnNlbC5zb21ldGhpbmdTZWxlY3RlZCgpO1xuICAgICAgICAgICAgaWYgKE8uZXh0ZW5kU2VsZWN0aW9uc0J5KGZ1bmN0aW9uKEcpIHtcbiAgICAgICAgICAgICAgaWYgKEgpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGEgPCAwID8gRy5mcm9tKCkgOiBHLnRvKCk7XG4gICAgICAgICAgICAgIHZhciBZID0gUG4oZywgRy5oZWFkLCBcImRpdlwiKTtcbiAgICAgICAgICAgICAgRy5nb2FsQ29sdW1uICE9IG51bGwgJiYgKFkubGVmdCA9IEcuZ29hbENvbHVtbiksIEwucHVzaChZLmxlZnQpO1xuICAgICAgICAgICAgICB2YXIgZWUgPSAkZihnLCBZLCBhLCB1KTtcbiAgICAgICAgICAgICAgcmV0dXJuIHUgPT0gXCJwYWdlXCIgJiYgRyA9PSBPLnNlbC5wcmltYXJ5KCkgJiYgdWwoZywgam8oZywgZWUsIFwiZGl2XCIpLnRvcCAtIFkudG9wKSwgZWU7XG4gICAgICAgICAgICB9LCBudCksIEwubGVuZ3RoKVxuICAgICAgICAgICAgICBmb3IgKHZhciBVID0gMDsgVSA8IE8uc2VsLnJhbmdlcy5sZW5ndGg7IFUrKylcbiAgICAgICAgICAgICAgICBPLnNlbC5yYW5nZXNbVV0uZ29hbENvbHVtbiA9IExbVV07XG4gICAgICAgICAgfSksXG4gICAgICAgICAgZmluZFdvcmRBdDogZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgdmFyIHUgPSB0aGlzLmRvYywgZyA9IEZlKHUsIGEubGluZSkudGV4dCwgTyA9IGEuY2gsIEwgPSBhLmNoO1xuICAgICAgICAgICAgaWYgKGcpIHtcbiAgICAgICAgICAgICAgdmFyIEggPSB0aGlzLmdldEhlbHBlcihhLCBcIndvcmRDaGFyc1wiKTtcbiAgICAgICAgICAgICAgKGEuc3RpY2t5ID09IFwiYmVmb3JlXCIgfHwgTCA9PSBnLmxlbmd0aCkgJiYgTyA/IC0tTyA6ICsrTDtcbiAgICAgICAgICAgICAgZm9yICh2YXIgVSA9IGcuY2hhckF0KE8pLCBHID0gbW4oVSwgSCkgPyBmdW5jdGlvbihZKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1uKFksIEgpO1xuICAgICAgICAgICAgICB9IDogL1xccy8udGVzdChVKSA/IGZ1bmN0aW9uKFkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gL1xccy8udGVzdChZKTtcbiAgICAgICAgICAgICAgfSA6IGZ1bmN0aW9uKFkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gIS9cXHMvLnRlc3QoWSkgJiYgIW1uKFkpO1xuICAgICAgICAgICAgICB9OyBPID4gMCAmJiBHKGcuY2hhckF0KE8gLSAxKSk7IClcbiAgICAgICAgICAgICAgICAtLU87XG4gICAgICAgICAgICAgIGZvciAoOyBMIDwgZy5sZW5ndGggJiYgRyhnLmNoYXJBdChMKSk7IClcbiAgICAgICAgICAgICAgICArK0w7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbmV3IHV0KHEoYS5saW5lLCBPKSwgcShhLmxpbmUsIEwpKTtcbiAgICAgICAgICB9L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ICAgICAgIGhlaWdodDogYS5zY3JvbGxIZWlnaHQgLSBXbih0aGlzKSAtIHRoaXMuZGlzcGxheS5iYXJIZWlnaHQsXG4gICAgICAgICAgICAgIHdpZHRoOiBhLnNjcm9sbFdpZHRoIC0gV24odGhpcykgLSB0aGlzLmRpc3BsYXkuYmFyV2lkdGgsXG4gICAgICAgICAgICAgIGNsaWVudEhlaWdodDogWGEodGhpcyksXG4gICAgICAgICAgICAgIGNsaWVudFdpZHRoOiBQcih0aGlzKVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIHNjcm9sbEludG9WaWV3OiBKdChmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgICBhID09IG51bGwgPyAoYSA9IHsgZnJvbTogdGhpcy5kb2Muc2VsLnByaW1hcnkoKS5oZWFkLCB0bzogbnVsbCB9LCB1ID09IG51bGwgJiYgKHUgPSB0aGlzLm9wdGlvbnMuY3Vyc29yU2Nyb2xsTWFyZ2luKSkgOiB0eXBlb2YgYSA9PSBcIm51bWJlclwiID8gYSA9IHsgZnJvbTogcShhLCAwKSwgdG86IG51bGwgfSA6IGEuZnJvbSA9PSBudWxsICYmIChhID0geyBmcm9tOiBhLCB0bzogbnVsbCB9KSwgYS50byB8fCAoYS50byA9IGEuZnJvbSksIGEubWFyZ2luID0gdSB8fCAwLCBhLmZyb20ubGluZSAhPSBudWxsID8gbHAodGhpcywgYSkgOiBNdSh0aGlzLCBhLmZyb20sIGEudG8sIGEubWFyZ2luKTtcbiAgICAgICAgICB9KSxcbiAgICAgICAgICBzZXRTaXplOiBKdChmdW5jdGlvbihhLCB1KSB7XG4gICAgICAgICAgICB2YXIgZyA9IHRoaXMsIE8gPSBmdW5jdGlvbihIKSB7XG4gICAgICAgICAgICAgIHJldHVybiB0eXBlb2YgSCA9PSBcIm51bWJlclwiIHx8IC9eXFxkKyQvLnRlc3QoU3RyaW5nKEgpKSA/IEggKyBcInB4XCIgOiBIO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGEgIT0gbnVsbCAmJiAodGhpcy5kaXNwbGF5LndyYXBwZXIuc3R5bGUud2lkdGggPSBPKGEpKSwgdSAhPSBudWxsICYmICh0aGlzLmRpc3BsYXkud3JhcHBlci5zdHlsZS5oZWlnaHQgPSBPKHUpKSwgdGhpcy5vcHRpb25zLmxpbmVXcmFwcGluZyAmJiBndSh0aGlzKTtcbiAgICAgICAgICAgIHZhciBMID0gdGhpcy5kaXNwbGF5LnZpZXdGcm9tO1xuICAgICAgICAgICAgdGhpcy5kb2MuaXRlcihMLCB0aGlzLmRpc3BsYXkudmlld1RvLCBmdW5jdGlvbihIKSB7XG4gICAgICAgICAgICAgIGlmIChILndpZGdldHMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBVID0gMDsgVSA8IEgud2lkZ2V0cy5sZW5ndGg7IFUrKylcbiAgICAgICAgICAgICAgICAgIGlmIChILndpZGdldHNbVV0ubm9IU2Nyb2xsKSB7XG4gICAgICAgICAgICAgICAgICAgIHlyKGcsIEwsIFwid2lkZ2V0XCIpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICArK0w7XG4gICAgICAgICAgICB9KSwgdGhpcy5jdXJPcC5mb3JjZVVwZGF0ZSA9ICEwLCBQZSh0aGlzLCBcInJlZnJlc2hcIiwgdGhpcyk7XG4gICAgICAgICAgfSksXG4gICAgICAgICAgb3BlcmF0aW9uOiBmdW5jdGlvbihhKSB7XG4gICAgICAgICAgICByZXR1cm4gZG4odGhpcywgYSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBzdGFydE9wZXJhdGlvbjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZXR1cm4ga3IodGhpcyk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBlbmRPcGVyYXRpb246IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgcmV0dXJuIGpyK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24gPT0gXCJydGxcIiA/IC1sIDogbDtcbiAgICAgICAgZnVuY3Rpb24gVSgpIHtcbiAgICAgICAgICB2YXIgVGUgPSBuLmxpbmUgKyBIO1xuICAgICAgICAgIHJldHVybiBUZSA8IGUuZmlyc3QgfHwgVGUgPj0gZS5maXJzdCArIGUuc2l6ZSA/ICExIDogKG4gPSBuZXcgcShUZSwgbi5jaCwgbi5zdGlja3kpLCBMID0gRmUoZSwgVGUpKTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBHKFRlKSB7XG4gICAgICAgICAgdmFyIEVlO1xuICAgICAgICAgIGlmIChhID09IFwiY29kZXBvaW50XCIpIHtcbiAgICAgICAgICAgIHZhciBOZSA9IEwudGV4dC5jaGFyQ29kZUF0KG4uY2ggKyAobCA+IDAgPyAwIDogLTEpKTtcbiAgICAgICAgICAgIGlmIChpc05hTihOZSkpXG4gICAgICAgICAgICAgIEVlID0gbnVsbDtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICB2YXIga2UgPSBsID4gMCA/IE5lID49IDU1Mjk2ICYmIE5lIDwgNTYzMjAgOiBOZSA+PSA1NjMyMCAmJiBOZSA8IDU3MzQzO1xuICAgICAgICAgICAgICBFZSA9IG5ldyBxKG4ubGluZSwgTWF0aC5tYXgoMCwgTWF0aC5taW4oTC50ZXh0Lmxlbmd0aCwgbi5jaCArIGwgKiAoa2UgPyAyIDogMSkpKSwgLWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgdSA/IEVlID0gV3AoZS5jbSwgTCwgbiwgbCkgOiBFZSA9IEVsKEwsIG4sIGwpO1xuICAgICAgICAgIGlmIChFZSA9PSBudWxsKVxuICAgICAgICAgICAgaWYgKCFUZSAmJiBVKCkpXG4gICAgICAgICAgICAgIG4gPSBTbCh1LCBlLmNtLCBMLCBuLmxpbmUsIEgpO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICByZXR1cm4gITE7XG4gICAgICAgICAgZWxzZVxuICAgICAgICAgICAgbiA9IEVlO1xuICAgICAgICAgIHJldHVybiAhMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoYSA9PSBcImNoYXJcIiB8fCBhID09IFwiY29kZXBvaW50XCIpXG4gICAgICAgICAgRygpO1xuICAgICAgICBlbHNlIGlmIChhID09IFwiY29sdW1uXCIpXG4gICAgICAgICAgRyghMCk7XG4gICAgICAgIGVsc2UgaWYgKGEgPT0gXCJ3b3JkXCIgfHwgYSA9PSBcImdyb3VwXCIpXG4gICAgICAgICAgZm9yICh2YXIgWSA9IG51bGwsIGVlID0gYSA9PSBcImdyb3VwXCIsIF8gPSBlLmNtICYmIGUuY20uZ2V0SGVscGVyKG4sIFwid29yZENoYXJzXCIpLCBhZSA9ICEwOyAhKGwgPCAwICYmICFHKCFhZSkpOyBhZSA9ICExKSB7XG4gICAgICAgICAgICB2YXIgY2UgPSBMLnRleHQuY2hhckF0KG4uY2gpIHx8IGBcbmAsIHllID0gbW4oY2UsIF8pID8gXCJ3XCIgOiBlZSAmJiBjZSA9PSBgXG5gID8gXCJuXCIgOiAhZWUgfHwgL1xccy8udGVzdChjZSkgPyBudWxsIDogXCJwXCI7XG4gICAgICAgICAgICBpZiAoZWUgJiYgIWFlICYmICF5ZSAmJiAoeWUgPSBcInNcIiksIFkgJiYgWSAhPSB5ZSkge1xuICAgICAgICAgICAgICBsIDwgMCAmJiAobCA9IDEsIEcoKSwgbi5zdGlja3kgPSBcImFmdGVyXCIpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh5ZSAmJiAoWSA9IHllKSwgbCA+IDAgJiYgIUcoIWFlKSlcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB2YXIgQ2UgPSBxbyhlLCBuLCBnLCBPLCAhMCk7XG4gICAgICAgIHJldHVybiB6ZShnLCBDZSkgJiYgKENlLmhpdFNpZGUgPSAhMCksIENlO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gJGYoZSwgbiwgbCwgYSkge1xuICAgICAgICB2YXIgdSA9IGUuZG9jLCBnID0gbi5sZWZ0LCBPO1xuICAgICAgICBpZiAoYSA9PSBcInBhZ2VcIikge1xuICAgICAgICAgIHZhciBMID0gTWF0aC5taW4oZS5kaXNwbGF5LndyYXBwZXIuY2xpZW50SGVpZ2h0LCBzZShlKS5pbm5lckhlaWdodCB8fCB1KGUpLmRvY3VtZW50RWxlbWVudC5jbGllbnRIZWlnaHQpLCBIID0gTWF0aC5tYXgoTCAtIDAuNSAqIHRpKGUuZGlzcGxheSksIDMpO1xuICAgICAgICAgIE8gPSAobCA+IDAgPyBuLmJvdHRvbSA6IG4udG9wKSArIGwgKiBIO1xuICAgICAgICB9IGVsc2VcbiAgICAgICAgICBhID09IFwibGluZVwiICYmIChPID0gbCA+IDAgPyBuLmJvdHRvbSArIDMgOiBuLnRvcCAtIDMpO1xuICAgICAgICBmb3IgKHZhciBVOyBVID0gX2EoZSwgZywgTyksICEhVS5vdXRzaWRlOyApIHtcbiAgICAgICAgICBpZiAobCA8IDAgPyBPIDw9IDAgOiBPID49IHUuaGVpZ2h0KSB7XG4gICAgICAgICAgICBVLmhpdFNpZGUgPSAhMDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgICBPICs9IGwgKiA1O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBVO1xuICAgICAgfVxuICAgICAgdmFyIGN0ID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB0aGlzLmNtID0gZSwgdGhpcy5sYXN0QW5jaG9yTm9kZSA9IHRoaXMubGFzdEFuY2hvck9mZnNldCA9IHRoaXMubGFzdEZvY3VzTm9kZSA9IHRoaXMubGFzdEZvY3VzT2Zmc2V0ID0gbnVsbCwgdGhpcy5wb2xsaW5nID0gbmV3IHBlKCksIHRoaXMuY29tcG9zaW5nID0gbnVsbCwgdGhpcy5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9PSBcImN1dFwiICYmIGEub3BlcmF0aW9uKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGEuc2V0U2VsZWN0aW9ucyhILnJhbmdlcywgMCwgTWUpLCBhLnJlcGxhY2VTZWxlY3Rpb24oXCJcIiwgbnVsbCwgXCJjdXRcIik7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIGlmIChMLmNsaXBib2FyZERhdGEpIHtcbiAgICAgICAgICAgICAgTC5jbGlwYm9hcmREYXRhLmNsZWFyRGF0YSgpO1xuICAgICAgICAgICAgICB2YXIgVSA9IExuLnRleHQuam9pbihgXG5gKTtcbiAgICAgICAgICAgICAgaWYgKEwuY2xpcGJvYXJkRGF0YS5zZXREYXRhKFwiVGV4dFwiLCBVKSwgTC5jbGlwYm9hcmREYXRhLmdldERhdGEoXCJUZXh0XCIpID09IFUpIHtcbiAgICAgICAgICAgICAgICBMLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgRyA9IEhmKCksIFkgPSBHLmZpcnN0Q2hpbGQ7XG4gICAgICAgICAgICBhLmRpc3BsYXkubGluZVNwYWNlLmluc2VydEJlZm9yZShHLCBhLmRpc3BsYXkubGluZVNwYWNlLmZpcnN0Q2hpbGQpLCBZLnZhbHVlID0gTG4udGV4dC5qb2luKGBcbmApO1xuICAgICAgICAgICAgdmFyIGVlID0gWCh1Lm93bmVyRG9jdW1lbnQpO1xuICAgICAgICAgICAgZGUoWSksIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIGEuZGlzcGxheS5saW5lU3BhY2UucmVtb3ZlQ2hpbGQoRyksIGVlLmZvY3VzKCksIGVlID09IHUgJiYgbC5zaG93UHJpbWFyeVNlbGVjdGlvbigpO1xuICA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IHRoaXMuZm9yY2VDb21wb3NpdGlvbkVuZCgpO1xuICAgICAgfSwgY3QucHJvdG90eXBlLmZvcmNlQ29tcG9zaXRpb25FbmQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgIXRoaXMuY29tcG9zaW5nIHx8IChjbGVhclRpbWVvdXQodGhpcy5yZWFkRE9NVGltZW91dCksIHRoaXMuY29tcG9zaW5nID0gbnVsbCwgdGhpcy51cGRhdGVGcm9tRE9NKCksIHRoaXMuZGl2LmJsdXIoKSwgdGhpcy5kaXYuZm9jdXMoKSk7XG4gICAgICB9LCBjdC5wcm90b3R5cGUucmVhZEZyb21ET01Tb29uID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBlID0gdGhpcztcbiAgICAgICAgdGhpcy5yZWFkRE9NVGltZW91dCA9PSBudWxsICYmICh0aGlzLnJlYWRET01UaW1lb3V0ID0gc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICBpZiAoZS5yZWFkRE9NVGltZW91dCA9IG51bGwsIGUuY29tcG9zaW5nKVxuICAgICAgICAgICAgaWYgKGUuY29tcG9zaW5nLmRvbmUpXG4gICAgICAgICAgICAgIGUuY29tcG9zaW5nID0gbnVsbDtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIGUudXBkYXRlRnJvbURPTSgpO1xuICAgICAgICB9LCA4MCkpO1xuICAgICAgfSwgY3QucHJvdG90eXBlLnVwZGF0ZUZyb21ET00gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIGUgPSB0aGlzO1xuICAgICAgICAodGhpcy5jbS5pc1JlYWRPbmx5KCkgfHwgIXRoaXMucG9sbENvbnRlbnQoKSkgJiYgZG4odGhpcy5jbSwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgcmV0dXJuIHRuKGUuY20pO1xuICAgICAgICB9KTtcbiAgICAgIH0sIGN0LnByb3RvdHlwZS5zZXRVbmVkaXRhYmxlID0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ICAgICAgTyA9IEwgJSAyID8gXCJyaWdodFwiIDogXCJsZWZ0XCI7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIEggPSB2dSh1Lm1hcCwgbi5jaCwgTyk7XG4gICAgICAgIHJldHVybiBILm9mZnNldCA9IEguY29sbGFwc2UgPT0gXCJyaWdodFwiID8gSC5lbmQgOiBILnN0YXJ0LCBIO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gZmgoZSkge1xuICAgICAgICBmb3IgKHZhciBuID0gZTsgbjsgbiA9IG4ucGFyZW50Tm9kZSlcbiAgICAgICAgICBpZiAoL0NvZGVNaXJyb3ItZ3V0dGVyLXdyYXBwZXIvLnRlc3Qobi5jbGFzc05hbWUpKVxuICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICByZXR1cm4gITE7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBoaShlLCBuKSB7XG4gICAgICAgIHJldHVybiBuICYmIChlLmJhZCA9ICEwKSwgZTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGRoKGUsIG4sIGwsIGEsIHUpIHtcbiAgICAgICAgdmFyIGcgPSBcIlwiLCBPID0gITEsIEwgPSBlLmRvYy5saW5lU2VwYXJhdG9yKCksIEggPSAhMTtcbiAgICAgICAgZnVuY3Rpb24gVShfKSB7XG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKGFlKSB7XG4gICAgICAgICAgICByZXR1cm4gYWUuaWQgPT0gXztcbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIEcoKSB7XG4gICAgICAgICAgTyAmJiAoZyArPSBMLCBIICYmIChnICs9IEwpLCBPID0gSCA9ICExKTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBZKF8pIHtcbiAgICAgICAgICBfICYmIChHKCksIGcgKz0gXyk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gZWUoXykge1xuICAgICAgICAgIGlmIChfLm5vZGVUeXBlID09IDEpIHtcbiAgICAgICAgICAgIHZhciBhZSA9IF8uZ2V0QXR0cmlidXRlKFwiY20tdGV4dFwiKTtcbiAgICAgICAgICAgIGlmIChhZSkge1xuICAgICAgICAgICAgICBZKGFlKTtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGNlID0gXy5nZXRBdHRyaWJ1dGUoXCJjbS1tYXJrZXJcIiksIHllO1xuICAgICAgICAgICAgaWYgKGNlKSB7XG4gICAgICAgICAgICAgIHZhciBDZSA9IGUuZmluZE1hcmtzKHEoYSwgMCksIHEodSArIDEsIDApLCBVKCtjZSkpO1xuICAgICAgICAgICAgICBDZS5sZW5ndGggJiYgKHllID0gQ2VbMF0uZmluZCgwKSkgJiYgWShfbihlLmRvYywgeWUuZnJvbSwgeWUudG8pLmpvaW4oTCkpO1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoXy5nZXRBdHRyaWJ1dGUoXCJjb250ZW50ZWRpdGFibGVcIikgPT0gXCJmYWxzZVwiKVxuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB2YXIgVGUgPSAvXihwcmV8ZGl2fHB8bGl8dGFibGV8YnIpJC9pLnRlc3QoXy5ub2RlTmFtZSk7XG4gICAgICAgICAgICBpZiAoIS9eYnIkL2kudGVzdChfLm5vZGVOYW1lKSAmJiBfLnRleHRDb250ZW50Lmxlbmd0aCA9PSAwKVxuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBUZSAmJiBHKCk7XG4gICAgICAgICAgICBmb3IgKHZhciBFZSA9IDA7IEVlIDwgXy5jaGlsZE5vZGVzLmxlbmd0aDsgRWUrKylcbiAgICAgICAgICAgICAgZWUoXy5jaGlsZE5vZGVzW0VlXSk7XG4gICAgICAgICAgICAvXihwcmV8cCkkL2kudGVzdChfLm5vZGVOYW1lKSAmJiAoSCA9ICEwKSwgVGUgJiYgKE8gPSAhMCk7XG4gICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICBfLm5vZGVUeXBlID09IDMgJiYgWShfLm5vZGVWYWx1ZS5yZXBsYWNlKC9cXHUyMDBiL2csIFwiXCIpLnJlcGxhY2UoL1xcdTAwYTAvZywgXCIgXCIpKTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKDsgZWUobiksIG4gIT0gbDsgKVxuICAgICAgICAgIG4gPSBuLm5leHRTaWJsaW5nLCBIID0gITE7XG4gICAgICAgIHJldHVybiBnO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gb2EoZSwgbiwgbCkge1xuICAgICAgICB2YXIgYTtcbiAgICAgICAgaWYgKG4gPT0gZS5kaXNwbGF5LmxpbmVEaXYpIHtcbiAgICAgICAgICBpZiAoYSA9IGUuZGlzcGxheS5saW5lRGl2LmNoaWxkTm9kZXNbbF0sICFhKVxuICAgICAgICAgICAgcmV0dXJuIGhpKGUuY2xpcFBvcyhxKGUuZGlzcGxheS52aWV3VG8gLSAxKSksICEwKTtcbiAgICAgICAgICBuID0gbnVsbCwgbCA9IDA7XG4gICAgICAgIH0gZWxzZVxuICAgICAgICAgIGZvciAoYSA9IG47IDsgYSA9IGEucGFyZW50Tm9kZSkge1xuICAgICAgICAgICAgaWYgKCFhIHx8IGEgPT0gZS5kaXNwbGF5LmxpbmVEaXYpXG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgaWYgKGEucGFyZW50Tm9kZSAmJiBhLnBhcmVudE5vZGUgPT0gZS5kaXNwbGF5LmxpbmVEaXYpXG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIgdSA9IDA7IHUgPCBlLmRpc3BsYXkudmlldy5sZW5ndGg7IHUrKykge1xuICAgICAgICAgIHZhciBnID0gZS5kaXNwbGF5LnZpZXdbdV07XG4gICAgICAgICAgaWYgKGcubm9kZSA9PSBhKVxuICAgICAgICAgICAg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VtrZSArIDJdO1xuICAgICAgICAgICAgICBpZiAoSGUgPT0geWUgfHwgSGUgPT0gQ2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgWGUgPSBzdChFZSA8IDAgPyBlLmxpbmUgOiBlLnJlc3RbRWVdKSwgdnQgPSBOZVtrZV0gKyBUZTtcbiAgICAgICAgICAgICAgICByZXR1cm4gKFRlIDwgMCB8fCBIZSAhPSB5ZSkgJiYgKHZ0ID0gTmVba2UgKyAoVGUgPyAxIDogMCldKSwgcShYZSwgdnQpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIFkgPSBHKE8sIEwsIGwpO1xuICAgICAgICBpZiAoWSlcbiAgICAgICAgICByZXR1cm4gaGkoWSwgdSk7XG4gICAgICAgIGZvciAodmFyIGVlID0gTC5uZXh0U2libGluZywgXyA9IE8gPyBPLm5vZGVWYWx1ZS5sZW5ndGggLSBsIDogMDsgZWU7IGVlID0gZWUubmV4dFNpYmxpbmcpIHtcbiAgICAgICAgICBpZiAoWSA9IEcoZWUsIGVlLmZpcnN0Q2hpbGQsIDApLCBZKVxuICAgICAgICAgICAgcmV0dXJuIGhpKHEoWS5saW5lLCBZLmNoIC0gXyksIHUpO1xuICAgICAgICAgIF8gKz0gZWUudGV4dENvbnRlbnQubGVuZ3RoO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIGFlID0gTC5wcmV2aW91c1NpYmxpbmcsIGNlID0gbDsgYWU7IGFlID0gYWUucHJldmlvdXNTaWJsaW5nKSB7XG4gICAgICAgICAgaWYgKFkgPSBHKGFlLCBhZS5maXJzdENoaWxkLCAtMSksIFkpXG4gICAgICAgICAgICByZXR1cm4gaGkocShZLmxpbmUsIFkuY2ggKyBjZSksIHUpO1xuICAgICAgICAgIGNlICs9IGFlLnRleHRDb250ZW50Lmxlbmd0aDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdmFyIFR0ID0gZnVuY3Rpb24oZS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GlmIChhLm9wdGlvbnMubGluZVdpc2VDb3B5Q3V0KSB7XG4gICAgICAgICAgICAgIHZhciBMID0gTGYoYSk7XG4gICAgICAgICAgICAgIGlhKHsgbGluZVdpc2U6ICEwLCB0ZXh0OiBMLnRleHQgfSksIE8udHlwZSA9PSBcImN1dFwiID8gYS5zZXRTZWxlY3Rpb25zKEwucmFuZ2VzLCBudWxsLCBNZSkgOiAobC5wcmV2SW5wdXQgPSBcIlwiLCB1LnZhbHVlID0gTC50ZXh0LmpvaW4oYFxuYCksIGRlKHUpKTtcbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBPLnR5cGUgPT0gXCJjdXRcIiAmJiAoYS5zdGF0ZS5jdXRJbmNvbWluZyA9ICtuZXcgRGF0ZSgpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgbmUodSwgXCJjdXRcIiwgZyksIG5lKHUsIFwiY29weVwiLCBnKSwgbmUoZS5zY3JvbGxlciwgXCJwYXN0ZVwiLCBmdW5jdGlvbihPKSB7XG4gICAgICAgICAgaWYgKCEobnIoZSwgTykgfHwgUWUoYSwgTykpKSB7XG4gICAgICAgICAgICBpZiAoIXUuZGlzcGF0Y2hFdmVudCkge1xuICAgICAgICAgICAgICBhLnN0YXRlLnBhc3RlSW5jb21pbmcgPSArbmV3IERhdGUoKSwgbC5mb2N1cygpO1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgTCA9IG5ldyBFdmVudChcInBhc3RlXCIpO1xuICAgICAgICAgICAgTC5jbGlwYm9hcmREYXRhID0gTy5jbGlwYm9hcmREYXRhLCB1LmRpc3BhdGNoRXZlbnQoTCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSwgbmUoZS5saW5lU3BhY2UsIFwic2VsZWN0c3RhcnRcIiwgZnVuY3Rpb24oTykge1xuICAgICAgICAgIG5yKGUsIE8pIHx8IGx0K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B0cnk6IHEsXG4gICAgICAgICAgZmluYWxseTogcSxcbiAgICAgICAgICByZXR1cm46IHplLFxuICAgICAgICAgIGJyZWFrOiB6ZSxcbiAgICAgICAgICBjb250aW51ZTogemUsXG4gICAgICAgICAgbmV3OiB6KFwibmV3XCIpLFxuICAgICAgICAgIGRlbGV0ZTogb2UsXG4gICAgICAgICAgdm9pZDogb2UsXG4gICAgICAgICAgdGhyb3c6IG9lLFxuICAgICAgICAgIGRlYnVnZ2VyOiB6KFwiZGVidWdnZXJcIiksXG4gICAgICAgICAgdmFyOiB6KFwidmFyXCIpLFxuICAgICAgICAgIGNvbnN0OiB6KFwidmFyXCIpLFxuICAgICAgICAgIGxldDogeihcInZhclwiKSxcbiAgICAgICAgICBmdW5jdGlvbjogeihcImZ1bmN0aW9uXCIpLFxuICAgICAgICAgIGNhdGNoOiB6KFwiY2F0Y2hcIiksXG4gICAgICAgICAgZm9yOiB6KFwiZm9yXCIpLFxuICAgICAgICAgIHN3aXRjaDogeihcInN3aXRjaFwiKSxcbiAgICAgICAgICBjYXNlOiB6KFwiY2FzZVwiKSxcbiAgICAgICAgICBkZWZhdWx0OiB6KFwiZGVmYXVsdFwiKSxcbiAgICAgICAgICBpbjogdHQsXG4gICAgICAgICAgdHlwZW9mOiB0dCxcbiAgICAgICAgICBpbnN0YW5jZW9mOiB0dCxcbiAgICAgICAgICB0cnVlOiBydCxcbiAgICAgICAgICBmYWxzZTogcnQsXG4gICAgICAgICAgbnVsbDogcnQsXG4gICAgICAgICAgdW5kZWZpbmVkOiBydCxcbiAgICAgICAgICBOYU46IHJ0LFxuICAgICAgICAgIEluZmluaXR5OiBydCxcbiAgICAgICAgICB0aGlzOiB6KFwidGhpc1wiKSxcbiAgICAgICAgICBjbGFzczogeihcImNsYXNzXCIpLFxuICAgICAgICAgIHN1cGVyOiB6KFwiYXRvbVwiKSxcbiAgICAgICAgICB5aWVsZDogb2UsXG4gICAgICAgICAgZXhwb3J0OiB6KFwiZXhwb3J0XCIpLFxuICAgICAgICAgIGltcG9ydDogeihcImltcG9ydFwiKSxcbiAgICAgICAgICBleHRlbmRzOiBvZSxcbiAgICAgICAgICBhd2FpdDogb2VcbiAgICAgICAgfTtcbiAgICAgIH0oKSwgVCA9IC9bK1xcLSomJT08PiE/fH5eQF0vLCBtID0gL15AKGNvbnRleHR8aWR8dmFsdWV8bGFuZ3VhZ2V8dHlwZXxjb250YWluZXJ8bGlzdHxzZXR8cmV2ZXJzZXxpbmRleHxiYXNlfHZvY2FifGdyYXBoKVwiLztcbiAgICAgIGZ1bmN0aW9uIHgoeikge1xuICAgICAgICBmb3IgKHZhciBLID0gITEsIHEsIG9lID0gITE7IChxID0gei5uZXh0KCkpICE9IG51bGw7ICkge1xuICAgICAgICAgIGlmICghSykge1xuICAgICAgICAgICAgaWYgKHEgPT0gXCIvXCIgJiYgIW9lKVxuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBxID09IFwiW1wiID8gb2UgPSAhMCA6IG9lICYmIHEgPT0gXCJdXCIgJiYgKG9lID0gITEpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBLID0gIUsgJiYgcSA9PSBcIlxcXFxcIjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdmFyIFIsIHc7XG4gICAgICBmdW5jdGlvbiBBKHosIEssIHEpIHtcbiAgICAgICAgcmV0dXJuIFIgPSB6LCB3ID0gcSwgSztcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIEUoeiwgSykge1xuICAgICAgICB2YXIgcSA9IHoubmV4dCgpO1xuICAgICAgICBpZiAocSA9PSAnXCInIHx8IHEgPT0gXCInXCIpXG4gICAgICAgICAgcmV0dXJuIEsudG9rZW5pemUgPSBDKHEpLCBLLnRva2VuaXplKHosIEspO1xuICAgICAgICBpZiAocSA9PSBcIi5cIiAmJiB6Lm1hdGNoKC9eXFxkW1xcZF9dKig/OltlRV1bK1xcLV0/W1xcZF9dKyk/LykpXG4gICAgICAgICAgcmV0dXJuIEEoXCJudW1iZXJcIiwgXCJudW1iZXJcIik7XG4gICAgICAgIGlmIChxID09IFwiLlwiICYmIHoubWF0Y2goXCIuLlwiKSlcbiAgICAgICAgICByZXR1cm4gQShcInNwcmVhZFwiLCBcIm1ldGFcIik7XG4gICAgICAgIGlmICgvW1xcW1xcXXt9XFwoXFwpLDtcXDpcXC5dLy50ZXN0KHEpKVxuICAgICAgICAgIHJldHVybiBBKHEpO1xuICAgICAgICBpZiAocSA9PSBcIj1cIiAmJiB6LmVhdChcIj5cIikpXG4gICAgICAgICAgcmV0dXJuIEEoXCI9PlwiLCBcIm9wZXJhdG9yXCIpO1xuICAgICAgICBpZiAocSA9PSBcIjBcIiAmJiB6Lm1hdGNoKC9eKD86eFtcXGRBLUZhLWZfXSt8b1swLTdfXSt8YlswMV9dKyluPy8pKVxuICAgICAgICAgIHJldHVybiBBKFwibnVtYmVyXCIsIFwibnVtYmVyXCIpO1xuICAgICAgICBpZiAoL1xcZC8udGVzdChxKSlcbiAgICAgICAgICByZXR1cm4gei5tYXRjaCgvXltcXGRfXSooPzpufCg/OlxcLltcXGRfXSopPyg/OltlRV1bK1xcLV0/W1xcZF9dKyk/KT8vKSwgQShcIm51bWJlclwiLCBcIm51bWJlclwiKTtcbiAgICAgICAgaWYgKHEgPT0gXCIvXCIpXG4gICAgICAgICAgcmV0dXJuIHouZWF0KFwiKlwiKSA/IChLLnRva2VuaXplID0gTSwgTSh6LCBLKSkgOiB6LmVhdChcIi9cIikgPyAoei5za2lwVG9FbmQoKSwgQShcImNvbW1lbnRcIiwgXCJjb21tZW50XCIpKSA6IHpuKHosIEssIDEpID8gKHgoeiksIHoubWF0Y2goL15cXGIoKFtnaW15dXNdKSg/IVtnaW15dXNdKlxcMikpK1xcYi8pLCBBKFwicmVnZXhwXCIsIFwic3RyaW5nLTJcIikpIDogKHouZWF0KFwiPVwiKSwgQShcIm9wZXJhdG9yXCIsIFwib3BlcmF0b3JcIiwgei5jdXJyZW50KCkpKTtcbiAgICAgICAg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Lmxhc3RUeXBlICE9IFwiLlwiKSB7XG4gICAgICAgICAgICBpZiAoRC5wcm9wZXJ0eUlzRW51bWVyYWJsZShvZSkpIHtcbiAgICAgICAgICAgICAgdmFyIHplID0gRFtvZV07XG4gICAgICAgICAgICAgIHJldHVybiBBKHplLnR5cGUsIHplLnN0eWxlLCBvZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAob2UgPT0gXCJhc3luY1wiICYmIHoubWF0Y2goL14oXFxzfFxcL1xcKihbXipdfFxcKig/IVxcLykpKj9cXCpcXC8pKltcXFtcXChcXHddLywgITEpKVxuICAgICAgICAgICAgICByZXR1cm4gQShcImFzeW5jXCIsIFwia2V5d29yZFwiLCBvZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBBKFwidmFyaWFibGVcIiwgXCJ2YXJpYWJsZVwiLCBvZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIEMoeikge1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24oSywgcSkge1xuICAgICAgICAgIHZhciBvZSA9ICExLCB6ZTtcbiAgICAgICAgICBpZiAoYyAmJiBLLnBlZWsoKSA9PSBcIkBcIiAmJiBLLm1hdGNoKG0pKVxuICAgICAgICAgICAgcmV0dXJuIHEudG9rZW5pemUgPSBFLCBBKFwianNvbmxkLWtleXdvcmRcIiwgXCJtZXRhXCIpO1xuICAgICAgICAgIGZvciAoOyAoemUgPSBLLm5leHQoKSkgIT0gbnVsbCAmJiAhKHplID09IHogJiYgIW9lKTsgKVxuICAgICAgICAgICAgb2UgPSAhb2UgJiYgemUgPT0gXCJcXFxcXCI7XG4gICAgICAgICAgcmV0dXJuIG9lIHx8IChxLnRva2VuaXplID0gRSksIEEoXCJzdHJpbmdcIiwgXCJzdHJpbmdcIik7XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBNKHosIEspIHtcbiAgICAgICAgZm9yICh2YXIgcSA9ICExLCBvZTsgb2UgPSB6Lm5leHQoKTsgKSB7XG4gICAgICAgICAgaWYgKG9lID09IFwiL1wiICYmIHEpIHtcbiAgICAgICAgICAgIEsudG9rZW5pemUgPSBFO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICAgIHEgPSBvZSA9PSBcIipcIjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQShcImNvbW1lbnRcIiwgXCJjb21tZW50XCIpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24geSh6LCBLKSB7XG4gICAgICAgIGZvciAodmFyIHEgPSAhMSwgb2U7IChvZSA9IHoubmV4dCgpKSAhPSBudWxsOyApIHtcbiAgICAgICAgICBpZiAoIXEgJiYgKG9lID09IFwiYFwiIHx8IG9lID09IFwiJFwiICYmIHouZWF0KFwie1wiKSkpIHtcbiAgICAgICAgICAgIEsudG9rZW5pemUgPSBFO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICAgIHEgPSAhcSAmJiBvZSA9PSBcIlxcXFxcIjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQShcInF1YXNpXCIsIFwic3RyaW5nLTJcIiwgei5jdXJyZW50KCkpO1xuICAgICAgfVxuICAgICAgdmFyIEIgPSBcIihbe31dKVwiO1xuICAgICAgZnVuY3Rpb24gJCh6LCBLKSB7XG4gICAgICAgIEsuZmF0QXJyb3dBdCAmJiAoSy5mYXRBcnJvd0F0ID0gbnVsbCk7XG4gICAgICAgIHZhciBxID0gei5zdHJpbmcuaW5kZXhPZihcIj0+XCIsIHouc3RhcnQpO1xuICAgICAgICBpZiAoIShxIDwgMCkpIHtcbiAgICAgICAgICBpZiAoYikge1xuICAgICAgICAgICAgdmFyIG9lID0gLzpcXHMqKD86XFx3Kyg/OjxbXj5dKj58XFxbXFxdKT98XFx7W159XSpcXH0pXFxzKiQvLmV4ZWMoei5zdHJpbmcuc2xpY2Uoei5zdGFydCwgcSkpO1xuICAgICAgICAgICAgb2UgJiYgKHEgPSBvZS5pbmRleCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZvciAodmFyIHplID0gMCwgdHQgPSAhMSwgcnQgPSBxIC0gMTsgcnQgPj0gMDsgLS1ydCkge1xuICAgICAgICAgICAgdmFyIFB0ID0gei5zdHJpbmcuY2hhckF0KHJ0KSwgeW4gPSBCLmluZGV4T2YoUHQpO1xuICAgICAgICAgICAgaWYgKHluID49IDAgJiYgeW4gPCAzKSB7XG4gICAgICAgICAgICAgIGlmICghemUpIHtcbiAgICAgICAgICAgICAgICArK3J0O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmICgtLXplID09IDApIHtcbiAgICAgICAgICAgICAgICBQdCA9PSBcIihcIiAmJiAodHQgPSAhMCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoeW4gPj0gMyAmJiB5biA8IDYpXG4gICAgICAgICAgICAgICsremU7XG4gICAgICAgICAgICBlbHNlIGlmIChTLnRlc3QoUHQpKVxuICAgICAgICAgICAgICB0dCA9ICEwO1xuICAgICAgICAgICAgZWxzZSBpZiAoL1tcIidcXC9gXS8udGVzdChQdCkpXG4gICAgICAgICAgICAgIGZvciAoOyA7IC0tcnQpIHtcbiAgICAgICAgICAgICAgICBpZiAocnQgPT0gMClcbiAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB2YXIgVmUgPSB6LnN0cmluZy5jaGFyQXQocnQgLSAxKTtcbiAgICAgICAgICAgICAgICBpZiAoVmUgPT0gUHQgJiYgei5zdHJpbmcuY2hhckF0KHJ0IC0gMikgIT0gXCJcXFxcXCIpIHtcbiAgICAgICAgICAgICAgICAgIHJ0LS07XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHR0ICYmICF6ZSkge1xuICAgICAgICAgICAgICArK3J0O1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgdHQgJiYgIXplICYmIChLLmZhdEFycm93QXQgPSBydCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHZhciBGID0ge1xuICAgICAgICBhdG9tOiAhMCxcbiAgICAgICAgbnVtYmVyOiAhMCxcbiAgICAgICAgdmFyaWFibGU6ICEwLFxuICAgICAgICBzdHJpbmc6ICEwLFxuICAgICAgICByZWdleHA6ICEwLFxuICAgICAgICB0aGlzOiAhMCxcbiAgICAgICAgaW1wb3J0OiAhMCxcbiAgICAgICAgXCJqc29ubGQta2V5d29yZFwiOiAhMFxuICAgICAgfTtcbiAgICAgIGZ1bmN0aW9uIGsoeiwgSywgcSwgb2UsIHplLCB0dCkge1xuICAgICAgICB0aGlzLmluZGVudGVkID0geiwgdGhpcy5jb2x1bW4gPSBLLCB0aGlzLnR5cGUgPSBxLCB0aGlzLnByZXYgPSB6ZSwgdGhpcy5pbmZvID0gdHQsIG9lICE9IG51bGwgJiYgKHRoaXMuYWxpZ24gPSBvZSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBoKHosIEspIHtcbiAgICAgICAgaWYgKCF2KVxuICAgICAgICAgIHJldHVybiAhMTtcbiAgICAgICAgZm9yICh2YXIgcSA9IHoubG9jYWxWYXJzOyBxOyBxID0gcS5uZXh0KVxuICAgICAgICAgIGlmIChxLm5hbWUgPT0gSylcbiAgICAgICAgICAgIHJldHVybiAhMDtcbiAgICAgICAgZm9yICh2YXIgb2UgPSB6LmNvbnRleHQ7IG9lOyBvZSA9IG9lLnByZXYpXG4gICAgICAgICAgZm9yICh2YXIgcSA9IG9lLnZhcnM7IHE7IHEgPSBxLm5leHQpXG4gICAgICAgICAgICBpZiAocS5uYW1lID09IEspXG4gICAgICAgICAgICAgIHJldHVybiAhMDtcbiAgIC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SA9IHEubmV4dClcbiAgICAgICAgICBpZiAocS5uYW1lID09IHopXG4gICAgICAgICAgICByZXR1cm4gITA7XG4gICAgICAgIHJldHVybiAhMTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIFcoeikge1xuICAgICAgICB2YXIgSyA9IFAuc3RhdGU7XG4gICAgICAgIGlmIChQLm1hcmtlZCA9IFwiZGVmXCIsICEhdikge1xuICAgICAgICAgIGlmIChLLmNvbnRleHQpIHtcbiAgICAgICAgICAgIGlmIChLLmxleGljYWwuaW5mbyA9PSBcInZhclwiICYmIEsuY29udGV4dCAmJiBLLmNvbnRleHQuYmxvY2spIHtcbiAgICAgICAgICAgICAgdmFyIHEgPSBRKHosIEsuY29udGV4dCk7XG4gICAgICAgICAgICAgIGlmIChxICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBLLmNvbnRleHQgPSBxO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICghVih6LCBLLmxvY2FsVmFycykpIHtcbiAgICAgICAgICAgICAgSy5sb2NhbFZhcnMgPSBuZXcgWih6LCBLLmxvY2FsVmFycyk7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgdC5nbG9iYWxWYXJzICYmICFWKHosIEsuZ2xvYmFsVmFycykgJiYgKEsuZ2xvYmFsVmFycyA9IG5ldyBaKHosIEsuZ2xvYmFsVmFycykpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBRKHosIEspIHtcbiAgICAgICAgaWYgKEspXG4gICAgICAgICAgaWYgKEsuYmxvY2spIHtcbiAgICAgICAgICAgIHZhciBxID0gUSh6LCBLLnByZXYpO1xuICAgICAgICAgICAgcmV0dXJuIHEgPyBxID09IEsucHJldiA/IEsgOiBuZXcgSihxLCBLLnZhcnMsICEwKSA6IG51bGw7XG4gICAgICAgICAgfSBlb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mxvY2FsVmFycyA9IFAuc3RhdGUuY29udGV4dC52YXJzLCBQLnN0YXRlLmNvbnRleHQgPSBQLnN0YXRlLmNvbnRleHQucHJldjtcbiAgICAgIH1cbiAgICAgIG1lLmxleCA9ICEwO1xuICAgICAgZnVuY3Rpb24gbGUoeiwgSykge1xuICAgICAgICB2YXIgcSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZhciBvZSA9IFAuc3RhdGUsIHplID0gb2UuaW5kZW50ZWQ7XG4gICAgICAgICAgaWYgKG9lLmxleGljYWwudHlwZSA9PSBcInN0YXRcIilcbiAgICAgICAgICAgIHplID0gb2UubGV4aWNhbC5pbmRlbnRlZDtcbiAgICAgICAgICBlbHNlXG4gICAgICAgICAgICBmb3IgKHZhciB0dCA9IG9lLmxleGljYWw7IHR0ICYmIHR0LnR5cGUgPT0gXCIpXCIgJiYgdHQuYWxpZ247IHR0ID0gdHQucHJldilcbiAgICAgICAgICAgICAgemUgPSB0dC5pbmRlbnRlZDtcbiAgICAgICAgICBvZS5sZXhpY2FsID0gbmV3IGsoemUsIFAuc3RyZWFtLmNvbHVtbigpLCB6LCBudWxsLCBvZS5sZXhpY2FsLCBLKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIHEubGV4ID0gITAsIHE7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBpZSgpIHtcbiAgICAgICAgdmFyIHogPSBQLnN0YXRlO1xuICAgICAgICB6LmxleGljYWwucHJldiAmJiAoei5sZXhpY2FsLnR5cGUgPT0gXCIpXCIgJiYgKHouaW5kZW50ZWQgPSB6LmxleGljYWwuaW5kZW50ZWQpLCB6LmxleGljYWwgPSB6LmxleGljYWwucHJldik7XG4gICAgICB9XG4gICAgICBpZS5sZXggPSAhMDtcbiAgICAgIGZ1bmN0aW9uIHBlKHopIHtcbiAgICAgICAgZnVuY3Rpb24gSyhxKSB7XG4gICAgICAgICAgcmV0dXJuIHEgPT0geiA/IEkoKSA6IHogPT0gXCI7XCIg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XJhdG9yXCIpXG4gICAgICAgICAgcmV0dXJuIC9cXCtcXCt8LS0vLnRlc3QoSykgfHwgYiAmJiBLID09IFwiIVwiID8gSShvZSkgOiBiICYmIEsgPT0gXCI8XCIgJiYgUC5zdHJlYW0ubWF0Y2goL14oW148Pl18PFtePD5dKj4pKj5cXHMqXFwoLywgITEpID8gSShsZShcIj5cIiksIGF0KG5lLCBcIj5cIiksIGllLCBvZSkgOiBLID09IFwiP1wiID8gSShBZSwgcGUoXCI6XCIpLCB6ZSkgOiBJKHplKTtcbiAgICAgICAgaWYgKHogPT0gXCJxdWFzaVwiKVxuICAgICAgICAgIHJldHVybiBqKEJlLCBvZSk7XG4gICAgICAgIGlmICh6ICE9IFwiO1wiKSB7XG4gICAgICAgICAgaWYgKHogPT0gXCIoXCIpXG4gICAgICAgICAgICByZXR1cm4gdW4oTWUsIFwiKVwiLCBcImNhbGxcIiwgb2UpO1xuICAgICAgICAgIGlmICh6ID09IFwiLlwiKVxuICAgICAgICAgICAgcmV0dXJuIEkoa24sIG9lKTtcbiAgICAgICAgICBpZiAoeiA9PSBcIltcIilcbiAgICAgICAgICAgIHJldHVybiBJKGxlKFwiXVwiKSwgZXQsIHBlKFwiXVwiKSwgaWUsIG9lKTtcbiAgICAgICAgICBpZiAoYiAmJiBLID09IFwiYXNcIilcbiAgICAgICAgICAgIHJldHVybiBQLm1hcmtlZCA9IFwia2V5d29yZFwiLCBJKG5lLCBvZSk7XG4gICAgICAgICAgaWYgKHogPT0gXCJyZWdleHBcIilcbiAgICAgICAgICAgIHJldHVybiBQLnN0YXRlLmxhc3RUeXBlID0gUC5tYXJrZWQgPSBcIm9wZXJhdG9yXCIsIFAuc3RyZWFtLmJhY2tVcChQLnN0cmVhbS5wb3MgLSBQLnN0cmVhbS5zdGFydCAtIDEpLCBJKHplKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQmUoeiwgSykge1xuICAgICAgICByZXR1cm4geiAhPSBcInF1YXNpXCIgPyBqKCkgOiBLLnNsaWNlKEsubGVuZ3RoIC0gMikgIT0gXCIke1wiID8gSShCZSkgOiBJKGV0LCBwdCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBwdCh6KSB7XG4gICAgICAgIGlmICh6ID09IFwifVwiKVxuICAgICAgICAgIHJldHVybiBQLm1hcmtlZCA9IFwic3RyaW5nLTJcIiwgUC5zdGF0ZS50b2tlbml6ZSA9IHksIEkoQmUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gc24oeikge1xuICAgICAgICByZXR1cm4gJChQLnN0cmVhbSwgUC5zdGF0ZSksIGooeiA9PSBcIntcIiA/IHRlIDogQWUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQnQoeikge1xuICAgICAgICByZXR1cm4gJChQLnN0cmVhbSwgUC5zdGF0ZSksIGooeiA9PSBcIntcIiA/IHRlIDogTWUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gZHIoeikge1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24oSykge1xuICAgICAgICAgIHJldHVybiBLID09IFwiLlwiID8gSSh6ID8gdm4gOiAkbikgOiBLID09IFwidmFyaWFibGVcIiAmJiBiID8gSShsdCwgeiA/IHl0IDogZ3QpIDogaih6ID8gTWUgOiBBZSk7XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiAkbih6LCBLKSB7XG4gICAgICAgIGlmIChLID09IFwidGFyZ2V0XCIpXG4gICAgICAgICAgcmV0dXJuIFAubWFya2VkID0gXCJrZXl3b3JkXCIsIEkoZ3QpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gdm4oeiwgSykge1xuICAgICAgICBpZiAoSyA9PSBcInRhcmdldFwiKVxuICAgICAgICAgIHJldHVybiBQLm1hcmtlZCA9IFwia2V5d29yZFwiLCBJKHl0KTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIG1uKHopIHtcbiAgICAgICAgcmV0dXJuIHogPT0gXCI6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IgJiYgWChLKSlcbiAgICAgICAgICAgIHJldHVybiBQLm1hcmtlZCA9IFwia2V5d29yZFwiLCBJKGduKTtcbiAgICAgICAgICBpZiAoeiA9PSBcIltcIilcbiAgICAgICAgICAgIHJldHVybiBJKEFlLCBEZSwgcGUoXCJdXCIpLCBPdCk7XG4gICAgICAgICAgaWYgKHogPT0gXCJzcHJlYWRcIilcbiAgICAgICAgICAgIHJldHVybiBJKE1lLCBPdCk7XG4gICAgICAgICAgaWYgKEsgPT0gXCIqXCIpXG4gICAgICAgICAgICByZXR1cm4gUC5tYXJrZWQgPSBcImtleXdvcmRcIiwgSShnbik7XG4gICAgICAgICAgaWYgKHogPT0gXCI6XCIpXG4gICAgICAgICAgICByZXR1cm4gaihPdCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHhuKHopIHtcbiAgICAgICAgcmV0dXJuIHogIT0gXCJ2YXJpYWJsZVwiID8gaihPdCkgOiAoUC5tYXJrZWQgPSBcInByb3BlcnR5XCIsIEkoam4pKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIE90KHopIHtcbiAgICAgICAgaWYgKHogPT0gXCI6XCIpXG4gICAgICAgICAgcmV0dXJuIEkoTWUpO1xuICAgICAgICBpZiAoeiA9PSBcIihcIilcbiAgICAgICAgICByZXR1cm4gaihqbik7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBhdCh6LCBLLCBxKSB7XG4gICAgICAgIGZ1bmN0aW9uIG9lKHplLCB0dCkge1xuICAgICAgICAgIGlmIChxID8gcS5pbmRleE9mKHplKSA+IC0xIDogemUgPT0gXCIsXCIpIHtcbiAgICAgICAgICAgIHZhciBydCA9IFAuc3RhdGUubGV4aWNhbDtcbiAgICAgICAgICAgIHJldHVybiBydC5pbmZvID09IFwiY2FsbFwiICYmIChydC5wb3MgPSAocnQucG9zIHx8IDApICsgMSksIEkoZnVuY3Rpb24oUHQsIHluKSB7XG4gICAgICAgICAgICAgIHJldHVybiBQdCA9PSBLIHx8IHluID09IEsgPyBqKCkgOiBqKHopO1xuICAgICAgICAgICAgfSwgb2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gemUgPT0gSyB8fCB0dCA9PSBLID8gSSgpIDogcSAmJiBxLmluZGV4T2YoXCI7XCIpID4gLTEgPyBqKHopIDogSShwZShLKSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHplLCB0dCkge1xuICAgICAgICAgIHJldHVybiB6ZSA9PSBLIHx8IHR0ID09IEsgPyBJKCkgOiBqKHosIG9lKTtcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHVuKHosIEssIHEpIHtcbiAgICAgICAgZm9yICh2YXIgb2UgPSAzOyBvZSA8IGFyZ3VtZW50cy5sZW5ndGg7IG9lKyspXG4gICAgICAgICAgUC5jYy5wdXNoKGFyZ3VtZW50c1tvZV0pO1xuICAgICAgICByZXR1cm4gSShsZShLLCBxKSwgYXQoeiwgSyksIGllKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHFlKHopIHtcbiAgICAgICAgcmV0dXJuIHogPT0gXCJ9XCIgPyBJKCkgOiBqKHRlLCBxZSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBEZSh6LCBLKSB7XG4gICAgICAgIGlmIChiKSB7XG4gICAgICAgICAgaWYgKHogPT0gXCI6XCIpXG4gICAgICAgICAgICByZXR1cm4gSShuZSk7XG4gICAgICAgICAgaWYgKEsgPT0gXCI/XCIpXG4gICAgICAgICAgICByZXR1cm4gSShEZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHdlKHosIEspIHtcbiAgICAgICAgaWYgKGIgJiYgKHogPT0gXCI6XCIgfHwgSyA9PSBcImluXCIpKVxuICAgICAgICAgIHJldHVybiBJKG5lKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIFVlKHopIHtcbiAgICAgICAgaWYgKGIgJiYgeiA9PSBcIjpcIilcbiAgICAgICAgICByZXR1cm4gUC5zdHJlYW0ubWF0Y2goL15cXHMqXFx3K1xccytpc1xcYi8sICExKSA/IEkoQWUsIFJlLCBuZSkgOiBJKG5lKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIFJlKHosIEspIHtcbiAgICAgICAgaWYgKEsgPT0gXCJpc1wiKVxuICAgICAgICAgIHJldHVybiBQLm1hcmtlZCA9IFwia2V5d29yZFwiLCBJKCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBuZSh6LCBLKSB7XG4gICAgICAgIGlmIChLID09IFwia2V5b2ZcIiB8fCBLID09IFwidHlwZW9mXCIgfHwgSyA9PSBcImluZmVyXCIgfHwgSyA9PSBcInJlYWRvbmx5XCIpXG4gICAgICAgICAgcmV0dXJuIFAubWFya2VkID0gXCJrZXl3b3JkXCIsIEkoSyA9PSBcInR5cGVvZlwiID8gTWUgOiBuZSk7XG4gICAgICAgIGlmICh6ID09IFwidmFyaWFibGVcIiB8fCBLID09IFwidm9pZFwiKVxuICAgICAgICAgIHJldHVybiBQLm1hcmtlZCA9IFwidHlwZVwiLCBJKG10KTtcbiAgICAgICAgaWYgKEsgPT0gXCJ8XCIgfHwgSyA9PSBcIiZcIilcbiAgICAgICAgICByZXR1cm4gSShuZSk7XG4gICAgICAgIGlmICh6ID09IFwic3RyaW5nXCIgfHwgeiA9PSBcIm51bWJlclwiIHx8IHogPT0gXCJhdG9tXCIpXG4gICAgICAgICAgcmV0dXJuIEkobXQpO1xuICAgICAgICBpZiAoeiA9PSBcIltcIilcbiAgICAgICAgICByZXR1cm4gSShsZShcIl1cIiksIGF0KG5lLCBcIl1cIiwgXCIsXCIpLCBpZSwgbXQpO1xuICAgICAgICBpZiAoeiA9PSBcIntcIilcbiAgICAgICAgICByZXR1cm4gSShsZShcIn1cIiksIE9lLCBpZSwgbXQpO1xuICAgICAgICBpZiAoeiA9PSBcIihcIilcbiAgICAgICAgICByZXR1cm4gSShhdChidCwgXCIpXCIpLCBMZSwgbXQpO1xuICAgICAgICBpZiAoeiA9PSBcIjxcIilcbiAgICAgICAgICByZXR1cm4gSShhdChuZSwgXCI+XCIpLCBuZSk7XG4gICAgICAgIGlmICh6ID09IFwicXVhc2lcIilcbiAgICAgICAgICByZXR1cm4gaihRZSwgbXQpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gTGUoeikge1xuICAgICAgICBpZiAoeiA9PSBcIj0+XCIpXG4gICAgICAgICAgcmV0dXJuIEkobmUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gT2Uoeikge1xuICAgICAgICByZXR1cm4gei5tYXRjaCgvW1xcfVxcKVxcXV0vKSA/IEkoKSA6IHogPT0gXCIsXCIgfHwgeiA9PSBcIjtcIiA/IEkoT2UpIDogaihQZSwgT2UpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gUGUoeiwgSykge1xuICAgICAgICBpZiAoeiA9PSBcInZhcmlhYmxlXCIgfHwgUC5zdHlsZSA9PSBcImtleXdvcmRcIilcbiAgICAgICAgICByZXR1cm4gUC5tYXJrZWQgPSBcInByb3BlcnR5XCIsIEkoUGUpO1xuICAgICAgICBpZiAoSyA9PSBcIj9cIiB8fCB6ID09IFwibnVtYmVyXCIgfHwgeiA9PSBcInN0cmluZ1wiKVxuICAgICAgICAgIHJldHVybiBJKFBlKTtcbiAgICAgICAgaWYgKHogPT0gXCI6XCIpXG4gICAgICAgICAgcmV0dXJuIEkobmUpO1xuICAgICAgICBpZiAoeiA9PSBcIltcIilcbiAgICAgICAgICByZXR1cm4gSShwZShcInZhcmlhYmxlXCIpLCB3ZSwgcGUoXCJdXCIpLCBQZSk7XG4gICAgICAgIGlmICh6ID09IFwiKFwiKVxuICAgICAgICAgIHJldHVybiBqKFVuLCBQZSk7XG4gICAgICAgIGlmICghei5tYXRjaCgvWztcXH1cXClcXF0sXS8pKVxuICAgICAgICAgIHJldHVybiBJKCk7XG4gICAgICB9XG4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HBlKFwiOlwiKSwgbmUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gbHQoeiwgSykge1xuICAgICAgICBpZiAoSyA9PSBcIjxcIilcbiAgICAgICAgICByZXR1cm4gSShsZShcIj5cIiksIGF0KG5lLCBcIj5cIiksIGllLCBtdCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB3bigpIHtcbiAgICAgICAgcmV0dXJuIGoobmUsIGNyKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGNyKHosIEspIHtcbiAgICAgICAgaWYgKEsgPT0gXCI9XCIpXG4gICAgICAgICAgcmV0dXJuIEkobmUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gSW4oeiwgSykge1xuICAgICAgICByZXR1cm4gSyA9PSBcImVudW1cIiA/IChQLm1hcmtlZCA9IFwia2V5d29yZFwiLCBJKFpyKSkgOiBqKGVuLCBEZSwgVG4sIGthKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGVuKHosIEspIHtcbiAgICAgICAgaWYgKGIgJiYgWChLKSlcbiAgICAgICAgICByZXR1cm4gUC5tYXJrZWQgPSBcImtleXdvcmRcIiwgSShlbik7XG4gICAgICAgIGlmICh6ID09IFwidmFyaWFibGVcIilcbiAgICAgICAgICByZXR1cm4gVyhLKSwgSSgpO1xuICAgICAgICBpZiAoeiA9PSBcInNwcmVhZFwiKVxuICAgICAgICAgIHJldHVybiBJKGVuKTtcbiAgICAgICAgaWYgKHogPT0gXCJbXCIpXG4gICAgICAgICAgcmV0dXJuIHVuKCRhLCBcIl1cIik7XG4gICAgICAgIGlmICh6ID09IFwie1wiKVxuICAgICAgICAgIHJldHVybiB1bihNaSwgXCJ9XCIpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gTWkoeiwgSykge1xuICAgICAgICByZXR1cm4geiA9PSBcInZhcmlhYmxlXCIgJiYgIVAuc3RyZWFtLm1hdGNoKC9eXFxzKjovLCAhMSkgPyAoVyhLKSwgSShUbikpIDogKHogPT0gXCJ2YXJpYWJsZVwiICYmIChQLm1hcmtlZCA9IFwicHJvcGVydHlcIiksIHogPT0gXCJzcHJlYWRcIiA/IEkoZW4pIDogeiA9PSBcIn1cIiA/IGooKSA6IHogPT0gXCJbXCIgPyBJKEFlLCBwZShcIl1cIiksIHBlKFwiOlwiKSwgTWkpIDogSShwZShcIjpcIiksIGVuLCBUbikpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gJGEoKSB7XG4gICAgICAgIHJldHVybiBqKGVuLCBUbik7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBUbih6LCBLKSB7XG4gICAgICAgIGlmIChLID09IFwiPVwiKVxuICAgICAgICAgIHJldHVybiBJKE1lKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGthKHopIHtcbiAgICAgICAgaWYgKHogPT0gXCIsXCIpXG4gICAgICAgICAgcmV0dXJuIEkoSW4pO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gWHIoeiwgSykge1xuICAgICAgICBpZiAoeiA9PSBcImtleXdvcmQgYlwiICYmIEsgPT0gXCJlbHNlXCIpXG4gICAgICAgICAgcmV0dXJuIEkobGUoXCJmb3JtXCIsIFwiZWxzZVwiKSwgdGUsIGllKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIERvKHosIEspIHtcbiAgICAgICAgaWYgKEsgPT0gXCJhd2FpdFwiKVxuICAgICAgICAgIHJldHVybiBJKERvKTtcbiAgICAgICAgaWYgKHogPT0gXCIoXCIpXG4gICAgICAgICAgcmV0dXJuIEkobGUoXCIpXCIpLCBJaSwgaWUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gSWkoeikge1xuICAgICAgICByZXR1cm4geiA9PSBcInZhclwiID8gSShJbiwgcHIpIDogeiA9PSBcInZhcmlhYmxlXCIgPyBJKHByKSA6IGoocHIpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gcHIoeiwgSykge1xuICAgICAgICByZXR1cm4geiA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cbiAgICAgICAgaWYgKHogPT0gXCJ7XCIpXG4gICAgICAgICAgcmV0dXJuIEkobGUoXCJ9XCIpLCBmbiwgaWUpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gZm4oeiwgSykge1xuICAgICAgICBpZiAoeiA9PSBcImFzeW5jXCIgfHwgeiA9PSBcInZhcmlhYmxlXCIgJiYgKEsgPT0gXCJzdGF0aWNcIiB8fCBLID09IFwiZ2V0XCIgfHwgSyA9PSBcInNldFwiIHx8IGIgJiYgWChLKSkgJiYgUC5zdHJlYW0ubWF0Y2goL15cXHMrW1xcdyRcXHhhMS1cXHVmZmZmXS8sICExKSlcbiAgICAgICAgICByZXR1cm4gUC5tYXJrZWQgPSBcImtleXdvcmRcIiwgSShmbik7XG4gICAgICAgIGlmICh6ID09IFwidmFyaWFibGVcIiB8fCBQLnN0eWxlID09IFwia2V5d29yZFwiKVxuICAgICAgICAgIHJldHVybiBQLm1hcmtlZCA9IFwicHJvcGVydHlcIiwgSShabiwgZm4pO1xuICAgICAgICBpZiAoeiA9PSBcIm51bWJlclwiIHx8IHogPT0gXCJzdHJpbmdcIilcbiAgICAgICAgICByZXR1cm4gSShabiwgZm4pO1xuICAgICAgICBpZiAoeiA9PSBcIltcIilcbiAgICAgICAgICByZXR1cm4gSShBZSwgRGUsIHBlKFwiXVwiKSwgWm4sIGZuKTtcbiAgICAgICAgaWYgKEsgPT0gXCIqXCIpXG4gICAgICAgICAgcmV0dXJuIFAubWFya2VkID0gXCJrZXl3b3JkXCIsIEkoZm4pO1xuICAgICAgICBpZiAoYiAmJiB6ID09IFwiKFwiKVxuICAgICAgICAgIHJldHVybiBqKFVuLCBmbik7XG4gICAgICAgIGlmICh6ID09IFwiO1wiIHx8IHogPT0gXCIsXCIpXG4gICAgICAgICAgcmV0dXJuIEkoZm4pO1xuICAgICAgICBpZiAoeiA9PSBcIn1cIilcbiAgICAgICAgICByZXR1cm4gSSgpO1xuICAgICAgICBpZiAoSyA9PSBcIkBcIilcbiAgICAgICAgICByZXR1cm4gSShBZSwgZm4pO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gWm4oeiwgSykge1xuICAgICAgICBpZiAoSyA9PSBcIiFcIiB8fCBLID09IFwiP1wiKVxuICAgICAgICAgIHJldHVybiBJKFpuKTtcbiAgICAgICAgaWYgKHogPT0gXCI6XCIpXG4gICAgICAgICAgcmV0dXJuIEkobmUsIFRuKTtcbiAgICAgICAgaWYgKEsgPT0gXCI9XCIpXG4gICAgICAgICAgcmV0dXJuIEkoTWUpO1xuICAgICAgICB2YXIgcSA9IFAuc3RhdGUubGV4aWNhbC5wcmV2LCBvZSA9IHEgJiYgcS5pbmZvID09IFwiaW50ZXJmYWNlXCI7XG4gICAgICAgIHJldHVybiBqKG9lID8gVW4gOiBqbik7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB2cih6LCBLKSB7XG4gICAgICAgIHJldHVybiBLID09IFwiKlwiID8gKFAubWFya2VkID0gXCJrZXl3b3JkXCIsIEkoRmUsIHBlKFwiO1wiKSkpIDogSyA9PSBcImRlZmF1bHRcIiA/IChQLm1hcmtlZCA9IFwia2V5d29yZFwiLCBJKEFlLCBwZShcIjtcIikpKSA6IHogPT0gXCJ7XCIgPyBJKGF0KElvLCBcIn1cIiksIEZlLCBwZShcIjtcIikpIDogaih0ZSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBJbyh6LCBLKSB7XG4gICAgICAgIGlmIChLID09IFwiYXNcIilcbiAgICAgICAgICByZXR1cm4gUC5tYXJrZWQgPSBcImtleXdvcmRcIiwgSShwZShcInZhcmlhYmxlXCIpKTtcbiAgICAgICAgaWYgKHogPT0gXCJ2YXJpYWJsZVwiKVxuICAgICAgICAgIHJldHVybiBqKE1lLCBJbyk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBxbih6KSB7XG4gICAgICAgIHJldHVybiB6ID09IFwic3RyaW5nXCIgPyBJKCkgOiB6ID09IFwiKFwiID8gaihBZSkgOiB6ID09IFw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iAgICAgICAgICBpZiAoei5zb2woKSAmJiAoSy5sZXhpY2FsLmhhc093blByb3BlcnR5KFwiYWxpZ25cIikgfHwgKEsubGV4aWNhbC5hbGlnbiA9ICExKSwgSy5pbmRlbnRlZCA9IHouaW5kZW50YXRpb24oKSwgJCh6LCBLKSksIEsudG9rZW5pemUgIT0gTSAmJiB6LmVhdFNwYWNlKCkpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICB2YXIgcSA9IEsudG9rZW5pemUoeiwgSyk7XG4gICAgICAgICAgcmV0dXJuIFIgPT0gXCJjb21tZW50XCIgPyBxIDogKEsubGFzdFR5cGUgPSBSID09IFwib3BlcmF0b3JcIiAmJiAodyA9PSBcIisrXCIgfHwgdyA9PSBcIi0tXCIpID8gXCJpbmNkZWNcIiA6IFIsIE4oSywgcSwgUiwgdywgeikpO1xuICAgICAgICB9LFxuICAgICAgICBpbmRlbnQ6IGZ1bmN0aW9uKHosIEspIHtcbiAgICAgICAgICBpZiAoei50b2tlbml6ZSA9PSBNIHx8IHoudG9rZW5pemUgPT0geSlcbiAgICAgICAgICAgIHJldHVybiBvLlBhc3M7XG4gICAgICAgICAgaWYgKHoudG9rZW5pemUgIT0gRSlcbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgIHZhciBxID0gSyAmJiBLLmNoYXJBdCgwKSwgb2UgPSB6LmxleGljYWwsIHplO1xuICAgICAgICAgIGlmICghL15cXHMqZWxzZVxcYi8udGVzdChLKSlcbiAgICAgICAgICAgIGZvciAodmFyIHR0ID0gei5jYy5sZW5ndGggLSAxOyB0dCA+PSAwOyAtLXR0KSB7XG4gICAgICAgICAgICAgIHZhciBydCA9IHouY2NbdHRdO1xuICAgICAgICAgICAgICBpZiAocnQgPT0gaWUpXG4gICAgICAgICAgICAgICAgb2UgPSBvZS5wcmV2O1xuICAgICAgICAgICAgICBlbHNlIGlmIChydCAhPSBYciAmJiBydCAhPSBtZSlcbiAgICAgICAgICAgICAgICBicm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luZGV4T2YoQSkgIT0gLTE7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGQodywgQSwgRSwgQykge1xuICAgICAgdmFyIE0gPSB3LmdldEN1cnNvcigpLCB5ID0gRSh3LCBNKTtcbiAgICAgIGlmICghL1xcYig/OnN0cmluZ3xjb21tZW50KVxcYi8udGVzdCh5LnR5cGUpKSB7XG4gICAgICAgIHZhciBCID0gby5pbm5lck1vZGUody5nZXRNb2RlKCksIHkuc3RhdGUpO1xuICAgICAgICBpZiAoQi5tb2RlLmhlbHBlclR5cGUgIT09IFwianNvblwiKSB7XG4gICAgICAgICAgeS5zdGF0ZSA9IEIuc3RhdGUsIC9eW1xcdyRfXSokLy50ZXN0KHkuc3RyaW5nKSA/IHkuZW5kID4gTS5jaCAmJiAoeS5lbmQgPSBNLmNoLCB5LnN0cmluZyA9IHkuc3RyaW5nLnNsaWNlKDAsIE0uY2ggLSB5LnN0YXJ0KSkgOiB5ID0ge1xuICAgICAgICAgICAgc3RhcnQ6IE0uY2gsXG4gICAgICAgICAgICBlbmQ6IE0uY2gsXG4gICAgICAgICAgICBzdHJpbmc6IFwiXCIsXG4gICAgICAgICAgICBzdGF0ZTogeS5zdGF0ZSxcbiAgICAgICAgICAgIHR5cGU6IHkuc3RyaW5nID09IFwiLlwiID8gXCJwcm9wZXJ0eVwiIDogbnVsbFxuICAgICAgICAgIH07XG4gICAgICAgICAgZm9yICh2YXIgJCA9IHk7ICQudHlwZSA9PSBcInByb3BlcnR5XCI7ICkge1xuICAgICAgICAgICAgaWYgKCQgPSBFKHcsIGkoTS5saW5lLCAkLnN0YXJ0KSksICQuc3RyaW5nICE9IFwiLlwiKVxuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBpZiAoJCA9IEUodywgaShNLmxpbmUsICQuc3RhcnQpKSwgIUYpXG4gICAgICAgICAgICAgIHZhciBGID0gW107XG4gICAgICAgICAgICBGLnB1c2goJCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybi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JpbmdcIiA/IChmZSgpLCB4ZShcInNwYW5cIiwgcGcsIEllKGIubmFtZSksIDEpKSA6IChmZSgpLCBLZShwLCB7XG4gICAgICAgICAgICAgIGtleTogMSxcbiAgICAgICAgICAgICAgcGxhY2VtZW50OiBcInRvcC1zdGFydFwiLFxuICAgICAgICAgICAgICB3aWR0aDogNDAwLFxuICAgICAgICAgICAgICB0cmlnZ2VyOiBcImNsaWNrXCIsXG4gICAgICAgICAgICAgIHRpdGxlOiBiLm5hbWUsXG4gICAgICAgICAgICAgIGNvbnRlbnQ6IGIuaW5mbyB8fCBcIlwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgIHJlZmVyZW5jZTogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgIGhlKFwic3BhblwiLCBoZywgW1xuICAgICAgICAgICAgICAgICAgJGUoSWUoYi5uYW1lKSwgMSksXG4gICAgICAgICAgICAgICAgICB2Z1xuICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgYi5jb2x1bW5zID8gKGZlKCksIEtlKGMsIHtcbiAgICAgICAgICAgICAgICAgIGtleTogMCxcbiAgICAgICAgICAgICAgICAgIGRhdGE6IGIuY29sdW1ucyxcbiAgICAgICAgICAgICAgICAgIGJvcmRlcjogXCJcIlxuICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjEyMFwiLFxuICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiBcImxhYmVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IHIudChcImV2ZW50LmxhYmVsXCIpXG4gICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcImxhYmVsXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiBcImluZm9cIixcbiAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogci50KFwiZXZlbnQuaW5mb1wiKVxuICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJsYWJlbFwiXSksXG4gICAgICAgICAgICAgICAgICAgIHVlKGQsIHtcbiAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCI4MFwiLFxuICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiBcInR5cGVcIixcbiAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogci50KFwiZXZlbnQudHlwZVwiKVxuICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJsYWJlbFwiXSlcbiAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgXzogMlxuICAgICAgICAgICAgICAgIH0sIDEwMzIsIFtcImRhdGFcIl0pKSA6IGplKFwiXCIsICEwKVxuICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgXzogMlxuICAgICAgICAgICAgfSwgMTAzMiwgW1widGl0bGVcIiwgXCJjb250ZW50XCJdKSlcbiAgICAgICAgICBdLCA2NCkpKSwgMjU2KSksXG4gICAgICAgICAgJGUoXCIpIHtcIilcbiAgICAgICAgXSlcbiAgICAgIF0pXG4gICAgXSksXG4gICAgaGUoXCJkaXZcIiwgbWcsIG51bGwsIDUxMiksXG4gICAgZ2csXG4gICAgci52aXNpYmxlICYmIHIuYnV0dG9uID8gKGZlKCksIEtlKHYsIHtcbiAgICAgIGtleTogMCxcbiAgICAgIHR5cGU6IFwicHJpbWFyeVwiLFxuICAgICAgc2l6ZTogXCJzbWFsbFwiLFxuICAgICAgb25DbGljazogci5zYXZlXG4gICAgfSwge1xuICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAkZShJZShyLnQoXCJwcm9wcy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nJlcGxhY2UoU2ksIFwiXCIpKSA6IGZ0LkZ1bmN0aW9uKHQpICYmIHBhKHQuX19qc29uKSA/IGkucHVzaCh0Ll9fanNvbi5yZXBsYWNlKFNpLCBcIlwiKSkgOiB0ICYmIHQuaW5kZXhPZihcIiRHTE9CQUw6XCIpID09PSAwICYmIGkucHVzaCh0KTtcbiAgICAgICAgICB9KSwgZltvXSA9IGk7XG4gICAgICAgIH0gZWxzZVxuICAgICAgICAgIHBhKHJbb10pID8gZltvXSA9IFtyW29dLnJlcGxhY2UoU2ksIFwiXCIpXSA6IGZ0LkZ1bmN0aW9uKHJbb10pICYmIHBhKHJbb10uX19qc29uKSA/IGZbb10gPSBbcltvXS5fX2pzb24ucmVwbGFjZShTaSwgXCJcIildIDogcltvXSAmJiByW29dLmluZGV4T2YoXCIkR0xPQkFMOlwiKSA9PT0gMCAmJiAoZltvXSA9IFtyW29dXSk7XG4gICAgICB9KSwgZjtcbiAgICB9LFxuICAgIHBhcnNlRk4ocikge1xuICAgICAgY29uc3QgZiA9IHt9O1xuICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKHIpLmZvckVhY2goKG8pID0+IHtcbiAgICAgICAgY29uc3QgaSA9IFtdO1xuICAgICAgICByW29dLmZvckVhY2goKHQsIHMpID0+IHtcbiAgICAgICAgICBpW3NdID0gdC5pbmRleE9mKFwiJEdMT0JBTDpcIikgIT09IDAgPyBTaSArIHQgOiB0O1xuICAgICAgICB9KSwgaS5sZW5ndGggPiAwICYmIChmW29dID0gaS5sZW5ndGggPT09IDEgPyBpWzBdIDogaSk7XG4gICAgICB9KSwgZjtcbiAgICB9LFxuICAgIGFkZChyKSB7XG4gICAgICBsZXQgZiA9IHt9O1xuICAgICAgaWYgKEFycmF5LmlzQXJyYXkodGhpcy5ldmVudFtyXSkpXG4gICAgICAgIHRoaXMuZXZlbnRbcl0ucHVzaChcIlwiKSwgZiA9IHtcbiAgICAgICAgICBuYW1lOiByLFxuICAgICAgICAgIGl0ZW06IHRo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OiByLmV2ZW50TnVtLFxuICAgICAgdHlwZTogXCJ3YXJuaW5nXCIsXG4gICAgICBoaWRkZW46IHIuZXZlbnROdW0gPCAxXG4gICAgfSwge1xuICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgc2l6ZTogXCJzbWFsbFwiLFxuICAgICAgICAgIG9uQ2xpY2s6IGZbMF0gfHwgKGZbMF0gPSAoQykgPT4gci52aXNpYmxlID0gITApXG4gICAgICAgIH0sIHtcbiAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAkZShJZShyLnQoXCJldmVudC50aXRsZVwiKSksIDEpXG4gICAgICAgICAgXSksXG4gICAgICAgICAgXzogMVxuICAgICAgICB9KVxuICAgICAgXSksXG4gICAgICBfOiAxXG4gICAgfSwgOCwgW1widmFsdWVcIiwgXCJoaWRkZW5cIl0pLFxuICAgIHVlKEUsIHtcbiAgICAgIGNsYXNzOiBcIl9mZC1ldmVudC1kaWFsb2dcIixcbiAgICAgIHRpdGxlOiByLnQoXCJldmVudC50aXRsZVwiKSxcbiAgICAgIG1vZGVsVmFsdWU6IHIudmlzaWJsZSxcbiAgICAgIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiOiBmWzhdIHx8IChmWzhdID0gKEMpID0+IHIudmlzaWJsZSA9IEMpLFxuICAgICAgXCJkZXN0cm95LW9uLWNsb3NlXCI6IFwiXCIsXG4gICAgICBcImNsb3NlLW9uLWNsaWNrLW1vZGFsXCI6ICExLFxuICAgICAgXCJhcHBlbmQtdG8tYm9keVwiOiBcIlwiLFxuICAgICAgd2lkdGg6IFwiOTgwcHhcIlxuICAgIH0sIHtcbiAgICAgIGZvb3RlcjogcmUoKCkgPT4gW1xuICAgICAgICBoZShcImRpdlwiLCBudWxsLCBbXG4gICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgc2l6ZTogXCJkZWZhdWx0XCIsXG4gICAgICAgICAgICBvbkNsaWNrOiBmWzddIHx8IChmWzddID0gKEMpID0+IHIudmlzaWJsZSA9ICExKVxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMuY2FuY2VsXCIpKSwgMSlcbiAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgXzogMVxuICAgICAgICAgIH0pLFxuICAgICAgICAgIHVlKGQsIHtcbiAgICAgICAgICAgIHR5cGU6IFwicHJpbWFyeVwiLFxuICAgICAgICAgICAgc2l6ZTogXCJkZWZhdWx0XCIsXG4gICAgICAgICAgICBvbkNsaWNrOiByLnN1Ym1pdCxcbiAgICAgICAgICAgIGNvbG9yOiBcIiMyZjczZmZcIlxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMub2tcIikpLCAxKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfOiAxXG4gICAgICAgICAgfSwgOCwgW1wib25DbGlja1wiXSlcbiAgICAgICAgXSlcbiAgICAgIF0pLFxuICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICB1ZShSLCB7XG4gICAgICAgICAgY2xhc3M6IFwiX2ZkLWV2ZW50LWNvblwiLFxuICAgICAgICAgIHN0eWxlOiB7IGhlaWdodDogXCI2MDBweFwiIH1cbiAgICAgICAgfSwge1xuICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgIHVlKHcsIHsgc3R5bGU6IHsgd2lkdGg6IFwiMzAwcHhcIiB9IH0sIHtcbiAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgIHVlKFIsIHsgY2xhc3M6IFwiX2ZkLWV2ZW50LWxcIiB9LCB7XG4gICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgIHVlKFMsIHtcbiAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtZXZlbnQtaGVhZFwiLFxuICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogXCI0MHB4XCJcbiAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVlKGIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXCJwb3BwZXItY2xhc3NcIjogXCJfZmQtZXZlbnQtZHJvcGRvd25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdHJpZ2dlcjogXCJjbGlja1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcImRlZmF1bHRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2VtZW50OiBcImJvdHRvbS1zdGFydFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRyb3Bkb3duOiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdWUodiwgbnVsbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZmUoITApLCB4ZShodCwgbnVsbCwgaG4oci5ldmVudE5hbWUsIChDKSA9PiAoZmUoKSwgS2UocCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogQyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAoTSkgPT4gci5hZGQoQylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIFNnLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwic3BhblwiLCBudWxsLCBJZShDKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJvbkNsaWNrXCJdKSkpLCAxMjgpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWUocCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpdmlkZWQ6IHIuZXZlbnROYW1lLmxlbmd0aCA+IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogci5jdXNFdmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwgbnVsbCwgSWUoci50KFwicHJvcHMuY3VzdG9tXCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDgsIFtcImRpdmlkZWRcIiwgXCJvbkNsaWNrXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcInNwYW5cIiwgQ2csIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVlKGQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluazogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJwcmltYXJ5XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IFwiZGVmYXVsdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJldmVudC5jcmVhdGVcIikpLCAxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICB1ZSh4LCBudWxsLCB7XG4gICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgdWUobSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBcImRlZmF1bHQtYWN0aXZlXCI6IHIuZGVmQWN0aXZlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbFZhbHVlOiByLmFjdGl2ZURhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiOiBmWzVdIHx8IChmWzVdID0gKEMpID0+IHIuYWN0aXZlRGF0YSA9IEMpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZmUoITApLCB4ZShodCwgbnVsbCwgaG4oci5ldmVudCwgKEMsIE0pID0+IChmZSgpLCB4ZShodCwgbnVsbCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShDKSA/IChmZSghMCksIHhlKGh0LCB7IGtleTogMCB9LCBobihDLCAoeSwgQikgPT4gKGZlKCksIEtlKEQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBNICsgQixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IE0gKyBCXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImRpdlwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtZXZlbnQtdGl0bGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IEhuKCgkKSA9PiByLmVkaXQoeyBuYW1lOiBNLCBpdGVtOiBDLCBpbmRleDogQiB9KSwgW1wic3RvcFwiXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImRpdlwiLCB3ZywgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcInNwYW5cIiwgbnVsbCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKFwiZnVuY3Rpb25cIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJzcGFuXCIsIG51bGwsIEllKE0pLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJmYy1pY29uIGljb24tZGVsZXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IEhuKCgkKSA9PiByLnJtKHsgbmFtZTogTSwgaXRlbTogQywgaW5kZXg6IEIgfSksIFtcInN0b3BcIl0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBUZylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA4LCB4ZylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDEwMzIsIFtcImluZGV4XCJdKSkpLCAxMjgpKSA6IChmZSgpLCBLZShELCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IE0gKyAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImRpdlwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtZXZlbnQtdGl0bGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IEhuKCh5KSA9PiByLmVkaXQoeyBuYW1lOiBNIH0pLCBbXCJzdG9wXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIFJnLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwic3BhblwiLCBudWxsLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoXCJmdW5jdGlvblwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcInNwYW5cIiwgbnVsbCwgSWUoTSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiaVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcImZjLWljb24gaWNvbi1kZWxldGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogSG4oKHkpID0+IHIucm0oeyBuYW1lOiBNIH0pLCBbXCJzdG9wXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbnVsbCwgOCwgTWcpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgOCwgRGcpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJpbmRleFwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgNjQpKSksIDI1NikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIuY3VzID8gKGZlKCksIEtlKEQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlOiB7IFwicGFkZGluZy1sZWZ0XCI6IFwiMTBweFwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogXCJjdXN0b21cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mZC1ldmVudC10aXRsZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IGZbNF0gfHwgKGZbNF0gPSBIbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1wic3RvcFwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShULCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsVmFsdWU6IHIuY3VzVmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogZlsxXSB8fCAoZlsxXSA9IChDKSA9PiByLmN1c1ZhbHVlID0gQyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcImRlZmF1bHRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5ZG93bjogeWgoci5hZGRDdXMsIFtcImVudGVyXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiByLnQoXCJldmVudC5wbGFjZWhvbGRlclwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcIm1vZGVsVmFsdWVcIiwgXCJvbktleWRvd25cIiwgXCJwbGFjZWhvbGRlclwiXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwgbnVsbCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJpXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiZmMtaWNvbiBpY29uLWFkZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBmWzJdIHx8IChmWzJdID0gSG4oKC4uLkMpID0+IHIuYWRkQ3VzICYmIHIuYWRkQ3VzKC4uLkMpLCBbXCJzdG9wXCJdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJpXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiZmMtaWNvbiBpY29uLWRlbGV0ZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBmWzNdIHx8IChmWzNdID0gSG4oKC4uLkMpID0+IHIuY2xvc2VDdXMgJiYgci5jbG9zZUN1cyguLi5DKSwgW1wic3RvcFwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSkgOiBqZShcIlwiLCAhMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIDgsIFtcImRlZmF1bHQtYWN0aXZlXCIsIFwibW9kZWxWYWx1ZVwiXSlcbiAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB1ZSh4LCBudWxsLCB7XG4gICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICB1ZShSLCB7IGNsYXNzOiBcIl9mZC1ldmVudC1yXCIgfSwge1xuICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICByLmFjdGl2ZURhdGEgPyAoZmUoKSwgS2UoUywge1xuICAgICAgICAgICAgICAgICAgICAgIGtleTogMCxcbiAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtZXZlbnQtaGVhZFwiLFxuICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogXCI0MHB4XCJcbiAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIG51bGwsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJhXCIsIElnLCBJZShyLnQoXCJmb3JtLmRvY3VtZW50XCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwgbnVsbCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZTogXCJzbWFsbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IHIuY2xvc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInByb3BzLmNhbmNlbFwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCA4LCBbXCJvbkNsaWNrXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IFwic21hbGxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcInByaW1hcnlcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiByLnNhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IFwiIzJmNzNmZlwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJwcm9wcy5zYXZlXCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDgsIFtcIm9uQ2xpY2tcIl0pXG4gICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICByLmFjdGl2ZURhdGEgPyAoZmUoKSwgS2UoeCwgeyBrZXk6IDEgfSwge1xuICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVlKEEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmOiBcImZuXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsVmFsdWU6IHIuZXZlbnRTdHIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiOiBmWzZdIHx8IChmWzZdID0gKEMpID0+IHIuZXZlbnRTdHIgPSBDKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogci5hY3RpdmVEYXRhLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3M6IHIuZm5BcmdzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZTogeyBoZWlnaHQ6IFwiNTE5cHhcIiB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJtb2RlbFZhbHVlXCIsIFwibmFtZVwiLCBcImFyZ3NcIl0pXG4gICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICB9KSkgOiBqZShcIlwiLCAhMClcbiAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIF0pLFxuICAgICAgICAgIF86IDFcbiAgICAgICAgfSlcbiAgICAgIF0pLFxuICAgICAgXzogMVxuICAgIH0sIDgsIFtcInRpdGxlXCIsIFwibW9kZWxWYWx1ZVwiXSlcbiAgXSk7XG59XG5jb25zdCBhYyA9IC8qIEBfX1BVUkVfXyAqLyBNdChBZywgW1tcInJlbmRlclwiLCBOZ11dKTtcbmZ1bmN0aW9uIE9nKHIsIGYpIHtcbiAgdmFyIG8gPSBudWxsO1xuICByZXR1cm4gZnVuY3Rpb24oLi4uaSkge1xuICAgIG8gIT09IG51bGwgJiYgY2xlYXJUaW1lb3V0KG8pLCBvID0gc2V0VGltZW91dCgoKSA9PiByLmNhbGwodGhpcywgLi4uaSksIGYpO1xuICB9O1xufVxuLyohXG4gIEhpZ2hsaWdodC5qcyB2MTEuOS4wIChnaXQ6IGI3ZWM0YmZhZmMpXG4gIChjKSAyMDA2LTIwMjQgdW5kZWZpbmVkIGFuZCBvdGhlciBjb250cmlidXRvcnNcbiAgTGljZW5zZTogQlNELTMtQ2xhdXNlXG4gKi9cbmZ1bmN0aW9uIGxjKHIpIHtcbiAgcmV0dXJuIHIgaW5zdGFuY2VvZiBNYXAgPyByLmNsZWFyID0gci5kZWxldGUgPSByLnNldCA9ICgpID0+IHtcbiAgICB0aHJvdyBFcnJvcihcIm1hcCBpcyByZWFkLW9ubHlcIik7XG4gIH0gOiByIGluc3RhbmNlb2YgU2V0ICYmIChyLmFk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bnNpZGVyQWxsKCksIFoubWF0Y2hlci5sYXN0SW5kZXggPSBsZTtcbiAgICAgICAgICBjb25zdCB0ZSA9IFoubWF0Y2hlci5leGVjKEMpO1xuICAgICAgICAgIGlmICghdGUpXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjb25zdCBnZSA9IFcoQy5zdWJzdHJpbmcobGUsIHRlLmluZGV4KSwgdGUpO1xuICAgICAgICAgIGxlID0gdGUuaW5kZXggKyBnZTtcbiAgICAgICAgfVxuICAgICAgICBXKEMuc3Vic3RyaW5nKGxlKSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gdmUuZmluYWxpemUoKSwgSiA9IHZlLnRvSFRNTCgpLCB7XG4gICAgICAgIGxhbmd1YWdlOiBFLFxuICAgICAgICB2YWx1ZTogSixcbiAgICAgICAgcmVsZXZhbmNlOiBtZSxcbiAgICAgICAgaWxsZWdhbDogITEsXG4gICAgICAgIF9lbWl0dGVyOiB2ZSxcbiAgICAgICAgX3RvcDogWlxuICAgICAgfTtcbiAgICB9IGNhdGNoICh0ZSkge1xuICAgICAgaWYgKHRlLm1lc3NhZ2UgJiYgdGUubWVzc2FnZS5pbmNsdWRlcyhcIklsbGVnYWxcIikpXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgbGFuZ3VhZ2U6IEUsXG4gICAgICAgICAgdmFsdWU6IFNzKEMpLFxuICAgICAgICAgIGlsbGVnYWw6ICEwLFxuICAgICAgICAgIHJlbGV2YW5jZTogMCxcbiAgICAgICAgICBfaWxsZWdhbEJ5OiB7XG4gICAgICAgICAgICBtZXNzYWdlOiB0ZS5tZXNzYWdlLFxuICAgICAgICAgICAgaW5kZXg6IGxlLFxuICAgICAgICAgICAgY29udGV4dDogQy5zbGljZShsZSAtIDEwMCwgbGUgKyAxMDApLFxuICAgICAgICAgICAgbW9kZTogdGUubW9kZSxcbiAgICAgICAgICAgIHJlc3VsdFNvRmFyOiBKXG4gICAgICAgICAgfSxcbiAgICAgICAgICBfZW1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cbiAgICAgIGJlZ2luOiBcImdxbGBcIixcbiAgICAgIGVuZDogXCJcIixcbiAgICAgIHN0YXJ0czoge1xuICAgICAgICBlbmQ6IFwiYFwiLFxuICAgICAgICByZXR1cm5FbmQ6ICExLFxuICAgICAgICBjb250YWluczogW3AuQkFDS1NMQVNIX0VTQ0FQRSwgd10sXG4gICAgICAgIHN1Ykxhbmd1YWdlOiBcImdyYXBocWxcIlxuICAgICAgfVxuICAgIH0sIE0gPSB7XG4gICAgICBjbGFzc05hbWU6IFwic3RyaW5nXCIsXG4gICAgICBiZWdpbjogXCJgXCIsXG4gICAgICBlbmQ6IFwiYFwiLFxuICAgICAgY29udGFpbnM6IFtwLkJBQ0tTTEFTSF9FU0NBUEUsIHddXG4gICAgfSwgeSA9IHtcbiAgICAgIGNsYXNzTmFtZTogXCJjb21tZW50XCIsXG4gICAgICB2YXJpYW50czogW3AuQ09NTUVOVCgvXFwvXFwqXFwqKD8hXFwvKS8sIFwiXFxcXCovXCIsIHtcbiAgICAgICAgcmVsZXZhbmNlOiAwLFxuICAgICAgICBjb250YWluczogW3tcbiAgICAgICAgICBiZWdpbjogXCIoPz1AW0EtWmEtel0rKVwiLFxuICAgICAgICAgIHJlbGV2YW5jZTogMCxcbiAgICAgICAgICBjb250YWluczogW3tcbiAgICAgICAgICAgIGNsYXNzTmFtZTogXCJkb2N0YWdcIixcbiAgICAgICAgICAgIGJlZ2luOiBcIkBbQS1aYS16XStcIlxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIGNsYXNzTmFtZTogXCJ0eXBlXCIsXG4gICAgICAgICAgICBiZWdpbjogXCJcXFxce1wiLFxuICAgICAgICAgICAgZW5kOiBcIlxcXFx9XCIsXG4gICAgICAgICAgICBleGNsdWRlRW5kOiAhMCxcbiAgICAgICAgICAgIGV4Y2x1ZGVCZWdpbjogITAsXG4gICAgICAgICAgICByZWxldmFuY2U6IDBcbiAgICAgICAgICB9LCB7XG4gICAgICAgICAgICBjbGFzc05hbWU6I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TX1JFICsgXCJ8XFxcXGIoY2FzZXxyZXR1cm58dGhyb3cpXFxcXGIpXFxcXHMqXCIsXG4gICAgICAgIGtleXdvcmRzOiBcInJldHVybiB0aHJvdyBjYXNlXCIsXG4gICAgICAgIHJlbGV2YW5jZTogMCxcbiAgICAgICAgY29udGFpbnM6IFt5LCBwLlJFR0VYUF9NT0RFLCB7XG4gICAgICAgICAgY2xhc3NOYW1lOiBcImZ1bmN0aW9uXCIsXG4gICAgICAgICAgYmVnaW46IFEsXG4gICAgICAgICAgcmV0dXJuQmVnaW46ICEwLFxuICAgICAgICAgIGVuZDogXCJcXFxccyo9PlwiLFxuICAgICAgICAgIGNvbnRhaW5zOiBbe1xuICAgICAgICAgICAgY2xhc3NOYW1lOiBcInBhcmFtc1wiLFxuICAgICAgICAgICAgdmFyaWFudHM6IFt7IGJlZ2luOiBwLlVOREVSU0NPUkVfSURFTlRfUkUsIHJlbGV2YW5jZTogMCB9LCB7XG4gICAgICAgICAgICAgIGNsYXNzTmFtZTogbnVsbCxcbiAgICAgICAgICAgICAgYmVnaW46IC9cXChcXHMqXFwpLyxcbiAgICAgICAgICAgICAgc2tpcDogITBcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgYmVnaW46IC9cXCgvLFxuICAgICAgICAgICAgICBlbmQ6IC9cXCkvLFxuICAgICAgICAgICAgICBleGNsdWRlQmVnaW46ICEwLFxuICAgICAgICAgICAgICBleGNsdWRlRW5kOiAhMCxcbiAgICAgICAgICAgICAga2V5d29yZHM6IEQsXG4gICAgICAgICAgICAgIGNvbnRhaW5zOiBGXG4gICAgICAgICAgICB9XVxuICAgICAgICAgIH1dXG4gICAgICAgIH0sIHsgYmVnaW46IC8sLywgcmVsZXZhbmNlOiAwIH0sIHtcbiAgICAgICAgICBtYXRjaDogL1xccysvLFxuICAgICAgICAgIHJlbGV2YW5jZTogMFxuICAgICAgICB9LCB7IHZhcmlhbnRzOiBbeyBiZWdpbjogXCI8PlwiLCBlbmQ6IFwiPC8+XCIgfSwge1xuICAgICAgICAgIG1hdGNoOiAvPFtBLVphLXowLTlcXFxcLl86LV0rXFxzKlxcLz4vXG4gICAgICAgIH0sIHtcbiAgICAgICAgICBiZWdpbjogUy5iZWdpbixcbiAgICAgICAgICBcIm9uOmJlZ2luXCI6IFMuaXNUcnVseU9wZW5pbmdUYWcsXG4gICAgICAgICAgZW5kOiBTLmVuZFxuICAgICAgICB9XSwgc3ViTGFuZ3VhZ2U6IFwieG1sXCIsIGNvbnRhaW5zOiBbe1xuICAgICAgICAgIGJlZ2luOiBTLmJlZ2luLFxuICAgICAgICAgIGVuZDogUy5lbmQsXG4gICAgICAgICAgc2tpcDogITAsXG4gICAgICAgICAgY29udGFpbnM6IFtcInNlbGZcIl1cbiAgICAgICAgfV0gfV1cbiAgICAgIH0sIFAsIHtcbiAgICAgICAgYmVnaW5LZXl3b3JkczogXCJ3aGlsZSBpZiBzd2l0Y2ggY2F0Y2ggZm9yXCJcbiAgICAgIH0sIHtcbiAgICAgICAgYmVnaW46IFwiXFxcXGIoPyFmdW5jdGlvbilcIiArIHAuVU5ERVJTQ09SRV9JREVOVF9SRSArIFwiXFxcXChbXigpXSooXFxcXChbXigpXSooXFxcXChbXigpXSpcXFxcKVteKCldKikqXFxcXClbXigpXSopKlxcXFwpXFxcXHMqXFxcXHtcIixcbiAgICAgICAgcmV0dXJuQmVnaW46ICEwLFxuICAgICAgICBsYWJlbDogXCJmdW5jLmRlZlwiLFxuICAgICAgICBjb250YWluczogW2ssIHAuaW5oZXJpdChwLlRJVExFX01PREUsIHtcbiAgICAgICAgICBiZWdpbjogYixcbiAgICAgICAgICBjbGFzc05hbWU6IFwidGl0bGUuZnVuY3Rpb25cIlxuICAgICAgICB9KV1cbiAgICAgIH0sIHsgbWF0Y2g6IC9cXC5cXC5cXC4vLCByZWxldmFuY2U6IDAgfSwgViwge1xuICAgICAgICBtYXRjaDogXCJcXFxcJFwiICsgYixcbiAgICAgICAgcmVsZXZhbmNlOiAwX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VsZTogW10sXG4gICAgICAgIG9wdGlvbjoge30sXG4gICAgICAgIGFwaToge31cbiAgICAgIH0sXG4gICAgICBpbnB1dEZvcm06IHtcbiAgICAgICAgc3RhdGU6ICExLFxuICAgICAgICBydWxlOiBbXSxcbiAgICAgICAgb3B0aW9uOiB7fSxcbiAgICAgICAgYXBpOiB7fSxcbiAgICAgICAgZGF0YToge30sXG4gICAgICAgIGtleTogXCJcIlxuICAgICAgfSxcbiAgICAgIGRyYWdGb3JtOiBwbyh7XG4gICAgICAgIHJ1bGU6IFtdLFxuICAgICAgICBhcGk6IHt9XG4gICAgICB9KSxcbiAgICAgIGZvcm1PcHRpb25zOiB7fSxcbiAgICAgIG9sZE9wdGlvbnNLZXlzOiBbXSxcbiAgICAgIGZvcm06IHtcbiAgICAgICAgcnVsZTogTShaZiwgRC52YWx1ZSwgeyB0OiBDIH0pLFxuICAgICAgICBhcGk6IHt9LFxuICAgICAgICBvcHRpb246IHtcbiAgICAgICAgICBmb3JtOiB7XG4gICAgICAgICAgICBsYWJlbFBvc2l0aW9uOiBcInRvcFwiLFxuICAgICAgICAgICAgc2l6ZTogXCJzbWFsbFwiXG4gICAgICAgICAgfSxcbiAgICAgICAgICBzdWJtaXRCdG46ICExXG4gICAgICAgIH0sXG4gICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgZm9ybToge30sXG4gICAgICAgICAgc3VibWl0QnRuOiAhMVxuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgYmFzZUZvcm06IHtcbiAgICAgICAgaXNTaG93OiAhMSxcbiAgICAgICAgcnVsZTogTShsbywgdi52YWx1ZSwgeyB0OiBDIH0pLFxuICAgICAgICBhcGk6IHt9LFxuICAgICAgICB2YWx1ZToge30sXG4gICAgICAgIG9wdGlvbnM6IHtcbiAgICAgICAgICBnbG9iYWw6IHtcbiAgICAgICAgICAgIGlucHV0OiB7XG4gICAgICAgICAgICAgIG1vZGVsRW1pdDogXCJibHVyXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9LFxuICAgICAgICAgIGZvcm06IHtcbiAgICAgICAgICAgIGxhYmVsUG9zaXRpb246IFwidG9wXCIsXG4gICAgICAgICAgICBzaXplOiBcInNtYWxsXCJcbiAgICAgICAgICB9LFxuICAgICAgICAgIHN1Ym1pdEJ0bjogITEsXG4gICAgICAgICAgbW91bnRlZDogKGgpID0+IHtcbiAgICAgICAgICAgIGguYWN0aXZlUnVsZSA9IHkuYWN0aXZlUnVsZSwgaC5zZXRWYWx1ZShoLm9wdGlvbnMuZm9ybURhdGEgfHwge30pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIHZhbGlkYXRlRm9ybToge1xuICAgICAgICBpc1Nob3c6ICExLFxuICAgICAgICBydWxlOiBNKHFmLCBTLnZhbHVlLCB7IHQ6IEMgfSksXG4gICAgICAgIGFwaToge30sXG4gICAgICAgIHZhbHVlOiBbXSxcbiAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgIGdsb2JhbDoge1xuICAgICAgICAgICAgaW5wdXQ6IHtcbiAgICAgICAgICAgICAgbW9kZWxFbWl0OiBcImJsdXJcIlxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sXG4gICAgICAgICAgZm9ybToge1xuICAgICAgICAgICAgbGFiZWxQb3NpdGlvbjogXCJ0b3BcIixcbiAgICAgICAgICAgIHNpemU6IFwic21hbGxcIlxuICAgICAgICAgIH0sXG4gICAgICAgICAgc3VibWl0QnRuOiAhMSxcbiAgICAgICAgICBtb3VudGVkOiAoaCkgPT4ge1xuICAgICAgICAgICAgaC5hY3RpdmVSdWxlID0geS5hY3RpdmVSdWxlLCBoLnNldFZhbHVlKGgub3B0aW9ucy5mb3JtRGF0YSB8fCB7fSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgcHJvcHNGb3JtOiB7XG4gICAgICAgIGlzU2hvdzogITEsXG4gICAgICAgIHJ1bGU6IFtdLFxuICAgICAgICBhcGk6IHt9LFxuICAgICAgICB2YWx1ZToge30sXG4gICAgICAgIG9wdGlvbnM6IHtcbiAgICAgICAgICBnbG9iYWw6IHtcbiAgICAgICAgICAgIGlucHV0OiB7XG4gICAgICAgICAgICAgIG1vZGVsRW1pdDogXCJibHVyXCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbnB1dE51bWJlcjoge1xuICAgICAgICAgICAgICBwcm9wczoge1xuICAgICAgICAgICAgICAgIGNvbnRyb2xzUG9zaXRpb246IFwicmlnaHRcIlxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSxcbiAgICAgICAgICBmb3JtOiB7XG4gICAgICAgICAgICBsYWJlbFBvc2l0aW9uOiBcInRvcFwiLFxuICAgICAgICAgICAgc2l6ZTogXCJzbWFsbFwiXG4gICAgICAgICAgfSxcbiAgICAgICAgICBzdWJtaXRCdG46ICExLFxuICAgICAgICAgIG1vdW50ZWQ6IChoKSA9PiB7XG4gICAgICAgICAgICBoLmFjdGl2ZVJ1bGUgPSB5LmFjdGl2ZVJ1bGUsIGguc2V0VmFsdWUoaC5vcHRpb25zLmZvcm1EYXRhIHx8IHt9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBjdXN0b21Gb3JtOiB7XG4gICAgICAgIGlzU2hvdzogITEsXG4gICAgICAgIGNvbmZpZzogbnVsbCxcbiAgICAgICAga2V5OiBcIlwiLFxuICAgICAgICBydWxlOiBbXSxcbiAgICAgICAgYXBpOiB7fSxcbiAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgIGdsb2JhbDoge1xuICAgICAgICAgICAgaW5wdXQ6IHtcbiAgICAgICAgICAgICAgbW9kZWxFbWl0OiBcImJsdXJcIlxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sXG4gICAgICAgICAgZm9ybToge1xuICAgICAgICAgICAgbGFiZWxQb3NpdGlvbjogXCJ0b3BcIixcbiAgICAgICAgICAgIHNpemU6IFwic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biAgICAgICAgICBoICYmIEYudXBkYXRlUnVsZUZvcm1EYXRhKCk7XG4gICAgICAgIH0sIHsgZGVlcDogITAsIGZsdXNoOiBcInBvc3RcIiB9KTtcbiAgICAgIH0sXG4gICAgICBtYWtlQ2hpbGRyZW4oaCkge1xuICAgICAgICByZXR1cm4gbWEoeyBjaGlsZHJlbjogaCB9KS5jaGlsZHJlbjtcbiAgICAgIH0sXG4gICAgICBhZGRNZW51KGgpIHtcbiAgICAgICAgaWYgKCFoLm5hbWUgfHwgIWgubGlzdClcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIGxldCBOID0gITA7XG4gICAgICAgIHkubWVudUxpc3QuZm9yRWFjaCgoUCwgaikgPT4ge1xuICAgICAgICAgIFAubmFtZSA9PT0gaC5uYW1lICYmICh5Lm1lbnVMaXN0W2pdID0gaCwgTiA9ICExKTtcbiAgICAgICAgfSksIE4gJiYgeS5tZW51TGlzdC5wdXNoKGgpO1xuICAgICAgfSxcbiAgICAgIHJlbW92ZU1lbnUoaCkge1xuICAgICAgICBbLi4ueS5tZW51TGlzdF0uZm9yRWFjaCgoTiwgUCkgPT4ge1xuICAgICAgICAgIE4ubmFtZSA9PT0gaCAmJiB5Lm1lbnVMaXN0LnNwbGljZShQLCAxKTtcbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgICAgc2V0TWVudUl0ZW0oaCwgTikge1xuICAgICAgICB5Lm1lbnVMaXN0LmZvckVhY2goKFApID0+IHtcbiAgICAgICAgICBQLm5hbWUgPT09IGggJiYgKFAubGlzdCA9IE4pO1xuICAgICAgICB9KTtcbiAgICAgIH0sXG4gICAgICBhcHBlbmRNZW51SXRlbShoLCBOKSB7XG4gICAgICAgIHkubWVudUxpc3QuZm9yRWFjaCgoUCkgPT4ge1xuICAgICAgICAgIFAubmFtZSA9PT0gaCAmJiBQLmxpc3QucHVzaCguLi5BcnJheS5pc0FycmF5KE4pID8gTiA6IFtOXSk7XG4gICAgICAgIH0pO1xuICAgICAgfSxcb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udChoKSB7XG4gICAgICAgIGxldCBOID0gaC5fX2ZjX18ucGFyZW50LnJ1bGU7XG4gICAgICAgIGNvbnN0IFAgPSBOLl9tZW51O1xuICAgICAgICByZXR1cm4gUCAmJiBQLmluc2lkZSAmJiAoaCA9IE4sIE4gPSBOLl9fZmNfXy5wYXJlbnQucnVsZSksIHsgcm9vdDogTiwgcGFyZW50OiBoIH07XG4gICAgICB9LFxuICAgICAgdXBkYXRlTmFtZSgpIHtcbiAgICAgICAgdGhpcy5hY3RpdmVSdWxlLm5hbWUgPSBcInJlZl9cIiArIF9lKCk7XG4gICAgICB9LFxuICAgICAgbWFrZURyYWcoaCwgTiwgUCwgaiwgSSkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHR5cGU6IFwiRHJhZ0JveFwiLFxuICAgICAgICAgIHdyYXA6IHtcbiAgICAgICAgICAgIHNob3c6ICExXG4gICAgICAgICAgfSxcbiAgICAgICAgICBjb2w6IHtcbiAgICAgICAgICAgIHNob3c6ICExXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpbmplY3Q6ICEwLFxuICAgICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgICBydWxlOiB7XG4gICAgICAgICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgICAgICAgdGFnOiBcImVsLWNvbFwiLFxuICAgICAgICAgICAgICAgIGdyb3VwOiBoID09PSAhMCA/IFwiZGVmYXVsdFwiIDogaCxcbiAgICAgICAgICAgICAgICBnaG9zdENsYXNzOiBcImdob3N0XCIsXG4gICAgICAgICAgICAgICAgYW5pbWF0aW9uOiAxNTAsXG4gICAgICAgICAgICAgICAgaGFuZGxlOiBcIi5fZmQtZHJhZy1idG5cIixcbiAgICAgICAgICAgICAgICBlbXB0eUluc2VydFRocmVzaG9sZDogMCxcbiAgICAgICAgICAgICAgICBkaXJlY3Rpb246IFwidmVydGljYWxcIixcbiAgICAgICAgICAgICAgICBpdGVtS2V5OiBcInR5cGVcIlxuICAgICAgICAgICAgICB9XG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ZWQpLCBJLm9uICYmIChJLl9vbiA9IEkub24sIGRlbGV0ZSBJLm9uKSwgVikge1xuICAgICAgICAgICAgY29uc3QgVyA9IEkuc2xvdDtcbiAgICAgICAgICAgIGxldCBRO1xuICAgICAgICAgICAgTiAmJiBOLnNsb3QgJiYgVyAmJiBXICE9PSBcImRlZmF1bHRcIiAmJiAoUSA9IEYuZ2V0U2xvdENvbmZpZyhOLCBXLCBWKSksIGRlbGV0ZSBJLnNsb3QsIEkgPSBGLm1ha2VSdWxlKFEgfHwgViwgSSksIFcgJiYgKEkuc2xvdCA9IFcpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBqLnB1c2goSSk7XG4gICAgICAgIH0pLCBqO1xuICAgICAgfSxcbiAgICAgIHBhcnNlUnVsZShoLCBOKSB7XG4gICAgICAgIHJldHVybiBbLi4uaF0ucmVkdWNlKChQLCBqKSA9PiB7XG4gICAgICAgICAgbGV0IEkgPSBOO1xuICAgICAgICAgIGlmIChmdC5TdHJpbmcoaikpXG4gICAgICAgICAgICByZXR1cm4gUC5wdXNoKGopLCBQO1xuICAgICAgICAgIGlmIChqLnR5cGUgPT09IFwiRHJhZ0JveFwiKVxuICAgICAgICAgICAgcmV0dXJuIFAucHVzaCguLi5GLnBhcnNlUnVsZShqLmNoaWxkcmVuLCBJIHx8IGouc2xvdCkpLCBQO1xuICAgICAgICAgIGlmIChqLnR5cGUgPT09IFwiRHJhZ1Rvb2xcIikge1xuICAgICAgICAgICAgaWYgKEkgPSBqLnNsb3QgfHwgTiwgaiA9IGouY2hpbGRyZW5bMF0sIGZ0LlN0cmluZyhqKSlcbiAgICAgICAgICAgICAgcmV0dXJuIFAucHVzaChqKSwgUDtcbiAgICAgICAgICAgIGlmIChqLnR5cGUgPT09IFwiRHJhZ0JveFwiKVxuICAgICAgICAgICAgICByZXR1cm4gUC5wdXNoKC4uLkYucGFyc2VSdWxlKGouY2hpbGRyZW4sIEkgfHwgai5zbG90KSksIFA7XG4gICAgICAgICAgfVxuICA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gICAgICAgICB1bmNob29zZTogKFEsIFgpID0+IEYuZHJhZ1VuY2hvb3NlKFEuc2VsZi5jaGlsZHJlbiwgWClcbiAgICAgICAgfSldKSwgaC5jaGlsZHJlbiAmJiAhTiAmJiAhVi5sZW5ndGgpXG4gICAgICAgICAgZm9yIChsZXQgUSA9IDA7IFEgPCAoaC5jaGlsZHJlbkxlbiB8fCAxKTsgUSsrKSB7XG4gICAgICAgICAgICBjb25zdCBYID0gRi5tYWtlUnVsZSh5LmRyYWdSdWxlTGlzdFtoLmNoaWxkcmVuXSk7XG4gICAgICAgICAgICAoSSB8fCBQKS5jaGlsZHJlbi5wdXNoKFgpO1xuICAgICAgICAgIH1cbiAgICAgICAgY29uc3QgVyA9IGkudmFsdWUgIT09IHZvaWQgMCA/IGkudmFsdWUgIT09ICExIDogaC5tYXNrICE9PSAhMTtcbiAgICAgICAgcmV0dXJuIGgudG9vbCA9PT0gITEgPyBQIDogaC5pbnNpZGUgPyAoUC5jaGlsZHJlbiA9IEYubWFrZUNoaWxkcmVuKFt7XG4gICAgICAgICAgdHlwZTogXCJEcmFnVG9vbFwiLFxuICAgICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgICBkcmFnQnRuOiBoLmRyYWdCdG4gIT09ICExLFxuICAgICAgICAgICAgY2hpbGRyZW46IGguY2hpbGRyZW4sXG4gICAgICAgICAgICBtYXNrOiBXLFxuICAgICAgICAgICAgaGFuZGxlQnRuOiBoLmhhbmRsZUJ0bixcbiAgICAgICAgICAgIG9ubHk6IGpcbiAgICAgICAgICB9LFxuICAgICAgICAgIGluamVjdDogITAsXG4gICAgICAgICAgb246IHtcbiAgICAgICAgICAgIGRlbGV0ZTogKHsgc2VsZjogUSB9KSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IFggPSBGLmdldFBhcmVudChRKS5wYXJlbnQ7XG4gICAgICAgICAgICAgIEYuaGFuZGxlUmVtb3ZlQmVmb3JlKHsgcGFyZW50OiBYLCBydWxlOiBYIH0pICE9P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bMF0gOiBYLnBhcmVudCkuY2hpbGRyZW5bMF0uY2hpbGRyZW4ucHVzaChkZSksIEYuaGFuZGxlQWRkQWZ0ZXIoeyBydWxlOiBkZSB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjb3B5OiAoeyBzZWxmOiBRIH0pID0+IHtcbiAgICAgICAgICAgICAgRi5oYW5kbGVDb3B5QmVmb3JlKCk7XG4gICAgICAgICAgICAgIGNvbnN0IFggPSBGLmdldFBhcmVudChRKTtcbiAgICAgICAgICAgICAgZC5lbWl0KFwiY29weVwiLCBYLnBhcmVudCk7XG4gICAgICAgICAgICAgIGNvbnN0IEogPSBGLnJlcGxhY2VGaWVsZChYLnBhcmVudCk7XG4gICAgICAgICAgICAgIFgucm9vdC5jaGlsZHJlbi5zcGxpY2UoWC5yb290LmNoaWxkcmVuLmluZGV4T2YoWC5wYXJlbnQpICsgMSwgMCwgSiksIEYuaGFuZGxlQ29weUFmdGVyKHsgcnVsZTogWC5wYXJlbnQgfSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYWN0aXZlOiAoeyBzZWxmOiBRIH0pID0+IHtcbiAgICAgICAgICAgICAgY29uc3QgWCA9IEYuZ2V0UGFyZW50KFEpO1xuICAgICAgICAgICAgICBkLmVtaXQoXCJhY3RpdmVcIiwgWC5wYXJlbnQpLCBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBGLnRvb2xBY3RpdmUoWC5wYXJlbnQpO1xuICAgICAgICAgICAgICB9LCAxMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSxcbiAgICAgICAgICBjaGlsZHJlbjogUC5jaGlsZHJlblxuICAgICAgICB9XSksIFApIDoge1xuICAgICAgICAgIHR5cGU6IFwiRHJhZ1Rvb2xcIixcbiAgICAgICAgICBwcm9wczoge1xuICAgICAgICAgICAgZHJhZ0J0bjogaC5kcmFnQnRuICE9PSAhMSxcbiAgICAgICAgICAgIGNoaWxkcmVuOiBoLm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WlnaHR9O2ZsZXg6MDtgIDogXCJcIiksXG4gICAgb25EcmFnZW50ZXI6IHIuaGFuZGxlRHJhZ2VudGVyLFxuICAgIG9uRHJhZ2xlYXZlOiByLmhhbmRsZURyYWdsZWF2ZSxcbiAgICBvbkRyb3A6IHIuaGFuZGxlRHJvcFxuICB9LCB7XG4gICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgdWUocCwgbnVsbCwge1xuICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgKGZlKCksIEtlKFQsIHtcbiAgICAgICAgICAgIHN0eWxlOiB7IGhlaWdodDogXCIxMDAlXCIgfSxcbiAgICAgICAgICAgIGtleTogci5sb2NhbGUgJiYgci5sb2NhbGUubmFtZVxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgdWUobSwge1xuICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mYy1sXCIsXG4gICAgICAgICAgICAgICAgd2lkdGg6IFwiMjY2cHhcIlxuICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgdWUoVCwgeyBzdHlsZTogeyBoZWlnaHQ6IFwiMTAwJVwiIH0gfSwge1xuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcIjQwcHhcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mYy1sLXRhYnNcIlxuICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBDbihbXCJfZmMtbC10YWJcIiwgeyBhY3RpdmU6IHIuYWN0aXZlTWVudVRhYiA9PT0gXCJtZW51XCIgfV0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IGZbMF0gfHwgKGZbMF0gPSAoaCkgPT4gci5hY3RpdmVNZW51VGFiID0gXCJtZW51XCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIEllKHIudChcIm1lbnUuY29tcG9uZW50XCIpKSwgMyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogQ24oW1wiX2ZjLWwtdGFiXCIsIHsgYWN0aXZlOiByLmFjdGl2ZU1lbnVUYWIgPT09IFwidHJlZVwiIH1dKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBmWzFdIHx8IChmWzFdID0gKGgpID0+IHIuYWN0aXZlTWVudVRhYiA9IFwidHJlZVwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBJZShyLnQoXCJtZW51LnRyZWVcIikpLCAzKVxuICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgZ2kodWUocCwgbnVsbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAoZmUoITApLCB4ZShodCwgbnVsbCwgaG4oci5tZW51TGlzdCwgKGgsIE4pID0+IChmZSgpLCB4ZShodCwgbnVsbCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIuaGlkZGVuTWVudS5pbmRleE9mKGgubmFtZSkgPT09IC0xID8gKGZlKCksIHhlKFwiZGl2XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mYy1sLWdyb3VwXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IE5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImg0XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZjLWwtdGl0bGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogKFApID0+IGguaGlkZGVuID0gIWguaGlkZGVuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcIm1lbnUuXCIgKyBoLm5hbWUpIHx8IGgudGl0bGUpICsgXCIgXCIsIDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBDbihbXCJmYy1pY29uIGljb24tYXJyb3dcIiwgeyBkb3duOiAhaC5oaWRkZW4gfV0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA4LCBveSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnaSh1ZShjLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwOiB7IG5hbWU6IFwiZGVmYXVsdFwiLCBwdWxsOiBcImNsb25lXCIsIHB1dDogITEgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc29ydDogITEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1LZXk6IFwibmFtZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmMtbC1saXN0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Q6IGgubGlzdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtOiByZSgoeyBlbGVtZW50OiBQIH0pID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByLmhpZGRlbkl0ZW0uaW5kZXhPZihQLm5hbWUpID09PSAtMSA/IChmZSgpLCB4ZShcImRpdlwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmMtbC1pdGVtXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAoaikgPT4gci5jbGlja01lbnUoUClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImRpdlwiLCBseSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBDbihbXCJmYy1pY29uXCIsIFAuaWNvbiB8fCBcImljb24taW5wdXRcIl0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwic3BhblwiLCBzeSwgSWUoci50KFwiY29tLlwiICsgUC5uYW1lICsgXCIubmFtZVwiKSB8fCBQLmxhYmVsKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA4LCBheSkpIDogamUoXCJcIiwgITApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJsaXN0XCJdKSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbeWksICFoLmhpZGRlbl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkpIDogamUoXCJcIiwgITApXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0sIDY0KSkpLCAyNTYpKVxuICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgfSwgNTEyKSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgW3lpLCByLmFjdGl2ZU1lbnVUYWIgPT09IFwibWVudVwiXVxuICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIHIuYWN0aXZlTWVudVRhYiA9PT0gXCJ0cmVlXCIgPyAoZmUoKSwgS2UocCwgeyBrZXk6IDAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShELCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmOiBcInRyZWVSZWZcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiByLnRyZWVJbmZvLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGVmYXVsdC1leHBhbmQtYWxsXCI6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJleHBhbmQtb24tY2xpY2stbm9kZVwiOiAhMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkN1cnJlbnRDaGFuZ2U6IHIudHJlZUNoYW5nZVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKHsgbm9kZTogaCwgZGF0YTogTiB9KSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImRpdlwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBDbihbXCJfZmMtdHJlZS1ub2RlXCIsIHsgYWN0aXZlOiByLmFjdGl2ZVJ1bGUgPT09IE4ucnVsZSB9XSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwgdXksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IENuKFtcImZjLWljb25cIiwgTi5ydWxlLl9tZW51ICYmIE4ucnVsZS5fbWVudS5pY29uIHx8IFwiaWNvbi1jZWxsXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwic3BhblwiLCBudWxsLCBJZSgoTi5ydWxlLnRpdGxlIHx8IFwiXCIpLnRyaW0oKSB8fCBOLnJ1bGUucHJvcHMgJiYgTi5ydWxlLnByb3BzLmxhYmVsIHx8IHIudChcImNvbS5cIiArIChOLnJ1bGUuX21lbnUgJiYgTi5ydWxlLl9tZW51Lm5hbWUpICsgXCIubmFtZVwiKSB8fCBOLnJ1bGUudHlwZSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOLnNsb3QgPyBqZShcIlwiLCAhMCkgOiAoZmUoKSwgeGUoXCJkaXZcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmMtdHJlZS1tb3JlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogZlsyXSB8fCAoZlsyXSA9IEhuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXCJzdG9wXCJdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVlKFMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyaWdnZXI6IFwiY2xpY2tcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IFwiZGVmYXVsdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJvcGRvd246IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWUoYiwgbnVsbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE4ucnVsZS5fZmNfZHJhZ190YWcgIT09IFwiX1wiID8gKGZlKCksIEtlKHYsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBcIjFcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogKFApID0+IHIudG9vbEhhbmRsZShOLnJ1bGUsIFwiY29weVwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMuY29weVwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJvbkNsaWNrXCJdKSkgOiBqZShcIlwiLCAhMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOLnJ1bGUuX21lbnUgJiYgTi5ydWxlLl9tZW51LmNoaWxkcmVuICYmIE4ucnVsZS5fZmNfZHJhZ190YWcgIT09IFwiX1wiID8gKGZlKCksIEtlKHYsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBcIjJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogKFApID0+IHIudG9vbEhhbmRsZShOLnJ1bGUsIFwiYWRkQ2hpbGRcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcImZvcm0uYXBwZW5kQ2hpbGRcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wib25DbGlja1wiXSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWUodiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IFwiM1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAoUCkgPT4gci50b29sSGFuZGxlKE4ucnVsZSwgXCJkZWxldGVcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInByb3BzLmRlbGV0ZVwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJvbkNsaWNrXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAyNClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmeVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAyNClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCAyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgOCwgW1wiZGF0YVwiLCBcIm9uQ3VycmVudENoYW5nZVwiXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgIH0pKSA6IGplKFwiXCIsICEwKVxuICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICB1ZShULCB7IGNsYXNzOiBcIl9mYy1tXCIgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgIHVlKGQsIHtcbiAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZjLW0tdG9vbHNcIixcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcIjQ1XCJcbiAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIGR5LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICByLmlucHV0Rm9ybS5zdGF0ZSA/IGplKFwiXCIsICEwKSA6IChmZSgpLCB4ZShodCwgeyBrZXk6IDAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICByLmdldENvbmZpZyhcInNob3dEZXZpY2VcIikgIT09ICExID8gKGZlKCksIHhlKGh0LCB7IGtleTogMCB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgci5kZXZpY2UgIT09IFwicGNcIiA/IChmZSgpLCB4ZShcInN2Z1wiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBmWzNdIHx8IChmWzNdID0gKGgpID0+IHIuZGV2aWNlID0gXCJwY1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcImljb25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZXdCb3g6IFwiMCAwIDEwMjQgMTAyNFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgaHkpKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByLmRldmljZSA9PT0gXCJwY1wiID8gKGZlKCksIHhlKFwic3ZnXCIsIHZ5LCB5eSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIuZGV2aWNlICE9PSBcInBhZFwiID8gKGZlKCksIHhlKFwic3ZnXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IGZbNF0gfHwgKGZbNF0gPSAoaCkgPT4gci5kZXZpY2UgPSBcInBhZFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcImljb25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZXdCb3g6IFwiMCAwIDEwMjQgMTAyNFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgQ3kpKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByLmRldmljZSA9PT0gXCJwYWRcIiA/IChmZSgpLCB4ZShcInN2Z1wiLCBFeSwgd3kpKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByLmRldmljZSAhPT0gXCJtb2JpbGVcIiA/IChmZSgpLCB4ZShcInN2Z1wiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IDQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBmWzVdIHx8IChmWzVdID0gKGgpID0+IHIuZGV2aWNlID0gXCJtb2JpbGVcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJpY29uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWV3Qm94OiBcIjAgMCAxMDI0IDEwMjRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFJ5KSkgOiBqZShcIlwiLCAhMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgci5kZXZpY2UgPT09IFwibW9iaWxlXCIgPyAoZmUoKSwgeGUoXCJzdmdcIiwgTXksIE95KSkgOiBqZShcIlwiLCAhMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgUHlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgNjQpKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwgbnVsbCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiaVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogQ24oW1wiZmMtaWNvbiBpY29uLXByZS1zdGVwXCIsIHsgZGlzYWJsZWQ6ICFyLm9wZXJhdGlvbi5saXN0W3Iub3BlcmF0aW9uLmlkeCAtIDFdIH1dKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IGZbNl0gfHwgKGZbNl0gPSAoLi4uaCkgPT4gci5wcmV2T3BlcmF0aW9uUmVjb3JkICYmIHIucHJldk9wZXJhdGlvblJlY29yZCguLi5oKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCAyKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcImlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IENuKFtcImZjLWljb24gaWNvbi1uZXh0LXN0ZXBcIiwgeyBkaXNhYmxlZDogIXIub3BlcmF0aW9uLmxpc3Rbci5vcGVyYXRpb24uaWR4ICsgMV0gfV0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogZls3XSB8fCAoZls3XSA9ICguLi5oKSA9PiByLm5leHRPcGVyYXRpb25SZWNvcmQgJiYgci5uZXh0T3BlcmF0aW9uUmVjb3JkKC4uLmgpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICBdLCA2NCkpXG4gICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwgRnksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHIuaW5wdXRGb3JtLnN0YXRlID8gamUoXCJcIiwgITApIDogKGZlKCksIHhlKGh0LCB7IGtleTogMCB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHNyKHIuJHNsb3RzLCBcImhhbmRsZVwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgci5nZXRDb25maWcoXCJzaG93U2F2ZUJ0blwiLCAhMSkgPyAoZmUoKSwgS2UoeCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcInN1Y2Nlc3NcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFpbjogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcInNtYWxsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogci5oYW5kbGVTYXZlXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMeSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKFwiIFwiICsgSWUoci50KFwicHJvcHMuc2F2ZVwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCA4LCBbXCJvbkNsaWNrXCJdKSkgOiBqZShcIlwiLCAhMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHVlKHgsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcInByaW1hcnlcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFpbjogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcInNtYWxsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogci5vcGVuUHJldmlld1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShcIiBcIiArIEllKHIudChcInByb3BzLnByZXZpZXdcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgOCwgW1wib25DbGlja1wiXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHVlKFIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogci50KFwiZGVzaWduZXIuY2xlYXJXYXJuXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjIwMHB4XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJjb25maXJtLWJ1dHRvbi10ZXh0XCI6IHIudChcInByb3BzLmNsZWFyXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiY2FuY2VsLWJ1dHRvbi10ZXh0XCI6IHIudChcInByb3BzLmNhbmNlbFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNvbmZpcm06IHIuY2xlYXJEcmFnUnVsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlOiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZSh4LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiZGFuZ2VyXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWluOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcInNtYWxsXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEh5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInByb3BzLmNsZWFyXCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCA4LCBbXCJ0aXRsZVwiLCBcImNvbmZpcm0tYnV0dG9uLXRleHRcIiwgXCJjYW5jZWwtYnV0dG9uLXRleHRcIiwgXCJvbkNvbmZpcm1cIl0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICByLmhhbmRsZSAmJiByLmhhbmRsZS5sZW5ndGggPyAoZmUoKSwgS2UoUywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmlnZ2VyOiBcImNsaWNrXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZTogXCJkZWZhdWx0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyb3Bkb3duOiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShiLCBudWxsLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZmUoITApLCB4ZShodCwgbnVsbCwgaG4oci5oYW5kbGUsIChoKSA9PiAoZmUoKSwgS2Uodiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogSG4oKE4pID0+IHIudHJpZ2dlckhhbmRsZShoKSwgW1wic3RvcFwiXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIG51bGwsIEllKGgubGFiZWwpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wib25DbGlja1wiXSkpKSwgMjU2KSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWUoeCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtbS1leHRlbmRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhaW46IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IFwic21hbGxcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9KSkgOiBqZShcIlwiLCAhMClcbiAgICAgICAgICAgICAgICAgICAgICAgIF0sIDY0KSksXG4gICAgICAgICAgICAgICAgICAgICAgICBreSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIGp5LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHIuaW5wdXRDaGVja1N0YXR1cyA/IChmZSgpLCB4ZShcImlcIiwgVXkpKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJzcGFuXCIsIG51bGwsIEllKHIudChcInByb3BzLmlucHV0RGF0YVwiKSkgKyBcIlxcdUZGMUFcIiwgMSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHVlKHcsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcInNtYWxsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJtb2RlbC12YWx1ZVwiOiByLmlucHV0Rm9ybS5zdGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImlubGluZS1wcm9tcHRcIjogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogci5vcGVuSW5wdXREYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcIm1vZGVsLXZhbHVlXCIsIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgIF86IDNcbiAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgdWUocCwgeyBjbGFzczogXCJfZmMtbS1jb25cIiB9LCB7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAoZmUoKSwgeGUoXCJhXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleTogci5hY3RpdmVSdWxlID8gci5hY3RpdmVSdWxlLl9mY19pZCA6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZTogeyB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zaXRpb25cIjogXCJjZW50ZXIgIWltcG9ydGFudFwiLCBwb3NpdGlvbjogXCJhYnNvbHV0ZSAhaW1wb3J0YW50XCIsIG92ZXJmbG93OiBcImhpZGRlbiAhaW1wb3J0YW50XCIsIGxlZnQ6IFwiNTAlICFpbXBvcnRhbnRcIiwgd2lkdGg6IFwiMTYwcHghaW1wb3J0YW50XCIsIHJpZ2h0OiBcIjAgIWltcG9ydGFudFwiLCB0b3A6IFwiYXV0byAhaW1wb3J0YW50XCIsIGJvdHRvbTogXCI5cHggIWltcG9ydGFudFwiLCBkaXNwbGF5OiBcImJsb2NrICFpbXBvcnRhbnRcIiwgaGVpZ2h0OiBcIjE3cHggIWltcG9ydGFudFwiLCBcInRleHQtYWxpZ25cIjogXCJjZW50ZXIgIWltcG9ydGFudFwiLCBvcGFjaXR5OiBcIjEgIWltcG9ydGFudFwiLCB2aXNpYmlsaXR5OiBcInZpc2libGUgIWltcG9ydGFudFwiLCBtYXJnaW46IFwiMCAwIDAgLTgwcHggIWltcG9ydGFudFwiLCBwYWRkaW5nOiBcIjAgIWltcG9ydGFudFwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXQ6IFwiX2JsYW5rXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBocmVmOiBcImh0dHBzOi8vZm9ybS1jcmVhdGUuY29tL1wiXG4gICAgICAgICAgICAgICAgICAgICAgfSkpLFxuICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBDbihbXCJfZmMtbS1kcmFnXCIsIHIuZGV2aWNlXSksXG4gICAgICAgICAgICAgICAgICAgICAgICByZWY6IFwiZHJhZ0NvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU6IENvKHsgXCItLWZjLWRyYWctZW1wdHlcIjogYCcke3IudChcImRlc2lnbmVyLmRyYWdFbXB0eVwiKX0nYCwgXCItLWZjLWNoaWxkLWVtcHR5XCI6IGAnJHtyLnQoXCJkZXNpZ25lci5jaGlsZEVtcHR5XCIpfSdgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgci5pbnB1dEZvcm0uc3RhdGUgPyAoZmUoKSwgeGUoXCJkaXZcIiwgenksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKGZlKCksIEtlKEEsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IHIuaW5wdXRGb3JtLmtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlOiByLmlucHV0Rm9ybS5ydWxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbjogci5pbnB1dEZvcm0ub3B0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwaTogci5pbnB1dEZvcm0uYXBpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6YXBpXCI6IGZbOF0gfHwgKGZbOF0gPSAoaCkgPT4gci5pbnB1dEZvcm0uYXBpID0gaCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6ICExXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcInJ1bGVcIiwgXCJvcHRpb25cIiwgXCJhcGlcIl0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgXSkpIDogKGZlKCksIEtlKEUsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiAxLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlOiByLmRyYWdGb3JtLnJ1bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbjogci5mb3JtT3B0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgYXBpOiByLmRyYWdGb3JtLmFwaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvblVwZGF0ZTphcGlcIjogZls5XSB8fCAoZls5XSA9IChoKSA9PiByLmRyYWdGb3JtLmFwaSA9IGgpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJydWxlXCIsIFwib3B0aW9uXCIsIFwiYXBpXCJdKSlcbiAgICAgICAgICAgICAgICAgICAgICBdLCA2KSxcbiAgICAgICAgICAgICAgICAgICAgICByLmlucHV0Rm9ybS5zdGF0ZSA/IChmZSgpLCB4ZShcImRpdlwiLCBWeSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgdWUoeCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFpbjogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogZlsxMF0gfHwgKGZbMTBdID0gKGgpID0+IHIuaW5wdXRDbGVhcigpKVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMuY2xlYXJcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICB1ZSh4LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWluOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBmWzExXSB8fCAoZlsxMV0gPSAoaCkgPT4gci5pbnB1dFJlc2V0KCkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJwcm9wcy5yZXNldFwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVlKHgsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJwcmltYXJ5XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWluOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBmWzEyXSB8fCAoZlsxMl0gPSAoaCkgPT4gci5pbnB1dFNhdmUoKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInByb3BzLnNhdmVcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICBdKSkgOiBqZShcIlwiLCAhMClcbiAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgXzogM1xuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgIXIuY29uZmlnIHx8IHIuY29uZmlnLnNob3dDb25maWcgIT09ICExID8gKGZlKCksIEtlKG0sIHtcbiAgICAgICAgICAgICAgICBrZXk6IDAsXG4gICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZjLXJcIixcbiAgICAgICAgICAgICAgICB3aWR0aDogXCIzMjBweFwiXG4gICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICB1ZShULCB7IHN0eWxlOiB7IGhlaWdodDogXCIxMDAlXCIgfSB9LCB7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFwiNDBweFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZjLXItdGFic1wiXG4gICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAhIXIuYWN0aXZlUnVsZSB8fCByLmN1c3RvbUZvcm0uaXNTaG93IHx8IHIuY29uZmlnICYmIHIuY29uZmlnLnNob3dGb3JtQ29uZmlnID09PSAhMSA/IChmZSgpLCB4ZShcImRpdlwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBDbihbXCJfZmMtci10YWJcIiwgeyBhY3RpdmU6IHIuYWN0aXZlVGFiID09PSBcInByb3BzXCIgfV0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IGZbMTNdIHx8IChmWzEzXSA9IChoKSA9PiByLmFjdGl2ZVRhYiA9IFwicHJvcHNcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgSWUoci50KFwiZGVzaWduZXIuY29tcG9uZW50XCIpKSwgMykpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAhci5jb25maWcgfHwgci5jb25maWcuc2hvd0Zvcm1Db25maWcgIT09ICExID8gKGZlKCksIHhlKFwiZGl2XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IDEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IENuKFtcIl9mYy1yLXRhYlwiLCB7IGFjdGl2ZTogci5hY3RpdmVUYWIgPT09IFwiZm9ybVwiICYmICghIXIuYWN0aXZlUnVsZSB8fCByLmN1c3RvbUZvcm0uaXNTaG93KSB9XSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogZlsxNF0gfHwgKGZbMTRdID0gKGgpID0+IHIuYWN0aXZlVGFiID0gXCJmb3JtXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIEllKHIudChcImRlc2lnbmVyLmZvcm1cIikpLCAzKSkgOiBqZShcIlwiLCAhMClcbiAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICFyLmNvbmZpZyB8fCByLmNvbmZpZy5zaG93Rm9ybUNvbmZpZyAhPT0gITEgPyBnaSgoZmUoKSwgS2UocCwge1xuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZjLXItdGFiLWZvcm1cIlxuICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdWUoRSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGU6IHIuZm9ybS5ydWxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbjogci5mb3JtLm9wdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbFZhbHVlOiByLmZvcm0udmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IHIuZm9ybU9wdENoYW5nZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcGk6IHIuZm9ybS5hcGksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvblVwZGF0ZTphcGlcIjogZlsxNV0gfHwgKGZbMTVdID0gKGgpID0+IHIuZm9ybS5hcGkgPSBoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJydWxlXCIsIFwib3B0aW9uXCIsIFwibW9kZWxWYWx1ZVwiLCBcIm9uQ2hhbmdlXCIsIFwiYXBpXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgfSwgNTEyKSksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIFt5aSwgci5hY3RpdmVUYWIgPT09IFwiZm9ybVwiXVxuICAgICAgICAgICAgICAgICAgICAgIF0pIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgIGdpKChmZSgpLCBLZShwLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmMtci10YWItcHJvcHNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleTogci5hY3RpdmVSdWxlID8gci5hY3RpdmVSdWxlLl9mY19pZCA6IHIuY3VzdG9tRm9ybS5jb25maWcgPyByLmN1c3RvbUZvcm0ua2V5IDogXCJcIlxuICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgci5hY3RpdmVSdWxlIHx8IHIuY3VzdG9tRm9ybS5jb25maWcgJiYgKHIuY3VzdG9tRm9ybS5jb25maWcubmFtZSB8fCByLmN1c3RvbUZvcm0uY29uZmlnLmxhYmVsKSA/IChmZSgpLCB4ZShodCwgeyBrZXk6IDAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwicFwiLCBXeSwgSWUoci50KFwiZGVzaWduZXIudHlwZVwiKSksIDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVlKEMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwic3VjY2Vzc1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWZmZWN0OiBcInBsYWluXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImRpc2FibGUtdHJhbnNpdGlvbnNcIjogXCJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgci5hY3RpdmVSdWxlID8gKGZlKCksIHhlKGh0LCB7IGtleTogMCB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwiY29tLlwiICsgci5hY3RpdmVSdWxlLl9tZW51Lm5hbWUgKyBcIi5uYW1lXCIpIHx8IHIuYWN0aXZlUnVsZS5fbWVudS5sYWJlbCksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sIDY0KSkgOiAoZmUoKSwgeGUoaHQsIHsga2V5OiAxIH0sIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJjb20uXCIgKyByLmN1c3RvbUZvcm0uY29uZmlnLm5hbWUgKyBcIi5uYW1lXCIpIHx8IHIuY3VzdG9tRm9ybS5jb25maWcubGFiZWwgfHwgci5jdXN0b21Gb3JtLmNvbmZpZy5uYW1lKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgNjQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgci5hY3RpdmVSdWxlICYmIHIuYWN0aXZlUnVsZS5uYW1lID8gKGZlKCksIHhlKGh0LCB7IGtleTogMCB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcInBcIiwgR3ksIEllKHIudChcImRlc2lnbmVyLm5hbWVcIikpLCAxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVlKE0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZTogXCJzbWFsbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmMtci1uYW1lLWlucHV0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwibW9kZWwtdmFsdWVcIjogci5hY3RpdmVSdWxlLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRvbmx5OiBcIlwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVuZDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiaVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJmYy1pY29uIGljb24tYXV0b1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogZlsxNl0gfHwgKGZbMTZdID0gKC4uLmgpID0+IHIudXBkYXRlTmFtZSAmJiByLnVwZGF0ZU5hbWUoLi4uaCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDgsIFtcIm1vZGVsLXZhbHVlXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sIDY0KSkgOiBqZShcIlwiLCAhMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgNjQpKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgci5iYXNlRm9ybS5pc1Nob3cgPyAoZmUoKSwgS2UoeSwgeyBrZXk6IDEgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcImRlc2lnbmVyLnJ1bGVcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBnaSh1ZShFLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBpOiByLmJhc2VGb3JtLmFwaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9uVXBkYXRlOmFwaVwiOiBmWzE3XSB8fCAoZlsxN10gPSAoaCkgPT4gci5iYXNlRm9ybS5hcGkgPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlOiByLmJhc2VGb3JtLnJ1bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uOiByLmJhc2VGb3JtLm9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWxWYWx1ZTogci5iYXNlRm9ybS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogci5iYXNlQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcImFwaVwiLCBcInJ1bGVcIiwgXCJvcHRpb25cIiwgXCJtb2RlbFZhbHVlXCIsIFwib25DaGFuZ2VcIl0pLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW3lpLCByLmJhc2VGb3JtLmlzU2hvd11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHIucHJvcHNGb3JtLmlzU2hvdyA/IChmZSgpLCBLZSh5LCB7IGtleTogMiB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwiZGVzaWduZXIucHJvcHNcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBnaSh1ZShFLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXBpOiByLnByb3BzRm9ybS5hcGksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvblVwZGF0ZTphcGlcIjogZlsxOF0gfHwgKGZbMThdID0gKGgpID0+IHIucHJvcHNGb3JtLmFwaSA9IGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGU6IHIucHJvcHNGb3JtLnJ1bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uOiByLnByb3BzRm9ybS5vcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsVmFsdWU6IHIucHJvcHNGb3JtLnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiByLnByb3BDaGFuZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25SZW1vdmVGaWVsZDogci5wcm9wUmVtb3ZlRmllbGRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbnVsbCwgOCwgW1wiYXBpXCIsIFwicnVsZVwiLCBcIm9wdGlvblwiLCBcIm1vZGVsVmFsdWVcIiwgXCJvbkNoYW5nZVwiLCBcIm9uUmVtb3ZlRmllbGRcIl0pLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW3lpLCByLnByb3BzRm9ybS5pc1Nob3ddXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICByLmN1c3RvbUZvcm0uaXNTaG93ICYmIHIuY3VzdG9tRm9ybS5wcm9wc1Nob3cgPyAoZmUoKSwgS2UoeSwgeyBrZXk6IDMgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcImRlc2lnbmVyLnByb3BzXCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0pKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgci5jdXN0b21Gb3JtLmlzU2hvdyAmJiByLmN1c3RvbUZvcm0ucHJvcHNTaG93ID8gKGZlKCksIEtlKEUsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcGk6IHIuY3VzdG9tRm9ybS5hcGksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvblVwZGF0ZTphcGlcIjogZlsxOV0gfHwgKGZbMTldID0gKGgpID0+IHIuY3VzdG9tRm9ybS5hcGkgPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlOiByLmN1c3RvbUZvcm0ucnVsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb246IHIuY3VzdG9tRm9ybS5vcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogci5jdXN0b21Gb3JtLmtleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogci5jdXN0b21Gb3JtQ2hhbmdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcImFwaVwiLCBcInJ1bGVcIiwgXCJvcHRpb25cIiwgXCJvbkNoYW5nZVwiXSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICByLmV2ZW50U2hvdyA/IChmZSgpLCBLZSh5LCB7IGtleTogNSB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwiZGVzaWduZXIuZXZlbnRcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICByLmV2ZW50U2hvdyA/IChmZSgpLCBLZShCLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiA2LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZXZlbnQtbmFtZVwiOiByLmFjdGl2ZVJ1bGUgJiYgci5hY3RpdmVSdWxlLl9tZW51LmV2ZW50IHx8IFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiY29tcG9uZW50LW5hbWVcIjogci5hY3RpdmVSdWxlICYmIHIuYWN0aXZlUnVsZS5fbWVudS5uYW1lIHx8IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJtb2RlbC12YWx1ZVwiOiByLmFjdGl2ZVJ1bGUgJiYgci5hY3RpdmVSdWxlLl9vbiB8fCB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogci5jaGFuZ2VFdmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJldmVudC1uYW1lXCIsIFwiY29tcG9uZW50LW5hbWVcIiwgXCJtb2RlbC12YWx1ZVwiLCBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIl0pKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgci5hY3RpdmVSdWxlID8gKGZlKCksIHhlKGh0LCB7IGtleTogNyB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgci52YWxpZGF0ZUZvcm0uaXNTaG93ID8gKGZlKCksIEtlKHksIHsga2V5OiAwIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwiZGVzaWduZXIudmFsaWRhdGVcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIudmFsaWRhdGVGb3JtLmlzU2hvdyA/IChmZSgpLCBLZShFLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcGk6IHIudmFsaWRhdGVGb3JtLmFwaSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6YXBpXCI6IGZbMjBdIHx8IChmWzIwXSA9IChoKSA9PiByLnZhbGlkYXRlRm9ybS5hcGkgPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGU6IHIudmFsaWRhdGVGb3JtLnJ1bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb246IHIudmFsaWRhdGVGb3JtLm9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbFZhbHVlOiByLnZhbGlkYXRlRm9ybS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiByLnZhbGlkYXRlQ2hhbmdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiByLmFjdGl2ZVJ1bGUuX2ZjX2lkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbnVsbCwgOCwgW1wiYXBpXCIsIFwicnVsZVwiLCBcIm9wdGlvblwiLCBcIm1vZGVsVmFsdWVcIiwgXCJvbkNoYW5nZVwiXSkpIDogamUoXCJcIiwgITApXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0sIDY0KSkgOiBqZShcIlwiLCAhMClcbiAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICAgIH0pKSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgW3lpLCByLmFjdGl2ZVRhYiA9PT0gXCJwcm9wc1wiXVxuICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICB1ZShrLCB7XG4gICAgICAgICAgICAgICAgbW9kZWxWYWx1ZTogci5wcmV2aWV3LnN0YXRlLFxuICAgICAgICAgICAgICAgIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiOiBmWzIzXSB8fCAoZlsyM10gPSAoaCkgPT4gci5wcmV2aWV3LnN0YXRlID0gaCksXG4gICAgICAgICAgICAgICAgd2lkdGg6IFwiODAwcHhcIixcbiAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtcHJldmlldy1kaWFsb2dcIixcbiAgICAgICAgICAgICAgICBcImFwcGVuZC10by1ib2R5XCI6IFwiXCJcbiAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgIHVlKEYsIHtcbiAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZkLXByZXZpZXctdGFic1wiLFxuICAgICAgICAgICAgICAgICAgICBtb2RlbFZhbHVlOiByLnByZXZpZXdTdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiOiBmWzIxXSB8fCAoZlsyMV0gPSAoaCkgPT4gci5wcmV2aWV3U3RhdHVzID0gaClcbiAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgIHVlKCQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiByLnQoXCJmb3JtLmZvcm1Nb2RlXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJmb3JtXCJcbiAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJsYWJlbFwiXSksXG4gICAgICAgICAgICAgICAgICAgICAgdWUoJCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IHIudChcImZvcm0uY29tcG9uZW50TW9kZVwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiY29tcG9uZW50XCJcbiAgICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBbXCJsYWJlbFwiXSlcbiAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgIH0sIDgsIFtcIm1vZGVsVmFsdWVcIl0pLFxuICAgICAgICAgICAgICAgICAgci5wcmV2aWV3U3RhdHVzID09PSBcImZvcm1cIiA/IChmZSgpLCB4ZShodCwgeyBrZXk6IDAgfSwgW1xuICAgICAgICAgICAgICAgICAgICByLnByZXZpZXcuc3RhdGUgPyAoZmUoKSwgS2UoQSwge1xuICAgICAgICAgICAgICAgICAgICAgIGtleTogMCxcbiAgICAgICAgICAgICAgICAgICAgICBydWxlOiByLnByZXZpZXcucnVsZSxcbiAgICAgICAgICAgICAgICAgICAgICBvcHRpb246IHIucHJldmlldy5vcHRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgYXBpOiByLnByZXZpZXcuYXBpLFxuICAgICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6YXBpXCI6IGZbMjJdIHx8IChmWzIyXSA9IChoKSA9PiByLnByZXZpZXcuYXBpID0gaClcbiAgICAgICAgICAgICAgICAgICAgfSwgbnVsbCwgOCwgW1wicnVsZVwiLCBcIm9wdGlvblwiLCBcImFwaVwiXSkpIDogamUoXCJcIiwgITApXG4gICAgICAgICAgICAgICAgICBdLCA2NCkpIDogKGZlKCksIHhlKFwicHJlXCIsIFF5LCBbXG4gICAgICAgICAgICAgICAgICAgIGhlKFwiY29kZVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5uZXJIVE1MOiByLnByZXZpZXcuaHRtbFxuICAgICAgICAgICAgICAgICAgICB9LCBudWxsLCA4LCBZeSlcbiAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgfSwgOCwgW1wibW9kZWxWYWx1ZVwiXSlcbiAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgXzogM1xuICAgICAgICAgIH0pKVxuICAgICAgICBdKSxcbiAgICAgICAgXzogM1xuICAgICAgfSlcbiAgICBdKSxcbiAgICBfOiAzXG4gIH0sIDgsIFtcInN0eWxlXCIsIFwib25EcmFnZW50ZXJcIiwgXCJvbkRyYWdsZWF2ZVwiLCBcIm9uRHJvcFwiXSk7XG59XG5jb25zdCBPciA9IC8qIEBfX1BVUkVfXyAqLyBNdChpeSwgW1tcInJlbmRl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cbiAgICAgICAgci5pc0NyZWF0ZSAmJiAoci5idG5zID09PSAhMCB8fCByLmJ0bnMuaW5kZXhPZihcImNyZWF0ZVwiKSA+IC0xKSA/IChmZSgpLCB4ZShcImRpdlwiLCB7XG4gICAgICAgICAga2V5OiAwLFxuICAgICAgICAgIGNsYXNzOiBcIl9mZC1kcmFnLWJ0blwiLFxuICAgICAgICAgIG9uQ2xpY2s6IGZbMF0gfHwgKGZbMF0gPSAoZCkgPT4gci4kZW1pdChcImNyZWF0ZVwiKSlcbiAgICAgICAgfSwgcjApKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgIXIub25seSAmJiAoci5idG5zID09PSAhMCB8fCByLmJ0bnMuaW5kZXhPZihcImNvcHlcIikgPiAtMSkgPyAoZmUoKSwgeGUoXCJkaXZcIiwge1xuICAgICAgICAgIGtleTogMSxcbiAgICAgICAgICBjbGFzczogXCJfZmQtZHJhZy1idG5cIixcbiAgICAgICAgICBvbkNsaWNrOiBmWzFdIHx8IChmWzFdID0gKGQpID0+IHIuJGVtaXQoXCJjb3B5XCIpKVxuICAgICAgICB9LCBvMCkpIDogamUoXCJcIiwgITApLFxuICAgICAgICByLmNoaWxkcmVuICYmIChyLmJ0bnMgPT09ICEwIHx8IHIuYnRucy5pbmRleE9mKFwiYWRkQ2hpbGRcIikgPiAtMSkgPyAoZmUoKSwgeGUoXCJkaXZcIiwge1xuICAgICAgICAgIGtleTogMixcbiAgICAgICAgICBjbGFzczogXCJfZmQtZHJhZy1idG5cIixcbiAgICAgICAgICBvbkNsaWNrOiBmWzJdIHx8IChmWzJdID0gKGQpID0+IHIuJGVtaXQoXCJhZGRDaGlsZFwiKSlcbiAgICAgICAgfSwgbDApKSA6IGplKFwiXCIsICEwKSxcbiAgICAgICAgci5idG5zID09PSAhMCB8fCByLmJ0bnMuaW5kZXhPZihcImRlbGV0ZVwiKSA+IC0xID8gKGZlKCksIHhlKFwiZGl2XCIsIHtcbiAgICAgICAgICBrZXk6IDMsXG4gICAg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biAgICAgIHRoaXMubG9hZCgpO1xuICAgIH0sXG4gICAgdmlzaWJsZShyKSB7XG4gICAgICByICYmIHRoaXMubG9hZCgpO1xuICAgIH1cbiAgfSxcbiAgbWV0aG9kczoge1xuICAgIGxvYWQoKSB7XG4gICAgICBjb25zdCByID0gSXIoQmQodGhpcy5tb2RlbFZhbHVlID8gVnQodGhpcy5tb2RlbFZhbHVlKSA6IHRoaXMuZGVmYXVsdFZhbHVlKSk7XG4gICAgICB0aGlzLm9sZFZhbCA9IHIsIHRoaXMuJG5leHRUaWNrKCgpID0+IHtcbiAgICAgICAgdGhpcy5lZGl0b3IgPSBZcihEaSh0aGlzLiRyZWZzLmVkaXRvciwge1xuICAgICAgICAgIGxpbmVOdW1iZXJzOiAhMCxcbiAgICAgICAgICBtb2RlOiBcImphdmFzY3JpcHRcIixcbiAgICAgICAgICBsaW50OiAhMCxcbiAgICAgICAgICBsaW5lOiAhMCxcbiAgICAgICAgICB0YWJTaXplOiAyLFxuICAgICAgICAgIGxpbmVXcmFwcGluZzogITAsXG4gICAgICAgICAgdmFsdWU6IHIgfHwgXCJcIlxuICAgICAgICB9KSk7XG4gICAgICB9KTtcbiAgICB9LFxuICAgIG9uT2soKSB7XG4gICAgICBjb25zdCByID0gdGhpcy5lZGl0b3IuZ2V0VmFsdWUoKTtcbiAgICAgIGxldCBmO1xuICAgICAgdHJ5IHtcbiAgICAgICAgZiA9IG5ldyBGdW5jdGlvbihcInJldHVybiBcIiArIHIpKCk7XG4gICAgICB9IGNhdGNoIChvKSB7XG4gICAgICAgIHJldHVybiBjb25zb2xlLmVycm9yKG8pLCBNbih0aGlzLnQoXCJzdHJ1Y3QuZXJyb3JNc2dcIikpLCAhMTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB0aGlzLnZhbGlkYXRlICYmIHRoaXMudmFsaWRhdGUoZikgPT09ICExID8gKE1uKHRoaXMudChcInN0cnVjdC5lcnJvck1zZ1wiKSksICExKSA6ICh0aGlzLnZpc2libGUgPSAhMSwgSXIoZikgIT09IHRoaXMub2xkVmFsICYmIHRoaXMuJGVtaXQoXCJ1cGRhdGU6bW9kZWxWYWx1ZVwiLCBmKSwgITApO1xuICAgIH1cbiAgfVxufSksIGMwID0geyBjbGFzczogXCJfZmQtc3RydWN0XCIgfSwgcDAgPSB7XG4gIGtleTogMCxcbiAgcmVmOiBcImVkaXRvclwiXG59O1xuZnVuY3Rpb24gaDAociwgZiwgbywgaSwgdCwgcykge1xuICBjb25zdCBkID0gYmUoXCJlbC1idXR0b25cIiksIGMgPSBiZShcImVsLWJhZGdlXCIpLCBwID0gYmUoXCJlbC1kaWFsb2dcIik7XG4gIHJldHVybiBmZSgpLCB4ZShcImRpdlwiLCBjMCwgW1xuICAgIHVlKGMsIHtcbiAgICAgIHR5cGU6IFwid2FybmluZ1wiLFxuICAgICAgXCJpcy1kb3RcIjogXCJcIixcbiAgICAgIGhpZGRlbjogIXIuY29uZmlndXJlZFxuICAgIH0sIHtcbiAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgdWUoZCwge1xuICAgICAgICAgIG9uQ2xpY2s6IGZbMF0gfHwgKGZbMF0gPSAodikgPT4gci52aXNpYmxlID0gITApLFxuICAgICAgICAgIHNpemU6IFwic21hbGxcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgJGUoSWUoci50aXRsZSB8fCByLnQoXCJzdHJ1Y3QudGl0bGVcIikpLCAxKVxuICAgICAgICAgIF0pLFxuICAgICAgICAgIF86IDFcbiAgICAgICAgfSlcbiAgICAgIF0pLFxuICAgICAgXzogMVxuICAgIH0sIDgsIFtcImhpZGRlblwiXSksXG4gICAgdWUocCwge1xuICAgICAgY2xhc3M6IFwiX2ZkLXN0cnVjdC1jb25cIixcbiAgICAgIHRpdGxlOiByLnRpdGxlIHx8IHIudChcInN0cnVjdC50aXRsZVwiKSxcbiAgICAgIG1vZGVsVmFsdWU6IHIudmlzaWJsZSxcbiAgICAgIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiOiBmWzJdIHx8IChmWzJdID0gKHYpID0+IHIudmlzaWJsZSA9IHYpLFxuICAgICAgXCJkZXN0cm95LW9uLWNsb3NlXCI6IFwiXCIsXG4gICAgICBcImNsb3NlLW9uLWNsaWNrLW1vZGFsXCI6ICExLFxuICAgICAgXCJhcHBlbmQtdG8tYm9keVwiOiBcIlwiXG4gICAgfSwge1xuICAgICAgZm9vdGVyOiByZSgoKSA9PiBbXG4gICAgICAgIGhlKFwiZGl2XCIsIG51bGwsIFtcbiAgICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgICBvbkNsaWNrOiBmWzFdIHx8IChmWzFdID0gKHYpID0+IHIudmlzaWJsZSA9ICExKSxcbiAgICAgICAgICAgIHNpemU6IFwiZGVmYXVsdFwiXG4gICAgICAgICAgfSwge1xuICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAkZShJZShyLnQoXCJwcm9wcy5jYW5jZWxcIikpLCAxKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfOiAxXG4gICAgICAgICAgfSksXG4gICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgdHlwZTogXCJwcmltYXJ5XCIsXG4gICAgICAgICAgICBvbkNsaWNrOiByLm9uT2ssXG4gICAgICAgICAgICBzaXplOiBcImRlZmF1bHRcIixcbiAgICAgICAgICAgIGNvbG9yOiBcIiMyZjczZmZcIlxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMub2tcIikpLCAxKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfOiAxXG4gICAgICAgICAgfSwgOCwgW1wib25DbGlja1wiXSlcbiAgICAgICAgXSlcbiAgICAgIF0pLFxuICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgIC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XRsZSB8fCByLnQoXCJzdHJ1Y3QudGl0bGVcIiksXG4gICAgICBtb2RlbFZhbHVlOiByLnZpc2libGUsXG4gICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogZlsyXSB8fCAoZlsyXSA9IChwKSA9PiByLnZpc2libGUgPSBwKSxcbiAgICAgIFwiY2xvc2Utb24tY2xpY2stbW9kYWxcIjogITEsXG4gICAgICBcImFwcGVuZC10by1ib2R5XCI6IFwiXCJcbiAgICB9LCB7XG4gICAgICBmb290ZXI6IHJlKCgpID0+IFtcbiAgICAgICAgaGUoXCJkaXZcIiwgbnVsbCwgW1xuICAgICAgICAgIHVlKGQsIHtcbiAgICAgICAgICAgIG9uQ2xpY2s6IGZbMV0gfHwgKGZbMV0gPSAocCkgPT4gci52aXNpYmxlID0gITEpLFxuICAgICAgICAgICAgc2l6ZTogXCJkZWZhdWx0XCJcbiAgICAgICAgICB9LCB7XG4gICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICRlKEllKHIudChcInByb3BzLmNhbmNlbFwiKSksIDEpXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIF86IDFcbiAgICAgICAgICB9KSxcbiAgICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgICB0eXBlOiBcInByaW1hcnlcIixcbiAgICAgICAgICAgIG9uQ2xpY2s6IHIub25PayxcbiAgICAgICAgICAgIHNpemU6IFwiZGVmYXVsdFwiXG4gICAgICAgICAgfSwge1xuICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAkZShJZShyLnQoXCJwcm9wcy5va1wiKSksIDEpXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIF86IDFcbiAgICAgICAgICB9LCA4LCBbXCJvbkNsaWNrXCJdKVxuICAgICAgICBdKVxuICAgICAgXSksXG4gICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgIHIudmlzaWJsZSA/IChm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ogXCJcIixcbiAgICAgIGhpZGRlbjogIXIuY29uZmlndXJlZFxuICAgIH0sIHtcbiAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgdWUoZCwge1xuICAgICAgICAgIG9uQ2xpY2s6IGZbMF0gfHwgKGZbMF0gPSAobSkgPT4gci52aXNpYmxlID0gITApLFxuICAgICAgICAgIHNpemU6IFwic21hbGxcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgJGUoSWUoci50KFwic3RydWN0LnRpdGxlXCIpKSwgMSlcbiAgICAgICAgICBdKSxcbiAgICAgICAgICBfOiAxXG4gICAgICAgIH0pXG4gICAgICBdKSxcbiAgICAgIF86IDFcbiAgICB9LCA4LCBbXCJoaWRkZW5cIl0pLFxuICAgIHVlKFQsIHtcbiAgICAgIGNsYXNzOiBcIl9mZC1nZmMtZGlhbG9nXCIsXG4gICAgICB0aXRsZTogci50KFwiZmV0Y2gub3B0aW9uc1R5cGUuZmV0Y2hcIiksXG4gICAgICBtb2RlbFZhbHVlOiByLnZpc2libGUsXG4gICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogZls2XSB8fCAoZls2XSA9IChtKSA9PiByLnZpc2libGUgPSBtKSxcbiAgICAgIFwiZGVzdHJveS1vbi1jbG9zZVwiOiBcIlwiLFxuICAgICAgXCJjbG9zZS1vbi1jbGljay1tb2RhbFwiOiAhMSxcbiAgICAgIFwiYXBwZW5kLXRvLWJvZHlcIjogXCJcIixcbiAgICAgIHdpZHRoOiBcIjk4MHB4XCJcbiAgICB9LCB7XG4gICAgICBmb290ZXI6IHJlKCgpID0+IFtcbiAgICAgICAgaGUoXCJkaXZcIiwgbnVsbCwgW1xuICAgICAgICAgIHVlKGQsIHtcbiAgICAgICAgICAgIHNpemU6IFwiZGVmYXVsdFwiLFxuICAgICAgICAgICAgb25DbGljazogZls1XSB8fCAoZls1XSA9IChtKSA9PiByLnZpc2libGUgPSAhMSlcbiAgICAgICAgICB9LCB7XG4gICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICRlKEllKHIudChcInByb3BzLmNhbmNlbFwiKSksIDEpXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIF86IDFcbiAgICAgICAgICB9KSxcbiAgICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgICB0eXBlOiBcInByaW1hcnlcIixcbiAgICAgICAgICAgIHNpemU6IFwiZGVmYXVsdFwiLFxuICAgICAgICAgICAgb25DbGljazogci5zYXZlLFxuICAgICAgICAgICAgY29sb3I6IFwiIzJmNzNmZlwiXG4gICAgICAgICAgfSwge1xuICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAkZShJZShyLnQoXCJwcm9wcy5va1wiKSksIDEpXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIF86IDFcbiAgICAgICAgICB9LCA4LCBbXCJvbkNsaWNrXCJdKVxuICAgICAgICBdKVxuICAgICAgXSksXG4gICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgIHVlKEQsIHtcbiAgICAgICAgICBjbGFzczogXCJfZmQtZ2ZjLWNvblwiLFxuICAgICAgICAgIHN0eWxlOiB7IGhlaWdodDogXCI0NTBweFwiIH1cbiAgICAgICAgfSwge1xuICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgIHVlKFMsIHtcbiAgICAgICAgICAgICAgXCJtb2RlbC12YWx1ZVwiOiBcImZpcnN0XCIsXG4gICAgICAgICAgICAgIGNsYXNzOiBcIl9mYy10YWJzXCIsXG4gICAgICAgICAgICAgIHN0eWxlOiB7IHdpZHRoOiBcIjEwMCVcIiB9XG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICB1ZSh2LCB7XG4gICAgICAgICAgICAgICAgICBsYWJlbDogci50KFwiZmV0Y2guY29uZmlnXCIpLFxuICAgICAgICAgICAgICAgICAgbmFtZTogXCJmaXJzdFwiXG4gICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICB1ZShwLCB7XG4gICAgICAgICAgICAgICAgICAgICAgYXBpOiByLmZvcm0uYXBpLFxuICAgICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6YXBpXCI6IGZbMV0gfHwgKGZbMV0gPSAobSkgPT4gci5mb3JtLmFwaSA9IG0pLFxuICAgICAgICAgICAgICAgICAgICAgIG1vZGVsVmFsdWU6IHIuZm9ybS5mb3JtRGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogZlsyXSB8fCAoZlsyXSA9IChtKSA9PiByLmZvcm0uZm9ybURhdGEgPSBtKSxcbiAgICAgICAgICAgICAgICAgICAgICBydWxlOiByLmZvcm0ucnVsZSxcbiAgICAgICAgICAgICAgICAgICAgICBvcHRpb246IHIuZm9ybS5vcHRpb25zXG4gICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcImFwaVwiLCBcIm1vZGVsVmFsdWVcIiwgXCJydWxlXCIsIFwib3B0aW9uXCJdKVxuICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgfSwgOCwgW1wibGFiZWxcIl0pLFxuICAgICAgICAgICAgICAgIHVlKHYsIHtcbiAgICAgICAgICAgICAgICAgIGxhenk6IFwiXCIsXG4gICAgICAgICAgICAgICAgICBsYWJlbDogci50KFwiZmV0Y2gucGFyc2VcIiksXG4gICAgICAgICAgICAgICAgICBuYW1lOiBcInNlY29uZFwiXG4gICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICB1ZShiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgc3R5bGU6IHsgaGVpZ2h0OiBcIjQxNXB4XCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICBtb2RlbFZhbHVlOiByLmZvcm0ucGFyc2UsXG4gICAgICAgICAgICAgICAgICAgICAgXCJvblVwZGF0ZTptb2RlbFZhbHVlXCI6IGZbM10gfHwgKGZbM10gPSAobSkgPT4gci5mb3JtLnBhcnNlID0gbSksXG4gICAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJwYXJzZVwiLFxuICAgICAgICAgICAgICAgICAgICAgIGFyZ3M6IFt7IG5hbWU6IFwicmVzXCIsIGluZm86IHIudChcImZldGNoLnJlc3BvbnNlXCIpIH1dLFxuICAgICAgICAgICAgICAgICAgICAgIHJlZjogXCJwYXJzZVwiXG4gICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcIm1vZGVsVmFsdWVcIiwgXCJhcmdzXCJdKVxuICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgfSwgOCwgW1wibGFiZWxcIl0pLFxuICAgICAgICAgICAgICAgIHVlKHYsIHtcbiAgICAgICAgICAgICAgICAgIGxhenk6IFwiXCIsXG4gICAgICAgICAgICAgICAgICBsYWJlbDogci50KFwiZmV0Y2gub25FcnJvclwiKSxcbiAgICAgICAgICAgICAgICAgIG5hbWU6IFwidGhpcmRcIlxuICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgdWUoYiwge1xuICAgICAgICAgICAgICAgICAgICAgIHN0eWxlOiB7IGhlaWdodDogXCI0MTVweFwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgbW9kZWxWYWx1ZTogci5mb3JtLm9uRXJyb3IsXG4gICAgICAgICAgICAgICAgICAgICAgXCJvblVwZG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bkb3duOiByZSgoKSA9PiBbXG4gICAgICAgICAgdWUodiwgbnVsbCwge1xuICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAoZmUoITApLCB4ZShodCwgbnVsbCwgaG4oci51bml0LCAoUywgRCkgPT4gKGZlKCksIEtlKHAsIHtcbiAgICAgICAgICAgICAgICBrZXk6IFMsXG4gICAgICAgICAgICAgICAgb25DbGljazogKFQpID0+IHIuY2hhbmdlVHlwZShEKVxuICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwgbnVsbCwgSWUoUyksIDEpXG4gICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgXzogMlxuICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJvbkNsaWNrXCJdKSkpLCAxMjgpKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfOiAxXG4gICAgICAgICAgfSlcbiAgICAgICAgXSksXG4gICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICB1ZShkLCB7IHNpemU6IHIuc2l6ZSB9LCB7XG4gICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICRlKEllKHIudW5pdFtyLmlkeF0pLCAxKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfOiAxXG4gICAgICAgICAgfSwgOCwgW1wic2l6ZVwiXSlcbiAgICAgICAgXSksXG4gICAgICAgIF86IDFcbiAgICAgIH0pXG4gICAgXSwgNjQpKVxuICBdKTtcbn1cbmNvbnN0IFUwID0gLyogQF9fUFVSRV9fICovIE10KCQwLCBbW1wicmVuZGVyXCIsIGowXV0pO1xuY29uc3QgejAgPSB3dCh7XG4gIG5hbWU6IFwiRmllbGRJbnB1dFwiLFxuICBpbmplY3Q6IFtcImRlc2lnbmVyXCJdLFxuICBlbWl0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GFsXCI6ICExLFxuICAgICAgXCJhcHBlbmQtdG8tYm9keVwiOiBcIlwiLFxuICAgICAgd2lkdGg6IFwiOTgwcHhcIlxuICAgIH0sIHtcbiAgICAgIGZvb3RlcjogcmUoKCkgPT4gW1xuICAgICAgICBoZShcImRpdlwiLCBudWxsLCBbXG4gICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgc2l6ZTogXCJkZWZhdWx0XCIsXG4gICAgICAgICAgICBvbkNsaWNrOiBmWzNdIHx8IChmWzNdID0gKHcpID0+IHIudmlzaWJsZSA9ICExKVxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMuY2FuY2VsXCIpKSwgMSlcbiAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgXzogMVxuICAgICAgICAgIH0pLFxuICAgICAgICAgIHVlKGQsIHtcbiAgICAgICAgICAgIHR5cGU6IFwicHJpbWFyeVwiLFxuICAgICAgICAgICAgc2l6ZTogXCJkZWZhdWx0XCIsXG4gICAgICAgICAgICBvbkNsaWNrOiByLnN1Ym1pdCxcbiAgICAgICAgICAgIGNvbG9yOiBcIiMyZjczZmZcIlxuICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMub2tcIikpLCAxKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfOiAxXG4gICAgICAgICAgfSwgOCwgW1wib25DbGlja1wiXSlcbiAgICAgICAgXSlcbiAgICAgIF0pLFxuICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICB1ZShULCB7XG4gICAgICAgICAgY2xhc3M6IFwiX2ZkLWZuLWxpc3QtY29uXCIsXG4gICAgICAgICAgc3R5bGU6IHsgaGVpZ2h0OiBcIjYwMHB4XCIgfVxuICAgICAgICB9LCB7XG4gICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgdWUobSwgeyBzdHlsZTogeyB3aWR0aDogXCIzMDBweFwiIH0gfSwge1xuICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgdWUoVCwgeyBjbGFzczogXCJfZmQtZm4tbGlzdC1sXCIgfSwge1xuICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICB1ZSh2LCB7XG4gICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZkLWZuLWxpc3QtaGVhZFwiLFxuICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogXCI0MHB4XCJcbiAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVlKHAsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJwcmltYXJ5XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IFwiZGVmYXVsdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJldmVudC5saXN0XCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgdWUoRCwgbnVsbCwge1xuICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVlKFMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkZWZhdWx0LWFjdGl2ZVwiOiByLmRlZkFjdGl2ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWxWYWx1ZTogci5hY3RpdmVEYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogZlsxXSB8fCAoZlsxXSA9ICh3KSA9PiByLmFjdGl2ZURhdGEgPSB3KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZlKCEwKSwgeGUoaHQsIG51bGwsIGhuKHIuZXZlbnQsICh3LCBBKSA9PiAoZmUoKSwgS2UoYiwgeyBpbmRleDogQSB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtZm4tbGlzdC1tZXRob2RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBIbigoRSkgPT4gci5lZGl0KHcpLCBbXCJzdG9wXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGUoXCJzcGFuXCIsIG51bGwsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKFwiZnVuY3Rpb25cIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZShcInNwYW5cIiwgbnVsbCwgSWUoQSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgOCwgSjApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJpbmRleFwiXSkpKSwgMjU2KSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIDgsIFtcImRlZmF1bHQtYWN0aXZlXCIsIFwibW9kZWxWYWx1ZVwiXSlcbiAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB1ZShELCBudWxsLCB7XG4gICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICB1ZShULCB7IGNsYXNzOiBcIl9mZC1mbi1saXN0LXJcIiB9LCB7XG4gICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgIHIuYWN0aXZlRGF0YSA/IChmZSgpLCBLZSh2LCB7XG4gICAgICAgICAgICAgICAgICAgICAga2V5OiAwLFxuICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mZC1mbi1saXN0LWhlYWRcIixcbiAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFwiNDBweFwiXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IFwic21hbGxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogci5jbG9zZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMuY2FuY2VsXCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIDgsIFtcIm9uQ2xpY2tcIl0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgdWUoZCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcInNtYWxsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwicHJpbWFyeVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiByLnNhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiBcIiMyZjczZmZcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwicHJvcHMuc2F2ZVwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAxXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCA4LCBbXCJvbkNsaWNrXCJdKVxuICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApLFxuICAgICAgICAgICAgICAgICAgICByLmFjdGl2ZURhdGEgPyAoZmUoKSwgS2UoRCwgeyBrZXk6IDEgfSwge1xuICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVlKHgsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmOiBcImZuXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsVmFsdWU6IHIuZXZlbnRTdHIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiOiBmWzJdIHx8IChmWzJdID0gKHcpID0+IHIuZXZlbnRTdHIgPSB3KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogci5hY3RpdmVEYXRhLml0ZW0ubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnczogci5hY3RpdmVEYXRhLml0ZW0uYXJnc1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgbnVsbCwgOCwgW1wibW9kZWxWYWx1ZVwiLCBcIm5hbWVcIiwgXCJhcmdzXCJdKVxuICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICAgICAgfSkpIDogamUoXCJcIiwgITApXG4gICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgIF86IDFcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgXzogMVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICBdKSxcbiAgICAgICAgICBfOiAxXG4gICAgICAgIH0pXG4gICAgICBdKSxcbiAgICAgIF86IDFcbiAgICB9LCA4LCBbXCJ0aXRsZVwiLCBcIm1vZGVsVmFsdWVcIl0pXG4gIF0pO1xufVxuY29uc3QgcTAgPSAvKiBAX19QVVJFX18gKi8gTXQoS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lO1xuICAgICAgfSxcbiAgICAgIGltbWVkaWF0ZTogITBcbiAgICB9XG4gIH0sXG4gIGRhdGEoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHVuaXF1ZToge30sXG4gICAgICBzdHlsZToge30sXG4gICAgICBkcmFnUHJvcDoge1xuICAgICAgICBydWxlOiB7XG4gICAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICAgIHRhZzogXCJlbC1jb2xcIixcbiAgICAgICAgICAgIGdyb3VwOiBcImRlZmF1bHRcIixcbiAgICAgICAgICAgIGdob3N0Q2xhc3M6IFwiZ2hvc3RcIixcbiAgICAgICAgICAgIGFuaW1hdGlvbjogMTUwLFxuICAgICAgICAgICAgaGFuZGxlOiBcIi5fZmQtZHJhZy1idG5cIixcbiAgICAgICAgICAgIGVtcHR5SW5zZXJ0VGhyZXNob2xkOiAwLFxuICAgICAgICAgICAgZGlyZWN0aW9uOiBcInZlcnRpY2FsXCIsXG4gICAgICAgICAgICBpdGVtS2V5OiBcInR5cGVcIlxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgdGFnOiBcInRhYmxlQ2VsbFwiXG4gICAgICB9LFxuICAgICAgbGF0dGljZToge30sXG4gICAgICB1bmk6IHt9XG4gICAgfTtcbiAgfSxcbiAgY29tcHV0ZWQ6IHtcbiAgICB0KCkge1xuICAgICAgcmV0dXJuIHRoaXMuZGVzaWduZXIuc2V0dXBTdGF0ZS50O1xuICAgIH0sXG4gICAgdGFibGVDb2xvcigpIHtcbiAgICAgIGNvbnN0IHIgPSB7fTtcbiAgICAgIHJldHVybiB0aGlzLmJvcmRlciA9PT0gITEgPyByLmJvcmRlciA9IFwiMCBub25lXCIgOiAodGhpcy5ib3JkZXJDb2xvciAmJiAoci5ib3JkZXJDb2xvciA9IHRoaXMuYm9yZGVyQ29sb3IpLCB0aGlzLmJvcmRlcldpZHRoICYmIChyLmJvcmRlcldpZHRoID0gdGhpcy5ib3JkZXJXaWR0aCkpLCByO1xuICA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SB7XG4gICAgICB0aGlzLnJ1bGUucm93LS07XG4gICAgICBjb25zdCBmID0ge30sIG8gPSBbXTtcbiAgICAgIGZvciAobGV0IHMgPSByLnBpZDsgcyA8IHRoaXMucnVsZS5yb3cgKyAxOyBzKyspXG4gICAgICAgIGZvciAobGV0IGQgPSAwOyBkIDwgdGhpcy5ydWxlLmNvbDsgZCsrKVxuICAgICAgICAgIHMgPT09IHIucGlkID8gby5wdXNoKGAke3IucGlkfToke2R9YCkgOiBmW2Ake3N9OiR7ZH1gXSA9IGAke3MgLSAxfToke2R9YDtcbiAgICAgIGxldCBpID0gMDtcbiAgICAgIGNvbnN0IHQgPSB0aGlzLnJ1bGUubGF5b3V0O1xuICAgICAgWy4uLnRdLmZvckVhY2goKHMsIGQpID0+IHtcbiAgICAgICAgcy50b3AgPT09IHIucGlkICYmICh0LnNwbGljZShkIC0gaSwgMSksIGkrKyk7XG4gICAgICB9KSwgdC5mb3JFYWNoKChzKSA9PiB7XG4gICAgICAgIHMudG9wID4gci5waWQgJiYgcy50b3AtLTtcbiAgICAgIH0pLCB0aGlzLnJtU2xvdChmLCBvKTtcbiAgICB9LFxuICAgIHJtQ29sKHIpIHtcbiAgICAgIHRoaXMucnVsZS5jb2wtLTtcbiAgICAgIGNvbnN0IGYgPSB7fSwgbyA9IFtdO1xuICAgICAgZm9yIChsZXQgcyA9IDA7IHMgPCB0aGlzLnJ1bGUucm93OyBzKyspIHtcbiAgICAgICAgZm9yIChsZXQgZCA9IHIuaWR4ICsgMTsgZCA8IHRoaXMucnVsZS5jb2wgKyAxOyBkKyspXG4gICAgICAgICAgZltgJHtzfToke2R9YF0gPSBgJHtzfToke2QgLSAxfWA7XG4gICAgICAgIG8ucHVzaChgJHtzfToke3IuaWR4fWApO1xuICAgICAgfVxuICAgICAgbGV0IGkgPSAwO1xuICAgICAgY29uc3QgdCA9IHRoaXMucnVsZS5sYXlvdXQ7XG4gICAgICBbLi4udF0uZm9yRWFjaCgocywgZCkgPT4ge1xuICAgICAgICBzLmxlZnQgPT09IHIuaWR4ICYmICh0LnNwbGljZShkIC0gaSwgMSksIGkrKyk7XG4gICAgICB9KSwgdC5mb3JFYWNoKChzKSA9PiB7XG4gICAgICAgIHMubGVmdCA+IHIuaWR4ICYmIHMubGVmdC0tO1xuICAgICAgfSksIHRoaXMucm1TbG90KGYsIG8pO1xuICAgIH0sXG4gICAgc3BsaXRSb3cocikge1xuICAgICAgY29uc3QgZiA9IHIuZGF0YS5sYXlvdXQsIG8gPSBmLnJvdztcbiAgICAgIGlmIChmLnJvdyA9IDAsIG8gPiAxKVxuICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IG87IGkrKylcbiAgICAgICAgICB0aGlzLnJ1bGUubGF5b3V0LnB1c2goe1xuICAgICAgICAgICAgLi4uZixcbiAgICAgICAgICAgIHRvcDogZi50b3AgKyBpXG4gICAgICAgICAgfSk7XG4gICAgICB0aGlzLmxvYWRSdWxlKCk7XG4gICAgfSxcbiAgICBzcGxpdENvbChyKSB7XG4gICAgICBjb25zdCBmID0gci5kYXRhLmxheW91dCwgbyA9IGYuY29sO1xuICAgICAgaWYgKGYuY29sID0gMCwgbyA+IDEpXG4gICAgICAgIGZvciAobGV0IGkgPSAxOyBpIDwgbzsgaSsrKVxuICAgICAgICAgIHRoaXMucnVsZS5sYXlvdXQucHVzaCh7XG4gICAgICAgICAgICAuLi5mLFxuICAgICAgICAgICAgbGVmdDogZi5sZWZ0ICsgaVxuICAgICAgICAgIH0pO1xuICAgICAgdGhpcy5sb2FkUnVsZSgpO1xuICAgIH0sXG4gICAgbWFrZU1hcChyKSB7XG4gICAgICBsZXQgZiA9IFtdO1xuICAgICAgZm9yIChsZXQgbyA9IHIudG9wOyBvIDwgKHIucm93IHx8IHIudG9wICsgMSk7IG8rKylcbiAgICAgICAgZm9yIChsZXQgaSA9IHIubGVmdDsgaSA8IChyLmNvbCB8fCByLmxlZnQgKyAxKTsgaSsrKVxuICAgICAgICAgIGYucHVzaChgJHtvfToke2l9YCk7XG4gICAgICByZXR1cm4gZjtcbiAgICB9LFxuICAgIG1lcmdlUmlnaHQocikge1xuICAgICAgbGV0IGY7XG4gICAgICBpZiAoci5kYXRhLmxheW91dCkge1xuICAgICAgICBjb25zdCBpID0gKHIuZGF0YS5sYXlvdXQuY29sIHx8IDEpICsgMTtcbiAgICAgICAgci5kYXRhLmxheW91dC5jb2wgPSBpICsgci5pZHggPiB0aGlzLnJ1bGUuY29sID8gdGhpcy5ydWxlLmNvbCAtIHIuaWR4IDogaSwgZiA9IHIuZGF0YS5sYXlvdXQ7XG4gICAgICB9IGVsc2VcbiAgICAgICAgZiA9IHtcbiAgICAgICAgICB0b3A6IHIucGlkLFxuICAgICAgICAgIGxlZnQ6IHIuaWR4LFxuICAgICAgICAgIGNvbDogMlxuICAgICAgICB9LCB0aGlzLnJ1bGUubGF5b3V0LnB1c2goZik7XG4gICAgICBjb25zdCBvID0gdGhpcy5tYWtlTWFwKGYpO1xuICAgICAgdGhpcy5mb3JtQ3JlYXRlSW5qZWN0LmNoaWxkcmVuLmZvckVhY2goKGkpID0+IHtcbiAgICAgICAgIWkuc2xvdCB8fCBvLmluZGV4T2YoaS5zbG90KSA+IC0xICYmIChpLnNsb3QgPSBgJHtyLnBpZH06JHtyLmlkeH1gKTtcbiAgICAgIH0pLCB0aGlzLmxvYWRSdWxlKCk7XG4gICAgfSxcbiAgICBtZXJnZUJvdHRvbShyKSB7XG4gICAgICBsZXQgZjtcbiAgICAgIGlmIChyLmRhdGEubGF5b3V0KSB7XG4gICAgICAgIGNvbnN0IGkgPSAoci5kYXRhLmxheW91dC5yb3cgfHwgMSkgKyAxO1xuICAgICAgICByLmRhdGEubGF5b3V0LnJvdyA9IGkgKyBpLnBpZCA+IHRoaXMucnVsZS5jb2wgPyB0aGlzLnJ1bGUuY29sIC0gci5waWQgOiBpLCBmID0gci5kYXRhLmxheW91dDtcbiAgICAgIH0gZWxzZVxuICAgICAgICBmID0ge1xuICAgICAgICAgIHRvcDogci5waW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Yucm93ID8gZi5yb3cgLSBpLnRvcCA6IGkucm93LCBzLnJvd3NwYW4gPSBjKSwgYyAmJiBkKVxuICAgICAgICAgIGZvciAobGV0IHAgPSAwOyBwIDwgYzsgcCsrKSB7XG4gICAgICAgICAgICBjb25zdCB2ID0gcltpLnRvcCArIHBdO1xuICAgICAgICAgICAgaWYgKHYpXG4gICAgICAgICAgICAgIGZvciAobGV0IGIgPSAwOyBiIDwgZDsgYisrKVxuICAgICAgICAgICAgICAgICFiICYmICFwIHx8ICh2W2kubGVmdCArIGJdICYmICh2W2kubGVmdCArIGJdLnNob3cgPSAhMSksIHMuc2xvdC5wdXNoKGAke2kudG9wICsgcH06JHtpLmxlZnQgKyBifWApKTtcbiAgICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGNvbnN0IG8gPSAoaSkgPT4gISEoIWkgfHwgaS5sYXlvdXQgfHwgIWkuc2hvdyk7XG4gICAgICByLmZvckVhY2goKGksIHQpID0+IHtcbiAgICAgICAgaS5mb3JFYWNoKChzLCBkKSA9PiB7XG4gICAgICAgICAgbGV0IGMgPSAhMSwgcCA9ICExO1xuICAgICAgICAgIGlmIChzLmxheW91dCkge1xuICAgICAgICAgICAgY29uc3QgdiA9IHMubGF5b3V0LmNvbCB8fCAxLCBiID0gcy5sYXlvdXQucm93IHx8IDE7XG4gICAgICAgICAgICBmb3IgKGxldCBTID0gMDsgUyA8IHY7IFMrKylcbiAgICAgICAgICAgICAgaWYgKCFyW3QgKyBiXSB8fCBvKHJbdCArIGJdW2QgKyBTXSkpIHtcbiAgICAgICAgICAgICAgICBwID0gITA7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAobGV0IFMgPSAwOyBTIDwgYjsgUysrKVxuICAgICAgICAgICAgICBpZiAoIXJbdCArIFNdIHx8IG8oclt0ICsgU11bZCArIHZdKSkge1xuICAgICAgICAgICAgICAgIGMgPSAhMDtcbiAgICAgICAgICAgICAgIC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xuICAgICAgICAgIH0pLCBbXG4gICAgICAgICAgICBoZShcImRpdlwiLCB0QSwgW1xuICAgICAgICAgICAgICB1ZShiLCB7XG4gICAgICAgICAgICAgICAgXCJkcmFnLWJ0blwiOiAhMSxcbiAgICAgICAgICAgICAgICBcImhhbmRsZS1idG5cIjogITAsXG4gICAgICAgICAgICAgICAgb25BY3RpdmU6ICh4KSA9PiByLmFjdGl2ZSh7IHBpZDogRCwgaWR4OiBtIH0pLFxuICAgICAgICAgICAgICAgIHVuaXF1ZTogci5sYXR0aWNlW0RdW21dLmlkXG4gICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBoYW5kbGU6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgIGhlKFwiZGl2XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiX2ZkLWRyYWctYnRuIF9mZC10YWJsZS12aWV3LWJ0blwiLFxuICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAoeCkgPT4gci5hZGRSb3coeyBwaWQ6IEQsIGlkeDogbSwgZGF0YTogci5sYXR0aWNlW0RdW21dIH0sIDApXG4gICAgICAgICAgICAgICAgICB9LCBpQSwgOCwgbkEpLFxuICAgICAgICAgICAgICAgICAgaGUoXCJkaXZcIiwge1xuICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJfZmQtZHJhZy1idG4gX2ZkLXRhYmxlLXZpZXctYnRuXCIsXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6ICh4KSA9PiByLmFkZENvbCh7IHBpZDogRCwgaWR4OiBtLCBkYXRhOiByLmxhdHRpY2VbRF1bbV0gfSwgMClcbiAgICAgICAgICAgICAgICAgIH0sIGxBLCA4LCBvQSksXG4gICAgICAgICAgICAgICAgICBoZShcImRpdlwiLCBzQSwgW1xuICAgICAgICAgICAgICAgICAgICB1ZSh2LCB7XG4gICAgICAgICAgICAgICAgICAgICAgdHJpZ2dlcjogXCJjbGlja1wiLFxuICAgICAgICAgICAgICAgICAgICAgIG9uQ29tbWFuZDogci5jb21tYW5kXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICBkcm9wZG93bjogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgdWUocCwgbnVsbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdWUoYywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogW1wiYWRkQ29sXCIsIFt7IHBpZDogRCwgaWR4OiBtLCBkYXRhOiByLmxhdHRpY2VbRF1bbV0gfSwgMV1dXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJ0YWJsZU9wdGlvbnMuYWRkTGVmdFwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJjb21tYW5kXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShjLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBbXCJhZGRDb2xcIiwgW3sgcGlkOiBELCBpZHg6IG0sIGRhdGE6IHIubGF0dGljZVtEXVttXSB9LCAwXV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInRhYmxlT3B0aW9ucy5hZGRSaWdodFwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJjb21tYW5kXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShjLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBbXCJhZGRSb3dcIiwgW3sgcGlkOiBELCBpZHg6IG0sIGRhdGE6IHIubGF0dGljZVtEXVttXSB9LCAxXV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInRhYmxlT3B0aW9ucy5hZGRUb3BcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wiY29tbWFuZFwiXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdWUoYywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogW1wiYWRkUm93XCIsIFt7IHBpZDogRCwgaWR4OiBtLCBkYXRhOiByLmxhdHRpY2VbRF1bbV0gfSwgMF1dXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJ0YWJsZU9wdGlvbnMuYWRkQm90dG9tXCIpKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDEwMzIsIFtcImNvbW1hbmRcIl0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVlKGMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpdmlkZWQ6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZDogci5sYXR0aWNlW0RdW21dLnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogW1wibWVyZ2VSaWdodFwiLCBbeyBwaWQ6IEQsIGlkeDogbSwgZGF0YTogci5sYXR0aWNlW0RdW21dIH1dXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGUoSWUoci50KFwidGFibGVPcHRpb25zLm1lcmdlUmlnaHRcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wiZGlzYWJsZWRcIiwgXCJjb21tYW5kXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShjLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZDogci5sYXR0aWNlW0RdW21dLmJvdHRvbSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IFtcIm1lcmdlQm90dG9tXCIsIFt7IHBpZDogRCwgaWR4OiBtLCBkYXRhOiByLmxhdHRpY2VbRF1bbV0gfV1dXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJ0YWJsZU9wdGlvbnMubWVyZ2VCb3R0b21cIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wiZGlzYWJsZWRcIiwgXCJjb21tYW5kXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShjLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXZpZGVkOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6ICEoci5sYXR0aWNlW0RdW21dLmxheW91dCAmJiByLmxhdHRpY2VbRF1bbV0ubGF5b3V0LmNvbCA+IDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogW1wic3BsaXRDb2xcIiwgW3sgcGlkOiBELCBpZHg6IG0sIGRhdGE6IHIubGF0dGljZVtEXVttXSB9XV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInRhYmxlT3B0aW9ucy5zcGxpdENvbFwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJkaXNhYmxlZFwiLCBcImNvbW1hbmRcIl0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVlKGMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkOiAhKHIubGF0dGljZVtEXVttXS5sYXlvdXQgJiYgci5sYXR0aWNlW0RdW21dLmxheW91dC5yb3cgPiAxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IFtcInNwbGl0Um93XCIsIFt7IHBpZDogRCwgaWR4OiBtLCBkYXRhOiByLmxhdHRpY2VbRF1bbV0gfV1dXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJ0YWJsZU9wdGlvbnMuc3BsaXRSb3dcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wiZGlzYWJsZWRcIiwgXCJjb21tYW5kXCJdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZShjLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXZpZGVkOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6IHIucnVsZS5jb2wgPCAyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogW1wicm1Db2xcIiwgW3sgcGlkOiBELCBpZHg6IG0sIGRhdGE6IHIubGF0dGljZVtEXVttXSB9XV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlKEllKHIudChcInRhYmxlT3B0aW9ucy5ybUNvbFwiKSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxMDMyLCBbXCJkaXNhYmxlZFwiLCBcImNvbW1hbmRcIl0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVlKGMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkOiByLnJ1bGUucm93IDwgMixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IFtcInJtUm93XCIsIFt7IHBpZDogRCwgaWR4OiBtLCBkYXRhOiByLmxhdHRpY2VbRF1bbV0gfV1dXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZShJZShyLnQoXCJ0YWJsZU9wdGlvbnMucm1Sb3dcIikpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wiZGlzYWJsZWRcIiwgXCJjb21tYW5kXCJdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXzogMlxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgMTAyNClcbiAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICB1QVxuICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIF86IDJcbiAgICAgICAgICAgICAgICAgICAgfSwgMTAzMiwgW1wib25Db21tYW5kXCJdKVxuICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgICAgICAgICB1ZShkLCBFbyh7IHJlZl9mb3I6ICEwIH0sIHIuZHJhZ1Byb3AsIHtcbiAgICAgICAgICAgICAgICAgICAgb25BZGQ6ICh4KSA9PiByLmRyYWdBZGQoeCwgeyBwaWQ6IEQsIGlkeDogbSB9KSxcbiAgICAgICAgICAgICAgICAgICAgcmVmX2ZvcjogITAsXG4gICAgICAgICAgICAgICAgICAgIHJlZjogXCJkcmFnXCIgKyBEICsgbSxcbiAgICAgICAgICAgICAgICAgICAgb25FbmQ6ICh4KSA9PiByLmRyYWdFbmQoeCwgeyBwaWQ6IEQsIGlkeDogbSB9KSxcbiAgICAgICAgICAgICAgICAgICAgb25TdGFydDogZlswXSB8fCAoZlswXSA9ICh4KSA9PiByLmRyYWdTdGFydCh4KSksXG4gICAgICAgICAgICAgICAgICAgIG9uVW5jaG9vc2U6IGZbMV0gfHwgKGZbMV0gPSAoeCkgPT4gci5kcmFnVW5jaG9vc2UoeCkpLFxuICAgICAgICAgICAgICAgICAgICBsaXN0OiByLmdldFNsb3RDaGlsZHJlbihbYCR7RH06JHttfWAsIC4uLnIubGF0dGljZVtEXVttXS5zbG90XSlcbiAgICAgICAgICAgICAgICAgIH0pLCB7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgICAgICAgICBzcihyLiRzbG90cywgYCR7RH06JHttfWApXG4gICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgICAgICB9LCAxMDQwLCBbXCJvbkFkZFwiLCBcIm9uRW5kXCIsIFwibGlzdFwiXSlcbiAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICBfOiAyXG4gICAgICAgICAgICAgIH0sIDEwMzIsIFtcIm9uQWN0aXZlXCIsIFwidW5pcXVlXCJdKVxuICAgICAgICAgICAgXSlcbiAgICAgICAgICBdLCAxNikpIDogamUoXCJcIiwgITApX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IHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBzID0gcltpLnRvcF1baS5sZWZ0XTtcbiAgICAgICAgcy5sYXlvdXQgPSBpO1xuICAgICAgICBsZXQgZCA9IDEsIGMgPSAxO1xuICAgICAgICBpZiAoaS5jb2wgJiYgKGQgPSBpLmNvbCArIGkubGVmdCA+IGYuY29sID8gZi5jb2wgLSBpLmxlZnQgOiBpLmNvbCwgcy5jb2xzcGFuID0gZCksIGkucm93ICYmIChjID0gaS5yb3cgKyBpLnRvcCA+IGYucm93ID8gZi5yb3cgLSBpLnRvcCA6IGkucm93LCBzLnJvd3NwYW4gPSBjKSwgYyAmJiBkKVxuICAgICAgICAgIGZvciAobGV0IHAgPSAwOyBwIDwgYzsgcCsrKSB7XG4gICAgICAgICAgICBjb25zdCB2ID0gcltpLnRvcCArIHBdO1xuICAgICAgICAgICAgaWYgKHYpXG4gICAgICAgICAgICAgIGZvciAobGV0IGIgPSAwOyBiIDwgZDsgYisrKVxuICAgICAgICAgICAgICAgICFiICYmICFwIHx8ICh2W2kubGVmdCArIGJdICYmICh2W2kubGVmdCArIGJdLnNob3cgPSAhMSksIHMuc2xvdC5wdXNoKGAke2kudG9wICsgcH06JHtpLmxlZnQgKyBifWApKTtcbiAgICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGNvbnN0IG8gPSAoaSkgPT4gISEoIWkgfHwgaS5sYXlvdXQgfHwgIWkuc2hvdyk7XG4gICAgICByLmZvckVhY2goKGksIHQpID0+IHtcbiAgICAgICAgaS5mb3JFYWNoKChzLCBkKSA9PiB7XG4gICAgICAgICAgbGV0IGMgPSAhMSwgcCA9ICExO1xuICAgICAgICAgIGlmIChzLmxheW91dCkge1xuICAgICAgICAgICAgY29uc3QgdiA9IHMubGF5b3V0LmNvbCB8fCAxLCBiID0gcy5sYXlvdXQucm93IHx8IDE7XG4gICAgICAgICAgICBmb3IgKGxldCBTID0gMDsgUyA8IHY7IFMrKylcbiAgICAgICAgICAgICAgaWYgKCFyW3QgKyBiXSB8fCBvKHJbdCArIGJdW2QgKyBTXSkpIHtcbiAgICAgICAgICAgICAgICBwID0gITA7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAobGV0IFMgPSAwOyBTIDwgYjsgUysrKVxuICAgICAgICAgICAgICBpZiAoIXJbdCArIFNdIHx8IG8oclt0ICsgU11bZCArIHZdKSkge1xuICAgICAgICAgICAgICAgIGMgPSAhMDtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgYyA9IG8oaVtkICsgMV0pLCBwID0gclt0ICsgMV0gPyBvKHJbdCArIDFdW2RdKSA6ICEwO1xuICAgICAgICAgIHMucmlnaHQgPSBjLCBzLmJvdHRvbSA9IHA7XG4gICAgICAgIH0pO1xuICAgICAgfSksIHRoaXMubGF0dGljZSA9IHI7XG4gICAgfVxuICB9XG59LCBwQSA9IHsgY2xhc3M6IFwiX2ZjLXRhYmxlXCIgfTtcbmZ1bmN0aW9uIGhBKHIsIGYsIG8sIGksIHQsIHMpIHtcbiAgY29uc3QgZCA9IGJlKFwiZWwtY29sXCIpO1xuICByZXR1cm4gZmUoKSwgS2UoZCwgeyBzcGFuOiAyNCB9LCB7XG4gICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgaGUoXCJkaXZcIiwgcEEsIFtcbiAgICAgICAgaGUoXCJ0YWJsZVwiLCB7XG4gICAgICAgICAgYm9yZGVyOiBcIjFcIixcbiAgICAgICAgICBjZWxsc3BhY2luZzogXCIwXCIsXG4gICAgICAgICAgY2VsbHBhZGRpbmc6IFwiMFwiLFxuICAgICAgICAgIHN0eWxlOiBDbyhzLnRhYmxlQ29sb3IpXG4gICAgICAgIH0sIFtcbiAgICAgICAgICAoZmUoITApLCB4ZShodCwgbnVsbCwgaG4oby5ydWxlLnJvdywgKGMsIHApID0+IChmZSgpLCB4ZShcInRyXCIsIHsga2V5OiBwIH0sIFtcbiAgICAgICAgICAgIChmZSghMCksIHhlKGh0LCBudWxsLCBobihvLnJ1bGUuY29sLCAodiwgYikgPT4gKGZlKCksIHhlKGh0LCB7XG4gICAgICAgICAgICAgIGtleTogYCR7cH0ke2J9YFxuICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICB0LmxhdHRpY2VbcF1bYl0uc2hvdyA/IChmZSgpLCB4ZShcInRkXCIsIEVvKHtcbiAgICAgICAgICAgICAgICBrZXk6IDAsXG4gICAgICAgICAgICAgICAgcmVmX2ZvcjogITBcbiAgICAgICAgICAgICAgfSwgdC5sYXR0aWNlW3BdW2JdID8geyBjb2xzcGFuOiB0LmxhdHRpY2VbcF1bYl0uY29sc3Bhbiwgcm93c3BhbjogdC5sYXR0aWNlW3BdW2JdLnJvd3NwYW4gfSA6IHt9LCB7XG4gICAgICAgICAgICAgICAgdmFsaWduOiBcInRvcFwiLFxuICAgICAgICAgICAgICAgIGNsYXNzOiB0LnRkQ2xhc3MgJiYgdC50ZENsYXNzW2Ake3B9OiR7Yn1gXSB8fCBcIlwiLFxuICAgICAgICAgICAgICAgIHN0eWxlOiBbcy50YWJsZUNvbG9yLCB0LnRkU3R5bGUgJiYgdC50ZFN0eWxlW2Ake3B9OiR7Yn1gXSB8fCB7fV1cbiAgICAgICAgICAgICAgfSksIFtcbiAgICAgICAgICAgICAgICBzcihyLiRzbG90cywgYCR7cH06JHtifWApLFxuICAgICAgICAgICAgICAgIChmZSghMCksIHhlKGh0LCBudWxsLCBobih0LmxhdHRpY2VbcF1bYl0uc2xvdCwgKFMpID0+IHNyKHIuJHNsb3RzLCBgJHtTfWApKSwgMjU2KSlcbiAgICAgICAgICAgICAgXSwgMTYpKSA6IGplKFwiXCIsICEwKVxuICAgICAgICAgICAgXSwgNjQpKSksIDEyOCkpXG4gICAgICAgICAgXSkpKSwgMTI4KSlcbiAgICAgICAgXSwgNClcbiAgICAgIF0pXG4g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WRhdGUudHlwZXMuZW1haWxcIilcbiAgICB9LCB0ID0gKChzKSA9PiB7XG4gICAgICBjb25zdCBkID0gW107XG4gICAgICByZXR1cm4gcyAmJiBzLmZvckVhY2goKGMpID0+IHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICBsYWJlbDogb1tjXSxcbiAgICAgICAgICB2YWx1ZTogY1xuICAgICAgICB9KTtcbiAgICAgIH0pLCBkLnB1c2goe1xuICAgICAgICBsYWJlbDogcihcInByb3BzLmN1c3RvbVwiKSxcbiAgICAgICAgdmFsdWU6IFwidmFsaWRhdG9yXCJcbiAgICAgIH0pLCBkO1xuICAgIH0pKGYpO1xuICAgIHJldHVybiB7XG4gICAgICBmb3JtVmFsdWU6IHt9LFxuICAgICAgdDogcixcbiAgICAgIG9wdGlvbjoge1xuICAgICAgICBmb3JtOiB7XG4gICAgICAgICAgbGFiZWxQb3NpdGlvbjogXCJ0b3BcIixcbiAgICAgICAgICBzaXplOiBcInNtYWxsXCIsXG4gICAgICAgICAgbGFiZWxXaWR0aDogXCI5MHB4XCJcbiAgICAgICAgfSxcbiAgICAgICAgc3VibWl0QnRuOiAhMSxcbiAgICAgICAgYXBwZW5kVmFsdWU6ICEwLFxuICAgICAgICBmb3JtRGF0YTogdGhpcy5wYXJzZVZhbHVlKHRoaXMubW9kZWxWYWx1ZSlcbiAgICAgIH0sXG4gICAgICBydWxlOiBbXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiBcImdyb3VwXCIsXG4gICAgICAgICAgZmllbGQ6IFwidmFsaWRhdGVcIixcbiAgICAgICAgICBwcm9wczoge1xuICAgICAgICAgICAgZXhwYW5kOiAxLFxuICAgICAgICAgICAgc29ydEJ0bjogITEsXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IHsgdHlwZTogdFswXS52YWx1ZSB9LFxuICAgICAgICAgICAgcnVsZTogW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHlwZTogdC5sZW5ndGggPT09IDEgPyBcImhpZGRlblwiIDogXCJzZWxlY3RcIixcbiAgICAgICAgICAgICAgICBmaWVsZDogXCJ0eXBlXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IFwiXCIsXG4gICAgICAgICAgICAgICAgdGl0bGU6IHIoXCJ2YWxpZGF0ZS50eXBlXCIpLFxuICAgICAgICAgICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogcihcInZhbGlkYXRlLnR5cGVQbGFjZWhvbGRlclwiKVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgY29udHJvbDogW1xuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogW1widXJsXCIsIFwiZGF0ZVwiLCBcImVtYWlsXCIsIFwib2JqZWN0XCIsIFwidmFsaWRhdG9yXCJdLFxuICAgICAgICAgICAgICAgICAgICBjb25kaXRpb246IFwibm90SW5cIixcbiAgICAgICAgICAgICAgICAgICAgcnVsZTogW1wibW9kZVwiLCBcIm1pblwiLCBcIm1heFwiLCBcImxlblwiLCBcInBhdHRlcm5cIl1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBcInZhbGlkYXRvclwiLFxuICAgICAgICAgICAgICAgICAgICBydWxlOiBbXCJ2YWxpZGF0b3JcIl1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIG9wdGlvbnM6IHRcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHR5cGU6IFwic2VsZWN0XCIsXG4gICAgICAgICAgICAgICAgdGl0bGU6IHIoXCJ2YWxpZGF0ZS50cmlnZ2VyXCIpLFxuICAgICAgICAgICAgICAgIGZpZWxkOiBcInRyaWdnZXJcIixcbiAgICAgICAgICAgICAgICB2YWx1ZTogXCJjaGFuZ2VcIixcbiAgICAgICAgICAgICAgICBvcHRpb25zOiBYdChyLCBbXG4gICAgICAgICAgICAgICAgICB7IGxhYmVsOiBcImJsdXJcIiwgdmFsdWU6IFwiYmx1clwiIH0sXG4gICAgICAgICAgICAgICAgICB7IGxhYmVsOiBcImNoYW5nZVwiLCB2YWx1ZTogXCJjaGFuZ2VcIiB9LFxuICAgICAgICAgICAgICAgICAgeyBsYWJlbDogXCJzdWJtaXRcIiwgdmFsdWU6IFwic3VibWl0XCIgfVxuICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0eXBlOiBcIkZuRWRpdG9yXCIsXG4gICAgICAgICAgICAgICAgZmllbGQ6IFwidmFsaWRhdG9yXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IFwiXCIsXG4gICAgICAgICAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICAgICAgICAgIG5hbWU6IFwidmFsaWRhdG9yXCIsXG4gICAgICAgICAgICAgICAgICBhcmdzOiBbXCJydWxlXCIsIFwidmFsdWVcIiwgXCJjYWxsYmFja1wiXSxcbiAgICAgICAgICAgICAgICAgIGJ1dHRvbjogITBcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHN0eWxlOiBcImhlaWdodDozMDBweDtcIlxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJzZWxlY3RcIixcbiAgICAgICAgICAgICAgICB0aXRsZTogcihcInZhbGlkYXRlLm1vZGVcIiksXG4gICAgICAgICAgICAgICAgZmllbGQ6IFwibW9kZVwiLFxuICAgICAgICAgICAgICAgIG9wdGlvbnM6IFtcbiAgICAgICAgICAgICAgICAgIHsgdmFsdWU6IFwibWluXCIsIGxhYmVsOiByKFwidmFsaWRhdGUubW9kZXMubWluXCIpIH0sXG4gICAgICAgICAgICAgICAgICB7IHZhbHVlOiBcIm1heFwiLCBsYWJlbDogcihcInZhbGlkYXRlLm1vZGVzLm1heFwiKSB9LFxuICAgICAgICAgICAgICAgICAgeyB2YWx1ZTogXCJsZW5cIiwgbGFiZWw6IHIoXCJ2YWxpZGF0ZS5tb2Rlcy5sZW5cIikgfSxcbiAgICAgICAgICAgICAgICAgIHsgdmFsdWU6IFwicGF0dGVyblwiLCBsYWJlbDogcihcInZhbGlkYXRlLm1vZGVzLnBhdHRlcm5cIikgfVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IFwibWluXCIsXG4gICAgICAgICAgICAgICAgY29udHJvbDogW1xuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogXCJwYXR0ZXJuXCIsXG4gICAgICAgICAgICAgICAgICAgIHJ1bGU6IFtcbiAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImlucHV0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJwYXR0ZXJuXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiBcInNtYWxsXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcihcInZhbGlkYXRlLm1vZGVzLnBhdHRlcm5cIilcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBcIm1pblwiLFxuICAgICAgICAgICAgICAgICAgICBydWxlOiBbXG4gICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJpbnB1dE51bWJlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwibWluXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcihcInZhbGlkYXRlLm1vZGVzLm1pblwiKVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IFwibWF4XCIsXG4gICAgICAgICAgICAgICAgICAgIHJ1bGU6IFtcbiAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImlucHV0TnVtYmVyXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJtYXhcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiByKFwidmFsaWRhdGUubW9kZXMubWF4XCIpXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogXCJsZW5cIixcbiAgICAgICAgICAgICAgICAgICAgcnVsZTogW1xuICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiaW5wdXROdW1iZXJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcImxlblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHIoXCJ2YWxpZGF0ZS5tb2Rlcy5sZW5cIilcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0eXBlOiBcImlucHV0XCIsXG4gICAgICAgICAgICAgICAgdGl0bGU6IHIoXCJ2YWxpZGF0ZS5tZXNzYWdlXCIpLFxuICAgICAgICAgICAgICAgIGZpZWxkOiBcIm1lc3NhZ2VcIixcbiAgICAgICAgICAgICAgICB2YWx1ZTogXCJcIixcbiAgICAgICAgICAgICAgICBjaGlsZHJlbjogW1xuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcInNwYW5cIixcbiAgICAgICAgICAgICAgICAgICAgc2xvdDogXCJhcHBlbmRcIixcbiAgICAgICAgICAgICAgICAgICAgaW5qZWN0OiAhMCxcbiAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiYXBwZW5kLW1zZ1wiLFxuICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiAocykgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZCA9IHRoaXMuZGVzaWduZXIuc2V0dXBTdGF0ZS5hY3RpdmVSdWxlLnRpdGxlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXNpZ25lci5zZXR1cFN0YXRlLmFjdGl2ZVJ1bGUgJiYgcy5hcGkuc2V0VmFsdWUoXCJtZXNzYWdlXCIsIHIocy5hcGkuZm9ybS5tb2RlICE9PSBcInJlcXVpcmVkXCIgPyBcInZhbGlkYXRlLmF1dG9Nb2RlXCIgOiBcInZhbGlkYXRlLmF1dG9SZXF1aXJlZFwiLCB7IHRpdGxlOiBkIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuOiBbcihcInZhbGlkYXRlLmF1dG9cIildXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdXG4gICAgICAgICAgfSxcbiAgICAgICAgICB2YWx1ZTogW11cbiAgICAgICAgfVxuICAgICAgXVxuICAgIH07XG4gIH0sXG4gIG1ldGhvZHM6IHtc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sZVwiKSwgdiA9IGJlKFwiZWwtYnV0dG9uXCIpO1xuICByZXR1cm4gZmUoKSwgeGUoXCJkaXZcIiwgVEEsIFtcbiAgICB1ZShwLCB7XG4gICAgICBkYXRhOiByLnZhbHVlLFxuICAgICAgYm9yZGVyOiBcIlwiLFxuICAgICAgc2l6ZTogci5zaXplIHx8IFwic21hbGxcIixcbiAgICAgIHN0eWxlOiB7IHdpZHRoOiBcIjEwMCVcIiB9XG4gICAgfSwge1xuICAgICAgZGVmYXVsdDogcmUoKCkgPT4gW1xuICAgICAgICAoZmUoITApLCB4ZShodCwgbnVsbCwgaG4oci5jb2x1bW4sIChiLCBTKSA9PiAoZmUoKSwgS2UoYywge1xuICAgICAgICAgIGtleTogYi5sYWJlbCArIFMsXG4gICAgICAgICAgbGFiZWw6IGIubGFiZWxcbiAgICAgICAgfSwge1xuICAgICAgICAgIGRlZmF1bHQ6IHJlKChEKSA9PiBbXG4gICAgICAgICAgICB1ZShkLCB7XG4gICAgICAgICAgICAgIHNpemU6IHIuc2l6ZSB8fCBcInNtYWxsXCIsXG4gICAgICAgICAgICAgIG1vZGVsVmFsdWU6IEQucm93W2Iua2V5XSB8fCBcIlwiLFxuICAgICAgICAgICAgICBcIm9uVXBkYXRlOm1vZGVsVmFsdWVcIjogKFQpID0+IEQucm93W2Iua2V5XSA9IFQsXG4gICAgICAgICAgICAgIG9uQmx1cjogKFQpID0+IHIub25JbnB1dChELnJvdylcbiAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcInNpemVcIiwgXCJtb2RlbFZhbHVlXCIsIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiLCBcIm9uQmx1clwiXSlcbiAgICAgICAgICBdKSxcbiAgICAgICAgICBfOiAyXG4gICAgICAgIH0sIDEwMzIsIFtcImxhYmVsXCJdKSkpLCAxMjgpKSxcbiAgICAgICAgdWUoYywge1xuICAgICAgICAgIHdpZHRoOiBcIjcwXCIsXG4gICAgICAgICAgYWxpZ246IFwiY2VudGVyXCIsXG4gICAgICAgICAgZml4ZWQ6IFwicmlnaHRcIixcbiAgICAgICAgICBsYWJlbDogci50KFwidGFibGVPcHRpb25zLmhhbmRsZVwiKVxuICAgICAgICB9LCB7XG4gICAgICAgICAgZGVmYXVsdDogcmUoKGIpID0+IFtcbiAgICAgICAgICAgIGhlKFwiaVwiLCB7XG4gICAgICAgICAgICAgIGNsYXNzOiBcImZjLWljb24gaWNvbi1kZWxldGVcIixcbiAgICAgICAgICAgICAgb25DbGljazogKFMpID0+IHIuZGVsKGIuJGluZGV4KVxuICAgICAgICAgICAgfSwgbnVsbCwgOCwgREEpXG4gICAgICAgICAgXSksXG4gICAgICAgICAgXzogMVxuICAgICAgICB9LCA4LCBbXCJsYWJlbFwiXSlcbiAgICAgIF0pLFxuICAgICAgXzogMVxuICAgIH0sIDgsIFtcImRhdGFcIiwgXCJzaXplXCJdKSxcbiAgICBoZShcImRpdlwiLCBSQSwgW1xuICAgICAgIXIubWF4IHx8IHIubWF4ID4gci52YWx1ZS5sZW5ndGggPyAoZmUoKSwgS2Uodiwge1xuICAgICAgICBrZXk6IDAsXG4gICAgICAgIGxpbms6IFwiXCIsXG4gICAgICAgIHR5cGU6IFwicHJpbWFyeVwiLFxuICAgICAgICBvbkNsaWNrOiByLmFkZFxuICAgICAgfSwge1xuICAgICAgICBkZWZhdWx0OiByZSgoKSA9PiBbXG4gICAgICAgICAgTUEsXG4gICAgICAgICAgJGUoXCIgXCIgKyBJZShyLnQoXCJ0YWJsZU9wdGlvbnMuYWRkXCIpKSwgMSlcbiAgICAgICAgXSksXG4gICAgICAgIF86IDFcbiAgICAgIH0sIDgsIFtcIm9uQ2xpY2tcIl0pKSA6IGplKFwiXCIsICEwKVxuICAgIF0pXG4gIF0pO1xufVxuY29uc3QgTkEgPSAvKiBAX19QVVJFX18gKi8gTXQoeEEsIFtbXCJyZW5kZXJcIiwgSUFdLCBbXCJfX3Njb3BlSWRcIiwgXCJkYXRhLXYtNzU1NjE5ODBcIl1dKTtcb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gICAgICB9LCB7XG4gICAgICAgICAgICBhcHBlbmQ6IHJlKCgpID0+IFtcbiAgICAgICAgICAgICAgaGUoXCJkaXZcIiwge1xuICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mZC10cmVlLW9wdC1idG5cIixcbiAgICAgICAgICAgICAgICBvbkNsaWNrOiAoYikgPT4gci5hZGQocCwgdilcbiAgICAgICAgICAgICAgfSwgSEEsIDgsIExBKSxcbiAgICAgICAgICAgICAgaGUoXCJkaXZcIiwge1xuICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mZC10cmVlLW9wdC1idG5cIixcbiAgICAgICAgICAgICAgICBvbkNsaWNrOiAoYikgPT4gci5hcHBlbmQodilcbiAgICAgICAgICAgICAgfSwgakEsIDgsICRBKSxcbiAgICAgICAgICAgICAgaGUoXCJkaXZcIiwge1xuICAgICAgICAgICAgICAgIGNsYXNzOiBcIl9mZC10cmVlLW9wdC1idG4gX2ZkLXRyZWUtb3B0LWRhbmdlclwiLFxuICAgICAgICAgICAgICAgIG9uQ2xpY2s6IChiKSA9PiByLnJlbW92ZShwLCB2KVxuICAgICAgICAgICAgICB9LCBWQSwgOCwgVUEpXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIF86IDJcbiAgICAgICAgICB9LCAxMDMyLCBbXCJtb2RlbFZhbHVlXCIsIFwib25VcGRhdGU6bW9kZWxWYWx1ZVwiLCBcIm9uQmx1clwiXSlcbiAgICAgICAgXSlcbiAgICAgIF0pLFxuICAgICAgXzogMVxuICAgIH0sIDgsIFtcImRhdGFcIl0pXG4gIF0pO1xufVxuY29uc3QgR0EgPSAvKiBAX19QVVJFX18gKi8gTXQoT0EsIFtbXCJyZW5kZXJcIiwgV0FdXSk7XG5jb25zdCBRQSA9IHd0KHtcbiAgbmFtZTogXCJUYWJsZUZvcm1WaWV3XCIsXG4gIGRhdGEoKSB7XG4gICAgcmV0dXJuIHt9O1xuICB9XG59KSwgWUEgPSB7IGNsYXNzOiBcIl9mZC10YWJ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dyhyKSB7XG4gICAgICBpZiAociAmJiB0aGlzLmRpc2FibGVkKVxuICAgICAgICByZXR1cm47XG4gICAgICBjb25zdCBmID0gRWEucGFyc2VKc29uKHRoaXMuY29weVRycylbMF07XG4gICAgICB0aGlzLnRycy5wdXNoKGYpLCB0aGlzLnVwZGF0ZVJhdyhmKSwgciAmJiB0aGlzLiRlbWl0KFwiYWRkXCIsIHRoaXMudHJzLmxlbmd0aCk7XG4gICAgfSxcbiAgICB1cGRhdGVSYXcocikge1xuICAgICAgY29uc3QgZiA9IHRoaXMudHJzLmluZGV4T2Yocik7XG4gICAgICByLmNoaWxkcmVuWzBdLnByb3BzLmlubmVyVGV4dCA9IGYgKyAxLCByLmNoaWxkcmVuW3IuY2hpbGRyZW4ubGVuZ3RoIC0gMV0uY2hpbGRyZW5bMF0ucHJvcHMub25DbGljayA9ICgpID0+IHtcbiAgICAgICAgdGhpcy5kZWxSYXcoZik7XG4gICAgICB9O1xuICAgIH0sXG4gICAgbG9hZFJ1bGUoKSB7XG4gICAgICBjb25zdCByID0gW3tcbiAgICAgICAgdHlwZTogXCJ0aFwiLFxuICAgICAgICBuYXRpdmU6ICEwLFxuICAgICAgICBjbGFzczogXCJfZmMtdGYtaGVhZC1pZHhcIixcbiAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICBpbm5lclRleHQ6IFwiI1wiXG4gICAgICAgIH1cbiAgICAgIH1dO1xuICAgICAgbGV0IGYgPSBbe1xuICAgICAgICB0eXBlOiBcInRkXCIsXG4gICAgICAgIGNsYXNzOiBcIl9mYy10Zi1pZHhcIixcbiAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICBpbm5lclRleHQ6IFwiMFwiXG4gICAgICAgIH1cbiAgICAgIH1dO1xuICAgICAgdGhpcy5jb2x1bW5zLmZvckVhY2goKG8pID0+IHtcbiAgICAgICAgci5wdXNoKHtcbiAgICAgICAgICB0eXBlOiBcInRoXCIsXG4gICAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgICBzdHlsZTogby5zdHlsZSxcbiAgICAgICAgICBwcm9wczoge1xuICAgICAgICAgICAgaW5uZXJUZXh0OiBvLmxhYmVsIHx8IFwiXCJcbiAgICAgICAgICB9XG4gICAgICAgIH0pLCBmLnB1c2goe1xuICAgICAgICAgIHR5cGU6IFwidGRcIixcbiAgICAgICAgICBuYXRpdmU6ICEwLFxuICAgICAgICAgIGNoaWxkcmVuOiBbLi4uby5ydWxlIHx8IFtdXVxuICAgICAgICB9KTtcbiAgICAgIH0pLCByLnB1c2goe1xuICAgICAgICB0eXBlOiBcInRoXCIsXG4gICAgICAgIG5hdGl2ZTogITAsXG4gICAgICAgIGNsYXNzOiBcIl9mYy10Zi1lZGl0IGZjLWNsb2NrXCIsXG4gICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgaW5uZXJUZXh0OiBcIlxcdTY0Q0RcXHU0RjVDXCJcbiAgICAgICAgfVxuICAgICAgfSksIGYucHVzaCh7XG4gICAgICAgIHR5cGU6IFwidGRcIixcbiAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgY2xhc3M6IFwiX2ZjLXRmLWJ0biBmYy1jbG9ja1wiLFxuICAgICAgICBjaGlsZHJlbjogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIHR5cGU6IFwiaVwiLFxuICAgICAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgICAgIGNsYXNzOiBcImZjLWljb24gaWNvbi1kZWxldGVcIixcbiAgICAgICAgICAgIHByb3BzOiB7fVxuICAgICAgICAgIH1cbiAgICAgICAgXVxuICAgICAgfSksIHRoaXMuY29weVRycyA9IEVhLnRvSnNvbihbXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiBcInRyXCIsXG4gICAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgICBzdWJSdWxlOiAhMCxcbiAgICAgICAgICBjaGlsZHJlbjogZlxuICAgICAgICB9XG4gICAgICBdKSwgdGhpcy5ydWxlID0gW1xuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogXCJ0YWJsZVwiLFxuICAgICAgICAgIG5hdGl2ZTogITAsXG4gICAgICAgICAgY2xhc3M6IFwiX2ZjLXRmLXRhYmxlXCIsXG4gICAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICAgIGJvcmRlcjogXCIxXCIsXG4gICAgICAgICAgICBjZWxsc3BhY2luZzogXCIwXCIsXG4gICAgICAgICAgICBjZWxscGFkZGluZzogXCIwXCJcbiAgICAgICAgICB9LFxuICAgICAgICAgIGNoaWxkcmVuOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHR5cGU6IFwidGhlYWRcIixcbiAgICAgICAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgICAgICAgY2hpbGRyZW46IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICB0eXBlOiBcInRyXCIsXG4gICAgICAgICAgICAgICAgICBuYXRpdmU6ICEwLFxuICAgICAgICAgICAgICAgICAgY2hpbGRyZW46IHJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHR5cGU6IFwidGJvZHlcIixcbiAgICAgICAgICAgICAgbmF0aXZlOiAhMCxcbiAgICAgICAgICAgICAgY2hpbGRyZW46IHRoaXMudHJzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgXVxuICAgICAgICB9XG4gICAgICBdLCB0aGlzLmFkZFJhdygpO1xuICAgIH1cbiAgfSxcbiAgY3JlYXRlZCgpIHtcbiAgICB0aGlzLmxvYWRSdWxlKCk7XG4gIH0sXG4gIG1vdW50ZWQoKSB7XG4gICAgdGhpcy51cGRhdGVUYWJsZSgpO1xuICB9XG59LCBfQSA9IC8qIEBfX1BVUkVfXyAqLyBoZShcImlcIiwge1xuICBjbGFzczogXCJmYy1pY29uIGljb24tYWRkLWNpcmNsZVw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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqL1xuICAgICAgdmFyIHMgPSBmdW5jdGlvbihWLCBXKSB7XG4gICAgICAgIHJldHVybiBzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8IHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24oUSwgWCkge1xuICAgICAgICAgIFEuX19wcm90b19fID0gWDtcbiAgICAgICAgfSB8fCBmdW5jdGlvbihRLCBYKSB7XG4gICAgICAgICAgZm9yICh2YXIgSiBpbiBYKVxuICAgICAgICAgICAgT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKFgsIEopICYmIChRW0pdID0gWFtKXSk7XG4gICAgICAgIH0sIHMoViwgVyk7XG4gICAgICB9O1xuICAgICAgZnVuY3Rpb24gZChJLCBWKSB7XG4gICAgICAgIGlmICh0eXBlb2YgViAhPSBcImZ1bmN0aW9uXCIgJiYgViAhPT0gbnVsbClcbiAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiQ2xhc3MgZXh0ZW5kcyB2YWx1ZSBcIiArIFN0cmluZyhWKSArIFwiIGlzIG5vdCBhIGNvbnN0cnVjdG9yIG9yIG51bGxcIik7XG4gICAgICAgIHMoSSwgVik7XG4gICAgICAgIGZ1bmN0aW9uIFcoKSB7XG4gICAgICAgICAgdGhpcy5jb25zdHJ1Y3RvciA9IEk7XG4gICAgICAgIH1cbiAgICAgICAgSS5wcm90b3R5cGUgPSBWID09PSBudWxsID8gT2JqZWN0LmNyZWF0ZShWKSA6IChXLnByb3RvdHlwZSA9IFYucHJvdG90eXBlLCBuZXcgVygpKTtcbiAgICAgIH1cbiAgICAgIHZhciBjID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiBjID0gT2JqZWN0LmFzc2lnbiB8fCBmdW5jdGlvbihXKSB7XG4gICAgICAgICAgZm9yICh2YXIgUSwgWCA9IDEsIEogPSBhcmd1bWVudHMubGVuZ3RoOyBYIDwgSjsgWCsrKSB7XG4gICAgICAgICAgICBRID0gYXJndW1lbnRzW1hdO1xuICAgICAgICAgICAgZm9yICh2YXIgWiBpbiBRKVxuICAgICAgICAgICAgICBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoUSwgWikgJiYgKFdbWl0gPSBRW1pdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIFc7XG4gICAgICAgIH0sIGMuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH07XG4gICAgICBmdW5jdGlvbiBwKEksIFYpIHtcbiAgICAgICAgdmFyIFcgPSB7fTtcbiAgICAgICAgZm9yICh2YXIgUSBpbiBJKVxuICAgICAgICAgIE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChJLCBRKSAmJiBWLmluZGV4T2YoUSkgPCAwICYmIChXW1FdID0gSVtRXSk7XG4gICAgICAgIGlmIChJICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT0gXCJmdW5jdGlvblwiKVxuICAgICAgICAgIGZvciAodmFyIFggPSAwLCBRID0gT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyhJKTsgWCA8IFEubGVuZ3RoOyBYKyspXG4gICAgICAgICAgICBWLmluZGV4T2YoUVtYXSkgPCAwICYmIE9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChJLCBRW1hdKSAmJiAoV1tRW1hdXSA9IElbUVtYXV0pO1xuICAgICAgICByZXR1cm4gVztcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHYoSSwgViwgVywgUSkge1xuICAgICAgICB2YXIgWCA9IGFyZ3VtZW50cy5sZW5ndGgsIEogPSBYIDwgMyA/IFYgOiBRID09PSBudWxsID8gUSA9IE9iamVjdC5nZX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iA6IG5ldyBXKGZ1bmN0aW9uKFopIHtcbiAgICAgICAgICAgIFooSik7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ldyAoVyB8fCAoVyA9IFByb21pc2UpKShmdW5jdGlvbihKLCBaKSB7XG4gICAgICAgICAgZnVuY3Rpb24gZGUobWUpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHNlKFEubmV4dChtZSkpO1xuICAgICAgICAgICAgfSBjYXRjaCAobGUpIHtcbiAgICAgICAgICAgICAgWihsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGZ1bmN0aW9uIHZlKG1lKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBzZShRLnRocm93KG1lKSk7XG4gICAgICAgICAgICB9IGNhdGNoIChsZSkge1xuICAgICAgICAgICAgICBaKGxlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgZnVuY3Rpb24gc2UobWUpIHtcbiAgICAgICAgICAgIG1lLmRvbmUgPyBKKG1lLnZhbHVlKSA6IFgobWUudmFsdWUpLnRoZW4oZGUsIHZlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc2UoKFEgPSBRLmFwcGx5KEksIFYgfHwgW10pKS5uZXh0KCkpO1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIFQoSSwgVikge1xuICAgICAgICB2YXIgVyA9IHsgbGFiZWw6IDAsIHNlbnQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIGlmIChKWzBdICYgMSlcbiAgICAgICAgICAgIHRocm93IEpbMV07XG4gICAgICAgICAgcmV0dXJuIEpbMV07XG4gICAgICAgIH0sIHRyeXM6IFtdLCBvcHM6IFtdIH0sIFEsIFgsIEosIFo7XG4gICAgICAgIHJldHVybiBaID0geyBuZXh0OiBkZSgwKSwgdGhyb3c6IGRlKDEpLCByZXR1cm46IGRlKDIpIH0sIHR5cGVvZiBTeW1ib2wgPT0gXCJmdW5jdGlvblwiICYmIChaW1N5bWJvbC5pdGVyYXRvcl0gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSksIFo7XG4gICAgICAgIGZ1bmN0aW9uIGRlKHNlKSB7XG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKG1lKSB7XG4gICAgICAgICAgICByZXR1cm4gdmUoW3NlLCBtZV0pO1xuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gdmUoc2UpIHtcbiAgICAgICAgICBpZiAoUSlcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJHZW5lcmF0b3IgaXMgYWxyZWFkeSBleGVjdXRpbmcuXCIpO1xuICAgICAgICAgIGZvciAoOyBXOyApXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBpZiAoUSA9IDEsIFggJiYgKEogPSBzZVswXSAmIDIgPyBYLnJldHVybiA6IHNlWzBdID8gWC50aHJvdyB8fCAoKEogPSBYLnJldHVybikgJiYgSi5jYWxsKFgpLCAwKSA6IFgubmV4dCkgJiYgIShKID0gSi5jYWxsKFgsIHNlWzFdKSkuZG9uZSlcbiAgICAgICAgICAgICAgICByZXR1cm4gSjtcbiAgICAgICAgICAgICAgc3dpdGNoIChYID0gMCwgSiAmJiAoc2UgPSBbc2VbMF0gJiAyLCBKLnZhbHVlXSksIHNlWzBdKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgIEogPSBzZTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgIHJldHVybiBXLmxhYmVsKyssIHsgdmFsdWU6IHNlWzFdLCBkb25lOiAhMSB9O1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgIFcubGFiZWwrKywgWCA9IHNlWzFdLCBzZSA9IFswXTtcbiAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICAgIHNlID0gVy5vcHMucG9wKCksIFcudHJ5cy5wb3AoKTtcbiAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICBpZiAoSiA9IFcudHJ5cywgIShKID0gSi5sZW5ndGggPiAwICYmIEpbSi5sZW5ndGggLSAxXSkgJiYgKHNlWzBdID09PSA2IHx8IHNlWzBdID09PSAyKSkge1xuICAgICAgICAgICAgICAgICAgICBXID0gMDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBpZiAoc2VbMF0gPT09IDMgJiYgKCFKIHx8IHNlWzFdID4gSlswXSAmJiBzZVsxXSA8IEpbM10pKSB7XG4gICAgICAgICAgICAgICAgICAgIFcubGFiZWwgPSBzZVsxXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBpZiAoc2VbMF0gPT09IDYgJiYgVy5sYWJlbCA8IEpbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgVy5sYWJlbCA9IEpbMV0sIEogPSBzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBpZiAoSiAmJiBXLmxhYmVsIDwgSlsyXSkge1xuICAgICAgICAgICAgICAgICAgICBXLmxhYmVsID0gSlsyXSwgVy5vcHMucHVzaChzZSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgSlsyXSAmJiBXLm9wcy5wb3AoKSwgVy50cnlzLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2UgPSBWLmNhbGwoSSwgVyk7XG4gICAgICAgICAgICB9IGNhdGNoIChtZSkge1xuICAgICAgICAgICAgICBzZSA9IFs2LCBtZV0sIFggPSAwO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgUSA9IEogPSAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIGlmIChzZVswXSAmIDUpXG4gICAgICAgICAgICB0aHJvdyBzZVsxXTtcbiAgICAgICAgICByZXR1cm4geyB2YWx1ZTogc2VbMF0gPyBzZVsxXSA6IHZvaWQgMCwgZG9uZTogITAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdmFyIG0gPSBPYmplY3QuY3JlYXRlID8gZnVuY3Rpb24oSSwgViwgVywgUSkge1xuICAgICAgICBRID09PSB2b2lkIDAgJiYgKFEgPSBXKSwgT2JqZWN0LmRlZmluZVByb3BlcnR5KEksIFEsIHsgZW51bWVyYWJsZTogITAsIGdldDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgcmV0dXJuIFZbV107XG4gICAgICAgIH0gfSk7XG4gICAgICB9IDogZnVuY3Rpb24oSSwgViwgVywgUSkge1xuICAgICAgICBRID09PSB2b2lkIDAgJiYgKFEgPSBXKSwgSVtRXSA9IFZbV107XG4gICAgICB9O1xuICAgICAgZnVuY3Rpb24geChJLCBWKSB7XG4gICAgICAgIGZvciAodmFyIFcgaW4gSSlcbiAgICAgICAgICBXICE9PSBcImRlZmF1bHRcIiAmJiAhT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKFYsIFcpICYmIG0oViwgSSwgVyk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBSKEkpIHtcbiAgICAgICAgdmFyIFYgPSB0eXBlb2YgU3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XLmNhbGwoUSk7XG4gICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgIGlmIChaKVxuICAgICAgICAgICAgICB0aHJvdyBaLmVycm9yO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gSjtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIEEoKSB7XG4gICAgICAgIGZvciAodmFyIEkgPSBbXSwgViA9IDA7IFYgPCBhcmd1bWVudHMubGVuZ3RoOyBWKyspXG4gICAgICAgICAgSSA9IEkuY29uY2F0KHcoYXJndW1lbnRzW1ZdKSk7XG4gICAgICAgIHJldHVybiBJO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gRSgpIHtcbiAgICAgICAgZm9yICh2YXIgSSA9IDAsIFYgPSAwLCBXID0gYXJndW1lbnRzLmxlbmd0aDsgViA8IFc7IFYrKylcbiAgICAgICAgICBJICs9IGFyZ3VtZW50c1tWXS5sZW5ndGg7XG4gICAgICAgIGZvciAodmFyIFEgPSBBcnJheShJKSwgWCA9IDAsIFYgPSAwOyBWIDwgVzsgVisrKVxuICAgICAgICAgIGZvciAodmFyIEogPSBhcmd1bWVudHNbVl0sIFogPSAwLCBkZSA9IEoubGVuZ3RoOyBaIDwgZGU7IForKywgWCsrKVxuICAgICAgICAgICAgUVtYXSA9IEpbWl07XG4gICAgICAgIHJldHVybiBRO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQyhJLCBWKSB7XG4gICAgICAgIGZvciAodmFyIFcgPSAwLCBRID0gVi5sZW5ndGgsIFggPSBJLmxlbmd0aDsgVyA8IFE7IFcrKywgWCsrKVxuICAgICAgICAgIElbWF0gPSBWW1ddO1xuICAgICAgICByZXR1cm4gSTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIE0oSSkge1xuICAgICAgICByZXR1cm4gdGhpcyBpbnN0YW5jZW9mIE0gPyAodGhpcy52ID0gSSwgdGhpcykgOiBuZXcgTShJKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHkoSSwgViwgVykge1xuICAgICAgICBpZiAoIVN5bWJvbC5hc3luY0l0ZXJhdG9yKVxuICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJTeW1ib2wuYXN5bmNJdGVyYXRvciBpcyBub3QgZGVmaW5lZC5cIik7XG4gICAgICAgIHZhciBRID0gVy5hcHBseShJLCBWIHx8IFtdKSwgWCwgSiA9IFtdO1xuICAgICAgICByZXR1cm4gWCA9IHt9LCBaKFwibmV4dFwiKSwgWihcInRocm93XCIpLCBaKFwicmV0dXJuXCIpLCBYW1N5bWJvbC5hc3luY0l0ZXJhdG9yXSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LCBYO1xuICAgICAgICBmdW5jdGlvbiBaKGllKSB7XG4gICAgICAgICAgUVtpZV0gJiYgKFhbaWVdID0gZnVuY3Rpb24ocGUpIHtcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbih0ZSwgZ2UpIHtcbiAgICAgICAgICAgICAgSi5wdXNoKFtpZSwgcGUsIHRlLCBnZV0pID4gMSB8fCBkZShpZSwgcGUpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gZGUoaWUsIHBlKSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHZlKFFbaWVdKHBlKSk7XG4gICAgICAgICAgfSBjYXRjaCAodGUpIHtcbiAgICAgICAgICAgIGxlKEpbMF1bM10sIHRlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gdmUoaWUpIHtcbiAgICAgICAgICBpZS52YWx1ZSBpbnN0YW5jZW9mIE0gPyBQcm9taXNlLnJlc29sdmUoaWUudmFsdWUudikudGhlbihzZSwgbWUpIDogbGUoSlswXVsyXSwgaWUpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIHNlKGllKSB7XG4gICAgICAgICAgZGUoXCJuZXh0XCIsIGllKTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBtZShpZSkge1xuICAgICAgICAgIGRlKFwidGhyb3dcIiwgaWUpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGxlKGllLCBwZSkge1xuICAgICAgICAgIGllKHBlKSwgSi5zaGlmdCgpLCBKLmxlbmd0aCAmJiBkZShKWzBdWzBdLCBKWzBdWzFdKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gQihJKSB7XG4gICAgICAgIHZhciBWLCBXO1xuICAgICAgICByZXR1cm4gViA9IHt9LCBRKFwibmV4dFwiKSwgUShcInRocm93XCIsIGZ1bmN0aW9uKFgpIHtcbiAgICAgICAgICB0aHJvdyBYO1xuICAgICAgICB9KSwgUShcInJldHVyblwiKSwgVltTeW1ib2wuaXRlcmF0b3JdID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sIFY7XG4gICAgICAgIGZ1bmN0aW9uIFEoWCwgSikge1xuICAgICAgICAgIFZbWF0gPSBJW1hdID8gZnVuY3Rpb24oWikge1xuICAgICAgICAgICAgcmV0dXJuIChXID0gIVcpID8geyB2YWx1ZTogTShJW1hdKFopKSwgZG9uZTogWCA9PT0gXCJyZXR1cm5cIiB9IDogSiA/IEooWikgOiBaO1xuICAgICAgICAgIH0gOiBKO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiAkKEkpIHtcbiAgICAgICAgaWYgKCFTeW1ib2wuYXN5bmNJdGVyYXRvcilcbiAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiU3ltYm9sLmFzeW5jSXRlcmF0b3IgaXMgbm90IGRlZmluZWQuXCIpO1xuICAgICAgICB2YXIgViA9IElbU3ltYm9sLmFzeW5jSXRlcmF0b3JdLCBXO1x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CwgRC5kZWZhdWx0KShJKS5jYWxsKEksIFwiPFwiKSA9PT0gMCA/IE4gPSBDKEkpIDogTiA9IHkoSSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgViA9IE4ubGVuZ3RoO1xuICAgICAgICAgICAgaWYgKCFWKVxuICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIGZvciAodmFyIFcgPSAwOyBXIDwgVjsgVysrKVxuICAgICAgICAgICAgICB0aGlzLmVsZW1zLnB1c2goTltXXSk7XG4gICAgICAgICAgICB0aGlzLmxlbmd0aCA9IFY7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAoMCwgZC5kZWZhdWx0KShrLnByb3RvdHlwZSwgXCJpZFwiLCB7XG4gICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmVsZW1zWzBdLmlkO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZW51bWVyYWJsZTogITEsXG4gICAgICAgICAgY29uZmlndXJhYmxlOiAhMFxuICAgICAgICB9KSwgay5wcm90b3R5cGUuZm9yRWFjaCA9IGZ1bmN0aW9uKGgpIHtcbiAgICAgICAgICBmb3IgKHZhciBOID0gMDsgTiA8IHRoaXMubGVuZ3RoOyBOKyspIHtcbiAgICAgICAgICAgIHZhciBQID0gdGhpcy5lbGVtc1tOXSwgaiA9IGguY2FsbChQLCBQLCBOKTtcbiAgICAgICAgICAgIGlmIChqID09PSAhMSlcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5jbG9uZSA9IGZ1bmN0aW9uKGgpIHtcbiAgICAgICAgICB2YXIgTjtcbiAgICAgICAgICBoID09PSB2b2lkIDAgJiYgKGggPSAhMSk7XG4gICAgICAgICAgdmFyIFAgPSBbXTtcbiAgICAgICAgICByZXR1cm4gKDAsIHAuZGVmYXVsdCkoTiA9IHRoaXMuZWxlbXMpLmNhbGwoTiwgZnVuY3Rpb24oaikge1xuICAgICAgICAgICAgUC5wdXNoKGouY2xvbmVOb2RlKCEhaCkpO1xuICAgICAgICAgIH0pLCBGKFApO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5nZXQgPSBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgaCA9PT0gdm9pZCAwICYmIChoID0gMCk7XG4gICAgICAgICAgdmFyIE4gPSB0aGlzLmxlbmd0aDtcbiAgICAgICAgICByZXR1cm4gaCA+PSBOICYmIChoID0gaCAlIE4pLCBGKHRoaXMuZWxlbXNbaF0pO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5maXJzdCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzLmdldCgwKTtcbiAgICAgICAgfSwgay5wcm90b3R5cGUubGFzdCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZhciBoID0gdGhpcy5sZW5ndGg7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0KGggLSAxKTtcbiAgICAgICAgfSwgay5wcm90b3R5cGUub24gPSBmdW5jdGlvbihoLCBOLCBQKSB7XG4gICAgICAgICAgdmFyIGo7XG4gICAgICAgICAgcmV0dXJuIGggPyAodHlwZW9mIE4gPT0gXCJmdW5jdGlvblwiICYmIChQID0gTiwgTiA9IFwiXCIpLCAoMCwgcC5kZWZhdWx0KShqID0gdGhpcykuY2FsbChqLCBmdW5jdGlvbihJKSB7XG4gICAgICAgICAgICBpZiAoIU4pIHtcbiAgICAgICAgICAgICAgSS5hZGRFdmVudExpc3RlbmVyKGgsIFApO1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgViA9IGZ1bmN0aW9uKFEpIHtcbiAgICAgICAgICAgICAgdmFyIFggPSBRLnRhcmdldDtcbiAgICAgICAgICAgICAgWC5tYXRjaGVzKE4pICYmIFAuY2FsbChYLCBRKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBJLmFkZEV2ZW50TGlzdGVuZXIoaCwgViksIEUucHVzaCh7IGVsZW06IEksIHNlbGVjdG9yOiBOLCBmbjogUCwgYWdlbnRGbjogViB9KTtcbiAgICAgICAgICB9KSkgOiB0aGlzO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5vZmYgPSBmdW5jdGlvbihoLCBOLCBQKSB7XG4gICAgICAgICAgdmFyIGo7XG4gICAgICAgICAgcmV0dXJuIGggPyAodHlwZW9mIE4gPT0gXCJmdW5jdGlvblwiICYmIChQID0gTiwgTiA9IFwiXCIpLCAoMCwgcC5kZWZhdWx0KShqID0gdGhpcykuY2FsbChqLCBmdW5jdGlvbihJKSB7XG4gICAgICAgICAgICBpZiAoTikge1xuICAgICAgICAgICAgICBmb3IgKHZhciBWID0gLTEsIFcgPSAwOyBXIDwgRS5sZW5ndGg7IFcrKykge1xuICAgICAgICAgICAgICAgIHZhciBRID0gRVtXXTtcbiAgICAgICAgICAgICAgICBpZiAoUS5zZWxlY3RvciA9PT0gTiAmJiBRLmZuID09PSBQICYmIFEuZWxlbSA9PT0gSSkge1xuICAgICAgICAgICAgICAgICAgViA9IFc7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKFYgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgdmFyIFggPSAoMCwgVC5kZWZhdWx0KShFKS5jYWxsKEUsIFYsIDEpWzBdLmFnZW50Rm47XG4gICAgICAgICAgICAgICAgSS5yZW1vdmVFdmVudExpc3RlbmVyKGgsIFgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgSS5yZW1vdmVFdmVudExpc3RlbmVyKGgsIFApO1xuICAgICAgICAgIH0pKSA6IHRoaXM7XG4gICAgICAgIH0sIGsucHJvdG90eX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gICAgUC5jbGFzc05hbWUgPSBoO1xuICAgICAgICAgIH0pIDogdGhpcztcbiAgICAgICAgfSwgay5wcm90b3R5cGUucmVtb3ZlQ2xhc3MgPSBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgdmFyIE47XG4gICAgICAgICAgcmV0dXJuIGggPyAoMCwgcC5kZWZhdWx0KShOID0gdGhpcykuY2FsbChOLCBmdW5jdGlvbihQKSB7XG4gICAgICAgICAgICBpZiAoISFQLmNsYXNzTmFtZSkge1xuICAgICAgICAgICAgICB2YXIgaiA9IFAuY2xhc3NOYW1lLnNwbGl0KC9cXHMvKTtcbiAgICAgICAgICAgICAgaiA9ICgwLCBtLmRlZmF1bHQpKGopLmNhbGwoaiwgZnVuY3Rpb24oSSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBJID0gKDAsIGIuZGVmYXVsdCkoSSkuY2FsbChJKSwgISghSSB8fCBJID09PSBoKTtcbiAgICAgICAgICAgICAgfSksIFAuY2xhc3NOYW1lID0gai5qb2luKFwiIFwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSA6IHRoaXM7XG4gICAgICAgIH0sIGsucHJvdG90eXBlLmhhc0NsYXNzID0gZnVuY3Rpb24oaCkge1xuICAgICAgICAgIGlmICghaClcbiAgICAgICAgICAgIHJldHVybiAhMTtcbiAgICAgICAgICB2YXIgTiA9IHRoaXMuZWxlbXNbMF07XG4gICAgICAgICAgaWYgKCFOLmNsYXNzTmFtZSlcbiAgICAgICAgICAgIHJldHVybiAhMTtcbiAgICAgICAgICB2YXIgUCA9IE4uY2xhc3NOYW1lLnNwbGl0KC9cXHMvKTtcbiAgICAgICAgICByZXR1cm4gKDAsIHguZGVmYXVsdCkoUCkuY2FsbChQLCBoKTtcbiAgICAgICAgfSwgay5wcm90b3R5cGUuY3NzID0gZnVuY3Rpb24oaCwgTikge1xuICAgICAgICAgIHZhciBQLCBqO1xuICAgICAgICAgIHJldHVybiBOID09IFwiXCIgPyBqID0gXCJcIiA6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B7XG4gICAgICAgICAgdmFyIGg7XG4gICAgICAgICAgcmV0dXJuICgwLCBwLmRlZmF1bHQpKGggPSB0aGlzKS5jYWxsKGgsIGZ1bmN0aW9uKE4pIHtcbiAgICAgICAgICAgIGlmIChOLnJlbW92ZSlcbiAgICAgICAgICAgICAgTi5yZW1vdmUoKTtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgUCA9IE4ucGFyZW50RWxlbWVudDtcbiAgICAgICAgICAgICAgUCAmJiBQLnJlbW92ZUNoaWxkKE4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5pc0NvbnRhaW4gPSBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgdmFyIE4gPSB0aGlzLmVsZW1zWzBdLCBQID0gaC5lbGVtc1swXTtcbiAgICAgICAgICByZXR1cm4gTi5jb250YWlucyhQKTtcbiAgICAgICAgfSwgay5wcm90b3R5cGUuZ2V0Tm9kZU5hbWUgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICB2YXIgaCA9IHRoaXMuZWxlbXNbMF07XG4gICAgICAgICAgcmV0dXJuIGgubm9kZU5hbWU7XG4gICAgICAgIH0sIGsucHJvdG90eXBlLmdldE5vZGUgPSBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgaCA9PT0gdm9pZCAwICYmIChoID0gMCk7XG4gICAgICAgICAgdmFyIE47XG4gICAgICAgICAgcmV0dXJuIE4gPSB0aGlzLmVsZW1zW2hdLCBOO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5maW5kID0gZnVuY3Rpb24oaCkge1xuICAgICAgICAgIHZhciBOID0gdGhpcy5lbGVtc1swXTtcbiAgICAgICAgICByZXR1cm4gRihOLnF1ZXJ5U2VsZWN0b3JBbGwoaCkpO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS50ZXh0ID0gZnVuY3Rpb24oaCkge1xuICAgICAgICAgIGlmIChoKSB7XG4gICAgICAgICAgICB2YXIgUDtcbiAgICAgICAgICAgIHJldHVybiAoMCwgcC5kZWZhdWx0KShQID0gdGhpcykuY2FsbChQLCBmdW5jdGlvbihqKSB7XG4gICAgICAgICAgICAgIGouaW5uZXJIVE1MID0gaDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgTiA9IHRoaXMuZWxlbXNbMF07XG4gICAgICAgICAgICByZXR1cm4gTi5pbm5lckhUTUwucmVwbGFjZSgvPFtePl0rPi9nLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIFwiXCI7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0sIGsucHJvdG90eXBlLmh0bWwgPSBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgdmFyIE4gPSB0aGlzLmVsZW1zWzBdO1xuICAgICAgICAgIHJldHVybiBoID8gKE4uaW5uZXJIVE1MID0gaCwgdGhpcykgOiBOLmlubmVySFRNTDtcbiAgICAgICAgfSwgay5wcm90b3R5cGUudmFsID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgdmFyIGgsIE4gPSB0aGlzLmVsZW1zWzBdO1xuICAgICAgICAgIHJldHVybiAoMCwgYi5kZWZhdWx0KShoID0gTi52YWx1ZSkuY2FsbChoKTtcbiAgICAgICAgfSwgay5wcm90b3R5cGUuZm9jdXMgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICB2YXIgaDtcbiAgICAgICAgICByZXR1cm4gKDAsIHAuZGVmYXVsdCkoaCA9IHRoaXMpLmNhbGwoaCwgZnVuY3Rpb24oTikge1xuICAgICAgICAgICAgTi5mb2N1cygpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5wcmV2ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgdmFyIGggPSB0aGlzLmVsZW1zWzBdO1xuICAgICAgICAgIHJldHVybiBGKGgucHJldmlvdXNFbGVtZW50U2libGluZyk7XG4gICAgICAgIH0sIGsucHJvdG90eXBlLm5leHQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICB2YXIgaCA9IHRoaXMuZWxlbXNbMF07XG4gICAgICAgICAgcmV0dXJuIEYoaC5uZXh0RWxlbWVudFNpYmxpbmcpO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5nZXROZXh0U2libGluZyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZhciBoID0gdGhpcy5lbGVtc1swXTtcbiAgICAgICAgICByZXR1cm4gRihoLm5leHRTaWJsaW5nKTtcbiAgICAgICAgfSwgay5wcm90b3R5cGUucGFyZW50ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgdmFyIGggPSB0aGlzLmVsZW1zWzBdO1xuICAgICAgICAgIHJldHVybiBGKGgucGFyZW50RWxlbWVudCk7XG4gICAgICAgIH0sIGsucHJvdG90eXBlLnBhcmVudFVudGlsID0gZnVuY3Rpb24oaCwgTikge1xuICAgICAgICAgIHZhciBQID0gTiB8fCB0aGlzLmVsZW1zWzBdO1xuICAgICAgICAgIGlmIChQLm5vZGVOYW1lID09PSBcIkJPRFlcIilcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgIHZhciBqID0gUC5wYXJlbnRFbGVtZW50O1xuICAgICAgICAgIHJldHVybiBqID09PSBudWxsID8gbnVsbCA6IGoubWF0Y2hlcyhoKSA/IEYoaikgOiB0aGlzLnBhcmVudFVudGlsKGgsIGopO1xuICAgICAgICB9LCBrLnByb3RvdHlwZS5wYXJlbnRVbnRpbEVkaXRvciA9IGZ1bmN0aW9uKGgsIE4sIFApIHtcbiAgICAgICAgICB2YXIgaiA9IFAgfHwgdGhpcy5lbGVtc1swXTtcbiAgICAgICAgICBpZiAoRihqKS5lcXVhbChOLiR0ZXh0Q29udGFpbmVyRWxlbSkgfHwgRihqKS5lcXVhbChOLiR0b29sYmFyRWxlbSkpXG4gICAgICAgICAgICByZXR1c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WxlbWVudCA9ICQ7XG4gICAgICBmdW5jdGlvbiBGKCkge1xuICAgICAgICBmb3IgKHZhciBrID0gW10sIGggPSAwOyBoIDwgYXJndW1lbnRzLmxlbmd0aDsgaCsrKVxuICAgICAgICAgIGtbaF0gPSBhcmd1bWVudHNbaF07XG4gICAgICAgIHJldHVybiBuZXcgKCgwLCBSLmRlZmF1bHQpKCQpLmFwcGx5KCQsIHcuX19zcHJlYWRBcnJheXMoW3ZvaWQgMF0sIGspKSkoKTtcbiAgICAgIH1cbiAgICAgIGkuZGVmYXVsdCA9IEY7XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgby5leHBvcnRzID0gdCgxODApO1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCg4KSwgZCA9IHQoNzEpLmYsIGMgPSB0KDEwMCksIHAgPSB0KDkpLCB2ID0gdCgzOSksIGIgPSB0KDE5KSwgUyA9IHQoMTYpLCBEID0gZnVuY3Rpb24obSkge1xuICAgICAgICB2YXIgeCA9IGZ1bmN0aW9uKHcsIEEsIEUpIHtcbiAgICAgICAgICBpZiAodGhpcyBpbnN0YW5jZW9mIG0pIHtcbiAgICAgICAgICAgIHN3aXRjaCAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBtKCk7XG4gICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IG0odyk7XG4gICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IG0odywgQSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbmV3IG0odywgQSwgRSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBtLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiB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GogPSBOKFAsIGhbUF0pO1xuICAgICAgICAgICAgaWYgKGogPT09ICExKVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICB9XG4gICAgICBpLmZvckVhY2ggPSBBO1xuICAgICAgZnVuY3Rpb24gRShoLCBOKSB7XG4gICAgICAgIHZhciBQLCBqLCBJLCBWID0gaC5sZW5ndGggfHwgMDtcbiAgICAgICAgZm9yIChQID0gMDsgUCA8IFYgJiYgKGogPSBoW1BdLCBJID0gTi5jYWxsKGgsIGosIFApLCBJICE9PSAhMSk7IFArKylcbiAgICAgICAgICA7XG4gICAgICB9XG4gICAgICBpLmFyckZvckVhY2ggPSBFO1xuICAgICAgZnVuY3Rpb24gQyhoLCBOKSB7XG4gICAgICAgIE4gPT09IHZvaWQgMCAmJiAoTiA9IDIwMCk7XG4gICAgICAgIHZhciBQID0gITE7XG4gICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgICBmb3IgKHZhciBqID0gdGhpcywgSSA9IFtdLCBWID0gMDsgViA8IGFyZ3VtZW50cy5sZW5ndGg7IFYrKylcbiAgICAgICAgICAgIElbVl0gPSBhcmd1bWVudHNbVl07XG4gICAgICAgICAgUCB8fCAoUCA9ICEwLCAoMCwgYi5kZWZhdWx0KShmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIFAgPSAhMSwgaC5jYWxsLmFwcGx5KGgsIFQuX19zcHJlYWRBcnJheXMoW2pdLCBJKSk7XG4gICAgICAgICAgfSwgTikpO1xuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgaS50aHJvdHRsZSA9IEM7XG4gICAgICBmdW5jdGlvbiBNKGgsIE4pIHtcbiAgICAgICAgTiA9PT0gdm9pZCAwICYmIChOID0gMjAwKTtcbiAgICAgICAgdmFyIFAgPSAwO1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IHRoaXMsIEkgPSBbXSwgViA9IDA7IFYgPCBhcmd1bWVudHMubGVuZ3RoOyBWKyspXG4gICAgICAgICAgICBJW1ZdID0gYXJndW1lbnRzW1ZdO1xuICAgICAgICAgIFAgJiYgd2luZG93LmNsZWFyVGltZW91dChQKSwgUCA9ICgwLCBiLmRlZmF1bHQpKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgUCA9IDAsIGguY2FsbC5hcHBseShoLCBULl9fc3ByZWFkQXJyYXlzKFtqXSwgSSkpO1xuICAgICAgICAgIH0sIE4pO1xuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgaS5kZWJvdW5jZSA9IE07XG4gICAgICBmdW5jdGlvbiB5KGgpIHtcbiAgICAgICAgcmV0dXJuIHR5cGVvZiBoID09IFwiZnVuY3Rpb25cIjtcbiAgICAgIH1cbiAgICAgIGkuaXNGdW5jdGlvbiA9IHk7XG4gICAgICBmdW5jdGlvbiBCKGgpIHtcbiAgICAgICAgaWYgKCgwLCBkLmRlZmF1bHQpKGgpICE9PSBcIm9iamVjdFwiIHx8IHR5cGVvZiBoID09IFwiZnVuY3Rpb25cIiB8fCBoID09PSBudWxsKVxuICAgICAgICAgIHJldHVybiBoO1xuICAgICAgICB2YXIgTjtcbiAgICAgICAgKDAsIFMuZGVmYXVsdCkoaCkgJiYgKE4gPSBbXSksICgwLCBTLmRlZmF1bHQpKGgpIHx8IChOID0ge30pO1xuICAgICAgICBmb3IgKHZhciBQIGluIGgpXG4gICAgICAgICAgT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGgsIFApICYmIChOW1BdID0gQihoW1BdKSk7XG4gICAgICAgIHJldHVybiBOO1xuICAgICAgfVxuICAgICAgaS5kZWVwQ2xvbmUgPSBCO1xuICAgICAgZnVuY3Rpb24gJChoKSB7XG4gICAgICAgIHJldHVybiAoMCwgdi5kZWZhdWx0KShBcnJheS5wcm90b3R5cGUpLmNhbGwoaCk7XG4gICAgICB9XG4gICAgICBpLnRvQXJyYXkgPSAkO1xuICAgICAgZ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AgICAgICAgICAgICAgICB5ID0geS5jb250ZW50RG9jdW1lbnQuaGVhZDtcbiAgICAgICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgICAgICAgeSA9IG51bGw7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIEVbTV0gPSB5O1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gRVtNXTtcbiAgICAgICAgfTtcbiAgICAgIH0oKSwgYyA9IFtdO1xuICAgICAgZnVuY3Rpb24gcChBKSB7XG4gICAgICAgIGZvciAodmFyIEUgPSAtMSwgQyA9IDA7IEMgPCBjLmxlbmd0aDsgQysrKVxuICAgICAgICAgIGlmIChjW0NdLmlkZW50aWZpZXIgPT09IEEpIHtcbiAgICAgICAgICAgIEUgPSBDO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICByZXR1cm4gRTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHYoQSwgRSkge1xuICAgICAgICBmb3IgKHZhciBDID0ge30sIE0gPSBbXSwgeSA9IDA7IHkgPCBBLmxlbmd0aDsgeSsrKSB7XG4gICAgICAgICAgdmFyIEIgPSBBW3ldLCAkID0gRS5iYXNlID8gQlswXSArIEUuYmFzZSA6IEJbMF0sIEYgPSBDWyRdIHx8IDAsIGsgPSBcIlwiLmNvbmNhdCgkLCBcIiBcIikuY29uY2F0KEYpO1xuICAgICAgICAgIENbJF0gPSBGICsgMTtcbiAgICAgICAgICB2YXIgaCA9IHAoayksIE4gPSB7IGNzczogQlsxXSwgbWVkaWE6IEJbMl0sIHNvdXJjZU1hcDogQlszXSB9O1xuICAgICAgICAgIGggIT09IC0xID8gKGNbaF0ucmVmZXJlbmNlcysrLCBjW2hdLnVwZGF0ZXIoTikpIDogYy5wdXNoKHsgaWRlbnRpZmllcjogaywgdXBkYXRlcjogdyhOLCBFKSwgcmVmZXJlbmNlczogMSB9KSwgTS5wdXNoKGspO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gYihBKSB7XG4gICAgICAgIHZhciBFID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcInN0eWxlXCIpLCBDID0gQS5hdHRyaWJ1dGVzIHx8IHt9O1xuICAgICAgICBpZiAodHlwZW9mIEMubm9uY2UgPiBcInVcIikge1xuICAgICAgICAgIHZhciBNID0gdC5uYztcbiAgICAgICAgICBNICYmIChDLm5vbmNlID0gTSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKE9iamVjdC5rZXlzKEMpLmZvckVhY2goZnVuY3Rpb24oQikge1xuICAgICAgICAgIEUuc2V0QXR0cmlidXRlKEIsIENbQl0pO1xuICAgICAgICB9KSwgdHlwZW9mIEEuaW5zZXJ0ID09IFwiZnVuY3Rpb25cIilcbiAgICAgICAgICBBLmluc2VydChFKTtcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgdmFyIHkgPSBkKEEuaW5zZXJ0IHx8IFwiaGVhZFwiKTtcbiAgICAgICAgICBpZiAoIXkpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJDb3VsZG4ndCBmaW5kIGEgc3R5bGUgdGFyZ2V0LiBUaGlzIHByb2JhYmx5IG1lYW5zIHRoYXQgdGhlIHZhbHVlIGZvciB0aGUgJ2luc2VydCcgcGFyYW1ldGVyIGlzIGludmFsaWQuXCIpO1xuICAgICAgICAgIHkuYXBwZW5kQ2hpbGQoRSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEU7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBTKEEpIHtcbiAgICAgICAgaWYgKEEucGFyZW50Tm9kZSA9PT0gbnVsbClcbiAgICAgICAgICByZXR1cm4gITE7XG4gICAgICAgIEEucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChBKTtcbiAgICAgIH1cbiAgICAgIHZhciBEID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBFID0gW107XG4gICAgICAg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iAqL1wiKSksIEEuc3R5bGVTaGVldClcbiAgICAgICAgICBBLnN0eWxlU2hlZXQuY3NzVGV4dCA9IE07XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIGZvciAoOyBBLmZpcnN0Q2hpbGQ7IClcbiAgICAgICAgICAgIEEucmVtb3ZlQ2hpbGQoQS5maXJzdENoaWxkKTtcbiAgICAgICAgICBBLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKE0pKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdmFyIHggPSBudWxsLCBSID0gMDtcbiAgICAgIGZ1bmN0aW9uIHcoQSwgRSkge1xuICAgICAgICB2YXIgQywgTSwgeTtcbiAgICAgICAgaWYgKEUuc2luZ2xldG9uKSB7XG4gICAgICAgICAgdmFyIEIgPSBSKys7XG4gICAgICAgICAgQyA9IHggfHwgKHggPSBiKEUpKSwgTSA9IFQuYmluZChudWxsLCBDLCBCLCAhMSksIHkgPSBULmJpbmQobnVsbCwgQywgQiwgITApO1xuICAgICAgICB9IGVsc2VcbiAgICAgICAgICBDID0gYihFKSwgTSA9IG0uYmluZChudWxsLCBDLCBFKSwgeSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgUyhDKTtcbiAgICAgICAgICB9O1xuICAgICAgICByZXR1cm4gTShBKSwgZnVuY3Rpb24oRikge1xuICAgICAgICAgIGlmIChGKSB7XG4gICAgICAgICAgICBpZiAoRi5jc3MgPT09IEEuY3NzICYmIEYubWVkaWEgPT09IEEubWVkaWEgJiYgRi5zb3VyY2VNYXAgPT09IEEuc291cmNlTWFwKVxuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBNKEEgPSBGKTtcbiAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgIHkoKTtcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICAgIG8uZXhwb3J0cyA9IGZ1bmN0aW9uKEEsIEUpIHtcbiAgICAgICAgRSA9IEUgfHwge30sICFFLnNpbmdsZXRvbiAmJiB0eXBlb2YgRS5zaW5nbGV0b24gIT0gXCJib29sZWFuXCIgJiYgKEUuc2luZ2xldG9uID0gcygpKSwgQSA9IEEgfHwgW107XG4gICAgICAgIHZhciBDID0gdihBLCBFKTtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHkpIHtcbiAgICAgICAgICBpZiAoeSA9IHkgfHwgW10sIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbCh5KSA9PT0gXCJbb2JqZWN0IEFycmF5XVwiKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBCID0gMDsgQiA8IEMubGVuZ3RoOyBCKyspIHtcbiAgICAgICAgICAgICAgdmFyICQgPSBDW0JdLCBGID0gcCgkKTtcbiAgICAgICAgICAgICAgY1tGXS5yZWZlcmVuY2VzLS07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gdih5LCBFKSwgaCA9IDA7IGggPCBDLmxlbmd0aDsgaCsrKSB7XG4gICAgICAgICAgICAgIHZhciBOID0gQ1toXSwgUCA9IHAoTik7XG4gICAgICAgICAgICAgIGNbUF0ucmVmZXJlbmNlcyA9PT0gMCAmJiAoY1tQXS51cGRhdGVyKCksIGMuc3BsaWNlKFAsIDEpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIEMgPSBrO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgIH07XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24oYykge1xuICAgICAgICB2YXIgcCA9IFtdO1xuICAgICAgICByZXR1cm4gcC50b1N0cmluZyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzLm1hcChmdW5jdGlvbihiKSB7XG4gICAgICAgICAgICB2YXIgUyA9IHMoYiwgYyk7XG4gICAgICAgICAgICByZXR1cm4gYlsyXSA/IFwiQG1lZGlhIFwiLmNvbmNhdCh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F0KGIuc291cmNlUm9vdCB8fCBcIlwiKS5jb25jYXQoVCwgXCIgKi9cIik7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIFt2XS5jb25jYXQoRCkuY29uY2F0KFtTXSkuam9pbihgXG5gKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW3ZdLmpvaW4oYFxuYCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBkKGMpIHtcbiAgICAgICAgdmFyIHAgPSBidG9hKHVuZXNjYXBlKGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeShjKSkpKSwgdiA9IFwic291cmNlTWFwcGluZ1VSTD1kYXRhOmFwcGxpY2F0aW9uL2pzb247Y2hhcnNldD11dGYtODtiYXNlNjQsXCIuY29uY2F0KHApO1xuICAgICAgICByZXR1cm4gXCIvKiMgXCIuY29uY2F0KHYsIFwiICovXCIpO1xuICAgICAgfVxuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgxNCksIGQgPSB0KDExKSwgYyA9IHQoMTYpLCBwID0gT2JqZWN0LmRlZmluZVByb3BlcnR5LCB2ID0ge30sIGIgPSBmdW5jdGlvbihEKSB7XG4gICAgICAgIHRocm93IEQ7XG4gICAgICB9O1xuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24oUywgRCkge1xuICAgICAgICBpZiAoYyh2LCBTKSlcbiAgICAgICAgICByZXR1cm4gdltTXTtcbiAgICAgICAgRCB8fCAoRCA9IHt9KTtcbiAgICAgICAgdmFyIFQgPSBbXVtTXSwgbSA9IGMoRCwgXCJBQ0NFU1NPUlNcIikgPyBELkFDQ0VTU09SUyA6ICExLCB4ID0gYyhELCAwKSA/IERbMF0gOiBiLCBSID0gYyhELCAxKSA/IERbMV0gOiB2b2lkIDA7XG4gICAgICAgIHJldHVybiB2W1NdID0gISFUICYmICFkKGZ1bmN0aW9uKCkge1xuICAgICAgICAgIGlmIChtICYmICFzKVx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xuICAgICAgICBmdW5jdGlvbiB4KFIsIHcsIEEpIHtcbiAgICAgICAgICB2YXIgRSA9IG0uY2FsbCh0aGlzLCBSLCB3KSB8fCB0aGlzO1xuICAgICAgICAgIEEudGl0bGUgPSB3LmkxOG5leHQudChcIm1lbnVzLmRyb3BMaXN0TWVudS5cIiArIEEudGl0bGUpO1xuICAgICAgICAgIHZhciBDID0gdy5jb25maWcubGFuZyA9PT0gXCJ6aC1DTlwiID8gXCJcIiA6IFwidy1lLWRyb3AtbGlzdC10bFwiO1xuICAgICAgICAgIGlmIChDICE9PSBcIlwiICYmIEEudHlwZSA9PT0gXCJsaXN0XCIpIHtcbiAgICAgICAgICAgIHZhciBNO1xuICAgICAgICAgICAgKDAsIGMuZGVmYXVsdCkoTSA9IEEubGlzdCkuY2FsbChNLCBmdW5jdGlvbihCKSB7XG4gICAgICAgICAgICAgIHZhciAkID0gQi4kZWxlbSwgRiA9IGIuZGVmYXVsdCgkLmNoaWxkcmVuKCkpO1xuICAgICAgICAgICAgICBpZiAoRi5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIGsgPSBGID09IG51bGwgPyB2b2lkIDAgOiBGLmdldE5vZGVOYW1lKCk7XG4gICAgICAgICAgICAgICAgayAmJiBrID09PSBcIklcIiAmJiAkLmFkZENsYXNzKEMpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIHkgPSBuZXcgRC5kZWZhdWx0KEUsIEEpO1xuICAgICAgICAgIHJldHVybiBFLmRyb3BMaXN0ID0geSwgUi5vbihcImNsaWNrXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdmFyIEI7XG4gICAgICAgICAgICB3LnNlbGVjdGlvbi5nZXRSYW5nZSgpICE9IG51bGwgJiYgKFIuY3NzKFwiei1pbmRleFwiLCB3LnpJbmRleC5nZXQoXCJtZW51XCIpKSwgKDAsIGMuZGVmYXVsdCkoQiA9IH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CB0KSB7XG4gICAgICB2YXIgcyA9IHQoNDkpO1xuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24oZCkge1xuICAgICAgICByZXR1cm4gT2JqZWN0KHMoZCkpO1xuICAgICAgfTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMzkpLCBkID0gdCg3MiksIGMgPSB0KDI5KSwgcCA9IHQoMzQpLCB2ID0gdCg4OCksIGIgPSBbXS5wdXNoLCBTID0gZnVuY3Rpb24oVCkge1xuICAgICAgICB2YXIgbSA9IFQgPT0gMSwgeCA9IFQgPT0gMiwgUiA9IFQgPT0gMywgdyA9IFQgPT0gNCwgQSA9IFQgPT0gNiwgRSA9IFQgPT0gNSB8fCBBO1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24oQywgTSwgeSwgQikge1xuICAgICAgICAgIGZvciAodmFyICQgPSBjKEMpLCBGID0gZCgkKSwgayA9IHMoTSwgeSwgMyksIGggPSBwKEYubGVuZ3RoKSwgTiA9IDAsIFAgPSBCIHx8IHYsIGogPSBtID8gUChDLCBoKSA6IHggPyBQKEMsIDApIDogdm9pZCAwLCBJLCBWOyBoID4gTjsgTisrKVxuICAgICAgICAgICAgaWYgKChFIHx8IE4gaW4gRikgJiYgKEkgPSBGW05dLCBWID0gayhJLCBOLCAkKSwgVCkpIHtcbiAgICAgICAgICAgICAgaWYgKG0pXG4gICAgICAgICAgICAgICAgaltOXSA9IFY7XG4gICAgICAgICAgICAgIGVsc2UgaWYgKFYpXG4gICAgICAgICAgICAgICAgc3dpdGNoIChUKSB7XG4gICAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAhMDtcbiAgICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEk7XG4gICAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBOO1xuICAgICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBiLmNhbGwoaiwgSSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNlIGlmICh3KVxuICAgICAgICAgICAgICAgIHJldHVybiAhMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gQSA/IC0xIDogUiB8fCB3ID8gdyA6IGo7XG4gICAgICAgIH07XG4gICAgICB9O1xuICAgICAgby5leHBvcnRzID0ge1xuICAgICAgICBmb3JFYWNoOiBTKDApLFxuICAgICAgICBtYXA6IFMoMSksXG4gICAgICAgIGZpbHRlcjogUygyKSxcbiAgICAgICAgc29tZTogUygzKSxcbiAgICAgICAgZXZlcnk6IFMoNCksXG4gICAgICAgIGZpbmQ6IFMoNSksXG4gICAgICAgIGZpbmRJbmRleDogUyg2KVxuICAgICAgfTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICBvLmV4cG9ydHMgPSB0KDI4Myk7XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdmFyIHMgPSB0KDApLCBkID0gcyh0KDEpKSwgYyA9IHModCg0KSksIHAgPSBzKHQoMzEpKSwgdiA9IHModCgxMzEpKTtcbiAgICAgICgwLCBkLmRlZmF1bHQpKGksIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiAhMCB9KTtcbiAgICAgIHZhciBiID0gdCgyKSwgUyA9IGIuX19pbXBvcnREZWZhdWx0KHQoMykpLCBEID0gdCg3KSwgVCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBmdW5jdGlvbiBtKHgsIFIpIHtcbiAgICAgICAgICB0aGlzLm1lbnUgPSB4LCB0aGlzLmNvbmYgPSBSLCB0aGlzLiRjb250YWluZXIgPSBTLmRlZmF1bHQoJzxkaXYgY2xhc3M9XCJ3LWUtcGFuZWwtY29udGFpbmVyXCI+PC9kaXY+Jyk7XG4gICAgICAgICAgdmFyIHcgPSB4LmV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ZXhcIiwgUi5lZGl0b3IuekluZGV4LmdldChcInBhbmVsXCIpKTtcbiAgICAgICAgICAgIHZhciBGID0gUy5kZWZhdWx0KCc8aSBjbGFzcz1cInctZS1pY29uLWNsb3NlIHctZS1wYW5lbC1jbG9zZVwiPjwvaT4nKTtcbiAgICAgICAgICAgIEEuYXBwZW5kKEYpLCBGLm9uKFwiY2xpY2tcIiwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIHgucmVtb3ZlKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciBrID0gUy5kZWZhdWx0KCc8dWwgY2xhc3M9XCJ3LWUtcGFuZWwtdGFiLXRpdGxlXCI+PC91bD4nKSwgaCA9IFMuZGVmYXVsdCgnPGRpdiBjbGFzcz1cInctZS1wYW5lbC10YWItY29udGVudFwiPjwvZGl2PicpO1xuICAgICAgICAgICAgQS5hcHBlbmQoaykuYXBwZW5kKGgpO1xuICAgICAgICAgICAgdmFyIE4gPSB3LmhlaWdodDtcbiAgICAgICAgICAgIE4gJiYgaC5jc3MoXCJoZWlnaHRcIiwgTiArIFwicHhcIikuY3NzKFwib3ZlcmZsb3cteVwiLCBcImF1dG9cIik7XG4gICAgICAgICAgICB2YXIgUCA9IHcudGFicyB8fCBbXSwgaiA9IFtdLCBJID0gW107XG4gICAgICAgICAgICAoMCwgYy5kZWZhdWx0KShQKS5jYWxsKFAsIGZ1bmN0aW9uKFcsIFEpIHtcbiAgICAgICAgICAgICAgaWYgKCEhVykge1xuICAgICAgICAgICAgICAgIHZhciBYID0gVy50aXRsZSB8fCBcIlwiLCBKID0gVy50cGwgfHwgXCJcIiwgWiA9IFMuZGVmYXVsdCgnPGxpIGNsYXNzPVwidy1lLWl0ZW1cIj4nICsgWCArIFwiPC9saT5cIik7XG4gICAgICAgICAgICAgICAgay5hcHBlbmQoWik7XG4gICAgICAgICAgICAgICAgdmFyIGRlID0gUy5kZWZhdWx0KEopO1xuICAgICAgICAgICAgICAgIGguYXBwZW5kKGRlKSwgai5wdXNoKFopLCBJLnB1c2goZGUpLCBRID09PSAwID8gKFouZGF0YShcImFjdGl2ZVwiLCAhMCksIFouYWRkQ2xhc3MoXCJ3LWUtYWN0aXZlXCIpKSA6IGRlLmhpZGUoKSwgWi5vbihcImNsaWNrXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgWi5kYXRhKFwiYWN0aXZlXCIpIHx8ICgoMCwgYy5kZWZhdWx0KShqKS5jYWxsKGosIGZ1bmN0aW9uKHZlKSB7XG4gICAgICAgICAgICAgICAgICAgIHZlLmRhdGEoXCJhY3RpdmVcIiwgITEpLCB2ZS5yZW1vdmVDbGFzcyhcInctZS1hY3RpdmVcIik7XG4gICAgICAgICAgICAgICAgICB9KSwgKDAsIGMuZGVmYXVsdCkoSSkuY2FsbChJLCBmdW5jdGlvbih2ZSkge1xuICAgICAgICAgICAgICAgICAgICB2ZS5oaWRlKCk7XG4gICAgICAgICAgICAgICAgICB9KSwgWi5kYXRhKFwiYWN0aXZlXCIsICEwKSwgWi5hZGRDbGFzcyhcInctZS1hY3RpdmVcIiksIGRlLnNob3coKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pLCBBLm9uKFwiY2xpY2tcIiwgZnVuY3Rpb24oVykge1xuICAgICAgICAgICAgICBXLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgfSksIFIuJGVsZW0uYXBwZW5kKEEpLCAoMCwgYy5kZWZhdWx0KShQKS5jYWxsKFAsIGZ1bmN0aW9uKFcsIFEpIHtcbiAgICAgICAgICAgICAgaWYgKCEhVykge1xuICAgICAgICAgICAgICAgIHZhciBYID0gVy5ldmVudHMgfHwgW107XG4gICAgICAgICAgICAgICAgKDAsIGMuZGVmYXVsdCkoWCkuY2FsbChYLCBmdW5jdGlvbihKKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgWiwgZGUgPSBKLnNlbGVjdG9yLCB2ZSA9IEoudHlwZSwgc2UgPSBKLmZuIHx8IEQuRU1QVFlfRk4sIG1lID0gSVtRXSwgbGUgPSAoWiA9IEouYmluZEVudGVyKSAhPT0gbnVsbCAmJiBaICE9PSB2b2lkIDAgPyBaIDogITEsIGllID0gZnVuY3Rpb24odGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGIuX19hd2FpdGVyKHgsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGIuX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24oQWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoQWUubGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0ZS5zdG9wUHJvcGFnYXRpb24oKSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlKHRlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2UgPSBBZS5zZW50KCksIGdlICYmIHRoaXMucmVtb3ZlKCksIFsyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkobWUpLmNhbGwobWUsIGRlKS5vbih2ZSwgaWUpLCBsZSAmJiB2ZSA9PT0gXCJjbGlja1wiICYmIG1lLm9uKFwia2V5dXBcIiwgZnVuY3Rpb24ocGUpIHtcbiAgICAg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HtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9zaG93O1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZW51bWVyYWJsZTogITEsXG4gICAgICAgICAgY29uZmlndXJhYmxlOiAhMFxuICAgICAgICB9KSwgRDtcbiAgICAgIH0oKTtcbiAgICAgIGkuZGVmYXVsdCA9IFM7XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdmFyIHMgPSB0KDQwKTtcbiAgICAgIG8uZXhwb3J0cyA9IGZ1bmN0aW9uKGQsIGMsIHApIHtcbiAgICAgICAgaWYgKHMoZCksIGMgPT09IHZvaWQgMClcbiAgICAgICAgICByZXR1cm4gZDtcbiAgICAgICAgc3dpdGNoIChwKSB7XG4gICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICByZXR1cm4gZC5jYWxsKGMpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odikge1xuICAgICAgICAgICAgICByZXR1cm4gZC5jYWxsKGMsIHYpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odiwgYikge1xuICAgICAgICAgICAgICByZXR1cm4gZC5jYWxsKGMsIHYsIGIpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odiwgYiwgUykge1xuICAgICAgICAgICAgICByZXR1cm4gZC5jYWxsKGMsIHYsIGIsIFMpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgcmV0dXJuIGQuYXBwbHkoYywgYXJndW1lbnRzKTtcbiAgICAgICAgfTtcbiAgICAgIH07XG4gICAgfSwgZnVuY3Rpb24obyw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9IHQoMTkpLCB2ID0gdCg0MyksIGIgPSB0KDEwKSwgUyA9IGIoXCJ0b1N0cmluZ1RhZ1wiKTtcbiAgICAgIGZvciAodmFyIEQgaW4gcykge1xuICAgICAgICB2YXIgVCA9IGRbRF0sIG0gPSBUICYmIFQucHJvdG90eXBlO1xuICAgICAgICBtICYmIGMobSkgIT09IFMgJiYgcChtLCBTLCBEKSwgdltEXSA9IHYuQXJyYXk7XG4gICAgICB9XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdmFyIHMgPSB0KDMzKTtcbiAgICAgIG8uZXhwb3J0cyA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24oYykge1xuICAgICAgICByZXR1cm4gcyhjKSA9PSBcIkFycmF5XCI7XG4gICAgICB9O1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgxMSksIGQgPSB0KDEwKSwgYyA9IHQoODYpLCBwID0gZChcInNwZWNpZXNcIik7XG4gICAgICBvLmV4cG9ydHMgPSBmdW5jdGlvbih2KSB7XG4gICAgICAgIHJldHVybiBjID49IDUxIHx8ICFzKGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZhciBiID0gW10sIFMgPSBiLmNvbnN0cnVjdG9yID0ge307XG4gICAgICAgICAgcmV0dXJuIFNbcF0gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiB7IGZvbzogMSB9O1xuICAgICAgICAgIH0sIGJbdl0oQm9vbGVhbikuZm9vICE9PSAxO1xuICAgICAgICB9KTtcbiAgICAgIH07XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgby5leHBvcnRzID0gdCgyMjIpO1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgwKSwgZCA9IHModCgxKSk7XG4gICAgICAoMCwgZC5kZWZhdWx0KShpLCBcIl9fZXNNb2R1bGVcIiwgeyB2YW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ldCBpcyBub3QgaXRlcmFibGVcIik7XG4gICAgICAgICAgaWYgKGQoQykpIHtcbiAgICAgICAgICAgIGZvciAoTSA9IDAsIHkgPSBjKFQubGVuZ3RoKTsgeSA+IE07IE0rKylcbiAgICAgICAgICAgICAgaWYgKEIgPSBSID8gQShzKEYgPSBUW01dKVswXSwgRlsxXSkgOiBBKFRbTV0pLCBCICYmIEIgaW5zdGFuY2VvZiBTKVxuICAgICAgICAgICAgICAgIHJldHVybiBCO1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBTKCExKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgRSA9IEMuY2FsbChUKTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKCQgPSBFLm5leHQ7ICEoRiA9ICQuY2FsbChFKSkuZG9uZTsgKVxuICAgICAgICAgIGlmIChCID0gYihFLCBBLCBGLnZhbHVlLCBSKSwgenQoQikgPT0gXCJvYmplY3RcIiAmJiBCICYmIEIgaW5zdGFuY2VvZiBTKVxuICAgICAgICAgICAgcmV0dXJuIEI7XG4gICAgICAgIHJldHVybiBuZXcgUyghMSk7XG4gICAgICB9O1xuICAgICAgRC5zdG9wID0gZnVuY3Rpb24oVCkge1xuICAgICAgICByZXR1cm4gbmV3IFMoITAsIFQpO1xuICAgICAgfTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMTEpO1xuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24oZCwgYykge1xuICAgICAgICB2YXIgcCA9IFtdW2RdO1xuICAgICAgICByZXR1cm4gISFwICYmIHMoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgcC5jYWxsKG51bGwsIGMgfHwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICB0aHJvdyAxO1xuICAgICAgICAgIH0sIDEpO1xuICAgICAgICB9KTtcbiAgICAgIH07XG4gICAgfSwgZnVuY3Rpb24obywgaSkge1xuICAgICAgby5leHBvcnRzID0gYFx0XG5cXHZc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zNiksIGIgPSB0KDE5KSwgUyA9IHQoNTMpLCBEID0gdCgxMCksIFQgPSB0KDQyKSwgbSA9IHQoNDMpLCB4ID0gdCgxMDMpLCBSID0geC5JdGVyYXRvclByb3RvdHlwZSwgdyA9IHguQlVHR1lfU0FGQVJJX0lURVJBVE9SUywgQSA9IEQoXCJpdGVyYXRvclwiKSwgRSA9IFwia2V5c1wiLCBDID0gXCJ2YWx1ZXNcIiwgTSA9IFwiZW50cmllc1wiLCB5ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfTtcbiAgICAgIG8uZXhwb3J0cyA9IGZ1bmN0aW9uKEIsICQsIEYsIGssIGgsIE4sIFApIHtcbiAgICAgICAgZChGLCAkLCBrKTtcbiAgICAgICAgdmFyIGogPSBmdW5jdGlvbihtZSkge1xuICAgICAgICAgIGlmIChtZSA9PT0gaCAmJiBYKVxuICAgICAgICAgICAgcmV0dXJuIFg7XG4gICAgICAgICAgaWYgKCF3ICYmIG1lIGluIFcpXG4gICAgICAgICAgICByZXR1cm4gV1ttZV07XG4gICAgICAgICAgc3dpdGNoIChtZSkge1xuICAgICAgICAgICAgY2FzZSBFOlxuICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGKHRoaXMsIG1lKTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgQzpcbiAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRih0aGlzLCBtZSk7XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjYXNlIE06XG4gICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEYodGhpcywgbWUpO1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZnV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aXRlKEEoXCJkb2N1bWVudC5GPU9iamVjdFwiKSksIGsuY2xvc2UoKSwgay5GO1xuICAgICAgfSwgTSwgeSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIE0gPSBkb2N1bWVudC5kb21haW4gJiYgbmV3IEFjdGl2ZVhPYmplY3QoXCJodG1sZmlsZVwiKTtcbiAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgIH1cbiAgICAgICAgeSA9IE0gPyBFKE0pIDogQygpO1xuICAgICAgICBmb3IgKHZhciAkID0gYy5sZW5ndGg7ICQtLTsgKVxuICAgICAgICAgIGRlbGV0ZSB5W21dW2NbJF1dO1xuICAgICAgICByZXR1cm4geSgpO1xuICAgICAgfTtcbiAgICAgIHBbUl0gPSAhMCwgby5leHBvcnRzID0gT2JqZWN0LmNyZWF0ZSB8fCBmdW5jdGlvbigkLCBGKSB7XG4gICAgICAgIHZhciBrO1xuICAgICAgICByZXR1cm4gJCAhPT0gbnVsbCA/ICh3W21dID0gcygkKSwgayA9IG5ldyB3KCksIHdbbV0gPSBudWxsLCBrW1JdID0gJCkgOiBrID0geSgpLCBGID09PSB2b2lkIDAgPyBrIDogZChrLCBGKTtcbiAgICAgIH07XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdmFyIHMgPSB0KDI4KSwgZCA9IHQoMzQpLCBjID0gdCg3OSksIHAgPSBmdW5jdGlvbihiKSB7XG4gICAgICAgIHJldHVybiBmdW5jdGlvbihTLCBELCBUKSB7XG4gICAgICAgICAgdmFyIG0gPSBzKFMpLCB4ID0gZChtLmxlbmd0aCksIFIgPSBjKFQsIHgpLCB3O1xuICAgICAgICAgIGlmIChiICYmIEQgIT0gRCkge1xuICAgICAgICAgICAgZm9yICg7IHggPiBSOyApXG4gICAgICAgICAgICAgIGlmICh3ID0gbVtSKytdLCB3ICE9IHcpXG4gICAgICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgIH0gZWxzZV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IEUudXBsb2FkSW1nSGVhZGVycywgSSA9IEUudXBsb2FkSW1nSG9va3MsIFYgPSBFLnVwbG9hZEltZ1RpbWVvdXQsIFcgPSBFLndpdGhDcmVkZW50aWFscywgUSA9IEUuY3VzdG9tVXBsb2FkSW1nO1xuICAgICAgICAgICAgaWYgKCEoIVEgJiYgIXkgJiYgIUIpKSB7XG4gICAgICAgICAgICAgIHZhciBYID0gW10sIEogPSBbXTtcbiAgICAgICAgICAgICAgaWYgKFMuYXJyRm9yRWFjaChSLCBmdW5jdGlvbihsZSkge1xuICAgICAgICAgICAgICAgIGlmICghIWxlKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgaWUgPSBsZS5uYW1lIHx8IGxlLnR5cGUucmVwbGFjZShcIi9cIiwgXCIuXCIpLCBwZSA9IGxlLnNpemU7XG4gICAgICAgICAgICAgICAgICBpZiAoISghaWUgfHwgIXBlKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGUgPSBBLmNvbmZpZy51cGxvYWRJbWdBY2NlcHQuam9pbihcInxcIiksIGdlID0gXCIuKFwiICsgdGUgKyBcIikkXCIsIEFlID0gbmV3IFJlZ0V4cChnZSwgXCJpXCIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoQWUudGVzdChpZSkgPT09ICExKSB7XG4gICAgICAgICAgICAgICAgICAgICAgSi5wdXNoKFwiXFx1MzAxMFwiICsgaWUgKyBcIlxcdTMwMTFcIiArIE0oXCJcXHU0RTBEXFx1NjYyRlxcdTU2RkVcXHU3MjQ3XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCQgPCBwZSkge1xuICAgICAgICAgICAgICAgICAgICAgIEoucHVzaChcIlxcdTMwMTBcIiArIGllICsgXCJcXHUzMDExXCIgKyBNKFwiXFx1NTkyN1xcdTRFOEVcIikgKyBcIiBcIiArIEYgKyBcIk1cIik7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIFgucHVzaChsZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSwgSi5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBFLmN1c3RvbUFsZXJ0KE0oXCJcXHU1NkZFXFx1NzI0N1xcdTlBOENcXHU4QkMxXFx1NjcyQVxcdTkwMUFcXHU4RkM3XCIpICsgYDogXG5gICsgSi5qb2luKGBcbmApLCBcIndhcm5pbmdcIik7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChYLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIEUuY3VzdG9tQWxlcnQoTShcIlxcdTRGMjBcXHU1MTY1XFx1NzY4NFxcdTY1ODdcXHU0RUY2XFx1NEUwRFxcdTU0MDhcXHU2Q0Q1XCIpLCBcIndhcm5pbmdcIik7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChYLmxlbmd0aCA+IGspIHtcbiAgICAgICAgICAgICAgICBFLmN1c3RvbUFsZXJ0KE0oXCJcXHU0RTAwXFx1NkIyMVxcdTY3MDBcXHU1OTFBXFx1NEUwQVxcdTRGMjBcIikgKyBrICsgTShcIlxcdTVGMjBcXHU1NkZFXFx1NzI0N1wiKSwgXCJ3YXJuaW5nXCIpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoUSAmJiB0eXBlb2YgUSA9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgWjtcbiAgICAgICAgICAgICAgICBRKFgsICgwLCBjLmRlZmF1bHQpKFogPSB0aGlzLmluc2VydEltZykuY2FsbChaLCB0aGlzKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHZhciBkZSA9IG5ldyBGb3JtRGF0YSgpO1xuICAgICAgICAgICAgICBpZiAoKDAsIHAuZGVmYXVsdCkoWCkuY2FsbChYLCBmdW5jdGlvbihsZSwgaWUpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGUgPSBoIHx8IGxlLm5hbWU7XG4gICAgICAgICAgICAgICAgWC5sZW5ndGggPiAxICYmIChwZSA9IHBlICsgKGllICsgMSkpLCBkZS5hcHBlbmQocGUsIGxlKTtcbiAgICAgICAgICAgICAgfSksIHkpIHtcbiAgICAgICAgICAgICAgICB2YXIgdmUgPSB5LnNwbGl0KFwiI1wiKTtcbiAgICAgICAgICAgICAgICB5ID0gdmVbMF07XG4gICAgICAgICAgICAgICAgdmFyIHNlID0gdmVbMV0gfHwgXCJcIjtcbiAgICAgICAgICAgICAgICAoMCwgcC5kZWZhdWx0KShTKS5jYWxsKFMsIE4sIGZ1bmN0aW9uKGxlLCBpZSkge1xuICAgICAgICAgICAgICAgICAgUCAmJiAoKDAsIHYuZGVmYXVsdCkoeSkuY2FsbCh5LCBcIj9cIikgPiAwID8geSArPSBcIiZcIiA6IHkgKz0gXCI/XCIsIHkgPSB5ICsgbGUgKyBcIj1cIiArIGllKSwgZGUuYXBwZW5kKGxlLCBpZSk7XG4gICAgICAgICAgICAgICAgfSksIHNlICYmICh5ICs9IFwiI1wiICsgc2UpO1xuICAgICAgICAgICAgICAgIHZhciBtZSA9IEQuZGVmYXVsdCh5LCB7IHRpbWVvdXQ6IFYsIGZvcm1EYXRhOiBkZSwgaGVhZGVyczogaiwgd2l0aENyZWRlbnRpYWxzOiAhIVcsIGJlZm9yZVNlbmQ6IGZ1bmN0aW9uKGllKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoSS5iZWZvcmUpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBJLmJlZm9yZShpZSwgQSwgWCk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AgICAgICAoMCwgcC5kZWZhdWx0KShnZSkuY2FsbChnZSwgZnVuY3Rpb24oQWUpIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZW9mIEFlID09IFwic3RyaW5nXCIgPyB3Lmluc2VydEltZyhBZSkgOiB3Lmluc2VydEltZyhBZS51cmwsIEFlLmFsdCwgQWUuaHJlZik7XG4gICAgICAgICAgICAgICAgICB9KSwgSS5zdWNjZXNzICYmIEkuc3VjY2VzcyhpZSwgQSwgcGUpO1xuICAgICAgICAgICAgICAgIH0gfSk7XG4gICAgICAgICAgICAgICAgdHlwZW9mIG1lID09IFwic3RyaW5nXCIgJiYgRS5jdXN0b21BbGVydChtZSwgXCJlcnJvclwiKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgQiAmJiBTLmFyckZvckVhY2goUiwgZnVuY3Rpb24obGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgaWUgPSB3LCBwZSA9IG5ldyBGaWxlUmVhZGVyKCk7XG4gICAgICAgICAgICAgICAgcGUucmVhZEFzRGF0YVVSTChsZSksIHBlLm9ubG9hZCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgaWYgKCEhdGhpcy5yZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRlID0gdGhpcy5yZXN1bHQudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgaWUuaW5zZXJ0SW1nKHRlLCB0ZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCB4O1xuICAgICAgfSgpO1xuICAgICAgaS5kZWZhdWx0ID0gbTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMCksIGQgPSBzKHQoMSkpLCBjID0gcyh0KDQxMC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ZU5vZGUoITApKSwgeS5ub2RlTmFtZSAhPT0gXCJCUlwiICYmIE0ucHVzaCh5KSksIFQoeSwgUikpIHtcbiAgICAgICAgICAgICAgaWYgKHkubm9kZVR5cGUgPT09IDEpIHtcbiAgICAgICAgICAgICAgICB2YXIgQiA9IEQoeSwgUiwgdyk7XG4gICAgICAgICAgICAgICAgQiAmJiBCLnRleHRDb250ZW50ICE9PSBcIlwiICYmIChFID09IG51bGwgfHwgRS5hcHBlbmRDaGlsZChCKSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKHkubm9kZVR5cGUgPT09IDMgJiYgUi5pc0VxdWFsTm9kZSh5KSkge1xuICAgICAgICAgICAgICAgIHZhciAkID0gbSh5LCB3KTtcbiAgICAgICAgICAgICAgICBFLnRleHRDb250ZW50ID0gJDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBDID0gITA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksICgwLCBwLmRlZmF1bHQpKE0pLmNhbGwoTSwgZnVuY3Rpb24oeSkge1xuICAgICAgICAgICAgdmFyIEIgPSB5O1xuICAgICAgICAgICAgQi5yZW1vdmUoKTtcbiAgICAgICAgICB9KSwgRTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaS5nZXRDdXJzb3JOZXh0Tm9kZSA9IEQ7XG4gICAgICBmdW5jdGlvbiBUKHgsIFIpIHtcbiAgICAgICAgcmV0dXJuIHgubm9kZVR5cGUgPT09IDMgPyB4Lm5vZGVWYWx1ZSA9PT0gUi5ub2RlVmFsdWUgOiB4LmNvbnRhaW5zKFIpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gbSh4LCBSLCB3KSB7XG4gICAgICAgIHcgPT09IHZvaWQgMCAmJiAodyA9ICEwKTtcbiAgICAgICAgdmFyIEEgPSB4Lm5vZGVWYWx1ZSwgRSA9IEEgPT0gbnVsbCA/IHZvaWQgMCA6ICgwLCB2LmRlZmF1bHQpKEEpLmNh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yZXR1cm47XG4gICAgICAgICAgdGhyb3cgYiAhPT0gdm9pZCAwICYmIHMoYi5jYWxsKGQpKSwgUztcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMTApLCBkID0gcyhcIml0ZXJhdG9yXCIpLCBjID0gITE7XG4gICAgICB0cnkge1xuICAgICAgICB2YXIgcCA9IDAsIHYgPSB7IG5leHQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB7IGRvbmU6ICEhcCsrIH07XG4gICAgICAgIH0sIHJldHVybjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgYyA9ICEwO1xuICAgICAgICB9IH07XG4gICAgICAgIHZbZF0gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSwgQXJyYXkuZnJvbSh2LCBmdW5jdGlvbigpIHtcbiAgICAgICAgICB0aHJvdyAyO1xuICAgICAgICB9KTtcbiAgICAgIH0gY2F0Y2gge1xuICAgICAgfVxuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24oYiwgUykge1xuICAgICAgICBpZiAoIVMgJiYgIWMpXG4gICAgICAgICAgcmV0dXJuICExO1xuICAgICAgICB2YXIgRCA9ICExO1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHZhciBUID0ge307XG4gICAgICAgICAgVFtkXSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgcmV0dXJuIHsgbmV4dDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIHJldHVybiB7IGRvbmU6IEQgPSAhMCB9O1xuICAgICAgICAgICAgfSB9O1xuICAgICAgICAgIH0sIGIoVCk7XG4gICAgICAgIH0gY2F0Y2gge1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBEO1xuICAgICAgfTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMjU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iZW50cmllc1wiXSwgZnVuY3Rpb24oSSkge1xuICAgICAgICAgICAgdmFyIFYgPSBJID09IFwiYWRkXCIgfHwgSSA9PSBcInNldFwiO1xuICAgICAgICAgICAgSSBpbiBoICYmICEoJCAmJiBJID09IFwiY2xlYXJcIikgJiYgdihQLnByb3RvdHlwZSwgSSwgZnVuY3Rpb24oVywgUSkge1xuICAgICAgICAgICAgICB2YXIgWCA9IGoodGhpcykuY29sbGVjdGlvbjtcbiAgICAgICAgICAgICAgaWYgKCFWICYmICQgJiYgIUQoVykpXG4gICAgICAgICAgICAgICAgcmV0dXJuIEkgPT0gXCJnZXRcIiA/IHZvaWQgMCA6ICExO1xuICAgICAgICAgICAgICB2YXIgSiA9IFhbSV0oVyA9PT0gMCA/IDAgOiBXLCBRKTtcbiAgICAgICAgICAgICAgcmV0dXJuIFYgPyB0aGlzIDogSjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pLCAkIHx8IG0oUC5wcm90b3R5cGUsIFwic2l6ZVwiLCB7IGNvbmZpZ3VyYWJsZTogITAsIGdldDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZXR1cm4gaih0aGlzKS5jb2xsZWN0aW9uLnNpemU7XG4gICAgICAgICAgfSB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gVChQLCBDLCAhMSwgITApLCBOW0NdID0gUCwgcyh7IGdsb2JhbDogITAsIGZvcmNlZDogITAgfSwgTiksICQgfHwgeS5zZXRTdHJvbmcoUCwgQywgQiksIFA7XG4gICAgICB9O1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCg1MSksIGQgPSB0KDEzKSwgYyA9IHQoMTYpLCBwID0gdCgxOCkuZiwgdiA9IHQoNjQpLCBiID0gdCgyMDApLCBTID0gdihcIm1ldGFcIiksIEQgPSAwLCBUID0gT2JqZWN0LmlzRXh0ZW5zaWJsZSB8fCBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuICEwO1xuICAgICAgfSwgbSA9IGZ1bmN0aW9uKEMpIHtcbiAgICAgICAgcChDLCBTLCB7IHZhbHVlOiB7XG4gICAgICAgICAgb2JqZWN0SUQ6IFwiT1wiICsgKytELFxuICAgICAgICAgIHdlYWtEYXRhOiB7fVxuICAgICAgICB9IH0pO1xuICAgICAgfSwgeCA9IGZ1bmN0aW9uKEMsIE0pIHtcbiAgICAgICAgaWYgKCFkKEMpKVxuICAgICAgICAgIHJldHVybiB6dChDKSA9PSBcInN5bWJvbFwiID8gQyA6ICh0eXBlb2YgQyA9PSBcInN0cmluZ1wiID8gXCJTXCIgOiBcIlBcIikgKyBDO1xuICAgICAgICBpZiAoIWMoQywgUykpIHtcbiAgICAgICAgICBpZiAoIVQoQykpXG4gICAgICAgICAgICByZXR1cm4gXCJGXCI7XG4gICAgICAgICAgaWYgKCFNKVxuICAgICAgICAgICAgcmV0dXJuIFwiRVwiO1xuICAgICAgICAgIG0oQyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENbU10ub2JqZWN0SUQ7XG4gICAgICB9LCBSID0gZnVuY3Rpb24oQywgTSkge1xuICAgICAgICBpZiAoIWMoQywgUykpIHtcbiAgICAgICAgICBpZiAoIVQoQykpXG4gICAgICAgICAgICByZXR1cm4gITA7XG4gICAgICAgICAgaWYgKCFNKVxuICAgICAgICAgICAgcmV0dXJuICExO1xuICAgICAgICAgIG0oQyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENbU10ud2Vha0RhdGE7XG4gICAgICB9LCB3ID0gZnVuY3Rpb24oQykge1xuICAgICAgICByZXR1cm4gYiAmJiBBLlJFUVVJUkVEICYmIFQoQykgJiYgIWMoQywgUykgJiYgbShDKSwgQztcbiAgICAgIH0sIEEgPSBvLmV4cG9ydHMgPSB7IFJFUVVJUkVEOiAhMSwgZmFzdEtleTogeCwgZ2V0V2Vha0RhdGE6IFIsIG9uRnJlZXplOiB3IH07XG4gICAgICBzW1NdID0gITA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AkKE4pLCBJID0gbShQKSwgVjtcbiAgICAgICAgICBpZiAoSSAhPT0gXCJGXCIpXG4gICAgICAgICAgICByZXR1cm4gai5pbmRleFtJXTtcbiAgICAgICAgICBmb3IgKFYgPSBqLmZpcnN0OyBWOyBWID0gVi5uZXh0KVxuICAgICAgICAgICAgaWYgKFYua2V5ID09IFApXG4gICAgICAgICAgICAgIHJldHVybiBWO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gYyhCLnByb3RvdHlwZSwge1xuICAgICAgICAgIGNsZWFyOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGZvciAodmFyIE4gPSB0aGlzLCBQID0gJChOKSwgaiA9IFAuaW5kZXgsIEkgPSBQLmZpcnN0OyBJOyApXG4gICAgICAgICAgICAgIEkucmVtb3ZlZCA9ICEwLCBJLnByZXZpb3VzICYmIChJLnByZXZpb3VzID0gSS5wcmV2aW91cy5uZXh0ID0gdm9pZCAwKSwgZGVsZXRlIGpbSS5pbmRleF0sIEkgPSBJLm5leHQ7XG4gICAgICAgICAgICBQLmZpcnN0ID0gUC5sYXN0ID0gdm9pZCAwLCBUID8gUC5zaXplID0gMCA6IE4uc2l6ZSA9IDA7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBkZWxldGU6IGZ1bmN0aW9uKE4pIHtcbiAgICAgICAgICAgIHZhciBQID0gdGhpcywgaiA9ICQoUCksIEkgPSBrKFAsIE4pO1xuICAgICAgICAgICAgaWYgKEkpIHtcbiAgICAgICAgICAgICAgdmFyIFYgPSBJLm5leHQsIFcgPSBJLnByZXZpb3VzO1xuICAgICAgICAgICAgICBkZWxldGUgai5pbmRleFtJLmluZGV4XSwgSS5yZW1vdmVkID0gITAsIFcgJiYgKFcubmV4dCA9IFYpLCBWICYmIChWLnByZXZpb3VzID0gVyksIGouZmlyc3QgPT0gSSAmJiAoai5maXJzdCA9IFYpLCBqLmxhc3QgPT0gSSAmJiAoai5sYXN0ID0gVyksIFQgPyBqLnNpemUtLSA6IFAuc2l6ZS0tO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuICEhSTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGZvckVhY2g6IGZ1bmN0aW9uKE4pIHtcbiAgICAgICAgICAgIGZvciAodmFyIFAgPSAkKHRoaXMpLCBqID0gcChOLCBhcmd1bWVudHMubGVuZ3RoID4gMSA/IGFyZ3VtZW50c1sxXSA6IHZvaWQgMCwgMyksIEk7IEkgPSBJID8gSS5uZXh0IDogUC5maXJzdDsgKVxuICAgICAgICAgICAgICBmb3IgKGooSS52YWx1ZSwgSS5rZXksIHRoaXMpOyBJICYmIEkucmVtb3ZlZDsgKVxuICAgICAgICAgICAgICAgIEkgPSBJLnByZXZpb3VzO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgaGFzOiBmdW5jdGlvbihOKSB7XG4gICAgICAgICAgICByZXR1cm4gISFrKHRoaXMsIE4pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksIGMoQi5wcm90b3R5cGUsIE0gPyB7XG4gICAgICAgICAgZ2V0OiBmdW5jdGlvbihOKSB7XG4gICAgICAgICAgICB2YXIgUCA9IGsodGhpcywgTik7XG4gICAgICAgICAgICByZXR1cm4gUCAmJiBQLnZhbHVlO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgc2V0OiBmdW5jdGlvbihOLCBQKSB7XG4gICAgICAgICAgICByZXR1cm4gRih0aGlzLCBOID09PSAwID8gMCA6IE4sIFApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSA6IHtcbiAgICAgICAgICBhZGQ6IGZ1bmN0aW9uKE4pIHtcbiAgICAgICAgICAgIHJldHVybiBGKHRoaXMsIE4gPSBOID09PSAwID8gMCA6IE4sIE4pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksIFQgJiYgcyhCLnByb3RvdHlwZSwgXCJzaXplXCIsIHsgZ2V0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gJCh0aGlzKS5zaXplO1xuICAg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AgY29uc29sZS5lcnJvcihcIndhbmdFZGl0b3IgLSBcXHU4QkY3XFx1NkM0MlxcdThEODVcXHU2NUY2XCIpLCBELm9uVGltZW91dCAmJiBELm9uVGltZW91dChUKTtcbiAgICAgICAgfSwgVC51cGxvYWQgJiYgKFQudXBsb2FkLm9ucHJvZ3Jlc3MgPSBmdW5jdGlvbih4KSB7XG4gICAgICAgICAgdmFyIFIgPSB4LmxvYWRlZCAvIHgudG90YWw7XG4gICAgICAgICAgRC5vblByb2dyZXNzICYmIEQub25Qcm9ncmVzcyhSLCB4KTtcbiAgICAgICAgfSksIEQuaGVhZGVycyAmJiAoMCwgcC5kZWZhdWx0KSh2KS5jYWxsKHYsIEQuaGVhZGVycywgZnVuY3Rpb24oeCwgUikge1xuICAgICAgICAgIFQuc2V0UmVxdWVzdEhlYWRlcih4LCBSKTtcbiAgICAgICAgfSksIFQud2l0aENyZWRlbnRpYWxzID0gISFELndpdGhDcmVkZW50aWFscywgRC5iZWZvcmVTZW5kKSB7XG4gICAgICAgICAgdmFyIG0gPSBELmJlZm9yZVNlbmQoVCk7XG4gICAgICAgICAgaWYgKG0gJiYgKDAsIGQuZGVmYXVsdCkobSkgPT09IFwib2JqZWN0XCIgJiYgbS5wcmV2ZW50KVxuICAgICAgICAgICAgcmV0dXJuIG0ubXNnO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBULm9ucmVhZHlzdGF0ZWNoYW5nZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIGlmIChULnJlYWR5U3RhdGUgPT09IDQpIHtcbiAgICAgICAgICAgIHZhciB4ID0gVC5zdGF0dXM7XG4gICAgICAgICAgICBpZiAoISh4IDwgMjAwKSAmJiAhKHggPj0gMzAwICYmIHggPCA0MDApKSB7XG4gICAgICAgICAgICAgIGlmICh4ID49IDQwMCkge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJ3YW5nRWRpdG9yIC0gWEhSIFxcdTYyQTVcXHU5NTE5XFx1RkYwQ1xcdTcyQjZcXHU2MDAxXFx1NzgwMSBcIiArIHgpLCBELm9uRXJyb3IgJiYgRC5vbkVycm9yKFQpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgUiA9IFQucmVzcG9uc2VUZXh0LCB3O1xuICAgICAgICAgICAgICBpZiAoKDAsIGQuZGVmYXVsdCkoUikgIT09IFwib2JqZWN0XCIpXG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIHcgPSBKU09OLnBhcnNlKFIpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIndhbmdFZGl0b3IgLSBcXHU4RkQ0XFx1NTZERVxcdTdFRDNcXHU2NzlDXFx1NEUwRFxcdTY2MkYgSlNPTiBcXHU2ODNDXFx1NUYwRlwiLCBSKSwgRC5vbkZhaWwgJiYgRC5vbkZhaWwoVCwgUik7XG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgdyA9IFI7XG4gICAgICAgICAgICAgIEQub25TdWNjZXNzKFQsIHcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgVC5zZW5kKEQuZm9ybURhdGEgfHwgbnVsbCksIFQ7XG4gICAgICB9XG4gICAgICBpLmRlZmF1bHQgPSBiO1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgwKSwgZCA9IHModCgxKSksIGMgPSBzKHQoMzQyKSksIHAgPSBzKHQoNDYpKTtcbiAgICAgICgwLCBkLmRlZmF1bHQpKGksIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiAhMCB9KTtcbiAgICAgIHZhciB2ID0gdCgyKSwgYiA9IHYuX19pbXBvcnREZWZhdWx0KHQoMyk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gbGlzdDogW3sgJGVsZW06IHAuZGVmYXVsdChgXG4gICAgICAgICAgICAgICAgICAgICAgICA8cD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInctZS1pY29uLWxpc3QyIHctZS1kcm9wLWxpc3QtaXRlbVwiPjwvaT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgICsgUi5pMThuZXh0LnQoXCJtZW51cy5kcm9wTGlzdE1lbnUubGlzdC5cXHU2NUUwXFx1NUU4RlxcdTUyMTdcXHU4ODY4XCIpICsgYFxuICAgICAgICAgICAgICAgICAgICAgICAgPHA+YCksIHZhbHVlOiBELlVub3JkZXJlZExpc3QgfSwgeyAkZWxlbTogcC5kZWZhdWx0KGA8cD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInctZS1pY29uLWxpc3QtbnVtYmVyZWQgdy1lLWRyb3AtbGlzdC1pdGVtXCI+PC9pPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAgKyBSLmkxOG5leHQudChcIm1lbnVzLmRyb3BMaXN0TWVudS5saXN0LlxcdTY3MDlcXHU1RThGXFx1NTIxN1xcdTg4NjhcIikgKyBgXG4gICAgICAgICAgICAgICAgICAgICAgICA8cD5gKSwgdmFsdWU6IEQuT3JkZXJlZExpc3QgfV0sIGNsaWNrSGFuZGxlcjogZnVuY3Rpb24oTSkge1xuICAgICAgICAgICAgdy5jb21tYW5kKE0pO1xuICAgICAgICAgIH0gfTtcbiAgICAgICAgICByZXR1cm4gdyA9IG0uY2FsbCh0aGlzLCBBLCBSLCBFKSB8fCB0aGlzLCB3O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB4LnByb3RvdHlwZS5jb21tYW5kID0gZnVuY3Rpb24oUikge1xuICAgICAgICAgIHZhciB3ID0gdGhpcy5lZGl0b3IsIEEgPSB3LnNlbGVjdGlvbi5nZXRTZWxlY3Rpb25Db250YWluZXJFbGVtKCk7XG4gICAgICAgICAgQSA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C1hbGlnbjogY2VudGVyO1xufVxuLnctZS1tZW51IC53LWUtcGFuZWwtY29udGFpbmVyIC53LWUtdXAtaW1nLWNvbnRhaW5lciAudy1lLXVwLWJ0bixcbi53LWUtbWVudSAudy1lLXBhbmVsLWNvbnRhaW5lciAudy1lLXVwLXZpZGVvLWNvbnRhaW5lciAudy1lLXVwLWJ0biB7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgY29sb3I6ICM5OTk7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgZm9udC1zaXplOiA2MHB4O1xuICBsaW5lLWhlaWdodDogMTtcbn1cbi53LWUtbWVudSAudy1lLXBhbmVsLWNvbnRhaW5lciAudy1lLXVwLWltZy1jb250YWluZXIgLnctZS11cC1idG46aG92ZXIsXG4udy1lLW1lbnUgLnctZS1wYW5lbC1jb250YWluZXIgLnctZS11cC12aWRlby1jb250YWluZXIgLnctZS11cC1idG46aG92ZXIge1xuICBjb2xvcjogIzMzMztcbn1cbmAsIFwiXCJdKSwgby5leHBvcnRzID0gaTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMjApLCBkID0gdCgxNTkpO1xuICAgICAgZCA9IGQuX19lc01vZHVsZSA/IGQuZGVmYXVsdCA6IGQsIHR5cGVvZiBkID09IFwic3RyaW5nXCIgJiYgKGQgPSBbW28uaSwgZCwgXCJcIl1dKTtcbiAgICAgIHZhciBjID0ge307XG4gICAgICBjLmluc2VydCA9IFwiaGVhZFwiLCBjLnNpbmdsZXRvbiA9ICExLCBzKGQsIGMpLCBvLmV4cG9ydHMgPSBkLmxvY2FscyB8fCB7fTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMjEpO1xuICAgICAgaSA9IHMoITEpLCBpLnB1c2goW28uaSwgYC53LWUtdG9vbGJhciAudy1lLWRyb3BsaXN0IHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB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G90eXBlLCBkID0gdCg3NyksIGMgPSB0KDQ4KSwgcCA9IHQoMzYpLCB2ID0gdCg0MyksIGIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9O1xuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24oUywgRCwgVCkge1xuICAgICAgICB2YXIgbSA9IEQgKyBcIiBJdGVyYXRvclwiO1xuICAgICAgICByZXR1cm4gUy5wcm90b3R5cGUgPSBkKHMsIHsgbmV4dDogYygxLCBUKSB9KSwgcChTLCBtLCAhMSwgITApLCB2W21dID0gYiwgUztcbiAgICAgIH07XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdmFyIHMgPSB0KDExKTtcbiAgICAgIG8uZXhwb3J0cyA9ICFzKGZ1bmN0aW9uKCkge1xuICAgICAgICBmdW5jdGlvbiBkKCkge1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBkLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IG51bGwsIE9iamVjdC5nZXRQcm90b3R5cGVPZihuZXcgZCgpKSAhPT0gZC5wcm90b3R5cGU7XG4gICAgICB9KTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMTQpLCBkID0gdCgxOCksIGMgPSB0KDI1KSwgcCA9IHQoNTIpO1xuICAgICAgby5leHBvcnRzID0gcyA/IE9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzIDogZnVuY3Rpb24oYiwgUykge1xuICAgICAgICBjKGIpO1xuICAgICAgICBmb3IgKHZhciBEID0gcChTKSwgVCA9IEQubGVuZ3RoLCBtID0gMCwgeDsgVCA+IG07IClcbiAgICAgICAgICBkLmYoYiwgeCA9IERbbSsrXSwgU1t4XSk7XG4gICAgICAgIHJldHVybiBiO1xuICAgICAgfTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoODEpLCBkID0gdCg2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cmVzb2x2ZWQgaXRzZWxmXCIpO1xuICAgICAgICAgICAgdmFyIG5lID0gJG4oVWUpO1xuICAgICAgICAgICAgbmUgPyBCKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICB2YXIgTGUgPSB7IGRvbmU6ICExIH07XG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgbmUuY2FsbChVZSwgT3QocWUsIERlLCBMZSwgd2UpLCBPdChhdCwgRGUsIExlLCB3ZSkpO1xuICAgICAgICAgICAgICB9IGNhdGNoIChPZSkge1xuICAgICAgICAgICAgICAgIGF0KERlLCBMZSwgT2UsIHdlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSkgOiAod2UudmFsdWUgPSBVZSwgd2Uuc3RhdGUgPSBZZSwgdm4oRGUsIHdlLCAhMSkpO1xuICAgICAgICAgIH0gY2F0Y2ggKExlKSB7XG4gICAgICAgICAgICBhdChEZSwgeyBkb25lOiAhMSB9LCBMZSwgd2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfTtcbiAgICAgIEJ0ICYmIChaID0gZnVuY3Rpb24oRGUpIHtcbiAgICAgICAgUih0aGlzLCBaLCBXKSwgeChEZSksIHl0LmNhbGwodGhpcyk7XG4gICAgICAgIHZhciB3ZSA9IFEodGhpcyk7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgRGUoT3QodW4sIHRoaXMsIHdlKSwgT3QoYXQsIHRoaXMsIHdlKSk7XG4gICAgICAgIH0gY2F0Y2ggKFVlKSB7XG4gICAgICAgICAgYXQodGhpcywgd2UsIFVlKTtcbiAgICAgICAgfVxuICAgICAgfSwgeXQgPSBmdW5jdGlvbihEZSkge1xuICAgICAgICBYKHRoaXMsIHsgdHlwZTogVywgZG9uZTogITEsIG5vdGlmaWVkOiAhMSwgcGFyZW50OiAhMSwgcmVhY3Rpb25zOiBbXSwgcmVqZWN0aW9uOiAhMSwgc3RhdGU6IE1lLCB2YWx1ZTogdm9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Im1hdGNoXCIpO1xuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24odikge1xuICAgICAgICB2YXIgYjtcbiAgICAgICAgcmV0dXJuIHModikgJiYgKChiID0gdltwXSkgIT09IHZvaWQgMCA/ICEhYiA6IGQodikgPT0gXCJSZWdFeHBcIik7XG4gICAgICB9O1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgxMCksIGQgPSBzKFwibWF0Y2hcIik7XG4gICAgICBvLmV4cG9ydHMgPSBmdW5jdGlvbihjKSB7XG4gICAgICAgIHZhciBwID0gLy4vO1xuICAgICAgICB0cnkge1xuICAgICAgICAgIFwiLy4vXCJbY10ocCk7XG4gICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXR1cm4gcFtkXSA9ICExLCBcIi8uL1wiW2NdKHApO1xuICAgICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gITE7XG4gICAgICB9O1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgyMjMpO1xuICAgICAgby5leHBvcnRzID0gcztcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMjI0KSwgZCA9IEZ1bmN0aW9uLnByb3RvdHlwZTtcbiAgICAgIG8uZXhwb3J0cyA9IGZ1bmN0aW9uKGMpIHtcbiAgICAgICAgdmFyIHAgPSBjLmJpbmQ7XG4gICAgICAgIHJldHVybiBjID09PSBkIHx8IGMgaW5zdGFuY2VvZiBGdW5jdGlvbiAmJiBwID09PSBkLmJpbmQgPyBzIDogcDtcbiAgICAgIH07XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdCgyMjUpO1xuICAgICAgdmFyIHMgPSB0KDE1KTtcbiAgICAgIG8uZXhwb3J0cyA9IHMoXCJGdW5j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ksIHcgPSA5MDA3MTk5MjU0NzQwOTkxLCBBID0gXCJNYXhpbXVtIGFsbG93ZWQgaW5kZXggZXhjZWVkZWRcIiwgRSA9IHggPj0gNTEgfHwgIWQoZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBCID0gW107XG4gICAgICAgIHJldHVybiBCW1JdID0gITEsIEIuY29uY2F0KClbMF0gIT09IEI7XG4gICAgICB9KSwgQyA9IFQoXCJjb25jYXRcIiksIE0gPSBmdW5jdGlvbigkKSB7XG4gICAgICAgIGlmICghcCgkKSlcbiAgICAgICAgICByZXR1cm4gITE7XG4gICAgICAgIHZhciBGID0gJFtSXTtcbiAgICAgICAgcmV0dXJuIEYgIT09IHZvaWQgMCA/ICEhRiA6IGMoJCk7XG4gICAgICB9LCB5ID0gIUUgfHwgIUM7XG4gICAgICBzKHsgdGFyZ2V0OiBcIkFycmF5XCIsIHByb3RvOiAhMCwgZm9yY2VkOiB5IH0sIHsgY29uY2F0OiBmdW5jdGlvbigkKSB7XG4gICAgICAgIHZhciBGID0gdih0aGlzKSwgayA9IEQoRiwgMCksIGggPSAwLCBOLCBQLCBqLCBJLCBWO1xuICAgICAgICBmb3IgKE4gPSAtMSwgaiA9IGFyZ3VtZW50cy5sZW5ndGg7IE4gPCBqOyBOKyspXG4gICAgICAgICAgaWYgKFYgPSBOID09PSAtMSA/IEYgOiBhcmd1bWVudHNbTl0sIE0oVikpIHtcbiAgICAgICAgICAgIGlmIChJID0gYihWLmxlbmd0aCksIGggKyBJID4gdylcbiAgICAgICAgICAgICAgdGhyb3cgVHlwZUVycm9yKEEpO1xuICAgICAgICAgICAgZm9yIChQID0gMDsgUCA8IEk7IFArKywgaCsrKVxuICAgICAgICAgICAgICBQIGluIFYgJiYgUyhrLCBoLCBWW1BdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGggPj0gdylcbiAgICAgICAgICAgICAgdGhyb3cgVHlwZUVycm9yKEEpO1xuICAgICAgICAgICAgUyh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uICAgICAgfSksIHMoeyB0YXJnZXQ6IGxlLCBzdGF0OiAhMCwgZm9yY2VkOiAhYiB9LCB7XG4gICAgICAgIGZvcjogZnVuY3Rpb24obmUpIHtcbiAgICAgICAgICB2YXIgTGUgPSBTdHJpbmcobmUpO1xuICAgICAgICAgIGlmIChUKHNuLCBMZSkpXG4gICAgICAgICAgICByZXR1cm4gc25bTGVdO1xuICAgICAgICAgIHZhciBPZSA9IE1lKExlKTtcbiAgICAgICAgICByZXR1cm4gc25bTGVdID0gT2UsIEJ0W09lXSA9IExlLCBPZTtcbiAgICAgICAgfSxcbiAgICAgICAga2V5Rm9yOiBmdW5jdGlvbihuZSkge1xuICAgICAgICAgIGlmICghZ24obmUpKVxuICAgICAgICAgICAgdGhyb3cgVHlwZUVycm9yKG5lICsgXCIgaXMgbm90IGEgc3ltYm9sXCIpO1xuICAgICAgICAgIGlmIChUKEJ0LCBuZSkpXG4gICAgICAgICAgICByZXR1cm4gQnRbbmVdO1xuICAgICAgICB9LFxuICAgICAgICB1c2VTZXR0ZXI6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZuID0gITA7XG4gICAgICAgIH0sXG4gICAgICAgIHVzZVNpbXBsZTogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgdm4gPSAhMTtcbiAgICAgICAgfVxuICAgICAgfSksIHMoeyB0YXJnZXQ6IFwiT2JqZWN0XCIsIHN0YXQ6ICEwLCBmb3JjZWQ6ICFiLCBzaGFtOiAhdiB9LCB7XG4gICAgICAgIGNyZWF0ZTogYXQsXG4gICAgICAgIGRlZmluZVByb3BlcnR5OiB4bixcbiAgICAgICAgZGVmaW5lUHJvcGVydGllczogT3QsXG4gICAgICAgIGdldE93blByb3BlcnR5RGVzY3JpcHRvcjogcWVcbiAgICAgIH0pLCBzKHsgdGFyZ2V0OiBcIk9iamVjdFwiLCBzdGF0OiAhMCwgZm9yY2VkOiAhYiB9LCB7XG4gICAgICAgIGdldE93blByb3BlcnR5TmFtZXM6IERlLF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MgfHwgTS5jYWxsKHksIGspKSAmJiAod1trXSA9IHlba10pO1xuICAgICAgICByZXR1cm4gdztcbiAgICAgIH0gOiBEO1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgwKSwgZCA9IHModCgxKSk7XG4gICAgICAoMCwgZC5kZWZhdWx0KShpLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogITAgfSksIGkuZGVmYXVsdCA9IHtcbiAgICAgICAgbWVudXM6IFtcbiAgICAgICAgICBcImhlYWRcIixcbiAgICAgICAgICBcImJvbGRcIixcbiAgICAgICAgICBcImZvbnRTaXplXCIsXG4gICAgICAgICAgXCJmb250TmFtZVwiLFxuICAgICAgICAgIFwiaXRhbGljXCIsXG4gICAgICAgICAgXCJ1bmRlcmxpbmVcIixcbiAgICAgICAgICBcInN0cmlrZVRocm91Z2hcIixcbiAgICAgICAgICBcImluZGVudFwiLFxuICAgICAgICAgIFwibGluZUhlaWdodFwiLFxuICAgICAgICAgIFwiZm9yZUNvbG9yXCIsXG4gICAgICAgICAgXCJiYWNrQ29sb3JcIixcbiAgICAgICAgICBcImxpbmtcIixcbiAgICAgICAgICBcImxpc3RcIixcbiAgICAgICAgICBcInRvZG9cIixcbiAgICAgICAgICBcImp1c3RpZnlcIixcbiAgICAgICAgICBcInF1b3RlXCIsXG4gICAgICAgICAgXCJlbW90aWNvblwiLFxuICAgICAgICAgIFwiaW1hZ2VcIixcbiAgICAgICAgICBcInZpZGVvXCIsXG4gICAgICAgICAgXCJ0YWJsZVwiLFxuICAgICAgICAgIFwiY29kZVwiLFxuICAgICAgICAgIFwic3BsaXRMaW5lXCIsXG4gICAgICAgICAgXCJ1bmRvXCIsXG4gICAgICAgICAgXCJyZWRvXCJcbiAgICAgICAgXSxcbiAgICAgICAgZm9udE5hbWVzOiBbXCJcXHU5RUQxXFx1NEY1M1wiLCBcIlxcdTRFRkZcXHU1QjhCXCIsIFwiXFx1Njk3N1xcdTRG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19pbXBvcnREZWZhdWx0KHQoMykpLCBiID0gdCg2KSwgUyA9IHQoNyksIEQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgZnVuY3Rpb24gVChtKSB7XG4gICAgICAgICAgdGhpcy5fY3VycmVudFJhbmdlID0gbnVsbCwgdGhpcy5lZGl0b3IgPSBtO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBULnByb3RvdHlwZS5nZXRSYW5nZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzLl9jdXJyZW50UmFuZ2U7XG4gICAgICAgIH0sIFQucHJvdG90eXBlLnNhdmVSYW5nZSA9IGZ1bmN0aW9uKG0pIHtcbiAgICAgICAgICBpZiAobSkge1xuICAgICAgICAgICAgdGhpcy5fY3VycmVudFJhbmdlID0gbTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIHggPSB3aW5kb3cuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgaWYgKHgucmFuZ2VDb3VudCAhPT0gMCkge1xuICAgICAgICAgICAgdmFyIFIgPSB4LmdldFJhbmdlQXQoMCksIHcgPSB0aGlzLmdldFNlbGVjdGlvbkNvbnRhaW5lckVsZW0oUik7XG4gICAgICAgICAgICBpZiAoISEodyAhPSBudWxsICYmIHcubGVuZ3RoKSAmJiAhKHcuYXR0cihcImNvbnRlbnRlZGl0YWJsZVwiKSA9PT0gXCJmYWxzZVwiIHx8IHcucGFyZW50VW50aWwoXCJbY29udGVudGVkaXRhYmxlPWZhbHNlXVwiKSkpIHtcbiAgICAgICAgICAgICAgdmFyIEEgPSB0aGlzLmVkaXRvciwgRSA9IEEuJHRleHRFbGVtO1xuICAgICAgICAgICAgICBpZiAoRS5pc0NvbnRhaW4odykpIHtcbiAgICAgICAgICAgICAgICBpZiAoRS5lbGVtc1swXSA9PT0gdy5lbGVtc1swXSkge1xuICAgICAgICAgICAgICAgICAgdmFyIEM7XG4gICAgICAgICAgICAgICAgICBpZiAoKDAsIGMuZGVmYXVsdCkoQyA9IEUuaHRtbCgpKS5jYWxsKEMpID09PSBTLkVNUFRZX1ApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIE0gPSBFLmNoaWxkcmVuKCksIHkgPSBNID09IG51bGwgPyB2b2lkIDAgOiBNLmxhc3QoKTtcbiAgICAgICAgICAgICAgICAgICAgQS5zZWxlY3Rpb24uY3JlYXRlUmFuZ2VCeUVsZW0oeSwgITAsICEwKSwgQS5zZWxlY3Rpb24ucmVzdG9yZVNlbGVjdGlvbigpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50UmFuZ2UgPSBSO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBULnByb3RvdHlwZS5jb2xsYXBzZVJhbmdlID0gZnVuY3Rpb24obSkge1xuICAgICAgICAgIG0gPT09IHZvaWQgMCAmJiAobSA9ICExKTtcbiAgICAgICAgICB2YXIgeCA9IHRoaXMuX2N1cnJlbnRSYW5nZTtcbiAgICAgICAgICB4ICYmIHguY29sbGFwc2UobSk7XG4gICAgICAgIH0sIFQucHJvdG90eXBlLmdldFNlbGVjdGlvblRleHQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICB2YXIgbSA9IHRoaXMuX2N1cnJlbnRSYW5nZTtcbiAgICAgICAgICByZXR1cm4gbSA/IG0udG9TdHJpbmcoKSA6IFwiXCI7XG4gICAgICAgIH0sIFQucHJvdG90eXBlLmdldFNlbGVjdGlvbkNvbnRhaW5lckVsZW0gPSBmdW5jdGlvbihtKSB7XG4gICAgICAgICAgdmFyIHg7XG4gICAgICAgICAgeCA9IG0gfHwgdGhpcy5fY3VycmVudFJhbmdlO1xuICAgICAgICAgIHZhciBSO1xuICAgICAgICAgIGlmICh4KVxuICAgICAgICAgICAgcmV0dXJuIFIgPSB4LmNvbW1vb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rpb24oKSB7XG4gICAgICAgIGZ1bmN0aW9uIGIoUykge1xuICAgICAgICAgIHRoaXMuZWRpdG9yID0gUztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYi5wcm90b3R5cGUuZG8gPSBmdW5jdGlvbihTLCBEKSB7XG4gICAgICAgICAgdmFyIFQgPSB0aGlzLmVkaXRvcjtcbiAgICAgICAgICBULmNvbmZpZy5zdHlsZVdpdGhDU1MgJiYgZG9jdW1lbnQuZXhlY0NvbW1hbmQoXCJzdHlsZVdpdGhDU1NcIiwgITEsIFwidHJ1ZVwiKTtcbiAgICAgICAgICB2YXIgbSA9IFQuc2VsZWN0aW9uO1xuICAgICAgICAgIGlmICghIW0uZ2V0UmFuZ2UoKSkge1xuICAgICAgICAgICAgc3dpdGNoIChtLnJlc3RvcmVTZWxlY3Rpb24oKSwgUykge1xuICAgICAgICAgICAgICBjYXNlIFwiaW5zZXJ0SFRNTFwiOlxuICAgICAgICAgICAgICAgIHRoaXMuaW5zZXJ0SFRNTChEKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgY2FzZSBcImluc2VydEVsZW1cIjpcbiAgICAgICAgICAgICAgICB0aGlzLmluc2VydEVsZW0oRCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgdGhpcy5leGVjQ29tbWFuZChTLCBEKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFQubWVudXMuY2hhbmdlQWN0aXZlKCksIG0uc2F2ZVJhbmdlKCksIG0ucmVzdG9yZVNlbGVjdGlvbigpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSwgYi5wcm90b3R5cGUuaW5zZXJ0SFRNTCA9IGZ1bmN0aW9uKFMpIHtcbiAgICAgICAgICB2YXIgRCA9IHRoaXMuZWRpdG9yLCBUID0gRC5zZWxlY3Rpb24uZ2V0UmFuZ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lvbigpO1xuICAgICAgICB9LCBDLnByb3RvdHlwZS5fc2F2ZVJhbmdlID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgdmFyIE0gPSB0aGlzLmVkaXRvciwgeSA9IE0uJHRleHRFbGVtLCBCID0gVC5kZWZhdWx0KGRvY3VtZW50KTtcbiAgICAgICAgICBmdW5jdGlvbiAkKCkge1xuICAgICAgICAgICAgTS5zZWxlY3Rpb24uc2F2ZVJhbmdlKCksIE0ubWVudXMuY2hhbmdlQWN0aXZlKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHkub24oXCJrZXl1cFwiLCAkKTtcbiAgICAgICAgICBmdW5jdGlvbiBGKCkge1xuICAgICAgICAgICAgJCgpLCB5Lm9mZihcImNsaWNrXCIsIEYpO1xuICAgICAgICAgIH1cbiAgICAgICAgICB5Lm9uKFwiY2xpY2tcIiwgRik7XG4gICAgICAgICAgZnVuY3Rpb24gaygpIHtcbiAgICAgICAgICAgICQoKSwgQi5vZmYoXCJtb3VzZXVwXCIsIGspO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmdW5jdGlvbiBoKCkge1xuICAgICAgICAgICAgQi5vbihcIm1vdXNldXBcIiwgayksIHkub2ZmKFwibW91c2VsZWF2ZVwiLCBoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgeS5vbihcIm1vdXNlZG93blwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHkub24oXCJtb3VzZWxlYXZlXCIsIGgpO1xuICAgICAgICAgIH0pLCB5Lm9uKFwibW91c2V1cFwiLCBmdW5jdGlvbihOKSB7XG4gICAgICAgICAgICB5Lm9mZihcIm1vdXNlbGVhdmVcIiwgaCksICgwLCBTLmRlZmF1bHQpKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICB2YXIgUCA9IE0uc2VsZWN0aW9uLCBqID0gUC5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgICBqICE9PSBudWxsICYmICQoKTtcbiAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9LCBDLnByb3RvdHlwZS5fYmluZEV2ZW50SG9va3MgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICB2YXIgTSA9IHRoaXMuZWRpdG9yLCB5ID0gTS4kdGV4dEVsZW0sIEIgPSB0aGlzLmV2ZW50SG9va3M7XG4gICAgICAgICAgeS5vbihcImNsaWNrXCIsIGZ1bmN0aW9uKEYpIHtcbiAgICAgICAgICAgIHZhciBrID0gQi5jbGlja0V2ZW50cztcbiAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKGspLmNhbGwoaywgZnVuY3Rpb24oaCkge1xuICAgICAgICAgICAgICByZXR1cm4gaChGKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pLCB5Lm9uKFwia2V5dXBcIiwgZnVuY3Rpb24oRikge1xuICAgICAgICAgICAgaWYgKEYua2V5Q29kZSA9PT0gMTMpIHtcbiAgICAgICAgICAgICAgdmFyIGsgPSBCLmVudGVyVXBFdmVudHM7XG4gICAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKGspLmNhbGwoaywgZnVuY3Rpb24oaCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBoKEYpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSwgeS5vbihcImtleXVwXCIsIGZ1bmN0aW9uKEYpIHtcbiAgICAgICAgICAgIHZhciBrID0gQi5rZXl1cEV2ZW50cztcbiAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKGspLmNhbGwoaywgZnVuY3Rpb24oaCkge1xuICAgICAgICAgICAgICByZXR1cm4gaChGKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pLCB5Lm9uKFwia2V5ZG93blwiLCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICB2YXIgayA9IEIua2V5ZG93bkV2ZW50cztcbiAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKGspLmNhbGwoaywgZnVuY3Rpb24oaCkge1xuICAgICAgICAgICAgICByZXR1cm4gaChGKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pLCB5Lm9uKFwia2V5dXBcIiwgZnVuY3Rpb24oRikge1xuICAgICAgICAgICAgaWYgKCEoRi5rZXlDb2RlICE9PSA4ICYmIEYua2V5Q29kZSAhPT0gNDYpKSB7XG4gICAgICAgICAgICAgIHZhciBrID0gQi5kZWxldGVVcEV2ZW50cztcbiAgICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoaykuY2FsbChrLCBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGgoRik7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLCB5Lm9uKFwia2V5ZG93blwiLCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICBpZiAoIShGLmtleUNvZGUgIT09IDggJiYgRi5rZXlDb2RlICE9PSA0NikpIHtcbiAgICAgICAgICAgICAgdmFyIGsgPSBCLmRlbGV0ZURvd25FdmVudHM7XG4gICAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKGspLmNhbGwoaywgZnVuY3Rpb24oaCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBoKEYpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSwgeS5vbihcInBhc3RlXCIsIGZ1bmN0aW9uKEYpIHtcbiAgICAgICAgICAgIGlmICgheC5VQS5pc0lFKCkpIHtcbiAgICAgICAgICAgICAgRi5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICB2YXIgayA9IEIucGFzdGVFdmVudHM7XG4gICAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKGspLmNhbGwoaywgZnVuY3Rpb24oaCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBoKEYpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSwgeS5vbihcImtleWRvd25cIiwgZnVuY3Rpb24oRikge1xuICAgICAgICAgICAgKE0uaXNGb2N1cyB8fCBNLmlzQ29tcGF0aWJsZU1vZGUpICYmIChGLmN0cmxLZXkgfHwgRi5tZXRhS2V5KSAmJiBGLmtleUNvZGUgPT09IDkwICYmIChGLnByZXZlbnREZWZhdWx0KCksIEYuc2hpZnRLZXkgPyBNLmhpc3RvcnkucmVzdG9yZSgpIDogTS5oaXN0b3J5LnJldm9rZSgpKTtcbiAgICAgICAgICB9KSwgeS5vbihcImtleXVwXCIsIGZ1bmN0aW9uKEYpIHtcbiAgICAgICAgICAgIGlmIChGLmtleUNvZGUgPT09IDkpIHtcbiAgICAgICAgICAgICAgRi5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICB2YXIgayA9IEIudGFiVXBFdmVudHM7XG4gICAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKGspLmNhbGwoaywgZnVuY3Rpb24oaCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBoKEYpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSwgeS5vbihcImtleWRvd25cIiwgZnVuY3Rpb24oRikge1xuICAgICAgICAgICAgaWYgKEYua2V5Q29kZSA9PT0gOSkge1xuICAgICAgICAgICAgICBGLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgIHZhciBrID0gQi50YWJEb3duRXZlbnRzO1xuICAgICAgICAgICAgICAoMCwgcC5kZWZhdWx0KShrKS5jYWxsKGssIGZ1bmN0aW9uKGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaChGKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksIHkub24oXG4gICAgICAgICAgICBcInNjcm9sbFwiLFxuICAgICAgICAgICAgeC50aHJvdHRsZShmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICAgIHZhciBrID0gQi50ZXh0U2Nyb2xsRXZlbnRzO1xuICAgICAgICAgICAgICAoMCwgcC5kZWZhdWx0KShrKS5jYWxsKGssIGZ1bmN0aW9uKGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaChGKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LCAxMDApXG4gICAgICAgICAgKTtcbiAgICAgICAgICBmdW5jdGlvbiAkKEYpIHtcbiAgICAgICAgICAgIEYucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgVC5kZWZhdWx0KGRvY3VtZW50KS5vbihcImRyYWdsZWF2ZVwiLCAkKS5vbihcImRyb3BcIiwgJCkub24oXCJkcmFnZW50ZXJcIiwgJCkub24oXCJkcmFnb3ZlclwiLCAkKSwgTS5iZWZvcmVEZXN0cm95KGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgVC5kZWZhdWx0KGRvY3VtZW50KS5vZmYoXCJkcmFnbGVhdmVcIiwgJCkub2ZmKFwiZHJvcFwiLCAkKS5vZmYoXCJkcmFnZW50ZXJcIiwgJCkub2ZmKFwiZHJhZ292ZXJcIiwgJCk7XG4gICAgICAgICAgfSksIHkub24oXCJkcm9wXCIsIGZ1bmN0aW9uKEYpIHtcbiAgICAgICAgICAgIEYucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHZhciBrID0gQi5kcm9wRXZlbnRzO1xuICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoaykuY2FsbChrLCBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoKEYpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSksIHkub24oXCJjbGlja1wiLCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICB2YXIgayA9IG51bGwsIGggPSBGLnRhcmdldCwgTiA9IFQuZGVmYXVsdChoKTtcbiAgICAgICAgICAgIGlmIChOLmdldE5vZGVOYW1lKCkgPT09IFwiQVwiKVxuICAgICAgICAgICAgICBrID0gTjtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgUCA9IE4ucGFyZW50VW50aWwoXCJhXCIpO1xuICAgICAgICAgICAgICBQICE9IG51bGwgJiYgKGsgPSBQKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghIWspIHtcbiAgICAgICAgICAgICAgdmFyIGogPSBCLmxpbmtDbGlja0V2ZW50cztcbiAgICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoaikuY2FsbChqLCBmdW5jdGlvbihJKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEkoayk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLCB5Lm9uKFwiY2xpY2tcIiwgZnVuY3Rpb24oRikge1xuICAgICAgICAgICAgdmFyIGsgPSBudWxsLCBoID0gRi50YXJnZXQsIE4gPSBULmRlZmF1bHQoaCk7XG4gICAgICAgICAgICBpZiAoTi5nZXROb2RlTmFtZSgpID09PSBcIklNR1wiICYmICFOLmVsZW1zWzBdLmdldEF0dHJpYnV0ZShcImRhdGEtZW1vamlcIikgJiYgKEYuc3RvcFByb3BhZ2F0aW9uKCksIGsgPSBOKSwgISFrKSB7XG4gICAgICAgICAgICAgIHZhciBQID0gQi5pbWdDbGlja0V2ZW50cztcbiAgICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoUCkuY2FsbChQLCBmdW5jdGlvbihqKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGooayk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLCB5Lm9uKFwiY2xpY2tcIiwgZnVuY3Rpb24oRikge1xuICAgICAgICAgICAgdmFyIGsgPSBudWxsLCBoID0gRi50YXJnZXQsIE4gPSBULmRlZmF1bHQoaCk7XG4gICAgICAgICAgICBpZiAoTi5nZXROb2RlTmFtZSgpID09PSBcIlBSRVwiKVxuICAgICAgICAgICAgICBrID0gTjtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgUCA9IE4ucGFyZW50VW50aWwoXCJwcmVcIik7XG4gICAgICAgICAgICAgIFAgIT09IG51bGwgJiYgKGsgPSBQKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghIWspIHtcbiAgICAgICAgICAgICAgdmFyIGogPSBCLmNvZGVDbGlja0V2ZW50cztcbiAgICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoaikuY2FsbChqLCBmdW5jdGlvbihJKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEkoayk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLCB5Lm9uKFwiY2xpY2tcIiwgZnVuY3Rpb24oRikge1xuICAgICAgICAgICAgdmFyIGsgPSBudWxsLCBoID0gRi50YXJnZXQsIE4gPSBULmRlZmF1bHQoaCk7XG4gICAgICAgICAgICBpZiAoTi5nZXROb2RlTmFtZSgpID09PSBcIkhSXCIgJiYgKGsgPSBOKSwgISFrKSB7XG4gICAgICAgICAgICAgIE0uc2VsZWN0aW9uLmNyZWF0ZVJhbmdlQnlFbGVtKGspLCBNLnNlbGVjdGlvbi5yZXN0b3JlU2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgIHZhciBQID0gQi5zcGxpdExpbmVFdmVudHM7XG4gICAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKFApLmNhbGwoUCwgZnVuY3Rpb24oaikge1xuICAgICAgICAgICAgICAgIHJldHVybiBqKGspO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSwgTS4kdG9vbGJhckVsZW0ub24oXCJjbGlja1wiLCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICB2YXIgayA9IEIudG9vbGJhckNsaWNrRXZlbnRzO1xuICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoaykuY2FsbChrLCBmdW5jdGlvbihoKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoKEYpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSksIE0uJHRleHRDb250YWluZXJFbGVtLm9uKFwibW91c2Vkb3duXCIsIGZ1bmN0aW9uKEYpIHtcbiAgICAgICAgICAgIHZhciBrID0gRi50YXJnZXQsIGggPSBULmRlZmF1bHQoayk7XG4gICAgICAgICAgICBpZiAoaC5oYXNDbGFzcyhcInctZS1pbWctZHJhZy1yYlwiKSkge1xuICAgICAgICAgICAgICB2YXIgTiA9IEIuaW1nRHJhZ0Jhck1vdXNlRG93bkV2ZW50cztcbiAgICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoTikuY2FsbChOLCBmdW5jdGlvbihQKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFAoKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksIHkub24oXCJjbGlja1wiLCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICB2YXIgayA9IG51bGwsIGggPSBGLnRhcmdldDtcbiAgICAgICAgICAgIGlmIChrID0gVC5kZWZhdWx0KGgpLnBhcmVudFVudGlsRWRpdG9yKFwiVEFCTEVcIiwgTSwgaCksICEhaykge1xuICAgICAgICAgICAgICB2YXIgTiA9IEIudGFibGVDbGlja0V2ZW50cztcbiAgICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoTikuY2FsbChOLCBmdW5jdGlvbihQKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFAoaywgRik7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLCB5Lm9uKFwia2V5ZG93blwiLCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICBpZiAoRi5rZXlDb2RlID09PSAxMykge1xuICAgICAgICAgICAgICB2YXIgayA9IEIuZW50ZXJEb3duRXZlbnRzO1xuICAgICAgICAgICAgICAoMCwgcC5kZWZhdWx0KShrKS5jYWxsKGssIGZ1bmN0aW9uKGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaChGKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksIHkub24oXCJjbGlja1wiLCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICB2YXIgayA9IG51bGwsIGggPSBGLnRhcmdldCwgTiA9IFQuZGVmYXVsdChoKTtcbiAgICAgICAgICAgIGlmIChOLmdldE5vZGVOYW1lKCkgPT09IFwiVklERU9cIiAmJiAoRi5zdG9wUHJvcGFnYXRpb24oKSwgayA9IE4pLCAhIWspIHtcbiAgICAgICAgICAgICAgdmFyIFAgPSBCLnZpZGVvQ2xpY2tFdmVudHM7XG4gICAgICAgICAgICAgICgwLCBwLmRlZmF1bHQpKFApLmNhbGwoUCwgZnVuY3Rpb24oaikge1xuICAgICAgICAgICAgICAgIHJldHVybiBqKGspO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSwgQztcbiAgICAgIH0oKTtcbiAgICAgIGkuZGVmYXVsdCA9IEU7XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdmFyIHMgPSB0KDI4NCk7XG4gICAgICBvLmV4cG9ydHMgPSBzO1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgyODUpLCBkID0gQXJyYXkucHJvdG90eXBlO1xuICAgICAgby5leHBvcnRzID0gZnVuY3Rpb24oYykge1xuICAgICAgICB2YXIgcCA9IGMuZmluZDtcbiAgICAgICAgcmV0dXJuIGMgPT09IGQgfHwgYyBpbnN0YW5jZW9mIEFycmF5ICYmIHAgPT09IGQuZmluZCA/IHMgOiBwO1xuICAgICAgfTtcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB0KDI4Nik7XG4gICAgICB2YXIgcyA9IHQoMTUpO1xuICAgICAgby5leHBvcnRzID0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LCAnPGEgaHJlZj1cIicgKyBqICsgJ1wiIHRhcmdldD1cIl9ibGFua1wiPicgKyBqICsgXCI8L2E+XCIgKyBJKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghISQpXG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgQiAmJiB2LmlzRnVuY3Rpb24oQikgJiYgKCQgPSBcIlwiICsgKEIoJCkgfHwgXCJcIikpO1xuICAgICAgICAgICAgICAgIHZhciBWID0gL1tcXC5cXCNcXEBdP1xcdytbIF0rXFx7W159XSpcXH0vLnRlc3QoJCk7XG4gICAgICAgICAgICAgICAgaWYgKFYgJiYgTSlcbiAgICAgICAgICAgICAgICAgIFIuY21kLmRvKFwiaW5zZXJ0SFRNTFwiLCBcIlwiICsgUyhGKSk7XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICB2YXIgVyA9IFMoJCk7XG4gICAgICAgICAgICAgICAgICBpZiAoVChXKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgUSA9IFIuJHRleHRFbGVtO1xuICAgICAgICAgICAgICAgICAgICBpZiAoUi5jbWQuZG8oXCJpbnNlcnRIVE1MXCIsIFcpLCBRLmVxdWFsKGspKSB7XG4gICAgICAgICAgICAgICAgICAgICAgUi5zZWxlY3Rpb24uY3JlYXRlRW1wdHlSYW5nZSgpO1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtKE4pICYmIE4ucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YXIgWCA9IC9ePGltZyBbXj5dKnNyYz1bJ1wiXShbXidcIl0rKVtePl0qPiQvZztcbiAgICAgICAgICAgICAgICAgICAgWC50ZXN0KFcpIHx8IFIuY21kLmRvKFwiaW5zZXJ0SFRNTFwiLCBXKTtcbiAgICAgICAgICAgIC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wgRSAmJiBBID09PSBcImltZ1wiKTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIHgoQSwgRSkge1xuICAgICAgICB2YXIgQyA9IFwiXCI7XG4gICAgICAgIEMgPSBcIjxcIiArIEE7XG4gICAgICAgIHZhciBNID0gW107XG4gICAgICAgICgwLCBwLmRlZmF1bHQpKEUpLmNhbGwoRSwgZnVuY3Rpb24oQikge1xuICAgICAgICAgIE0ucHVzaChCLm5hbWUgKyAnPVwiJyArIEIudmFsdWUgKyAnXCInKTtcbiAgICAgICAgfSksIE0ubGVuZ3RoID4gMCAmJiAoQyA9IEMgKyBcIiBcIiArIE0uam9pbihcIiBcIikpO1xuICAgICAgICB2YXIgeSA9IFMuRU1QVFlfVEFHUy5oYXMoQSk7XG4gICAgICAgIHJldHVybiBDID0gQyArICh5ID8gXCIvXCIgOiBcIlwiKSArIFwiPlwiLCBDO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gUihBKSB7XG4gICAgICAgIHJldHVybiBcIjwvXCIgKyBBICsgXCI+XCI7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiB3KEEsIEUsIEMpIHtcbiAgICAgICAgRSA9PT0gdm9pZCAwICYmIChFID0gITApLCBDID09PSB2b2lkIDAgJiYgKEMgPSAhMSk7XG4gICAgICAgIHZhciBNID0gW10sIHkgPSBcIlwiO1xuICAgICAgICBmdW5jdGlvbiBCKGgpIHtcbiAgICAgICAgICBoID0gKDAsIGMuZGVmYXVsdCkoaCkuY2FsbChoKSwgaCAmJiAoUy5FTVBUWV9UQUdTLmhhcyhoKSB8fCAoeSA9IGgpKTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiAkKCkge1xuICAgICAgICAgIHkgPSBcIlwiO1xuICAgICAgICB9XG4gICAgICAgIHZhciBGID0gbmV3IEQuZGVmYXVsdCgpO1xuICAgICAgICBGLnBhcnNlKEEsIHsgc3RhcnRFbGVtZW50OiBmdW5jdGlvbihOLCBQKSB7XG4gICAgICAgICAgaWYgKEIoTiksICFtKE4sIEMpKSB7XG4gICAgICAgICAgICB2YXIgaiA9IFMuTkVDRVNTQVJZX0FUVFJTLmdldChOKSB8fCBbXSwgSSA9IFtdO1xuICAgICAgICAgICAgKDAsIHAuZGVmYXVsdCkoUCkuY2FsbChQLCBmdW5jdGlvbihXKSB7XG4gICAgICAgICAgICAgIHZhciBRID0gVy5uYW1lO1xuICAgICAgICAgICAgICBpZiAoUSA9PT0gXCJzdHlsZVwiKSB7XG4gICAgICAgICAgICAgICAgRSB8fCBJLnB1c2goVyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICgwLCB2LmRlZmF1bHQpKGopLmNhbGwoaiwgUSkgIT09ICExICYmIEkucHVzaChXKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdmFyIFYgPSB4KE4sIEkpO1xuICAgICAgICAgICAgTS5wdXNoKFYpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSwgY2hhcmFjdGVyczogZnVuY3Rpb24oTikge1xuICAgICAgICAgICFOIHx8IG0oeSwgQykgfHwgTS5wdXNoKE4pO1xuICAgICAgICB9LCBlbmRFbGVtZW50OiBmdW5jdGlvbihOKSB7XG4gICAgICAgICAgaWYgKCFtKE4sIEMpKSB7XG4gICAgICAgICAgICB2YXIgUCA9IFIoTik7XG4gICAgICAgICAgICBNLnB1c2goUCksICQoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0sIGNvbW1lbnQ6IGZ1bmN0aW9uKE4pIHtcbiAgICAgICAgICBCKE4pO1xuICAgICAgICB9IH0pO1xuICAgICAgICB2YXIgayA9IE0uam9pbihcIlwiKTtcbiAgICAgICAgcmV0dXJuIGsgPSBUKGspLCBrO1xuICAgICAgfVxuICAgICAgaS5kZWZhdWx0ID0gdztcbiAgICB9LCBmdW5jdGlvbihvLCBpLCB0KSB7XG4gICAgICB2YXIgcyA9IHQoMCksIGQgPSBzKHQoMSkpLC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LCAoMCwgUy5kZWZhdWx0KShCID0gRi5tZW51cykuY2FsbChCLCBmdW5jdGlvbihRKSB7XG4gICAgICAgICAgICB2YXIgWCA9ICQuY29uc3RydWN0b3JMaXN0W1FdO1xuICAgICAgICAgICAgJC5faW5pdE1lbnVMaXN0KFEsIFgpO1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIGZvciAodmFyIE4gPSAwLCBQID0gKDAsIEQuZGVmYXVsdCkody5kZWZhdWx0Lmdsb2JhbEN1c3RvbU1lbnVDb25zdHJ1Y3Rvckxpc3QpOyBOIDwgUC5sZW5ndGg7IE4rKykge1xuICAgICAgICAgICAgdmFyIGogPSBQW05dLCBJID0galswXSwgViA9IGpbMV0sIFcgPSBWO1xuICAgICAgICAgICAgdGhpcy5faW5pdE1lbnVMaXN0KEksIFcpO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aGlzLl9hZGRUb1Rvb2xiYXIoKSwgRi5zaG93TWVudVRvb2x0aXBzICYmIHRoaXMuX2JpbmRNZW51VG9vbHRpcHMoKTtcbiAgICAgICAgfSwgTS5wcm90b3R5cGUuX2luaXRNZW51TGlzdCA9IGZ1bmN0aW9uKHksIEIpIHtcbiAgICAgICAgICB2YXIgJDtcbiAgICAgICAgICBpZiAoIShCID09IG51bGwgfHwgdHlwZW9mIEIgIT0gXCJmdW5jdGlvblwiKSlcbiAgICAgICAgICAgIGlmICgoMCwgVC5kZWZhdWx0KSgkID0gdGhpcy5tZW51TGlzdCkuY2FsbCgkLCBmdW5jdGlvbihrKSB7XG4gICAgICAgICAgICAgIHJldHVybiBrLmtleSA9PT0geTtcbiAgICAgICAgICAgIH0pKVxuICAgICAgICAgICAgICBjb25zb2xlLndhcm4oXCJcXHU4M0RDXFx1NTM1NVxcdTU0MERcXHU3OUYwXFx1OTFDRFxcdTU5MEQ6XCIgKyB5KTtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgRiA9IG5ldyBCKHRoaXMuZWRpdG9yKTtcbiAgICAgICAgICAgICAgRi5rZXkgPSB5LCB0aGlzLm1lbnVMaXN0LnB1c2goRik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIE0ucHJvdG90eXBlLl9iaW5kTWVudVRvb2x0aXBzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgdmFyIHkgPSB0aGlzLmVkaXRvciwgQiA9IHkuJHRvb2xiYXJFbGVtLCAkID0geS5jb25maWcsIEYgPSAkLm1lbnVUb29sdGlwUG9zaXRpb24sIGsgPSBFLmRlZmF1bHQoJzxkaXYgY2xhc3M9XCJ3LWUtbWVudS10b29sdGlwIHctZS1tZW51LXRvb2x0aXAtJyArIEYgKyBgXCI+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwidy1lLW1lbnUtdG9vbHRpcC1pdGVtLXdyYXBwZXJcIj5cbiAgICAgICAgICAgICAgPGRpdj48L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvZGl2PmApO1xuICAgICAgICAgIGsuY3NzKFwidmlzaWJpbGl0eVwiLCBcImhpZGRlblwiKSwgQi5hcHBlbmQoayksIGsuY3NzKFwiei1pbmRleFwiLCB5LnpJbmRleC5nZXQoXCJ0b29sdGlwXCIpKTtcbiAgICAgICAgICB2YXIgaCA9IDA7XG4gICAgICAgICAgZnVuY3Rpb24gTigpIHtcbiAgICAgICAgICAgIGggJiYgY2xlYXJUaW1lb3V0KGgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmdW5jdGlvbiBQKCkge1xuICAgICAgICAgICAgTigpLCBrLmNzcyhcInZpc2liaWxpdHlcIiwgXCJoaWRkZW5cIik7XG4gICAgICAgICAgfVxuICAgICAgICAgIEIub24oXCJtb3VzZW92ZXJcIiwgZnVuY3Rpb24oaikge1xuICAgICAgICAgICAgdmFyIEkgPSBqLnRhcmdldCwgViA9IEUuZGVmYXVsdChJKSwgVywgUTtcbiAgICAgICAgICAgIGlmIChWLmlzQ29udGFpbihCKSkge1xuICAgICAgICAgICAgICBQKCk7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChWLnBhcmVudFVudGlsKFwiLnctZS1kcm9wbGlzdFwiKSAhPSBudWxsKVxuICAgICAgICAgICAgICBQKCk7XG4gICAgICAgICAgICBlbHNlIGlmIChWLmF0dHIoXCJkYXRhLXRpdGxlXCIpKVxuICAgICAgICAgICAgICBXID0gVi5hdHRyKFwiZGF0YS10aXRsZVwiKSwgUSA9IFY7XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgdmFyIFggPSBWLnBhcmVudFVudGlsKFwiLnctZS1tZW51XCIpO1xuICAgICAgICAgICAgICBYICE9IG51bGwgJiYgKFcgPSBYLmF0dHIoXCJkYXRhLXRpdGxlXCIpLCBRID0gWCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoVyAmJiBRKSB7XG4gICAgICAgICAgICAgIE4oKTtcbiAgICAgICAgICAgICAgdmFyIEogPSBRLmdldE9mZnNldERhdGEoKTtcbiAgICAgICAgICAgICAgay50ZXh0KHkuaTE4bmV4dC50KFwibWVudXMudGl0bGUuXCIgKyBXKSk7XG4gICAgICAgICAgICAgIHZhciBaID0gay5nZXRPZmZzZXREYXRhKCksIGRlID0gSi5sZWZ0ICsgSi53aWR0aCAvIDIgLSBaLndpZHRoIC8gMjtcbiAgICAgICAgICAgICAgay5jc3MoXCJsZWZ0XCIsIGRlICsgXCJweFwiKSwgRiA9PT0gXCJ1cFwiID8gay5jc3MoXCJ0b3BcIiwgSi50b3AgLSBaLmhlaWdodCAtIDggKyBcInB4XCIpIDogRiA9PT0gXCJkb3duXCIgJiYgay5jc3MoXCJ0b3BcIiwgSi50b3AgKyBKLmhlaWdodCArIDggKyBcInB4XCIpLCBoID0gKDAsIG0uZGVmYXVsdCkoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgay5jc3MoXCJ2aXNpYmlsaXR5XCIsIFwidm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ICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGsoTiwgUCkge1xuICAgICAgICAgIHZhciBqID0gbS5jb25maWcubGlua0NoZWNrKE4sIFApO1xuICAgICAgICAgIGlmIChqICE9PSB2b2lkIDApIHtcbiAgICAgICAgICAgIGlmIChqID09PSAhMClcbiAgICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgICAgbS5jb25maWcuY3VzdG9tQWxlcnQoaiwgXCJ3YXJuaW5nXCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gITE7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGggPSB7XG4gICAgICAgICAgd2lkdGg6IDMwMCxcbiAgICAgICAgICBoZWlnaHQ6IDAsXG4gICAgICAgICAgdGFiczogW3tcbiAgICAgICAgICAgIHRpdGxlOiBtLmkxOG5leHQudChcIm1lbnVzLnBhbmVsTWVudXMubGluay5cXHU5NEZFXFx1NjNBNVwiKSxcbiAgICAgICAgICAgIHRwbDogYDxkaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZD1cImAgKyBBICsgYFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZT1cInRleHRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiYmxvY2tcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlPVwiYCArIHggKyBgXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj1cImAgKyBtLmkxOG5leHQudChcIm1lbnVzLnBhbmVsTWVudXMubGluay5cXHU5NEZFXFx1NjNBNVxcdTY1ODdcXHU1QjU3XCIpICsgYFwiLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZD1cImAgKyB3ICsgYFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZT1cInRleHRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiYmxvY2tcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlPVwiYCArIFIgKyBgXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj1cImAgKyBtLmkxOG5leHQudChcIlxcdTU5ODJcIikgKyBgIGh0dHBzOi8vLi4uXCIvPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ3LWUtYnV0dG9uLWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIGlkPVwiYCArIEUgKyBgXCIgY2xhc3M9XCJyaWdodFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgICsgbS5pMThuZXh0LnQoXCJcXHU2M0QyXFx1NTE2NVwiKSArIGBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBpZD1cImAgKyBDICsgJ1wiIGNsYXNzPVwiZ3JheSByaWdodFwiIHN0eWxlPVwiZGlzcGxheTonICsgTSArIGBcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYCArIG0uaTE4bmV4dC50KFwibWVudXMucGFuZWxNZW51cy5saW5rLlxcdTUzRDZcXHU2RDg4XFx1OTRGRVxcdTYzQTVcIikgKyBgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+YCxcbiAgICAgICAgICAgIGV2ZW50czogW1xuICAgICAgICAgICAgICB7I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bGUgJiYgKGRlID0gdmUgKyBpZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghIVogJiYgKGRlIHx8IChkZSA9IFopLCAhIWsoZGUsIFopKSlcbiAgICAgICAgICAgICAgICAgIHJldHVybiAkKGRlLCBaKSwgITA7XG4gICAgICAgICAgICAgIH0sIGJpbmRFbnRlcjogITAgfSxcbiAgICAgICAgICAgICAgeyBzZWxlY3RvcjogXCIjXCIgKyBDLCB0eXBlOiBcImNsaWNrXCIsIGZuOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gRigpLCAhMDtcbiAgICAgICAgICAgICAgfSB9XG4gICAgICAgICAgICBdXG4gICAgICAgICAgfV1cbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIGg7XG4gICAgICB9XG4gICAgICBpLmRlZmF1bHQgPSBUO1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgwKSwgZCA9IHModCgxKSksIGMgPSBzKHQoNCkpO1xuICAgICAgKDAsIGQuZGVmYXVsdCkoaSwgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6ICEwIH0pLCBpLmluc2VydEh0bWwgPSBpLmNyZWF0ZVBhcnRIdG1sID0gaS5tYWtlSHRtbFN0cmluZyA9IGkuZ2V0VG9wTm9kZSA9IHZvaWQgMDtcbiAgICAgIGZ1bmN0aW9uIHAobSwgeCkge1xuICAgICAgICB2YXIgUiA9IG0sIHcgPSBtO1xuICAgICAgICBkbyB7XG4gICAgICAgICAgaWYgKFIudGV4dENvbnRlbnQgPT09IHgpXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB3ID0gUiwgUi5wYXJlbnROb2RlICYmIChSID0gUiA9PSBudWxsID8gdm9pZCAwIDogUi5wYXJlbnROb2RlKTtcbiAgICAgICAgfSB3aGlsZSAoKFIgPT0gbnVsbCA/IHZvaWQgMCA6IFIubm9kZU5hbWUpICE9PS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U7XG4gICAgICAgICAgaWYgKFggPT09IFwiI3RleHRcIilcbiAgICAgICAgICAgIFAgPSBQICsgKFcgPT0gbnVsbCA/IHZvaWQgMCA6IFcudGV4dENvbnRlbnQpO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdmFyIEogPSAoRSA9IChBID0gVyA9PSBudWxsID8gdm9pZCAwIDogVy5maXJzdENoaWxkKSA9PT0gbnVsbCB8fCBBID09PSB2b2lkIDAgPyB2b2lkIDAgOiBBLnBhcmVudEVsZW1lbnQpID09PSBudWxsIHx8IEUgPT09IHZvaWQgMCA/IHZvaWQgMCA6IEUuaW5uZXJIVE1MO1xuICAgICAgICAgICAgVyAmJiAoUCA9IFAgKyB2KFcsIEogIT0gbnVsbCA/IEogOiBcIlwiKSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBaID0gKEMgPSBXID09IG51bGwgPyB2b2lkIDAgOiBXLm5leHRTaWJsaW5nKSAhPT0gbnVsbCAmJiBDICE9PSB2b2lkIDAgPyBDIDogVztcbiAgICAgICAgICBpZiAoWiA9PT0gVylcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIFcgPSBaO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBoID0gXCJcIiArIE4gKyBQICsgaiwgaCA9IFQoaywgaCksIGg7XG4gICAgICB9XG4gICAgICBpLmluc2VydEh0bWwgPSBTO1xuICAgICAgZnVuY3Rpb24gRChtKSB7XG4gICAgICAgIGZvciAodmFyIHgsIFIgPSAoeCA9IG0udGV4dENvbnRlbnQpICE9PSBudWxsICYmIHggIT09IHZvaWQgMCA/IHggOiBcIlwiLCB3ID0gW107IChtID09IG51bGwgPyB2b2lkIDAgOiBtLnRleHRDb250ZW50KSA9PT0gUjsgKVxuICAgICAgICAgIG0ubm9kZU5hbWUgIT09IFwiUFwiICYmIG0ubm9kZU5hbWUgIT09IFwiVEFCTEVcIiAmJiB3LnB1c2gobSksIG0gPSBtLmNoaWxkTm9kZXNbMF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iAgICAgICAgICAgICAgICAgICAgICAgIDwvcD5gKSwgdmFsdWU6IFwiY2VudGVyXCIgfSwgeyAkZWxlbTogUy5kZWZhdWx0KGA8cD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInctZS1pY29uLXBhcmFncmFwaC1yaWdodCB3LWUtZHJvcC1saXN0LWl0ZW1cIj48L2k+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYCArIHcuaTE4bmV4dC50KFwibWVudXMuZHJvcExpc3RNZW51Lmp1c3RpZnkuXFx1OTc2MFxcdTUzRjNcIikgKyBgXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3A+YCksIHZhbHVlOiBcInJpZ2h0XCIgfSwgeyAkZWxlbTogUy5kZWZhdWx0KGA8cD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInctZS1pY29uLXBhcmFncmFwaC1qdXN0aWZ5IHctZS1kcm9wLWxpc3QtaXRlbVwiPjwvaT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgICsgdy5pMThuZXh0LnQoXCJtZW51cy5kcm9wTGlzdE1lbnUuanVzdGlmeS5cXHU0RTI0XFx1N0FFRlwiKSArIGBcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvcD5gKSwgdmFsdWU6IFwianVzdGlmeVwiIH1dLCBjbGlja0hhbmRsZXI6IGZ1bmN0aW9uKHkpIHtcbiAgICAgICAgICAgIEEuY29tbWFuZCh5KTtcbiAgICAgICAgICB9IH07XG4gICAgICAgICAgcmV0dXJuIEEgPSB4LmNhbGwodGhpcywgRSwgdywgQykgfHwgdGhpcywgQTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gUi5wcm90b3R5cGUuY29tbWFuZCA9IGZ1bmN0aW9uKHcpIHtcbiAgICAgICAgICB2YXIgQSA9IHRoaXMuZWRpdG9yLCBFID0gQS5zZWxlY3Rpb24sIEMgPSBFLmdldFNlbGVjdGlvbkNvbnRhaW5lckV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W3tcbiAgICAgICAgICB0aXRsZTogbS5pMThuZXh0LnQoXCJtZW51cy5wYW5lbE1lbnVzLnZpZGVvLlxcdTRFMEFcXHU0RjIwXFx1ODlDNlxcdTk4OTFcIiksXG4gICAgICAgICAgdHBsOiBgPGRpdiBjbGFzcz1cInctZS11cC12aWRlby1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cImAgKyBNICsgYFwiIGNsYXNzPVwidy1lLXVwLWJ0blwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGkgY2xhc3M9XCJ3LWUtaWNvbi11cGxvYWQyXCI+PC9pPlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBzdHlsZT1cImRpc3BsYXk6bm9uZTtcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBpZD1cImAgKyBDICsgYFwiIHR5cGU9XCJmaWxlXCIgYWNjZXB0PVwidmlkZW8vKlwiLz5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgIDwvZGl2PmAsXG4gICAgICAgICAgZXZlbnRzOiBbXG4gICAgICAgICAgICB7IHNlbGVjdG9yOiBcIiNcIiArIE0sIHR5cGU6IFwiY2xpY2tcIiwgZm46IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICB2YXIgaCA9IGIuZGVmYXVsdChcIiNcIiArIEMpLCBOID0gaC5lbGVtc1swXTtcbiAgICAgICAgICAgICAgaWYgKE4pXG4gICAgICAgICAgICAgICAgTi5jbGljaygpO1xuICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgICAgfSB9LFxuICAgICAgICAgICAgeyBzZWxlY3RvcjogXCIjXCIgKyBDLCB0eXBlOiBcImNoYW5nZVwiLCBmbjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIHZhciBoID0gYi5kZWZhdWx0KFwiI1wiICsgQyksIE4gPSBoLmVsZW1zWzBdO1xuICAgICAgICAgICAgICBpZiAoIU4pXG4gICAgICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgICAgICB2YXIgUCA9IE4uZmlsZXM7XG4gICAgICAgICAgICAgIHJldHVybiBQLmxlbmd0aCAmJiB3LnVwbG9hZFZpZGVvKFApLCAhMDtcbiAgICAgICAgICAgIH0gfVxuICAgICAgICAgIF1cbiAgICAgICAgfSwge1xuICAgICAgICAgIHRpdGxlOiBtLmkxOG5leHQudChcIm1lbnVzLnBhbmVsTWVudXMudmlkZW8uXFx1NjNEMlxcdTUxNjVcXHU4OUM2XFx1OTg5MVwiKSxcbiAgICAgICAgICB0cGw6IGA8ZGl2PlxuICAgICAgICAgICAgICAgICAgICA8aW5wdXQgXG4gICAgICAgICAgICAgICAgICAgICAgICBpZD1cImAgKyBBICsgYFwiIFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZT1cInRleHRcIiBcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiYmxvY2tcIiBcbiAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiYCArIG0uaTE4bmV4dC50KFwiXFx1NTk4MlwiKSArIGBcXHVGRjFBPGlmcmFtZSBzcmM9Li4uID48L2lmcmFtZT5cIi8+XG4gICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ3LWUtYnV0dG9uLWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgaWQ9XCJgICsgRSArIGBcIiBjbGFzcz1cInJpZ2h0XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYCArIG0uaTE4bmV4dC50KFwiXFx1NjNEMlxcdTUxNjVcIikgKyBgXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+YCxcbiAgICAgICAgICBldmVudHM6IFtcbiAgICAgICAgICAgIHsgc2VsZWN0b3I6IFwiI1wiICsgRSwgdHlwZTogXCJjbGlja1wiLCBmbjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIHZhciBoLCBOID0gYi5kZWZhdWx0KFwiI1wiICsgQSksIFAgPSAoMCwgYy5kZWZhdWx0KShoID0gTi52YWwoKSkuY2FsbChoKTtcbiAgICAgICAgICAgICAgaWYgKCEhUCAmJiAhIUIoUCkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHkoUCksICEwO1xuICAgICAgICAgICAgfSwgYmluZEVudGVyOiAhMCB9XG4gICAgICAgICAgXVxuICAgICAgICB9XSwgRiA9IHtcbiAgICAgICAgICB3aWR0aDogMzAwLFxuICAgICAgICAgIGhlaWdodDogMCxcbiAgICAgICAgICB0YWJzOiBbXVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gd2luZG93LkZpbGVSZWFkZXIgJiYgKFIudXBsb2FkVmlkZW9TZXJ2ZXIgfHwgUi5jdXN0b21VcGxvYWRWaWRlbykgJiYgRi50YWJzLnB1c2goJFswXSksIFIuc2hvd0xpbmtWaWRlbyAmJiBGLnRhYnMucHVzaCgkWzFdKSwgRjtcbiAgICAgIH1cbiAgICAgIGkuZGVmYXVsdCA9IFQ7XG4gICAgfSwgZnVuY3Rpb24obywgaSwgdCkge1xuICAgICAgdmFyIHMgPSB0KDApLCBkID0gcyh0KDEpKSwgYyA9IHModCgxMzIpKSwgcCA9IHModCg1NykpLCB2ID0gcyh0KDQpKSwgYiA9IHModCgyNykpO1xuICAgICAgKDAsIGQuZGVmYXVsdCkoaSwgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6ICEwIH0pO1xuICAgICAgdmFyIFMgPSB0KDIpLCBEID0gdCg2KSwgVCA9IFMuX19pbXBvcnREZWZhdWx0KHQoMTM1KSksIG0gP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lIHx8ICFnZSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoIShKIGluc3RhbmNlb2YgQXJyYXkpKSB7XG4gICAgICAgICAgICAgICAgICBkZS5wdXNoKFwiXFx1MzAxMFwiICsgSiArIFwiXFx1MzAxMVwiICsgJChcInVwbG9hZFZpZGVvQWNjZXB0IFxcdTRFMERcXHU2NjJGQXJyYXlcIikpO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoISgwLCBjLmRlZmF1bHQpKEopLmNhbGwoSiwgZnVuY3Rpb24oQWUpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBBZSA9PT0gdGUuc3BsaXQoXCIuXCIpW3RlLnNwbGl0KFwiLlwiKS5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgICAgICB9KSkge1xuICAgICAgICAgICAgICAgICAgZGUucHVzaChcIlxcdTMwMTBcIiArIHRlICsgXCJcXHUzMDExXCIgKyAkKFwiXFx1NEUwRFxcdTY2MkZcXHU4OUM2XFx1OTg5MVwiKSk7XG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChoIDwgZ2UpIHtcbiAgICAgICAgICAgICAgICAgIGRlLnB1c2goXCJcXHUzMDEwXCIgKyB0ZSArIFwiXFx1MzAxMVwiICsgJChcIlxcdTU5MjdcXHU0RThFXCIpICsgXCIgXCIgKyBoICsgXCJNXCIpO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBaLnB1c2gocGUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KSwgZGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgIHkuY3VzdG9tQWxlcnQoJChcIlxcdTg5QzZcXHU5ODkxXFx1OUE4Q1xcdThCQzFcXHU2NzJBXFx1OTAxQVxcdThGQzdcIikgKyBgOiBcbmAgKyBkZS5qb2luKGBcbmApLCBcIndhcm5pbmdcIik7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChaLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICB5LmN1c3RvbUFsZXJ0KCQoXCJcXHU0RjIwXFx1NTE2NVxcdTc2ODRcXHU2NTg3XFx1NEVGNlxcdTRFMERcXHU1NDA4XFx1NkNENVwiKSwgXCJ3YXJuaW5nXCIpO1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoWCAmJiB0eXBlb2YgWCA9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgdmFyIHZlO1xuICAgICAgICAgICAgICBYKFosICgwLCBwLmRlZmF1bHQpKHZlID0gdGhpcy5pbnNlcnRWaWRlbykuY2FsbCh2ZSwgdGhpcykpO1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgc2UgPSBuZXcgRm9ybURhdGEoKTtcbiAgICAgICAgICAgIGlmICgoMCwgdi5kZWZhdWx0KShaKS5jYWxsKFosIGZ1bmN0aW9uKHBlLCB0ZSkge1xuICAgICAgICAgICAgICB2YXIgZ2UgPSBOIHx8IHBlLm5hbWU7XG4gICAgICAgICAgICAgIFoubGVuZ3RoID4gMSAmJiAoZ2UgPSBnZSArICh0ZSArIDEpKSwgc2UuYXBwZW5kKGdlLCBwZSk7XG4gICAgICAgICAgICB9KSwgRikge1xuICAgICAgICAgICAgICB2YXIgbWUgPSBGLnNwbGl0KFwiI1wiKTtcbiAgICAgICAgICAgICAgRiA9IG1lWzBdO1xuICAgICAgICAgICAgICB2YXIgbGUgPSBtZVsxXSB8fCBcIlwiO1xuICAgICAgICAgICAgICAoMCwgdi5kZWZhdWx0KShEKS5jYWxsKEQsIFAsIGZ1bmN0aW9uKHBlLCB0ZSkge1xuICAg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29uZmlnLCB3ID0gUi5wYXN0ZUZpbHRlclN0eWxlLCBBID0gUi5wYXN0ZUlnbm9yZUltZywgRSA9IHAuZ2V0UGFzdGVIdG1sKHgsIHcsIEEpO1xuICAgICAgICBpZiAoRSlcbiAgICAgICAgICByZXR1cm4gITA7XG4gICAgICAgIHZhciBDID0gcC5nZXRQYXN0ZVRleHQoeCk7XG4gICAgICAgIHJldHVybiAhIUM7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBTKG0sIHgpIHtcbiAgICAgICAgZm9yICh2YXIgUiwgdyA9ICgoUiA9IHguY2xpcGJvYXJkRGF0YSkgPT09IG51bGwgfHwgUiA9PT0gdm9pZCAwID8gdm9pZCAwIDogUi50eXBlcykgfHwgW10sIEEgPSAwOyBBIDwgdy5sZW5ndGg7IEErKykge1xuICAgICAgICAgIHZhciBFID0gd1tBXTtcbiAgICAgICAgICBpZiAoRSA9PT0gXCJGaWxlc1wiKVxuICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAhMTtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIEQobSwgeCkge1xuICAgICAgICBpZiAoISghUyh4LCBtKSAmJiBiKHgsIG0pKSkge1xuICAgICAgICAgIHZhciBSID0gcC5nZXRQYXN0ZUltZ3MobSk7XG4gICAgICAgICAgaWYgKCEhUi5sZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciB3ID0gbmV3IHYuZGVmYXVsdCh4KTtcbiAgICAgICAgICAgIHcudXBsb2FkSW1nKFIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gVChtKSB7XG4gICAgICAgIG0udHh0LmV2ZW50SG9va3MucGFzdGVFdmVudHMudW5zaGlmdChmdW5jdGlvbih4KSB7XG4gICAgICAgICAgRCh4LCBtKTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBpLmRlZmF1bHQgPSBUO1xuICAgIH0sIGZ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iYgIXc7ICkge1xuICAgICAgICAgICAgICAgIGlmICh4LnByZXZpb3VzU2libGluZykge1xuICAgICAgICAgICAgICAgICAgdyA9IHgucHJldmlvdXNTaWJsaW5nO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHggPSB4LnBhcmVudE5vZGU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgeC5ub2RlVHlwZSAhPT0gMyAmJiAodyA9IHguY2hpbGROb2Rlc1tSIC0gMV0pO1xuICAgICAgICAgICAgaWYgKCEhdykge1xuICAgICAgICAgICAgICBmb3IgKHZhciBBID0gdzsgQS5jaGlsZE5vZGVzLmxlbmd0aDsgKVxuICAgICAgICAgICAgICAgIEEgPSBBLmNoaWxkTm9kZXNbQS5jaGlsZE5vZGVzLmxlbmd0aCAtIDFdO1xuICAgICAgICAgICAgICBBIGluc3RhbmNlb2YgSFRNTEVsZW1lbnQgJiYgQS50YWdOYW1lID09PSBcIklNR1wiICYmIChBLnJlbW92ZSgpLCBELnByZXZlbnREZWZhdWx0KCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBpLmRlZmF1bHQgPSBjO1xuICAgIH0sIGZ1bmN0aW9uKG8sIGksIHQpIHtcbiAgICAgIHZhciBzID0gdCgwKSwgZCA9IHModCgxKSksIGMgPSBzKHQoMjYpKSwgcCA9IHModCgxNykpO1xuICAgICAgKDAsIGQuZGVmYXVsdCkoaSwgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6ICEwIH0pO1xuICAgICAgdmFyIHYgPSB0KDIpLCBiID0gdi5fX2ltcG9ydERlZmF1bHQodCgzKSksIFMgPSB0KDYpLCBEID0gdi5fX2ltcG9ydERlZmF1bHQodCg5NikpO1xuICAgICAgZnVuY3Rpb24gVChtKSB7XG4gICAgICAgIHZhciB4LCBSID0g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ZT1cIicgKyBaICsgYFwiPlxuICAgICAgICAgICAgPGRpdiBpZD1cImAgKyBBICsgYFwiIGNsYXNzPVwidy1lLXVwLWJ0blwiPlxuICAgICAgICAgICAgICAgIDxpIGNsYXNzPVwiYCArIEogKyBgXCI+PC9pPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IHN0eWxlPVwiZGlzcGxheTpub25lO1wiPlxuICAgICAgICAgICAgICAgIDxpbnB1dCBpZD1cImAgKyBFICsgJ1wiIHR5cGU9XCJmaWxlXCIgJyArIGggKyAnIGFjY2VwdD1cIicgKyBOICsgYFwiLz5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5gO1xuICAgICAgICB9LCBqID0gW1xuICAgICAgICAgIHsgc2VsZWN0b3I6IFwiI1wiICsgQSwgdHlwZTogXCJjbGlja1wiLCBmbjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICB2YXIgWCA9IFIudXBsb2FkSW1nRnJvbU1lZGlhO1xuICAgICAgICAgICAgaWYgKFggJiYgdHlwZW9mIFggPT0gXCJmdW5jdGlvblwiKVxuICAgICAgICAgICAgICByZXR1cm4gWCgpLCAhMDtcbiAgICAgICAgICAgIHZhciBKID0gYi5kZWZhdWx0KFwiI1wiICsgRSksIFogPSBKLmVsZW1zWzBdO1xuICAgICAgICAgICAgaWYgKFopXG4gICAgICAgICAgICAgIFouY2xpY2soKTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgcmV0dXJuICEwO1xuICAgICAgICAgIH0gfSxcbiAgICAgICAgICB7IHNlbGVjdG9yOiBcIiNcIiArIEUsIHR5cGU6IFwiY2hhbmdlXCIsIGZuOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBYID0gYi5kZWZhdWx0KFwiI1wiICsgRSksIEogPSBYLmVsZW1zWzBdO1xuICAgICAgICAgICAgaWYgKCFKKVxuICAgICAgICAgICAgICByZXR1cm4gITA7XG4gICAgICAgICAgICB2YXIgWiA9IEouZmlsZXM7XG4gICAgICAgICAgICByZXR1cm4gWiAhPSBudWxsICYmIFoubGVuZ3RoICYmIHcudXBsb2FkSW1nKFopLCBKICYmIChKLnZhbHVlID0gXCJcIiksICEwO1xuICAgICAgICAgIH0gfVxuICAgICAgICBdLCBJID0gW2A8aW5wdXRcbiAgICAgICAgICAgIGlkPVwiYCArIEMgKyBgXCJcbiAgICAgICAgICAgIHR5cGU9XCJ0ZXh0XCJcbiAgICAgICAgICAgIGNsYXNzPVwiYmxvY2tcIlxuICAgICAgICAgICAgcGxhY2Vob2xkZXI9XCJgICsgRihcIlxcdTU2RkVcXHU3MjQ3XFx1NTczMFxcdTU3NDBcIikgKyAnXCIvPiddO1xuICAgICAgICBSLnNob3dMaW5rSW1nQWx0ICYmIEkucHVzaChgXG4gICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgaWQ9XCJgICsgTSArIGBcIlxuICAgICAgICAgICAgdHlwZT1cInRleHRcIlxuICAgICAgICAgICAgY2xhc3M9XCJibG9ja1wiXG4gICAgICAgICAgICBwbGFjZWhvbGRlcj1cImAgKyBGKFwiXFx1NTZGRVxcdTcyNDdcXHU2NTg3XFx1NUI1N1xcdThCRjRcXHU2NjBFXCIpICsgJ1wiLz4nKSwgUi5zaG93TGlua0ltZ0hyZWYgJiYgSS5wdXNoKGBcbiAgICAgICAgPGlucHV0XG4gICAgICAgICAgICBpZD1cImAgKyB5ICsgYFwiXG4gICAgICAgICAgICB0eXBlPVwidGV4dFwiXG4gICAgICAgICAgICBjbGFzcz1cImJsb2NrXCJcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiYCArIEYoXCJcXHU4REYzXFx1OEY2Q1xcdTk0RkVcXHU2M0E1XCIpICsgJ1wiLz4nKTtcbiAgICAgICAgdmFyIFYgPSBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgdGl0bGU6IEYoXCJcXHU0RTBBXFx1NEYyMFxcdTU2RkVcXHU3MjQ3XCIpLFxuICAgICAgICAgICAgdHBsOiBQKFwidy1lLXVwLWltZy1jb250YWluZXJcIiwgXCJ3LWUtaWNvbi11cGxvYWQyXCIsIFwiXCIpLFxuICAgICAgICAgICAgZXZlbnRzOiBqXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7IHRpdGxlOiBGKFwiXFx1N0Y1MVxcdTdFRENcXHU1NkZFXFx1NzI0N1wiKSwgdHBsOiBgPGRpdj5cbiAgICAgICAgICAgICAgICAgICAgYCArIEkuam9pbihcIlwiKSArIGBcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInctZS1idXR0b24tY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBpZD1cImAgKyBCICsgJ1wiIGNsYXNzPVwicmlnaHRcIj4nICsgRihcIlxcdTYzRDJcXHU1MTY1XCIsIFwiXCIpICsgYDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5gLCBldmVudHM6IFt7IHNlbGVjdG9yOiBcIiNcIiArIEIsIHR5cGU6IFwiY2xpY2tcIiwgZm46IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdmFyIFgsIEogPSBiLmRlZmF1bHQoXCIjXCIgKyBDKSwgWiA9ICgwLCBwLmRlZmF1bHQpKFggPSBKLnZhbCgpKS5jYWxsKFgpO1xuICAgICAgICAgICAgaWYgKCEhWikge1xuICAgICAgICAgICAgICB2YXIgZGU7XG4gICAgICAgICAgICAgIGlmIChSLnNob3dMaW5rSW1nQWx0KSB7XG4gICAgICAgICAgICAgICAgdmFyIHZlO1xuICAgICAgICAgICAgICAgIGRlID0gKDAsIHAuZGVmYXVsdCkodmUgPSBiLmRlZmF1bHQoXCIjXCIgKyBNKS52YWwoKSkuY2FsbCh2ZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdmFyIHNlO1xuICAgICAg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ICAgdmFyIHAgPSB0KDIpLCB2ID0gcC5fX2ltcG9ydERlZmF1bHQodCgzKSksIGIgPSBwLl9faW1wb3J0RGVmYXVsdCh0KDI0KSksIFMgPSBwLl9faW1wb3J0RGVmYXVsdCh0KDM2NikpLCBEID0gZnVuY3Rpb24oVCkge1xuICAgICAgICBwLl9fZXh0ZW5kcyhtLCBUKTtcbiAgICAgICAgZnVuY3Rpb24gbSh4KSB7XG4gICAgICAgICAgdmFyIFIgPSB0aGlzLCB3ID0gdi5kZWZhdWx0KGA8ZGl2IGNsYXNzPVwidy1lLW1lbnVcIiBkYXRhLXRpdGxlPVwiXFx1N0YyOVxcdThGREJcIj5cbiAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInctZS1pY29uLWluZGVudC1pbmNyZWFzZVwiPjwvaT5cbiAgICAgICAgICAgIDwvZGl2PmApLCBBID0geyB3aWR0aDogMTMwLCB0aXRsZTogXCJcXHU4QkJFXFx1N0Y2RVxcdTdGMjlcXHU4RkRCXCIsIHR5cGU6IFwibGlzdFwiLCBsaXN0OiBbeyAkZWxlbTogdi5kZWZhdWx0KGA8cD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInctZS1pY29uLWluZGVudC1pbmNyZWFzZSB3LWUtZHJvcC1saXN0LWl0ZW1cIj48L2k+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYCArIHguaTE4bmV4dC50KFwibWVudXMuZHJvcExpc3RNZW51LmluZGVudC5cXHU1ODlFXFx1NTJBMFxcdTdGMjlcXHU4RkRCXCIpICsgYFxuICAgICAgICAgICAgICAgICAgICAgICAgPHA+YCksIHZhbHVlOiBcImluY3JlYXNlXCIgfSwgeyAkZWxlbTogdi5kZWZhdWx0KGA8cD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInctZS1pY29uLWluZGVudC1kZWNyZWFzZSB3LWUtZHJvcC1saXN0LWl0ZW1cIj48L2k+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYCArIHguaTE4bmV4dC50KFwibWVudXMuZHJvcExpc3RNZW51LmluZGVudC5cXHU1MUNGXFx1NUMxMVxcdTdGMjlcXHU4RkRCXCIpICsgYFxuICAgICAgICAgICAgICAgICAgICAgICAgPHA+YCksIHZhbHVlOiBcImRlY3JlYXNlXCIgfV0sIGNsaWNrSGFuZGxlcjogZnVuY3Rpb24oQykge1xuICAgICAgICAgICAgUi5jb21tYW5kKEMpO1xuICAgICAgICAgIH0gfTtcbiAgICAgICAgICByZXR1cm4gUiA9IFQuY2FsbCh0aGlzLCB3LCB4LCBBKSB8fCB0aGlzLCBSO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtLnByb3RvdHlwZS5jb21tYW5kID0gZnVuY3Rpb24oeCkge1xuICAgICAgICAgIHZhciBSID0gdGhpcy5lZGl0b3IsIHcgPSBSLnNlbGVjdGlvbi5nZXRTZWxlY3Rpb25Db250YWluZXJFbGVtKCk7XG4gICAgICAgICAgaWYgKHcgJiYgUi4kdGV4dEVsZW0uZXF1YWwodykpIHtcbiAgICAgICAgICAgIHZhciBBID0gUi5zZWxlY3Rpb24uZ2V0U2VsZWN0aW9uUmFuZ2VUb3BOb2RlcygpO1xuICAgICAgICAgICAgQS5sZW5ndGggPiAwICYmICgwLCBjLmRlZmF1bHQpKEEpLmNhbGwoQSwgZnVuY3Rpb24oRSkge1xuICAgICAgICAgICAgICBTLmRlZmF1bHQodi5kZWZhdWx0KEUpLCB4LCBSKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgdyAmJiB3Lmxlbmd0aCA+IDAgJiYgKDAsIGMuZGVmYXVsdCkodykuY2FsbCh3LCBmdW5jdGlvbihFKSB7XG4gICAgICAgICAgICAgIFMuZGVmYXVsdCh2LmRlZmF1bHQoRSksIHgsIFIpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgUi5zZWxlY3Rpb24ucmVzdG9yZVNlbGVjd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FwiXG4gICAgICAgICAgICApIDogKE0gPSBTLmNyZWF0ZUVsZW1lbnQodyksICgwLCBjLmRlZmF1bHQpKHkpLmNhbGwoeSwgZnVuY3Rpb24oVykge1xuICAgICAgICAgICAgICBNLmFwcGVuZENoaWxkKFcuZWxlbXNbMF0pO1xuICAgICAgICAgICAgfSkpLCB0aGlzLnNlbGVjdGlvblJhbmdlRWxlbS5zZXQoTSksIFMuaW5zZXJ0QmVmb3JlKEEsIE0sIEEuZWxlbXNbMF0pLCBBLnJlbW92ZSgpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKHZhciBoID0gJDsgaC5sZW5ndGg7IClcbiAgICAgICAgICAgICAgeS5wdXNoKGgpLCBGICE9IG51bGwgJiYgRi5lcXVhbChoKSA/IGggPSB2LmRlZmF1bHQodm9pZCAwKSA6IGggPSBoLm5leHQoKTtcbiAgICAgICAgICAgIHZhciBOID0gJC5wcmV2KCksIFAgPSBGLm5leHQoKTtcbiAgICAgICAgICAgIGlmIChCID09PSBSID8gTSA9IFMuY3JlYXRlRWxlbWVudEZyYWdtZW50KFxuICAgICAgICAgICAgICB5LFxuICAgICAgICAgICAgICBTLmNyZWF0ZURvY3VtZW50RnJhZ21lbnQoKSxcbiAgICAgICAgICAgICAgXCJwXCJcbiAgICAgICAgICAgICkgOiAoTSA9IFMuY3JlYXRlRWxlbWVudCh3KSwgKDAsIGMuZGVmYXVsdCkoeSkuY2FsbCh5LCBmdW5jdGlvbihXKSB7XG4gICAgICAgICAgICAgIE0uYXBwZW5kKFcuZWxlbXNbMF0pO1xuICAgICAgICAgICAgfSkpLCBOLmxlbmd0aCAmJiBQLmxlbmd0aCkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBqID0gW107IFAubGVuZ3RoOyApXG4gICAgICAgICAgICAgICAgai5wdXNoKFApLCBQID0gUC5uZXh0KCk7XG4gICAgICAgICAgICAgIHZhciBJID0gUy5jcmVhdGVFbGVtZW50KEIpO1xuICAgICAg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ICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBWID0gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpLCBXID0gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpLCBRID0gUy5nZXRTdGFydFBvaW50KGspOyBRLmxlbmd0aDsgKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgWCA9IFEuZWxlbXNbMF07XG4gICAgICAgICAgICAgICAgICBRID0gUS5uZXh0KCksIFYuYXBwZW5kKFgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKHZhciBKID0gUy5nZXRFbmRQb2ludChoKSwgWiA9IFtdOyBKLmxlbmd0aDsgKVxuICAgICAgICAgICAgICAgICAgWi51bnNoaWZ0KEouZWxlbXNbMF0pLCBKID0gSi5wcmV2KCk7XG4gICAgICAgICAgICAgICAgKDAsIGMuZGVmYXVsdCkoWikuY2FsbChaLCBmdW5jdGlvbihsZSkge1xuICAgICAgICAgICAgICAgICAgVy5hcHBlbmQobGUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHZhciBkZSA9IFMuY3JlYXRlRWxlbWVudChGKTtcbiAgICAgICAgICAgICAgICBkZS5hcHBlbmQoViksIGRlLmFwcGVuZChOKSwgZGUuYXBwZW5kKFcpLCBOID0gZGUsIHRoaXMuc2VsZWN0aW9uUmFuZ2VFbGVtLnNldChOKSwgdi5kZWZhdWx0KGRlKS5pbnNlcnRBZnRlcihrKSwgISghKChSID0gay5jaGlsZHJlbigpKSA9PT0gbnVsbCB8fCBSID09PSB2b2lkIDApICYmIFIubGVuZ3RoKSAmJiBrLnJlbW92ZSgpLCAhKCEoKHcgPSBoLmNoaWxkcmVuKCkpID09PSBudWxsIHx8IHcgPT09IHZvaWQgMCkgJiYgdy5sZW5ndGgpICYmIGgucmVtb3ZlKCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBQLmxlbmd0aCA9IDA7XG4gICAgICAgICAgICAgIGZvciAodmFyIFEgPSBTLmdldFN0YXJ0UG9pbnQoayk7IFEubGVuZ3RoOyApXG4gICAgICAgICAgICAgICAgUC5wdXNoKFEpLCBRID0gUS5uZXh0KCk7XG4gICAgICAgICAgICAgIGZvciAodmFyIEogPSBTLmdldEVuZFBvaW50KGgpLCBaID0gW107IEoubGVuZ3RoOyApXG4gICAgICAgICAgICAgICAgWi51bnNoaWZ0KEopLCBKID0gSi5wcmV2KCk7XG4gICAgICAgICAgICAgIFAucHVzaC5hcHBseShQLCBaKSwgaiA9PT0gJCA/IChOID0gUy5jcmVhdGVFbGVtZW50RnJhZ21lbnQoUCwgUy5jcmVhdGVEb2N1bWVudEZyYWdtZW50KCksIFwicFwiKSwgdGhpcy5zZWxlY3Rpb25SYW5nZUVsZW0uc2V0KE4pLCBTLmluc2VydEJlZm9yZShrLCBOLCBoLmVsZW1zWzBdKSkgOiAoTiA9IFMuY3JlYXRlRWxlbWVudChGKSwgKDAsIGMuZGVmYXVsdCkoUCkuY2FsbChQLCBmdW5jdGlvbih0ZSkge1xuICAgICAgICAgICAgICAgIE4uYXBwZW5kKHRlLmVsZW1zWzBdKTtcbiAgICAgICAgICAgICAgfSksIHRoaXMuc2VsZWN0aW9uUmFuZ2VFbGVtLnNldChOKSwgdi5kZWZhdWx0KE4pLmluc2VydEFmdGVyKGspKSwgISghKChBID0gay5jaGlsZHJlbigpKSA9PT0gbnVsbCB8fCBBID09PSB2b2lkIDApICYmIEEubGVuZ3RoKSAmJiBoLnJlbW92ZSgpLCAhKCEoKEUgPSBoLmNoaWxkcmVuKCkpID09PSBudWxsIHx8IEUgPT09IHZvaWQgMCkgJiYgRS5sZW5ndGgpICYmIGgucmVtb3ZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBmb3IgKHZhciB2ZSA9IFtdLCBKID0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aChsZSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB2YXIgWiA9IDAsIGRlID0gdm9pZCAwO1xuICAgICAgICAgICAgICBmb3IgKFcucHVzaCh0aGlzLmdldERvbShRLmVsZW1zWzBdKSk7IFZbWl0gIT09IHRoaXMuZ2V0RG9tKFguZWxlbXNbMF0pOyApXG4gICAgICAgICAgICAgICAgZGUgPSBTLmRlZmF1bHQoVltaXS5uZXh0RWxlbWVudFNpYmxpbmcpLmVsZW1zWzBdLCAoMCwgcC5kZWZhdWx0KShNKS5jYWxsKE0sIFMuZGVmYXVsdChkZSkuZ2V0Tm9kZU5hbWUoKSkgIT09IC0xICYmIFcucHVzaChkZSksIFYucHVzaChkZSksIForKztcbiAgICAgICAgICAgICAgaWYgKFMuZGVmYXVsdChWWzBdKS5nZXROb2RlTmFtZSgpICE9PSBcIlBcIikge1xuICAgICAgICAgICAgICAgIFogPSAwO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHZlID0gMDsgdmUgPCBWLmxlbmd0aDsgdmUrKylcbiAgICAgICAgICAgICAgICAgIGlmIChTLmRlZmF1bHQoVlt2ZV0pLmdldE5vZGVOYW1lKCkgPT09IFwiUFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIFogPSB2ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKFogPT09IDApXG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgc2UgPSAwOyBzZSAhPT0gWjsgKVxuICAgICAgICAgICAgICAgICAgVi5zaGlmdCgpLCBzZSsrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHRoaXMuc2V0UmFuZ2UoVlswXSwgVltWLmxlbmd0aCAtIDFdKSwgKDAsIGMuZGVmYXVsdCkoVikuY2FsbChWLCBmdW5jdGlvbihtZSkge1xuICAgICAgICAgICAgICAgIGggP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RG9tID0gZnVuY3Rpb24odykge1xuICAgICAgICAgIHZhciBBID0gUy5kZWZhdWx0KHcpLmVsZW1zWzBdO1xuICAgICAgICAgIGlmICghQS5wYXJlbnROb2RlKVxuICAgICAgICAgICAgcmV0dXJuIEE7XG4gICAgICAgICAgZnVuY3Rpb24gRShDLCBNKSB7XG4gICAgICAgICAgICB2YXIgeSA9IFMuZGVmYXVsdChDLnBhcmVudE5vZGUpO1xuICAgICAgICAgICAgcmV0dXJuIE0uJHRleHRFbGVtLmVxdWFsKHkpID8gQyA6IEUoeS5lbGVtc1swXSwgTSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBBID0gRShBLCB0aGlzLmVkaXRvciksIEE7XG4gICAgICAgIH0sIFIucHJvdG90eXBlLmFjdGlvbiA9IGZ1bmN0aW9uKHcsIEEpIHtcbiAgICAgICAgICBBLmNtZC5kbyhcImluc2VydEhUTUxcIiwgdyk7XG4gICAgICAgIH0sIFIucHJvdG90eXBlLnN0eWxlUHJvY2Vzc2luZyA9IGZ1bmN0aW9uKHcpIHtcbiAgICAgICAgICB2YXIgQSA9IFwiXCI7XG4gICAgICAgICAgcmV0dXJuICgwLCBjLmRlZmF1bHQpKHcpLmNhbGwodywgZnVuY3Rpb24oRSkge1xuICAgICAgICAgICAgRSAhPT0gXCJcIiAmJiAoMCwgcC5kZWZhdWx0KShFKS5jYWxsKEUsIFwibGluZS1oZWlnaHRcIikgPT09IC0xICYmIChBID0gQSArIEUgKyBcIjtcIik7XG4gICAgICAgICAgfSksIEE7XG4gICAgICAgIH0sIFIucHJvdG90eXBlLnNldFJhbmdlID0gZnVuY3Rpb24odywgQSkge1xuICAgICAgICAgIHZhciBFID0gdGhpcy5lZGl0b3IsIEMgPSB3aW5kb3cuZ2V0U2VsZWN0aW9uID8gd2luZG93LmdldFNlbGVjdGlvbigpIDogZG9jdW1lbnQuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgQyA9PSBudWxsIHx8IEMucmVtb3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VCA9IEQuZWxlbXNbMF07XG4gICAgICAgIHJldHVybiBULm5vZGVOYW1lID09PSBcIlBcIiAmJiBULmlubmVySFRNTCA9PT0gXCI8YnI+XCI7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBiKEQpIHtcbiAgICAgICAgZnVuY3Rpb24gVChtLCB4KSB7XG4gICAgICAgICAgaWYgKHguZGV0YWlsID49IDMpIHtcbiAgICAgICAgICAgIHZhciBSID0gd2luZG93LmdldFNlbGVjdGlvbigpO1xuICAgICAgICAgICAgaWYgKFIpIHtcbiAgICAgICAgICAgICAgdmFyIHcgPSBSLmZvY3VzTm9kZSwgQSA9IFIuYW5jaG9yTm9kZSwgRSA9IHAuZGVmYXVsdChBID09IG51bGwgPyB2b2lkIDAgOiBBLnBhcmVudEVsZW1lbnQpO1xuICAgICAgICAgICAgICBpZiAoIW0uaXNDb250YWluKHAuZGVmYXVsdCh3KSkpIHtcbiAgICAgICAgICAgICAgICB2YXIgQyA9IEUuZWxlbXNbMF0udGFnTmFtZSA9PT0gXCJURFwiID8gRSA6IEUucGFyZW50VW50aWxFZGl0b3IoXCJ0ZFwiLCBEKTtcbiAgICAgICAgICAgICAgICBpZiAoQykge1xuICAgICAgICAgICAgICAgICAgdmFyIE0gPSBELnNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgICAgICAgTSA9PSBudWxsIHx8IE0uc2V0RW5kKEMuZWxlbXNbMF0sIEMuZWxlbXNbMF0uY2hpbGROb2Rlcy5sZW5ndGgpLCBELnNlbGVjdGlvbi5yZXN0b3JlU2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIEQudHh0LmV2ZW50SG9va3MudGFibGVDbGlja0V2ZW50cy5wdXNoKFQpO1xuICAgICAgfVxuICAgICAgaS5iaW5kQ2xpY2tFdmVudCA9IGI7XG4gICAgICBmdW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gKG0uc2VsZWN0aW9uLmNyZWF0ZVJhbmdlQnlFbGVtKGspLCBtLnNlbGVjdGlvbi5yZXN0b3JlU2VsZWN0aW9uKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgQiA9IGZ1bmN0aW9uKGspIHtcbiAgICAgICAgICByZXR1cm4gbS5pMThuZXh0LnQoayk7XG4gICAgICAgIH0sICQgPSB7XG4gICAgICAgICAgd2lkdGg6IDUwMCxcbiAgICAgICAgICBoZWlnaHQ6IDAsXG4gICAgICAgICAgdGFiczogW3tcbiAgICAgICAgICAgIHRpdGxlOiBCKFwibWVudXMucGFuZWxNZW51cy5jb2RlLlxcdTYzRDJcXHU1MTY1XFx1NEVFM1xcdTc4MDFcIiksXG4gICAgICAgICAgICB0cGw6IGA8ZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgPHNlbGVjdCBuYW1lPVwiXCIgaWQ9XCJgICsgRSArIGBcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgICsgKDAsIGMuZGVmYXVsdCkodyA9IG0uY29uZmlnLmxhbmd1YWdlVHlwZSkuY2FsbCh3LCBmdW5jdGlvbihGKSB7XG4gICAgICAgICAgICAgIHJldHVybiBcIjxvcHRpb24gXCIgKyAoUiA9PSBGID8gXCJzZWxlY3RlZFwiIDogXCJcIikgKyAnIHZhbHVlID1cIicgKyBGICsgJ1wiPicgKyBGICsgXCI8L29wdGlvbj5cIjtcbiAgICAgICAgICAgIH0pICsgYFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XG4gICAgICAgICAgICAgICAgICAgICAgICA8dGV4dGFyZWEgaWQ9XCJgICsgQSArICdcIiB0eXBlPVwidGV4dFwiIGNsYXNzPVwid2FuZy1jb2RlLXRleHRhcmVhXCIgcGxhY2Vob2xkZXI9XCJcIiBzdHlsZT1cImhlaWdodDogMTYwcHhcIj4nICsgeC5yZXBsYWNlKC8mcXVvdDsvZywgJ1wiJykgKyBgPC90ZXh0YXJlYT5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ3LWUtYnV0dG9uLWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIGlkPVwiYCArIEMgKyAnXCIgY2xhc3M9XCJyaWdodFwiPicgKyAoUy5kZWZhdWx0KG0pID8gQihcIlxcdTRGRUVcXHU2NTM5XCIpIDogQihcIlxcdTYzRDJcXHU1MTY1XCIpKSArIGA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5gLFxuICAgICAgICAgICAgZXZlbnRzOiBbXG4gICAgICAgICAgICAgIHsgc2VsZWN0b3I6IFwiI1wiICsgQywgdHlwZTogXCJjbGlja1wiLCBmbjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgdmFyIGssIGgsIE4gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChBKSwgUCA9IGIuZGVmYXVsdChcIiNcIiArIEUpLCBqID0gUC52YWwoKSwgSSA9IE4udmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKG0uaGlnaGxpZ2h0ID8gayA9IG0uaGlnaGxpZ2h0LmhpZ2hsaWdodEF1dG8oSSkudmFsdWUgOiBrID0gXCI8eG1wPlwiICsgSSArIFwiPC94bXA+XCIsICEhSSlcbiAgICAgICAgICAgICAgICAgIHJldHVybiBTLmRlZmF1bHQobSkgPyAhMSA6IChoID0gJzxwcmU+PGNvZGUgY2xhc3M9XCInICsgaiArICdcIj4nICsgayArIFwiPC9jb2RlPjwvcHJlPlwiLCBNKGgpLCAhMCk7XG4gICAgICAgICAgICAgIH0gfVxuICAgICAgICAgICAgXVxuICAgICAgICAgIH1dXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiAkO1xuICAgICAgfVxuICAgICAgaS5kZWZhdWx0ID0gVDtcbiAgICB9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ICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIFogPSBCLmdldEN1cnNvclBvcygpLCBkZSA9IGIuZ2V0Q3Vyc29yTmV4dE5vZGUoRiA9PSBudWxsID8gdm9pZCAwIDogRi5nZXROb2RlKCksIGssIFopLCB2ZSA9IFMuZGVmYXVsdCh2LmRlZmF1bHQoZGUpKSwgc2UgPSB2ZS5nZXRJbnB1dENvbnRhaW5lcigpLCBtZSA9IHNlLnBhcmVudCgpLmdldE5vZGUoKSwgbGUgPSB2ZS5nZXRUb2RvKCksIGllID0gc2UuZ2V0Tm9kZSgpLm5leHRTaWJsaW5nO1xuICAgICAgICAgICAgaWYgKChGID09IG51bGwgPyB2b2lkIDAgOiBGLnRleHQoKSkgPT09IFwiXCIgJiYgKEYgPT0gbnVsbCB8fCBGLmFwcGVuZCh2LmRlZmF1bHQoXCI8YnI+XCIpKSksIGxlLmluc2VydEFmdGVyKCQpLCAhaWUgfHwgKGllID09IG51bGwgPyB2b2lkIDAgOiBpZS50ZXh0Q29udGVudCkgPT09IFwiXCIpIHtcbiAgICAgICAgICAgICAgaWYgKChpZSA9PSBudWxsID8gdm9pZCAwIDogaWUubm9kZU5hbWUpICE9PSBcIkJSXCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGUgPSB2LmRlZmF1bHQoXCI8YnI+XCIpO1xuICAgICAgICAgICAgICAgIHBlLmluc2VydEFmdGVyKHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBCLm1vdmVDdXJzb3IobWUsIDEpO1xuICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgIEIubW92ZUN1cnNvcihtZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIHcoQykge1xuICAgICAgICAgIHZhciBNLCB5O1xuICAgICAgICAgIGlmIChiLmlzQWxsVG9kbyh4KSkge1xuICAgICAgICAgICAgdmFyIEIgPSB4LnNlbGVjdGlvb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KSA6ICgwLCBjLmRlZmF1bHQpKE0pLmNhbGwoTSwgZnVuY3Rpb24oQikge1xuICAgICAgICAgICAgICBDLnRhcmdldC5hcHBlbmRDaGlsZChCKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSBcImFmdGVyXCI6XG4gICAgICAgICAgICAoMCwgYy5kZWZhdWx0KShNKS5jYWxsKE0sIGZ1bmN0aW9uKEIpIHtcbiAgICAgICAgICAgICAgQy50YXJnZXQuaW5zZXJ0QmVmb3JlKEIsIHkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgKDAsIGMuZGVmYXVsdCkoTSkuY2FsbChNLCBmdW5jdGlvbihCKSB7XG4gICAgICAgICAgICAgIHkuYXBwZW5kQ2hpbGQoQik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBiKEMpIHtcbiAgICAgICAgZm9yICh2YXIgTSA9IDAsIHkgPSAoMCwgcC5kZWZhdWx0KShDLm5vZGVzKTsgTSA8IHkubGVuZ3RoOyBNKyspIHtcbiAgICAgICAgICB2YXIgQiA9IHlbTV0sICQgPSBCWzBdLCBGID0gQlsxXTtcbiAgICAgICAgICBzd2l0Y2ggKCQpIHtcbiAgICAgICAgICAgIGNhc2UgXCJhZGRcIjpcbiAgICAgICAgICAgICAgKDAsIGMuZGVmYXVsdCkoRikuY2FsbChGLCBmdW5jdGlvbihrKSB7XG4gICAgICAgICAgICAgICAgQy50YXJnZXQucmVtb3ZlQ2hpbGQoayk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgICAgICAgdihDLCBGKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBTKEMpIHtcbiAgICAgICAgdmFyIE0gPSBDLnRhcmdldDtcbiAgICAgICAgQy5vbGRWYWx1ZSA9PSBudWxsID8gTS5yZW1vdmVBdHRyaWJ1dGUoQy5hdHRyKSA6IE0uc2V0QXR0cmlidXRlKEMuYXR0ciwgQy5vbGRWYWx1ZSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBEKEMpIHtcbiAgICAgICAgQy50YXJnZXQudGV4dENvbnRlbnQgPSBDLm9sZFZhbHVlO1xuICAgICAgfVxuICAgICAgdmFyIFQgPSB7IG5vZGU6IGIsIHRleHQ6IEQsIGF0dHI6IFMgfTtcbiAgICAgIGZ1bmN0aW9uIG0oQykge1xuICAgICAgICBmb3IgKHZhciBNID0gQy5sZW5ndGggLSAxOyBNID4gLTE7IE0tLSkge1xuICAgICAgICAgIHZhciB5ID0gQ1tNXTtcbiAgICAgICAgICBUW3kudHlwZV0oeSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGkucmV2b2tlID0gbTtcbiAgICAgIGZ1bmN0aW9uIHgoQykge1xuICAgICAgICBmb3IgKHZhciBNID0gMCwgeSA9ICgwLCBwLmRlZmF1bHQpKEMubm9kZXMpOyBNIDwgeS5sZW5ndGg7IE0rKykge1xuICAgICAgICAgIHZhciBCID0geVtNXSwgJCA9IEJbMF0sIEYgPSBCWzFdO1xuICAgICAgICAgIHN3aXRjaCAoJCkge1xuICAgICAgICAgICAgY2FzZSBcImFkZFwiOiB7XG4gICAgICAgICAgICAgIHYoQywgRik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgICAoMCwgYy5kZWZhdWx0KShGKS5jYWxsKEYsIGZ1bmN0aW9uKGspIHtcbiAgICAgICAgICAgICAgICBrLnBhcmVudE5vZGUucmVtb3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b3RvdHlwZS5yZXNldE1heCA9IGZ1bmN0aW9uKGIpIHtcbiAgICAgICAgICBiID0gTWF0aC5hYnMoYiksIGIgJiYgKHRoaXMubWF4ID0gYik7XG4gICAgICAgIH0sICgwLCBkLmRlZmF1bHQpKHYucHJvdG90eXBlLCBcInNpemVcIiwge1xuICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhLmxlbmd0aDtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGVudW1lcmFibGU6ICExLFxuICAgICAgICAgIGNvbmZpZ3VyYWJsZTogITBcbiAgICAgICAgfSksIHYucHJvdG90eXBlLmluc2VydExhc3QgPSBmdW5jdGlvbihiKSB7XG4gICAgICAgICAgaWYgKHRoaXMuaXNSZSkge1xuICAgICAgICAgICAgdmFyIFM7XG4gICAgICAgICAgICAoMCwgYy5kZWZhdWx0KShTID0gdGhpcy5kYXRhKS5jYWxsKFMsIHRoaXMucG9pbnQgKyAxKSwgdGhpcy5pc1JlID0gITE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZvciAodGhpcy5kYXRhLnB1c2goYik7IHRoaXMubWF4ICYmIHRoaXMuc2l6ZSA+IHRoaXMubWF4OyApXG4gICAgICAgICAgICB0aGlzLmRhdGEuc2hpZnQoKTtcbiAgICAgICAgICByZXR1cm4gdGhpcy5wb2ludCA9IHRoaXMuc2l6ZSAtIDEsIHRoaXM7XG4gICAgICAgIH0sIHYucHJvdG90eXBlLmN1cnJlbnQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5kYXRhW3RoaXMucG9pbnRdO1xuICAgICAgICB9LCB2LnByb3RvdHlwZS5wcmV2ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgaWYgKCF0aGlzLmlzUmUgJiYgKHRoaXMuaXNSZSA9ICEwKSwgdGhpcy5wb2ludC0tLCB0aGlzLnBvaW50IDwgMCkge1xuICAgICAgICAgICAgdGhpc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xcyA9IEIgPj4gMTtcbiAgICAgICAgdGhpcy5lID0gcGFyc2VJbnQoRSwgMTYpO1xuICAgICAgICB2YXIgZWUgPSBuZXcgQmlnSW50ZWdlcihFLCAxNik7XG4gICAgICAgIGZvciAoOzspIHtcbiAgICAgICAgICAgIGZvciAoOzspIHtcbiAgICAgICAgICAgICAgICB0aGlzLnAgPSBuZXcgQmlnSW50ZWdlcihCIC0gcXMsIDEsIHJuZyk7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucC5zdWJ0cmFjdChCaWdJbnRlZ2VyLk9ORSkuZ2NkKGVlKS5jb21wYXJlVG8oQmlnSW50ZWdlci5PTkUpID09IDAgJiYgdGhpcy5wLmlzUHJvYmFibGVQcmltZSgxMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICg7Oykge1xuICAgICAgICAgICAgICAgIHRoaXMucSA9IG5ldyBCaWdJbnRlZ2VyKHFzLCAxLCBybmcpO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnEuc3VidHJhY3QoQmlnSW50ZWdlci5PTkUpLmdjZChlZSkuY29tcGFyZVRvKEJpZ0ludGVnZXIuT05FKSA9PSAwICYmIHRoaXMucS5pc1Byb2JhYmxlUHJpbWUoMTApKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLnAuY29tcGFyZVRvKHRoaXMucSkgPD0gMCkge1xuICAgICAgICAgICAgICAgIHZhciB0ID0gdGhpcy5wO1xuICAgICAgICAgICAgICAgIHRoaXMucCA9IHRoaXMucTtcbiAgICAgICAgICAgICAgICB0aGlzLnEgPSB0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHAxID0gdGhpcy5wLnN1YnRyYWN0KEJpZ0ludGVnZXIuT05FKTtcbi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dWJ0cmFjdChCaWdJbnRlZ2VyLk9ORSk7XG4gICAgICAgICAgICAgICAgdmFyIHExID0gcnNhLnEuc3VidHJhY3QoQmlnSW50ZWdlci5PTkUpO1xuICAgICAgICAgICAgICAgIHZhciBwaGkgPSBwMS5tdWx0aXBseShxMSk7XG4gICAgICAgICAgICAgICAgaWYgKHBoaS5nY2QoZWUpLmNvbXBhcmVUbyhCaWdJbnRlZ2VyLk9ORSkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByc2EubiA9IHJzYS5wLm11bHRpcGx5KHJzYS5xKTtcbiAgICAgICAgICAgICAgICAgICAgcnNhLmQgPSBlZS5tb2RJbnZlcnNlKHBoaSk7XG4gICAgICAgICAgICAgICAgICAgIHJzYS5kbXAxID0gcnNhLmQubW9kKHAxKTtcbiAgICAgICAgICAgICAgICAgICAgcnNhLmRtcTEgPSByc2EuZC5tb2QocTEpO1xuICAgICAgICAgICAgICAgICAgICByc2EuY29lZmYgPSByc2EucS5tb2RJbnZlcnNlKHJzYS5wKTtcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7IGNhbGxiYWNrKCk7IH0sIDApOyAvLyBlc2NhcGVcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQobG9vcDEsIDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgbG9vcDMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgcnNhLnEgPSBuYmkoKTtcbiAgICAgICAgICAgICAgICByc2EucS5mcm9tTnVtYmVyQXN5bmMocXMsIDEsIHJuZywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByc2EucS5zdWJ0cmFjdChCaWdJbnRlZ2VyLk9ORSkuZ2NkYShlZSwgZnVuY3Rpb24gKHIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyLmNvbXBhcmVUbyhCaWdJbnRlZ2VyLk9ORSkgPT0gMCAmJiByc2EucS5pc1Byb2JhYmxlUHJpbWUoMTApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChsb29wNCwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGxvb3AzLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGxvb3AyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHJzYS5wID0gbmJpKCk7XG4gICAgICAgICAgICAgICAgcnNhLnAuZnJvbU51bWJlckFzeW5jKEIgLSBxcywgMSwgcm5nLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJzYS5wLnN1YnRyYWN0KEJpZ0ludGVnZXIuT05FKS5nY2RhKGVlLCBmdW5jdGlvbiAocikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHIuY29tcGFyZVRvKEJpZ0ludGVnZXIuT05FKSA9PSAwICYmIHJzYS5wLmlzUHJvYmFibGVQcmltZSgxMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGxvb3AzLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQobG9vcDIsIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG4gIC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xuICogVGhpcyBjYXVzZWQgYnkgYSBidWcgb2YganNkb2MyLlxuICogQG5hbWUgS0pVUi5hc24xXG4gKiBAbmFtZXNwYWNlXG4gKi9cbmlmICh0eXBlb2YgS0pVUi5hc24xID09IFwidW5kZWZpbmVkXCIgfHwgIUtKVVIuYXNuMSlcbiAgICBLSlVSLmFzbjEgPSB7fTtcbi8qKlxuICogQVNOMSB1dGlsaXRpZXMgY2xhc3NcbiAqIEBuYW1lIEtKVVIuYXNuMS5BU04xVXRpbFxuICogQGNsYXNzIEFTTjEgdXRpbGl0aWVzIGNsYXNzXG4gKiBAc2luY2UgYXNuMSAxLjAuMlxuICovXG5LSlVSLmFzbjEuQVNOMVV0aWwgPSBuZXcgZnVuY3Rpb24gKCkge1xuICAgIHRoaXMuaW50ZWdlclRvQnl0ZUhleCA9IGZ1bmN0aW9uIChpKSB7XG4gICAgICAgIHZhciBoID0gaS50b1N0cmluZygxNik7XG4gICAgICAgIGlmICgoaC5sZW5ndGggJSAyKSA9PSAxKVxuICAgICAgICAgICAgaCA9ICcwJyArIGg7XG4gICAgICAgIHJldHVybiBoO1xuICAgIH07XG4gICAgdGhpcy5iaWdJbnRUb01pblR3b3NDb21wbGVtZW50c0hleCA9IGZ1bmN0aW9uIChiaWdJbnRlZ2VyVmFsdWUpIHtcbiAgICAgICAgdmFyIGggPSBiaWdJbnRlZ2VyVmFsdWUudG9TdHJpbmcoMTYpO1xuICAgICAgICBpZiAoaC5zdWJzdHIoMCwgMSkgIT0gJy0nKSB7XG4gICAgICAgICAgICBpZiAoaC5sZW5ndGggJSAyID09IDEpIHtcbiAgICAgICAgICAgICAgICBoID0gJzAnICsgaDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICghaC5tYXRjaCgvXlswLTddLykpIHtcbiAgICAgICAgICAgICAgICAgICAgaCA9ICcwMCcgKyBoO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHZhciBoUG9zID0gaC5zdWJzdHIoMSk7XG4gICAgICAgICAgICB2YXIgeG9yTGVuID0gaFBvcy5sZW5ndGg7XG4gICAgICAgICAgICBpZiAoeG9yTGVuICUgMiA9PSAxKSB7XG4gICAgICAgICAgICAgICAgeG9yTGVuICs9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIWgubWF0Y2goL15bMC03XS8pKSB7XG4gICAgICAgICAgICAgICAgICAgIHhvckxlbiArPSAyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBoTWFzayA9ICcnO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB4b3JMZW47IGkrKykge1xuICAgICAgICAgICAgICAgIGhNYXNrICs9ICdmJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBiaU1hc2sgPSBuZXcgQmlnSW50ZWdlcihoTWFzaywgMTYpO1xuICAgICAgICAgICAgdmFyIGJpTmVnID0gYmlNYXNrLnhvcihiaWdJbnRlZ2VyVmFsdWUpLmFkZChCaWdJbnRlZ2VyLk9ORSk7XG4gICAgICAgICAgICBoID0gYmlOZWcudG9TdHJpbmcoMTYpLnJlcGxhY2UoL14tLywgJycpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBoO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogZ2V0IFBFTSBzdHJpbmcgZnJvbSBoZXhhZGVjaW1hbCBkYXRhIGFuZCBoZWFkZXIgc3RyaW5nXG4gICAgICogQG5hbWUgZ2V0UEVNU3RyaW5nRnJvbUhleFxuICAgICAqIEBtZW1iZXJPZiBLSlVSLmFzbjEuQVNOMVV0aWxcbiAgICAgKiBAZnVuY3Rpb25cbiAgICAgKiBAcGFyYW0ge1N0cmluZ30gZGF0YUhleCBoZXhhZGVjaW1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mluZzwvbGk+XG4gICAgICogPGxpPidwcm5zdHInIC0gREVSUHJpbnRhYmxlU3RyaW5nPC9saT5cbiAgICAgKiA8bGk+J3RlbHN0cicgLSBERVJUZWxldGV4U3RyaW5nPC9saT5cbiAgICAgKiA8bGk+J2lhNXN0cicgLSBERVJJQTVTdHJpbmc8L2xpPlxuICAgICAqIDxsaT4ndXRjdGltZScgLSBERVJVVENUaW1lPC9saT5cbiAgICAgKiA8bGk+J2dlbnRpbWUnIC0gREVSR2VuZXJhbGl6ZWRUaW1lPC9saT5cbiAgICAgKiA8bGk+J3NlcScgLSBERVJTZXF1ZW5jZTwvbGk+XG4gICAgICogPGxpPidzZXQnIC0gREVSU2V0PC9saT5cbiAgICAgKiA8bGk+J3RhZycgLSBERVJUYWdnZWRPYmplY3Q8L2xpPlxuICAgICAqIDwvdWw+XG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBuZXdPYmplY3Qoeydwcm5zdHInOiAnYWFhJ30pO1xuICAgICAqIG5ld09iamVjdCh7J3NlcSc6IFt7J2ludCc6IDN9LCB7J3BybnN0cic6ICdhYWEnfV19KVxuICAgICAqIC8vIEFTTi4xIFRhZ2dlZCBPYmplY3RcbiAgICAgKiBuZXdPYmplY3Qoeyd0YWcnOiB7J3RhZyc6ICdhMScsXG4gICAgICogICAgICAgICAgICAgICAgICAgICdleHBsaWNpdCc6IHRydWUsXG4gICAgICogICAgICAgICAgICAgICAgICAgICdvYmonOiB7J3NlcSc6IFt7J2ludCc6IDN9LCB7J3BybnN0cic6ICdhYWEnfV19fX0pO1xuICAgICAqIC8vIG1vcmUgc2ltcGxlIHJlcHJlc2VudGF0aW9uIG9mIEFTTi4xIFRhZ2dlZCBPYmplY3RcbiAgICAgKiBuZXdPYmplY3Qoeyd0YWcnOiBbJ2ExJyxcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgdHJ1ZSxcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgeydzZXEnOiBbXG4gICAgICogICAgICAgICAgICA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xuICAgICAgICBpZiAoa2V5ID09IFwibnVsbFwiKVxuICAgICAgICAgICAgcmV0dXJuIG5ldyBfREVSTnVsbChwYXJhbVtrZXldKTtcbiAgICAgICAgaWYgKGtleSA9PSBcIm9pZFwiKVxuICAgICAgICAgICAgcmV0dXJuIG5ldyBfREVST2JqZWN0SWRlbnRpZmllcihwYXJhbVtrZXldKTtcbiAgICAgICAgaWYgKGtleSA9PSBcImVudW1cIilcbiAgICAgICAgICAgIHJldHVybiBuZXcgX0RFUkVudW1lcmF0ZWQocGFyYW1ba2V5XSk7XG4gICAgICAgIGlmIChrZXkgPT0gXCJ1dGY4c3RyXCIpXG4gICAgICAgICAgICByZXR1cm4gbmV3IF9ERVJVVEY4U3RyaW5nKHBhcmFtW2tleV0pO1xuICAgICAgICBpZiAoa2V5ID09IFwibnVtc3RyXCIpXG4gICAgICAgICAgICByZXR1cm4gbmV3IF9ERVJOdW1lcmljU3RyaW5nKHBhcmFtW2tleV0pO1xuICAgICAgICBpZiAoa2V5ID09IFwicHJuc3RyXCIpXG4gICAgICAgICAgICByZXR1cm4gbmV3IF9ERVJQcmludGFibGVTdHJpbmcocGFyYW1ba2V5XSk7XG4gICAgICAgIGlmIChrZXkgPT0gXCJ0ZWxzdHJcIilcbiAgICAgICAgICAgIHJldHVybiBuZXcgX0RFUlRlbGV0ZXhTdHJpbmcocGFyYW1ba2V5XSk7XG4gICAgICAgIGlmIChrZXkgPT0gXCJpYTVzdHJcIilcbiAgICAgICAgICAgIHJldHVybiBuZXcgX0RFUklBNVN0cmluZyhwYXJhbVtrZXldKTtcbiAgICAgICAgaWYgKGtleSA9PSBcInV0Y3RpbWVcIilcbiAgICAgICAgICAgIHJldHVybiBuZXcgX0RFUlVUQ1RpbWUocGFyYW1ba2V5XSk7XG4gICAgICAgIGlmIChrZXkgPT0gXCJnZW50aW1lXCIpXG4gICAgICAgICAgICByZXR1cm4gbmV3IF9ERVJHZW5lcmFsaXplZFRpbWUocGFyYW1ba2V5XSk7XG4gICAgICAgIGlmIChrZXkgPT0gXCJzZXFcIikge1xuICAgICAgICAgICAgdmFyIHBhcmFtTGlzdCA9IHBhcmFtW2tleV07XG4gICAgICAgICAgICB2YXIgYSA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwYXJhbUxpc3QubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgYXNuMU9iaiA9IF9uZXdPYmplY3QocGFyYW1MaXN0W2ldKTtcbiAgICAgICAgICAgICAgICBhLnB1c2goYXNuMU9iaik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbmV3IF9ERVJTZXF1ZW5jZSh7ICdhcnJheSc6IGEgfSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGtleSA9PSBcInNldFwiKSB7XG4gICAgICAgICAgICB2YXIgcGFyYW1MaXN0ID0gcGFyYW1ba2V5XTtcbiAgICAgICAgICAgIHZhciBhID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHBhcmFtTGlzdC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHZhciBhc24xT2JqID0gX25ld09iamVjdChwYXJhbUxpc3RbaV0pO1xuICAgICAgICAgICAgICAgIGEucHVzaChhc24xT2JqKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBuZXcgX0RFUlNldCh7ICdhcnJheSc6IGEgfSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGtleSA9PSBcInRhZ1wiKSB7XG4gICAgICAgICAgICB2YXIgdGFnUGFyYW0gPSBwYXJhbVtrZXldO1xuICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbCh0YWdQYXJhbSkgPT09ICdbb2JqZWN0IEFycmF5XScgJiZcbiAgICAgICAgICAgICAgICB0YWdQYXJhbS5sZW5ndGggPT0gMykge1xuICAgICAgICAgICAgICAgIHZhciBvYmogPSBfbmV3T2JqZWN0KHRhZ1BhcmFtWzJdKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IF9ERVJUYWdnZWRPYmplY3QoeyB0YWc6IHRhZ1BhcmFtWzBdLFxuICAgICAgICAgICAgICAgICAgICBleHBsaWNpdDogdGFnUGFyYW1bMV0sXG4gICAgICAgICAgICAgICAgICAgIG9iajogb2JqIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIG5ld1BhcmFtID0ge307XG4gICAgICAgICAgICAgICAgaWYgKHRhZ1BhcmFtLmV4cGxpY2l0ICE9PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgICAgIG5ld1BhcmFtLmV4cGxpY2l0ID0gdGFnUGFyYW0uZXhwbGljaXQ7XG4gICAgICAgICAgICAgICAgaWYgKHRhZ1BhcmFtLnRhZyAhPT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgICAgICAgICBuZXdQYXJhbS50YWcgPSB0YWdQYXJhbS50YWc7XG4gICAgICAgICAgICAgICAgaWYgKHRhZ1BhcmFtLm9iaiA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBcIm9iaiBzaGFsbCBiZSBzcGVjaWZpZWQgZm9yICd0YWcnLlwiO1xuICAgICAgICAgICAgICAgIG5ld1BhcmFtLm9iaiA9IF9uZXdPYmplY3QodGFnUGFyYW0ub2JqKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IF9ERVJUYWdnZWRPYmplY3QobmV3UGFyYW0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICAvKipcbiAgICAgKiBnZXQgZW5jb2RlZCBoZXhhZGVjaW1hbCBzdHJpbmcgb2YgQVNOMU9iamVjdCBzcGVjaWZlZCBieSBKU09OIHBhcmFtZXRlcnNcbiAgICAgKiBAbmFtZSBqc29uVG9BU04xSEVYXG4gICAgICogQG1lbWJlck9mIEtK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4gICAgICAgIHZhciBoID0gJyc7XG4gICAgICAgIHZhciBiaSA9IG5ldyBCaWdJbnRlZ2VyKHJvaWQsIDEwKTtcbiAgICAgICAgdmFyIGIgPSBiaS50b1N0cmluZygyKTtcbiAgICAgICAgdmFyIHBhZExlbiA9IDcgLSBiLmxlbmd0aCAlIDc7XG4gICAgICAgIGlmIChwYWRMZW4gPT0gNylcbiAgICAgICAgICAgIHBhZExlbiA9IDA7XG4gICAgICAgIHZhciBiUGFkID0gJyc7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcGFkTGVuOyBpKyspXG4gICAgICAgICAgICBiUGFkICs9ICcwJztcbiAgICAgICAgYiA9IGJQYWQgKyBiO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGIubGVuZ3RoIC0gMTsgaSArPSA3KSB7XG4gICAgICAgICAgICB2YXIgYjggPSBiLnN1YnN0cihpLCA3KTtcbiAgICAgICAgICAgIGlmIChpICE9IGIubGVuZ3RoIC0gNylcbiAgICAgICAgICAgICAgICBiOCA9ICcxJyArIGI4O1xuICAgICAgICAgICAgaCArPSBpdG94KHBhcnNlSW50KGI4LCAyKSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGg7XG4gICAgfTtcbiAgICBpZiAoIW9pZFN0cmluZy5tYXRjaCgvXlswLTkuXSskLykpIHtcbiAgICAgICAgdGhyb3cgXCJtYWxmb3JtZWQgb2lkIHN0cmluZzogXCIgKyBvaWRTdHJpbmc7XG4gICAgfVxuICAgIHZhciBoID0gJyc7XG4gICAgdmFyIGEgPSBvaWRTdHJpbmcuc3BsaXQoJy4nKTtcbiAgICB2YXIgaTAgPSBwYXJzZUludChhWzBdKSAqIDQwICsgcGFyc2VJbnQoYVsxXSk7XG4gICAgaCArPSBpdG94KGkwKTtcbiAgICBhLnNwbGljZSgwLCAyKTtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgaCArPSByb2lkdG94KGFbaV0pO1xuICAgIH1cbiAgICByZXR1cm4gaDtcbn07XG4vLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLy8gIEFic3RyYWN0IEFTTi4xIENsYXNzZXNcbi8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4vLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLyoqXG4gKiBiYXNlIGNsYXNzIGZvciBBU04uMSBERVIgZW5jb2RlciBvYmplY3RcbiAqIEBuYW1lIEtKVVIuYXNuMS5BU04xT2JqZWN0XG4gKiBAY2xhc3MgYmFzZSBjbGFzcyBmb3IgQVNOLjEgREVSIGVuY29kZXIgb2JqZWN0XG4gKiBAcHJvcGVydHkge0Jvb2xlYW59IGlzTW9kaWZpZWQgZmxhZyB3aGV0aGVyIGludGVybmFsIGRhdGEgd2FzIGNoYW5nZWRcbiAqIEBwcm9wZXJ0eSB7U3RyaW5nfSBoVExWIGhleGFkZWNpbWFsIHN0cmluZyBvZiBBU04uMSBUTFZcbiAqIEBwcm9wZXJ0eSB7U3RyaW5nfSBoVCBoZXhhZGVjaW1hbCBzdHJpbmcgb2YgQVNOLjEgVExWIHRhZyhUKVxuICogQHByb3BlcnR5IHtTdHJpbmd9IGhMIGhleGFkZWNpbWFsIHN0cmluZyBvZiBBU04uMSBUTFYgbGVuZ3RoKEwpXG4gKiBAcHJvcGVydHkge1N0cmluZ30gaFYgaGV4YWRlY2ltYWwgc3RyaW5nIG9mIEFTTi4xIFRMViB2YWx1ZShWKVxuICogQGRlc2NyaXB0aW9uXG4gKi9cbktKVVIuYXNuMS5BU04xT2JqZWN0ID0gZnVuY3Rpb24gKCkge1xuICAgIHZhciBpc01vZGlmaWVkID0gdHJ1ZTtcbiAgICB2YXIg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LjYuXG4gICAgICovXG4gICAgdGhpcy5mb3JtYXREYXRlID0gZnVuY3Rpb24gKGRhdGVPYmplY3QsIHR5cGUsIHdpdGhNaWxsaXMpIHtcbiAgICAgICAgdmFyIHBhZCA9IHRoaXMuemVyb1BhZGRpbmc7XG4gICAgICAgIHZhciBkID0gdGhpcy5sb2NhbERhdGVUb1VUQyhkYXRlT2JqZWN0KTtcbiAgICAgICAgdmFyIHllYXIgPSBTdHJpbmcoZC5nZXRGdWxsWWVhcigpKTtcbiAgICAgICAgaWYgKHR5cGUgPT0gJ3V0YycpXG4gICAgICAgICAgICB5ZWFyID0geWVhci5zdWJzdHIoMiwgMik7XG4gICAgICAgIHZhciBtb250aCA9IHBhZChTdHJpbmcoZC5nZXRNb250aCgpICsgMSksIDIpO1xuICAgICAgICB2YXIgZGF5ID0gcGFkKFN0cmluZyhkLmdldERhdGUoKSksIDIpO1xuICAgICAgICB2YXIgaG91ciA9IHBhZChTdHJpbmcoZC5nZXRIb3VycygpKSwgMik7XG4gICAgICAgIHZhciBtaW4gPSBwYWQoU3RyaW5nKGQuZ2V0TWludXRlcygpKSwgMik7XG4gICAgICAgIHZhciBzZWMgPSBwYWQoU3RyaW5nKGQuZ2V0U2Vjb25kcygpKSwgMik7XG4gICAgICAgIHZhciBzID0geWVhciArIG1vbnRoICsgZGF5ICsgaG91ciArIG1pbiArIHNlYztcbiAgICAgICAgaWYgKHdpdGhNaWxsaXMgPT09IHRydWUpIHtcbiAgICAgICAgICAgIHZhciBtaWxsaXMgPSBkLmdldE1pbGxpc2Vjb25kcygpO1xuICAgICAgICAgICAgaWYgKG1pbGxpcyAhPSAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNNaWxsaXMgPSBwYWQoU3RyaW5nKG1pbGxpcyksIDMpO1xuICAgICAgICAgICAgICAgIHNNaWxsaXMgPSBzTWlsbGlzLnJlcGxhY2UoL1swXSskLywgXCJcIik7XG4gICAgICAgICAgICAgICAgcyA9IHMgKyBcIi5cIiArIH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XknXTtcbiAgICAgICAgfVxuICAgIH1cbn07XG5ZQUhPTy5sYW5nLmV4dGVuZChLSlVSLmFzbjEuREVSQWJzdHJhY3RTdHJ1Y3R1cmVkLCBLSlVSLmFzbjEuQVNOMU9iamVjdCk7XG4vLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLy8gIEFTTi4xIE9iamVjdCBDbGFzc2VzXG4vLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbi8qKlxuICogY2xhc3MgZm9yIEFTTi4xIERFUiBCb29sZWFuXG4gKiBAbmFtZSBLSlVSLmFzbjEuREVSQm9vbGVhblxuICogQGNsYXNzIGNsYXNzIGZvciBBU04uMSBERVIgQm9vbGVhblxuICogQGV4dGVuZHMgS0pVUi5hc24xLkFTTjFPYmplY3RcbiAqIEBkZXNjcmlwdGlvblxuICogQHNlZSBLSlVSLmFzbjEuQVNOMU9iamVjdCAtIHN1cGVyY2xhc3NcbiAqL1xuS0pVUi5hc24xLkRFUkJvb2xlYW4gPSBmdW5jdGlvbiAoKSB7XG4gICAgS0pVUi5hc24xLkRFUkJvb2xlYW4uc3VwZXJjbGFzcy5jb25zdHJ1Y3Rvci5jYWxsKHRoaXMpO1xuICAgIHRoaXMuaFQgPSBcIjAxXCI7XG4gICAgdGhpcy5oVExWID0gXCIwMTAxZmZcIjtcbn07XG5ZQUhPTy5sYW5nLmV4dGVuZChLSlVSLmFzbjEuREVSQm9vbGVhbiwgS0pVUi5hc24xLkFTTjFPYmplY3QpO1xuLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbi8qKlxuICogY2xhc3MgZm9yI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tcbiAgICAgICAgICAgIGggKz0gcm9pZHRveChhW2ldKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmhUTFYgPSBudWxsO1xuICAgICAgICB0aGlzLmlzTW9kaWZpZWQgPSB0cnVlO1xuICAgICAgICB0aGlzLnMgPSBudWxsO1xuICAgICAgICB0aGlzLmhWID0gaDtcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIHNldCB2YWx1ZSBieSBhIE9JRCBuYW1lXG4gICAgICogQG5hbWUgc2V0VmFsdWVOYW1lXG4gICAgICogQG1lbWJlck9mIEtKVVIuYXNuMS5ERVJPYmplY3RJZGVudGlmaWVyI1xuICAgICAqIEBmdW5jdGlvblxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBvaWROYW1lIE9JRCBuYW1lIChleC4gJ3NlcnZlckF1dGgnKVxuICAgICAqIEBzaW5jZSAxLjAuMVxuICAgICAqIEBkZXNjcmlwdGlvblxuICAgICAqIE9JRCBuYW1lIHNoYWxsIGJlIGRlZmluZWQgaW4gJ0tKVVIuYXNuMS54NTA5Lk9JRC5uYW1lMm9pZExpc3QnLlxuICAgICAqIE90aGVyd2lzZSByYWlzZSBlcnJvci5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIG8gPSBuZXcgS0pVUi5hc24xLkRFUk9iamVjdElkZW50aWZpZXIoKTtcbiAgICAgKiBvLnNldFZhbHVlTmFtZShcInNlcnZlckF1dGhcIik7XG4gICAgICovXG4gICAgdGhpcy5zZXRWYWx1ZU5hbWUgPSBmdW5jdGlvbiAob2lkTmFtZSkge1xuICAgICAgICB2YXIgb2lkID0gS0pVUi5hc24xLng1MDkuT0lELm5hbWUyb2lkKG9pZE5hbWUpO1xuICAgICAgICBpZiAob2lkICE9PSAnJykge1xuICAgICAgICAgICAgdGhpcy5zZXRWYWx1ZU9pZFN0cmluZyhvaWQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgXCJERVJPYmplY3RJZGV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1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgdGhpcy5kYXRlID0gbmV3IERhdGUoKTtcbiAgICAgICAgICAgIHRoaXMucyA9IHRoaXMuZm9ybWF0RGF0ZSh0aGlzLmRhdGUsICd1dGMnKTtcbiAgICAgICAgICAgIHRoaXMuaFYgPSBzdG9oZXgodGhpcy5zKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5oVjtcbiAgICB9O1xuICAgIGlmIChwYXJhbXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAocGFyYW1zLnN0ciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB0aGlzLnNldFN0cmluZyhwYXJhbXMuc3RyKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0eXBlb2YgcGFyYW1zID09IFwic3RyaW5nXCIgJiYgcGFyYW1zLm1hdGNoKC9eWzAtOV17MTJ9WiQvKSkge1xuICAgICAgICAgICAgdGhpcy5zZXRTdHJpbmcocGFyYW1zKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChwYXJhbXMuaGV4ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRoaXMuc2V0U3RyaW5nSGV4KHBhcmFtcy5oZXgpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHBhcmFtcy5kYXRlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRoaXMuc2V0QnlEYXRlKHBhcmFtcy5kYXRlKTtcbiAgICAgICAgfVxuICAgIH1cbn07XG5ZQUhPTy5sYW5nLmV4dGVuZChLSlVSLmFzbjEuREVSVVRDVGltZSwgS0pVUi5hc24xLkRFUkFic3RyYWN0VGltZSk7XG4vLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLyoqXG4gKiBjbGFzcyBmb3IgQVNOLjEgREVSIEdlbmVyYWxpemVkVGltZVxuICog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AgICgoKE1fb2Zmc2V0X2kgPDwgOCkgIHwgKE1fb2Zmc2V0X2kgPj4+IDI0KSkgJiAweDAwZmYwMGZmKSB8XG5cdCAgICAgICAgICAgICAgICAgICAgKCgoTV9vZmZzZXRfaSA8PCAyNCkgfCAoTV9vZmZzZXRfaSA+Pj4gOCkpICAmIDB4ZmYwMGZmMDApXG5cdCAgICAgICAgICAgICAgICApO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIC8vIFNob3J0Y3V0XG5cdCAgICAgICAgICAgIHZhciBIICA9IHRoaXMuX2hhc2gud29yZHM7XG5cdCAgICAgICAgICAgIHZhciBobCA9IF9obC53b3Jkcztcblx0ICAgICAgICAgICAgdmFyIGhyID0gX2hyLndvcmRzO1xuXHQgICAgICAgICAgICB2YXIgemwgPSBfemwud29yZHM7XG5cdCAgICAgICAgICAgIHZhciB6ciA9IF96ci53b3Jkcztcblx0ICAgICAgICAgICAgdmFyIHNsID0gX3NsLndvcmRzO1xuXHQgICAgICAgICAgICB2YXIgc3IgPSBfc3Iud29yZHM7XG5cblx0ICAgICAgICAgICAgLy8gV29ya2luZyB2YXJpYWJsZXNcblx0ICAgICAgICAgICAgdmFyIGFsLCBibCwgY2wsIGRsLCBlbDtcblx0ICAgICAgICAgICAgdmFyIGFyLCBiciwgY3IsIGRyLCBlcjtcblxuXHQgICAgICAgICAgICBhciA9IGFsID0gSFswXTtcblx0ICAgICAgICAgICAgYnIgPSBibCA9IEhbMV07XG5cdCAgICAgICAgICAgIGNyID0gY2wgPSBIWzJdO1xuXHQgICAgICAgICAgICBkciA9IGRsID0gSFszXTtcblx0ICAgICAgICAgICAgZXIgPSBlbCA9IEhbNF07XG5cdCAgICAgICAgICAgIC8vIENvbXB1dGF0aW9uXG5cdCAgICAgICAgICAgIHZhciB0O1xuXHQgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IDgwOyBpICs9IDEpIHtcblx0ICAgICAgICAgICAgICAgIHQgPSAoYWwgKyAgTVtvZmZzZXQremxbaV1dKXwwO1xuXHQgICAgICAgICAgICAgICAgaWYgKGk8MTYpe1xuXHRcdCAgICAgICAgICAgIHQgKz0gIGYxKGJsLGNsLGRsKSArIGhsWzBdO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpPDMyKSB7XG5cdFx0ICAgICAgICAgICAgdCArPSAgZjIoYmwsY2wsZGwpICsgaGxbMV07XG5cdCAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGk8NDgpIHtcblx0XHQgICAgICAgICAgICB0ICs9ICBmMyhibCxjbCxkbCkgKyBobFsyXTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaTw2NCkge1xuXHRcdCAgICAgICAgICAgIHQgKz0gIGY0KGJsLGNsLGRsKSArIGhsWzNdO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHsvLyBpZiAoaTw4MCkge1xuXHRcdCAgICAgICAgICAgIHQgKz0gIGY1KGJsLGNsLGRsKSArIGhsWzRdO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgdCA9IHR8MDtcblx0ICAgICAgICAgICAgICAgIHQgPSAgcm90bCh0LHNsW2ldKTtcblx0ICAgICAgICAgICAgICAgIHQgPSAodCtlbCl8MDtcblx0ICAgICAgICAgICAgICAgIGFsID0gZWw7XG5cdCAgICAgICAgICAgICAgICBlbCA9IGRsO1xuXHQgICAgICAgICAgICAgICAgZGwgPSByb3RsKGNsLCAxMCk7XG5cdCAgICAgICAgICAgICAgICBjbCA9IGJsO1xuXHQgICAgICAgICAgICAgICAgYmwgPSB0O1xuXG5cdCAgICAgICAgICAgICAgICB0ID0gKGFyICsgTVtvZmZzZXQrenJbaV1dKXwwO1xuXHQgICAgICAgICAgICAgICAgaWYgKGk8MTYpe1xuXHRcdCAgICAgICAgICAgIHQgKz0gIGY1KGJyLGNyLGRyKSArIGhyWzBdO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpPDMyKSB7XG5cdFx0ICAgICAgICAgICAgdCArPSAgZjQoYnIsY3IsZHIpICsgaHJbMV07XG5cdCAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGk8NDgpIHtcblx0XHQgICAgICAgICAgICB0ICs9ICBmMyhicixjcixkcikgKyBoclsyXTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaTw2NCkge1xuXHRcdCAgICAgICAgICAgIHQgKz0gIGYyKGJyLGNyLGRyKSArIGhyWzNdO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHsvLyBpZiAoaTw4MCkge1xuXHRcdCAgICAgICAgICAgIHQgKz0gIGYxKGJyLGNyLGRyKSArIGhyWzRdO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgdCA9IHR8MDtcblx0ICAgICAgICAgICAgICAgIHQgPSAgcm90bCh0LHNyW2ldKSA7XG5cdCAgICAgICAgICAgICAgICB0ID0gKHQrZXIpfDA7XG5cdCAgICAgICAgICAgICAgICBhciA9IGVyO1xuXHQgICAgICAgICAgICAgICAgZXIgPSBkcjtcblx0ICAgICAgICAgICAgICAgIGRyID0gcm90bChjciwgMTApO1xuXHQgICAgICAgICAgICAgICAgY3IgPSBicjtcblx0ICAgICAgICAgICAgICAgIGJyID0gdDtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAvLyBJbnRlcm1lZGlhdGUgaGFzaCB2YWx1ZVxuXHQgICAgICAgICAgICB0ICAgID0gKEhbMV0gKyBjbCArIGRyKXwwO1xuXHQgICAgICAgICAgICBIWzFdID0gKEhbMl0gKyBkbCArIGVyKXwwO1xuXHQgICAgICAgICAgICBIWzJdID0gKEhbM10gKyBlbCArIGFyKXwwO1xuXHQgICAgICAgICAgICBIWzNdID0gKEhbNF0gKyBhbCArIGJyKXwwO1xuXHQgICAgICAgICAgICBIWzRdID0gKEhbMF0gKyBibCArIGNyKXwwO1xuXHQgICAgICAgICAgICBIWzBdID0gIHQ7XG5cdCAg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zO1xuXG5cdCAgICAgICAgICAgIC8vIFN3YXAgZW5kaWFuXG5cdCAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgNTsgaSsrKSB7XG5cdCAgICAgICAgICAgICAgICAvLyBTaG9ydGN1dFxuXHQgICAgICAgICAgICAgICAgdmFyIEhfaSA9IEhbaV07XG5cblx0ICAgICAgICAgICAgICAgIC8vIFN3YXBcblx0ICAgICAgICAgICAgICAgIEhbaV0gPSAoKChIX2kgPDwgOCkgIHwgKEhfaSA+Pj4gMjQpKSAmIDB4MDBmZjAwZmYpIHxcblx0ICAgICAgICAgICAgICAgICAgICAgICAoKChIX2kgPDwgMjQpIHwgKEhfaSA+Pj4gOCkpICAmIDB4ZmYwMGZmMDApO1xuXHQgICAgICAgICAgICB9XG5cblx0ICAgICAgICAgICAgLy8gUmV0dXJuIGZpbmFsIGNvbXB1dGVkIGhhc2hcblx0ICAgICAgICAgICAgcmV0dXJuIGhhc2g7XG5cdCAgICAgICAgfSxcblxuXHQgICAgICAgIGNsb25lOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHZhciBjbG9uZSA9IEhhc2hlci5jbG9uZS5jYWxsKHRoaXMpO1xuXHQgICAgICAgICAgICBjbG9uZS5faGFzaCA9IHRoaXMuX2hhc2guY2xvbmUoKTtcblxuXHQgICAgICAgICAgICByZXR1cm4gY2xvbmU7XG5cdCAgICAgICAgfVxuXHQgICAgfSk7XG5cblxuXHQgICAgZnVuY3Rpb24gZjEoeCwgeSwgeikge1xuXHQgICAgICAgIHJldHVybiAoKHgpIF4gKHkpIF4gKHopKTtcblxuXHQgICAgfVxuXG5cdCAgICBmdW5jdGlvbiBmMih4LCB5LCB6KSB7XG5cdCAgICAgICAgcmV0dXJuICgoKHgpJih5KSkgfCAoKH54KSYoeikpKTtcblx0ICAgIH1cblxuXHQgICAgZnVuY3Rpb24gZjMoeCwgeSwgeikge1xuXHQgICAgICAgIHJldHVybiAoKCh4KSB8ICh+KHkpKSk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ERDgxXFx1RERCNi1cXHVEREJFXFx1RERDOS1cXHVERENDXFx1RERDRlxcdURFMkYtXFx1REUzMVxcdURFMzRcXHVERTM2XFx1REUzN1xcdURFM0VcXHVERURGXFx1REVFMy1cXHVERUVBXFx1REYwMFxcdURGMDFcXHVERjNCXFx1REYzQ1xcdURGM0VcXHVERjQwXFx1REY1N1xcdURGNjYtXFx1REY2Q1xcdURGNzAtXFx1REY3NF18XFx1RDgwNVtcXHVEQzM4LVxcdURDM0ZcXHVEQzQyLVxcdURDNDRcXHVEQzQ2XFx1REM1RVxcdURDQjBcXHVEQ0IzLVxcdURDQjhcXHVEQ0JBXFx1RENCRFxcdURDQkZcXHVEQ0MwXFx1RENDMlxcdURDQzNcXHVEREFGXFx1RERCMi1cXHVEREI1XFx1RERCQ1xcdUREQkRcXHVEREJGXFx1RERDMFxcdURERENcXHVEREREXFx1REUzMy1cXHVERTNBXFx1REUzRFxcdURFM0ZcXHVERTQwXFx1REVBQlxcdURFQURcXHVERUIwLVxcdURFQjVcXHVERUI3XFx1REYxRC1cXHVERjFGXFx1REYyMi1cXHVERjI1XFx1REYyNy1cXHVERjJCXXxcXHVEODA2W1xcdURDMkYtXFx1REMzN1xcdURDMzlcXHVEQzNBXFx1REQzMFxcdUREM0JcXHVERDNDXFx1REQzRVxcdURENDNcXHVEREQ0LVxcdURERDdcXHVERERBXFx1REREQlxcdURERTBcXHVERTAxLVxcdURFMEFcXHVERTMzLVxcdURFMzhcXHVERTNCLVxcdURFM0VcXHVERTQ3XFx1REU1MS1cXHVERTU2XFx1REU1OS1cXHVERTVCXFx1REU4QS1cXHVERTk2XFx1REU5OFxcdURFOTldfFxcdUQ4MDdbXFx1REMzMC1cXHVEQzM2XFx1REMzOC1cXHVEQzNEXFx1REMzRlxcdURDOTItXFx1RENBN1xcdURDQUEtXFx1RENCMFxcdURDQjJcXHVEQ0IzXFx1RENCNVxcdURDQjZcXHVERDMxLVxcdUREMzZcXHVERDNBXFx1REQzQ1xcdUREM0R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