(function(){"use strict";var __vite_style__=document.createElement("style");__vite_style__.textContent=`:root{--primary-color: #1e90ff;--error-color: #ed052b;--info-color: #0276e3;--success-color: #91c24f;--warn-color: #da8104;--ui-motion-speed: .15s;--ui-motion-ease: cubic-bezier(.4, 0, .2, 1);--ui-corner-radius: 6px;--ui-box-shadow-material: 0 0 20px rgba(black, .2);--ui-motion: var(--ui-motion-speed) var(--ui-motion-ease);--bg-alt-color: #eff3f6;--bg-color: #fff;--cautious-color: #cb9d0d;--faint-color: rgba(0, 0, 0, .1);--fg-color: #393a3d;--magic-color: purple;--backdrop-filter: saturate(0)}@media(prefers-color-scheme:dark){:root{--bg-alt-color: #151622;--bg-color: rgb(17.82, 18.81, 29.7);--cautious-color: #ffc100;--faint-color: rgba(255, 255, 255, .1);--fg-color: #d2d8ff;--magic-color: #a35cd4}}body{margin:0;color:var(--fg-color);background:var(--bg-alt-color);font-weight:400;font-size:12px;font-family:Hero,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}body.light{--bg-alt-color: #eff3f6;--bg-color: #fff;--cautious-color: #cb9d0d;--faint-color: rgba(0, 0, 0, .1);--fg-color: #393a3d;--magic-color: purple}body.dark{--bg-alt-color: #151622;--bg-color: rgb(17.82, 18.81, 29.7);--cautious-color: #ffc100;--faint-color: rgba(255, 255, 255, .1);--fg-color: #d2d8ff;--magic-color: #a35cd4}a{color:inherit;text-decoration:none;transition:var(--ui-motion-speed)}a:hover{color:var(--primary-color)}a:not([class]){text-decoration:underline;text-underline-offset:.3em}*{box-sizing:border-box}hr{border:0;border-top:solid 1px var(--faint-color);background:none}figure{margin:0}button{appearance:none}ul,li{margin:0;padding:0;list-style:none}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{border-radius:5px;background-color:#fff0}::-webkit-scrollbar-thumb{border-radius:5px;background-color:var(--faint-color)}::-webkit-scrollbar-corner{background-color:transparent}h1,h2,h3,h4,h5{font-weight:300}._7g{z-index:9999999;position:fixed;top:1em;left:50%;display:flex;flex-direction:row;align-items:stretch;justify-content:center;max-width:80%;min-height:4em;margin:0 auto;border-radius:var(--ui-corner-radius);overflow:hidden;box-shadow:0 0 30px #0000004d,inset 0 0 0 2px var(--faint-color);opacity:0;text-align:center;cursor:pointer;-webkit-user-select:none;user-select:none;pointer-events:none;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transform:translate(-50%,-10%) scale(.85);transition:.4s cubic-bezier(.75,-.8,0,1.75);transition-property:transform,opacity}@media(max-width:766px){._7g{top:5em;margin:0}}._7g:before{content:"";z-index:-1;position:absolute;inset:0;background:var(--bg-color);opacity:.8}._7g:after{content:"";position:absolute;margin:5px;top:0;left:0;bottom:0;width:4px;border-radius:inherit;background:currentColor;transform:scaleY(0);transform-origin:top left;transition:var(--ui-motion);transition-property:transform}._7g.KM{opacity:1;pointer-events:all;transform:translate(-50%)}._7g.KM:after,._7g.KM .-o{transition-delay:var(--ui-motion-speed);transform:none;opacity:1}._7g.KM .-o{transition-delay:calc(var(--ui-motion-speed) * 2)}._7g.Oj{color:var(--success-color)}._7g.eC{color:var(--error-color)}._7g.Ye{color:var(--warn-color)}._7g.mP{color:var(--info-color)}.YF{display:flex;align-items:center;justify-content:center;width:auto;min-height:60px;padding:10px 5px 10px 25px}.YF .-o{color:currentColor;font-size:1.5em;transform:translateY(-20%);opacity:0;transition:var(--ui-motion)}.YF+.Pb{min-width:auto;text-align:left;padding-left:1em}.Pb{display:flex;flex-grow:1;flex-direction:column;justify-content:center;padding:2em;min-width:300px;color:var(--fg-color)}@media(max-width:766px){.Pb{padding:1em}}._7d{font-weight:700;margin-bottom:10px}.sJ{font-size:12px}.sJ>div+div{margin-top:1em;font-style:italic}.sJ:after,.sJ:before{content:"";position:absolute;width:60px;height:1px;background:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--fg-color) 70%,rgba(255,255,255,0) 100%);opacity:0;animation:hW 5s linear infinite}@keyframes hW{0%,to{opacity:0;transform:translate(-100%)}50%{opacity:1}to{transform:translate(100%)}}.sJ:before{top:0;left:50%}.sJ:after{bottom:0;left:20%;animation-delay:.8s;animation-direction:reverse}.yV svg{height:1.3em;width:1.3em;vertical-align:-.28em}.yV svg path{stroke-width:2px}.zF{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:center;inset:0;z-index:99999;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.HW{position:absolute;inset:0;background:var(--bg-color);z-index:1;animation:lM var(--ui-motion-speed) forwards ease-out}@keyframes lM{0%{opacity:0}to{opacity:.6}}.PH{position:relative;display:flex;flex-direction:column;align-items:flex-start;z-index:2;border-radius:var(--ui-corner-radius);overflow:hidden;background:var(--bg-color);box-shadow:0 0 30px #0003;min-width:400px;max-width:500px;max-height:90%;border:var(--faint-color) solid 1px;transform:translateZ(0);animation:kJ var(--ui-motion-speed) forwards var(--ui-motion-ease)}@keyframes kJ{0%{transform:scale(.98) translateZ(0)}to{transform:translateZ(0)}}@media(max-width:560px){.PH{width:90%}}.PH.Kr{max-width:none;max-height:none;width:100%;height:100%;border-radius:0;border:0;animation:pd var(--ui-motion-speed) forwards var(--ui-motion-ease)}@keyframes pd{0%{opacity:0;transform:translateY(-10px)}to{opacity:1}}@media(max-width:560px){.PH.Kr{width:100%;height:100%;border-radius:0}}.PH.Kr .yU{justify-content:center}.PH.Kr .yU>*{width:auto}.PH._0B{width:100%;height:100%;max-width:70%;max-height:80%}.PH._0B .yU{justify-content:flex-end}.PH._0B .yU>*{width:auto}.PH.xR .CK{padding:30px}.PH.xR .CK,.PH.xR .yU{border:0}.PH>*{width:100%}.CK{font-size:1.2em;padding:20px 30px;border-bottom:var(--faint-color) solid 1px;-webkit-user-select:none;user-select:none}.kt{flex-grow:1;overflow:auto;-webkit-overflow-scrolling:touch}.kt.Fd{padding:30px}.kt.cu{display:none}.kt._5E{display:flex;flex-direction:column;align-content:center;justify-content:center}.yU{display:flex;flex-direction:row;gap:.5em;padding:15px;-webkit-user-select:none;user-select:none;border-top:var(--faint-color) solid 1px}.Ju{position:relative;display:inline-block;padding:1em 1.5em;border:0;border-radius:4px;color:var(--fg-color);background:transparent;font-size:1em;font-family:inherit;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;transition:var(--ui-motion);transition-property:transform;appearance:none}.Ju:after{content:"";position:absolute;inset:0;border-radius:var(--ui-corner-radius);background:currentColor;opacity:0;transform:scale(.8);transition:opacity var(--ui-motion),transform var(--ui-motion)}.Ju:hover,.Ju:focus{color:inherit;outline:0}.Ju:hover:after,.Ju:focus:after{opacity:.1;transform:none}.Ju:focus:not(:hover):after{opacity:.1}.Ju:active:after{opacity:.08;transform:scale(.98)}.Ju.-g{display:block;width:100%}.Ju.dJ{padding:.5em .7em}.Ju._9I{padding:.6em 1em;border:0;background:0;font-size:12px;font-family:inherit;text-align:left;white-space:nowrap;cursor:pointer;border-radius:0}.Ju._9I .dA{margin:0 4px;border:0}.Ju._9I:before,.Ju._9I:after{content:none}.Ju._9I:hover{background-color:var(--item-bg-hover)}.Ju._9I:active{opacity:.7;animation:none}.Ju._3g{color:var(--primary-color)}.Ju.SY{color:#db7093}.Ju.hp{color:var(--success-color)}.Ju.I2{color:var(--cautious-color)}.Ju.Dg{color:var(--magic-color)}.Ju.q0{color:#ff8c00}.Ju.nP{color:var(--info-color)}.Ju.Vg{color:#fff}.Ju[disabled]{color:var(--faint-color);cursor:default}.Ju[disabled]:after{content:none}.Ju._11{animation:_11 3s ease-in-out infinite}@keyframes _11{0%,to{box-shadow:none}50%{box-shadow:0 0 1em currentColor}}.Ju.Xq{text-align:center}.Ju.Xq .dA{margin:0;padding:0;border:0}.Qu{display:inline-block;color:inherit}.Qu.-g{display:block}.dA{margin-right:10px;padding-right:9px;border-right:solid 1px var(--faint-color)}.p7{z-index:999999999;position:fixed;top:var(--top);left:var(--left);display:flex;flex-direction:column;height:auto!important;margin:0;padding:5px 0;border-radius:8px;overflow:hidden;list-style:none;box-shadow:0 0 0 1px var(--menu-border),var(--ui-box-shadow-material);font-family:inherit;pointer-events:none;visibility:hidden;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);transform-origin:left}.p7:before{content:"";z-index:-1;position:absolute;inset:0;background-color:var(--bg-color);opacity:.85}.p7.YN{pointer-events:all;visibility:visible;animation:Of .1s 0s both;animation-timing-function:ease-in}@keyframes Of{0%{opacity:0;transform:scale(.5)}to{height:var(--height);opacity:1;transform:scale(1)}}.p7{--menu-border: var(--faint-color);--item-bg-hover: var(--faint-color)}._9J.kS{position:relative}._9J.kS:before,._9J.kS:after{display:block;height:1px;margin:5px 10px;background:var(--faint-color)}._9J.kS.VT:before{content:""}._9J.kS.Es:after{content:""}._0r{display:flex;align-items:center;width:100%;transition:var(--ui-motion);animation:yy .16s 0s both;animation-timing-function:cubic-bezier(.75,-.8,0,1.75)}@keyframes yy{0%{opacity:0;transform:translateY(10px)}}.n5{z-index:999999998;position:fixed;inset:0}._88{color:#fff}._88 ._7P{padding:30px 40px 10px;text-align:center}._88 ._7P h1{margin:0;font-size:1.4em}._88 ._7P p{margin:5px 0 0;opacity:.5}._88 .IF{padding:20px 40px 0}._88 .IF>form *:not(:last-child){margin-bottom:10px}._88 .IF .CM{display:flex;flex-direction:column;align-items:center}._88 .IF .DX{text-align:center}.D2{margin-top:20px}textarea{min-width:100%;max-width:100%;min-height:6em}.F-{display:block;width:100%;margin:0;padding:10px 15px;border:var(--faint-color) solid 1px;border-radius:var(--ui-corner-radius);outline:0;color:inherit;background:var(--bg-color);font-size:12px;font-family:inherit;transition:border var(--ui-motion-speed),box-shadow var(--ui-motion-speed);appearance:none}.F-:hover,.F-:focus{box-shadow:inset 0 0 0 1px var(--faint-color)}.F-.Tr{padding-top:25px}.F-[disabled]{background:transparent}.F-[readonly]{-webkit-user-select:none;user-select:none}@media(max-width:766px){.F-[type=password]{letter-spacing:3px}}.F-[type=number]{-moz-appearance:textfield}.F-[type=number]::-webkit-outer-spin-button,.F-[type=number]::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}select.F-{cursor:pointer}select.F-.wd{color:var(--primary-color)}:root ::placeholder{color:var(--fg-color);opacity:.4;letter-spacing:0}:root ::-ms-input-placeholder{color:var(--fg-color);opacity:.4}.UF{margin-top:10px}.U3{font-size:2em;text-align:center;letter-spacing:.2em}.Dn{display:flex;flex-direction:column;justify-content:center;text-align:center;align-items:center;height:100%;position:relative}.Dn .-Z{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;align-items:center}.Dn h1{margin-bottom:0;font-size:2.6em}.Gg{padding:0}.Gg>:nth-child(2){padding:0}.up{width:400px}.up li>:last-child:not(.Hs){margin-bottom:20px}.up li:not(:first-child) .Hs{border-top:solid 1px var(--faint-color)}.Hs{cursor:pointer;padding:10px 0;position:sticky;top:0;color:var(--fg-color);background:var(--bg-color);z-index:2;transition:var(--ui-motion)}.Hs *{margin:0}.Hs+._7i>h5{margin-top:5px}._7i{text-transform:uppercase;letter-spacing:2px}.Bt{position:relative;padding-left:40px!important;margin-bottom:5px}.Bt:before{content:"-";position:absolute;top:0;left:20px}.Hs,._7i,.Bt{padding:0 30px}.Hs{padding:10px 30px}.Bt+.Hs{margin-top:20px}.YC{color:var(--success-color)}.-i{color:var(--info-color)}._8z{color:var(--warn-color)}.w8{-webkit-user-select:none;user-select:none;background-color:var(--bg-alt-color);padding-bottom:15px}.w8.wr{padding:0 15px 15px;flex-grow:1;overflow:auto}.NM{margin:6em 0 3em;opacity:.5;text-align:center}.hA{z-index:10;position:sticky;top:0;left:0;display:flex;gap:3px;align-items:center;width:100%;margin-bottom:2px;padding:5px 17px;background-color:var(--bg-alt-color)}.hA>li{margin-left:10px}.hA>li.BS{flex-grow:1}.hA._9M{padding-top:10px;padding-bottom:20px;background:linear-gradient(180deg,var(--bg-alt-color) 80%,rgba(0,0,0,0) 100%)}.hA._9M:after{content:"";position:absolute;right:0;bottom:10px;left:0;height:1px;border-top:solid 1px var(--faint-color)}.Bf,.WW{position:relative;display:flex;flex-grow:1;align-items:center;overflow:auto;gap:.2em}.Bf ::-webkit-scrollbar,.WW ::-webkit-scrollbar{width:0;height:0}.Bf ::-webkit-scrollbar-track,.Bf ::-webkit-scrollbar-thumb,.WW ::-webkit-scrollbar-track,.WW ::-webkit-scrollbar-thumb{background-color:#fff0}.Bf ::-webkit-scrollbar-corner,.WW ::-webkit-scrollbar-corner{background-color:transparent}.Bf>:first-child{z-index:2;position:relative}.Bf.BN:before{content:"";z-index:2;position:absolute;top:0;bottom:0;left:30px;display:block;width:50px;pointer-events:none;background:linear-gradient(90deg,var(--bg-alt-color) 10%,rgba(0,0,0,0) 100%)}.j-{z-index:21;position:fixed;top:1em;bottom:1em;left:1em;display:flex;flex-direction:column;width:400px;padding:20px;border-radius:var(--ui-corner-radius);border:solid 1px var(--faint-color);overflow:hidden;background:var(--bg-color);animation:Aq var(--ui-motion-speed) var(--ui-motion-ease) forwards}@keyframes Aq{0%{transform:translate(-100%)}}.kB{padding:0 20px 20px}.kB h2{margin:0}.kB span{display:block;margin:0 0 10px}.mf{flex-grow:1;margin:0;padding:0;overflow:auto;list-style:none;-webkit-overflow-scrolling:touch}.mf ._7g{display:flex;border-bottom:solid 1px var(--faint-color);gap:10px;padding:10px}.mf ._7g.aq{color:var(--warn-color)}.mf ._7g.td{color:var(--success-color)}.mf ._7g._1H{opacity:.6}.mf ._7g:last-child{border:0}.mf ._7g .pR{flex-grow:1;flex-basis:0}.mf ._7g .pR ._5A{word-break:break-word}.mf ._7g .pR .BZ{opacity:.6;margin:5px 0}.mf ._7g .pR p{margin:0}.mf ._7g .CK{align-self:center}.uM{margin-top:20px}.aN{z-index:20;position:fixed;inset:0;-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter);opacity:.5;animation:fR var(--ui-motion-speed) var(--ui-motion-ease) forwards}@keyframes fR{0%{opacity:0}}.pk{position:relative;height:4px;width:100%;background:var(--faint-color);border-radius:2px}.pk.h- span:after,.pk.h- span:before{content:none}.pk.h- span{color:var(--success-color)}.pk.Aw span{color:var(--warn-color)}.pk span{position:relative;display:block;width:100%;height:100%;color:var(--primary-color);background:currentColor;overflow:hidden;box-shadow:0 0 20px currentColor;transition:width .2s linear;border-radius:2px}.pk span:before{content:"";position:absolute;display:block;top:0;left:0;height:100%;width:100%;background:linear-gradient(90deg,#fff0,#fff3 50%) no-repeat fixed;animation:pk 1s ease-out infinite}@keyframes pk{0%{transform:translate(-100%)}to{transform:translate(100%)}}.pk span:after{content:"";position:absolute;display:block;top:0;height:100%;width:10%;background:#fff;opacity:.3;animation:OR 1s ease-out infinite}@keyframes OR{0%{left:-10%}to{left:100%}}._1X{border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius);padding:10px;margin:20px 0;display:flex;flex-direction:column;justify-content:space-between;cursor:pointer;transition:var(--ui-motion)}._1X:hover{background:var(--faint-color)}._1X .iS{margin-bottom:10px;text-align:center}._1X .hr{margin-right:10px;white-space:nowrap;padding-left:10px}.CL{width:400px}.CL>.Cp{margin:0;padding:0;border:0}.CL button{text-align:left}.Cp{margin-top:3px;margin-left:16px;padding:0 5px;border-left:solid var(--faint-color) 1px}.nR{position:sticky;bottom:0;margin-top:20px;padding:7px 10px;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius);background:var(--bg-alt-color);box-shadow:0 0 20px var(--bg-alt-color)}.nR>span{opacity:.7;font-style:italic}.ZN{position:relative;display:block;width:1em;height:1em;margin:20px auto;border:.08em solid var(--fg-color);border-radius:50%;opacity:.8;animation:pB 1s var(--ui-motion-ease) infinite}.ZN:after{content:"";position:absolute;top:0;left:50%;width:.08em;height:50%;background:var(--fg-color);transform:translate(-50%);box-sizing:border-box}@keyframes pB{0%{transform:rotate(0)}50%{opacity:.3}to{transform:rotate(360deg)}}._58>div{width:18px;height:18px;min-width:0}.Zd{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:40px;height:40px;min-width:2em;margin:0;border:var(--faint-color) solid 1px;border-radius:var(--ui-corner-radius);overflow:hidden}.Zd.dx{border:0}.Zd .D4{width:100%;height:100%;cursor:pointer;object-fit:cover}.Zd .D4:hover{opacity:.7}.Zd .FI{opacity:.5;font-weight:700;font-size:8px;text-transform:uppercase}.Zd .QJ{font-size:2em}.Zd .QJ svg path{stroke-width:1px}.kF{text-align:center}.VI{display:flex;align-items:center;justify-content:center;flex-grow:1}.VI img{display:block;max-width:100%;margin:0 auto}.VI,.D4{background-color:#dedede;background-image:conic-gradient(#ababab 90deg,transparent 90deg 180deg,#ababab 180deg 270deg,transparent 270deg);background-size:4px 4px}.f6{width:90%;height:auto;aspect-ratio:1.5/1;background-color:var(--primary-color);position:relative;border-radius:5px;box-shadow:0 2px 5px #0003}.f6:before{content:"";position:absolute;top:-10%;left:10%;width:80%;height:30%;filter:brightness(1.2);background-color:inherit;border-radius:5px 5px 0 0;z-index:2}.f6:after{content:"";position:absolute;border-radius:5px 5px 0 0;top:0;left:0;right:0;height:20%;background:#0000000d;z-index:1}.f6.V5:before{filter:brightness(.7)}.XH{opacity:0;transition:opacity .4s ease-out;visibility:hidden}.Ho{opacity:1!important}.Wu{visibility:visible}.CQ{position:relative;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius);overflow:hidden;background:var(--bg-color)}._3s{position:relative;display:flex;align-items:center;overflow:hidden;transition:var(--ui-motion-speed);transition-property:background-color,border-color;border-left:solid 1px transparent;border-right:solid 1px transparent}._3s:not(:last-child):after{content:"";position:absolute;bottom:0;left:30px;display:block;width:100%;border-bottom:solid 1px var(--faint-color)}._3s.Ld{cursor:pointer}._3s.x-,._3s:hover{border-color:var(--fg-color)}._3s.Se{color:var(--primary-color)}._3s.yJ{color:var(--faint-color)}._3s.Mb{cursor:pointer}._3s li{display:flex;align-items:center;min-height:60px;padding:10px;word-break:break-word}._3s li.Pe{padding:10px 10px 10px 20px}._3s li.sN{flex-grow:1}._3s li.sN>div{margin-right:10px}._3s li._6u{opacity:.5;white-space:nowrap}._3s li.Rz{white-space:nowrap}.ib{display:flex;align-items:center;width:100%;cursor:pointer;-webkit-user-select:none;user-select:none;gap:10px}.ib.-k .i7:before{background-color:var(--primary-color)}.ib:hover,.ib:focus{outline:0;border:0}.ib:hover .i7,.ib:focus .i7{box-shadow:inset 0 0 0 1px var(--faint-color),0 0 0 1px var(--faint-color)}.ib.lX .i7:before{visibility:visible;transform:none}.ib.lX .i7>span{visibility:visible;transform:none;opacity:1;transition:var(--ui-motion);transition-property:transform,opacity}.i7{position:relative;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border:solid 1px;border-radius:.5em;overflow:hidden;color:var(--faint-color);background:var(--bg-color);font-size:12px;transition:box-shadow var(--ui-motion-speed)}.i7:before{content:"";position:absolute;inset:0;margin:2px;border-radius:.3em;background:var(--fg-color);transition:var(--ui-motion);transform:scale(.9);transition-property:transform;visibility:hidden;z-index:1}.i7>span{position:relative;z-index:2;color:var(--bg-color);transform:translateY(50%);opacity:0}.i7>span polyline{stroke-width:3px}.au{padding-left:.2em}.-D{margin-top:3px!important;padding-left:35px!important}.BS{margin:0;padding:0 15px;font-size:12px;font-weight:700}.BS+*{margin-top:10px}.BS+.pW{margin-top:5px}.pW{margin:0;padding:0 15px;opacity:.5;font-size:12px}.pW+*{margin-top:10px}.hV{padding:50px;text-align:center}.hV .B4{margin:0 auto;opacity:.5}.OW{font-size:4em;opacity:.1;margin-bottom:20px}.an.aW{padding-top:20px}.an.sG{padding-left:20px}.an.NA{padding-right:20px}.an.k2{padding-bottom:20px}.an.ZJ{flex-grow:1}._8a{display:flex;flex-direction:column;justify-content:center;text-align:center;align-items:center;position:absolute;inset:0}._8a span{font-size:.8em;opacity:.6}.fN{position:relative;display:flex;flex-direction:column;align-items:stretch;margin:20px 0 30px}.fN:empty{display:none}.sh{display:flex;align-items:center;font-size:12px;padding:10px 15px;margin-top:0;color:var(--error-color);animation:_9- var(--ui-motion-speed) forwards}@keyframes _9-{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.sh svg{height:1.8em;margin-right:10px}._9T{display:flex;flex-direction:column;justify-content:center}@media(max-width:766px){._9T{flex-direction:column;margin:0 auto}}._9T.Py{flex-direction:column;margin:0 auto}.Ip{max-width:800px;margin-right:auto;width:100%}@media(min-width:767px){.Ip{flex-grow:1}}.cF{display:flex;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius);padding:.5em}.cF .v0{opacity:.3}.cF .v0.JV{opacity:1}.cF._-9{margin-right:-20px;margin-left:-20px}.cF._-9 li{padding:10px 5px;font-size:1em}._9V{position:relative;display:flex;flex-direction:row;align-items:stretch;height:100%}._9V.Dm{flex-direction:row-reverse}.Yg{z-index:5;overflow:hidden;flex-direction:column;display:flex}@media(min-width:767px){.Yg{display:none;width:350px;background:var(--bg-color);border-right:solid 1px var(--faint-color)}.Yg.VD{display:flex}.Yg.AV{border:0;border-left:solid 1px var(--faint-color)}.Yg.pd{z-index:10;position:absolute;top:0;left:0;margin:10px;height:calc(100% - 80px);border:solid 1px var(--faint-color)!important;box-shadow:var(--ui-box-shadow-material);border-radius:var(--ui-corner-radius)}.Yg.pd._5X{height:62px}.Yg.pd.AV{right:5px;left:auto;border-right:0}}@media(max-width:766px){.Yg{width:100%}}.Yg .H0{position:relative;flex:1;overflow:auto;display:flex;flex-direction:column;-webkit-overflow-scrolling:touch}.Yg .H0>div{flex-grow:1}.Yg._5H .H0>:nth-child(1),.Yg.q5 .H0>:nth-child(2),.Yg.yt .H0>:nth-child(3),.Yg.gp .H0>:nth-child(4){display:block}.jO{z-index:2;position:sticky;top:0;height:62px}@media(max-width:766px){.jO{height:54px}}@media(min-width:767px){.jO{border-bottom:solid 1px var(--faint-color)}}.Io{display:flex;align-items:center;padding:10px 10px 10px 0}.Io>div:first-child{flex-basis:0}.Io h5{margin:0;opacity:.6;text-transform:capitalize}.Io h3{margin:0}.Io h5,.Io h3{text-overflow:ellipsis;overflow:hidden;width:100%;white-space:nowrap}@media(max-width:766px){.Io button{display:none}}._9Z{flex-grow:1}.SH{display:block;width:100%;margin-bottom:5px;padding:8px 15px;border-radius:var(--ui-corner-radius);overflow:hidden;background:var(--faint-color);border:solid var(--faint-color) 1px;opacity:.5;text-align:left;text-overflow:ellipsis}.SH>p{margin:0}.ps{display:flex;gap:.5em;margin:0 10px;padding:5px;bottom:10px;position:sticky;border:var(--faint-color) solid 1px;border-radius:var(--ui-corner-radius);background:var(--bg-color);box-shadow:var(--ui-box-shadow-material)}.KI{position:relative;display:block;flex-grow:1;flex-basis:0;text-align:center;transition:var(--ui-motion)}@media(max-width:766px){.KI{padding:10px}}.KI:not(.PY){cursor:pointer}.KI:after{content:"";position:absolute;bottom:0;left:25%;width:50%;height:2px;background:currentColor;opacity:0;transform:scaleX(0);transition:var(--ui-motion)}.KI.PY{color:var(--primary-color);transition-property:background-color}.KI.PY span{display:block;animation:Tb .4s ease-in-out}@keyframes Tb{30%{transform:translateY(-5px)}}.KI.PY button{color:inherit}.KI.PY:after{opacity:1;transform:none}.KI.Lk{color:var(--error-color)}.xV{position:absolute;top:5px;right:5px;display:inline-block;padding:2px 7px;border-radius:12px;color:#fff;background:var(--error-color);font-weight:700;font-size:10px;animation:Yh var(--ui-motion)}@keyframes Yh{0%{opacity:0;transform:translateY(-5px)}}.G2{animation:SI var(--ui-motion) forwards}@keyframes SI{0%{opacity:0;transform:translateY(5px)}}.xL{position:sticky;top:0;left:0;right:0;border-bottom:solid 1px var(--faint-color);padding:.5em;background:var(--bg-color);z-index:2;display:flex;align-items:center}._5x._0z{display:none}.pQ{position:relative;display:flex;flex-direction:column;flex-grow:1;flex-basis:0;overflow:auto;-webkit-overflow-scrolling:touch}._1f{flex-grow:1}.AW{z-index:10;position:sticky;bottom:10px;display:flex;flex-direction:row;justify-content:flex-end;margin:0 10px;padding:5px;border:var(--faint-color) solid 1px;border-radius:var(--ui-corner-radius);background:var(--bg-color);box-shadow:var(--ui-box-shadow-material);animation:Ae var(--ui-motion)}@keyframes Ae{0%{opacity:0;transform:scale(.9)}}.AW>*:not(:first-child):not(:last-child){margin:0 5px}.QV{display:flex;padding:10px}.QV._7l{padding:0}.QV button{text-align:left!important}.lF{display:flex;justify-content:center;align-items:center;width:100%;height:47px}.lF>svg{margin-right:10px}body .react-calendar{border:0}body .react-calendar button{text-align:center!important}body .react-calendar__navigation button{font-size:20px}.GY{margin-top:10px;text-align:center}.react-calendar{width:350px;max-width:100%;background:#fff;border:1px solid #a0a096;font-family:Arial,Helvetica,sans-serif;line-height:1.125em}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{width:50%;margin:.5em}.react-calendar,.react-calendar *,.react-calendar *:before,.react-calendar *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.react-calendar button{margin:0;border:0;outline:none}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:44px;margin-bottom:1em}.react-calendar__navigation button{min-width:44px;background:none}.react-calendar__navigation button:disabled{background-color:#f0f0f0}.react-calendar__navigation button:enabled:hover,.react-calendar__navigation button:enabled:focus{background-color:#e6e6e6}.react-calendar__month-view__weekdays{text-align:center;text-transform:uppercase;font:inherit;font-size:.75em;font-weight:700}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekNumbers .react-calendar__tile{display:flex;align-items:center;justify-content:center;font:inherit;font-size:.75em;font-weight:700}.react-calendar__month-view__days__day--weekend{color:#d10000}.react-calendar__month-view__days__day--neighboringMonth,.react-calendar__decade-view__years__year--neighboringDecade,.react-calendar__century-view__decades__decade--neighboringCentury{color:#757575}.react-calendar__year-view .react-calendar__tile,.react-calendar__decade-view .react-calendar__tile,.react-calendar__century-view .react-calendar__tile{padding:2em .5em}.react-calendar__tile{max-width:100%;padding:10px 6.6667px;background:none;text-align:center;font:inherit;font-size:.833em}.react-calendar__tile:disabled{background-color:#f0f0f0;color:#ababab}.react-calendar__month-view__days__day--neighboringMonth:disabled,.react-calendar__decade-view__years__year--neighboringDecade:disabled,.react-calendar__century-view__decades__decade--neighboringCentury:disabled{color:#cdcdcd}.react-calendar__tile:enabled:hover,.react-calendar__tile:enabled:focus{background-color:#e6e6e6}.react-calendar__tile--now{background:#ffff76}.react-calendar__tile--now:enabled:hover,.react-calendar__tile--now:enabled:focus{background:#ffffa9}.react-calendar__tile--hasActive{background:#76baff}.react-calendar__tile--hasActive:enabled:hover,.react-calendar__tile--hasActive:enabled:focus{background:#a9d4ff}.react-calendar__tile--active{background:#006edc;color:#fff}.react-calendar__tile--active:enabled:hover,.react-calendar__tile--active:enabled:focus{background:#1087ff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#e6e6e6}.FO{display:flex;justify-content:center;margin-top:15px}.tm{display:inline-block;margin:0 5px 0 0;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius)}.FR{width:60px;height:42px;max-height:42px;padding:8px}.FR input{width:100%;border:0;outline:0;color:inherit;background:transparent;font:inherit;font-size:16px;text-align:center;transition:var(--ui-motion);appearance:none}.gN{display:flex;align-items:center;justify-content:center;width:20px;height:47px;max-height:47px}.kj{position:fixed;inset:0;margin:0!important;background:var(--bg-color);z-index:10}.kj:before{content:"Generating preview...";font-size:16px;position:absolute;top:50%;left:0;right:0;text-align:center;opacity:.4}.kj ._21{position:absolute;width:100%;height:100%;border:0;appearance:none;z-index:1;overflow:auto;-webkit-overflow-scrolling:touch;transition:opacity .2s .1s ease-out}.kj ._21._9G{opacity:0}.kj .wO{position:absolute;bottom:30px;left:50%;transform:translate(-50%);z-index:2;background:var(--bg-color);padding:.4em;border-radius:var(--ui-corner-radius)}.cG{position:relative;padding:4px;border:solid var(--faint-color) 1px;border-radius:var(--ui-corner-radius);overflow:hidden;transition:box-shadow var(--ui-motion);background:var(--bg-color)}.cG:hover{box-shadow:inset 0 0 0 3px var(--faint-color)}.cG.Xa{box-shadow:inset 0 0 0 3px var(--primary-color),0 0 15px var(--primary-color)}.cG.IK{box-shadow:inset 0 0 0 3px var(--error-color)}.cG.Xa,.cG.IK{transition:box-shadow var(--ui-motion-speed)}.cG.IK.Xa{box-shadow:inset 0 0 0 3px var(--error-color),0 0 15px var(--error-color)}.Bi{overflow:hidden;position:relative}.Bi.Nm{cursor:pointer}.W7{z-index:1;overflow:hidden;pointer-events:none}.W7:before{content:"Tap to edit";z-index:3;position:absolute;top:50%;left:50%;padding:5px 10px;border-radius:var(--ui-corner-radius);color:#fff;background:var(--primary-color);opacity:0;text-transform:uppercase;letter-spacing:1px;transform:translate(-50%,-50%) scale(.8);transition:var(--ui-motion-speed)}.W7:after{content:"";z-index:2;position:absolute;inset:0;background:var(--primary-color);opacity:0;pointer-events:none;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:opacity var(--ui-motion-speed)}.W7:hover{border-color:var(--primary-color);cursor:pointer}.W7:hover:after{opacity:.1}.O-{z-index:3;position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:20px;opacity:0;pointer-events:none;transition:opacity .2s ease-in-out}.O-.NY{opacity:1;pointer-events:all}.O-:after{content:"";z-index:-1;position:absolute;inset:0;background:var(--bg-color);opacity:.5}.o-{position:relative;width:4px;height:4px;border-radius:50%;color:var(--fg-color);background:currentColor}.o-:before{content:"";position:absolute;inset:0;border-radius:50%;box-shadow:0 0 10px 5px currentColor,0 0 0 3px var(--bg-color);opacity:.3}.o-.ms{color:var(--error-color)}.o-.B6{color:gold}.o-.w-{color:var(--warn-color)}.o-._5e{color:var(--info-color)}.o-._0s{opacity:.2}.o-._0s:before{content:none}.o-.y-{color:var(--success-color)}.o-._2I:not(._0s){animation:.7s _2I var(--ui-motion) infinite}@keyframes _2I{50%{opacity:.8}}.mI{z-index:2;position:relative;display:flex;align-items:center;pointer-events:all;transition:var(--ui-motion)}.mI.Rc{opacity:1;pointer-events:all;transform:none}.mI._2H{right:10px;left:auto}.wX{display:flex;flex-grow:1;align-items:center;align-self:stretch;margin-right:5px;padding:.8em 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none}.wX>span{color:var(--error-color);margin-right:10px}.xT{display:flex;align-items:center;padding:0 10px;gap:10px;opacity:.5}.zp{position:relative;display:block;padding:10px;margin:20px 0;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius)}.zp:first-child{margin-top:0}.zt{display:flex;align-items:center;padding:0 0 10px}.zt>h4{margin:0 1em}.zt .ws{flex-grow:1}.LB{position:relative;display:block;padding:5px;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius)}.Jx{display:block;padding:5px;text-align:center}ul.Xh{display:flex;flex-wrap:wrap;justify-content:center;margin:10px auto;border-radius:var(--ui-corner-radius)}ul.Xh li{width:25%;min-width:200px;padding:5px;opacity:0;transform:scale(.8);animation:Pp var(--ui-motion-speed) forwards}ul.Xh li>button{text-align:center}ul.Xh li ._7T:not(:only-child){display:block;margin:10px 0 0}@keyframes Pp{to{transform:none;opacity:1}}.EU{width:100%;box-shadow:none!important;margin:10px auto}.fe{position:absolute;top:50%;right:20px;left:20px;opacity:.5;text-align:center}.pk{border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius);overflow:hidden;background:var(--bg-alt-color)}.pk>li{display:flex;column-gap:10px;padding:15px;cursor:pointer}.pk>li>span{flex-grow:1}.pk>li ._73{color:var(--error-color)}.pk>li:hover{background:var(--bg-color)}.pk>li:not(:last-child){border-bottom:solid 1px var(--faint-color)}._3T{-webkit-user-select:none;user-select:none}._4a{margin:30px;text-align:center;opacity:.4;font-style:italic}._4a>span{font-size:5em;opacity:.3}._4a>span>svg path{stroke-width:1px}.w1{display:grid;grid-template-columns:var(--grid-template-columns);position:relative;padding:0 10px}.w1.tN{z-index:2;position:sticky;top:0;background:var(--bg-alt-color)}.w1.tN>div{padding:0 5px 10px;overflow:hidden;font-weight:700;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center}.w1.L4{position:relative;border-right:var(--border);border-left:var(--border);overflow:hidden;background:var(--bg-color);--border: solid 1px var(--faint-color);transition:background-color var(--ui-motion-ease) var(--ui-motion-speed);min-height:4em}.w1.L4>div.aH{position:relative;padding:10px 5px;display:flex;align-items:center;overflow:hidden}.w1.L4>div.aH>div.-Q{position:absolute;inset:0;z-index:1;cursor:pointer}.w1.L4:after{content:"";position:absolute;right:0;bottom:0;left:30px;height:1px;background:var(--faint-color);transition:left var(--ui-motion-ease) var(--ui-motion-speed)}.w1.L4:first-of-type{border-top:var(--border);border-top-left-radius:var(--ui-corner-radius);border-top-right-radius:var(--ui-corner-radius)}.w1.L4:last-of-type{border-bottom:var(--border);border-bottom-right-radius:var(--ui-corner-radius);border-bottom-left-radius:var(--ui-corner-radius)}.w1.L4:last-of-type:after{content:none}.w1.L4:hover:after,.w1.L4:focus:after{left:50px}.VY{padding:20px 5px;display:flex;justify-content:center}.Ab{display:flex;gap:20px;width:220px}.Ab._0O{display:none}.xf{text-align:center;padding-left:5px;padding-right:5px;flex-grow:1;align-self:stretch}.uM{cursor:grab}.uM:active{cursor:grabbing}.Dm{display:flex;align-items:center;gap:10px;margin-bottom:10px}.ob{border-radius:var(--ui-corner-radius);background:var(--primary-color);color:#fff;display:inline-block;padding:3px 0 3px 8px;margin:10px}.yy{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start}.yy.xK{column-gap:20px;margin-bottom:20px;align-items:flex-start}@media(max-width:480px){.yy.xK{flex-direction:column-reverse}}.yy.xK .sx{margin:10px 10px 0 0}.yy .sx{position:relative;display:inline-block;width:38px;height:38px;margin-right:10px;border:solid 1px var(--faint-color);border-radius:50%;overflow:hidden;cursor:pointer;transition:var(--ui-motion)}.yy .sx:hover{box-shadow:0 0 0 2px var(--faint-color)}.yy .sx.A4:before{content:"";position:absolute;top:0;left:0;width:140%;height:1px;background:var(--error-color);opacity:.5;transform:rotate(45deg);transform-origin:left}.Gr{height:4em;margin-top:.5em;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius)}.Uf{display:flex;flex-grow:1;flex-basis:0;flex-wrap:wrap}.Uf:last-child{flex-grow:1}.zr{margin:0 0 10px;position:relative;background-color:var(--bg-color)}.c-{display:flex;border-radius:6px;border:solid 1px var(--faint-color);overflow:hidden}.c->*{appearance:none;border:0;outline:0;color:var(--fg-color);padding:10px;background:transparent}.c- .FZ{flex:1 0}.TD{position:absolute;top:50%;right:20px;transform:translateY(-50%)}.Hf{width:auto;background:transparent;text-align:right;cursor:pointer;padding:0 20px;border-right:solid 1px var(--faint-color)}.Hf:hover,.Hf:focus{background:var(--bg-alt--color)}.cO{position:relative;display:flex;flex-wrap:wrap;gap:10px;margin:15px 0 10px;padding:10px;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius)}.cO:before{content:attr(data-length) " results found";z-index:2;position:absolute;font-size:10px;top:0;left:10px;padding:0 10px;background:var(--bg-color);transform:translateY(-50%)}._7x{cursor:default;padding:10px;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius)}._7x>._8p{padding:0 10px;margin-bottom:10px}.oD,.tL{margin:0}.oD{font-size:14px}.tL{opacity:.8}.Nm{margin-top:15px}._2r{position:relative;display:grid;grid-template-columns:auto 1fr;grid-gap:5px}._2r>*{display:flex;align-items:center}._2r .vq:before{content:"";position:absolute;display:flex;inset:20px;border-radius:var(--ui-corner-radius);border:dashed 2px var(--faint-color)}._9a{min-width:80%;height:80%}.Mq{position:relative}.Mq .eE{margin:0 0 0 20px}.Mq .eE:first-child{margin-left:0}.Mq .eE+.eE{margin-left:-30px}.Mq .lG{position:absolute;left:5px;bottom:5px;padding:0 5px;pointer-events:none;border-radius:var(--ui-corner-radius);color:#fff;background:#0000004d;z-index:11}.CJ{max-width:250px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._9l{margin:10px 0;padding-left:10px}._3E{display:flex;column-gap:10px;align-items:center}.CO{padding:10px;border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius)}.CO>.hY{margin-bottom:10px;padding:0 10px}.eJ{position:relative;display:block}.F0>.nr{border:solid 1px var(--faint-color);border-radius:var(--ui-corner-radius);overflow:hidden}.F0>.nr:not(:last-of-type){margin-bottom:10px}.F0>.nr>.bj{display:flex;align-items:center;justify-content:space-between;padding:10px 10px 10px 20px;background:var(--bg-alt-color);cursor:pointer;-webkit-user-select:none;user-select:none}.F0>.nr>.bj>.gZ{margin-left:20px;flex-grow:1;word-break:break-word}.F0>.nr>.bj>.gZ+button{margin-right:20px}.F0>.nr.MO{box-shadow:0 0 0 2px var(--faint-color)}.F0>.nr.MO._5r{box-shadow:0 0 0 1px var(--error-color)}.F0>.nr._5r{border-color:var(--error-color)}.F0>.nr>.P7{position:relative}.F0>.nr>.P7:before{content:"";position:absolute;top:0;left:20px;right:0;border-top:dashed 1px var(--faint-color)}.F0>.nr>.P7{border-bottom:solid 1px var(--faint-color)}.Nw+span{pointer-events:none}.Ka{display:flex;justify-content:space-between;align-items:center}.B9{padding:5px}.OW{padding:10px 20px;font-size:10px;opacity:.6;font-style:italic}.Ov{padding:0}.rsw-editor.rsw-editor{border:0}.rsw-editor.rsw-editor .rsw-toolbar{display:flex;gap:2px;padding:.5em;border:0;border-bottom:solid 1px var(--faint-color);background-color:transparent}.rsw-editor.rsw-editor .rsw-ce{padding:10px 15px;outline:0}.rsw-editor.rsw-editor .rsw-btn{border-radius:var(--ui-corner-radius);color:var(--fg-color);opacity:.8;font-size:1.3em}.rsw-editor.rsw-editor .rsw-btn:hover,.rsw-editor.rsw-editor .rsw-btn:focus{background:var(--faint-color);opacity:1}.rsw-editor.rsw-editor .rsw-btn[data-active=true]{color:var(--bg-color);background:var(--fg-color);opacity:1}.rsw-editor.rsw-editor .rsw-separator{border-color:var(--faint-color)}@media(max-width:766px){.dY{display:none}}.YK{display:flex;justify-content:flex-start;align-items:center;gap:10px;padding-left:.5em}.-G{direction:rtl;width:100%;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.-G:after{content:"/"}.yK{text-decoration:none}.yK>span{opacity:0;transition:opacity var(--ui-motion);margin-left:5px}.yK:hover span,.yK:focus span{opacity:1}.DK{position:relative;height:100vh;display:flex;flex-direction:row}.Qr{position:relative;margin:0;display:flex;flex-direction:column;width:220px;padding:20px 10px;border-right:solid 1px var(--faint-color);overflow:auto;background:var(--bg-color);border-radius:var(--ui-corner-radius);box-shadow:var(--ui-box-shadow-material);transition:width var(--ui-motion),padding var(--ui-motion),left var(--ui-motion)}@media(max-width:766px){.Qr{position:fixed;z-index:5;left:-250px}}.Qr button{text-align:left;margin-bottom:2px}.Qr._1B{width:70px;padding:20px 5px;overflow:hidden}.Qr._1B .h1{margin:0;visibility:hidden}.Qr._1B .zD{flex-direction:column}.Qr._1B .Iu{display:none}.xX{display:block;margin:10px auto}.h1{height:14px;margin:10px auto;opacity:.6;padding:0 20px;font-size:10px;text-transform:uppercase;letter-spacing:1px;transition:margin var(--ui-motion)}.Mp{flex-grow:1}.Iu{font-size:10px;text-align:center;padding:1em 1em .5em;opacity:0;animation:1s _9S forwards;animation-delay:.4s}@keyframes _9S{to{opacity:.3}}.zD{display:flex}.zD>button{flex-grow:1;text-align:center}.iQ p:first-child{margin-top:0}.az{position:relative}.az:before{content:"";position:relative;display:block;padding-top:64%}.L-{position:absolute;display:block;bottom:0;border-radius:30px;height:0;padding-top:16%;transform:rotate(-65deg) translateZ(0);transform-origin:left top;transition:.2s ease-out;animation-timing-function:ease-in-out}.L-:nth-child(1){left:0;width:25%;background:linear-gradient(90deg,#de4401,#ff008c)}.L-:nth-child(2){left:25%;width:32%;background:linear-gradient(90deg,#ffa815,#ffd715);transition-delay:.05s}.L-:nth-child(3){left:50%;width:40%;background:linear-gradient(90deg,#94c31a,#0fe796);transition-delay:.1s}.L-:nth-child(4){left:75%;width:30%;background:linear-gradient(90deg,#4a81e7,#2fc4f7);transition-delay:.15s}.az.q0 .L-{background:#000}.az.ci .L-{background:#fff}.az._8Z .L-{background:var(--fg-color)}.az._7m .L-{background:var(--faint-color)}.az.y4 .L-{background:var(--faint-border-color)}.az.QJ .L-:nth-child(1){animation:n4 1s linear}.az.QJ .L-:nth-child(2){animation:b3 1s linear .1s}.az.QJ .L-:nth-child(3){animation:BN 1s linear .2s}.az.QJ .L-:nth-child(4){animation:Kg 1s linear .3s}.az:hover .L-:nth-child(1),.az._3J .L-:nth-child(1){animation:1s linear n4 1}.az:hover .L-:nth-child(2),.az._3J .L-:nth-child(2){animation:1s linear b3 .1s 1}.az:hover .L-:nth-child(3),.az._3J .L-:nth-child(3){animation:1s linear BN .2s 1}.az:hover .L-:nth-child(4),.az._3J .L-:nth-child(4){animation:1s linear Kg .3s 1}@keyframes n4{0%{width:25%}25%{width:16%}50%{width:50%}75%{width:16%}to{width:25%}}@keyframes b3{0%{width:32%}25%{width:16%}50%{width:50%}75%{width:16%}to{width:32%}}@keyframes BN{0%{width:40%}25%{width:16%}50%{width:50%}75%{width:16%}to{width:40%}}@keyframes Kg{0%{width:30%}25%{width:16%}50%{width:50%}75%{width:16%}to{width:30%}}._3-{flex-grow:1;overflow:auto;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;position:relative;flex-basis:0}.uY{position:sticky;top:0;width:100%;padding:20px 20px 0;transition:var(--ui-motion);z-index:10}.Kk{position:relative;padding:4px;height:52px;align-items:center;color:var(--fg-color);display:grid;width:100%;grid-column-gap:1em;grid-row-gap:0;border-bottom:1px solid rgba(0,0,0,0);grid-template-columns:auto 1fr;grid-template-rows:auto;transition:var(--ui-motion)}.Kk>div{grid-row:1;max-height:100%;overflow:hidden}.OT{padding:0 0 20px}.OT .Kk{border-top-color:#0000;border-left-color:#0000;border-right-color:#0000;padding-left:25px;padding-right:25px;box-shadow:var(--ui-box-shadow-material);border-bottom:1px solid var(--faint-color);background:var(--bg-color)}._98{grid-column:2;display:flex;gap:.2em;justify-content:flex-end;align-items:center}.-q{grid-column:1;grid-row:1/span 2;display:flex;gap:1em;align-items:center}.K-{font-size:1.2em;margin-left:1em}.dd{margin-left:20px}.Vh{z-index:2;position:relative;display:flex;flex-grow:1;align-items:center;justify-content:center;width:100%;padding:30px;overflow:auto;-webkit-overflow-scrolling:touch;--fg-color: white !important;--bg-color: white !important}.Vh input{background:#0000000d;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.Vh ::placeholder{color:#ffffff80}.Vh>div{width:100%;max-width:400px}.KU{position:absolute;top:0;display:block;align-self:flex-start;width:100%;text-align:center;z-index:3}.KU *{margin:0}.tc{margin:20px 0;opacity:.5;font-weight:400;text-align:center;color:#fff}._5M{position:relative;display:flex;align-items:center;margin:20px auto 0;width:70px;height:70px;border-radius:50%;overflow:hidden;background:#ffffff14;box-shadow:inset 0 0 0 1px #fff3;-webkit-backdrop-filter:blur(5px) brightness(1.1);backdrop-filter:blur(5px) brightness(1.1)}.cf{display:flex;justify-content:center;width:100%;animation:bU 1s ease-out 1}.Jd{position:absolute;bottom:0;left:0;right:0;pointer-events:none;overflow:hidden;height:40px;filter:blur(1px)}.Jd>svg{position:absolute;bottom:-7px;left:-40%;width:180%;height:130%}.Jd>svg use{animation:Cr linear infinite;fill:#fff;opacity:.1}.Jd>svg use:nth-child(1){animation-duration:6s}.Jd>svg use:nth-child(2){animation-duration:10s;filter:blur(5px);opacity:.1}.Jd>svg use:nth-child(3){animation-duration:20s;filter:blur(5px)}.Jd>svg use:nth-child(4){animation-duration:14s}@keyframes Cr{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.wT{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;background:linear-gradient(#0575e6,#021b79);z-index:1}.wT.G3{background:linear-gradient(var(--bg-color) 0%,var(--bg-alt-color) 100%)}.wT:before,.wT:after{content:"";z-index:1;position:absolute;animation:o5 linear 50s infinite}@keyframes o5{50%{transform:rotate(180deg) translateY(10%)}to{transform:rotate(360deg)}}.wT:before{top:40%;left:50%;width:80%;padding-bottom:80%;border-radius:20%;background:#00000014;filter:blur(10px)}.wT:after{right:50%;bottom:40%;width:100%;padding-bottom:100%;border-radius:30%;background:#ffffff05;box-shadow:0 0 5em #0000004d}.Dw{position:fixed;z-index:500;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter);opacity:0;animation:_1w .4s forwards ease-in}.Dw,.Dw:before{inset:0}.Dw:before{content:"";position:absolute;background:var(--bg-color)}@keyframes _1w{to{opacity:.5}} /*$vite$:1*/`,document.head.appendChild(__vite_style__);function getDefaultExportFromCjs(j){return j&&j.__esModule&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j}function getAugmentedNamespace(j){if(Object.prototype.hasOwnProperty.call(j,"__esModule"))return j;var R=j.default;if(typeof R=="function"){var N=function A(){var M=!1;try{M=this instanceof A}catch{}return M?Reflect.construct(R,arguments,this.constructor):R.apply(this,arguments)};N.prototype=R.prototype}else N={};return Object.defineProperty(N,"__esModule",{value:!0}),Object.keys(j).forEach(function(A){var M=Object.getOwnPropertyDescriptor(j,A);Object.defineProperty(N,A,M.get?M:{enumerable:!0,get:function(){return j[A]}})}),N}var jsxRuntime={exports:{}},reactJsxRuntime_production={};var hasRequiredReactJsxRuntime_production;function requireReactJsxRuntime_production(){if(hasRequiredReactJsxRuntime_production)return reactJsxRuntime_production;hasRequiredReactJsxRuntime_production=1;var j=Symbol.for("react.transitional.element"),R=Symbol.for("react.fragment");function N(A,M,z){var H=null;if(z!==void 0&&(H=""+z),M.key!==void 0&&(H=""+M.key),"key"in M){z={};for(var G in M)G!=="key"&&(z[G]=M[G])}else z=M;return M=z.ref,{$$typeof:j,type:A,key:H,ref:M!==void 0?M:null,props:z}}return reactJsxRuntime_production.Fragment=R,reactJsxRuntime_production.jsx=N,reactJsxRuntime_production.jsxs=N,reactJsxRuntime_production}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),react={exports:{}},react_production={};var hasRequiredReact_production;function requireReact_production(){if(hasRequiredReact_production)return react_production;hasRequiredReact_production=1;var j=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),H=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),P=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),le=Symbol.iterator;function re(ue){return ue===null||typeof ue!="object"?null:(ue=le&&ue[le]||ue["@@iterator"],typeof ue=="function"?ue:null)}var ie={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},se=Object.assign,de={};function ge(ue,we,Ue){this.props=ue,this.context=we,this.refs=de,this.updater=Ue||ie}ge.prototype.isReactComponent={},ge.prototype.setState=function(ue,we){if(typeof ue!="object"&&typeof ue!="function"&&ue!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ue,we,"setState")},ge.prototype.forceUpdate=function(ue){this.updater.enqueueForceUpdate(this,ue,"forceUpdate")};function pe(){}pe.prototype=ge.prototype;function fe(ue,we,Ue){this.props=ue,this.context=we,this.refs=de,this.updater=Ue||ie}var ve=fe.prototype=new pe;ve.constructor=fe,se(ve,ge.prototype),ve.isPureReactComponent=!0;var je=Array.isArray;function me(){}var xe={H:null,A:null,T:null,S:null},Re=Object.prototype.hasOwnProperty;function Ne(ue,we,Ue){var Ie=Ue.ref;return{$$typeof:j,type:ue,key:we,ref:Ie!==void 0?Ie:null,props:Ue}}function $e(ue,we){return Ne(ue.type,we,ue.props)}function Me(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===j}function Le(ue){var we={"=":"=0",":":"=2"};return"$"+ue.replace(/[=:]/g,function(Ue){return we[Ue]})}var He=/\/+/g;function Ke(ue,we){return typeof ue=="object"&&ue!==null&&ue.key!=null?Le(""+ue.key):we.toString(36)}function Ze(ue){switch(ue.status){case"fulfilled":return ue.value;case"rejected":throw ue.reason;default:switch(typeof ue.status=="string"?ue.then(me,me):(ue.status="pending",ue.then(function(we){ue.status==="pending"&&(ue.status="fulfilled",ue.value=we)},function(we){ue.status==="pending"&&(ue.status="rejected",ue.reason=we)})),ue.status){case"fulfilled":return ue.value;case"rejected":throw ue.reason}}throw ue}function Se(ue,we,Ue,Ie,Ge){var qe=typeof ue;(qe==="undefined"||qe==="boolean")&&(ue=null);var We=!1;if(ue===null)We=!0;else switch(qe){case"bigint":case"string":case"number":We=!0;break;case"object":switch(ue.$$typeof){case j:case R:We=!0;break;case ne:return We=ue._init,Se(We(ue._payload),we,Ue,Ie,Ge)}}if(We)return Ge=Ge(ue),We=Ie===""?"."+Ke(ue,0):Ie,je(Ge)?(Ue="",We!=null&&(Ue=We.replace(He,"$&/")+"/"),Se(Ge,we,Ue,"",function(An){return An})):Ge!=null&&(Me(Ge)&&(Ge=$e(Ge,Ue+(Ge.key==null||ue&&ue.key===Ge.key?"":(""+Ge.key).replace(He,"$&/")+"/")+We)),we.push(Ge)),1;We=0;var bt=Ie===""?".":Ie+":";if(je(ue))for(var ot=0;ot>>1,Ye=Se[Ve];if(0>>1;VeM(Ue,ke))IeM(Ge,Ue)?(Se[Ve]=Ge,Se[Ie]=ke,Ve=Ie):(Se[Ve]=Ue,Se[we]=ke,Ve=we);else if(IeM(Ge,ke))Se[Ve]=Ge,Se[Ie]=ke,Ve=Ie;else break e}}return Ae}function M(Se,Ae){var ke=Se.sortIndex-Ae.sortIndex;return ke!==0?ke:Se.id-Ae.id}if(j.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var z=performance;j.unstable_now=function(){return z.now()}}else{var H=Date,G=H.now();j.unstable_now=function(){return H.now()-G}}var ee=[],P=[],ne=1,ae=null,le=3,re=!1,ie=!1,se=!1,de=!1,ge=typeof setTimeout=="function"?setTimeout:null,pe=typeof clearTimeout=="function"?clearTimeout:null,fe=typeof setImmediate<"u"?setImmediate:null;function ve(Se){for(var Ae=N(P);Ae!==null;){if(Ae.callback===null)A(P);else if(Ae.startTime<=Se)A(P),Ae.sortIndex=Ae.expirationTime,R(ee,Ae);else break;Ae=N(P)}}function je(Se){if(se=!1,ve(Se),!ie)if(N(ee)!==null)ie=!0,me||(me=!0,Le());else{var Ae=N(P);Ae!==null&&Ze(je,Ae.startTime-Se)}}var me=!1,xe=-1,Re=5,Ne=-1;function $e(){return de?!0:!(j.unstable_now()-NeSe&&$e());){var Ve=ae.callback;if(typeof Ve=="function"){ae.callback=null,le=ae.priorityLevel;var Ye=Ve(ae.expirationTime<=Se);if(Se=j.unstable_now(),typeof Ye=="function"){ae.callback=Ye,ve(Se),Ae=!0;break t}ae===N(ee)&&A(ee),ve(Se)}else A(ee);ae=N(ee)}if(ae!==null)Ae=!0;else{var ue=N(P);ue!==null&&Ze(je,ue.startTime-Se),Ae=!1}}break e}finally{ae=null,le=ke,re=!1}Ae=void 0}}finally{Ae?Le():me=!1}}}var Le;if(typeof fe=="function")Le=function(){fe(Me)};else if(typeof MessageChannel<"u"){var He=new MessageChannel,Ke=He.port2;He.port1.onmessage=Me,Le=function(){Ke.postMessage(null)}}else Le=function(){ge(Me,0)};function Ze(Se,Ae){xe=ge(function(){Se(j.unstable_now())},Ae)}j.unstable_IdlePriority=5,j.unstable_ImmediatePriority=1,j.unstable_LowPriority=4,j.unstable_NormalPriority=3,j.unstable_Profiling=null,j.unstable_UserBlockingPriority=2,j.unstable_cancelCallback=function(Se){Se.callback=null},j.unstable_forceFrameRate=function(Se){0>Se||125Ve?(Se.sortIndex=ke,R(P,Se),N(ee)===null&&Se===N(P)&&(se?(pe(xe),xe=-1):se=!0,Ze(je,ke-Ve))):(Se.sortIndex=Ye,R(ee,Se),ie||re||(ie=!0,me||(me=!0,Le()))),Se},j.unstable_shouldYield=$e,j.unstable_wrapCallback=function(Se){var Ae=le;return function(){var ke=le;le=Ae;try{return Se.apply(this,arguments)}finally{le=ke}}}})(scheduler_production)),scheduler_production}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production()),scheduler.exports}var reactDom={exports:{}},reactDom_production={};var hasRequiredReactDom_production;function requireReactDom_production(){if(hasRequiredReactDom_production)return reactDom_production;hasRequiredReactDom_production=1;var j=requireReact();function R(ee){var P="https://react.dev/errors/"+ee;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(R){console.error(R)}}return j(),reactDom.exports=requireReactDom_production(),reactDom.exports}var hasRequiredReactDomClient_production;function requireReactDomClient_production(){if(hasRequiredReactDomClient_production)return reactDomClient_production;hasRequiredReactDomClient_production=1;var j=requireScheduler(),R=requireReact(),N=requireReactDom();function A(l){var o="https://react.dev/errors/"+l;if(1Ye||(l.current=Ve[Ye],Ve[Ye]=null,Ye--)}function Ue(l,o){Ye++,Ve[Ye]=l.current,l.current=o}var Ie=ue(null),Ge=ue(null),qe=ue(null),We=ue(null);function bt(l,o){switch(Ue(qe,o),Ue(Ge,l),Ue(Ie,null),o.nodeType){case 9:case 11:l=(l=o.documentElement)&&(l=l.namespaceURI)?Rf(l):0;break;default:if(l=o.tagName,o=o.namespaceURI)o=Rf(o),l=Tf(o,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}we(Ie),Ue(Ie,l)}function ot(){we(Ie),we(Ge),we(qe)}function An(l){l.memoizedState!==null&&Ue(We,l);var o=Ie.current,E=Tf(o,l.type);o!==E&&(Ue(Ge,l),Ue(Ie,E))}function Wn(l){Ge.current===l&&(we(Ie),we(Ge)),We.current===l&&(we(We),Ao._currentValue=ke)}var ea,Qa;function ht(l){if(ea===void 0)try{throw Error()}catch(E){var o=E.stack.trim().match(/\n( *(at )?)/);ea=o&&o[1]||"",Qa=-1)":-1k||ce[O]!==be[k]){var Oe=` `+ce[O].replace(" at new "," at ");return l.displayName&&Oe.includes("")&&(Oe=Oe.replace("",l.displayName)),Oe}while(1<=O&&0<=k);break}}}finally{Mn=!1,Error.prepareStackTrace=E}return(E=l?l.displayName||l.name:"")?ht(E):""}function Ja(l,o){switch(l.tag){case 26:case 27:case 5:return ht(l.type);case 16:return ht("Lazy");case 13:return l.child!==o&&o!==null?ht("Suspense Fallback"):ht("Suspense");case 19:return ht("SuspenseList");case 0:case 15:return Ht(l.type,!1);case 11:return Ht(l.type.render,!1);case 1:return Ht(l.type,!0);case 31:return ht("Activity");default:return""}}function zl(l){try{var o="",E=null;do o+=Ja(l,E),E=l,l=l.return;while(l);return o}catch(O){return` Error generating stack: `+O.message+` `+O.stack}}var Za=Object.prototype.hasOwnProperty,Bl=j.unstable_scheduleCallback,Fl=j.unstable_cancelCallback,ti=j.unstable_shouldYield,Io=j.unstable_requestPaint,Gt=j.unstable_now,ni=j.unstable_getCurrentPriorityLevel,ko=j.unstable_ImmediatePriority,Lo=j.unstable_UserBlockingPriority,Wa=j.unstable_NormalPriority,Hl=j.unstable_LowPriority,Yl=j.unstable_IdlePriority,zo=j.log,ai=j.unstable_setDisableYieldValue,Rn=null,Yt=null;function Tn(l){if(typeof zo=="function"&&ai(l),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(Rn,l)}catch{}}var Pt=Math.clz32?Math.clz32:li,Bo=Math.log,Pl=Math.LN2;function li(l){return l>>>=0,l===0?32:31-(Bo(l)/Pl|0)|0}var wa=256,el=262144,Oa=4194304;function St(l){var o=l&42;if(o!==0)return o;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Mt(l,o,E){var O=l.pendingLanes;if(O===0)return 0;var k=0,B=l.suspendedLanes,te=l.pingedLanes;l=l.warmLanes;var oe=O&134217727;return oe!==0?(O=oe&~B,O!==0?k=St(O):(te&=oe,te!==0?k=St(te):E||(E=oe&~l,E!==0&&(k=St(E))))):(oe=O&~B,oe!==0?k=St(oe):te!==0?k=St(te):E||(E=O&~l,E!==0&&(k=St(E)))),k===0?0:o!==0&&o!==k&&(o&B)===0&&(B=k&-k,E=o&-o,B>=E||B===32&&(E&4194048)!==0)?o:k}function wn(l,o){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&o)===0}function gt(l,o){switch(l){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tn(){var l=Oa;return Oa<<=1,(Oa&62914560)===0&&(Oa=4194304),l}function Vl(l){for(var o=[],E=0;31>E;E++)o.push(l);return o}function Un(l,o){l.pendingLanes|=o,o!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Fo(l,o,E,O,k,B){var te=l.pendingLanes;l.pendingLanes=E,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=E,l.entangledLanes&=E,l.errorRecoveryDisabledLanes&=E,l.shellSuspendCounter=0;var oe=l.entanglements,ce=l.expirationTimes,be=l.hiddenUpdates;for(E=te&~E;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var op=/[\n"\\]/g;function pn(l){return l.replace(op,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function ri(l,o,E,O,k,B,te,oe){l.name="",te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"?l.type=te:l.removeAttribute("type"),o!=null?te==="number"?(o===0&&l.value===""||l.value!=o)&&(l.value=""+fn(o)):l.value!==""+fn(o)&&(l.value=""+fn(o)):te!=="submit"&&te!=="reset"||l.removeAttribute("value"),o!=null?ii(l,te,fn(o)):E!=null?ii(l,te,fn(E)):O!=null&&l.removeAttribute("value"),k==null&&B!=null&&(l.defaultChecked=!!B),k!=null&&(l.checked=k&&typeof k!="function"&&typeof k!="symbol"),oe!=null&&typeof oe!="function"&&typeof oe!="symbol"&&typeof oe!="boolean"?l.name=""+fn(oe):l.removeAttribute("name")}function yc(l,o,E,O,k,B,te,oe){if(B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(l.type=B),o!=null||E!=null){if(!(B!=="submit"&&B!=="reset"||o!=null)){oi(l);return}E=E!=null?""+fn(E):"",o=o!=null?""+fn(o):E,oe||o===l.value||(l.value=o),l.defaultValue=o}O=O??k,O=typeof O!="function"&&typeof O!="symbol"&&!!O,l.checked=oe?l.checked:!!O,l.defaultChecked=!!O,te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"&&(l.name=te),oi(l)}function ii(l,o,E){o==="number"&&Vo(l.ownerDocument)===l||l.defaultValue===""+E||(l.defaultValue=""+E)}function ol(l,o,E,O){if(l=l.options,o){o={};for(var k=0;k"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fi=!1;if(kn)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){fi=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{fi=!1}var la=null,pi=null,Ko=null;function Rc(){if(Ko)return Ko;var l,o=pi,E=o.length,O,k="value"in la?la.value:la.textContent,B=k.length;for(l=0;l=Zl),Nc=" ",Ac=!1;function Mc(l,o){switch(l){case"keyup":return Mp.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uc(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var cl=!1;function $p(l,o){switch(l){case"compositionend":return Uc(o);case"keypress":return o.which!==32?null:(Ac=!0,Nc);case"textInput":return l=o.data,l===Nc&&Ac?null:l;default:return null}}function Ip(l,o){if(cl)return l==="compositionend"||!yi&&Mc(l,o)?(l=Rc(),Ko=pi=la=null,cl=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:E,offset:o-l};l=O}e:{for(;E;){if(E.nextSibling){E=E.nextSibling;break e}E=E.parentNode}E=void 0}E=Hc(E)}}function Pc(l,o){return l&&o?l===o?!0:l&&l.nodeType===3?!1:o&&o.nodeType===3?Pc(l,o.parentNode):"contains"in l?l.contains(o):l.compareDocumentPosition?!!(l.compareDocumentPosition(o)&16):!1:!1}function Vc(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var o=Vo(l.document);o instanceof l.HTMLIFrameElement;){try{var E=typeof o.contentWindow.location.href=="string"}catch{E=!1}if(E)l=o.contentWindow;else break;o=Vo(l.document)}return o}function bi(l){var o=l&&l.nodeName&&l.nodeName.toLowerCase();return o&&(o==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||o==="textarea"||l.contentEditable==="true")}var Pp=kn&&"documentMode"in document&&11>=document.documentMode,dl=null,Si=null,no=null,ji=!1;function Gc(l,o,E){var O=E.window===E?E.document:E.nodeType===9?E:E.ownerDocument;ji||dl==null||dl!==Vo(O)||(O=dl,"selectionStart"in O&&bi(O)?O={start:O.selectionStart,end:O.selectionEnd}:(O=(O.ownerDocument&&O.ownerDocument.defaultView||window).getSelection(),O={anchorNode:O.anchorNode,anchorOffset:O.anchorOffset,focusNode:O.focusNode,focusOffset:O.focusOffset}),no&&to(no,O)||(no=O,O=Br(Si,"onSelect"),0>=te,k-=te,On=1<<32-Pt(o)+k|E<Qe?(at=Be,Be=null):at=Be.sibling;var it=_e(ye,Be,Ee[Qe],De);if(it===null){Be===null&&(Be=at);break}l&&Be&&it.alternate===null&&o(ye,Be),he=B(it,he,Qe),rt===null?Fe=it:rt.sibling=it,rt=it,Be=at}if(Qe===Ee.length)return E(ye,Be),lt&&zn(ye,Qe),Fe;if(Be===null){for(;QeQe?(at=Be,Be=null):at=Be.sibling;var Ta=_e(ye,Be,it.value,De);if(Ta===null){Be===null&&(Be=at);break}l&&Be&&Ta.alternate===null&&o(ye,Be),he=B(Ta,he,Qe),rt===null?Fe=Ta:rt.sibling=Ta,rt=Ta,Be=at}if(it.done)return E(ye,Be),lt&&zn(ye,Qe),Fe;if(Be===null){for(;!it.done;Qe++,it=Ee.next())it=Ce(ye,it.value,De),it!==null&&(he=B(it,he,Qe),rt===null?Fe=it:rt.sibling=it,rt=it);return lt&&zn(ye,Qe),Fe}for(Be=O(Be);!it.done;Qe++,it=Ee.next())it=Te(Be,ye,Qe,it.value,De),it!==null&&(l&&it.alternate!==null&&Be.delete(it.key===null?Qe:it.key),he=B(it,he,Qe),rt===null?Fe=it:rt.sibling=it,rt=it);return l&&Be.forEach(function(um){return o(ye,um)}),lt&&zn(ye,Qe),Fe}function pt(ye,he,Ee,De){if(typeof Ee=="object"&&Ee!==null&&Ee.type===se&&Ee.key===null&&(Ee=Ee.props.children),typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case re:e:{for(var Fe=Ee.key;he!==null;){if(he.key===Fe){if(Fe=Ee.type,Fe===se){if(he.tag===7){E(ye,he.sibling),De=k(he,Ee.props.children),De.return=ye,ye=De;break e}}else if(he.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===Re&&Ya(Fe)===he.type){E(ye,he.sibling),De=k(he,Ee.props),so(De,Ee),De.return=ye,ye=De;break e}E(ye,he);break}else o(ye,he);he=he.sibling}Ee.type===se?(De=La(Ee.props.children,ye.mode,De,Ee.key),De.return=ye,ye=De):(De=ar(Ee.type,Ee.key,Ee.props,null,ye.mode,De),so(De,Ee),De.return=ye,ye=De)}return te(ye);case ie:e:{for(Fe=Ee.key;he!==null;){if(he.key===Fe)if(he.tag===4&&he.stateNode.containerInfo===Ee.containerInfo&&he.stateNode.implementation===Ee.implementation){E(ye,he.sibling),De=k(he,Ee.children||[]),De.return=ye,ye=De;break e}else{E(ye,he);break}else o(ye,he);he=he.sibling}De=Ci(Ee,ye.mode,De),De.return=ye,ye=De}return te(ye);case Re:return Ee=Ya(Ee),pt(ye,he,Ee,De)}if(Ze(Ee))return ze(ye,he,Ee,De);if(Le(Ee)){if(Fe=Le(Ee),typeof Fe!="function")throw Error(A(150));return Ee=Fe.call(Ee),Pe(ye,he,Ee,De)}if(typeof Ee.then=="function")return pt(ye,he,ur(Ee),De);if(Ee.$$typeof===fe)return pt(ye,he,rr(ye,Ee),De);dr(ye,Ee)}return typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint"?(Ee=""+Ee,he!==null&&he.tag===6?(E(ye,he.sibling),De=k(he,Ee),De.return=ye,ye=De):(E(ye,he),De=Di(Ee,ye.mode,De),De.return=ye,ye=De),te(ye)):E(ye,he)}return function(ye,he,Ee,De){try{io=0;var Fe=pt(ye,he,Ee,De);return Sl=null,Fe}catch(Be){if(Be===bl||Be===sr)throw Be;var rt=an(29,Be,null,ye.mode);return rt.lanes=De,rt.return=ye,rt}}}var Va=mu(!0),gu=mu(!1),ca=!1;function Hi(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yi(l,o){l=l.updateQueue,o.updateQueue===l&&(o.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function ua(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function da(l,o,E){var O=l.updateQueue;if(O===null)return null;if(O=O.shared,(st&2)!==0){var k=O.pending;return k===null?o.next=o:(o.next=k.next,k.next=o),O.pending=o,o=nr(l),Wc(l,null,E),o}return tr(l,O,o,E),nr(l)}function co(l,o,E){if(o=o.updateQueue,o!==null&&(o=o.shared,(E&4194048)!==0)){var O=o.lanes;O&=l.pendingLanes,E|=O,o.lanes=E,tl(l,E)}}function Pi(l,o){var E=l.updateQueue,O=l.alternate;if(O!==null&&(O=O.updateQueue,E===O)){var k=null,B=null;if(E=E.firstBaseUpdate,E!==null){do{var te={lane:E.lane,tag:E.tag,payload:E.payload,callback:null,next:null};B===null?k=B=te:B=B.next=te,E=E.next}while(E!==null);B===null?k=B=o:B=B.next=o}else k=B=o;E={baseState:O.baseState,firstBaseUpdate:k,lastBaseUpdate:B,shared:O.shared,callbacks:O.callbacks},l.updateQueue=E;return}l=E.lastBaseUpdate,l===null?E.firstBaseUpdate=o:l.next=o,E.lastBaseUpdate=o}var Vi=!1;function uo(){if(Vi){var l=El;if(l!==null)throw l}}function fo(l,o,E,O){Vi=!1;var k=l.updateQueue;ca=!1;var B=k.firstBaseUpdate,te=k.lastBaseUpdate,oe=k.shared.pending;if(oe!==null){k.shared.pending=null;var ce=oe,be=ce.next;ce.next=null,te===null?B=be:te.next=be,te=ce;var Oe=l.alternate;Oe!==null&&(Oe=Oe.updateQueue,oe=Oe.lastBaseUpdate,oe!==te&&(oe===null?Oe.firstBaseUpdate=be:oe.next=be,Oe.lastBaseUpdate=ce))}if(B!==null){var Ce=k.baseState;te=0,Oe=be=ce=null,oe=B;do{var _e=oe.lane&-536870913,Te=_e!==oe.lane;if(Te?(nt&_e)===_e:(O&_e)===_e){_e!==0&&_e===vl&&(Vi=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:oe.tag,payload:oe.payload,callback:null,next:null});e:{var ze=l,Pe=oe;_e=o;var pt=E;switch(Pe.tag){case 1:if(ze=Pe.payload,typeof ze=="function"){Ce=ze.call(pt,Ce,_e);break e}Ce=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Pe.payload,_e=typeof ze=="function"?ze.call(pt,Ce,_e):ze,_e==null)break e;Ce=ae({},Ce,_e);break e;case 2:ca=!0}}_e=oe.callback,_e!==null&&(l.flags|=64,Te&&(l.flags|=8192),Te=k.callbacks,Te===null?k.callbacks=[_e]:Te.push(_e))}else Te={lane:_e,tag:oe.tag,payload:oe.payload,callback:oe.callback,next:null},Oe===null?(be=Oe=Te,ce=Ce):Oe=Oe.next=Te,te|=_e;if(oe=oe.next,oe===null){if(oe=k.shared.pending,oe===null)break;Te=oe,oe=Te.next,Te.next=null,k.lastBaseUpdate=Te,k.shared.pending=null}}while(!0);Oe===null&&(ce=Ce),k.baseState=ce,k.firstBaseUpdate=be,k.lastBaseUpdate=Oe,B===null&&(k.shared.lanes=0),ga|=te,l.lanes=te,l.memoizedState=Ce}}function xu(l,o){if(typeof l!="function")throw Error(A(191,l));l.call(o)}function yu(l,o){var E=l.callbacks;if(E!==null)for(l.callbacks=null,l=0;lB?B:8;var te=Se.T,oe={};Se.T=oe,us(l,!1,o,E);try{var ce=k(),be=Se.S;if(be!==null&&be(oe,ce),ce!==null&&typeof ce=="object"&&typeof ce.then=="function"){var Oe=Wp(ce,O);mo(l,o,Oe,un(l))}else mo(l,o,O,un(l))}catch(Ce){mo(l,o,{then:function(){},status:"rejected",reason:Ce},un())}finally{Ae.p=B,te!==null&&oe.types!==null&&(te.types=oe.types),Se.T=te}}function oh(){}function ss(l,o,E,O){if(l.tag!==5)throw Error(A(476));var k=Qu(l).queue;Xu(l,k,o,ke,E===null?oh:function(){return Ju(l),E(O)})}function Qu(l){var o=l.memoizedState;if(o!==null)return o;o={memoizedState:ke,baseState:ke,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:ke},next:null};var E={};return o.next={memoizedState:E,baseState:E,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:E},next:null},l.memoizedState=o,l=l.alternate,l!==null&&(l.memoizedState=o),o}function Ju(l){var o=Qu(l);o.next===null&&(o=l.alternate.memoizedState),mo(l,o.next.queue,{},un())}function cs(){return zt(Ao)}function Zu(){return wt().memoizedState}function Wu(){return wt().memoizedState}function rh(l){for(var o=l.return;o!==null;){switch(o.tag){case 24:case 3:var E=un();l=ua(E);var O=da(o,l,E);O!==null&&(en(O,o,E),co(O,o,E)),o={cache:Li()},l.payload=o;return}o=o.return}}function ih(l,o,E){var O=un();E={lane:O,revertLane:0,gesture:null,action:E,hasEagerState:!1,eagerState:null,next:null},br(l)?td(o,E):(E=wi(l,o,E,O),E!==null&&(en(E,l,O),nd(E,o,O)))}function ed(l,o,E){var O=un();mo(l,o,E,O)}function mo(l,o,E,O){var k={lane:O,revertLane:0,gesture:null,action:E,hasEagerState:!1,eagerState:null,next:null};if(br(l))td(o,k);else{var B=l.alternate;if(l.lanes===0&&(B===null||B.lanes===0)&&(B=o.lastRenderedReducer,B!==null))try{var te=o.lastRenderedState,oe=B(te,E);if(k.hasEagerState=!0,k.eagerState=oe,nn(oe,te))return tr(l,o,k,0),mt===null&&er(),!1}catch{}if(E=wi(l,o,k,O),E!==null)return en(E,l,O),nd(E,o,O),!0}return!1}function us(l,o,E,O){if(O={lane:2,revertLane:Hs(),gesture:null,action:O,hasEagerState:!1,eagerState:null,next:null},br(l)){if(o)throw Error(A(479))}else o=wi(l,E,O,2),o!==null&&en(o,l,2)}function br(l){var o=l.alternate;return l===Xe||o!==null&&o===Xe}function td(l,o){_l=hr=!0;var E=l.pending;E===null?o.next=o:(o.next=E.next,E.next=o),l.pending=o}function nd(l,o,E){if((E&4194048)!==0){var O=o.lanes;O&=l.pendingLanes,E|=O,o.lanes=E,tl(l,E)}}var go={readContext:zt,use:xr,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};go.useEffectEvent=_t;var ad={readContext:zt,use:xr,useCallback:function(l,o){return Kt().memoizedState=[l,o===void 0?null:o],l},useContext:zt,useEffect:Bu,useImperativeHandle:function(l,o,E){E=E!=null?E.concat([l]):null,vr(4194308,4,Pu.bind(null,o,l),E)},useLayoutEffect:function(l,o){return vr(4194308,4,l,o)},useInsertionEffect:function(l,o){vr(4,2,l,o)},useMemo:function(l,o){var E=Kt();o=o===void 0?null:o;var O=l();if(Ga){Tn(!0);try{l()}finally{Tn(!1)}}return E.memoizedState=[O,o],O},useReducer:function(l,o,E){var O=Kt();if(E!==void 0){var k=E(o);if(Ga){Tn(!0);try{E(o)}finally{Tn(!1)}}}else k=o;return O.memoizedState=O.baseState=k,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:k},O.queue=l,l=l.dispatch=ih.bind(null,Xe,l),[O.memoizedState,l]},useRef:function(l){var o=Kt();return l={current:l},o.memoizedState=l},useState:function(l){l=as(l);var o=l.queue,E=ed.bind(null,Xe,o);return o.dispatch=E,[l.memoizedState,E]},useDebugValue:rs,useDeferredValue:function(l,o){var E=Kt();return is(E,l,o)},useTransition:function(){var l=as(!1);return l=Xu.bind(null,Xe,l.queue,!0,!1),Kt().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,o,E){var O=Xe,k=Kt();if(lt){if(E===void 0)throw Error(A(407));E=E()}else{if(E=o(),mt===null)throw Error(A(349));(nt&127)!==0||_u(O,o,E)}k.memoizedState=E;var B={value:E,getSnapshot:o};return k.queue=B,Bu(Tu.bind(null,O,B,l),[l]),O.flags|=2048,Tl(9,{destroy:void 0},Ru.bind(null,O,B,E,o),null),E},useId:function(){var l=Kt(),o=mt.identifierPrefix;if(lt){var E=Dn,O=On;E=(O&~(1<<32-Pt(O)-1)).toString(32)+E,o="_"+o+"R_"+E,E=mr++,0<\/script>",B=B.removeChild(B.firstChild);break;case"select":B=typeof O.is=="string"?te.createElement("select",{is:O.is}):te.createElement("select"),O.multiple?B.multiple=!0:O.size&&(B.size=O.size);break;default:B=typeof O.is=="string"?te.createElement(k,{is:O.is}):te.createElement(k)}}B[Ot]=o,B[Vt]=O;e:for(te=o.child;te!==null;){if(te.tag===5||te.tag===6)B.appendChild(te.stateNode);else if(te.tag!==4&&te.tag!==27&&te.child!==null){te.child.return=te,te=te.child;continue}if(te===o)break e;for(;te.sibling===null;){if(te.return===null||te.return===o)break e;te=te.return}te.sibling.return=te.return,te=te.sibling}o.stateNode=B;e:switch(Ft(B,k,O),k){case"button":case"input":case"select":case"textarea":O=!!O.autoFocus;break e;case"img":O=!0;break e;default:O=!1}O&&Vn(o)}}return yt(o),_s(o,o.type,l===null?null:l.memoizedProps,o.pendingProps,E),null;case 6:if(l&&o.stateNode!=null)l.memoizedProps!==O&&Vn(o);else{if(typeof O!="string"&&o.stateNode===null)throw Error(A(166));if(l=qe.current,xl(o)){if(l=o.stateNode,E=o.memoizedProps,O=null,k=Lt,k!==null)switch(k.tag){case 27:case 5:O=k.memoizedProps}l[Ot]=o,l=!!(l.nodeValue===E||O!==null&&O.suppressHydrationWarning===!0||jf(l.nodeValue,E)),l||ia(o,!0)}else l=Fr(l).createTextNode(O),l[Ot]=o,o.stateNode=l}return yt(o),null;case 31:if(E=o.memoizedState,l===null||l.memoizedState!==null){if(O=xl(o),E!==null){if(l===null){if(!O)throw Error(A(318));if(l=o.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(A(557));l[Ot]=o}else za(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yt(o),l=!1}else E=Ui(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=E),l=!0;if(!l)return o.flags&256?(rn(o),o):(rn(o),null);if((o.flags&128)!==0)throw Error(A(558))}return yt(o),null;case 13:if(O=o.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(k=xl(o),O!==null&&O.dehydrated!==null){if(l===null){if(!k)throw Error(A(318));if(k=o.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(A(317));k[Ot]=o}else za(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yt(o),k=!1}else k=Ui(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=k),k=!0;if(!k)return o.flags&256?(rn(o),o):(rn(o),null)}return rn(o),(o.flags&128)!==0?(o.lanes=E,o):(E=O!==null,l=l!==null&&l.memoizedState!==null,E&&(O=o.child,k=null,O.alternate!==null&&O.alternate.memoizedState!==null&&O.alternate.memoizedState.cachePool!==null&&(k=O.alternate.memoizedState.cachePool.pool),B=null,O.memoizedState!==null&&O.memoizedState.cachePool!==null&&(B=O.memoizedState.cachePool.pool),B!==k&&(O.flags|=2048)),E!==l&&E&&(o.child.flags|=8192),Tr(o,o.updateQueue),yt(o),null);case 4:return ot(),l===null&&Gs(o.stateNode.containerInfo),yt(o),null;case 10:return Fn(o.type),yt(o),null;case 19:if(we(Tt),O=o.memoizedState,O===null)return yt(o),null;if(k=(o.flags&128)!==0,B=O.rendering,B===null)if(k)yo(O,!1);else{if(Rt!==0||l!==null&&(l.flags&128)!==0)for(l=o.child;l!==null;){if(B=pr(l),B!==null){for(o.flags|=128,yo(O,!1),l=B.updateQueue,o.updateQueue=l,Tr(o,l),o.subtreeFlags=0,l=E,E=o.child;E!==null;)eu(E,l),E=E.sibling;return Ue(Tt,Tt.current&1|2),lt&&zn(o,O.treeForkCount),o.child}l=l.sibling}O.tail!==null&&Gt()>Nr&&(o.flags|=128,k=!0,yo(O,!1),o.lanes=4194304)}else{if(!k)if(l=pr(B),l!==null){if(o.flags|=128,k=!0,l=l.updateQueue,o.updateQueue=l,Tr(o,l),yo(O,!0),O.tail===null&&O.tailMode==="hidden"&&!B.alternate&&!lt)return yt(o),null}else 2*Gt()-O.renderingStartTime>Nr&&E!==536870912&&(o.flags|=128,k=!0,yo(O,!1),o.lanes=4194304);O.isBackwards?(B.sibling=o.child,o.child=B):(l=O.last,l!==null?l.sibling=B:o.child=B,O.last=B)}return O.tail!==null?(l=O.tail,O.rendering=l,O.tail=l.sibling,O.renderingStartTime=Gt(),l.sibling=null,E=Tt.current,Ue(Tt,k?E&1|2:E&1),lt&&zn(o,O.treeForkCount),l):(yt(o),null);case 22:case 23:return rn(o),Ki(),O=o.memoizedState!==null,l!==null?l.memoizedState!==null!==O&&(o.flags|=8192):O&&(o.flags|=8192),O?(E&536870912)!==0&&(o.flags&128)===0&&(yt(o),o.subtreeFlags&6&&(o.flags|=8192)):yt(o),E=o.updateQueue,E!==null&&Tr(o,E.retryQueue),E=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(E=l.memoizedState.cachePool.pool),O=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(O=o.memoizedState.cachePool.pool),O!==E&&(o.flags|=2048),l!==null&&we(Ha),null;case 24:return E=null,l!==null&&(E=l.memoizedState.cache),o.memoizedState.cache!==E&&(o.flags|=2048),Fn(Dt),yt(o),null;case 25:return null;case 30:return null}throw Error(A(156,o.tag))}function fh(l,o){switch(Ai(o),o.tag){case 1:return l=o.flags,l&65536?(o.flags=l&-65537|128,o):null;case 3:return Fn(Dt),ot(),l=o.flags,(l&65536)!==0&&(l&128)===0?(o.flags=l&-65537|128,o):null;case 26:case 27:case 5:return Wn(o),null;case 31:if(o.memoizedState!==null){if(rn(o),o.alternate===null)throw Error(A(340));za()}return l=o.flags,l&65536?(o.flags=l&-65537|128,o):null;case 13:if(rn(o),l=o.memoizedState,l!==null&&l.dehydrated!==null){if(o.alternate===null)throw Error(A(340));za()}return l=o.flags,l&65536?(o.flags=l&-65537|128,o):null;case 19:return we(Tt),null;case 4:return ot(),null;case 10:return Fn(o.type),null;case 22:case 23:return rn(o),Ki(),l!==null&&we(Ha),l=o.flags,l&65536?(o.flags=l&-65537|128,o):null;case 24:return Fn(Dt),null;case 25:return null;default:return null}}function wd(l,o){switch(Ai(o),o.tag){case 3:Fn(Dt),ot();break;case 26:case 27:case 5:Wn(o);break;case 4:ot();break;case 31:o.memoizedState!==null&&rn(o);break;case 13:rn(o);break;case 19:we(Tt);break;case 10:Fn(o.type);break;case 22:case 23:rn(o),Ki(),l!==null&&we(Ha);break;case 24:Fn(Dt)}}function vo(l,o){try{var E=o.updateQueue,O=E!==null?E.lastEffect:null;if(O!==null){var k=O.next;E=k;do{if((E.tag&l)===l){O=void 0;var B=E.create,te=E.inst;O=B(),te.destroy=O}E=E.next}while(E!==k)}}catch(oe){ut(o,o.return,oe)}}function ha(l,o,E){try{var O=o.updateQueue,k=O!==null?O.lastEffect:null;if(k!==null){var B=k.next;O=B;do{if((O.tag&l)===l){var te=O.inst,oe=te.destroy;if(oe!==void 0){te.destroy=void 0,k=o;var ce=E,be=oe;try{be()}catch(Oe){ut(k,ce,Oe)}}}O=O.next}while(O!==B)}}catch(Oe){ut(o,o.return,Oe)}}function Od(l){var o=l.updateQueue;if(o!==null){var E=l.stateNode;try{yu(o,E)}catch(O){ut(l,l.return,O)}}}function Dd(l,o,E){E.props=Ka(l.type,l.memoizedProps),E.state=l.memoizedState;try{E.componentWillUnmount()}catch(O){ut(l,o,O)}}function Eo(l,o){try{var E=l.ref;if(E!==null){switch(l.tag){case 26:case 27:case 5:var O=l.stateNode;break;case 30:O=l.stateNode;break;default:O=l.stateNode}typeof E=="function"?l.refCleanup=E(O):E.current=O}}catch(k){ut(l,o,k)}}function Cn(l,o){var E=l.ref,O=l.refCleanup;if(E!==null)if(typeof O=="function")try{O()}catch(k){ut(l,o,k)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof E=="function")try{E(null)}catch(k){ut(l,o,k)}else E.current=null}function Cd(l){var o=l.type,E=l.memoizedProps,O=l.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":E.autoFocus&&O.focus();break e;case"img":E.src?O.src=E.src:E.srcSet&&(O.srcset=E.srcSet)}}catch(k){ut(l,l.return,k)}}function Rs(l,o,E){try{var O=l.stateNode;Uh(O,l.type,E,o),O[Vt]=o}catch(k){ut(l,l.return,k)}}function Nd(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&ba(l.type)||l.tag===4}function Ts(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Nd(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&ba(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function ws(l,o,E){var O=l.tag;if(O===5||O===6)l=l.stateNode,o?(E.nodeType===9?E.body:E.nodeName==="HTML"?E.ownerDocument.body:E).insertBefore(l,o):(o=E.nodeType===9?E.body:E.nodeName==="HTML"?E.ownerDocument.body:E,o.appendChild(l),E=E._reactRootContainer,E!=null||o.onclick!==null||(o.onclick=In));else if(O!==4&&(O===27&&ba(l.type)&&(E=l.stateNode,o=null),l=l.child,l!==null))for(ws(l,o,E),l=l.sibling;l!==null;)ws(l,o,E),l=l.sibling}function wr(l,o,E){var O=l.tag;if(O===5||O===6)l=l.stateNode,o?E.insertBefore(l,o):E.appendChild(l);else if(O!==4&&(O===27&&ba(l.type)&&(E=l.stateNode),l=l.child,l!==null))for(wr(l,o,E),l=l.sibling;l!==null;)wr(l,o,E),l=l.sibling}function Ad(l){var o=l.stateNode,E=l.memoizedProps;try{for(var O=l.type,k=o.attributes;k.length;)o.removeAttributeNode(k[0]);Ft(o,O,E),o[Ot]=l,o[Vt]=E}catch(B){ut(l,l.return,B)}}var Gn=!1,At=!1,Os=!1,Md=typeof WeakSet=="function"?WeakSet:Set,It=null;function ph(l,o){if(l=l.containerInfo,Xs=qr,l=Vc(l),bi(l)){if("selectionStart"in l)var E={start:l.selectionStart,end:l.selectionEnd};else e:{E=(E=l.ownerDocument)&&E.defaultView||window;var O=E.getSelection&&E.getSelection();if(O&&O.rangeCount!==0){E=O.anchorNode;var k=O.anchorOffset,B=O.focusNode;O=O.focusOffset;try{E.nodeType,B.nodeType}catch{E=null;break e}var te=0,oe=-1,ce=-1,be=0,Oe=0,Ce=l,_e=null;t:for(;;){for(var Te;Ce!==E||k!==0&&Ce.nodeType!==3||(oe=te+k),Ce!==B||O!==0&&Ce.nodeType!==3||(ce=te+O),Ce.nodeType===3&&(te+=Ce.nodeValue.length),(Te=Ce.firstChild)!==null;)_e=Ce,Ce=Te;for(;;){if(Ce===l)break t;if(_e===E&&++be===k&&(oe=te),_e===B&&++Oe===O&&(ce=te),(Te=Ce.nextSibling)!==null)break;Ce=_e,_e=Ce.parentNode}Ce=Te}E=oe===-1||ce===-1?null:{start:oe,end:ce}}else E=null}E=E||{start:0,end:0}}else E=null;for(Qs={focusedElem:l,selectionRange:E},qr=!1,It=o;It!==null;)if(o=It,l=o.child,(o.subtreeFlags&1028)!==0&&l!==null)l.return=o,It=l;else for(;It!==null;){switch(o=It,B=o.alternate,l=o.flags,o.tag){case 0:if((l&4)!==0&&(l=o.updateQueue,l=l!==null?l.events:null,l!==null))for(E=0;E title"))),Ft(B,O,E),B[Ot]=l,$t(B),O=B;break e;case"link":var te=Bf("link","href",k).get(O+(E.href||""));if(te){for(var oe=0;oept&&(te=pt,pt=Pe,Pe=te);var ye=Yc(oe,Pe),he=Yc(oe,pt);if(ye&&he&&(Te.rangeCount!==1||Te.anchorNode!==ye.node||Te.anchorOffset!==ye.offset||Te.focusNode!==he.node||Te.focusOffset!==he.offset)){var Ee=Ce.createRange();Ee.setStart(ye.node,ye.offset),Te.removeAllRanges(),Pe>pt?(Te.addRange(Ee),Te.extend(he.node,he.offset)):(Ee.setEnd(he.node,he.offset),Te.addRange(Ee))}}}}for(Ce=[],Te=oe;Te=Te.parentNode;)Te.nodeType===1&&Ce.push({element:Te,left:Te.scrollLeft,top:Te.scrollTop});for(typeof oe.focus=="function"&&oe.focus(),oe=0;oeE?32:E,Se.T=null,E=$s,$s=null;var B=ya,te=Jn;if(Ut=0,Nl=ya=null,Jn=0,(st&6)!==0)throw Error(A(331));var oe=st;if(st|=4,Pd(B.current),Fd(B,B.current,te,E),st=oe,To(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(Rn,B)}catch{}return!0}finally{Ae.p=k,Se.T=O,cf(l,o)}}function df(l,o,E){o=mn(E,o),o=hs(l.stateNode,o,2),l=da(l,o,2),l!==null&&(Un(l,2),Nn(l))}function ut(l,o,E){if(l.tag===3)df(l,l,E);else for(;o!==null;){if(o.tag===3){df(o,l,E);break}else if(o.tag===1){var O=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof O.componentDidCatch=="function"&&(xa===null||!xa.has(O))){l=mn(E,l),E=dd(2),O=da(o,E,2),O!==null&&(fd(E,O,o,l),Un(O,2),Nn(O));break}}o=o.return}}function zs(l,o,E){var O=l.pingCache;if(O===null){O=l.pingCache=new gh;var k=new Set;O.set(o,k)}else k=O.get(o),k===void 0&&(k=new Set,O.set(o,k));k.has(E)||(Ns=!0,k.add(E),l=bh.bind(null,l,o,E),o.then(l,l))}function bh(l,o,E){var O=l.pingCache;O!==null&&O.delete(o),l.pingedLanes|=l.suspendedLanes&E,l.warmLanes&=~E,mt===l&&(nt&E)===E&&(Rt===4||Rt===3&&(nt&62914560)===nt&&300>Gt()-Cr?(st&2)===0&&Al(l,0):As|=E,Cl===nt&&(Cl=0)),Nn(l)}function ff(l,o){o===0&&(o=tn()),l=ka(l,o),l!==null&&(Un(l,o),Nn(l))}function Sh(l){var o=l.memoizedState,E=0;o!==null&&(E=o.retryLane),ff(l,E)}function jh(l,o){var E=0;switch(l.tag){case 31:case 13:var O=l.stateNode,k=l.memoizedState;k!==null&&(E=k.retryLane);break;case 19:O=l.stateNode;break;case 22:O=l.stateNode._retryCache;break;default:throw Error(A(314))}O!==null&&O.delete(o),ff(l,E)}function _h(l,o){return Bl(l,o)}var kr=null,Ul=null,Bs=!1,Lr=!1,Fs=!1,Ea=0;function Nn(l){l!==Ul&&l.next===null&&(Ul===null?kr=Ul=l:Ul=Ul.next=l),Lr=!0,Bs||(Bs=!0,Th())}function To(l,o){if(!Fs&&Lr){Fs=!0;do for(var E=!1,O=kr;O!==null;){if(l!==0){var k=O.pendingLanes;if(k===0)var B=0;else{var te=O.suspendedLanes,oe=O.pingedLanes;B=(1<<31-Pt(42|l)+1)-1,B&=k&~(te&~oe),B=B&201326741?B&201326741|1:B?B|2:0}B!==0&&(E=!0,gf(O,B))}else B=nt,B=Mt(O,O===mt?B:0,O.cancelPendingCommit!==null||O.timeoutHandle!==-1),(B&3)===0||wn(O,B)||(E=!0,gf(O,B));O=O.next}while(E);Fs=!1}}function Rh(){pf()}function pf(){Lr=Bs=!1;var l=0;Ea!==0&&Ih()&&(l=Ea);for(var o=Gt(),E=null,O=kr;O!==null;){var k=O.next,B=hf(O,o);B===0?(O.next=null,E===null?kr=k:E.next=k,k===null&&(Ul=E)):(E=O,(l!==0||(B&3)!==0)&&(Lr=!0)),O=k}Ut!==0&&Ut!==5||To(l),Ea!==0&&(Ea=0)}function hf(l,o){for(var E=l.suspendedLanes,O=l.pingedLanes,k=l.expirationTimes,B=l.pendingLanes&-62914561;0oe)break;var Oe=ce.transferSize,Ce=ce.initiatorType;Oe&&_f(Ce)&&(ce=ce.responseEnd,te+=Oe*(ce"u"?null:document;function If(l,o,E){var O=$l;if(O&&typeof o=="string"&&o){var k=pn(o);k='link[rel="'+l+'"][href="'+k+'"]',typeof E=="string"&&(k+='[crossorigin="'+E+'"]'),$f.has(k)||($f.add(k),l={rel:l,crossOrigin:E,href:o},O.querySelector(k)===null&&(o=O.createElement("link"),Ft(o,"link",l),$t(o),O.head.appendChild(o)))}}function Vh(l){Zn.D(l),If("dns-prefetch",l,null)}function Gh(l,o){Zn.C(l,o),If("preconnect",l,o)}function Kh(l,o,E){Zn.L(l,o,E);var O=$l;if(O&&l&&o){var k='link[rel="preload"][as="'+pn(o)+'"]';o==="image"&&E&&E.imageSrcSet?(k+='[imagesrcset="'+pn(E.imageSrcSet)+'"]',typeof E.imageSizes=="string"&&(k+='[imagesizes="'+pn(E.imageSizes)+'"]')):k+='[href="'+pn(l)+'"]';var B=k;switch(o){case"style":B=Il(l);break;case"script":B=kl(l)}bn.has(B)||(l=ae({rel:"preload",href:o==="image"&&E&&E.imageSrcSet?void 0:l,as:o},E),bn.set(B,l),O.querySelector(k)!==null||o==="style"&&O.querySelector(Co(B))||o==="script"&&O.querySelector(No(B))||(o=O.createElement("link"),Ft(o,"link",l),$t(o),O.head.appendChild(o)))}}function qh(l,o){Zn.m(l,o);var E=$l;if(E&&l){var O=o&&typeof o.as=="string"?o.as:"script",k='link[rel="modulepreload"][as="'+pn(O)+'"][href="'+pn(l)+'"]',B=k;switch(O){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":B=kl(l)}if(!bn.has(B)&&(l=ae({rel:"modulepreload",href:l},o),bn.set(B,l),E.querySelector(k)===null)){switch(O){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(E.querySelector(No(B)))return}O=E.createElement("link"),Ft(O,"link",l),$t(O),E.head.appendChild(O)}}}function Xh(l,o,E){Zn.S(l,o,E);var O=$l;if(O&&l){var k=al(O).hoistableStyles,B=Il(l);o=o||"default";var te=k.get(B);if(!te){var oe={loading:0,preload:null};if(te=O.querySelector(Co(B)))oe.loading=5;else{l=ae({rel:"stylesheet",href:l,"data-precedence":o},E),(E=bn.get(B))&&ac(l,E);var ce=te=O.createElement("link");$t(ce),Ft(ce,"link",l),ce._p=new Promise(function(be,Oe){ce.onload=be,ce.onerror=Oe}),ce.addEventListener("load",function(){oe.loading|=1}),ce.addEventListener("error",function(){oe.loading|=2}),oe.loading|=4,Yr(te,o,O)}te={type:"stylesheet",instance:te,count:1,state:oe},k.set(B,te)}}}function Qh(l,o){Zn.X(l,o);var E=$l;if(E&&l){var O=al(E).hoistableScripts,k=kl(l),B=O.get(k);B||(B=E.querySelector(No(k)),B||(l=ae({src:l,async:!0},o),(o=bn.get(k))&&lc(l,o),B=E.createElement("script"),$t(B),Ft(B,"link",l),E.head.appendChild(B)),B={type:"script",instance:B,count:1,state:null},O.set(k,B))}}function Jh(l,o){Zn.M(l,o);var E=$l;if(E&&l){var O=al(E).hoistableScripts,k=kl(l),B=O.get(k);B||(B=E.querySelector(No(k)),B||(l=ae({src:l,async:!0,type:"module"},o),(o=bn.get(k))&&lc(l,o),B=E.createElement("script"),$t(B),Ft(B,"link",l),E.head.appendChild(B)),B={type:"script",instance:B,count:1,state:null},O.set(k,B))}}function kf(l,o,E,O){var k=(k=qe.current)?Hr(k):null;if(!k)throw Error(A(446));switch(l){case"meta":case"title":return null;case"style":return typeof E.precedence=="string"&&typeof E.href=="string"?(o=Il(E.href),E=al(k).hoistableStyles,O=E.get(o),O||(O={type:"style",instance:null,count:0,state:null},E.set(o,O)),O):{type:"void",instance:null,count:0,state:null};case"link":if(E.rel==="stylesheet"&&typeof E.href=="string"&&typeof E.precedence=="string"){l=Il(E.href);var B=al(k).hoistableStyles,te=B.get(l);if(te||(k=k.ownerDocument||k,te={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},B.set(l,te),(B=k.querySelector(Co(l)))&&!B._p&&(te.instance=B,te.state.loading=5),bn.has(l)||(E={rel:"preload",as:"style",href:E.href,crossOrigin:E.crossOrigin,integrity:E.integrity,media:E.media,hrefLang:E.hrefLang,referrerPolicy:E.referrerPolicy},bn.set(l,E),B||Zh(k,l,E,te.state))),o&&O===null)throw Error(A(528,""));return te}if(o&&O!==null)throw Error(A(529,""));return null;case"script":return o=E.async,E=E.src,typeof E=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=kl(E),E=al(k).hoistableScripts,O=E.get(o),O||(O={type:"script",instance:null,count:0,state:null},E.set(o,O)),O):{type:"void",instance:null,count:0,state:null};default:throw Error(A(444,l))}}function Il(l){return'href="'+pn(l)+'"'}function Co(l){return'link[rel="stylesheet"]['+l+"]"}function Lf(l){return ae({},l,{"data-precedence":l.precedence,precedence:null})}function Zh(l,o,E,O){l.querySelector('link[rel="preload"][as="style"]['+o+"]")?O.loading=1:(o=l.createElement("link"),O.preload=o,o.addEventListener("load",function(){return O.loading|=1}),o.addEventListener("error",function(){return O.loading|=2}),Ft(o,"link",E),$t(o),l.head.appendChild(o))}function kl(l){return'[src="'+pn(l)+'"]'}function No(l){return"script[async]"+l}function zf(l,o,E){if(o.count++,o.instance===null)switch(o.type){case"style":var O=l.querySelector('style[data-href~="'+pn(E.href)+'"]');if(O)return o.instance=O,$t(O),O;var k=ae({},E,{"data-href":E.href,"data-precedence":E.precedence,href:null,precedence:null});return O=(l.ownerDocument||l).createElement("style"),$t(O),Ft(O,"style",k),Yr(O,E.precedence,l),o.instance=O;case"stylesheet":k=Il(E.href);var B=l.querySelector(Co(k));if(B)return o.state.loading|=4,o.instance=B,$t(B),B;O=Lf(E),(k=bn.get(k))&&ac(O,k),B=(l.ownerDocument||l).createElement("link"),$t(B);var te=B;return te._p=new Promise(function(oe,ce){te.onload=oe,te.onerror=ce}),Ft(B,"link",O),o.state.loading|=4,Yr(B,E.precedence,l),o.instance=B;case"script":return B=kl(E.src),(k=l.querySelector(No(B)))?(o.instance=k,$t(k),k):(O=E,(k=bn.get(B))&&(O=ae({},E),lc(O,k)),l=l.ownerDocument||l,k=l.createElement("script"),$t(k),Ft(k,"link",O),l.head.appendChild(k),o.instance=k);case"void":return null;default:throw Error(A(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(O=o.instance,o.state.loading|=4,Yr(O,E.precedence,l));return o.instance}function Yr(l,o,E){for(var O=E.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=O.length?O[O.length-1]:null,B=k,te=0;te title"):null)}function Wh(l,o,E){if(E===1||o.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(l=o.disabled,typeof o.precedence=="string"&&l==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Hf(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function em(l,o,E,O){if(E.type==="stylesheet"&&(typeof O.media!="string"||matchMedia(O.media).matches!==!1)&&(E.state.loading&4)===0){if(E.instance===null){var k=Il(O.href),B=o.querySelector(Co(k));if(B){o=B._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(l.count++,l=Vr.bind(l),o.then(l,l)),E.state.loading|=4,E.instance=B,$t(B);return}B=o.ownerDocument||o,O=Lf(O),(k=bn.get(k))&&ac(O,k),B=B.createElement("link"),$t(B);var te=B;te._p=new Promise(function(oe,ce){te.onload=oe,te.onerror=ce}),Ft(B,"link",O),E.instance=B}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(E,o),(o=E.state.preload)&&(E.state.loading&3)===0&&(l.count++,E=Vr.bind(l),o.addEventListener("load",E),o.addEventListener("error",E))}}var oc=0;function tm(l,o){return l.stylesheets&&l.count===0&&Kr(l,l.stylesheets),0oc?50:800)+o);return l.unsuspend=E,function(){l.unsuspend=null,clearTimeout(O),clearTimeout(k)}}:null}function Vr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kr(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Gr=null;function Kr(l,o){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Gr=new Map,o.forEach(nm,l),Gr=null,Vr.call(l))}function nm(l,o){if(!(o.state.loading&4)){var E=Gr.get(l);if(E)var O=E.get(null);else{E=new Map,Gr.set(l,E);for(var k=l.querySelectorAll("link[data-precedence],style[data-precedence]"),B=0;B"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(R){console.error(R)}}return j(),client.exports=requireReactDomClient_production(),client.exports}var clientExports=requireClient();const getEventName=j=>`ce:${j}`;function listen(j,R){const N=getEventName(j),A=M=>R(M.detail);return document.body.addEventListener(N,A),()=>{document.body.removeEventListener(N,A)}}function dispatch(j,R=null){document.body.dispatchEvent(new CustomEvent(getEventName(j),{detail:R}))}const UI_EDITOR_ACTIVE_BLOCK_FORM_UID="editingFormUid",UI_EDITOR_BLOCKS_CLIPBOARD="clipboardBlocks",UI_EDITOR_SEGUE_INDEX="segueIndex",UI_EDITOR_SEGUE_VISIBLE="isSegueVisible",UI_EDITOR_SEGUE_DOCKED="isSegueDocked",UI_EDITOR_SEGUE_POSITION_INVERT="isSeguePosInverted",UI_EDITOR_SEGUE_MINIMISED="isSegueMinimised",UI_CHANGES_MADE="changesMade",UI_COLOR_SCHEME_KEY="colorScheme",ENTITY_PROPERTY_TITLE="title",ENTITY_PROPERTY_PERMALINK="permalink",ENTITY_PROPERTY_PARENT_ID="parentId",ENTITY_PROPERTY_TEMPLATE="template",ENTITY_PROPERTY_DATE_PUBLISHED="datePublished",ENTITY_PROPERTY_LIVE_STATUS="isLive",ENTITY_PROPERTY_SEO_TITLE="seoTitle",ENTITY_PROPERTY_SEO_DESCRIPTION="seoDescription",FORM_AUTO_SAVE_KEY="formDataAutoSave",FORM_ERRORS_KEY="formErrors",FORM_TAB_REMEMBER_INDEX_KEY="groupIndexData",EVENT_STORAGE_PREACT_UPDATE="storagePreactUpdate",EVENT_STORAGE_GLOBALS_UPDATE="storageGlobalsUpdate",EVENT_STORAGE_PAGE_UPDATE="storagePagePropsUpdate",RESPONSE_PROPERTY_OBJECTS="responseObjects",RESPONSE_PROPERTY_CONTENT="responseContent",RESPONSE_OBJECT_NOTIFICATION="notification",RESPONSE_OBJECT_ALERT="alertUi",RESPONSE_OBJECT_PREACT="preactUi",RESPONSE_OBJECT_STORAGE="storageUi",RESPONSE_OBJECT_ROUTE="routeUi",RESPONSE_OBJECT_HTTP_REDIRECT="httpRedirect",RESPONSE_OBJECT_ROUTE_REFRESH="routeRefreshUi",RESPONSE_OBJECT_SERVER_ERROR="serverErrorUi",FORM_DATA_KEY="formData",FORM_FIELD_TYPE_FIELD="field",FORM_FIELD_TYPE_REPEATER_ROW="repeaterRow",FORM_FIELD_TYPE_LABEL="groupingLabel",FILE_UPLOAD_KEY="theFile",UI_LISTING_COLUMN_SLUG_SELECTION="__select",ACTION_BUTTON_UPLOAD_FILE="upload_file",ACTION_BUTTON_TOGGLE_LISTING_FILTERS="toggle_filters",FIELD_KEY_TEMPLATE_BLOCKS="templateBlocks",CONSTANT={UI_EDITOR_ACTIVE_BLOCK_FORM_UID,UI_EDITOR_BLOCKS_CLIPBOARD,UI_EDITOR_SEGUE_INDEX,UI_EDITOR_SEGUE_VISIBLE,UI_EDITOR_SEGUE_DOCKED,UI_EDITOR_SEGUE_POSITION_INVERT,UI_EDITOR_SEGUE_MINIMISED,UI_CHANGES_MADE,UI_COLOR_SCHEME_KEY,ENTITY_PROPERTY_TITLE,ENTITY_PROPERTY_PERMALINK,ENTITY_PROPERTY_PARENT_ID,ENTITY_PROPERTY_TEMPLATE,ENTITY_PROPERTY_DATE_PUBLISHED,ENTITY_PROPERTY_LIVE_STATUS,ENTITY_PROPERTY_SEO_TITLE,ENTITY_PROPERTY_SEO_DESCRIPTION,FORM_AUTO_SAVE_KEY,FORM_ERRORS_KEY,FORM_TAB_REMEMBER_INDEX_KEY,EVENT_STORAGE_PREACT_UPDATE,EVENT_STORAGE_GLOBALS_UPDATE,EVENT_STORAGE_PAGE_UPDATE,RESPONSE_PROPERTY_OBJECTS,RESPONSE_PROPERTY_CONTENT,RESPONSE_OBJECT_NOTIFICATION,RESPONSE_OBJECT_ALERT,RESPONSE_OBJECT_PREACT,RESPONSE_OBJECT_STORAGE,RESPONSE_OBJECT_ROUTE,RESPONSE_OBJECT_HTTP_REDIRECT,RESPONSE_OBJECT_ROUTE_REFRESH,RESPONSE_OBJECT_SERVER_ERROR,FORM_DATA_KEY,FORM_FIELD_TYPE_FIELD,FORM_FIELD_TYPE_REPEATER_ROW,FORM_FIELD_TYPE_LABEL,FILE_UPLOAD_KEY,UI_LISTING_COLUMN_SLUG_SELECTION,ACTION_BUTTON_UPLOAD_FILE,ACTION_BUTTON_TOGGLE_LISTING_FILTERS,FIELD_KEY_TEMPLATE_BLOCKS};let storage={};const getStorage=()=>storage,setStorage=j=>{storage=Object.assign(storage,j instanceof Function?j(storage):j),dispatch(CONSTANT.EVENT_STORAGE_GLOBALS_UPDATE,storage)};let preact={};const getPreactStorage=()=>preact,setPreactStorage=j=>{preact=Object.assign(preact,j instanceof Function?j(preact):j),dispatch(CONSTANT.EVENT_STORAGE_PREACT_UPDATE,preact)};let pageStorage={};const getPageStorage=()=>pageStorage,setPageStorage=j=>{pageStorage=j,dispatch(CONSTANT.EVENT_STORAGE_PAGE_UPDATE,pageStorage)};function parseValue(j){return j==="null"?null:j==="true"?!0:j==="false"?!1:j&&["[","{"].includes(j[0])?JSON.parse(j):j}function parseSetFn(j,R,N){N===null?j.removeItem(R):(N instanceof Object&&(N=JSON.stringify(N)),j.setItem(R,N))}function getSessionStorageVar(j){return parseValue(sessionStorage.getItem(j))}function setSessionStorageVar(j,R){return parseSetFn(sessionStorage,j,R)}function getLocalStorageVar(j){return parseValue(localStorage.getItem(j))}function setLocalStorageVar(j,R){return parseSetFn(localStorage,j,R)}let iterator=0,subscriptions={};const createSubscriptionNamespace=(j=iterator++)=>{subscriptions[j]=[];const R=M=>(subscriptions[j]&&subscriptions[j].push(M),()=>{subscriptions[j]=(subscriptions[j]||[]).filter(z=>z!==M)});return[R,(M={})=>{(subscriptions[j]||[]).forEach(z=>z(M))},(M,z=[])=>{reactExports.useEffect(()=>R(M),z)}]},themeContainerEl=document.body,colorSchemeOptions={default:"Use system setting",light:"Light",dark:"Dark"},defaultKey="default",getColorScheme=()=>getLocalStorageVar(CONSTANT.UI_COLOR_SCHEME_KEY)??defaultKey;function applyColorScheme(j=null){j&&setLocalStorageVar(CONSTANT.UI_COLOR_SCHEME_KEY,j),j=getColorScheme(),updateDOMElement(j)}function applyColorSchemeWithoutPersistence(j){updateDOMElement(j)}const[,emitMode,useMode]=createSubscriptionNamespace();function useIsDarkMode(){const[j,R]=reactExports.useState(getColorScheme());return useMode(N=>R(N)),j==="dark"||j==="default"&&matchMedia("(prefers-color-scheme: dark)").matches}function updateDOMElement(j){emitMode(j),themeContainerEl.classList.remove("dark","light"),j!==defaultKey&&themeContainerEl.classList.add(j)}const notification="_7g",visible$1="KM",iconInner="-o",ok="Oj",bad="eC",warn$1="Ye",info$1="mP",icon$3="YF",textContain="Pb",title$2="_7d",text$2="sJ",pulse="hW",style$1l={notification,visible:visible$1,iconInner,ok,bad,warn:warn$1,info:info$1,icon:icon$3,textContain,title:title$2,text:text$2,pulse};var feather$2={exports:{}},feather$1=feather$2.exports,hasRequiredFeather;function requireFeather(){return hasRequiredFeather||(hasRequiredFeather=1,(function(j,R){(function(A,M){j.exports=M()})(typeof self<"u"?self:feather$1,function(){return(function(N){var A={};function M(z){if(A[z])return A[z].exports;var H=A[z]={i:z,l:!1,exports:{}};return N[z].call(H.exports,H,H.exports,M),H.l=!0,H.exports}return M.m=N,M.c=A,M.d=function(z,H,G){M.o(z,H)||Object.defineProperty(z,H,{configurable:!1,enumerable:!0,get:G})},M.r=function(z){Object.defineProperty(z,"__esModule",{value:!0})},M.n=function(z){var H=z&&z.__esModule?function(){return z.default}:function(){return z};return M.d(H,"a",H),H},M.o=function(z,H){return Object.prototype.hasOwnProperty.call(z,H)},M.p="",M(M.s=0)})({"./dist/icons.json":(function(N){N.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}}),"./node_modules/classnames/dedupe.js":(function(N,A,M){var z,H;(function(){var G=(function(){function ee(){}ee.prototype=Object.create(null);function P(ge,pe){for(var fe=pe.length,ve=0;ve1?arguments[1]:void 0,pe=ge!==void 0,fe=0,ve=ae(ie),je,me,xe,Re;if(pe&&(ge=z(ge,de>2?arguments[2]:void 0,2)),ve!=null&&!(se==Array&&ee(ve)))for(Re=ve.call(ie),me=new se;!(xe=Re.next()).done;fe++)ne(me,fe,pe?G(Re,ge,[xe.value,fe],!0):xe.value);else for(je=P(ie.length),me=new se(je);je>fe;fe++)ne(me,fe,pe?ge(ie[fe],fe):ie[fe]);return me.length=fe,me}}),"./node_modules/core-js/internals/array-includes.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/to-indexed-object.js"),H=M("./node_modules/core-js/internals/to-length.js"),G=M("./node_modules/core-js/internals/to-absolute-index.js");N.exports=function(ee){return function(P,ne,ae){var le=z(P),re=H(le.length),ie=G(ae,re),se;if(ee&&ne!=ne){for(;re>ie;)if(se=le[ie++],se!=se)return!0}else for(;re>ie;ie++)if((ee||ie in le)&&le[ie]===ne)return ee||ie||0;return!ee&&-1}}}),"./node_modules/core-js/internals/bind-context.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/a-function.js");N.exports=function(H,G,ee){if(z(H),G===void 0)return H;switch(ee){case 0:return function(){return H.call(G)};case 1:return function(P){return H.call(G,P)};case 2:return function(P,ne){return H.call(G,P,ne)};case 3:return function(P,ne,ae){return H.call(G,P,ne,ae)}}return function(){return H.apply(G,arguments)}}}),"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/an-object.js");N.exports=function(H,G,ee,P){try{return P?G(z(ee)[0],ee[1]):G(ee)}catch(ae){var ne=H.return;throw ne!==void 0&&z(ne.call(H)),ae}}}),"./node_modules/core-js/internals/check-correctness-of-iteration.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/well-known-symbol.js"),H=z("iterator"),G=!1;try{var ee=0,P={next:function(){return{done:!!ee++}},return:function(){G=!0}};P[H]=function(){return this},Array.from(P,function(){throw 2})}catch{}N.exports=function(ne,ae){if(!ae&&!G)return!1;var le=!1;try{var re={};re[H]=function(){return{next:function(){return{done:le=!0}}}},ne(re)}catch{}return le}}),"./node_modules/core-js/internals/classof-raw.js":(function(N,A){var M={}.toString;N.exports=function(z){return M.call(z).slice(8,-1)}}),"./node_modules/core-js/internals/classof.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/classof-raw.js"),H=M("./node_modules/core-js/internals/well-known-symbol.js"),G=H("toStringTag"),ee=z((function(){return arguments})())=="Arguments",P=function(ne,ae){try{return ne[ae]}catch{}};N.exports=function(ne){var ae,le,re;return ne===void 0?"Undefined":ne===null?"Null":typeof(le=P(ae=Object(ne),G))=="string"?le:ee?z(ae):(re=z(ae))=="Object"&&typeof ae.callee=="function"?"Arguments":re}}),"./node_modules/core-js/internals/copy-constructor-properties.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/has.js"),H=M("./node_modules/core-js/internals/own-keys.js"),G=M("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),ee=M("./node_modules/core-js/internals/object-define-property.js");N.exports=function(P,ne){for(var ae=H(ne),le=ee.f,re=G.f,ie=0;ie",je="java"+fe+":",me;for(de.style.display="none",P.appendChild(de),de.src=String(je),me=de.contentWindow.document,me.open(),me.write(pe+fe+ve+"document.F=Object"+pe+"/"+fe+ve),me.close(),se=me.F;ge--;)delete se[re][G[ge]];return se()};N.exports=Object.create||function(ge,pe){var fe;return ge!==null?(ie[re]=z(ge),fe=new ie,ie[re]=null,fe[le]=ge):fe=se(),pe===void 0?fe:H(fe,pe)},ee[le]=!0}),"./node_modules/core-js/internals/object-define-properties.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/descriptors.js"),H=M("./node_modules/core-js/internals/object-define-property.js"),G=M("./node_modules/core-js/internals/an-object.js"),ee=M("./node_modules/core-js/internals/object-keys.js");N.exports=z?Object.defineProperties:function(ne,ae){G(ne);for(var le=ee(ae),re=le.length,ie=0,se;re>ie;)H.f(ne,se=le[ie++],ae[se]);return ne}}),"./node_modules/core-js/internals/object-define-property.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/descriptors.js"),H=M("./node_modules/core-js/internals/ie8-dom-define.js"),G=M("./node_modules/core-js/internals/an-object.js"),ee=M("./node_modules/core-js/internals/to-primitive.js"),P=Object.defineProperty;A.f=z?P:function(ae,le,re){if(G(ae),le=ee(le,!0),G(re),H)try{return P(ae,le,re)}catch{}if("get"in re||"set"in re)throw TypeError("Accessors not supported");return"value"in re&&(ae[le]=re.value),ae}}),"./node_modules/core-js/internals/object-get-own-property-descriptor.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/descriptors.js"),H=M("./node_modules/core-js/internals/object-property-is-enumerable.js"),G=M("./node_modules/core-js/internals/create-property-descriptor.js"),ee=M("./node_modules/core-js/internals/to-indexed-object.js"),P=M("./node_modules/core-js/internals/to-primitive.js"),ne=M("./node_modules/core-js/internals/has.js"),ae=M("./node_modules/core-js/internals/ie8-dom-define.js"),le=Object.getOwnPropertyDescriptor;A.f=z?le:function(ie,se){if(ie=ee(ie),se=P(se,!0),ae)try{return le(ie,se)}catch{}if(ne(ie,se))return G(!H.f.call(ie,se),ie[se])}}),"./node_modules/core-js/internals/object-get-own-property-names.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/object-keys-internal.js"),H=M("./node_modules/core-js/internals/enum-bug-keys.js"),G=H.concat("length","prototype");A.f=Object.getOwnPropertyNames||function(P){return z(P,G)}}),"./node_modules/core-js/internals/object-get-own-property-symbols.js":(function(N,A){A.f=Object.getOwnPropertySymbols}),"./node_modules/core-js/internals/object-get-prototype-of.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/has.js"),H=M("./node_modules/core-js/internals/to-object.js"),G=M("./node_modules/core-js/internals/shared-key.js"),ee=M("./node_modules/core-js/internals/correct-prototype-getter.js"),P=G("IE_PROTO"),ne=Object.prototype;N.exports=ee?Object.getPrototypeOf:function(ae){return ae=H(ae),z(ae,P)?ae[P]:typeof ae.constructor=="function"&&ae instanceof ae.constructor?ae.constructor.prototype:ae instanceof Object?ne:null}}),"./node_modules/core-js/internals/object-keys-internal.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/has.js"),H=M("./node_modules/core-js/internals/to-indexed-object.js"),G=M("./node_modules/core-js/internals/array-includes.js"),ee=M("./node_modules/core-js/internals/hidden-keys.js"),P=G(!1);N.exports=function(ne,ae){var le=H(ne),re=0,ie=[],se;for(se in le)!z(ee,se)&&z(le,se)&&ie.push(se);for(;ae.length>re;)z(le,se=ae[re++])&&(~P(ie,se)||ie.push(se));return ie}}),"./node_modules/core-js/internals/object-keys.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/object-keys-internal.js"),H=M("./node_modules/core-js/internals/enum-bug-keys.js");N.exports=Object.keys||function(ee){return z(ee,H)}}),"./node_modules/core-js/internals/object-property-is-enumerable.js":(function(N,A,M){var z={}.propertyIsEnumerable,H=Object.getOwnPropertyDescriptor,G=H&&!z.call({1:2},1);A.f=G?function(P){var ne=H(this,P);return!!ne&&ne.enumerable}:z}),"./node_modules/core-js/internals/object-set-prototype-of.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");N.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var H=!1,G={},ee;try{ee=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,ee.call(G,[]),H=G instanceof Array}catch{}return function(ne,ae){return z(ne,ae),H?ee.call(ne,ae):ne.__proto__=ae,ne}})():void 0)}),"./node_modules/core-js/internals/own-keys.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/global.js"),H=M("./node_modules/core-js/internals/object-get-own-property-names.js"),G=M("./node_modules/core-js/internals/object-get-own-property-symbols.js"),ee=M("./node_modules/core-js/internals/an-object.js"),P=z.Reflect;N.exports=P&&P.ownKeys||function(ae){var le=H.f(ee(ae)),re=G.f;return re?le.concat(re(ae)):le}}),"./node_modules/core-js/internals/path.js":(function(N,A,M){N.exports=M("./node_modules/core-js/internals/global.js")}),"./node_modules/core-js/internals/redefine.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/global.js"),H=M("./node_modules/core-js/internals/shared.js"),G=M("./node_modules/core-js/internals/hide.js"),ee=M("./node_modules/core-js/internals/has.js"),P=M("./node_modules/core-js/internals/set-global.js"),ne=M("./node_modules/core-js/internals/function-to-string.js"),ae=M("./node_modules/core-js/internals/internal-state.js"),le=ae.get,re=ae.enforce,ie=String(ne).split("toString");H("inspectSource",function(se){return ne.call(se)}),(N.exports=function(se,de,ge,pe){var fe=pe?!!pe.unsafe:!1,ve=pe?!!pe.enumerable:!1,je=pe?!!pe.noTargetGet:!1;if(typeof ge=="function"&&(typeof de=="string"&&!ee(ge,"name")&&G(ge,"name",de),re(ge).source=ie.join(typeof de=="string"?de:"")),se===z){ve?se[de]=ge:P(de,ge);return}else fe?!je&&se[de]&&(ve=!0):delete se[de];ve?se[de]=ge:G(se,de,ge)})(Function.prototype,"toString",function(){return typeof this=="function"&&le(this).source||ne.call(this)})}),"./node_modules/core-js/internals/require-object-coercible.js":(function(N,A){N.exports=function(M){if(M==null)throw TypeError("Can't call method on "+M);return M}}),"./node_modules/core-js/internals/set-global.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/global.js"),H=M("./node_modules/core-js/internals/hide.js");N.exports=function(G,ee){try{H(z,G,ee)}catch{z[G]=ee}return ee}}),"./node_modules/core-js/internals/set-to-string-tag.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/object-define-property.js").f,H=M("./node_modules/core-js/internals/has.js"),G=M("./node_modules/core-js/internals/well-known-symbol.js"),ee=G("toStringTag");N.exports=function(P,ne,ae){P&&!H(P=ae?P:P.prototype,ee)&&z(P,ee,{configurable:!0,value:ne})}}),"./node_modules/core-js/internals/shared-key.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/shared.js"),H=M("./node_modules/core-js/internals/uid.js"),G=z("keys");N.exports=function(ee){return G[ee]||(G[ee]=H(ee))}}),"./node_modules/core-js/internals/shared.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/global.js"),H=M("./node_modules/core-js/internals/set-global.js"),G=M("./node_modules/core-js/internals/is-pure.js"),ee="__core-js_shared__",P=z[ee]||H(ee,{});(N.exports=function(ne,ae){return P[ne]||(P[ne]=ae!==void 0?ae:{})})("versions",[]).push({version:"3.1.3",mode:G?"pure":"global",copyright:"ยฉ 2019 Denis Pushkarev (zloirock.ru)"})}),"./node_modules/core-js/internals/string-at.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/to-integer.js"),H=M("./node_modules/core-js/internals/require-object-coercible.js");N.exports=function(G,ee,P){var ne=String(H(G)),ae=z(ee),le=ne.length,re,ie;return ae<0||ae>=le?P?"":void 0:(re=ne.charCodeAt(ae),re<55296||re>56319||ae+1===le||(ie=ne.charCodeAt(ae+1))<56320||ie>57343?P?ne.charAt(ae):re:P?ne.slice(ae,ae+2):(re-55296<<10)+(ie-56320)+65536)}}),"./node_modules/core-js/internals/to-absolute-index.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/to-integer.js"),H=Math.max,G=Math.min;N.exports=function(ee,P){var ne=z(ee);return ne<0?H(ne+P,0):G(ne,P)}}),"./node_modules/core-js/internals/to-indexed-object.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/indexed-object.js"),H=M("./node_modules/core-js/internals/require-object-coercible.js");N.exports=function(G){return z(H(G))}}),"./node_modules/core-js/internals/to-integer.js":(function(N,A){var M=Math.ceil,z=Math.floor;N.exports=function(H){return isNaN(H=+H)?0:(H>0?z:M)(H)}}),"./node_modules/core-js/internals/to-length.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/to-integer.js"),H=Math.min;N.exports=function(G){return G>0?H(z(G),9007199254740991):0}}),"./node_modules/core-js/internals/to-object.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/require-object-coercible.js");N.exports=function(H){return Object(z(H))}}),"./node_modules/core-js/internals/to-primitive.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/is-object.js");N.exports=function(H,G){if(!z(H))return H;var ee,P;if(G&&typeof(ee=H.toString)=="function"&&!z(P=ee.call(H))||typeof(ee=H.valueOf)=="function"&&!z(P=ee.call(H))||!G&&typeof(ee=H.toString)=="function"&&!z(P=ee.call(H)))return P;throw TypeError("Can't convert object to primitive value")}}),"./node_modules/core-js/internals/uid.js":(function(N,A){var M=0,z=Math.random();N.exports=function(H){return"Symbol(".concat(H===void 0?"":H,")_",(++M+z).toString(36))}}),"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/is-object.js"),H=M("./node_modules/core-js/internals/an-object.js");N.exports=function(G,ee){if(H(G),!z(ee)&&ee!==null)throw TypeError("Can't set "+String(ee)+" as a prototype")}}),"./node_modules/core-js/internals/well-known-symbol.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/global.js"),H=M("./node_modules/core-js/internals/shared.js"),G=M("./node_modules/core-js/internals/uid.js"),ee=M("./node_modules/core-js/internals/native-symbol.js"),P=z.Symbol,ne=H("wks");N.exports=function(ae){return ne[ae]||(ne[ae]=ee&&P[ae]||(ee?P:G)("Symbol."+ae))}}),"./node_modules/core-js/modules/es.array.from.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/export.js"),H=M("./node_modules/core-js/internals/array-from.js"),G=M("./node_modules/core-js/internals/check-correctness-of-iteration.js"),ee=!G(function(P){Array.from(P)});z({target:"Array",stat:!0,forced:ee},{from:H})}),"./node_modules/core-js/modules/es.string.iterator.js":(function(N,A,M){var z=M("./node_modules/core-js/internals/string-at.js"),H=M("./node_modules/core-js/internals/internal-state.js"),G=M("./node_modules/core-js/internals/define-iterator.js"),ee="String Iterator",P=H.set,ne=H.getterFor(ee);G(String,"String",function(ae){P(this,{type:ee,string:String(ae),index:0})},function(){var le=ne(this),re=le.string,ie=le.index,se;return ie>=re.length?{value:void 0,done:!0}:(se=z(re,ie,!0),le.index+=se.length,{value:se,done:!1})})}),"./node_modules/webpack/buildin/global.js":(function(N,A){var M;M=(function(){return this})();try{M=M||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(M=window)}N.exports=M}),"./src/default-attrs.json":(function(N){N.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}}),"./src/icon.js":(function(N,A,M){Object.defineProperty(A,"__esModule",{value:!0});var z=Object.assign||function(se){for(var de=1;de2&&arguments[2]!==void 0?arguments[2]:[];le(this,se),this.name=de,this.contents=ge,this.tags=pe,this.attrs=z({},ne.default,{class:"feather feather-"+de})}return H(se,[{key:"toSvg",value:function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pe=z({},this.attrs,ge,{class:(0,ee.default)(this.attrs.class,ge.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),se})();function ie(se){return Object.keys(se).map(function(de){return de+'="'+se[de]+'"'}).join(" ")}A.default=re}),"./src/icons.js":(function(N,A,M){Object.defineProperty(A,"__esModule",{value:!0});var z=M("./src/icon.js"),H=ae(z),G=M("./dist/icons.json"),ee=ae(G),P=M("./src/tags.json"),ne=ae(P);function ae(le){return le&&le.__esModule?le:{default:le}}A.default=Object.keys(ee.default).map(function(le){return new H.default(le,ee.default[le],ne.default[le])}).reduce(function(le,re){return le[re.name]=re,le},{})}),"./src/index.js":(function(N,A,M){var z=M("./src/icons.js"),H=ae(z),G=M("./src/to-svg.js"),ee=ae(G),P=M("./src/replace.js"),ne=ae(P);function ae(le){return le&&le.__esModule?le:{default:le}}N.exports={icons:H.default,toSvg:ee.default,replace:ne.default}}),"./src/replace.js":(function(N,A,M){Object.defineProperty(A,"__esModule",{value:!0});var z=Object.assign||function(ie){for(var se=1;se0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document>"u")throw new Error("`feather.replace()` only works in a browser environment.");var se=document.querySelectorAll("[data-feather]");Array.from(se).forEach(function(de){return le(de,ie)})}function le(ie){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=re(ie),ge=de["data-feather"];if(delete de["data-feather"],P.default[ge]===void 0){console.warn("feather: '"+ge+"' is not a valid icon");return}var pe=P.default[ge].toSvg(z({},se,de,{class:(0,G.default)(se.class,de.class)})),fe=new DOMParser().parseFromString(pe,"image/svg+xml"),ve=fe.querySelector("svg");ie.parentNode.replaceChild(ve,ie)}function re(ie){return Array.from(ie.attributes).reduce(function(se,de){return se[de.name]=de.value,se},{})}A.default=ae}),"./src/tags.json":(function(N){N.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}}),"./src/to-svg.js":(function(N,A,M){Object.defineProperty(A,"__esModule",{value:!0});var z=M("./src/icons.js"),H=G(z);function G(P){return P&&P.__esModule?P:{default:P}}function ee(P){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!P)throw new Error("The required `key` (icon name) parameter is missing.");if(!H.default[P])throw new Error("No icon matching '"+P+"'. See the complete list of icons at https://feathericons.com");return H.default[P].toSvg(ne)}A.default=ee}),0:(function(N,A,M){M("./node_modules/core-js/es/array/from.js"),N.exports=M("./src/index.js")})})})})(feather$2)),feather$2.exports}var featherExports=requireFeather();const feather=getDefaultExportFromCjs(featherExports),icon$2="yV",style$1k={icon:icon$2},Icon=({icon:j})=>feather.icons.hasOwnProperty(j)?jsxRuntimeExports.jsx("span",{className:style$1k.icon,dangerouslySetInnerHTML:{__html:feather.icons[j].toSvg()}}):j,NOTIFICATION_STORAGE_KEY="notificationPersist",spawnNotification=j=>{const N=Object.assign({},JSON.parse(JSON.stringify({duration:5,icon:"",title:!1,text:null,theme:"default",persistOnce:!1})),j);N.persistOnce?(delete N.persistOnce,setSessionStorageVar(NOTIFICATION_STORAGE_KEY,N)):window.notifySpawn(N)};let hideTimeout,visibleBugCheck;const UiNotification=()=>{const[j,R]=reactExports.useState(!1),[N,A]=reactExports.useState({});let{title:M,text:z,theme:H,icon:G}=N,ee=style$1l.notification;j&&(ee+=` ${style$1l.visible}`),H&&(ee+=` ${style$1l[H]}`),reactExports.useEffect(()=>{visibleBugCheck=j},[j]);const P=ae=>{const le=()=>{A(ae),R(!0),clearTimeout(hideTimeout),hideTimeout=setTimeout(()=>R(!1),ae.duration*1e3)};visibleBugCheck?(R(!1),clearTimeout(hideTimeout),setTimeout(le,200)):le()};reactExports.useEffect(()=>{window.notifySpawn=P;const ae=getSessionStorageVar(NOTIFICATION_STORAGE_KEY);ae&&(setSessionStorageVar(NOTIFICATION_STORAGE_KEY,null),spawnNotification(ae))},[]);const ne=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[G&&jsxRuntimeExports.jsx("div",{className:style$1l.icon,children:jsxRuntimeExports.jsx("div",{className:style$1l.iconInner,children:jsxRuntimeExports.jsx(Icon,{icon:G})})}),jsxRuntimeExports.jsxs("div",{className:style$1l.textContain,children:[M&&jsxRuntimeExports.jsx("div",{className:style$1l.title,children:M}),z&&jsxRuntimeExports.jsx("div",{className:style$1l.text,children:z})]})]});return jsxRuntimeExports.jsx("div",{className:ee,onClick:()=>R(!1),children:ne})},contain$e="zF",exitZone="HW",fadeIn2="lM",window$2="PH",entranceIn="kJ",fullscreen="Kr",fadeIn$2="pd",footer$1="yU",regular="_0B",alert$1="xR",header$5="CK",content$1="kt",padded="Fd",hide$2="cu",centralise="_5E",style$1j={contain:contain$e,exitZone,fadeIn2,window:window$2,entranceIn,fullscreen,fadeIn:fadeIn$2,footer:footer$1,regular,alert:alert$1,header:header$5,content:content$1,padded,hide:hide$2,centralise},button="Ju",fullwidth="-g",small="dJ",context="_9I",icon$1="dA",primary$1="_3g",concern="SY",optimistic="hp",cautious="I2",magic="Dg",orange$1="q0",blue$1="nP",white$1="Vg",pulsing$1="_11",iconOnly="Xq",a="Qu",style$1i={button,fullwidth,small,context,icon:icon$1,primary:primary$1,concern,optimistic,cautious,magic,orange:orange$1,blue:blue$1,white:white$1,pulsing:pulsing$1,iconOnly,a};let locks=0;function lockScreen(){if(locks++,locks>1)return document.getElementById("uiLock").focus();const j=document.createElement("div");j.setAttribute("id","uiLock"),j.setAttribute("style","z-index:999999;cursor:progress;bottom:0;left:0;right:0;top:0;position:fixed;display:block"),document.body.appendChild(j),j.focus()}function unlockScreen(){if(locks--,locks<1){locks=0;const j=document.getElementById("uiLock");j&&j.remove()}}function disableSavePrompt(){window.onbeforeunload=null}const defaultUiModalProps={affirmText:"OK",affirmTheme:"primary",buttons:"",cancelText:"Cancel",centraliseContent:!1,content:null,exitZoneClickable:!0,hideBodyContent:!1,onAffirm:j=>j(),onCancel:null,onExit(j,R){const{onAffirm:N,onCancel:A,persistAffirm:M}=j;if(R){if(N&&N(FluentModal.dismissOne),!M)return!1}else A&&A(),FluentModal.dismissOne()},persistAffirm:!1,usesPadding:!0,title:!1,type:!1,windowClassName:null};class FluentModal{constructor(){return this.options=Object.assign({},defaultUiModalProps),this}static dismissOne=()=>{uiModalConnector(({instances:R,setInstances:N})=>{const A=R.length-1;R[A]&&N(M=>(M.splice(A,1),[...M]))})};static dismissAll=()=>{uiModalConnector(({setInstances:R})=>R([]))};dispatch(){const R=this.options;uiModalConnector(({setInstances:N})=>{N(A=>[...A,Object.assign({},R)])})}asyncDispatch(){return lockScreen(),(R=null)=>{this.options.content=R,this.dispatch(),unlockScreen()}}affirmText(R){return this.options.affirmText=R,this}affirmTheme(R){return this.options.affirmTheme=R,this}alert(R){return this.options.type="alert",this.cancelText(!1),this.title(R),this}cancelText(R){return this.options.cancelText=R,this}centraliseContent(R=!0){return this.options.centraliseContent=R,this}content(R){return this.options.content=R,this}forceResponse(R=!0){return this.options.exitZoneClickable=!R,this}fullscreen(){return this.options.type="fullscreen",this}onAffirm(R){return this.options.onAffirm=R,this.cancelText(defaultUiModalProps.cancelText),this}onCancel(R){return this.options.onCancel=R,this.cancelText(defaultUiModalProps.cancelText),this}onExit(R){return this.options.onExit=R,this}persistAffirm(R=!0){return this.options.persistAffirm=R,this}setButtons(R){return this.options.buttons=R,this}title(R){return this.options.title=R,this}usePadding(R=!0){return this.options.usesPadding=R,this}useBodyContent(R=!0){return this.options.hideBodyContent=!R,this}useWindowClassName(R){return this.options.windowClassName=R,this}}var lib={},ReactShadowRoot$1={},propTypes={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var j="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=j,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var j=requireReactPropTypesSecret();function R(){}function N(){}return N.resetWarningCache=R,factoryWithThrowingShims=function(){function A(H,G,ee,P,ne,ae){if(ae!==j){var le=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw le.name="Invariant Violation",le}}A.isRequired=A;function M(){return A}var z={array:A,bigint:A,bool:A,func:A,number:A,object:A,string:A,symbol:A,any:A,arrayOf:M,element:A,elementType:A,instanceOf:M,node:A,objectOf:M,oneOf:M,oneOfType:M,shape:M,exact:M,checkPropTypes:N,resetWarningCache:R};return z.PropTypes=z,z},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes.exports=requireFactoryWithThrowingShims()()),propTypes.exports}var hasRequiredReactShadowRoot;function requireReactShadowRoot(){return hasRequiredReactShadowRoot||(hasRequiredReactShadowRoot=1,(function(j){Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var R=M(requireReact()),N=M(requireReactDom()),A=M(requirePropTypes());function M(ve){return ve&&ve.__esModule?ve:{default:ve}}function z(ve){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?z=function(me){return typeof me}:z=function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me},z(ve)}function H(ve,je){if(!(ve instanceof je))throw new TypeError("Cannot call a class as a function")}function G(ve,je){for(var me=0;me"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}}function re(ve){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(me){return me.__proto__||Object.getPrototypeOf(me)},re(ve)}function ie(ve,je){if(typeof je!="function"&&je!==null)throw new TypeError("Super expression must either be null or a function");ve.prototype=Object.create(je&&je.prototype,{constructor:{value:ve,writable:!0,configurable:!0}}),je&&se(ve,je)}function se(ve,je){return se=Object.setPrototypeOf||function(xe,Re){return xe.__proto__=Re,xe},se(ve,je)}function de(ve,je,me){return je in ve?Object.defineProperty(ve,je,{value:me,enumerable:!0,configurable:!0,writable:!0}):ve[je]=me,ve}var ge=typeof window<"u"&&window.ShadowRoot&&window.ShadowRoot.prototype.hasOwnProperty("adoptedStyleSheets")&&window.CSSStyleSheet&&window.CSSStyleSheet.prototype.hasOwnProperty("replace"),pe=typeof window<"u"&&window.Element&&window.Element.prototype.hasOwnProperty("attachShadow"),fe=(function(ve){ie(me,ve);var je=P(me);function me(xe){var Re;return H(this,me),Re=je.call(this,xe),de(ae(Re),"state",{initialized:!1}),Re.placeholder=R.default.createRef(),Re}return ee(me,[{key:"componentDidMount",value:function(){var Re=this.props,Ne=Re.delegatesFocus,$e=Re.mode,Me=Re.stylesheets;this.shadowRoot=this.placeholder.current.parentNode.attachShadow({delegatesFocus:Ne,mode:$e}),Me&&(this.shadowRoot.adoptedStyleSheets=Me),this.setState({initialized:!0})}},{key:"render",value:function(){return this.state.initialized?N.default.createPortal(this.props.children,this.shadowRoot):this.props.declarative?R.default.createElement("template",{ref:this.placeholder,shadowroot:this.props.mode},this.props.children):R.default.createElement("span",{ref:this.placeholder})}}]),me})(R.default.PureComponent);j.default=fe,de(fe,"constructableStylesheetsSupported",ge),de(fe,"constructibleStylesheetsSupported",ge),de(fe,"defaultProps",{declarative:!1,delegatesFocus:!1,mode:"open"}),de(fe,"displayName","ReactShadowRoot"),de(fe,"propTypes",{declarative:A.default.bool,delegatesFocus:A.default.bool,mode:A.default.oneOf(["open","closed"]),stylesheets:A.default.arrayOf(typeof window<"u"?A.default.instanceOf(window.CSSStyleSheet):A.default.any)}),de(fe,"shadowRootSupported",pe)})(ReactShadowRoot$1)),ReactShadowRoot$1}var hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,(function(j){Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var R=N(requireReactShadowRoot());function N(M){return M&&M.__esModule?M:{default:M}}var A=R.default;j.default=A})(lib)),lib}var libExports=requireLib();const ReactShadowRoot=getDefaultExportFromCjs(libExports);function delegateResponseObjects(j){if(typeof j!="object"||!j.hasOwnProperty(CONSTANT.RESPONSE_PROPERTY_OBJECTS))return console.error("Cannot parse response objects from server",j);const{responseObjects:R}=j;Object.keys(R||{}).map(N=>R[N]).forEach(N=>{const{type:A,data:M}=N;switch(A){case CONSTANT.RESPONSE_OBJECT_NOTIFICATION:spawnNotification(M);break;case CONSTANT.RESPONSE_OBJECT_ALERT:new FluentModal().alert(M).dispatch();break;case CONSTANT.RESPONSE_OBJECT_PREACT:setPreactStorage(M);break;case CONSTANT.RESPONSE_OBJECT_STORAGE:setStorage(M);break;case CONSTANT.RESPONSE_OBJECT_ROUTE:const{path:z,pageProps:H}=M;emitRouteTo({url:z,props:H});break;case CONSTANT.RESPONSE_OBJECT_ROUTE_REFRESH:emitRouteRefresh();break;case CONSTANT.RESPONSE_OBJECT_HTTP_REDIRECT:const{url:G,target:ee}=M;window.open(G,ee);break;case CONSTANT.RESPONSE_OBJECT_SERVER_ERROR:new FluentModal().content(jsxRuntimeExports.jsx(ReactShadowRoot,{mode:"closed",className:!0,children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:M}})})).usePadding(!1).fullscreen().dispatch();break;default:console.error("[Client]: Could not parse response object "+A+" from server")}})}function fetchPromise(j,R={}){const N={method:"GET",postData:{},responseAsJson:!0,disableUiLock:!1},{method:A,postData:M,responseAsJson:z,disableUiLock:H}=Object.assign(N,R),{cmsPrefixPath:G}=getStorage();return new Promise((ee,P)=>{const ne={method:A,headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}};M&&(A==="POST"||A==="DELETE")&&(ne.body=JSON.stringify(M)),H||lockScreen();let ae;j===G&&(j=`${G}/`);const le=re=>{delegateResponseObjects(re),H||unlockScreen()};fetch(j,ne).then(re=>(ae=re,z?re.json():re.text())).then(re=>{le(re),ae.ok?ee(re[CONSTANT.RESPONSE_PROPERTY_CONTENT]):P(re[CONSTANT.RESPONSE_PROPERTY_CONTENT])}).catch(re=>{le(re),P(re[CONSTANT.RESPONSE_PROPERTY_CONTENT])})})}function fetchJson(j,R={}){return fetchPromise(j,R)}function fetchPost(j,R={},N={}){return fetchPromise(j,{method:"POST",...N,postData:R})}function fetchDelete(j,R={},N={}){return fetchPromise(j,{method:"DELETE",...N,postData:R})}const[,emitRouteTo,useSubscribeRouteTo]=createSubscriptionNamespace(),[,emitRouteRefresh,useSubscribeRouteRefresh]=createSubscriptionNamespace(),routeTo=(j,R={})=>emitRouteTo({url:j,props:R}),getQueryParameter=j=>new URLSearchParams(window.location.hash).get(j),checkIfUserHasUnsavedChanges=async()=>new Promise((j,R)=>{window.onbeforeunload?new FluentModal().alert("You have unsaved changes. Are you sure you want to leave this page?").onAffirm(()=>{disableSavePrompt(),j()}).onCancel(()=>{FluentModal.dismissAll(),R()}).affirmText("Discard changes").forceResponse().cancelText("Stay here").dispatch():j()}),fetchRoute=({pageUrl:j,setIsLoading:R},N,A)=>{FluentModal.dismissAll(),R(!0);const{cmsPrefixPath:M}=getStorage(),z=`${M}${j}`,H=()=>{R(!1),unlockScreen()};return fetchJson(z).then(N).catch(A).finally(H)};let _={};const debounce=j=>{const R=_.length;_[R]&&window.cancelAnimationFrame(_[R]),_[R]=window.requestAnimationFrame(j)};let cacheIsMobile;const getMobileMatchMedia=()=>{const j=matchMedia("(max-width: 766px)").matches;return cacheIsMobile=j,j};let hasInitialised=!1;const initialiseBind=()=>{hasInitialised||(hasInitialised=!0,window.addEventListener("resize",()=>debounce(()=>{cacheIsMobile!==getMobileMatchMedia()&&dispatch("viewpoint-size-changed",getMobileMatchMedia())})))},useMobileMediaQuery=()=>{const[j,R]=reactExports.useState(getMobileMatchMedia());return reactExports.useEffect(()=>{initialiseBind(),listen("viewpoint-size-changed",N=>R(N))},[]),{isMobile:j}};let actionBindings={};const registerAction=(j,R)=>(actionBindings[j]||(actionBindings[j]=[]),actionBindings[j].push(R),()=>deRegisterAction(j)),deRegisterAction=j=>{delete actionBindings[j]},useActionListener=(j,R)=>{reactExports.useEffect(()=>registerAction(j,R),[])},setupActionHandler=(j=>{if(typeof j=="string")return()=>{actionBindings[j]&&actionBindings[j].forEach(H=>H())};const{fetchUrl:R,fetchMethod:N,asyncConfirm:A,asyncAffirmButton:M}=j,z=()=>{if(R){const H=()=>{FluentModal.dismissOne()};N==="get"?fetchJson(R).then(H).catch(H):N==="delete"?fetchDelete(R).then(H).catch(H):fetchPost(R).then(H).catch(H)}};return()=>{if(A&&M){const{title:H,theme:G}=M,ee=new FluentModal().alert(A).affirmText(H).onAffirm(z);G&&ee.affirmTheme(G),ee.dispatch()}}}),UiButton=({to:j,title:R,target:N,theme:A,children:M,disabled:z,onContextMenu:H,fullwidth:G,size:ee,autoFocus:P,pulsing:ne,onClick:ae,onMouseEnter:le,icon:re,className:ie,noStyling:se,type:de,action:ge})=>{const{isMobile:pe}=useMobileMediaQuery();let fe=!se&&style$1i.button;G&&(fe+=` ${style$1i.fullwidth}`),A&&(fe+=` ${style$1i[A]}`),pe&&(fe+=` ${style$1i.small}`),ee&&(fe+=` ${style$1i[ee]}`),ie&&(fe+=` ${ie}`),re&&!M&&(fe+=` ${style$1i.iconOnly}`),ne&&(fe+=` ${style$1i.pulsing}`),ge&&(ae=setupActionHandler(ge));let ve=jsxRuntimeExports.jsxs(React.Fragment,{children:[re&&jsxRuntimeExports.jsx("span",{className:style$1i.icon,children:jsxRuntimeExports.jsx(Icon,{icon:re})}),M]});return j&&N?jsxRuntimeExports.jsx("a",{href:j,target:N,title:R,children:ve,className:fe}):jsxRuntimeExports.jsx("button",{onClick:j?()=>routeTo(j):ae,onMouseEnter:le||(()=>{}),type:de||"button",onContextMenu:H,disabled:z,title:j?j.replace("/cms",""):R,children:ve,autoFocus:P,className:fe})};let uiModalConnector=({})=>null,_instances=[];const handleEscape=j=>{j.key==="Escape"&&uiModalConnector(({instances:R})=>{let N=R[R.length-1];if(!N)return;const{exitZoneClickable:A,onExit:M}=N;A&&M(N)})},UiModal=()=>{const[j,R]=reactExports.useState([]);return reactExports.useEffect(()=>{uiModalConnector=N=>N({instances:_instances,setInstances:R}),document.body.addEventListener("keyup",handleEscape)},[]),reactExports.useEffect(()=>{if(_instances=j,j.length>0){const N=document.body.querySelector(`.${style$1j.window} .${style$1j.footer} button:last-child`);N&&N.focus()}},[j]),j.map((N,A)=>{const{affirmText:M,affirmTheme:z,buttons:H,cancelText:G,centraliseContent:ee,content:P,exitZoneClickable:ne,hideBodyContent:ae,maxWidth:le,minWidth:re,onAffirm:ie,onCancel:se,onExit:de,title:ge,type:pe,usesPadding:fe,width:ve,windowClassName:je}=N;let me=[];return H?me=H.map(xe=>xe(A++)):((G||se)&&me.push(jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,onClick:()=>de(N,!1),children:G},A++)),M&&ie&&me.push(jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,theme:z,onClick:()=>de(N,!0),children:M},A++))),jsxRuntimeExports.jsxs("div",{className:style$1j.contain,style:{zIndex:A+20},children:[jsxRuntimeExports.jsx("div",{className:style$1j.exitZone,onClick:()=>ne?de(N):null}),jsxRuntimeExports.jsxs("div",{className:`${style$1j.window} ${pe&&style$1j[pe]} ${je}`,style:{maxWidth:le,minWidth:re,width:ve},children:[ge&&jsxRuntimeExports.jsx("div",{className:style$1j.header,children:ge}),P&&jsxRuntimeExports.jsx("div",{className:`${style$1j.content} ${fe&&style$1j.padded} ${ae&&style$1j.hide} ${ee&&style$1j.centralise}`,children:P}),!!me.length&&jsxRuntimeExports.jsx("div",{className:style$1j.footer,children:me.map(xe=>xe)})]})]},A)})},contextMenu="p7",open="YN",menuAnimation="Of",contextMenuItem="_9J",divider="kS",top$1="VT",bottom$1="Es",contextMenuButton="_0r",menuItemAnimation="yy",contextMenuBackdrop="n5",style$1h={contextMenu,open,menuAnimation,contextMenuItem,divider,top:top$1,bottom:bottom$1,contextMenuButton,menuItemAnimation,contextMenuBackdrop},UiContextMenu=()=>{const j=reactExports.useRef(null),[R,N]=reactExports.useState(!1),[A,M]=reactExports.useState(null),[z,H]=reactExports.useState({}),[G,ee]=reactExports.useState([]),P=()=>{R&&(N(!1),ee([]),M(null))},ne=(le,re)=>{le.preventDefault(),M(le),ee(re),N(!0)};reactExports.useEffect(()=>{if(!A)return;const{current:le}=j,{scrollHeight:re,scrollWidth:ie}=le,{clientY:se,clientX:de}=A,{innerHeight:ge,innerWidth:pe}=window,fe=se+re>=ge?ge-re-20:se,ve=de+ie>=pe?pe-ie-20:de;H({"--width":`${ie}px`,"--height":`${re}px`,"--top":`${fe}px`,"--left":`${ve}px`})},[A]),reactExports.useEffect(()=>(window.UiContextMenu={handleOpen:ne,handleClose:P},window.addEventListener("blur",P),document.body.addEventListener("mouseup",P),()=>{window.removeEventListener("blur",P),document.body.removeEventListener("mouseup",P)}),[]);const ae=`${style$1h.contextMenu} ${R&&style$1h.open}`;return R&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:style$1h.contextMenuBackdrop,onClick:P,onMouseDown:P}),jsxRuntimeExports.jsx("ul",{ref:j,className:ae,style:z,children:G.map(({content:le,contentIcon:re,contentTheme:ie,divider:se,fn:de},ge)=>jsxRuntimeExports.jsx("li",{className:`${style$1h.contextMenuItem} ${se&&`${style$1h.divider} ${style$1h[se]}`}`,children:jsxRuntimeExports.jsx("div",{style:{animationDelay:`${(ge+1)*.05}s`},className:style$1h.contextMenuButton,children:jsxRuntimeExports.jsx(UiButton,{size:"context",fullwidth:!0,icon:re,theme:ie,children:le,onClick:()=>[de&&de(),P()]})})},ge))})]})},useListen=(j,R,N=[])=>{reactExports.useEffect(()=>listen(j,R),N)},useListenWindow=(j,R,N=[])=>{reactExports.useEffect(()=>(window.addEventListener(j,R),()=>window.removeEventListener(j,R)),N)},storageWatcher=(j,R)=>{const[N,A]=reactExports.useState(j);return useListen(R,M=>{A({...M})}),N},usePreactStorage=()=>storageWatcher(getPreactStorage(),CONSTANT.EVENT_STORAGE_PREACT_UPDATE),useGlobalStorage=()=>storageWatcher(getStorage(),CONSTANT.EVENT_STORAGE_GLOBALS_UPDATE),wrap$3="_88",header$4="_7P",body$4="IF",style$1g={wrap:wrap$3,header:header$4,body:body$4},buttons$1="D2",style$1f={buttons:buttons$1},input$2="F-",isPlaceholder="wd",sharedStyle={input:input$2,isPlaceholder},UiInput=j=>{const[R,N]=reactExports.useState(j.defaultValue),A=reactExports.createRef(),M=Object.assign({},j,{className:`${sharedStyle.input} ${j.className}`,ref:A,autoComplete:j.autoComplete||"off"});delete M.defaultValue,delete M.onEnterKey,delete M.onInput,reactExports.useEffect(()=>{j.autoFocus&&setTimeout(()=>{const{current:G}=A;G&&(G.focus(),R&&G.select())},100)},[]);function z(G){N(G.target.value),j.onInput&&j.onInput(G)}function H(G){(G.key==="Enter"||G.keyCode===13)&&(j.onEnterKey&&j.onEnterKey(G),j.onKeyDown&&j.onKeyDown(G))}return jsxRuntimeExports.jsx("input",{...M,ref:A,defaultValue:R,onInput:z,onKeyDown:H})},UiFormRaw=j=>{const R=N=>{N.preventDefault();const{onSubmit:A}=j;A&&A(N)};return jsxRuntimeExports.jsx("form",{...Object.assign({},j,{onSubmit:R})})},AuthLoginForm=()=>{const{resetPasswordUrl:j,formActionUrl:R}=getPageStorage(),[N,A]=reactExports.useState(),[M,z]=reactExports.useState(),H=()=>{fetchPost(R,{username:N,password:M}).then(()=>{}).catch(()=>{})};return jsxRuntimeExports.jsxs(UiFormRaw,{onSubmit:H,children:[jsxRuntimeExports.jsx(UiInput,{placeholder:"Email",type:"email",autoFocus:!0,autoComplete:"username",defaultValue:N,onInput:({target:G})=>A(G.value)}),jsxRuntimeExports.jsx(UiInput,{placeholder:"Password",type:"password",autoComplete:"current-password",defaultValue:M,onInput:({target:G})=>z(G.value)}),jsxRuntimeExports.jsxs("div",{className:style$1f.buttons,children:[jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,type:"submit",disabled:!M||!N,children:"Continue"}),jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,title:j,onClick:()=>routeTo(`${j}`),children:"Reset password"})]})]})},AuthResetForm=()=>{const{authUrl:j,formActionUrl:R}=getPageStorage(),[N,A]=reactExports.useState(getQueryParameter("email"));function M(){fetchPost(R,{email:N}).then(()=>{}).catch(()=>{})}return jsxRuntimeExports.jsxs(UiFormRaw,{onSubmit:M,children:[jsxRuntimeExports.jsx("p",{children:"Reset your password"}),jsxRuntimeExports.jsx(UiInput,{placeholder:"Email",autoFocus:!0,defaultValue:N,onInput:({target:z})=>A(z.value)}),jsxRuntimeExports.jsxs("div",{className:style$1f.buttons,children:[jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,type:"submit",disabled:!N,children:"Reset my password"}),jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,onClick:()=>routeTo(j),children:"Cancel"})]})]})},style$1e={},AuthPasswordForm=()=>{const{formActionUrl:j,authUrl:R}=getPageStorage(),[N,A]=reactExports.useState(""),[M,z]=reactExports.useState(""),[H,G]=reactExports.useState(null),[ee,P]=reactExports.useState(null);reactExports.useEffect(()=>{G(getQueryParameter("t")),P(getQueryParameter("email"))},[]);function ne(){fetchPost(j,{email:ee,password:N,passwordAgain:M,hashToken:H}).then(()=>{}).catch(()=>{})}return jsxRuntimeExports.jsxs(UiFormRaw,{onSubmit:ne,children:[jsxRuntimeExports.jsxs("p",{children:["Enter a new password for ",jsxRuntimeExports.jsx("strong",{children:ee})]}),jsxRuntimeExports.jsx(UiInput,{placeholder:"New password",type:"password",autoFocus:!0,autoComplete:"new-password",defaultValue:N,onInput:({target:ae})=>A(ae.value)}),jsxRuntimeExports.jsx(UiInput,{placeholder:"Re-type new password",type:"password",autoComplete:"new-password",defaultValue:M,onInput:({target:ae})=>z(ae.value)}),jsxRuntimeExports.jsxs("div",{className:style$1e.buttons,children:[jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,type:"submit",disabled:!N||!M,children:"Save password & sign in"}),jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,onClick:()=>routeTo(R),children:"Cancel"})]})]})},buttons="UF",codeEntryInput="U3",style$1d={buttons,codeEntryInput},AuthTwoFactorForm=()=>{const{authUrl:j,sentToEmailAddress:R,formActionUrl:N}=getPageStorage(),[A,M]=reactExports.useState("");function z(){fetchPost(N,{code:A}).then(({preactUiNavUpdate:H})=>{H&&setStorage(G=>(G.preact.uiNav=H,G))}).catch(()=>{})}return jsxRuntimeExports.jsxs(UiFormRaw,{onSubmit:z,children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx("strong",{children:"Two Factor Authentication"})}),jsxRuntimeExports.jsxs("p",{children:["Please check your inbox ",R," and enter the 6 digit numerical code:"]}),jsxRuntimeExports.jsx(UiInput,{maxlength:6,type:"text",pattern:"[0-9]+",autoFocus:!0,className:style$1d.codeEntryInput,autoComplete:"one-time-code",onInput:({target:H})=>M(H.value)}),jsxRuntimeExports.jsxs("div",{className:style$1d.buttons,children:[jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,disabled:!A,type:"submit",children:"Verify & Sign in"}),jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,onClick:()=>routeTo(j),children:"Cancel"})]})]})},ViewAuthScreen=j=>{const{viewComponent:R}=getPageStorage(),{appName:N}=getStorage(),A={AuthLoginForm,AuthTwoFactorForm,AuthResetForm,AuthPasswordForm}[R]??null;return reactExports.useEffect(()=>(applyColorSchemeWithoutPersistence("dark"),()=>applyColorScheme()),[]),jsxRuntimeExports.jsxs("div",{className:style$1g.wrap,children:[jsxRuntimeExports.jsx("div",{className:style$1g.header,children:jsxRuntimeExports.jsx("h1",{children:N})}),jsxRuntimeExports.jsx("div",{className:style$1g.body,children:A&&jsxRuntimeExports.jsx(A,{...j})})]})},dashboard="Dn",content="-Z",style$1c={dashboard,content},TimeClock=()=>{const[j,R]=reactExports.useState(new Date);return reactExports.useEffect(()=>{const N=setInterval(()=>R(new Date),1e3);return()=>clearInterval(N)}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[j.toLocaleString("en-gb",{weekday:"long"}),",ย ",`${String(j.getHours()).padStart(2,"0")}:${String(j.getMinutes()).padStart(2,"0")}`]})},modalWindowWhatsNew="Gg",list$3="up",listTitle="Hs",listType="_7i",listText="Bt",typeNew="YC",typeImprovement="-i",typeFixed="_8z",whatsNewStyle={modalWindowWhatsNew,list:list$3,listTitle,listType,listText,typeNew,typeImprovement,typeFixed},UiWhatsNew=({changelog:j})=>{const[R,N]=reactExports.useState(0),A=(z,H,G)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:`${whatsNewStyle.listType} ${G}`,children:jsxRuntimeExports.jsx("h5",{children:z})}),H.map((ee,P)=>jsxRuntimeExports.jsx("div",{className:whatsNewStyle.listText,children:ee},P))]}),M=(z,H)=>{const G=`${whatsNewStyle.listTitle} ${R===H&&whatsNewStyle.active}`,{new:ee,improvements:P,fixed:ne,version:ae}=z;return jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("div",{className:G,onClick:()=>N(H),children:jsxRuntimeExports.jsx("h3",{children:`${H===0?`${ae} (latest)`:ae}`})}),ee&&R===H&&A("New",ee,whatsNewStyle.typeNew),P&&R===H&&A("Improved",P,whatsNewStyle.typeImprovement),ne&&R===H&&A("Fixed",ne,whatsNewStyle.typeFixed)]},H)};return jsxRuntimeExports.jsx("ul",{className:whatsNewStyle.list,children:j.map(M)})},showWhatsNewModal=j=>()=>{const R=new FluentModal().affirmText("Close").useWindowClassName(whatsNewStyle.modalWindowWhatsNew).title("What's New").cancelText(!1).asyncDispatch();fetchJson(j).then(N=>R(jsxRuntimeExports.jsx(UiWhatsNew,{changelog:N})))},ViewDashboard=()=>{const{welcomeHtml:j,changelogApiUrl:R}=getPageStorage();return jsxRuntimeExports.jsx("div",{className:style$1c.dashboard,children:jsxRuntimeExports.jsxs("div",{className:style$1c.content,children:[jsxRuntimeExports.jsx("h1",{children:jsxRuntimeExports.jsx(TimeClock,{})}),jsxRuntimeExports.jsx("div",{style:{margin:"30px auto",maxWidth:"330px"},dangerouslySetInnerHTML:{__html:j}}),jsxRuntimeExports.jsx(UiButton,{icon:"box",children:"See what's new",theme:"optimistic",onClick:showWhatsNewModal(R)})]})})},contain$d="w8",modalMode="wr",style$1b={contain:contain$d,modalMode},nav$1="hA",modalModeNav="_9M",style$1a={nav:nav$1,modalModeNav},breadcrumbContainer="Bf",breadcrumbScroller="WW",shadow="BN",style$19={breadcrumbContainer,breadcrumbScroller,shadow},UiFileFinderContext=reactExports.createContext({}),FileFinderProvider=UiFileFinderContext.Provider,FFHBBreadcrumbs=()=>{const{currentPath:j,refresh:R}=reactExports.useContext(UiFileFinderContext);if(!j)return;const N=j.split("/").filter(z=>!!z),A=reactExports.useRef(),M=()=>A.current.scrollLeft=A.current.scrollWidth;return reactExports.useEffect(()=>{M();const z=A.current,H=()=>{z.scrollLeft===0?z.parentNode.classList.remove(style$19.shadow):z.parentNode.classList.add(style$19.shadow)};return z.addEventListener("scroll",H),H(),()=>{z.removeEventListener("scroll",H)}},[]),jsxRuntimeExports.jsxs("div",{className:style$19.breadcrumbContainer,children:[jsxRuntimeExports.jsx(UiButton,{children:jsxRuntimeExports.jsx(Icon,{icon:"hard-drive"}),onClick:()=>R("/"),size:"small",title:"Navigate to root folder"}),jsxRuntimeExports.jsx("div",{className:style$19.breadcrumbScroller,ref:A,children:N.map((z,H)=>{const G=`/${N.filter((ee,P)=>P<=H).join("/")}`;return jsxRuntimeExports.jsx(UiButton,{children:z,onClick:()=>R(G),size:"small"},H)})})]})},ffUploadList="j-",slideIn="Aq",header$3="kB",list$2="mf",listItem="_7g",error$2="aq",done$1="td",cancelled="_1H",listItemText="pR",listItemTitle="_5A",listItemTargetPath="BZ",listItemIcon="CK",uploadButtonWrap="uM",backdrop="aN",fadeIn$1="fR",style$18={ffUploadList,slideIn,header:header$3,list:list$2,listItem,error:error$2,done:done$1,cancelled,listItemText,listItemTitle,listItemTargetPath,listItemIcon,uploadButtonWrap,backdrop,fadeIn:fadeIn$1},FFUploadContext=reactExports.createContext({}),FFUploadProvider=FFUploadContext.Provider,progress="pk",done="h-",warn="Aw",progress2="OR",style$17={progress,done,warn,progress2},UiProgressBar=({currentInt:j,targetInt:R,theme:N})=>{function A(){return R===0&&j===0?100:j===0?5:j/R*100}const M=`${style$17.progress} ${N&&style$17[N]} ${A()===100&&style$17.done}`;return jsxRuntimeExports.jsx("div",{className:M,children:jsxRuntimeExports.jsx("span",{style:{width:`${A()}%`}})})},FFUploadList=()=>{const{filesInQueue:j,filesProcessed:R,totalFilesLength:N,queueIsEmpty:A,cancelAllUploads:M,cancelUploadAtIndex:z,hideListSidebar:H}=reactExports.useContext(FFUploadContext),G=(P,ne)=>{let ae,le="";P.error?(ae=jsxRuntimeExports.jsx(Icon,{icon:"slash"}),le="error"):P.cancelled?(ae=jsxRuntimeExports.jsx(Icon,{icon:"slash"}),le="cancelled"):P.done?(ae=jsxRuntimeExports.jsx(Icon,{icon:"check"}),le="done"):ae=jsxRuntimeExports.jsx(Icon,{icon:"arrow-up"});const re=P.actualFile,ie=!P.done&&!P.cancelled,se=P.done?"Uploaded":P.cancelled?"Cancelled":ne===0?"Uploading...":"Queued";return jsxRuntimeExports.jsxs("li",{className:`${style$18.listItem} ${le&&style$18[le]}`,children:[jsxRuntimeExports.jsx("div",{className:style$18.listItemIcon,children:ae}),jsxRuntimeExports.jsxs("div",{className:style$18.listItemText,children:[jsxRuntimeExports.jsx("p",{className:style$18.listItemTitle,children:jsxRuntimeExports.jsx("strong",{children:re.name})}),jsxRuntimeExports.jsxs("p",{className:style$18.listItemTargetPath,children:[jsxRuntimeExports.jsx(Icon,{icon:"folder"})," ",jsxRuntimeExports.jsx("i",{children:P.targetPath})]}),jsxRuntimeExports.jsx("p",{className:style$18.listItemStatusText,children:P.error||se})]}),ie&&jsxRuntimeExports.jsx("div",{className:style$18.listItemIcon,children:jsxRuntimeExports.jsx(UiButton,{size:"small",icon:"x",title:"Cancel",onClick:()=>z(ne)})})]},P.key)},ee=(P,ne)=>P.cancelled===ne.cancelled?0:P.cancelled?-1:1;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:style$18.backdrop,onClick:H}),jsxRuntimeExports.jsxs("div",{className:style$18.ffUploadList,children:[jsxRuntimeExports.jsx("div",{className:style$18.header,children:jsxRuntimeExports.jsx("h2",{children:A?"Recently uploaded":jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("span",{children:["Uploading files ",jsxRuntimeExports.jsxs("strong",{children:[R.length+1," / ",N]})]}),jsxRuntimeExports.jsx(UiProgressBar,{currentInt:R.length,targetInt:N})]})})}),jsxRuntimeExports.jsxs("ul",{className:style$18.list,children:[j.map(G),R.sort(ee).map(G)]}),!A&&jsxRuntimeExports.jsx("div",{className:style$18.uploadButtonWrap,children:jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,icon:"x",children:"Cancel all",onClick:M})})]})]})},interpolateUrl=(j,R)=>j.replace(/{(\w+)}/g,(N,A)=>R[A]);function getFileError(j){return j.size>1024*1024*50?"File size too large":!1}function uploadFile(j,R,N){const A=new FormData;A.append(CONSTANT.FILE_UPLOAD_KEY,j.actualFile);const M=new AbortController,z=M.signal,H={method:"POST",body:A,signal:z};let G;const{ffUploadUrl:ee}=getStorage(),P=interpolateUrl(ee,{path:j.targetPath});return fetch(P,H).then(ne=>(G=ne,ne.json())).then(ne=>{delegateResponseObjects(ne),G.status>=200&&G.status<=299?R():N(ne[CONSTANT.RESPONSE_PROPERTY_CONTENT].text)}),()=>M.abort()}const tabWindow="_1X",header$2="iS",headerText="hr",style$16={tabWindow,header:header$2,headerText},FFTabBox=()=>{const{setShowList:j,queueIsEmpty:R,errorsInProcessed:N,collapsed:A,doneText:M,filesProcessed:z,totalFilesLength:H}=reactExports.useContext(FFUploadContext);return jsxRuntimeExports.jsxs("div",{className:style$16.tabWindow,onClick:()=>j(!0),title:"Uploads",children:[jsxRuntimeExports.jsxs("div",{className:style$16.header,children:[jsxRuntimeExports.jsx(Icon,{icon:R?N?"alert-triangle":"check":"upload"}),!A&&jsxRuntimeExports.jsx("span",{className:style$16.headerText,children:R?M:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Uploading files ",jsxRuntimeExports.jsxs("strong",{children:[z.length+1," / ",H]})]})})]}),jsxRuntimeExports.jsx(UiProgressBar,{theme:N?"warn":"",currentInt:z.length,targetInt:H})]})};let key=0;const uid=()=>9000001+key++,FFInput=()=>{const{setFilesInQueue:j,filesInQueue:R,inputRef:N,targetPath:A}=reactExports.useContext(FFUploadContext),M=z=>{const{files:H}=z.target;if(H.length){let G=[];Array.from(H).forEach(ee=>{G.push({key:uid(),actualFile:ee,targetPath:A,error:getFileError(ee)})}),j([...R,...G.reverse()]),z.target.value=""}};return jsxRuntimeExports.jsx("input",{type:"file",ref:N,onChange:M,multiple:"multiple",style:{display:"none"}})};let spawnUploadFileModal=()=>{},fetchAbortFn=()=>{};const FFUpload=({collapsed:j})=>{const[R,N]=reactExports.useState([]),[A,M]=reactExports.useState([]),[z,H]=reactExports.useState(!1),[G,ee]=reactExports.useState(!1),[P,ne]=reactExports.useState("/"),ae=reactExports.useRef(null),le=R.length+A.length,re=!R.length,ie=!!le,se=re&&!!A.filter($e=>$e.error).length,de=se?"Uploads with errors":"Uploads complete",ge=$e=>{ne($e),ae.current.click()},pe=($e,Me=null)=>{const Le=R[$e];Me&&Me(Le),M(He=>[...He,Le]),N(He=>(He.splice($e,1),[...He]))},fe=()=>{fetchAbortFn(),ee(!1)},ve=$e=>{$e===0&&fe(),pe($e,Me=>Me.cancelled=!0)},je=()=>{fe(),N([]),M([]),H(!1),spawnNotification({text:"Uploading cancelled",icon:"cloud-off",theme:"info"})},me=()=>{H(!1),re&&(N([]),M([]))},xe=()=>{spawnNotification({text:"Upload queue finished",theme:"info",icon:"check"}),document.body.dispatchEvent(new Event("file-queue-done"))},Re=()=>{if(!G&&R.length){ee(!0);const $e=R[0],Me=()=>{ee(!1),pe(0,Ke=>Ke.done=!0)};fetchAbortFn=uploadFile($e,()=>{Me()},Ke=>{$e.error=Ke,Me()})}!R.length&&A.length&&xe()};reactExports.useEffect(Re,[R]),reactExports.useEffect(()=>(spawnUploadFileModal=ge,()=>spawnUploadFileModal=null),[]);const Ne={cancelAllUploads:je,cancelUploadAtIndex:ve,hideListSidebar:me,collapsed:j,doneText:de,errorsInProcessed:se,filesInQueue:R,filesProcessed:A,inputRef:ae,queueIsEmpty:re,setFilesInQueue:N,setShowList:H,targetPath:P,totalFilesLength:le};return jsxRuntimeExports.jsxs(FFUploadProvider,{value:Ne,children:[jsxRuntimeExports.jsx(FFInput,{}),ie&&z&&jsxRuntimeExports.jsx(FFUploadList,{}),ie&&jsxRuntimeExports.jsx(FFTabBox,{})]})};let currentPathBugFix;const FFHBUploadButton=()=>{const{currentPath:j,modalMode:R}=reactExports.useContext(UiFileFinderContext),{ffUploadUrl:N}=getStorage();return N&&(useActionListener(CONSTANT.ACTION_BUTTON_UPLOAD_FILE,()=>{spawnUploadFileModal(currentPathBugFix)}),reactExports.useEffect(()=>{currentPathBugFix=j},[j])),R&&N&&jsxRuntimeExports.jsx(UiButton,{onClick:()=>spawnUploadFileModal(j),size:"small",icon:"upload-cloud",theme:"primary",children:"Upload"})};class FluentContextMenuItem{text(R){return this.content=R,this}onSelect(R){return this.fn=R,this}icon(R){return this.contentIcon=R,this}theme(R){return this.contentTheme=R,this}}class FluentContextMenu{constructor(R){return this.options={event:R,items:[]},this}button(R=null){const N=new FluentContextMenuItem;return this.options.items.push(N),R&&N.text(R),N}divider(){const R=this.options.items[this.options.items.length-1];return R&&(R.divider="bottom"),this}dispatch(){const{event:R,items:N}=this.options,{UiContextMenu:A}=window;return A.handleOpen(R,N),this}}const getIndexOfIdItemInArray=(j,R)=>{let N=-1;return R.forEach((A,M)=>{A.id===j&&(N=M)}),N},toggleItemInArray=(j,R)=>{let N=getIndexOfIdItemInArray(j.id,R);N!==-1?R.splice(N,1):R.push(j)},isItemIn=(j,R)=>getIndexOfIdItemInArray(j.id,R)!==-1,useFFOnMount=({refresh:j,currentPath:R,showUploadOnMount:N})=>{const A=()=>j();reactExports.useEffect(()=>{A(),N&&spawnUploadFileModal(R);const M="file-queue-done";return document.body.addEventListener(M,A),()=>document.body.removeEventListener(M,A)},[])},folder$1="Cp",selectedPath="nR",style$15={interface:"CL",folder:folder$1,selectedPath},loader="ZN",style$14={loader},UiLoader=({size:j})=>jsxRuntimeExports.jsx("div",{className:style$14.loader,style:{fontSize:`${j||20}px`}}),Folder=function({name:j,path:R,subs:N,selectedPath:A,setSelectedPathFn:M,onSelect:z}){const[H,G]=reactExports.useState(!1),ee=`${R}/${j}`.replace("//","/"),P=ne=>{M(ee),z(ee),G(!0)};return jsxRuntimeExports.jsxs("div",{className:style$15.folder,children:[jsxRuntimeExports.jsx(UiButton,{icon:"folder",size:"small",theme:A===ee?"primary":!1,children:j,fullwidth:!0,onClick:P}),!!N.length&&H&&jsxRuntimeExports.jsx("ul",{children:N.map((ne,ae)=>reactExports.createElement(Folder,{...ne,setSelectedPathFn:M,selectedPath:A,onSelect:z,key:ae}))})]})},FFDirectorySelector=({onSelect:j})=>{const[R,N]=reactExports.useState("/"),[A,M]=reactExports.useState([]),[z,H]=reactExports.useState(!1),{ffDirectoryTreeUrl:G}=getStorage();return reactExports.useEffect(()=>{fetchJson(G).then(ee=>[M(ee),j(R),H(!0)])},[]),jsxRuntimeExports.jsxs("div",{className:style$15.interface,children:[jsxRuntimeExports.jsx(UiButton,{children:"Root",icon:"server",size:"small",fullwidth:!0,disabled:["/",!1].includes(R),onClick:()=>[N("/"),j("/")]}),!z&&jsxRuntimeExports.jsx(UiLoader,{}),A.map((ee,P)=>reactExports.createElement(Folder,{...ee,onSelect:j,setSelectedPathFn:N,selectedPath:R,key:P})),jsxRuntimeExports.jsx("div",{className:style$15.selectedPath,children:R||jsxRuntimeExports.jsx("span",{children:"Select a path"})})]})};function spawnPromptForDirectory(j){let R=null;new FluentModal().title("Choose a folder").persistAffirm().onAffirm(()=>j(R)).content(jsxRuntimeExports.jsx(FFDirectorySelector,{onSelect:N=>R=N})).dispatch()}function FFHeaderBarContextMenu({e:j,fileFinderContext:R}){const{entries:N,checkedItems:A,setCheckedItems:M,refresh:z,purgeItems:H,currentPath:G}=R,ee=A.map(de=>de.id),{ffMoveUrl:P,ffDeleteUrl:ne,ffCreateDirUrl:ae}=getStorage(),le=new FluentContextMenu(j),re=P&&A.length;re&&le.button(`Move ${A.length} items`).icon("truck").onSelect(()=>{spawnPromptForDirectory(de=>{const ge={path:de,ids:ee.join(",")};fetchPost(P,ge).then(()=>FluentModal.dismissOne()&&z()).catch(()=>{})})});const ie=ne&&A.length;ie&&le.button(`Delete ${A.length} items`).icon("trash").theme("concern").onSelect(()=>{new FluentModal().alert(`Delete selected ${length>1?`${length} files`:"file"}?`).affirmTheme("concern").affirmText("Yes, delete").onAffirm(de=>{fetchPost(ne,{ids:ee.join(",")}).then(()=>{z(),H(A),de()}).catch(()=>{})}).dispatch()}),(re||ie)&&le.divider(),A.length{N.forEach(de=>{isItemIn(de,A)||A.push(de)}),M(()=>[...A])}),A.length>0&&le.button("Deselect all").icon("x-square").onSelect(()=>{M([])});let se="";ae&&(le.divider(),le.button("New folder").icon("folder-plus").onSelect(()=>{const de=()=>{fetchPost(ae,{currentPath:G,folderName:se}).then(()=>{FluentModal.dismissOne(),z()}).catch(()=>{})};new FluentModal().alert("Create folder").onAffirm(de).content(jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(UiInput,{autoFocus:1,onEnterKey:()=>de(),placeholder:"Folder Name",onChange:ge=>se=ge.target.value})})).dispatch()})),le.dispatch()}const reviewButton="_58",style$13={reviewButton},thumbnailContain$1="Zd",isDir="dx",image="D4",extension="FI",missing="QJ",previewNotAvailable="kF",previewBackground="VI",style$12={thumbnailContain:thumbnailContain$1,isDir,image,extension,missing,previewNotAvailable,previewBackground},folder="f6",darkMode="V5",style$11={folder,darkMode},FFFolderIcon=()=>jsxRuntimeExports.jsx("div",{className:`${style$11.folder} ${useIsDarkMode()&&style$11.darkMode}`}),lazyLoad="XH",fadeIn="Ho",isLoaded="Wu",style$10={lazyLoad,fadeIn,isLoaded},LazyLoadImage=j=>{const R=reactExports.useRef(null),[N,A]=reactExports.useState(!1),[M,z]=reactExports.useState(!1);reactExports.useEffect(()=>{const ee=new IntersectionObserver(P=>{P.forEach(ne=>{ne.isIntersecting&&(A(!0),ee.unobserve(ne.target))})},{root:null,rootMargin:"0px",threshold:.1});return R.current&&ee.observe(R.current),()=>{R.current&&ee.unobserve(R.current)}},[]);const H=()=>{z(!0)},G=()=>{const{className:ee}=j;let P=style$10.lazyLoad;return N&&(P+=` ${style$10.fadeIn}`),M&&(P+=` ${style$10.isLoaded}`),ee&&(P+=` ${ee}`),P};return jsxRuntimeExports.jsx("img",{ref:R,src:N?j.src:void 0,...j,className:G(),onLoad:H})},showImagePreview=j=>{new FluentModal().fullscreen().cancelText(!1).affirmText("Close").title(j).centraliseContent().usePadding(!1).content(j.endsWith(".heic")||j.endsWith(".heif")?jsxRuntimeExports.jsx("h3",{className:style$12.previewNotAvailable,children:"Preview not available"}):jsxRuntimeExports.jsx("div",{className:style$12.previewBackground,children:jsxRuntimeExports.jsx(LazyLoadImage,{src:j,alt:j})})).dispatch()},FFThumbnail=({item:j})=>{const{isDir:R,isImage:N,isMissing:A,extension:M,thumbnailUrl:z,masterFileUrl:H}=j,G={};return R||(G["data-disable-click"]=""),jsxRuntimeExports.jsx("div",{className:`${style$12.thumbnailContain} ${R?style$12.isDir:""}`,...G,children:R?jsxRuntimeExports.jsx(FFFolderIcon,{}):A?jsxRuntimeExports.jsx("span",{className:style$12.missing,children:jsxRuntimeExports.jsx(Icon,{icon:"alert-triangle"})}):N?jsxRuntimeExports.jsx(LazyLoadImage,{src:z,className:style$12.image,alt:H,onClick:()=>showImagePreview(H)}):jsxRuntimeExports.jsx("span",{className:style$12.extension,children:M})})},FFHBReviewButton=()=>{const{selectedItems:j,refresh:R}=reactExports.useContext(UiFileFinderContext),N=j[0]??!1,A=()=>{const{path:M}=N;R(M)};return N&&jsxRuntimeExports.jsx(UiButton,{onClick:A,size:"small",theme:"primary",title:"Selected item",className:style$13.reviewButton,children:jsxRuntimeExports.jsx(FFThumbnail,{item:N})})},FFHeaderBar=()=>{const j=reactExports.useContext(UiFileFinderContext),R=A=>FFHeaderBarContextMenu({e:A,fileFinderContext:j}),{modalMode:N}=j;return jsxRuntimeExports.jsxs("div",{className:`${style$1a.nav} ${N&&style$1a.modalModeNav}`,children:[jsxRuntimeExports.jsx(UiButton,{icon:"more-horizontal",size:"small",onClick:R}),jsxRuntimeExports.jsx(FFHBBreadcrumbs,{}),jsxRuntimeExports.jsx(FFHBReviewButton,{}),jsxRuntimeExports.jsx(FFHBUploadButton,{})]})},contain$c="CQ",style$$={contain:contain$c},ul="_3s",modalModePointer="Ld",checked$1="x-",selected$2="Se",unavailable="yJ",pointer="Mb",check="Pe",detail="sN",size="_6u",date="Rz",style$_={ul,modalModePointer,checked:checked$1,selected:selected$2,unavailable,pointer,check,detail,size,date},contain$b="ib",primary="-k",checkbox="i7",checked="lX",label$1="au",helpText="-D",style$Z={contain:contain$b,primary,checkbox,checked,label:label$1,helpText},title$1="BS",text$1="pW",style$Y={title:title$1,text:text$1},UiCheckBox=j=>{const[R,N]=reactExports.useState(j.defaultChecked||j.syncChecked),{helpText:A}=j,M=j.hasOwnProperty("syncChecked")?"sync":"default";function z(){const{onCheckChange:ne}=j;M==="sync"&&ne?ne(!ee()):(N(!R),ne&&ne(!R))}function H(ne){(ne.key===" "||ne.key==="Enter")&&(z(),ne.preventDefault())}function G(){const{size:ne,theme:ae}=j;let le=style$Z.contain;return ne&&(le+=` ${style$Z[ne]}`),ae&&(le+=` ${style$Z[ae]}`),ee()&&(le+=` ${style$Z.checked}`),le}function ee(){const{syncChecked:ne}=j;return M==="sync"?ne:R}const P=j.children||j.placeholder;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("label",{className:G(),onClick:z,onKeyDown:H,tabIndex:0,children:[jsxRuntimeExports.jsx("span",{className:style$Z.checkbox,children:jsxRuntimeExports.jsx(Icon,{icon:"check"})}),P&&jsxRuntimeExports.jsx("span",{className:style$Z.label,children:P})]}),A&&jsxRuntimeExports.jsx("p",{className:`${style$Z.helpText} ${style$Y.text}`,children:A})]})};function ffItemContextMenu({e:j,item:R,refresh:N,purgeItems:A}){const{isDir:M,originalFileName:z,masterFileUrl:H,path:G,thumbnailUrl:ee,id:P}=R,ne=new FluentContextMenu(j),{ffRenameUrl:ae,ffMoveUrl:le,ffDeleteUrl:re}=getStorage();M||(ne.button().text(`Open ${ee?"image ":""}in new tab`).onSelect(()=>window.open(H,"blank")),ne.divider()),le&&ne.button().text(`Move "${z}"`).onSelect(()=>{spawnPromptForDirectory(ie=>{fetchPost(le,{ids:P,path:ie}).then(()=>{N(),FluentModal.dismissOne()}).catch(()=>{})})}),ae&&ne.button().text(`Rename "${z}"`).onSelect(()=>{let ie=z.substring(0,z.lastIndexOf("."))||z;const se=()=>{fetchPost(ae,{id:P,newName:ie,path:G}).then(()=>{N(),FluentModal.dismissOne()}).catch(()=>{})};new FluentModal().alert(`Rename ${z}`).onAffirm(se).content(jsxRuntimeExports.jsx(UiInput,{autoFocus:!0,defaultValue:ie,onEnterKey:se,onInput:de=>ie=de.target.value})).dispatch()}),ae&&le&&re&&ne.divider(),re&&ne.button().text("Delete").theme("concern").icon("trash").onSelect(()=>{new FluentModal().alert(`Delete ${z}?`).affirmTheme("concern").affirmText("Yes, delete").onAffirm(ie=>fetchPost(re,{ids:P}).then(()=>{N(),A([R]),ie()}).catch(()=>{})).dispatch()}),ne.dispatch()}const FFSelectCheck=({checked:j,onClick:R})=>jsxRuntimeExports.jsx(UiCheckBox,{theme:"primary",onCheckChange:R,syncChecked:j}),FFListingItem=({item:j})=>{const{currentPath:R,selectedItems:N,checkedItems:A,setCheckedItems:M,enableSelection:z,handleToggleItemSelect:H,refresh:G,purgeItems:ee,extensionsAllowed:P,modalMode:ne}=reactExports.useContext(UiFileFinderContext),{isMobile:ae}=useMobileMediaQuery(),le=je=>getIndexOfIdItemInArray(je.id,A)!==-1,re=je=>getIndexOfIdItemInArray(je.id,N)!==-1,ie=je=>getIndexOfIdItemInArray(je.id,A)!==-1,se=je=>ffItemContextMenu({item:j,e:je,refresh:G,purgeItems:ee}),de=je=>!P||P.includes(je.extension),ge=je=>{toggleItemInArray(je,A),M(()=>[...A])},pe=je=>{de(je)?H(je):new FluentModal().alert("This file extension is not accepted").dispatch()},fe=je=>{if(!je.target.closest("[data-disable-click]"))if(j.isDir){const me=`${R}/${j.originalFileName}`.replace("//","/");G(me)}else z&&H(j)},ve=je=>{let me=style$_.ul;return le(je)&&(me+=` ${style$_.checked}`),re(je)&&(me+=` ${style$_.selected}`),je.isMissing&&(me+=` ${style$_.unavailable}`),!de(je)&&!je.isDir&&(me+=` ${style$_.unavailable}`),je.isDir&&(me+=` ${style$_.pointer}`),ne&&(me+=` ${style$_.modalModePointer}`),me};return jsxRuntimeExports.jsxs("ul",{className:ve(j),onClick:fe,onContextMenu:se,children:[jsxRuntimeExports.jsx("li",{className:style$_.check,"data-disable-click":"",children:jsxRuntimeExports.jsx(UiCheckBox,{syncChecked:ie(j),onCheckChange:()=>ge(j)})}),jsxRuntimeExports.jsx("li",{className:style$_.thumbnail,children:jsxRuntimeExports.jsx(FFThumbnail,{item:j})}),jsxRuntimeExports.jsxs("li",{className:style$_.detail,children:[z&&!j.isDir&&jsxRuntimeExports.jsx("div",{"data-disable-click":"",children:jsxRuntimeExports.jsx(FFSelectCheck,{checked:re(j),onClick:()=>pe(j)})}),j.originalFileName]}),!j.isMissing&&j.size&&!ae&&jsxRuntimeExports.jsx("li",{className:style$_.size,children:j.size}),!ae&&jsxRuntimeExports.jsx("li",{className:style$_.date,children:j.datePretty}),jsxRuntimeExports.jsx("li",{"data-disable-click":"",children:jsxRuntimeExports.jsx(UiButton,{icon:"more-vertical",onClick:se})})]})},emptyContain="hV",nothingToShow="B4",icon="OW",style$X={emptyContain,nothingToShow,icon},FFEmptyListing=()=>jsxRuntimeExports.jsxs("div",{className:style$X.emptyContain,children:[jsxRuntimeExports.jsx("div",{className:style$X.icon,children:jsxRuntimeExports.jsx(Icon,{icon:"moon"})}),jsxRuntimeExports.jsx("p",{className:style$X.nothingToShow,children:"No files to display"})]}),FFListing=()=>{const{entries:j,loadedOnce:R}=reactExports.useContext(UiFileFinderContext),N=(j||[]).sort((A,M)=>A.isDir===M.isDir?0:A.isDir?-1:1);return R&&jsxRuntimeExports.jsx("div",{className:style$$.contain,children:N.length?N.map((A,M)=>jsxRuntimeExports.jsx(FFListingItem,{item:A},M)):jsxRuntimeExports.jsx(FFEmptyListing,{})})||""};var dist={exports:{}};function ownKeys(j,R){var N=Object.keys(j);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(j);R&&(A=A.filter(function(M){return Object.getOwnPropertyDescriptor(j,M).enumerable})),N.push.apply(N,A)}return N}function _objectSpread2(j){for(var R=1;R=0)&&(N[M]=j[M]);return N}function _objectWithoutProperties(j,R){if(j==null)return{};var N=_objectWithoutPropertiesLoose(j,R),A,M;if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(j);for(M=0;M=0)&&Object.prototype.propertyIsEnumerable.call(j,A)&&(N[A]=j[A])}return N}function _toConsumableArray(j){return _arrayWithoutHoles(j)||_iterableToArray(j)||_unsupportedIterableToArray(j)||_nonIterableSpread()}function _arrayWithoutHoles(j){if(Array.isArray(j))return _arrayLikeToArray(j)}function _iterableToArray(j){if(typeof Symbol<"u"&&j[Symbol.iterator]!=null||j["@@iterator"]!=null)return Array.from(j)}function _unsupportedIterableToArray(j,R){if(j){if(typeof j=="string")return _arrayLikeToArray(j,R);var N=Object.prototype.toString.call(j).slice(8,-1);if(N==="Object"&&j.constructor&&(N=j.constructor.name),N==="Map"||N==="Set")return Array.from(j);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return _arrayLikeToArray(j,R)}}function _arrayLikeToArray(j,R){(R==null||R>j.length)&&(R=j.length);for(var N=0,A=new Array(R);N"&&(R=R.substring(1)),j)try{if(j.matches)return j.matches(R);if(j.msMatchesSelector)return j.msMatchesSelector(R);if(j.webkitMatchesSelector)return j.webkitMatchesSelector(R)}catch{return!1}return!1}}function getParentOrHost(j){return j.host&&j!==document&&j.host.nodeType?j.host:j.parentNode}function closest(j,R,N,A){if(j){N=N||document;do{if(R!=null&&(R[0]===">"?j.parentNode===N&&matches(j,R):matches(j,R))||A&&j===N)return j;if(j===N)break}while(j=getParentOrHost(j))}return null}var R_SPACE=/\s+/g;function toggleClass(j,R,N){if(j&&R)if(j.classList)j.classList[N?"add":"remove"](R);else{var A=(" "+j.className+" ").replace(R_SPACE," ").replace(" "+R+" "," ");j.className=(A+(N?" "+R:"")).replace(R_SPACE," ")}}function css$1(j,R,N){var A=j&&j.style;if(A){if(N===void 0)return document.defaultView&&document.defaultView.getComputedStyle?N=document.defaultView.getComputedStyle(j,""):j.currentStyle&&(N=j.currentStyle),R===void 0?N:N[R];!(R in A)&&R.indexOf("webkit")===-1&&(R="-webkit-"+R),A[R]=N+(typeof N=="string"?"":"px")}}function matrix(j,R){var N="";if(typeof j=="string")N=j;else do{var A=css$1(j,"transform");A&&A!=="none"&&(N=A+" "+N)}while(!R&&(j=j.parentNode));var M=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return M&&new M(N)}function find(j,R,N){if(j){var A=j.getElementsByTagName(R),M=0,z=A.length;if(N)for(;M=z,!H)return A;if(A===getWindowScrollingElement())break;A=getParentAutoScrollElement(A,!1)}return!1}function getChild(j,R,N,A){for(var M=0,z=0,H=j.children;z2&&arguments[2]!==void 0?arguments[2]:{},M=A.evt,z=_objectWithoutProperties(A,_excluded);PluginManager.pluginEvent.bind(Sortable)(R,N,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:M,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(G){_dispatchEvent({sortable:N,name:G,originalEvent:M})}},z))};function _dispatchEvent(j){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},j))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=(function(){if(documentExists){if(IE11OrLess)return!1;var j=document.createElement("x");return j.style.cssText="pointer-events:auto",j.style.pointerEvents==="auto"}})(),_detectDirection=function(R,N){var A=css$1(R),M=parseInt(A.width)-parseInt(A.paddingLeft)-parseInt(A.paddingRight)-parseInt(A.borderLeftWidth)-parseInt(A.borderRightWidth),z=getChild(R,0,N),H=getChild(R,1,N),G=z&&css$1(z),ee=H&&css$1(H),P=G&&parseInt(G.marginLeft)+parseInt(G.marginRight)+getRect(z).width,ne=ee&&parseInt(ee.marginLeft)+parseInt(ee.marginRight)+getRect(H).width;if(A.display==="flex")return A.flexDirection==="column"||A.flexDirection==="column-reverse"?"vertical":"horizontal";if(A.display==="grid")return A.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(z&&G.float&&G.float!=="none"){var ae=G.float==="left"?"left":"right";return H&&(ee.clear==="both"||ee.clear===ae)?"vertical":"horizontal"}return z&&(G.display==="block"||G.display==="flex"||G.display==="table"||G.display==="grid"||P>=M&&A[CSSFloatProperty]==="none"||H&&A[CSSFloatProperty]==="none"&&P+ne>M)?"vertical":"horizontal"},_dragElInRowColumn=function(R,N,A){var M=A?R.left:R.top,z=A?R.right:R.bottom,H=A?R.width:R.height,G=A?N.left:N.top,ee=A?N.right:N.bottom,P=A?N.width:N.height;return M===G||z===ee||M+H/2===G+P/2},_detectNearestEmptySortable=function(R,N){var A;return sortables.some(function(M){var z=M[expando].options.emptyInsertThreshold;if(!(!z||lastChild(M))){var H=getRect(M),G=R>=H.left-z&&R<=H.right+z,ee=N>=H.top-z&&N<=H.bottom+z;if(G&&ee)return A=M}}),A},_prepareGroup=function(R){function N(z,H){return function(G,ee,P,ne){var ae=G.options.group.name&&ee.options.group.name&&G.options.group.name===ee.options.group.name;if(z==null&&(H||ae))return!0;if(z==null||z===!1)return!1;if(H&&z==="clone")return z;if(typeof z=="function")return N(z(G,ee,P,ne),H)(G,ee,P,ne);var le=(H?G:ee).options.group.name;return z===!0||typeof z=="string"&&z===le||z.join&&z.indexOf(le)>-1}}var A={},M=R.group;(!M||_typeof(M)!="object")&&(M={name:M}),A.name=M.name,A.checkPull=N(M.pull,!0),A.checkPut=N(M.put),A.revertClone=M.revertClone,R.group=A},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css$1(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css$1(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(j){if(ignoreNextClick)return j.preventDefault(),j.stopPropagation&&j.stopPropagation(),j.stopImmediatePropagation&&j.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function(R){if(dragEl){R=R.touches?R.touches[0]:R;var N=_detectNearestEmptySortable(R.clientX,R.clientY);if(N){var A={};for(var M in R)R.hasOwnProperty(M)&&(A[M]=R[M]);A.target=A.rootEl=N,A.preventDefault=void 0,A.stopPropagation=void 0,N[expando]._onDragOver(A)}}},_checkOutsideTargetEl=function(R){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(R.target)};function Sortable(j,R){if(!(j&&j.nodeType&&j.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(j));this.el=j,this.options=R=_extends({},R),j[expando]=this;var N={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(j.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(j,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(H,G){H.setData("Text",G.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:Sortable.supportPointer!==!1&&"PointerEvent"in window&&(!Safari||IOS),emptyInsertThreshold:5};PluginManager.initializePlugins(this,j,N);for(var A in N)!(A in R)&&(R[A]=N[A]);_prepareGroup(R);for(var M in this)M.charAt(0)==="_"&&typeof this[M]=="function"&&(this[M]=this[M].bind(this));this.nativeDraggable=R.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),R.supportPointer?on(j,"pointerdown",this._onTapStart):(on(j,"mousedown",this._onTapStart),on(j,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(j,"dragover",this),on(j,"dragenter",this)),sortables.push(this.el),R.store&&R.store.get&&this.sort(R.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(R){!this.el.contains(R)&&R!==this.el&&(lastTarget=null)},_getDirection:function(R,N){return typeof this.options.direction=="function"?this.options.direction.call(this,R,N,dragEl):this.options.direction},_onTapStart:function(R){if(R.cancelable){var N=this,A=this.el,M=this.options,z=M.preventOnFilter,H=R.type,G=R.touches&&R.touches[0]||R.pointerType&&R.pointerType==="touch"&&R,ee=(G||R).target,P=R.target.shadowRoot&&(R.path&&R.path[0]||R.composedPath&&R.composedPath()[0])||ee,ne=M.filter;if(_saveInputCheckedState(A),!dragEl&&!(/mousedown|pointerdown/.test(H)&&R.button!==0||M.disabled)&&!P.isContentEditable&&!(!this.nativeDraggable&&Safari&&ee&&ee.tagName.toUpperCase()==="SELECT")&&(ee=closest(ee,M.draggable,A,!1),!(ee&&ee.animated)&&lastDownEl!==ee)){if(oldIndex=index(ee),oldDraggableIndex=index(ee,M.draggable),typeof ne=="function"){if(ne.call(this,R,ee,this)){_dispatchEvent({sortable:N,rootEl:P,name:"filter",targetEl:ee,toEl:A,fromEl:A}),pluginEvent("filter",N,{evt:R}),z&&R.preventDefault();return}}else if(ne&&(ne=ne.split(",").some(function(ae){if(ae=closest(P,ae.trim(),A,!1),ae)return _dispatchEvent({sortable:N,rootEl:ae,name:"filter",targetEl:ee,fromEl:A,toEl:A}),pluginEvent("filter",N,{evt:R}),!0}),ne)){z&&R.preventDefault();return}M.handle&&!closest(P,M.handle,A,!1)||this._prepareDragStart(R,G,ee)}}},_prepareDragStart:function(R,N,A){var M=this,z=M.el,H=M.options,G=z.ownerDocument,ee;if(A&&!dragEl&&A.parentNode===z){var P=getRect(A);if(rootEl=z,dragEl=A,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=A,activeGroup=H.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(N||R).clientX,clientY:(N||R).clientY},tapDistanceLeft=tapEvt.clientX-P.left,tapDistanceTop=tapEvt.clientY-P.top,this._lastX=(N||R).clientX,this._lastY=(N||R).clientY,dragEl.style["will-change"]="all",ee=function(){if(pluginEvent("delayEnded",M,{evt:R}),Sortable.eventCanceled){M._onDrop();return}M._disableDelayedDragEvents(),!FireFox&&M.nativeDraggable&&(dragEl.draggable=!0),M._triggerDragStart(R,N),_dispatchEvent({sortable:M,name:"choose",originalEvent:R}),toggleClass(dragEl,H.chosenClass,!0)},H.ignore.split(",").forEach(function(ne){find(dragEl,ne.trim(),_disableDraggable)}),on(G,"dragover",nearestEmptyInsertDetectEvent),on(G,"mousemove",nearestEmptyInsertDetectEvent),on(G,"touchmove",nearestEmptyInsertDetectEvent),H.supportPointer?(on(G,"pointerup",M._onDrop),!this.nativeDraggable&&on(G,"pointercancel",M._onDrop)):(on(G,"mouseup",M._onDrop),on(G,"touchend",M._onDrop),on(G,"touchcancel",M._onDrop)),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:R}),H.delay&&(!H.delayOnTouchOnly||N)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}H.supportPointer?(on(G,"pointerup",M._disableDelayedDrag),on(G,"pointercancel",M._disableDelayedDrag)):(on(G,"mouseup",M._disableDelayedDrag),on(G,"touchend",M._disableDelayedDrag),on(G,"touchcancel",M._disableDelayedDrag)),on(G,"mousemove",M._delayedDragTouchMoveHandler),on(G,"touchmove",M._delayedDragTouchMoveHandler),H.supportPointer&&on(G,"pointermove",M._delayedDragTouchMoveHandler),M._dragStartTimer=setTimeout(ee,H.delay)}else ee()}},_delayedDragTouchMoveHandler:function(R){var N=R.touches?R.touches[0]:R;Math.max(Math.abs(N.clientX-this._lastX),Math.abs(N.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var R=this.el.ownerDocument;off$1(R,"mouseup",this._disableDelayedDrag),off$1(R,"touchend",this._disableDelayedDrag),off$1(R,"touchcancel",this._disableDelayedDrag),off$1(R,"pointerup",this._disableDelayedDrag),off$1(R,"pointercancel",this._disableDelayedDrag),off$1(R,"mousemove",this._delayedDragTouchMoveHandler),off$1(R,"touchmove",this._delayedDragTouchMoveHandler),off$1(R,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(R,N){N=N||R.pointerType=="touch"&&R,!this.nativeDraggable||N?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):N?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(R,N){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:N}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var A=this.options;!R&&toggleClass(dragEl,A.dragClass,!1),toggleClass(dragEl,A.ghostClass,!0),Sortable.active=this,R&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:N})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var R=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),N=R;R&&R.shadowRoot&&(R=R.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),R!==N);)N=R;if(dragEl.parentNode[expando]._isOutsideThisEl(R),N)do{if(N[expando]){var A=void 0;if(A=N[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:R,rootEl:N}),A&&!this.options.dragoverBubble)break}R=N}while(N=getParentOrHost(N));_unhideGhostForTarget()}},_onTouchMove:function(R){if(tapEvt){var N=this.options,A=N.fallbackTolerance,M=N.fallbackOffset,z=R.touches?R.touches[0]:R,H=ghostEl&&matrix(ghostEl,!0),G=ghostEl&&H&&H.a,ee=ghostEl&&H&&H.d,P=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),ne=(z.clientX-tapEvt.clientX+M.x)/(G||1)+(P?P[0]-ghostRelativeParentInitialScroll[0]:0)/(G||1),ae=(z.clientY-tapEvt.clientY+M.y)/(ee||1)+(P?P[1]-ghostRelativeParentInitialScroll[1]:0)/(ee||1);if(!Sortable.active&&!awaitingDragStarted){if(A&&Math.max(Math.abs(z.clientX-this._lastX),Math.abs(z.clientY-this._lastY))=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:R}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:R}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:R}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:R})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:R}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:R})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:R}),this.save()))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(R){R.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(R){switch(R.type){case"drop":case"dragend":this._onDrop(R);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(R),_globalDragOver(R));break;case"selectstart":R.preventDefault();break}},toArray:function(){for(var R=[],N,A=this.el.children,M=0,z=A.length,H=this.options;MM.right+z||j.clientY>A.bottom&&j.clientX>A.left:j.clientY>M.bottom+z||j.clientX>A.right&&j.clientY>A.top}function _getSwapDirection(j,R,N,A,M,z,H,G){var ee=A?j.clientY:j.clientX,P=A?N.height:N.width,ne=A?N.top:N.left,ae=A?N.bottom:N.right,le=!1;if(!H){if(G&&targetMoveDistancene+P*z/2:eeae-targetMoveDistance)return-lastDirection}else if(ee>ne+P*(1-M)/2&&eeae-P*z/2)?ee>ne+P/2?1:-1:0}function _getInsertDirection(j){return index(dragEl)1&&(multiDragElements.forEach(function(G){z.addAnimationState({target:G,rect:folding?getRect(G):H}),unsetRect(G),G.fromRect=H,A.removeAnimationState(G)}),folding=!1,insertMultiDragElements(!this.options.removeCloneOnHide,M))},dragOverCompleted:function(N){var A=N.sortable,M=N.isOwner,z=N.insertion,H=N.activeSortable,G=N.parentEl,ee=N.putSortable,P=this.options;if(z){if(M&&H._hideClone(),initialFolding=!1,P.animation&&multiDragElements.length>1&&(folding||!M&&!H.options.sort&&!ee)){var ne=getRect(dragEl$1,!1,!0,!0);multiDragElements.forEach(function(le){le!==dragEl$1&&(setRect(le,ne),G.appendChild(le))}),folding=!0}if(!M)if(folding||removeMultiDragElements(),multiDragElements.length>1){var ae=clonesHidden;H._showClone(A),H.options.animation&&!clonesHidden&&ae&&multiDragClones.forEach(function(le){H.addAnimationState({target:le,rect:clonesFromRect}),le.fromRect=clonesFromRect,le.thisAnimationDuration=null})}else H._showClone(A)}},dragOverAnimationCapture:function(N){var A=N.dragRect,M=N.isOwner,z=N.activeSortable;if(multiDragElements.forEach(function(G){G.thisAnimationDuration=null}),z.options.animation&&!M&&z.multiDrag.isMultiDrag){clonesFromRect=_extends({},A);var H=matrix(dragEl$1,!0);clonesFromRect.top-=H.f,clonesFromRect.left-=H.e}},dragOverAnimationComplete:function(){folding&&(folding=!1,removeMultiDragElements())},drop:function(N){var A=N.originalEvent,M=N.rootEl,z=N.parentEl,H=N.sortable,G=N.dispatchSortableEvent,ee=N.oldIndex,P=N.putSortable,ne=P||this.sortable;if(A){var ae=this.options,le=z.children;if(!dragStarted)if(ae.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),toggleClass(dragEl$1,ae.selectedClass,!~multiDragElements.indexOf(dragEl$1)),~multiDragElements.indexOf(dragEl$1))multiDragElements.splice(multiDragElements.indexOf(dragEl$1),1),lastMultiDragSelect=null,dispatchEvent({sortable:H,rootEl:M,name:"deselect",targetEl:dragEl$1,originalEvent:A});else{if(multiDragElements.push(dragEl$1),dispatchEvent({sortable:H,rootEl:M,name:"select",targetEl:dragEl$1,originalEvent:A}),A.shiftKey&&lastMultiDragSelect&&H.el.contains(lastMultiDragSelect)){var re=index(lastMultiDragSelect),ie=index(dragEl$1);~re&&~ie&&re!==ie&&(function(){var pe,fe;ie>re?(fe=re,pe=ie):(fe=ie,pe=re+1);for(var ve=ae.filter;fe1){var se=getRect(dragEl$1),de=index(dragEl$1,":not(."+this.options.selectedClass+")");if(!initialFolding&&ae.animation&&(dragEl$1.thisAnimationDuration=null),ne.captureAnimationState(),!initialFolding&&(ae.animation&&(dragEl$1.fromRect=se,multiDragElements.forEach(function(pe){if(pe.thisAnimationDuration=null,pe!==dragEl$1){var fe=folding?getRect(pe):se;pe.fromRect=fe,ne.addAnimationState({target:pe,rect:fe})}})),removeMultiDragElements(),multiDragElements.forEach(function(pe){le[de]?z.insertBefore(pe,le[de]):z.appendChild(pe),de++}),ee===index(dragEl$1))){var ge=!1;multiDragElements.forEach(function(pe){if(pe.sortableIndex!==index(pe)){ge=!0;return}}),ge&&(G("update"),G("sort"))}multiDragElements.forEach(function(pe){unsetRect(pe)}),ne.animateAll()}multiDragSortable=ne}(M===z||P&&P.lastPutMode!=="clone")&&multiDragClones.forEach(function(pe){pe.parentNode&&pe.parentNode.removeChild(pe)})}},nullingGlobal:function(){this.isMultiDrag=dragStarted=!1,multiDragClones.length=0},destroyGlobal:function(){this._deselectMultiDrag(),off$1(document,"pointerup",this._deselectMultiDrag),off$1(document,"mouseup",this._deselectMultiDrag),off$1(document,"touchend",this._deselectMultiDrag),off$1(document,"keydown",this._checkKeyDown),off$1(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(N){if(!(typeof dragStarted<"u"&&dragStarted)&&multiDragSortable===this.sortable&&!(N&&closest(N.target,this.options.draggable,this.sortable.el,!1))&&!(N&&N.button!==0))for(;multiDragElements.length;){var A=multiDragElements[0];toggleClass(A,this.options.selectedClass,!1),multiDragElements.shift(),dispatchEvent({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:A,originalEvent:N})}},_checkKeyDown:function(N){N.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(N){N.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},_extends(j,{pluginName:"multiDrag",utils:{select:function(N){var A=N.parentNode[expando];!A||!A.options.multiDrag||~multiDragElements.indexOf(N)||(multiDragSortable&&multiDragSortable!==A&&(multiDragSortable.multiDrag._deselectMultiDrag(),multiDragSortable=A),toggleClass(N,A.options.selectedClass,!0),multiDragElements.push(N))},deselect:function(N){var A=N.parentNode[expando],M=multiDragElements.indexOf(N);!A||!A.options.multiDrag||!~M||(toggleClass(N,A.options.selectedClass,!1),multiDragElements.splice(M,1))}},eventProperties:function(){var N=this,A=[],M=[];return multiDragElements.forEach(function(z){A.push({multiDragElement:z,index:z.sortableIndex});var H;folding&&z!==dragEl$1?H=-1:folding?H=index(z,":not(."+N.options.selectedClass+")"):H=index(z),M.push({multiDragElement:z,index:H})}),{items:_toConsumableArray(multiDragElements),clones:[].concat(multiDragClones),oldIndicies:A,newIndicies:M}},optionListeners:{multiDragKey:function(N){return N=N.toLowerCase(),N==="ctrl"?N="Control":N.length>1&&(N=N.charAt(0).toUpperCase()+N.substr(1)),N}}})}function insertMultiDragElements(j,R){multiDragElements.forEach(function(N,A){var M=R.children[N.sortableIndex+(j?Number(A):0)];M?R.insertBefore(N,M):R.appendChild(N)})}function insertMultiDragClones(j,R){multiDragClones.forEach(function(N,A){var M=R.children[N.sortableIndex+(j?Number(A):0)];M?R.insertBefore(N,M):R.appendChild(N)})}function removeMultiDragElements(){multiDragElements.forEach(function(j){j!==dragEl$1&&j.parentNode&&j.parentNode.removeChild(j)})}Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert);const sortable_esm=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:MultiDragPlugin,Sortable,Swap:SwapPlugin,default:Sortable},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(sortable_esm);var classnames={exports:{}};var hasRequiredClassnames;function requireClassnames(){return hasRequiredClassnames||(hasRequiredClassnames=1,(function(j){(function(){var R={}.hasOwnProperty;function N(){for(var A=[],M=0;M$882b6d93070905b3$re_export$Sortable),H(j.exports,"Direction",()=>$882b6d93070905b3$re_export$Direction),H(j.exports,"DOMRect",()=>$882b6d93070905b3$re_export$DOMRect),H(j.exports,"GroupOptions",()=>$882b6d93070905b3$re_export$GroupOptions),H(j.exports,"MoveEvent",()=>$882b6d93070905b3$re_export$MoveEvent),H(j.exports,"Options",()=>$882b6d93070905b3$re_export$Options),H(j.exports,"PullResult",()=>$882b6d93070905b3$re_export$PullResult),H(j.exports,"PutResult",()=>$882b6d93070905b3$re_export$PutResult),H(j.exports,"SortableEvent",()=>$882b6d93070905b3$re_export$SortableEvent),H(j.exports,"SortableOptions",()=>$882b6d93070905b3$re_export$SortableOptions),H(j.exports,"Utils",()=>$882b6d93070905b3$re_export$Utils),H(j.exports,"ReactSortable",()=>ve);function ee(me){me.parentElement!==null&&me.parentElement.removeChild(me)}function P(me,xe,Re){const Ne=me.children[Re]||null;me.insertBefore(xe,Ne)}function ne(me){me.forEach(xe=>ee(xe.element))}function ae(me){me.forEach(xe=>{P(xe.parentElement,xe.element,xe.oldIndex)})}function le(me,xe){const Re=de(me),Ne={parentElement:me.from};let $e=[];switch(Re){case"normal":$e=[{element:me.item,newIndex:me.newIndex,oldIndex:me.oldIndex,parentElement:me.from}];break;case"swap":const He={element:me.item,oldIndex:me.oldIndex,newIndex:me.newIndex,...Ne},Ke={element:me.swapItem,oldIndex:me.newIndex,newIndex:me.oldIndex,...Ne};$e=[He,Ke];break;case"multidrag":$e=me.oldIndicies.map((Ze,Se)=>({element:Ze.multiDragElement,oldIndex:Ze.index,newIndex:me.newIndicies[Se].index,...Ne}));break}return ge($e,xe)}function re(me,xe){const Re=ie(me,xe);return se(me,Re)}function ie(me,xe){const Re=[...xe];return me.concat().reverse().forEach(Ne=>Re.splice(Ne.oldIndex,1)),Re}function se(me,xe,Re,Ne){const $e=[...xe];return me.forEach(Me=>{const Le=Ne&&Re&&Ne(Me.item,Re);$e.splice(Me.newIndex,0,Le||Me.item)}),$e}function de(me){return me.oldIndicies&&me.oldIndicies.length>0?"multidrag":me.swapItem?"swap":"normal"}function ge(me,xe){return me.map(Ne=>({...Ne,item:xe[Ne.oldIndex]})).sort((Ne,$e)=>Ne.oldIndex-$e.oldIndex)}function pe(me){const{list:xe,setList:Re,children:Ne,tag:$e,style:Me,className:Le,clone:He,onAdd:Ke,onChange:Ze,onChoose:Se,onClone:Ae,onEnd:ke,onFilter:Ve,onRemove:Ye,onSort:ue,onStart:we,onUnchoose:Ue,onUpdate:Ie,onMove:Ge,onSpill:qe,onSelect:We,onDeselect:bt,...ot}=me;return ot}const fe={dragging:null};class ve extends A.Component{static defaultProps={clone:xe=>xe};constructor(xe){super(xe),this.ref=(0,A.createRef)();const Re=[...xe.list].map(Ne=>Object.assign(Ne,{chosen:!1,selected:!1}));xe.setList(Re,this.sortable,fe),z(M)(!xe.plugins,` Plugins prop is no longer supported. Instead, mount it with "Sortable.mount(new MultiDrag())" Please read the updated README.md at https://github.com/SortableJS/react-sortablejs. `)}componentDidMount(){if(this.ref.current===null)return;const xe=this.makeOptions();z(R).create(this.ref.current,xe)}componentDidUpdate(xe){xe.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:xe,style:Re,className:Ne,id:$e}=this.props,Me={style:Re,className:Ne,id:$e},Le=!xe||xe===null?"div":xe;return(0,A.createElement)(Le,{ref:this.ref,...Me},this.getChildren())}getChildren(){const{children:xe,dataIdAttr:Re,selectedClass:Ne="sortable-selected",chosenClass:$e="sortable-chosen",dragClass:Me="sortable-drag",fallbackClass:Le="sortable-falback",ghostClass:He="sortable-ghost",swapClass:Ke="sortable-swap-highlight",filter:Ze="sortable-filter",list:Se}=this.props;if(!xe||xe==null)return null;const Ae=Re||"data-id";return A.Children.map(xe,(ke,Ve)=>{if(ke===void 0)return;const Ye=Se[Ve]||{},{className:ue}=ke.props,we=typeof Ze=="string"&&{[Ze.replace(".","")]:!!Ye.filtered},Ue=z(N)(ue,{[Ne]:Ye.selected,[$e]:Ye.chosen,...we});return(0,A.cloneElement)(ke,{[Ae]:ke.key,className:Ue})})}get sortable(){const xe=this.ref.current;if(xe===null)return null;const Re=Object.keys(xe).find(Ne=>Ne.includes("Sortable"));return Re?xe[Re]:null}makeOptions(){const xe=["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"],Re=["onChange","onClone","onFilter","onSort"],Ne=pe(this.props);return xe.forEach(Me=>Ne[Me]=this.prepareOnHandlerPropAndDOM(Me)),Re.forEach(Me=>Ne[Me]=this.prepareOnHandlerProp(Me)),{...Ne,onMove:(Me,Le)=>{const{onMove:He}=this.props,Ke=Me.willInsertAfter||-1;if(!He)return Ke;const Ze=He(Me,Le,this.sortable,fe);return typeof Ze>"u"?!1:Ze}}}prepareOnHandlerPropAndDOM(xe){return Re=>{this.callOnHandlerProp(Re,xe),this[xe](Re)}}prepareOnHandlerProp(xe){return Re=>{this.callOnHandlerProp(Re,xe)}}callOnHandlerProp(xe,Re){const Ne=this.props[Re];Ne&&Ne(xe,this.sortable,fe)}onAdd(xe){const{list:Re,setList:Ne,clone:$e}=this.props,Me=[...fe.dragging.props.list],Le=le(xe,Me);ne(Le);const He=se(Le,Re,xe,$e).map(Ke=>Object.assign(Ke,{selected:!1}));Ne(He,this.sortable,fe)}onRemove(xe){const{list:Re,setList:Ne}=this.props,$e=de(xe),Me=le(xe,Re);ae(Me);let Le=[...Re];if(xe.pullMode!=="clone")Le=ie(Me,Le);else{let He=Me;switch($e){case"multidrag":He=Me.map((Ke,Ze)=>({...Ke,element:xe.clones[Ze]}));break;case"normal":He=Me.map(Ke=>({...Ke,element:xe.clone}));break;default:z(M)(!0,`mode "${$e}" cannot clone. Please remove "props.clone" from when using the "${$e}" plugin`)}ne(He),Me.forEach(Ke=>{const Ze=Ke.oldIndex,Se=this.props.clone(Ke.item,xe);Le.splice(Ze,1,Se)})}Le=Le.map(He=>Object.assign(He,{selected:!1})),Ne(Le,this.sortable,fe)}onUpdate(xe){const{list:Re,setList:Ne}=this.props,$e=le(xe,Re);ne($e),ae($e);const Me=re($e,Re);return Ne(Me,this.sortable,fe)}onStart(){fe.dragging=this}onEnd(){fe.dragging=null}onChoose(xe){const{list:Re,setList:Ne}=this.props,$e=Re.map((Me,Le)=>{let He=Me;return Le===xe.oldIndex&&(He=Object.assign(Me,{chosen:!0})),He});Ne($e,this.sortable,fe)}onUnchoose(xe){const{list:Re,setList:Ne}=this.props,$e=Re.map((Me,Le)=>{let He=Me;return Le===xe.oldIndex&&(He=Object.assign(He,{chosen:!1})),He});Ne($e,this.sortable,fe)}onSpill(xe){const{removeOnSpill:Re,revertOnSpill:Ne}=this.props;Re&&!Ne&&ee(xe.item)}onSelect(xe){const{list:Re,setList:Ne}=this.props,$e=Re.map(Me=>Object.assign(Me,{selected:!1}));xe.newIndicies.forEach(Me=>{const Le=Me.index;if(Le===-1){console.log(`"${xe.type}" had indice of "${Me.index}", which is probably -1 and doesn't usually happen here.`),console.log(xe);return}$e[Le].selected=!0}),Ne($e,this.sortable,fe)}onDeselect(xe){const{list:Re,setList:Ne}=this.props,$e=Re.map(Me=>Object.assign(Me,{selected:!1}));xe.newIndicies.forEach(Me=>{const Le=Me.index;Le!==-1&&($e[Le].selected=!0)}),Ne($e,this.sortable,fe)}}var je={};G(j.exports,je)})(dist)),dist.exports}var distExports=requireDist();const orderItemsSortFn=(j,R)=>j._order-R._order,orderItemsFn=(j,R)=>j._order=R,UiFileFinder=({selectedItems:j,showUploadOnMount:R,modalMode:N,enableSelection:A,onMaximumItemsSelected:M,onSelectionChanged:z,limit:H,extensionsAllowed:G})=>{const[ee,P]=reactExports.useState([]),[ne,ae]=reactExports.useState(getSessionStorageVar("fileFinderPath")),[le,re]=reactExports.useState(j??[]),[ie,se]=reactExports.useState([]),[de,ge]=reactExports.useState(!1),[pe,fe]=reactExports.useState(!1),ve=(Ne,$e=!0)=>{$e&&Ne.forEach(orderItemsFn),re(()=>[...Ne]),z&&z(Ne),Ne.length===H&&M&&M()},je=Ne=>{H===1&&le.length&&Ne.id!==le[0].id?ve([Ne]):(toggleItemInArray(Ne,le),ve(le))},me=(Ne=getSessionStorageVar("fileFinderPath")||"/")=>{const{ffBrowseUrl:$e}=getStorage();ge(!0),fetchJson(`${$e}?path=${Ne}`).then(({entries:Me})=>{setSessionStorageVar("fileFinderPath",Ne),ae(Ne),P([...Me]),se([]),ge(!1),fe(!0)})},xe=Ne=>{const $e=le.map(Me=>Me.id);Ne.forEach((Me,Le)=>{$e.includes(Me.id)&&toggleItemInArray(Me,le)}),ve(le)};useFFOnMount({refresh:me,currentPath:ne,showUploadOnMount:R});const Re={currentPath:ne,entries:ee,selectedItems:le,checkedItems:ie,setCheckedItems:se,isBusy:de,loadedOnce:pe,enableSelection:A,extensionsAllowed:G,modalMode:N,refresh:me,purgeItems:xe,handleSelectionChanged:ve,handleToggleItemSelect:je};return jsxRuntimeExports.jsx("div",{className:`${style$1b.contain} ${N&&style$1b.modalMode}`,children:jsxRuntimeExports.jsxs(FileFinderProvider,{value:Re,children:[jsxRuntimeExports.jsx(FFHeaderBar,{}),jsxRuntimeExports.jsx(FFListing,{})]})})},padding="an",top="aW",left="sG",right="NA",bottom="k2",flexGrow$2="ZJ",style$W={padding,top,left,right,bottom,flexGrow:flexGrow$2},Padding=({top:j,right:R,bottom:N,left:A,horizontal:M,vertical:z,children:H})=>{let G=style$W.padding;return M&&(A=!0,R=!0),z&&(j=!0,N=!0),j&&(G+=` ${style$W.top}`),A&&(G+=` ${style$W.left}`),N&&(G+=` ${style$W.bottom}`),R&&(G+=` ${style$W.right}`),R&&(G+=` ${style$W.flexGrow}`),jsxRuntimeExports.jsx("div",{className:G,children:H})},ViewFileFinder=()=>jsxRuntimeExports.jsx(Padding,{horizontal:!0,flexgrow:!0,children:jsxRuntimeExports.jsx(UiFileFinder,{})}),wrap$2="_8a",style$V={wrap:wrap$2},ViewPageNotFound=()=>jsxRuntimeExports.jsx("div",{className:style$V.wrap,children:jsxRuntimeExports.jsxs("h1",{children:["404 | ",jsxRuntimeExports.jsx("span",{children:"Page Not Found"})]})}),contain$a="fN",style$U={contain:contain$a},UiFieldLabel=({label:j,helpText:R})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[j&&jsxRuntimeExports.jsx("div",{className:style$Y.title,children:j}),R&&jsxRuntimeExports.jsx("div",{className:style$Y.text,children:R})]}),error$1="sh",style$T={error:error$1},UiFieldError=({text:j})=>jsxRuntimeExports.jsxs("div",{className:style$T.error,children:[jsxRuntimeExports.jsx(Icon,{icon:"alert-circle"})," ",j]}),UiField=({field:j,formErrors:R,formDataUpdateHandler:N,formDataQueryHandler:A})=>{const{entryComponent:M,helpText:z,labelText:H}=j,G=(uiFields[M]??null)||{},{disableFieldLabel:ee}=G,P=Object.keys(R).map(ne=>parseInt(ne)).includes(parseInt(j.uid))&&R[j.uid];return G?jsxRuntimeExports.jsxs("div",{className:style$U.contain,children:[!ee&&jsxRuntimeExports.jsx(UiFieldLabel,{label:H,helpText:z}),jsxRuntimeExports.jsx(G,{formDataUpdateHandler:N,formDataQueryHandler:A,formErrors:R,...j}),P&&jsxRuntimeExports.jsx(UiFieldError,{text:P})]}):jsxRuntimeExports.jsxs("p",{children:['Component "',jsxRuntimeExports.jsx("strong",{children:M}),'" is not installed.']})},wrap$1="_9T",segueInterfaceMode="Py",formWrap="Ip",style$S={wrap:wrap$1,segueInterfaceMode,formWrap},tabContainer$1="cF",buttonContain="v0",active$1="JV",style$R={tabContainer:tabContainer$1,buttonContain,active:active$1},UiFormTabs=({tabLabels:j,groupIndex:R,setGroupIndex:N})=>!!Object.keys(j).length&&jsxRuntimeExports.jsx("div",{className:style$R.tabContainer,children:j.map(({labelText:A},M)=>jsxRuntimeExports.jsx("div",{className:`${style$R.buttonContain} ${M===R&&style$R.active}`,children:jsxRuntimeExports.jsx(UiButton,{onClick:()=>N(M),children:A},M)}))});let bugFixUrl=!0;const useGroupIndex=()=>{const[j,R]=reactExports.useState(getCurrentGroupIndex());return reactExports.useEffect(()=>{setSessionStorageVar(CONSTANT.FORM_TAB_REMEMBER_INDEX_KEY,{path:window.location.hash,index:j})},[j]),reactExports.useEffect(()=>{bugFixUrl!==window.location.hash&&(R(0),bugFixUrl=window.location.hash)},[window.location.hash]),[j,R]},getCurrentGroupIndex=()=>{const j=getSessionStorageVar(CONSTANT.FORM_TAB_REMEMBER_INDEX_KEY);if(j){const{path:R,index:N}=j;if(R===window.location.hash)return N;setSessionStorageVar(CONSTANT.FORM_TAB_REMEMBER_INDEX_KEY,null)}return 0},uiFormHelperFieldFilter=({isNestedInsideUiForm:j,formTabsMap:R,activeTabIndex:N})=>A=>A.omit||j&&!A.parentUid||A.type!==CONSTANT.FORM_FIELD_TYPE_FIELD?!1:!R||!Object.keys(R).length?!0:!!(N&&R[N].includes(A.uid)),UiForm=({formData:j,formDataUpdateHandler:R,formDataQueryHandler:N,formTabsMap:A,formErrors:M={},isSegueInterface:z=!1,isNestedInsideUiForm:H=!1})=>{const[G,ee]=useGroupIndex(),P=(A&&Object.keys(A)[G])??0,ne=Object.keys(j).map(re=>j[re]),ae=uiFormHelperFieldFilter({activeTabIndex:P,formTabsMap:A,isNestedInsideUiForm:H}),le=re=>z||H||!H&&!re.parentUid;return jsxRuntimeExports.jsx("div",{className:`${style$S.wrap} ${z&&style$S.segueInterfaceMode}`,children:jsxRuntimeExports.jsxs("div",{className:style$S.formWrap,children:[!H&&jsxRuntimeExports.jsx(UiFormTabs,{tabLabels:ne.filter(re=>re.type===CONSTANT.FORM_FIELD_TYPE_LABEL),groupIndex:G,setGroupIndex:ee}),ne.filter(ae).filter(le).map(re=>jsxRuntimeExports.jsx(UiField,{field:re,formDataUpdateHandler:R,formDataQueryHandler:N,formErrors:M},re.uid))]})})},useFormDataHandler=({formData:j,formSubmitUrl:R,contentTypeSlug:N,contentTypeId:A})=>{const[M,z]=reactExports.useState(j),[H,G]=reactExports.useState({}),[ee,P]=reactExports.useState(!1);reactExports.useEffect(()=>z(()=>({...j})),[j]);function ne(){fetchPost(R,{formData:M,contentTypeSlug:N,contentTypeId:A}).then(()=>{G({}),P(!1)}).catch(le=>{G(le?.data?.errors||{})})}function ae(le,re=null){if(le instanceof Function)z(ie=>({...le(ie)}));else{const ie=le,se=M[ie];se.entryComponentProps.value=re,z(de=>({...de,[ie]:{...se}}))}P(!0)}return{formDataState:M,formErrors:H,changesMade:ee,formDataUpdateHandler:ae,handleSubmit:ne}},ViewUiForm=()=>{const{formData:j,formSubmitUrl:R,formTabsMap:N,saveButtonText:A,contentTypeSlug:M,contentTypeId:z}=getPageStorage(),H=useFormDataHandler({formData:j,formSubmitUrl:R,contentTypeSlug:M,contentTypeId:z}),{formDataState:G,formErrors:ee,changesMade:P,formDataUpdateHandler:ne,handleSubmit:ae}=H;return reactExports.useEffect(()=>{setPreactStorage(le=>({...le,actionButtons:P?[{title:A||"Save",icon:"check-circle",theme:"primary",onClick:ae}]:le.actionButtons.slice(0,-1)}))},[P]),jsxRuntimeExports.jsx(Padding,{horizontal:!0,children:jsxRuntimeExports.jsx(UiForm,{formTabsMap:N,formData:G,formErrors:ee,formDataUpdateHandler:ne,formDataQueryHandler:le=>le(G)})})},layout$1="_9V",inverted="Dm",style$Q={layout:layout$1,inverted},contain$9="Yg",isVisible="VD",isInverted="AV",isFloating="pd",isMinimised="_5X",body$3="H0",i0="_5H",i1="q5",i2="yt",i3="gp",style$P={contain:contain$9,isVisible,isInverted,isFloating,isMinimised,body:body$3,i0,i1,i2,i3},headerContain="jO",headerWrap="Io",flexGrow$1="_9Z",style$O={headerContain,headerWrap,flexGrow:flexGrow$1};function handleAddItem({uid:j,formDataUpdateHandler:R,blueprint:N,order:A}){let M=uid();return R(z=>{typeof A>"u"&&j&&(A=Object.keys(z).filter(ee=>z[ee].parentUid===j).length);let H=Object.keys(N).map(ee=>N[ee]).filter(ee=>ee.type===CONSTANT.FORM_FIELD_TYPE_REPEATER_ROW)[0]||{type:CONSTANT.FORM_FIELD_TYPE_REPEATER_ROW};H.uid=M,H.parentUid=j,H.entryComponentProps={order:A,value:null},z[H.uid]=H;const G=JSON.parse(JSON.stringify(N));return Object.keys(G).forEach(ee=>{const P=Object.assign(G[ee],{uid:uid(),parentUid:H.uid});z[P.uid]=P}),z}),M}function handleCopyItem({uid:j,formDataUpdateHandler:R}){let N;return R(A=>{const M=(z,H=null)=>{const G=JSON.parse(JSON.stringify(A[z]));G.uid=uid(),G.entryComponentProps.order+=.5,H?G.parentUid=H:N=G.uid,A[`${G.uid}`]=G,Object.keys(A).filter(ee=>parseInt(A[ee].parentUid)===parseInt(z)).forEach(ee=>M(parseInt(ee),parseInt(G.uid)))};return M(j),A}),N}function handleRemoveItem({uid:j,formDataUpdateHandler:R}){R(N=>{function A(z){Object.keys(N).filter(H=>parseInt(N[H].parentUid)===parseInt(z)).forEach(H=>[A(H),delete N[H]])}const{parentUid:M}=N[j];return delete N[j],A(j),M&&Object.keys(N).filter(z=>parseInt(N[z].parentUid)===parseInt(M)).forEach((z,H)=>N[z].entryComponentProps.order=H),N})}function handleReorder({uid:j,formDataUpdateHandler:R,multiply:N}){R(A=>{const{parentUid:M}=A[j];return A[j].entryComponentProps.order+=N*1.5,Object.keys(A).filter(z=>parseInt(A[z].parentUid)===parseInt(M)).sort((z,H)=>A[z].entryComponentProps.order-A[H].entryComponentProps.order).forEach((z,H)=>A[z].entryComponentProps.order=H),A})}function getLabelPreviewText({repeaterRow,formDataQueryHandler,evalTitleString}){const row={};formDataQueryHandler(j=>Object.keys(j).filter(R=>j[R].parentUid===repeaterRow.uid).forEach(R=>row[j[R].propertyKey]=j[R]));try{return eval(evalTitleString)}catch(j){return console.warn(evalTitleString,j),"[Developer] Please check console"}}let autoSaveInterval,once,formDataTrackedObject;const getFormData=()=>formDataTrackedObject,createAutoSave=()=>{const j={formData:formDataTrackedObject,hash:window.location.hash};setLocalStorageVar(CONSTANT.FORM_AUTO_SAVE_KEY,j)},useUiEditorFormDataTracker=j=>{reactExports.useEffect(()=>{formDataTrackedObject=j},[j])},clearAutoSave=()=>setLocalStorageVar(CONSTANT.FORM_AUTO_SAVE_KEY,null),useUiEditorAutoSave=({changesMade:j,formDataUpdateHandler:R})=>{reactExports.useEffect(()=>{const{debugMode:N}=getStorage(),A=getLocalStorageVar(CONSTANT.FORM_AUTO_SAVE_KEY);!N&&A&&A.hash===window.location.hash&&new FluentModal().alert("Would you like to restore the auto save file?").affirmText("Yes, restore").onAffirm(M=>{R(()=>A.formData),M(),new FluentModal().alert("Auto-save restored. Please note that block previews may not appear correctly until edited directly or this document is saved.").dispatch()}).onCancel(()=>{clearAutoSave()}).cancelText("No, discard").dispatch()},[]),reactExports.useEffect(()=>{clearInterval(autoSaveInterval),j?autoSaveInterval=setInterval(createAutoSave,2e3):once&&clearAutoSave(),once=!0},[j])};function uiEditorHandleSubmit({formSubmitUrl:j,contentTypeId:R,setFormErrors:N,setChangesMade:A}){const{contentTypeSlug:M}=getPageStorage(),z=getFormData();Object.keys(z).forEach(P=>{const ne=z[P],ae=ne?.value,le=ne?.entryComponentProps?.value;ae&&ae!==le&&(z[P].entryComponentProps.value=ae)});const H={formData:z,contentTypeSlug:M,contentTypeId:R},G=P=>{N({}),A(!1),disableSavePrompt()},ee=({data:P})=>{P?.errors&&N(P.errors??{})};fetchPost(j,H).then(G).catch(ee)}const uiEditorDispatchEvent=(j,R)=>dispatch(j,R),uiEditorOnEvent=(j,R)=>reactExports.useEffect(()=>listen(j,R),[]),EDITOR_BLOCK_ADD=uid(),EDITOR_BLOCK_DISCARD=uid(),EDITOR_BLOCK_DUPLICATE=uid(),EDITOR_BLOCK_FOCUS_REQUEST=uid(),EDITOR_BLOCK_FORM_UID_UPDATED=uid(),EDITOR_BLOCK_MOVE_DOWN=uid(),EDITOR_BLOCK_MOVE_UP=uid(),EDITOR_BLOCK_SELECTED=uid(),EDITOR_CLIPBOARD_BLOCK_PASTE=uid(),EDITOR_REQUEST_CHANGE_TEMPLATE=uid(),EDITOR_REQUEST_SUBMIT_FORM=uid(),EDITOR_SET_FORM_UID=uid(),EDITOR_TOGGLE_SEGUE=uid();function useUiEditorEvents({formData:j,formDataUpdateHandler:R,setChangesMade:N,setEditingFormUid:A,setFormErrors:M,setIsSegueMinimised:z,setSegueIndex:H,setIsSegueVisible:G}){const{contentTypeSlug:ee,contentTypeId:P,changeTemplateUrl:ne,formSubmitUrl:ae}=getPageStorage(),le=queryFormDataRootProperty(j,CONSTANT.FIELD_KEY_TEMPLATE_BLOCKS);uiEditorOnEvent(EDITOR_BLOCK_ADD,({blockKey:re,order:ie})=>{const{entryComponentProps:se,uid:de}=le,{templateBlockBlueprint:ge}=se,{fields:pe,html:fe,label:ve}=ge[re],je=handleAddItem({uid:de,order:ie+.5,blueprint:pe,formDataUpdateHandler:R});R(me=>(me[je].entryComponentProps.html=fe,me[je].entryComponentProps.label=ve,me[je].entryComponentProps.name=re,me)),uiEditorDispatchEvent(EDITOR_SET_FORM_UID,{newUid:je}),setTimeout(()=>uiEditorDispatchEvent(`${EDITOR_BLOCK_FOCUS_REQUEST}-${je}`),100)}),uiEditorOnEvent(EDITOR_CLIPBOARD_BLOCK_PASTE,({blockBlueprint:re,pasteAtUid:ie,entryComponentProps:se})=>{const{html:de,label:ge,name:pe}=se,{entryComponentProps:fe,parentUid:ve}=j[ie],je=handleAddItem({uid:ve,order:fe.order,blueprint:re,formDataUpdateHandler:R});R(me=>(me[je].entryComponentProps.html=de,me[je].entryComponentProps.label=ge,me[je].entryComponentProps.name=pe,me[je].entryComponentProps.order=fe.order,me)),uiEditorDispatchEvent(EDITOR_SET_FORM_UID,{newUid:je}),setTimeout(()=>uiEditorDispatchEvent(`${EDITOR_BLOCK_FOCUS_REQUEST}-${je}`),100)}),uiEditorOnEvent(EDITOR_BLOCK_DUPLICATE,re=>{const ie=handleCopyItem({uid:re,formDataUpdateHandler:R});uiEditorDispatchEvent(EDITOR_SET_FORM_UID,{newUid:ie}),setTimeout(()=>uiEditorDispatchEvent(`${EDITOR_BLOCK_FOCUS_REQUEST}-${ie}`),100)}),uiEditorOnEvent(EDITOR_BLOCK_DISCARD,re=>{handleRemoveItem({uid:re,formDataUpdateHandler:R})}),uiEditorOnEvent(EDITOR_BLOCK_MOVE_UP,re=>{handleReorder({uid:re,formDataUpdateHandler:R,multiply:-1})}),uiEditorOnEvent(EDITOR_BLOCK_MOVE_DOWN,re=>{handleReorder({uid:re,formDataUpdateHandler:R,multiply:1})}),uiEditorOnEvent(EDITOR_SET_FORM_UID,({newUid:re})=>{H("UIESISegueBlocks"),A(re),z(!1),G(!0)}),uiEditorOnEvent(EDITOR_BLOCK_SELECTED,({uid:re})=>{uiEditorDispatchEvent(EDITOR_SET_FORM_UID,{newUid:re}),uiEditorDispatchEvent(`${EDITOR_BLOCK_FOCUS_REQUEST}-${re}`)}),uiEditorOnEvent(EDITOR_REQUEST_SUBMIT_FORM,()=>{uiEditorHandleSubmit({formSubmitUrl:ae,contentTypeId:P,setFormErrors:M,setChangesMade:N})}),uiEditorOnEvent(EDITOR_REQUEST_CHANGE_TEMPLATE,({template:re})=>{lockScreen(),fetchPost(ne,{template:re,ctId:P,ctName:ee}).then(()=>{}).catch(unlockScreen)})}let _sharedState={};const useSharedStateCreator=(j,R)=>{const[N,A]=reactExports.useState(R);return reactExports.useEffect(()=>uiEditorDispatchEvent(`globalState:${j}`,N),[N]),_sharedState[j]=[N,A],[N,A]},useSharedState=j=>{const[R,N]=_sharedState[j],[A,M]=reactExports.useState(R),z=H=>{M(H),N(H)};return uiEditorOnEvent(`globalState:${j}`,H=>M(H)),[A,z]},previewPath="SH",style$N={previewPath},[,emitTitleChange,useSubscribeTitleChange]=createSubscriptionNamespace(),UiFieldPermalink=({uid:j,entryComponentProps:R,formDataUpdateHandler:N})=>{const{isHomepage:A,value:M}=R,[z,H]=reactExports.useState(G());function G(){const ae=M.split("/");return ae[ae.length-1]}function ee(){const ae=M.split("/");return ae.pop(),ae.join("/")+"/"}function P(ae){H(ae),N(le=>(le[j].value=ee()+ae,le))}useSubscribeTitleChange(ae=>{const le=String(ae).toLowerCase().replace(" ","-");le&&(P(le),ne.current.querySelector("input").value=le)});const ne=reactExports.useRef();return jsxRuntimeExports.jsx("div",{children:A?jsxRuntimeExports.jsx("div",{className:style$N.previewPath,children:jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx(Icon,{icon:"home"})," This is your homepage"]})}):jsxRuntimeExports.jsxs("div",{ref:ne,children:[jsxRuntimeExports.jsx("div",{className:style$N.previewPath,children:`${ee()}${z}`}),jsxRuntimeExports.jsx(UiInput,{defaultValue:z,onInput:ae=>P(ae.target.value),onKeyPress:ae=>ae.key==="/"&&ae.preventDefault()})]})})};function clone(j){return JSON.parse(JSON.stringify(j))}function cloneFormData(j,R=!1){const N=clone(j);return R&&Object.keys(N).forEach(A=>{R(j[A])||delete N[A]}),N}function queryFormDataRootProperty(j,R){const N=Object.keys(cloneFormData(j,A=>!A.parentUid&&R===A.propertyKey));return N.length?j[parseInt(N[0])]:!1}function queryTemplateBlockRows(j){return cloneFormData(j,R=>R.parentUid===queryFormDataRootProperty(j,CONSTANT.FIELD_KEY_TEMPLATE_BLOCKS).uid&&R.type===CONSTANT.FORM_FIELD_TYPE_REPEATER_ROW)}function queryRecursivePropertiesOfUid(j,R){R=parseInt(R);let N=[];const A=z=>{const H=ee=>j[parseInt(ee)].parentUid===z,G=ee=>{N.push(ee);const P=j[ee];(P.entryComponent==="UiFieldRepeater"||P.type===CONSTANT.FORM_FIELD_TYPE_REPEATER_ROW)&&A(P.uid)};Object.keys(j).filter(H).forEach(G)};A(R);const M=clone(j);return Object.keys(M).forEach(z=>!N.includes(z)&&delete M[z]),M}const useEditorFormData=()=>{const{formData:j}=getPageStorage(),[R,N]=useSharedStateCreator(CONSTANT.FORM_DATA_KEY,j),[A,M]=useSharedStateCreator(CONSTANT.FORM_ERRORS_KEY,{}),[z,H]=useSharedStateCreator(CONSTANT.UI_CHANGES_MADE,!1),{contentTypeId:G}=getPageStorage();useUiEditorFormDataTracker(R);function ee(P,ne=null){if(P instanceof Function){const ae=P;N(le=>Object.assign({},ae(le)))}else{const ae=P;N(le=>(le[ae].entryComponentProps.value=ne,!G&&R[ae].propertyKey==="title"&&emitTitleChange(ne),{...le}))}H(!0)}return reactExports.useEffect(()=>{window.formDataUpdateHandler=ee},[]),{formDataUpdateHandler:ee,formData:R,setFormData:N,formErrors:A,setFormErrors:M,changesMade:z,setChangesMade:H}},setGlobalFormData=(j,R=null)=>window.formDataUpdateHandler(j,R),[subscribe,emitSegueHeaderTitleUpdate,useSegueHeaderTitleSubscriber]=createSubscriptionNamespace();function useSegueHeaderTitles(){const[j,R]=reactExports.useState(""),[N,A]=reactExports.useState("");return useSegueHeaderTitleSubscriber(({title:M,preTitle:z})=>{R(M||null),A(z||null)}),{title:j,preTitle:N}}const UIESIHeader=()=>{const{contentTypeSlug:j}=getPageStorage(),[R]=useSharedState(CONSTANT.FORM_DATA_KEY),[N,A]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_DOCKED),[M,z]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_MINIMISED),[H,G]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_POSITION_INVERT),ee=queryFormDataRootProperty(R,CONSTANT.ENTITY_PROPERTY_TITLE).entryComponentProps.value,P=!N&&M,{title:ne,preTitle:ae}=useSegueHeaderTitles(),le=P?ee:ne,re=P?j:ae,ie=se=>{const de=new FluentContextMenu(se);de.button().text(N?"Float":"Dock").onSelect(()=>{A(!N),N&&z(!1)}),de.button().text(H?"Pin to left":"Pin to right").onSelect(()=>G(!H)),de.dispatch()};return jsxRuntimeExports.jsx("header",{className:style$O.headerContain,children:jsxRuntimeExports.jsxs("div",{className:style$O.headerWrap,children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Padding,{horizontal:!0,children:[jsxRuntimeExports.jsx("h5",{children:re}),jsxRuntimeExports.jsx("h3",{children:le})]})}),jsxRuntimeExports.jsx("div",{className:style$O.flexGrow}),jsxRuntimeExports.jsx(UiButton,{icon:"more-vertical",onClick:ie}),!N&&jsxRuntimeExports.jsx(UiButton,{icon:M?"maximize-2":"minimize-2",onClick:()=>z(se=>!se)})]})})},tabContainer="ps",tab="KI",active="PY",error="Lk",errorBadge="xV",style$M={tabContainer,tab,active,error,errorBadge},UIESIFooter=()=>{const{isMobile:j}=useMobileMediaQuery(),[R]=useSharedState(CONSTANT.FORM_DATA_KEY),[N]=useSharedState(CONSTANT.FORM_ERRORS_KEY),[A]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_MINIMISED),[M]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_DOCKED),[z,H]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_INDEX);return(j||!A||M)&&jsxRuntimeExports.jsx("footer",{className:style$M.tabContainer,children:Object.keys(segues).map(G=>{const ee=segues[G],P=Object.keys(R).map(ae=>R[ae]).filter(ae=>ee.filterFn(ae,R,N)).map(ae=>ae.uid),ne=Object.keys(N).filter(ae=>P.includes(parseInt(ae))).length;return jsxRuntimeExports.jsx("div",{title:ee.title,className:`${style$M.tab} ${z===G&&style$M.active} ${!!ne&&style$M.error}`,onClick:()=>H(()=>G),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,icon:segues[G].icon}),!!ne&&jsxRuntimeExports.jsx("div",{className:style$M.errorBadge,children:ne})]})},G)})})},UIESISegueDefault=()=>{const[j]=useSharedState(CONSTANT.FORM_DATA_KEY),[R]=useSharedState(CONSTANT.FORM_ERRORS_KEY),N=cloneFormData(j,UIESISegueDefault.filterFn),A=(z,H=null)=>{setGlobalFormData(z,H)},M=queryFormDataRootProperty(j,CONSTANT.ENTITY_PROPERTY_TITLE).entryComponentProps.value;return reactExports.useEffect(()=>{emitSegueHeaderTitleUpdate({title:"Configure",preTitle:M})},[]),jsxRuntimeExports.jsx(Padding,{horizontal:!0,children:jsxRuntimeExports.jsx(UiForm,{formErrors:R,formData:N,formDataUpdateHandler:A})})};UIESISegueDefault.icon="edit-2",UIESISegueDefault.filterFn=j=>!j.parentUid&&[CONSTANT.ENTITY_PROPERTY_TITLE,CONSTANT.ENTITY_PROPERTY_PERMALINK,CONSTANT.ENTITY_PROPERTY_PARENT_ID,CONSTANT.ENTITY_PROPERTY_TEMPLATE].includes(j.propertyKey);const UIESISegueSeo=()=>{const[j]=useSharedState(CONSTANT.FORM_DATA_KEY),[R]=useSharedState(CONSTANT.FORM_ERRORS_KEY),N=cloneFormData(j,UIESISegueSeo.filterFn),A=queryFormDataRootProperty(j,CONSTANT.ENTITY_PROPERTY_TITLE).entryComponentProps.value;return reactExports.useEffect(()=>{emitSegueHeaderTitleUpdate({title:"Search Engine Optimisation",preTitle:A})},[]),jsxRuntimeExports.jsx(Padding,{horizontal:!0,children:jsxRuntimeExports.jsx(UiForm,{formData:N,formDataUpdateHandler:setGlobalFormData,formErrors:R})})};UIESISegueSeo.icon="activity",UIESISegueSeo.filterFn=j=>!j.parentUid&&[CONSTANT.ENTITY_PROPERTY_SEO_TITLE,CONSTANT.ENTITY_PROPERTY_SEO_DESCRIPTION].includes(j.propertyKey);const wrapForm="G2",miniBlockHead="xL",mobileBlockViewWrap="_5x",hide$1="_0z",style$L={wrapForm,miniBlockHead,mobileBlockViewWrap,hide:hide$1},body$2="pQ",style$K={body:body$2},buttonFlexGrow="_1f",style$J={buttonFlexGrow},footer="AW",style$I={footer},UiFooterBar=({children:j})=>jsxRuntimeExports.jsx("footer",{className:style$I.footer,children:j}),picker="QV",naked="_7l",modalActions="GY",style$H={picker,naked,modalActions};function r(j){var R,N,A="";if(typeof j=="string"||typeof j=="number")A+=j;else if(typeof j=="object")if(Array.isArray(j)){var M=j.length;for(R=0;R{if(N==="length"||N==="prototype"||N==="arguments"||N==="caller")return;const M=Object.getOwnPropertyDescriptor(j,N),z=Object.getOwnPropertyDescriptor(R,N);!canCopyProperty(M,z)&&A||Object.defineProperty(j,N,z)},canCopyProperty=function(j,R){return j===void 0||j.configurable||j.writable===R.writable&&j.enumerable===R.enumerable&&j.configurable===R.configurable&&(j.writable||j.value===R.value)},changePrototype=(j,R)=>{const N=Object.getPrototypeOf(R);N!==Object.getPrototypeOf(j)&&Object.setPrototypeOf(j,N)},wrappedToString=(j,R)=>`/* Wrapped ${j}*/ ${R}`,toStringDescriptor=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),toStringName=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),changeToString=(j,R,N)=>{const A=N===""?"":`with ${N.trim()}() `,M=wrappedToString.bind(null,A,R.toString());Object.defineProperty(M,"name",toStringName);const{writable:z,enumerable:H,configurable:G}=toStringDescriptor;Object.defineProperty(j,"toString",{value:M,writable:z,enumerable:H,configurable:G})};function mimicFunction(j,R,{ignoreNonConfigurable:N=!1}={}){const{name:A}=j;for(const M of Reflect.ownKeys(R))copyProperty(j,R,M,N);return changePrototype(j,R),changeToString(j,R,A),j}const maxTimeoutValue=2147483647,cacheStore=new WeakMap,cacheTimerStore=new WeakMap,cacheKeyStore=new WeakMap;function getValidCacheItem(j,R){const N=j.get(R);if(N){if(N.maxAge<=Date.now()){j.delete(R);return}return N}}function memoize(j,{cacheKey:R,cache:N=new Map,maxAge:A}={}){if(A===0)return j;if(typeof A=="number"&&Number.isFinite(A)){if(A>maxTimeoutValue)throw new TypeError(`The \`maxAge\` option cannot exceed ${maxTimeoutValue}.`);if(A<0)throw new TypeError("The `maxAge` option should not be a negative number.")}const M=function(...z){const H=R?R(z):z[0],G=getValidCacheItem(N,H);if(G)return G.data;const ee=j.apply(this,z),P=typeof A=="function"?A(...z):A;if(P!==void 0&&P!==Number.POSITIVE_INFINITY){if(!Number.isFinite(P))throw new TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(P<=0)return ee;if(P>maxTimeoutValue)throw new TypeError(`The \`maxAge\` function result cannot exceed ${maxTimeoutValue}.`)}if(N.set(H,{data:ee,maxAge:P===void 0||P===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Date.now()+P}),P!==void 0&&P!==Number.POSITIVE_INFINITY){const ne=setTimeout(()=>{N.delete(H),cacheTimerStore.get(M)?.delete(ne)},P);ne.unref?.();const ae=cacheTimerStore.get(M)??new Set;ae.add(ne),cacheTimerStore.set(M,ae)}return ee};return mimicFunction(M,j,{ignoreNonConfigurable:!0}),cacheStore.set(M,N),cacheKeyStore.set(M,R??(z=>z[0])),M}function isString(j){return typeof j=="string"}function isUnique(j,R,N){return N.indexOf(j)===R}function isAllLowerCase(j){return j.toLowerCase()===j}function fixCommas(j){return j.indexOf(",")===-1?j:j.split(",")}function normalizeLocale(j){if(!j)return j;if(j==="C"||j==="posix"||j==="POSIX")return"en-US";if(j.indexOf(".")!==-1){var R=j.split(".")[0],N=R===void 0?"":R;return normalizeLocale(N)}if(j.indexOf("@")!==-1){var A=j.split("@")[0],N=A===void 0?"":A;return normalizeLocale(N)}if(j.indexOf("-")===-1||!isAllLowerCase(j))return j;var M=j.split("-"),z=M[0],H=M[1],G=H===void 0?"":H;return"".concat(z,"-").concat(G.toUpperCase())}function getUserLocalesInternal(j){var R=j===void 0?{}:j,N=R.useFallbackLocale,A=N===void 0?!0:N,M=R.fallbackLocale,z=M===void 0?"en-US":M,H=[];if(typeof navigator<"u"){for(var G=navigator.languages||[],ee=[],P=0,ne=G;P0,Ve=Se!=="century",Ye=getBeginPrevious(Se,R),ue=Ve?getBeginPrevious2(Se,R):void 0,we=getBeginNext(Se,R),Ue=Ve?getBeginNext2(Se,R):void 0,Ie=(function(){if(Ye.getFullYear()<0)return!0;var ht=getEndPrevious(Se,R);return P&&P>=ht})(),Ge=Ve&&(function(){if(ue.getFullYear()<0)return!0;var ht=getEndPrevious2(Se,R);return P&&P>=ht})(),qe=ee&&eej?R:N&&N=j}function isRangeWithinRange(j,R){return j[0]<=R[0]&&j[1]>=R[1]}function doRangesOverlap(j,R){return isValueWithinRange(j[0],R)||isValueWithinRange(j[1],R)}function getRangeClassNames(j,R,N){var A=doRangesOverlap(R,j),M=[];if(A){M.push(N);var z=isValueWithinRange(j[0],R),H=isValueWithinRange(j[1],R);z&&M.push("".concat(N,"Start")),H&&M.push("".concat(N,"End")),z&&H&&M.push("".concat(N,"BothEnds"))}return M}function isCompleteValue(j){return Array.isArray(j)?j[0]!==null&&j[1]!==null:j!==null}function getTileClasses(j){if(!j)throw new Error("args is required");var R=j.value,N=j.date,A=j.hover,M="react-calendar__tile",z=[M];if(!N)return z;var H=new Date,G=(function(){if(Array.isArray(N))return N;var re=j.dateType;if(!re)throw new Error("dateType is required when date is not an array of two dates");return getRange(re,N)})();if(isValueWithinRange(H,G)&&z.push("".concat(M,"--now")),!R||!isCompleteValue(R))return z;var ee=(function(){if(Array.isArray(R))return R;var re=j.valueType;if(!re)throw new Error("valueType is required when value is not an array of two dates");return getRange(re,R)})();isRangeWithinRange(ee,G)?z.push("".concat(M,"--active")):doRangesOverlap(ee,G)&&z.push("".concat(M,"--hasActive"));var P=getRangeClassNames(ee,G,"".concat(M,"--range"));z.push.apply(z,P);var ne=Array.isArray(R)?R:[R];if(A&&ne.length===1){var ae=A>ee[0]?[ee[0],A]:[A,ee[0]],le=getRangeClassNames(ae,G,"".concat(M,"--hover"));z.push.apply(z,le)}return z}function TileGroup(j){for(var R=j.className,N=j.count,A=N===void 0?3:N,M=j.dateTransform,z=j.dateType,H=j.end,G=j.hover,ee=j.offset,P=j.renderTile,ne=j.start,ae=j.step,le=ae===void 0?1:ae,re=j.value,ie=j.valueType,se=[],de=ne;de<=H;de+=le){var ge=M(de);se.push(P({classes:getTileClasses({date:ge,dateType:z,hover:G,value:re,valueType:ie}),date:ge}))}return jsxRuntimeExports.jsx(Flex,{className:R,count:A,offset:ee,wrap:!0,children:se})}function Tile(j){var R=j.activeStartDate,N=j.children,A=j.classes,M=j.date,z=j.formatAbbr,H=j.locale,G=j.maxDate,ee=j.maxDateTransform,P=j.minDate,ne=j.minDateTransform,ae=j.onClick,le=j.onMouseOver,re=j.style,ie=j.tileClassName,se=j.tileContent,de=j.tileDisabled,ge=j.view,pe=reactExports.useMemo(function(){var ve={activeStartDate:R,date:M,view:ge};return typeof ie=="function"?ie(ve):ie},[R,M,ie,ge]),fe=reactExports.useMemo(function(){var ve={activeStartDate:R,date:M,view:ge};return typeof se=="function"?se(ve):se},[R,M,se,ge]);return jsxRuntimeExports.jsxs("button",{className:clsx(A,pe),disabled:P&&ne(P)>M||G&&ee(G)0,Gl=reactExports.useCallback(function(Je){var vt=(function(){switch(Mn){case"start":return getDetailValueFrom;case"end":return getDetailValueTo;case"range":return getDetailValueArray;default:throw new Error("Invalid returnValue.")}})();return vt({maxDate:me,maxDetail:Re,minDate:$e,value:Je})},[me,Re,$e,Mn]),tl=reactExports.useCallback(function(Je,vt){Rn(Je);var jt={action:vt,activeStartDate:Je,value:Mt,view:gt};Ye&&!areDatesEqual(St,Je)&&Ye(jt)},[St,Ye,Mt,gt]),Da=reactExports.useCallback(function(Je,vt){var jt=(function(){switch(gt){case"century":return Ue;case"decade":return qe;case"year":return Ie;case"month":return we;default:throw new Error("Invalid view: ".concat(gt,"."))}})();jt&&jt(Je,vt)},[we,Ue,Ie,qe,gt]),Ca=reactExports.useCallback(function(Je,vt){if(Un){Da(Je,vt);var jt=tn[tn.indexOf(gt)+1];if(!jt)throw new Error("Attempted to drill down from the lowest view.");Rn(Je),Oa(jt);var qt={action:"drillDown",activeStartDate:Je,value:Mt,view:jt};Ye&&!areDatesEqual(St,Je)&&Ye(qt),ot&>!==jt&&ot(qt),We&&We(qt)}},[St,Un,Ye,Da,We,ot,Mt,gt,tn]),Na=reactExports.useCallback(function(){if(Fo){var Je=tn[tn.indexOf(gt)-1];if(!Je)throw new Error("Attempted to drill up from the highest view.");var vt=getBegin(Je,St);Rn(vt),Oa(Je);var jt={action:"drillUp",activeStartDate:vt,value:Mt,view:Je};Ye&&!areDatesEqual(St,vt)&&Ye(jt),ot&>!==Je&&ot(jt),bt&&bt(jt)}},[St,Fo,Ye,bt,ot,Mt,gt,tn]),nl=reactExports.useCallback(function(Je,vt){var jt=Mt;Da(Je,vt);var qt=Ht&&!getIsSingleValue(jt),kt;if(Ht)if(qt)kt=getBegin(wn,Je);else{if(!jt)throw new Error("previousValue is required");if(Array.isArray(jt))throw new Error("previousValue must not be an array");kt=getValueRange(wn,jt,Je)}else kt=Gl(Je);var Aa=!Ht||qt||pe?getActiveStartDate({maxDate:me,maxDetail:Re,minDate:$e,minDetail:Le,value:kt,view:gt}):null;vt.persist(),Rn(Aa),li(kt);var na={action:"onChange",activeStartDate:Aa,value:kt,view:gt};if(Ye&&!areDatesEqual(St,Aa)&&Ye(na),ue)if(Ht){var aa=getIsSingleValue(kt);if(!aa)ue(kt||null,vt);else if(M){if(Array.isArray(kt))throw new Error("value must not be an array");ue([kt||null,null],vt)}}else ue(kt||null,vt)},[St,M,Gl,pe,me,Re,$e,Le,Ye,ue,Da,Ht,Mt,wn,gt]);function Ho(Je){Pt(Je)}function dn(){Pt(null)}reactExports.useImperativeHandle(N,function(){return{activeStartDate:St,drillDown:Ca,drillUp:Na,onChange:nl,setActiveStartDate:tl,value:Mt,view:gt}},[St,Ca,Na,nl,tl,Mt,gt]);function Ot(Je){var vt=Je?getBeginNext(gt,St):getBegin(gt,St),jt=Un?Ca:nl,qt={activeStartDate:vt,hover:Vl,locale:ve,maxDate:me,minDate:$e,onClick:jt,onMouseOver:Ht?Ho:void 0,tileClassName:ko,tileContent:Lo,tileDisabled:Wa,value:Mt,valueType:wn};switch(gt){case"century":return jsxRuntimeExports.jsx(CenturyView,__assign$1({formatYear:de,showNeighboringCentury:Fl},qt));case"decade":return jsxRuntimeExports.jsx(DecadeView,__assign$1({formatYear:de,showNeighboringDecade:ti},qt));case"year":return jsxRuntimeExports.jsx(YearView,__assign$1({formatMonth:le,formatMonthYear:re},qt));case"month":return jsxRuntimeExports.jsx(MonthView,__assign$1({calendarType:z,formatDay:ne,formatLongDate:ae,formatShortWeekday:ie,formatWeekday:se,onClickWeekNumber:Ge,onMouseLeave:Ht?dn:void 0,showFixedNumberOfWeeks:typeof zl<"u"?zl:Ja,showNeighboringMonth:Gt,showWeekNumbers:ni},qt));default:throw new Error("Invalid view: ".concat(gt,"."))}}function Vt(){return Bl?jsxRuntimeExports.jsx(Navigation,{activeStartDate:St,drillUp:Na,formatMonthYear:re,formatYear:de,locale:ve,maxDate:me,minDate:$e,navigationAriaLabel:He,navigationAriaLive:Ke,navigationLabel:Ze,next2AriaLabel:Se,next2Label:Ae,nextAriaLabel:ke,nextLabel:Ve,prev2AriaLabel:An,prev2Label:Wn,prevAriaLabel:ea,prevLabel:Qa,setActiveStartDate:tl,showDoubleView:Ja,view:gt,views:tn}):null}var ta=Array.isArray(Mt)?Mt:[Mt];return jsxRuntimeExports.jsxs("div",{className:clsx(baseClassName,Ht&&ta.length===1&&"".concat(baseClassName,"--selectRange"),Ja&&"".concat(baseClassName,"--doubleView"),H),ref:fe,children:[Vt(),jsxRuntimeExports.jsxs("div",{className:"".concat(baseClassName,"__viewContainer"),onBlur:Ht?dn:void 0,onMouseLeave:Ht?dn:void 0,children:[Ot(),Ja?Ot(!0):null]})]})});const UiCalendar=({dateParsed:j,onUpdate:R})=>{const[N,A]=reactExports.useState(j),M=z=>{const H=new Date(z);R(H),A(z)};return jsxRuntimeExports.jsx(Calendar,{value:N,onChange:M})},contain$8="FO",clockInput="tm",digit="FR",colon="gN",style$G={contain:contain$8,clockInput,digit,colon},UiTimePicker=({dateParsed:j,onUpdate:R})=>{const N=P=>String(P).padStart(2,"0"),[A,M]=reactExports.useState(N(j.getHours())),[z,H]=reactExports.useState(N(j.getMinutes())),G=P=>P.target.value="",ee=(P,ne)=>{let{value:ae}=P.target;(ae===""||!(!isNaN(parseFloat(ae))&&isFinite(ae)))&&ae>-1?ae="0":ne==="h"&&ae>23?ae="23":ne==="m"&&ae>59&&(ae="59");let le=j;ne==="h"?le.setHours(parseInt(ae)):le.setMinutes(parseInt(ae)),R(le),P.target.value=ae.padStart(2,"0")};return jsxRuntimeExports.jsxs("ul",{className:style$G.contain,children:[jsxRuntimeExports.jsx("li",{className:`${style$G.clockInput} ${style$G.digit}`,children:jsxRuntimeExports.jsx("input",{defaultValue:A,onFocus:P=>G(P),onBlur:P=>ee(P,"h")})}),jsxRuntimeExports.jsx("li",{className:style$G.colon,children:":"}),jsxRuntimeExports.jsx("li",{className:`${style$G.clockInput} ${style$G.digit}`,children:jsxRuntimeExports.jsx("input",{defaultValue:z,onFocus:P=>G(P),onBlur:P=>ee(P,"m")})})]})},months=["January","February","March","April","May","June","July","August","September","October","November","December"],parseServerTimeToString=j=>{if(!j)return"00:00";const R=new Date(j);return`${String(R.getHours()).padStart(2,"0")}:${String(R.getMinutes()).padStart(2,"0")}`},parseServerDateToString=(j,R)=>{if(!j)return!1;const N=new Date(j);return R?`${String(N.getDate()).padStart(2,"0")}.${String(N.getMonth()+1).padStart(2,"0")}.${N.getFullYear()-2e3}`:`${String(N.getDate()).padStart(2,"0")} ${months[N.getMonth()]} ${N.getFullYear()}`},parseServerDateTimeToString=(j,R)=>{const N=parseServerTimeToString(j);return`${parseServerDateToString(j,R)}${N!=="00:00"?`, ${N}`:""}`},useDatePickerModal=({dateTime:j,onUpdate:R})=>({openDatePicker:({showDate:A,showTime:M})=>{let z=new Date;z.setMinutes(0),z.setHours(0),j&&(z=new Date(j));const H=P=>{const ne=z.getMinutes(),ae=z.getHours();z=P,z.setHours(ae),z.setMinutes(ne),R(z.getTime()),FluentModal.dismissOne()},G=P=>{z.setHours(P?P.getHours():0),z.setMinutes(P?P.getMinutes():0),R(z.getTime())},ee=!(A&&M||A);new FluentModal().title(`Select ${ee?"time":"date"}...`).affirmText("Done").cancelText(!1).content(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[A&&jsxRuntimeExports.jsx(UiCalendar,{dateParsed:z,onUpdate:H}),M&&jsxRuntimeExports.jsx(UiTimePicker,{dateParsed:z,onUpdate:G}),jsxRuntimeExports.jsxs("div",{className:style$H.modalActions,children:[A&&jsxRuntimeExports.jsx(UiButton,{children:"Set Today",theme:"magic",onClick:()=>H(new Date)}),M&&jsxRuntimeExports.jsx(UiButton,{children:"Set Midnight",theme:"magic",onClick:()=>[G(),FluentModal.dismissOne()]})]})]})).dispatch()}}),UiDatePicker=({value:j,onUpdate:R,placeholderText:N,footerBarMode:A,disableUnset:M,shortDateFormat:z,useDatePicker:H,useTimePicker:G})=>{const{openDatePicker:ee}=useDatePickerModal({dateTime:j,onUpdate:R}),P=parseServerDateToString(j),ne=parseServerTimeToString(j);return jsxRuntimeExports.jsx("ul",{className:`${style$H.picker} ${A?style$H.naked:sharedStyle.input}`,children:A?jsxRuntimeExports.jsx(UiButton,{icon:"calendar",onClick:()=>ee({showDate:!0,showTime:!0}),children:parseServerDateTimeToString(j,z)}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[H&&jsxRuntimeExports.jsx(UiButton,{icon:"calendar",theme:P?"":"primary",onClick:()=>ee({showDate:!0}),children:parseServerDateToString(j,z)||N||"Select a date..."}),G&&jsxRuntimeExports.jsx(UiButton,{icon:"clock",theme:ne==="00:00"?"primary":"",onClick:()=>ee({showTime:!0}),children:ne==="00:00"?"Select a time...":ne}),j&&!M&&!A&&jsxRuntimeExports.jsx(UiButton,{onClick:()=>R(null),theme:"concern",children:"Remove"})]})})},UIEFDatePicker=({isLive:j,datePublished:R})=>{const{isMobile:N}=useMobileMediaQuery();return j&&jsxRuntimeExports.jsx(UiDatePicker,{footerBarMode:!0,shortDateFormat:N,placeholder:"Select Publish Date...",value:R||new Date().getTime(),onUpdate:A=>setGlobalFormData(M=>{const{uid:z}=queryFormDataRootProperty(M,CONSTANT.ENTITY_PROPERTY_DATE_PUBLISHED);return M[z].entryComponentProps.value=A,M})})},UIEFStatus=({isNowPastPublishDate:j,isLive:R})=>jsxRuntimeExports.jsx(UiButton,{theme:R?"optimistic":"cautious",icon:R?j?"globe":"clock":"eye-off",children:R?j?"Public":"Scheduled":"Private",onClick:()=>setGlobalFormData(N=>{const{uid:A,entryComponentProps:M}=queryFormDataRootProperty(N,CONSTANT.ENTITY_PROPERTY_LIVE_STATUS);return N[A].entryComponentProps.value=!M.value,N})}),UIEFSaveButton=({isLive:j,changesMade:R})=>jsxRuntimeExports.jsx(UiButton,{onClick:()=>uiEditorDispatchEvent(EDITOR_REQUEST_SUBMIT_FORM),theme:"primary",icon:"save",children:j?"Publish":"Save",disabled:!R}),preview$1="kj",iframe="_21",hidden="_9G",buttonWrap="wO",style$F={preview:preview$1,iframe,hidden,buttonWrap},UIEFPreviewButton=()=>{const[j]=useSharedState(CONSTANT.FORM_DATA_KEY),[R]=useSharedState(CONSTANT.UI_CHANGES_MADE),[N,A]=reactExports.useState(null),[M,z]=reactExports.useState(!1),H=queryFormDataRootProperty(j,CONSTANT.ENTITY_PROPERTY_PERMALINK)?.entryComponentProps?.value,G=()=>{const{previewApiUrl:ee,contentTypeSlug:P}=getPageStorage();z(!0),fetchPost(ee,{taxonomy:P,formData:j}).then(({previewUrl:ae})=>A(ae)).catch(()=>{})};return reactExports.useEffect(()=>{M?lockScreen():unlockScreen()},[M]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[N&&jsxRuntimeExports.jsxs("div",{className:style$F.preview,children:[jsxRuntimeExports.jsx("iframe",{src:N,className:`${style$F.iframe} ${M&&style$F.hidden}`,onLoad:()=>z(!1)}),jsxRuntimeExports.jsx("div",{className:style$F.buttonWrap,children:jsxRuntimeExports.jsx(UiButton,{onClick:()=>A(null),icon:"minimize-2",children:"Close"})})]}),R?jsxRuntimeExports.jsx(UiButton,{onClick:G,icon:"zoom-in",children:"Preview"}):jsxRuntimeExports.jsx(UiButton,{to:H,target:"_blank",icon:"external-link",children:N})]})},UIEFSidebarToggle=()=>jsxRuntimeExports.jsx(UiButton,{icon:"sidebar",onClick:()=>uiEditorDispatchEvent(EDITOR_TOGGLE_SEGUE),title:"Toggle sidebar"}),UIEFooterBar=()=>{const[j]=useSharedState(CONSTANT.UI_CHANGES_MADE),[R]=useSharedState(CONSTANT.FORM_DATA_KEY),{isMobile:N}=useMobileMediaQuery(),A=queryFormDataRootProperty(R,CONSTANT.ENTITY_PROPERTY_DATE_PUBLISHED)?.entryComponentProps?.value,M=!!queryFormDataRootProperty(R,CONSTANT.ENTITY_PROPERTY_LIVE_STATUS)?.entryComponentProps?.value,z=A<=new Date().getTime();return jsxRuntimeExports.jsxs(UiFooterBar,{children:[!N&&jsxRuntimeExports.jsx(UIEFSidebarToggle,{}),jsxRuntimeExports.jsx(UIEFPreviewButton,{}),jsxRuntimeExports.jsx("div",{className:style$J.buttonFlexGrow}),jsxRuntimeExports.jsx(UIEFDatePicker,{isLive:M,datePublished:A}),jsxRuntimeExports.jsx(UIEFStatus,{isLive:M,datePublished:A,isNowPastPublishDate:z}),jsxRuntimeExports.jsx(UIEFSaveButton,{isLive:M,changesMade:j,isNowPastPublishDate:z})]})},contain$7="cG",selected$1="Xa",errored="IK",blockStyle={contain:contain$7,selected:selected$1,errored},outer="Bi",clickable="Nm",blockContain="W7",refreshing="O-",visible="NY",style$E={outer,clickable,blockContain,refreshing,visible},light="o-",red="ms",yellow="B6",orange="w-",blue="_5e",off="_0s",green="y-",pulsing="_2I",style$D={light,red,yellow,orange,blue,off,green,pulsing},Light=({color:j,animation:R})=>jsxRuntimeExports.jsx("div",{className:`${style$D.light} ${j&&(style$D[j]??"")} ${R&&(style$D[R]??"")}`}),ShadowPreview=({isRefreshing:j,isErrored:R,onClick:N,html:A})=>{const{previewAssetCss:M,previewAssetJs:z}=getPageStorage();return jsxRuntimeExports.jsxs("div",{className:`${style$E.outer} ${N&&style$E.clickable}`,onClick:N,children:[jsxRuntimeExports.jsx("div",{className:`${style$E.refreshing} ${(j||R)&&style$E.visible}`,children:jsxRuntimeExports.jsx(Light,{color:R?"red":"orange",animation:"pulsing"})}),jsxRuntimeExports.jsx("div",{className:style$E.blockContain,children:jsxRuntimeExports.jsx(ReactShadowRoot,{mode:"closed",className:!0,children:jsxRuntimeExports.jsxs("div",{className:"cms",children:[jsxRuntimeExports.jsx("link",{type:"text/css",rel:"stylesheet",href:M}),jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:A}}),jsxRuntimeExports.jsx("script",{type:"application/javascript",src:z})]})})})]})},contain$6="mI",selected="Rc",invert="_2H",label="wX",style$C={contain:contain$6,selected,invert,label},lockedPermission="xT",style$B={lockedPermission},LockedPermission=({text:j,title:R,icon:N="lock"})=>jsxRuntimeExports.jsxs("div",{className:style$B.lockedPermission,title:R,children:[jsxRuntimeExports.jsx(Icon,{icon:N}),j&&jsxRuntimeExports.jsx("p",{children:"This block cannot be modified"})]}),BlockButtons=({uid:j,contextMenuFn:R,onLabelClick:N,blockLabel:A,isFirst:M,isLast:z,isErrored:H,isSelected:G,isRefreshing:ee,invert:P})=>{const{userCanRearrangeBlocks:ne}=getPageStorage();return jsxRuntimeExports.jsxs("div",{className:`${style$C.contain} ${G&&style$C.selected} ${P&&style$C.invert}`,children:[A&&jsxRuntimeExports.jsxs("div",{className:style$C.label,onClick:N,children:[H&&jsxRuntimeExports.jsx(Icon,{icon:"alert-circle"}),A]}),ne?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UiButton,{icon:"copy",size:"small",title:"Duplicate",theme:"primary",disabled:ee,onClick:()=>uiEditorDispatchEvent(EDITOR_BLOCK_DUPLICATE,j)}),jsxRuntimeExports.jsx(UiButton,{icon:"trash",size:"small",title:"Remove",theme:"concern",disabled:ee&&!H,onClick:()=>uiEditorDispatchEvent(EDITOR_BLOCK_DISCARD,j)}),jsxRuntimeExports.jsx(UiButton,{icon:"arrow-up",size:"small",title:"Move up",onClick:()=>uiEditorDispatchEvent(EDITOR_BLOCK_MOVE_UP,j),disabled:M}),jsxRuntimeExports.jsx(UiButton,{icon:"arrow-down",size:"small",title:"Move down",onClick:()=>uiEditorDispatchEvent(EDITOR_BLOCK_MOVE_DOWN,j),disabled:z}),jsxRuntimeExports.jsx(UiButton,{icon:"more-vertical",size:"small",title:"Options",onClick:R})]}):jsxRuntimeExports.jsx(LockedPermission,{title:"This block cannot be modified"})]})},item$1="zp",itemHead$1="zt",flexGrow="ws",preview="LB",style$A={item:item$1,itemHead:itemHead$1,flexGrow,preview},BlockClipboard=({pasteAtUid:j})=>{let[R,N]=reactExports.useState(getClipboard());const A=(G,ee,P=!1)=>{uiEditorDispatchEvent(EDITOR_CLIPBOARD_BLOCK_PASTE,{blockBlueprint:R[G],pasteAtUid:j,...ee}),FluentModal.dismissOne(),P&&M()},M=G=>{removeFromClipboard(G),N(ee=>ee.filter((P,ne)=>ne!==G)),getClipboard().length||FluentModal.dismissAll()},z=()=>new FluentModal().alert("Clear all clipboard items?").affirmText("Clear").affirmTheme("concern").onAffirm(()=>{clearClipboard(),FluentModal.dismissAll()}).dispatch(),{availableTemplateBlockKeys:H}=getPageStorage();return!clipboardIsEmpty()&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(UiButton,{theme:"concern",icon:"trash",children:"Discard all from clipboard",onClick:z})}),R.reverse().map((G,ee)=>{const P=Math.min(...Object.keys(G).map(le=>parseInt(le))),ne=G[P];ne.html=ne.entryComponentProps.html,ne.name=ne.entryComponentProps.name,ne.label=ne.entryComponentProps.labelText;const ae=H.includes(ne.name);return jsxRuntimeExports.jsxs("div",{className:style$A.item,children:[jsxRuntimeExports.jsxs("div",{className:style$A.itemHead,children:[jsxRuntimeExports.jsxs("h4",{children:['Block "',ne.label||ne.name," ",!ae&&"(incompatible)",'"']}),jsxRuntimeExports.jsx("div",{className:style$A.flexGrow}),jsxRuntimeExports.jsx(UiButton,{icon:"clipboard",children:"Paste",onClick:()=>A(ee,ne),disabled:!ae}),jsxRuntimeExports.jsx(UiButton,{icon:"clipboard",children:"Paste & Discard",onClick:()=>A(ee,ne,!0)}),jsxRuntimeExports.jsx(UiButton,{theme:"concern",icon:"trash",children:"Discard",onClick:()=>M(ee)})]}),jsxRuntimeExports.jsx("div",{className:style$A.preview,children:!!ne.html&&jsxRuntimeExports.jsx(ShadowPreview,{html:ne.html})})]},ee)})]})},openClipboardToPasteAtUid=(j=null)=>{new FluentModal().fullscreen().title("Clipboard").affirmText(!1).cancelText("Return to editor").content(jsxRuntimeExports.jsx(BlockClipboard,{pasteAtUid:j})).dispatch()},getClipboard=()=>getLocalStorageVar(CONSTANT.UI_EDITOR_BLOCKS_CLIPBOARD)||[],setClipboard=j=>setLocalStorageVar(CONSTANT.UI_EDITOR_BLOCKS_CLIPBOARD,j(getClipboard())),saveToClipboard=j=>{setClipboard(R=>(R.push(j),R))},removeFromClipboard=j=>{setClipboard(R=>(R.splice(j,1),R))},clearClipboard=()=>setClipboard(()=>[]),clipboardIsEmpty=()=>!getClipboard().length;function scrollIntoView(j,R){const N={behavior:"smooth",block:"center",inline:"nearest"};j.scrollIntoView(Object.assign(N,R))}const useClipboardContext=({uid:j,formData:R,blockName:N})=>{const{userCanAddBlocks:A,userCanRearrangeBlocks:M}=getPageStorage();return z=>{const H=new FluentContextMenu(z);A&&M?(H.button().text("Copy to clipboard").onSelect(()=>{const G=queryRecursivePropertiesOfUid(R,j);G[j]=R[j],saveToClipboard(G)}),clipboardIsEmpty()||H.button().text("Paste from clipboard...").onSelect(()=>openClipboardToPasteAtUid(j)),H.divider(),H.button().text("Remove").icon("trash").theme("concern").onSelect(()=>uiEditorDispatchEvent(EDITOR_BLOCK_DISCARD,j))):H.button().text(`Block: ${N}`),H.dispatch()}};let fetchTimeout;const useLivePreview=({blockName:j,html:R,uid:N,setFormErrors:A})=>{const{contentTypeSlug:M,contentTypeId:z,previewBlockApiUrl:H}=getPageStorage(),[G,ee]=reactExports.useState(R),[P,ne]=reactExports.useState(!1);return uiEditorOnEvent(`${EDITOR_BLOCK_FORM_UID_UPDATED}-${N}`,()=>{ne(!0),clearTimeout(fetchTimeout),fetchTimeout=setTimeout(()=>{const ae={name:j,formData:queryRecursivePropertiesOfUid(getFormData(),N),contentTypeSlug:M,contentTypeId:z};fetchPost(H,ae,{disableUiLock:!0}).then(({html:le,errors:re})=>{Object.keys(re).length?A(ie=>({...ie,...re})):(A(ie=>(Object.keys(ae.formData).forEach(de=>delete ie[de]),{...ie})),ee(le),ne(!1))}).catch(()=>{})},1e3)}),{previewHtml:G,setPreviewHtml:ee,isRefreshing:P,setIsRefreshing:ne}},useScrollToBlock=({uid:j,refFocusElement:R})=>{uiEditorOnEvent(`${EDITOR_BLOCK_FOCUS_REQUEST}-${j}`,()=>{scrollIntoView(R.current)})},useBlockHovering=()=>{const j=reactExports.useRef(),[R,N]=reactExports.useState(!1);return reactExports.useEffect(()=>{const A=()=>N(!0),M=()=>N(!1),{current:z}=j;return z.addEventListener("mouseenter",A),z.addEventListener("mouseleave",M),()=>{z.removeEventListener("mouseenter",A),z.removeEventListener("mouseleave",M)}},[]),{isInFocus:R,setIsInFocus:N,refFocusElement:j}},clickOnBackground=j=>{},Block=({entryComponentProps:j,isFirst:R,isLast:N,uid:A})=>{const{html:M,label:z,name:H}=j,{contentTypeSlug:G,contentTypeId:ee}=getPageStorage(),[P]=useSharedState(CONSTANT.FORM_DATA_KEY),[ne,ae]=useSharedState(CONSTANT.FORM_ERRORS_KEY),[le]=useSharedState(CONSTANT.UI_EDITOR_ACTIVE_BLOCK_FORM_UID),[re]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_POSITION_INVERT),[ie]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_DOCKED),se=useClipboardContext({uid:A,formData:P,blockName:H}),{isInFocus:de,refFocusElement:ge}=useBlockHovering(),{previewHtml:pe,isRefreshing:fe}=useLivePreview({blockName:H,html:M,setFormErrors:ae,uid:A});useScrollToBlock({uid:A,refFocusElement:ge});const ve=!!Object.keys(queryRecursivePropertiesOfUid(P,A)).filter(Re=>Object.keys(ne).includes(Re)).length,je=parseInt(le)===parseInt(A),me=!re&&!ie,xe=`${blockStyle.contain} ${ve&&blockStyle.errored} ${je&&blockStyle.selected}`;return jsxRuntimeExports.jsxs("div",{className:xe,ref:ge,onContextMenu:se,children:[jsxRuntimeExports.jsx(BlockButtons,{invert:me,onLabelClick:()=>uiEditorDispatchEvent(EDITOR_BLOCK_SELECTED,{uid:A}),contextMenuFn:se,blockLabel:z||"Block",uid:A,isInFocus:de,isSelected:je,isFirst:R,isLast:N,isErrored:ve,isRefreshing:fe}),jsxRuntimeExports.jsx(ShadowPreview,{html:pe,onClick:()=>uiEditorDispatchEvent(EDITOR_BLOCK_SELECTED,{uid:A}),isErrored:ve,isRefreshing:fe})]})},contain$5="Jx",style$z={contain:contain$5},blocks="Xh",blockStyleOverride="EU",style$y={blocks,blockStyleOverride},BIList=({setIsExpanded:j,formData:R,order:N})=>{const{entryComponentProps:A}=queryFormDataRootProperty(R,CONSTANT.FIELD_KEY_TEMPLATE_BLOCKS),{templateBlockBlueprint:M}=A,z=(H,G)=>{j(ee=>!ee),uiEditorDispatchEvent(EDITOR_BLOCK_ADD,{blockKey:H,order:G})};return jsxRuntimeExports.jsx("div",{className:`${blockStyle.contain} ${style$y.blockStyleOverride}`,children:jsxRuntimeExports.jsx("ul",{className:style$y.blocks,children:Object.keys(M).map(H=>{const{label:G}=M[H];return jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(UiButton,{size:"small",onClick:()=>z(H,N),children:G})},H)})})})},BlockInsert=({formData:j,order:R})=>{const{userCanAddBlocks:N}=getPageStorage();if(!N)return null;const A=reactExports.createRef(),[M,z]=reactExports.useState(!1),H=()=>{z(ee=>!ee),M||scrollIntoView(A.current,"top")},G=`${style$z.contain} ${M&&style$z.isExpanded}`;return jsxRuntimeExports.jsxs("div",{className:G,ref:A,children:[jsxRuntimeExports.jsx(UiButton,{icon:M?"x":"plus",onClick:H,title:"Insert block"}),M&&jsxRuntimeExports.jsx(BIList,{setIsExpanded:z,order:R,formData:j})]})},UIEBlocksInterface=()=>{const[j]=useSharedState(CONSTANT.FORM_DATA_KEY),R=queryTemplateBlockRows(j),{isMobile:N}=useMobileMediaQuery();return jsxRuntimeExports.jsxs("div",{className:style$K.body,onClick:clickOnBackground,children:[jsxRuntimeExports.jsxs(Padding,{horizontal:!N,vertical:!N,children:[jsxRuntimeExports.jsx(BlockInsert,{formData:j,order:-2}),Object.keys(R).sort((A,M)=>R[A].entryComponentProps.order-R[M].entryComponentProps.order).map((A,M)=>jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsx(Block,{isFirst:M===0,isLast:M===Object.keys(R).length-1,...R[A],uid:parseInt(A)}),jsxRuntimeExports.jsx(BlockInsert,{formData:j,order:M})]},A))]}),!N&&jsxRuntimeExports.jsx(UIEFooterBar,{})]})},emptiness="fe",list$1="pk",errorIcon="_73",style$x={emptiness,list:list$1,errorIcon},UIESISegueBlocksList=({blockRows:j,formErrors:R,formData:N})=>{const A=Object.keys(j);return jsxRuntimeExports.jsx(Padding,{vertical:!0,children:A.length?jsxRuntimeExports.jsx("ul",{className:style$x.list,children:A.sort((M,z)=>j[M].entryComponentProps.order-j[z].entryComponentProps.order).map(M=>{const z=!!getErrorCountOfBlock({formData:N,formErrors:R,uid:M});return jsxRuntimeExports.jsxs("li",{onClick:()=>uiEditorDispatchEvent(EDITOR_BLOCK_SELECTED,{uid:M}),children:[jsxRuntimeExports.jsx("span",{children:j[M].entryComponentProps.label}),z&&jsxRuntimeExports.jsx("div",{className:style$x.errorIcon,children:jsxRuntimeExports.jsx(Icon,{icon:"alert-circle"})})]},M)})}):jsxRuntimeExports.jsx("p",{className:style$x.emptiness,children:"No blocks to display"})})};function getErrorCountOfBlock({formData:j,formErrors:R,uid:N}){return Object.keys(queryRecursivePropertiesOfUid(j,N)).filter(A=>Object.keys(R).includes(A)).length}const UIESISegueBlocks=()=>{const[j]=useSharedState(CONSTANT.FORM_DATA_KEY),[R]=useSharedState(CONSTANT.FORM_ERRORS_KEY),[N,A]=useSharedState(CONSTANT.UI_EDITOR_ACTIVE_BLOCK_FORM_UID);function M(ae,le=null){uiEditorDispatchEvent(`${EDITOR_BLOCK_FORM_UID_UPDATED}-${N}`),setGlobalFormData(ae,le)}const z=queryTemplateBlockRows(j),H=ae=>cloneFormData(j,le=>le.parentUid===parseInt(ae)),G=!!z[N],{isMobile:ee}=useMobileMediaQuery(),P=()=>jsxRuntimeExports.jsx(UiForm,{isSegueInterface:!0,formData:H(N),formDataUpdateHandler:M,formDataQueryHandler:ae=>ae(j),formErrors:R}),ne=queryFormDataRootProperty(j,CONSTANT.ENTITY_PROPERTY_TITLE).entryComponentProps.value;return reactExports.useEffect(()=>{if(N){const ae=z[N].entryComponentProps.label;emitSegueHeaderTitleUpdate({title:ae,preTitle:"Blocks"})}else emitSegueHeaderTitleUpdate({title:"Blocks",preTitle:ne})},[N]),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{className:style$L.wrapForm,children:[G&&jsxRuntimeExports.jsxs("div",{className:style$L.miniBlockHead,children:[jsxRuntimeExports.jsx(UiButton,{size:"small",icon:"chevron-left",theme:"primary",children:"Back",onClick:()=>A(!1)}),jsxRuntimeExports.jsx("span",{children:z[N].label})]}),jsxRuntimeExports.jsx(Padding,{horizontal:!0,children:ee?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[G&&P(),jsxRuntimeExports.jsx("div",{className:`${style$L.mobileBlockViewWrap} ${ee&&G&&style$L.hide}`,children:jsxRuntimeExports.jsx(UIEBlocksInterface,{})})]}):G?P():jsxRuntimeExports.jsx(UIESISegueBlocksList,{formData:j,formErrors:R,blockRows:z})})]})})};UIESISegueBlocks.title="Blocks",UIESISegueBlocks.icon="server",UIESISegueBlocks.filterFn=(j,R,N)=>{const A=queryFormDataRootProperty(R,CONSTANT.FIELD_KEY_TEMPLATE_BLOCKS).uid;return Object.keys(queryRecursivePropertiesOfUid(R,A)).filter(M=>Object.keys(N).includes(M))};const segues={UIESISegueDefault,UIESISegueSeo,UIESISegueBlocks},UIESegueInterface=()=>{const[j]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_INDEX),[R]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_DOCKED),[N]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_POSITION_INVERT),[A,M]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_MINIMISED),[z,H]=useSharedState(CONSTANT.UI_EDITOR_SEGUE_VISIBLE),{isMobile:G}=useMobileMediaQuery();uiEditorOnEvent(EDITOR_TOGGLE_SEGUE,()=>{H(le=>!le),M(!1)});const ee=()=>{let le=`${style$P.contain} ${z&&style$P.isVisible} ${!R&&style$P.isFloating} ${style$P[`i${j}`]}`;return A&&(le=`${le} ${style$P.isMinimised}`),N&&(le=`${le} ${style$P.isInverted}`),le},P=()=>{},ne=()=>!R&&M(!1),ae=segues[j];return jsxRuntimeExports.jsxs("div",{className:ee(),onMouseLeave:P,onMouseEnter:ne,children:[jsxRuntimeExports.jsx(UIESIHeader,{}),jsxRuntimeExports.jsxs("div",{className:style$P.body,children:[jsxRuntimeExports.jsx(ae,{segueIndex:j,...ae}),jsxRuntimeExports.jsx(UIESIFooter,{})]}),G&&jsxRuntimeExports.jsx(UIEFooterBar,{})]})};function useDidUpdateEffect(j,R){const N=reactExports.useRef(!1);reactExports.useEffect(()=>{if(N.current)return j();N.current=!0},R)}const getLocalStorageSidebarVisibility=()=>{const j=CONSTANT.UI_EDITOR_SEGUE_VISIBLE,R=getLocalStorageVar(j);return typeof R>"u"||R===null?(setLocalStorageVar(j),!0):R},UiEditor=()=>{const{isMobile:j}=useMobileMediaQuery(),R=useEditorFormData(),[N,A]=useSharedStateCreator(CONSTANT.UI_EDITOR_ACTIVE_BLOCK_FORM_UID,!1),[,M]=useSharedStateCreator(CONSTANT.UI_EDITOR_SEGUE_INDEX,Object.keys(segues)[0]),[z,H]=useSharedStateCreator(CONSTANT.UI_EDITOR_SEGUE_VISIBLE,getLocalStorageSidebarVisibility()),[G]=useSharedStateCreator(CONSTANT.UI_EDITOR_SEGUE_DOCKED,getLocalStorageVar(CONSTANT.UI_EDITOR_SEGUE_DOCKED)??!0),[ee]=useSharedStateCreator(CONSTANT.UI_EDITOR_SEGUE_POSITION_INVERT,getLocalStorageVar(CONSTANT.UI_EDITOR_SEGUE_POSITION_INVERT)),[P,ne]=useSharedStateCreator(CONSTANT.UI_EDITOR_SEGUE_MINIMISED,getLocalStorageVar(CONSTANT.UI_EDITOR_SEGUE_MINIMISED));return useUiEditorAutoSave(R),useDidUpdateEffect(()=>setLocalStorageVar(CONSTANT.UI_EDITOR_SEGUE_VISIBLE,z),[z]),useDidUpdateEffect(()=>setLocalStorageVar(CONSTANT.UI_EDITOR_SEGUE_DOCKED,G),[G]),useDidUpdateEffect(()=>setLocalStorageVar(CONSTANT.UI_EDITOR_SEGUE_POSITION_INVERT,ee),[ee]),useDidUpdateEffect(()=>setLocalStorageVar(CONSTANT.UI_EDITOR_SEGUE_MINIMISED,P),[P]),useUiEditorEvents({...R,setEditingFormUid:A,setIsSegueMinimised:ne,setSegueIndex:M,setIsSegueVisible:H}),jsxRuntimeExports.jsxs("main",{className:`${style$Q.layout} ${ee&&style$Q.inverted}`,children:[jsxRuntimeExports.jsx(UIESegueInterface,{}),!j&&jsxRuntimeExports.jsx(UIEBlocksInterface,{})]})},ViewUiFormBlockEditor=()=>jsxRuntimeExports.jsx(UiEditor,{}),listingContainer="_3T",style$w={listingContainer},empty="_4a",style$v={empty},row="w1",header$1="tN",body$1="L4",cellWrap="aH",link="-Q",style$u={row,header:header$1,body:body$1,cellWrap,link},UiListingRow=({header:j,children:R})=>{const N=`${style$u.row} ${style$u[j?"header":"body"]}`;return jsxRuntimeExports.jsx("div",{className:N,children:R})};function uiListingHeaderContextMenu({e:j,uiListingController:R}){const{rows:N,selectedRowIds:A,setSelectedRowIds:M}=R,{deleteApiUrl:z}=getPageStorage(),H=new FluentContextMenu(j);A.length{M(()=>N.map(G=>G.identifyingId))}),A.length>0&&H.button("Deselect all").icon("x-square").onSelect(()=>{M(()=>[])}),A.length>0&&(H.divider(),H.button(`Delete ${A.length} items...`).theme("concern").icon("trash").onSelect(()=>{new FluentModal().alert(`Delete the selected ${A.length} items?`).affirmTheme("concern").affirmText("Yes, delete").onAffirm(()=>fetchDelete(z.replace("%s",A.join(",")),{}).then(()=>{}).catch(()=>{})).dispatch()})),H.dispatch()}const UiListingHeader=({uiListingController:j})=>{const{rows:R,columns:N}=j,{emptyText:A}=getPageStorage(),M=({slug:z,label:H})=>{if(z===CONSTANT.UI_LISTING_COLUMN_SLUG_SELECTION){const G=ee=>uiListingHeaderContextMenu({e:ee,uiListingController:j});return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(UiButton,{size:"small",icon:"more-horizontal",onClick:G,fullwidth:!0})},z)}return jsxRuntimeExports.jsx("div",{children:H},z)};return R.length?jsxRuntimeExports.jsx(UiListingRow,{columns:N,header:!0,children:N.map(M)}):jsxRuntimeExports.jsxs("div",{className:style$v.empty,children:[jsxRuntimeExports.jsx(Icon,{icon:"sunset"}),jsxRuntimeExports.jsx("p",{children:A})]})},listingFooter="VY",style$t={listingFooter},wrap="Ab",hide="_0O",input$1="xf",style$s={wrap,hide,input:input$1},UiListingPaginator=()=>{const{paginator:j,interpolatingUrl:R}=getPageStorage();if(!j)return null;const{pageIndex:N,totalPages:A,canGoToNextPage:M,canGoToPreviousPage:z,postsTotal:H,postsPerPage:G,totalOnThisPage:ee}=j,P=reactExports.useRef();reactExports.useEffect(()=>{const{paginator:le}=getPageStorage(),{pageIndex:re}=le;P.current.value=re},[j]);const ne=le=>{const re=parseInt(le.target.value);function ie(){le.target.value=N}if(isNaN(re)||re<1||re>A||re===N)return ie();const se=interpolateUrl(R,{page:re});routeTo(se)},ae=M||z;return jsxRuntimeExports.jsxs("div",{className:`${style$s.wrap} ${!ae&&style$s.hide}`,children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(UiButton,{icon:"chevron-left",title:"Previous",onClick:()=>routeTo(z),disabled:!z})}),jsxRuntimeExports.jsx("input",{ref:P,type:"text",defaultValue:N,onFocus:le=>le.target.value="",onBlur:ne,className:`${sharedStyle.input} ${style$s.input}`}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(UiButton,{icon:"chevron-right",title:"Previous",onClick:()=>routeTo(M),disabled:!M})})]})},UiListingFooter=()=>jsxRuntimeExports.jsx("div",{className:style$t.listingFooter,children:jsxRuntimeExports.jsx(UiListingPaginator,{onPageChange:alert})});let reorderTimeout=null;function useUiListingController({columns:j,rows:R}){const{orderApiUrl:N}=getPageStorage(),[A,M]=reactExports.useState(R),[z,H]=reactExports.useState([]),G={"--grid-template-columns":reactExports.useMemo(()=>j.map(({cellWidth:ae,cellComponent:le})=>ae||uiListingCells[le]?.defaultWidth||"auto").join(" "),[j])},ee=ae=>{ae.forEach((le,re)=>{le._order=re}),M(()=>[...ae])},P=()=>{clearTimeout(reorderTimeout)},ne=()=>{reorderTimeout=setTimeout(()=>{const ae={idsOrder:A.sort(orderItemsSortFn).map(le=>le.identifyingId)};fetchPost(N,ae).then(()=>{}).catch(()=>{})},1e3)};return reactExports.useEffect(()=>(M(R),H([]),()=>{clearTimeout(reorderTimeout)}),[R]),{columns:j,rows:A,setRows:M,rowStyle:G,onStartReorder:P,onEndReorder:ne,onSetReorder:ee,selectedRowIds:z,setSelectedRowIds:H}}const grip="uM",style$r={grip},UiListingRowItem=({row:j,uiListingController:R})=>{const{rowColumnProps:N,routeUrl:A}=j,{columns:M,selectedRowIds:z,setSelectedRowIds:H}=R;return jsxRuntimeExports.jsx(UiListingRow,{columns:M,children:M.map((G,ee)=>{const{cellComponent:P,cellAlign:ne,cellClickableZone:ae,slug:le}=G,re=uiListingCells[P]??null,ie=N[ee];if(le===CONSTANT.UI_LISTING_COLUMN_SLUG_SELECTION){const se=z.includes(j.identifyingId);Object.assign(ie,{checked:se,onSelectionToggle(){H(se?de=>de.filter(ge=>ge!==j.identifyingId):de=>[...de,j.identifyingId])}})}return re&&jsxRuntimeExports.jsxs("div",{className:style$u.cellWrap,style:{justifyContent:ne||"flex-start"},children:[A&&!ae&&jsxRuntimeExports.jsx("div",{onClick:()=>routeTo(A),className:style$u.link}),jsxRuntimeExports.jsx(re,{...ie})]},le)})})},UiListingBody=({uiListingController:j})=>{const{rows:R,onStartReorder:N,onEndReorder:A,onSetReorder:M}=j,z=R.map(H=>jsxRuntimeExports.jsx(UiListingRowItem,{row:H,uiListingController:j},H.uid));return jsxRuntimeExports.jsx(distExports.ReactSortable,{list:R,setList:M,onStart:N,onEnd:A,handle:`.${style$r.grip}`,animation:200,children:z})},filtersWrap="Dm",labelTag="ob",style$q={filtersWrap,labelTag},UISelect=({groupedOptions:j,options:R,placeholder:N,onChange:A,defaultValue:M,disablePlaceholder:z,required:H})=>{const[G,ee]=reactExports.useState(M),P=ne=>{ee(ne.target.value),A(ne)};return jsxRuntimeExports.jsxs("select",{onChange:P,defaultValue:M,className:`${sharedStyle.input} ${!G&&sharedStyle.isPlaceholder}`,children:[!z&&(!H||!G)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("option",{value:"",children:G?"Deselect...":N}),jsxRuntimeExports.jsx("hr",{})]}),j?j.map(({label:ne,options:ae})=>jsxRuntimeExports.jsx("optgroup",{label:ne,children:Object.keys(ae).map(le=>{const re=ae[le];return jsxRuntimeExports.jsx("option",{value:le,children:re},le)})},ne)):Object.keys(R).map(ne=>jsxRuntimeExports.jsx("option",{value:ne,children:R[ne]},ne))]})},UiListingFilters=()=>{const[j,R]=reactExports.useState(!1),[N,A]=reactExports.useState(!0);useActionListener(CONSTANT.ACTION_BUTTON_TOGGLE_LISTING_FILTERS,()=>{R(z=>!z)});const M={"Live Status":"Live Status"};return reactExports.useEffect(()=>listen("filter",()=>{R(z=>!z)}),[]),j&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:!0,children:jsxRuntimeExports.jsx("p",{children:"Applying 2 filters..."})}),jsxRuntimeExports.jsxs("div",{className:style$q.filtersWrap,children:[jsxRuntimeExports.jsx(UISelect,{options:M,placeholder:"Select column"}),jsxRuntimeExports.jsx(UISelect,{options:{eq:"Is equal to",con:"Contains",notcon:"Does not contain"},placeholder:"Select clause"}),jsxRuntimeExports.jsx(UISelect,{options:{true:"True",false:"False"},placeholder:"Select value"}),jsxRuntimeExports.jsx(UiButton,{icon:"plus-circle",theme:"optimistic",children:"Add Filter"}),jsxRuntimeExports.jsx(UiButton,{icon:"layers",onClick:()=>A(!N),children:N?"Match All":"Match Any"})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{className:style$q.labelTag,children:['Title contains "Brad" ',jsxRuntimeExports.jsx(UiButton,{icon:"x",size:"small"})]})})]})},UiListing=j=>{const R=useUiListingController(j),{rowStyle:N}=R;return jsxRuntimeExports.jsxs("div",{style:N,className:style$w.listingContainer,children:[jsxRuntimeExports.jsx(UiListingFilters,{}),jsxRuntimeExports.jsx(UiListingHeader,{uiListingController:R}),jsxRuntimeExports.jsx(UiListingBody,{uiListingController:R}),jsxRuntimeExports.jsx(UiListingFooter,{})]})},ViewUiListing=()=>{const{uiListing:j}=getPageStorage();return jsxRuntimeExports.jsx(Padding,{horizontal:!0,flexGrow:!0,children:jsxRuntimeExports.jsx(UiListing,{...j})})},palette="yy",paletteModal="xK",paletteDisc="sx",transparent="A4",previewBar="Gr",col="Uf",style$p={palette,paletteModal,paletteDisc,transparent,previewBar,col};function u(){return(u=Object.assign||function(j){for(var R=1;R=0||(M[N]=j[N]);return M}function i(j){var R=reactExports.useRef(j),N=reactExports.useRef(function(A){R.current&&R.current(A)});return R.current=j,N.current}var s$1=function(j,R,N){return R===void 0&&(R=0),N===void 0&&(N=1),j>N?N:j0:de.buttons>0)&&M.current?z(d(M.current,de,G.current)):se(!1)},ie=function(){return se(!1)};function se(de){var ge=ee.current,pe=v(M.current),fe=de?pe.addEventListener:pe.removeEventListener;fe(ge?"touchmove":"mousemove",re),fe(ge?"touchend":"mouseup",ie)}return[function(de){var ge=de.nativeEvent,pe=M.current;if(pe&&(h(ge),!(function(ve,je){return je&&!f(ve)})(ge,ee.current)&&pe)){if(f(ge)){ee.current=!0;var fe=ge.changedTouches||[];fe.length&&(G.current=fe[0].identifier)}pe.focus(),z(d(pe,ge,G.current)),se(!0)}},function(de){var ge=de.which||de.keyCode;ge<37||ge>40||(de.preventDefault(),H({left:ge===39?.05:ge===37?-.05:0,top:ge===40?.05:ge===38?-.05:0}))},se]},[H,z]),ne=P[0],ae=P[1],le=P[2];return reactExports.useEffect(function(){return le},[le]),React.createElement("div",u({},A,{onTouchStart:ne,onMouseDown:ne,className:"react-colorful__interactive",ref:M,onKeyDown:ae,tabIndex:0,role:"slider"}))}),g=function(j){return j.filter(Boolean).join(" ")},p=function(j){var R=j.color,N=j.left,A=j.top,M=A===void 0?.5:A,z=g(["react-colorful__pointer",j.className]);return React.createElement("div",{className:z,style:{top:100*M+"%",left:100*N+"%"}},React.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:R}}))},b=function(j,R,N){return R===void 0&&(R=0),N===void 0&&(N=Math.pow(10,R)),Math.round(N*j)/N},x=function(j){return L(C(j))},C=function(j){return j[0]==="#"&&(j=j.substring(1)),j.length<6?{r:parseInt(j[0]+j[0],16),g:parseInt(j[1]+j[1],16),b:parseInt(j[2]+j[2],16),a:j.length===4?b(parseInt(j[3]+j[3],16)/255,2):1}:{r:parseInt(j.substring(0,2),16),g:parseInt(j.substring(2,4),16),b:parseInt(j.substring(4,6),16),a:j.length===8?b(parseInt(j.substring(6,8),16)/255,2):1}},w=function(j){return K(I(j))},y=function(j){var R=j.s,N=j.v,A=j.a,M=(200-R)*N/100;return{h:b(j.h),s:b(M>0&&M<200?R*N/100/(M<=100?M:200-M)*100:0),l:b(M/2),a:b(A,2)}},q=function(j){var R=y(j);return"hsl("+R.h+", "+R.s+"%, "+R.l+"%)"},I=function(j){var R=j.h,N=j.s,A=j.v,M=j.a;R=R/360*6,N/=100,A/=100;var z=Math.floor(R),H=A*(1-N),G=A*(1-(R-z)*N),ee=A*(1-(1-R+z)*N),P=z%6;return{r:b(255*[A,G,H,H,ee,A][P]),g:b(255*[ee,A,A,G,H,H][P]),b:b(255*[H,H,ee,A,A,G][P]),a:b(M,2)}},D=function(j){var R=j.toString(16);return R.length<2?"0"+R:R},K=function(j){var R=j.r,N=j.g,A=j.b,M=j.a,z=M<1?D(b(255*M)):"";return"#"+D(R)+D(N)+D(A)+z},L=function(j){var R=j.r,N=j.g,A=j.b,M=j.a,z=Math.max(R,N,A),H=z-Math.min(R,N,A),G=H?z===R?(N-A)/H:z===N?2+(A-R)/H:4+(R-N)/H:0;return{h:b(60*(G<0?G+6:G)),s:b(z?H/z*100:0),v:b(z/255*100),a:M}},S=React.memo(function(j){var R=j.hue,N=j.onChange,A=g(["react-colorful__hue",j.className]);return React.createElement("div",{className:A},React.createElement(m,{onMove:function(M){N({h:360*M.left})},onKey:function(M){N({h:s$1(R+360*M.left,0,360)})},"aria-label":"Hue","aria-valuenow":b(R),"aria-valuemax":"360","aria-valuemin":"0"},React.createElement(p,{className:"react-colorful__hue-pointer",left:R/360,color:q({h:R,s:100,v:100,a:1})})))}),T=React.memo(function(j){var R=j.hsva,N=j.onChange,A={backgroundColor:q({h:R.h,s:100,v:100,a:1})};return React.createElement("div",{className:"react-colorful__saturation",style:A},React.createElement(m,{onMove:function(M){N({s:100*M.left,v:100-100*M.top})},onKey:function(M){N({s:s$1(R.s+100*M.left,0,100),v:s$1(R.v-100*M.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b(R.s)+"%, Brightness "+b(R.v)+"%"},React.createElement(p,{className:"react-colorful__saturation-pointer",top:1-R.v/100,left:R.s/100,color:q(R)})))}),F=function(j,R){if(j===R)return!0;for(var N in j)if(j[N]!==R[N])return!1;return!0},X=function(j,R){return j.toLowerCase()===R.toLowerCase()||F(C(j),C(R))};function Y(j,R,N){var A=i(N),M=reactExports.useState(function(){return j.toHsva(R)}),z=M[0],H=M[1],G=reactExports.useRef({color:R,hsva:z});reactExports.useEffect(function(){if(!j.equal(R,G.current.color)){var P=j.toHsva(R);G.current={hsva:P,color:R},H(P)}},[R,j]),reactExports.useEffect(function(){var P;F(z,G.current.hsva)||j.equal(P=j.fromHsva(z),G.current.color)||(G.current={hsva:z,color:P},A(P))},[z,j,A]);var ee=reactExports.useCallback(function(P){H(function(ne){return Object.assign({},ne,P)})},[]);return[z,ee]}var V=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J=new Map,Q=function(j){V(function(){var R=j.current?j.current.ownerDocument:document;if(R!==void 0&&!J.has(R)){var N=R.createElement("style");N.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J.set(R,N);var A=$();A&&N.setAttribute("nonce",A),R.head.appendChild(N)}},[])},U=function(j){var R=j.className,N=j.colorModel,A=j.color,M=A===void 0?N.defaultColor:A,z=j.onChange,H=c(j,["className","colorModel","color","onChange"]),G=reactExports.useRef(null);Q(G);var ee=Y(N,M,z),P=ee[0],ne=ee[1],ae=g(["react-colorful",R]);return React.createElement("div",u({},H,{ref:G,className:ae}),React.createElement(T,{hsva:P,onChange:ne}),React.createElement(S,{hue:P.h,onChange:ne,className:"react-colorful__last-control"}))},W={defaultColor:"000",toHsva:x,fromHsva:function(j){return w({h:j.h,s:j.s,v:j.v,a:1})},equal:X},Z=function(j){return React.createElement(U,u({},j,{colorModel:W}))};const UiColorPicker=({color:j,onUpdate:R,palette:N,placeholderText:A})=>{const[M,z]=reactExports.useState(j),H=ne=>ne!==null&&(ne=ne.toLowerCase(),!/^#([0-9A-F]{3}){1,2}$/i.test(ne))?(new FluentModal().alert("This colour is not compatible").dispatch(),!1):(z(ne),R(ne),!0),G=ne=>{const{value:ae}=ne.target;ae&&(H(ne.target.value)?FluentModal.dismissOne():ne.target.value=M||"")};reactExports.useEffect(()=>{if(P.current){P.current.style.backgroundColor=M;const ne=document.querySelector(`.${style$p.palette} + input`);ne&&(ne.value=M)}},[M]);const ee=()=>new FluentModal().title("Select colour").onAffirm(ne=>{ne()}).cancelText(!1).content(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:`${style$p.palette} ${style$p.paletteModal}`,children:[jsxRuntimeExports.jsx("div",{className:style$p.col,children:jsxRuntimeExports.jsx(Z,{onChange:H,color:M||""})}),jsxRuntimeExports.jsx("div",{className:style$p.col,children:(N||[]).map(ne=>jsxRuntimeExports.jsx("div",{className:style$p.paletteDisc,style:{backgroundColor:ne},onClick:()=>{FluentModal.dismissOne(),H(ne)}},ne))})]}),jsxRuntimeExports.jsx(UiInput,{type:"text",onBlur:G,onEnterKey:G,defaultValue:M,placeholder:"HEX Code"}),jsxRuntimeExports.jsx("div",{ref:P,className:style$p.previewBar,style:{backgroundColor:M}})]})).dispatch(),P=reactExports.useRef(null);return jsxRuntimeExports.jsxs("div",{className:style$p.palette,children:[jsxRuntimeExports.jsx("div",{className:`${style$p.paletteDisc} ${!M&&style$p.transparent}`,onClick:ee,style:{backgroundColor:M}}),jsxRuntimeExports.jsx(UiButton,{theme:"primary",inline:!0,onClick:ee,children:A||`${j?"Replace":"Choose"}...`}),j&&jsxRuntimeExports.jsx(UiButton,{theme:"concern",inline:!0,onClick:()=>H(null),children:"Remove"})]})},UiFieldColorPicker=({uid:j,entryComponentProps:R,formDataUpdateHandler:N,placeholderText:A})=>jsxRuntimeExports.jsx(UiColorPicker,{onUpdate:M=>N(j,M),color:R.value,...R,placeholderText:A}),searchZone="zr",search="c-",input="FZ",loadingIcon="TD",style$o={searchZone,search,input,loadingIcon},select="Hf",style$n={select},UiCTRPSelect=({options:j,selectedOption:R,onSelect:N})=>{const[A,M]=reactExports.useState(R),z=H=>{N(H.target.value),M(H.target.value)};return jsxRuntimeExports.jsx("select",{className:style$n.select,onInput:z,defaultValue:A,children:Object.keys(j).map(H=>jsxRuntimeExports.jsx("option",{name:H,value:H,children:j[H]},H))})},resultsWrap="cO",style$m={resultsWrap},UiCTRPSResults=({items:j,onSelect:R})=>!!j.length&&jsxRuntimeExports.jsx("div",{className:style$m.resultsWrap,"data-length":j.length,children:j.map(N=>jsxRuntimeExports.jsx(UiButton,{size:"small",children:N.title,onClick:()=>R(N)},JSON.stringify(N)))});let timeout;const UiCTRTPSearch=({options:j,ctName:R,onUpdate:N,onCtChange:A,autoFocus:M})=>{const z=reactExports.useRef(),[H,G]=reactExports.useState([]),[ee,P]=reactExports.useState(""),[ne,ae]=reactExports.useState(!1),[le,re]=reactExports.useState(R);reactExports.useEffect(()=>{ie()},[ee]),reactExports.useEffect(()=>{A(le)},[le]);const ie=()=>{if(!ee)return G([]);ae(!0),clearTimeout(timeout),timeout=setTimeout(()=>{const ve=`/cms/api/ctPicker?${[{key:"searchTerm",value:ee},{key:"ctName",value:le}].map(je=>`${je.key}=${je.value}`).join("&")}`;fetchJson(ve).then(je=>{G(je),ae(!1)})},300)},se=pe=>{re(pe),G([])},de=pe=>N(pe),ge=pe=>{P(pe.target.value)};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:style$o.searchZone,children:[jsxRuntimeExports.jsxs("div",{className:style$o.search,children:[Object.keys(j).length>1&&jsxRuntimeExports.jsx(UiCTRPSelect,{onSelect:se,options:j,selectedOption:R}),jsxRuntimeExports.jsx("input",{ref:z,className:style$o.input,autoFocus:M,type:"text",onInput:ge,placeholder:"Type to search..."})]}),ne&&jsxRuntimeExports.jsx("div",{className:style$o.loadingIcon,children:jsxRuntimeExports.jsx(UiLoader,{animation:"pulsing"})})]}),!ne&&H&&jsxRuntimeExports.jsx(UiCTRPSResults,{items:H,onSelect:de})]})},selectedLabel="_7x",info="_8p",title="oD",subTitle="tL",labelContent="Nm",style$l={selectedLabel,info,title,subTitle,labelContent},UiCTRPLabel=({selectedItem:item,evalTitleString,evalSubtitleString,contentTypeLabel,labelContent,handleClearItem,selectedCt})=>jsxRuntimeExports.jsxs("div",{className:style$l.selectedLabel,children:[jsxRuntimeExports.jsxs("div",{className:style$l.info,children:[evalTitleString&&jsxRuntimeExports.jsx("p",{className:style$l.title,children:eval(evalTitleString)}),evalSubtitleString&&jsxRuntimeExports.jsx("p",{className:style$l.subTitle,children:eval(evalSubtitleString)}),!!labelContent&&jsxRuntimeExports.jsx("div",{className:style$l.labelContent,children:labelContent})]}),jsxRuntimeExports.jsxs("div",{children:[!!item&&jsxRuntimeExports.jsx(UiButton,{size:"small",onClick:()=>handleClearItem(!0),children:"Replace..."}),selectedCt&&item&&jsxRuntimeExports.jsx(UiButton,{size:"small",theme:"concern",onClick:handleClearItem,children:"Remove"})]})]}),UiContentTypeRelation=({entryComponentProps:j,uid:R,value:N,formDataUpdateHandler:A,onClear:M,mountFocus:z,labelContent:H})=>{const G=reactExports.useRef(),{evalTitleString:ee,evalSubtitleString:P,supportedContentTypes:ne,ctNameCached:ae}=j,le=N,[re,ie]=reactExports.useState(z&&!le),[se,de]=reactExports.useState(ae||Object.keys(ne)[0]),[ge,pe]=reactExports.useState(le??null),[fe,ve]=reactExports.useState(se),je=Re=>{Re&&(Re._ctName=fe),pe(Re),de(fe),ie(!1),A(R,Re)},me=(Re=!1)=>{je(null),ie(!1),Re&&setTimeout(()=>{G.current.querySelector("input").focus()},100),M&&M()},xe=ne[se]??null;return jsxRuntimeExports.jsxs("div",{ref:G,children:[re||!re&&!ge&&jsxRuntimeExports.jsx(UiCTRTPSearch,{options:ne,selectedItem:ge,ctName:se,onCtChange:ve,onUpdate:je}),!re&&ge&&jsxRuntimeExports.jsx(UiCTRPLabel,{selectedItem:ge,contentTypeLabel:xe,evalTitleString:ee,evalSubtitleString:P,labelContent:H,selectedCt:se,handleClearItem:me})]})},UiFieldContentTypeRelation=j=>jsxRuntimeExports.jsx(UiContentTypeRelation,{...j}),UiFieldDatePicker=({entryComponentProps:j,formDataUpdateHandler:R,uid:N})=>jsxRuntimeExports.jsx(UiDatePicker,{value:j.value,...j,onUpdate:A=>R(N,A)}),contain$4="_2r",managerModalWindow="_9a",style$k={contain:contain$4,managerModalWindow},thumbnailPanel="Mq",thumbnailContain="eE",count="lG",style$j={thumbnailPanel,thumbnailContain,count},ThumbnailsStacked=({items:j})=>!!j.length&&jsxRuntimeExports.jsxs("div",{className:style$j.thumbnailPanel,children:[j.sort(orderItemsSortFn).map((R,N)=>jsxRuntimeExports.jsxs("div",{className:style$j.thumbnailContain,children:[" ",jsxRuntimeExports.jsx(FFThumbnail,{item:R})]},N)),j.length>1&&jsxRuntimeExports.jsx("div",{className:style$j.count,children:j.length})]}),UiFieldFile=({entryComponentProps:j,formDataUpdateHandler:R,uid:N})=>{const{extensionsAllowed:A,value:M}=j,[z,H]=reactExports.useState(M||[]),G=z.length?"Replace":"Browse";function ee(ne){let ae=z;const le=()=>{H(()=>[...ae]),R(N,ae),FluentModal.dismissOne()};new FluentModal().fullscreen().usePadding(!1).onAffirm(le).centraliseContent().useWindowClassName(style$k.managerModalWindow).content(jsxRuntimeExports.jsx(UiFileFinder,{showUploadOnMount:ne,modalMode:!0,limit:1,selectedItems:z,enableSelection:!0,extensionsAllowed:A,onMaximumItemsSelected:le,onSelectionChanged:re=>ae=re})).dispatch()}const P=()=>{H(()=>[]),R(N,[])};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:style$k.contain,children:[jsxRuntimeExports.jsx(ThumbnailsStacked,{items:z}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(UiButton,{onClick:()=>ee(),theme:"primary",children:`${G}...`}),jsxRuntimeExports.jsx(UiButton,{onClick:()=>ee(!0),children:"Upload"}),!!z.length&&jsxRuntimeExports.jsx(UiButton,{theme:"concern",icon:"trash",title:"Remove",onClick:P})]})]})})},UiFieldInput=({uid:j,entryComponentProps:R,formDataUpdateHandler:N,placeholderText:A})=>jsxRuntimeExports.jsx(UiInput,{placeholder:A,type:R.type,disabled:R.disabled,onInput:M=>N(j,M.target.value),defaultValue:R.value}),previewButton="CJ",newTabArea="_9l",urlTextTypeContain="_3E",style$i={previewButton,newTabArea,urlTextTypeContain},openContentTypeSearch=({type:j,typeLabel:R,permalinkEntities:N,setEntity:A,setUrlType:M})=>{const z=JSON.parse(JSON.stringify(N));Object.keys(z).forEach(G=>G!==j&&delete z[G]);const H=G=>{G._slug=j,M("entity"),A(G),FluentModal.dismissOne()};new FluentModal().title(`Select ${R}`).content(jsxRuntimeExports.jsx(UiCTRTPSearch,{autoFocus:!0,options:z,ctName:j,selectedItem:null,onCtChange:()=>{},onUpdate:G=>H(G)})).cancelText(!1).affirmText("Cancel").dispatch()},useLinkFieldValueUpdater=({url:j,urlType:R,entity:N,newTab:A,formDataUpdateHandler:M,uid:z})=>{const H=reactExports.useRef(!0);reactExports.useEffect(()=>{if(H.current){H.current=!1;return}M(z,{url:j,urlType:R,entity:N,newTab:A})},[N,R,j,A])},urlTextTypes={raw:{title:"URL",icon:"globe",placeholder:"Enter web address"},email:{title:"Email",icon:"at-sign",placeholder:"Enter email address"},phone:{title:"Phone",icon:"phone",placeholder:"Enter phone number"}},UiFieldLinkSelector=({formDataUpdateHandler:j,uid:R,entryComponentProps:N})=>{const{allowNewTab:A,permalinkEntities:M,value:z}=N,[H,G]=reactExports.useState(z?.url),[ee,P]=reactExports.useState(z?.urlType),[ne,ae]=reactExports.useState(z?.entity),[le,re]=reactExports.useState(z?.newTab),ie=!H&&!ne;useLinkFieldValueUpdater({url:H,urlType:ee,entity:ne,newTab:le,formDataUpdateHandler:j,uid:R});const se=reactExports.useRef(),de=fe=>{const ve=new FluentContextMenu(fe);ne&&(ve.button().text("Remove").onSelect(pe),ve.divider()),Object.keys(M).forEach(je=>{const me=M[je];ve.button().text(me).onSelect(()=>openContentTypeSearch({type:je,typeLabel:me,permalinkEntities:M,setEntity:ae,setUrlType:P}))}),ve.dispatch()},ge=fe=>{P(fe),G(""),setTimeout(()=>{const ve=se.current.querySelector("input");ve&&(ve.value="",ve.focus())},100)},pe=()=>[G(""),P(null),ae(null)];return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{ref:se,children:[ne&&jsxRuntimeExports.jsxs("div",{className:style$i.urlTextTypeContain,children:[jsxRuntimeExports.jsx(UiButton,{icon:"link-2",children:ne.title,title:"Tap to change",theme:"primary",onClick:de}),jsxRuntimeExports.jsx(UiInput,{title:ne.title,disabled:!0,defaultValue:ne.permalink})]}),Object.keys(urlTextTypes).includes(ee)&&jsxRuntimeExports.jsxs("div",{className:style$i.urlTextTypeContain,children:[jsxRuntimeExports.jsx(UiButton,{icon:urlTextTypes[ee].icon,children:urlTextTypes[ee].title,title:"Tap to change",theme:"primary",onClick:pe}),jsxRuntimeExports.jsx(UiInput,{autoFocus:!0,defaultValue:H,onInput:fe=>G(fe.target.value),placeholder:urlTextTypes[ee].placeholder})]}),ie&&!ee&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(UiButton,{theme:"primary",icon:"link-2",children:"Link to...",onClick:de,className:style$i.previewButton}),Object.keys(urlTextTypes).map(fe=>(urlTextTypes[fe].key=fe,urlTextTypes[fe])).map(({icon:fe,title:ve,key:je})=>jsxRuntimeExports.jsx(UiButton,{icon:fe,children:ve,onClick:()=>ge(je)},je))]}),A&&ee&&jsxRuntimeExports.jsx("div",{className:style$i.newTabArea,children:jsxRuntimeExports.jsx(UiCheckBox,{placeholder:"Open in new tab",defaultChecked:le,onCheckChange:fe=>re(fe)})})]})})},contain$3="eJ",list="F0",item="nr",itemHead="bj",text="gZ",highlight="MO",hasError="_5r",itemForm="P7",buttonsContain="Nw",itemFooter="Ka",addItem="B9",limitInfo="OW",style$h={contain:contain$3,list,item,itemHead,text,highlight,hasError,itemForm,buttonsContain,itemFooter,addItem,limitInfo},UiRepeater=({formDataUpdateHandler:j,formDataQueryHandler:R,formErrors:N,uid:A,entryComponentProps:M})=>{const{evalTitleString:z,limit:H,blueprint:G}=M,ee={},P=R(pe=>Object.keys(pe).filter(fe=>pe[fe].parentUid===A).map(fe=>{const ve=pe[fe],je={},me=Re=>pe[Re].parentUid===ve.uid,xe=Re=>je[Re]=pe[Re];return R(Re=>Object.keys(Re).filter(me).forEach(xe)),ee[fe]=je,ve})),[ne,ae]=reactExports.useState(null),le=reactExports.createRef();function re(pe,fe){if(fe&&fe.target.nodeName.toLowerCase()==="button")return fe.preventDefault();ae(ne!==pe?pe:null)}function ie(){handleAddItem({uid:A,formDataUpdateHandler:j,blueprint:G}),re(Object.keys(P).length)}const se=H===null||Object.keys(P).length{let fe;return R(ve=>{const je=queryRecursivePropertiesOfUid(ve,pe);fe=Object.keys(je).some(me=>Object.keys(N).includes(me))}),fe},ge=(pe,fe)=>pe.entryComponentProps.order-fe.entryComponentProps.order;return jsxRuntimeExports.jsx("div",{className:style$h.contain,ref:le,children:jsxRuntimeExports.jsxs("ul",{className:style$h.list,children:[P.sort(ge).map((pe,fe)=>jsxRuntimeExports.jsxs("li",{className:`${style$h.item} ${ne===fe&&style$h.highlight} ${de(pe.uid)&&style$h.hasError}`,children:[jsxRuntimeExports.jsxs("div",{className:style$h.itemHead,onClick:ve=>re(fe,ve),children:[jsxRuntimeExports.jsx(Icon,{icon:`chevron-${ne===fe?"up":"down"}`}),jsxRuntimeExports.jsx("div",{className:style$h.text,children:getLabelPreviewText({repeaterRow:pe,formDataQueryHandler:R,evalTitleString:z})}),jsxRuntimeExports.jsxs("div",{className:style$h.buttonsContain,children:[jsxRuntimeExports.jsx(UiButton,{icon:"arrow-up",disabled:fe===0,title:"Move up",size:"small",onClick:()=>handleReorder({uid:pe.uid,formDataUpdateHandler:j,multiply:-1})}),jsxRuntimeExports.jsx(UiButton,{disabled:fe===P.length-1,icon:"arrow-down",title:"Move down",size:"small",onClick:()=>handleReorder({uid:pe.uid,formDataUpdateHandler:j,multiply:1})}),se&&jsxRuntimeExports.jsx(UiButton,{icon:"copy",title:"Copy",size:"small",onClick:()=>handleCopyItem({uid:pe.uid,formDataUpdateHandler:j})}),jsxRuntimeExports.jsx(UiButton,{icon:"trash",title:"Remove",theme:"concern",size:"small",onClick:()=>handleRemoveItem({uid:pe.uid,formDataUpdateHandler:j})})]})]}),ne===fe&&jsxRuntimeExports.jsx("div",{className:style$h.itemForm,children:jsxRuntimeExports.jsx(Padding,{horizontal:!0,children:jsxRuntimeExports.jsx(UiForm,{isNestedInsideUiForm:!0,formData:ee[pe.uid],formErrors:N,formDataUpdateHandler:j,formDataQueryHandler:R})})})]},pe.uid)),jsxRuntimeExports.jsxs("li",{className:style$h.itemFooter,children:[se&&jsxRuntimeExports.jsx("div",{className:style$h.addItem,children:jsxRuntimeExports.jsx(UiButton,{icon:"plus-circle",theme:"primary",size:"small",children:"Add",onClick:ie})}),!!Object.keys(P).length&&jsxRuntimeExports.jsxs("div",{className:style$h.limitInfo,children:[Object.keys(P).length," / ",H===null?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"โˆž"}):H]})]})]})})},UiFieldRepeater=j=>jsxRuntimeExports.jsx(UiRepeater,{...j}),pKey="parentId",UiFieldSelect=({formDataUpdateHandler:j,uid:R,entryComponentProps:N,placeholderText:A,propertyKey:M})=>{const z=H=>{j(R,H)};if(M===pKey){const H=getQueryParameter(pKey);H&&(N.value=H)}return reactExports.useEffect(()=>{if(M===pKey){const H=getQueryParameter(pKey);H&&z(H)}},[]),jsxRuntimeExports.jsx(UISelect,{placeholder:A||"Select...",...N,onChange:H=>z(H.target.value),defaultValue:N.value})},UiTextSensitive=({onInput:j,defaultValue:R,placeholder:N,valueHasBeenSet:A})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UiInput,{type:"password",onInput:j,defaultValue:R,placeholder:N}),A&&jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx(Icon,{icon:"check"})," ย ย Server holding value"]})]}),UiFieldSensitive=({uid:j,placeholderText:R,entryComponentProps:N,formDataUpdateHandler:A})=>jsxRuntimeExports.jsx(UiTextSensitive,{defaultValue:N.value,placeholder:R,onInput:M=>A(j,M.target.value)}),UiFieldTemplateSelector=({entryComponentProps:j,labelText:R,uid:N})=>{const{value:A}=j,{contentTypeId:M,templateChangeWarnText:z,formData:H}=getPageStorage(),{availableTemplates:G}=queryFormDataRootProperty(H,CONSTANT.FIELD_KEY_TEMPLATE_BLOCKS).entryComponentProps,[ee,P]=reactExports.useState(A);if(Object.keys(G).length<2)return null;const ne=le=>{M?new FluentModal().alert(z).affirmText("Yes, change template").affirmTheme("concern").onAffirm(()=>{uiEditorDispatchEvent(EDITOR_REQUEST_CHANGE_TEMPLATE,{template:le.target.value})}).onCancel(()=>{P(A),ae.current.querySelector("select").value=A}).dispatch():setGlobalFormData(N,le.target.value)};let ae=reactExports.useRef();return jsxRuntimeExports.jsxs("div",{ref:ae,children:[jsxRuntimeExports.jsx(UiFieldLabel,{label:R}),jsxRuntimeExports.jsx(UISelect,{required:!0,options:G,onChange:ne,placeholder:"Select template...",defaultValue:ee})]})};UiFieldTemplateSelector.disableFieldLabel=!0;const UiTextArea=j=>{const R=reactExports.useRef();reactExports.useEffect(()=>{const{current:H}=R;j.autoFocus&&H.focus();const G=()=>{H.style.height="",H.style.height=Math.min(H.scrollHeight+4,300)+"px"};return G(),H.addEventListener("input",G),()=>{H.removeEventListener("input",G)}},[]);const{maxHeight:N,autoFocus:A,defaultValue:M,onInput:z}=j;return jsxRuntimeExports.jsx("textarea",{className:sharedStyle.input,ref:R,style:{maxHeight:N},defaultValue:M,autoFocus:A,onInput:z})},UiFieldTextarea=({entryComponentProps:j,uid:R,placeholderText:N,formDataUpdateHandler:A})=>jsxRuntimeExports.jsx(UiTextArea,{maxHeight:j.maxHeight,rows:j.linesCount,placeholder:N,onInput:M=>A(R,M.target.value),defaultValue:j.value}),UiFieldToggle=({entryComponentProps:j,formDataUpdateHandler:R,uid:N,labelText:A,helpText:M})=>jsxRuntimeExports.jsx(UiCheckBox,{placeholder:A,helpText:M,onCheckChange:z=>R(N,z),defaultChecked:j.value});UiFieldToggle.disableFieldLabel=!0;const contain$2="Ov",style$g={contain:contain$2};var __assign=function(){return __assign=Object.assign||function(R){for(var N,A=1,M=arguments.length;A0)return j.getRangeAt(0).startContainer.parentNode||void 0}function normalizeHtml(j){return typeof j=="string"?j.replace(/ |\u202F|\u00A0/g," ").replace(/
/g,"
"):String(j)}function replaceCaret(j){var R=document.createTextNode("");j.appendChild(R);var N=document.activeElement===j;if(R!==null&&R.nodeValue!==null&&N){var A=window.getSelection();if(A!==null){var M=document.createRange();M.setStart(R,R.nodeValue.length),M.collapse(!0),A.removeAllRanges(),A.addRange(M)}j instanceof HTMLElement&&j.focus()}}function setForwardRef(j,R){typeof R=="function"?R(j):typeof R=="object"&&R&&(R.current=j)}var ContentEditable=React.memo(React.forwardRef(function j(R,N){var A=R.className,M=R.disabled,z=R.tagName,H=R.value,G=H===void 0?"":H,ee=R.placeholder,P=__rest(R,["className","disabled","tagName","value","placeholder"]),ne=React.useRef(null),ae=React.useRef(G),le=React.useRef(P);return React.useEffect(function(){le.current=P;var re=ne.current;re&&normalizeHtml(ae.current)!==normalizeHtml(G)&&(ae.current=G,re.innerHTML=G,replaceCaret(re))}),React.useMemo(function(){function re(de){ne.current=de,autoconfigureTextDirection(de),setForwardRef(de,N)}function ie(de){var ge,pe,fe=ne.current;if(fe){var ve=fe.innerHTML;ve!==ae.current&&((pe=(ge=le.current).onChange)===null||pe===void 0||pe.call(ge,__assign(__assign({},de),{target:{value:ve,name:P.name}}))),autoconfigureTextDirection(fe),ae.current=ve}}var se=cls("rsw-ce",A);return React.createElement(z||"div",__assign(__assign({},P),{className:se,contentEditable:!M,dangerouslySetInnerHTML:{__html:G},onBlur:function(de){return(le.current.onBlur||ie)(de)},onInput:ie,onKeyDown:function(de){return(le.current.onKeyDown||ie)(de)},onKeyUp:function(de){return(le.current.onKeyUp||ie)(de)},placeholder:ee,ref:re}))},[A,M,ee,z])})),EditorContext=React.createContext(void 0);function EditorProvider(j){var R=j.children,N=React.useState({htmlMode:!1,update:z}),A=N[0],M=N[1];function z(H){M(function(G){return __assign(__assign({},G),H)})}return React.createElement(EditorContext.Provider,{value:A},R)}function useEditorState(){var j=React.useContext(EditorContext);if(!j)throw new Error("You should wrap your component by EditorProvider");return j}var e=[],t=[];function n(j,R){if(j&&typeof document<"u"){var N,A=R.prepend===!0?"prepend":"append",M=R.singleTag===!0,z=typeof R.container=="string"?document.querySelector(R.container):document.getElementsByTagName("head")[0];if(M){var H=e.indexOf(z);H===-1&&(H=e.push(z)-1,t[H]={}),N=t[H]&&t[H][A]?t[H][A]:t[H][A]=G()}else N=G();j.charCodeAt(0)===65279&&(j=j.substring(1)),N.styleSheet?N.styleSheet.cssText+=j:N.appendChild(document.createTextNode(j))}function G(){var ee=document.createElement("style");if(ee.setAttribute("type","text/css"),R.attributes)for(var P=Object.keys(R.attributes),ne=0;ne")}function Separator(j){var R=useEditorState();return R.htmlMode?null:React.createElement("div",__assign({className:"rsw-separator"},j))}function Toolbar(j){return React.createElement("div",__assign({className:"rsw-toolbar"},j))}var DefaultEditor=React.forwardRef(function j(R,N){return React.createElement(EditorProvider,null,React.createElement(Editor,__assign({},R,{ref:N}),R.children||React.createElement(Toolbar,null,React.createElement(BtnUndo,null),React.createElement(BtnRedo,null),React.createElement(Separator,null),React.createElement(BtnBold,null),React.createElement(BtnItalic,null),React.createElement(BtnUnderline,null),React.createElement(BtnStrikeThrough,null),React.createElement(Separator,null),React.createElement(BtnNumberedList,null),React.createElement(BtnBulletList,null),React.createElement(Separator,null),React.createElement(BtnLink,null),React.createElement(BtnClearFormatting,null),React.createElement(HtmlButton,null),React.createElement(Separator,null),React.createElement(BtnStyles,null))))});const UiWysiwig=({formDataUpdateHandler:j,uid:R,entryComponentProps:N})=>{const{modules:A}=N,[M,z]=reactExports.useState(N.value),H=P=>{const ne=P.target.value;M!==ne&&j(ae=>(ae[R].entryComponentProps.value=ne,ae)),z(ne)},G={BtnBold,BtnItalic,BtnUnderline,BtnStrikeThrough,BtnBulletList,BtnNumberedList,BtnLink,BtnClearFormatting},ee=A.map(P=>G[P]??null).filter(P=>!!P);return jsxRuntimeExports.jsx("div",{className:`${style$g.contain} ${sharedStyle.input}`,children:jsxRuntimeExports.jsx(DefaultEditor,{value:N.value,onChange:H,children:jsxRuntimeExports.jsx(Toolbar,{children:ee.map((P,ne)=>jsxRuntimeExports.jsx(P,{},ne))})})})},UiFieldWysiwyg=j=>jsxRuntimeExports.jsx(UiWysiwig,{...j}),style$f={},UiListingCellCheck=({onSelectionToggle:j,checked:R})=>{const N=()=>{j&&j(!R)};return jsxRuntimeExports.jsx("div",{className:style$f.checkContain,children:jsxRuntimeExports.jsx(UiCheckBox,{syncChecked:R,onCheckChange:N})})},s={},UiListingCellGrip=()=>jsxRuntimeExports.jsx("div",{className:`${style$r.grip} ${s.noPadding} ${s.grippy} ${s.pointerEvents}`,children:jsxRuntimeExports.jsx(Icon,{icon:"menu"})}),UiListingCellIconAction=({icon:j,label:R,action:N,disabled:A,hidden:M,to:z,target:H,theme:G})=>!M&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(UiButton,{size:"small",icon:j||"edit",title:R,theme:G,target:H,disabled:A,...N?{action:N}:{to:z}})}),UiListingCellIconLink=({rowAttrsFn:j,icon:R,title:N,to:A})=>jsxRuntimeExports.jsx("div",{...j({classNames:["noPadding","pointerEvents","hideHeaderRow"]}),children:A&&jsxRuntimeExports.jsx(UiButton,{size:"small",icon:R,title:N,to:A})}),cellContain="YK",style$e={cellContain},UiListingCellPublishStatus=({text:j,color:R})=>jsxRuntimeExports.jsxs("div",{className:style$e.cellContain,children:[jsxRuntimeExports.jsx(Light,{color:R}),j]}),UiListingCellRaw=({html:j,text:R})=>j?jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:j}}):jsxRuntimeExports.jsx("div",{children:R}),ellipsis="-G",style$d={ellipsis},UiListingCellReverseEllipsis=({content:j,rowAttrsFn:R})=>jsxRuntimeExports.jsx("div",{...R({}),children:jsxRuntimeExports.jsx("div",{className:style$d.ellipsis,children:j.substring(1)})}),cellLink="yK",style$c={cellLink},UiListingCellHyperlink=({text:j,url:R,newTab:N})=>jsxRuntimeExports.jsxs("a",{className:style$c.cellLink,href:R,target:N?"_blank":"_self",children:[j,N&&jsxRuntimeExports.jsx(Icon,{icon:"external-link"})]}),UiListingCellThumbnail=({file:j})=>j&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(FFThumbnail,{item:j})});UiListingCellThumbnail.defaultWidth="60px";const layout="DK",style$b={layout},nav="Qr",collapsed="_1B",sectionTitle="h1",authArea="zD",version="Iu",logo$1="xX",spacer="Mp",style$a={nav,collapsed,sectionTitle,authArea,version,logo:logo$1,spacer},window$1="iQ",style$9={window:window$1};function showMenu(){new FluentModal().title("Options").content(jsxRuntimeExports.jsx(AccountMenu,{})).cancelText(!1).affirmText("Close").dispatch()}const AccountMenu=()=>jsxRuntimeExports.jsxs("div",{className:style$9.window,children:[jsxRuntimeExports.jsx("p",{children:"Interface Theme"}),jsxRuntimeExports.jsx(UISelect,{options:colorSchemeOptions,defaultValue:getColorScheme(),disablePlaceholder:1,onChange:j=>applyColorScheme(j.target.value)})]}),contain$1="az",wave="L-",black="q0",white="ci",fore="_8Z",faint="_7m",washed="y4",swashing="QJ",logoSwash1="n4",logoSwash2="b3",logoSwash3="BN",logoSwash4="Kg",idling="_3J",style$8={contain:contain$1,wave,black,white,fore,faint,washed,swashing,logoSwash1,logoSwash2,logoSwash3,logoSwash4,idling},Logo=j=>{const{theme:R,mode:N,width:A}=j,M=N?style$8[N]:"",z=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:style$8.wave}),jsxRuntimeExports.jsx("div",{className:style$8.wave}),jsxRuntimeExports.jsx("div",{className:style$8.wave}),jsxRuntimeExports.jsx("div",{className:style$8.wave})]});return jsxRuntimeExports.jsx("div",{style:{width:A||"100%"},...j,className:`${style$8.contain} ${j.className} ${M} ${style$8[R]}`,children:z})},UiNav=()=>{const{cmsVersionText:j}=getStorage(),{uiNav:R,menuDefaultCollapsed:N}=getPreactStorage(),A=N,{authOutUrl:M}=useGlobalStorage(),z=()=>{new FluentModal().alert("Are you sure you want to sign out? Unsaved changes will be lost").onAffirm(()=>{fetchJson(M).then(()=>{disableSavePrompt()})}).affirmText("Yes, sign out").dispatch()};return jsxRuntimeExports.jsxs("nav",{className:`${style$a.nav} ${A&&style$a.collapsed}`,children:[jsxRuntimeExports.jsx(Logo,{className:style$a.logo,width:30,onClick:()=>routeTo("/")}),R.sections.map(({title:H,buttons:G},ee)=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:style$a.sectionTitle,children:H}),G.map((P,ne)=>{const{title:ae,icon:le,to:re,theme:ie,action:se,size:de}=P;return jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,children:A?null:ae,icon:le,to:re,action:se,theme:ie,size:de,title:ae},ne)})]},ee)),jsxRuntimeExports.jsx("div",{className:style$a.spacer}),jsxRuntimeExports.jsx(FFUpload,{collapsed:A}),jsxRuntimeExports.jsxs("div",{className:style$a.authArea,children:[jsxRuntimeExports.jsx(UiButton,{icon:"menu",title:"Menu",onClick:showMenu}),jsxRuntimeExports.jsx(UiButton,{fullwidth:!0,theme:"primary",onClick:z,icon:"log-out",children:A?null:"Sign out",title:"Sign out"})]}),jsxRuntimeExports.jsx("div",{className:style$a.version,children:j})]})},documentBodyContain="_3-",style$7={documentBodyContain},useRefScrollState=(j,R=0)=>{const[N,A]=reactExports.useState(!1),M=()=>{if(j.current){const z=j.current.scrollTop;A(z>R)}};return reactExports.useEffect(()=>{const z=j.current;return z&&z.addEventListener("scroll",M),()=>{z&&z.removeEventListener("scroll",M)}},[]),N},taskBarContain="uY",taskBar="Kk",docked="OT",style$6={taskBarContain,taskBar,docked},taskBarDock="_98",style$5={taskBarDock},UiTaskBarDock=()=>{const{actionButtons:j}=usePreactStorage();return jsxRuntimeExports.jsx("div",{className:style$5.taskBarDock,children:(j||[]).map((R,N)=>(R.action&&(R.onClick=()=>dispatch(R.action)),jsxRuntimeExports.jsx(UiButton,{...R,children:R.title},N)))})},taskBarMainMenu="-q",pageTitle="K-",style$4={taskBarMainMenu,pageTitle},UiTaskBarMainMenu=()=>{const{pageTitle:j,authOutUrl:R}=useGlobalStorage(),{uiNav:N}=usePreactStorage(),{isMobile:A}=useMobileMediaQuery(),M=()=>{new FluentModal().alert("Are you sure you want to sign out? Unsaved changes will be lost").onAffirm(()=>{fetchJson(R).then(()=>{disableSavePrompt()})}).affirmText("Yes, sign out").dispatch()},z=H=>{const G=new FluentContextMenu(H);if(N){const{sections:ee}=N||[];ee.forEach(({buttons:P},ne)=>P.forEach(({title:ae,icon:le,to:re,buttons:ie,theme:se})=>{G.button("Settings").text(ae).icon(le).theme(se).onSelect(()=>routeTo(re))})),G.divider()}G.button("Settings").text("Settings").icon("settings").onSelect(showMenu),G.divider(),G.button("Sign out").theme("primary").icon("log-out").onSelect(M),G.dispatch()};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:style$4.taskBarMainMenu,children:[A&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(UiButton,{icon:"menu",title:"Menu",onClick:z})}),jsxRuntimeExports.jsx("span",{className:style$4.pageTitle,children:j})]})})},UiTaskBar=({isScrolled:j})=>{const{headerHidden:R}=usePreactStorage();return!R&&jsxRuntimeExports.jsx("div",{className:`${style$6.taskBarContain} ${j?style$6.docked:""}`,children:jsxRuntimeExports.jsxs("div",{className:style$6.taskBar,children:[jsxRuntimeExports.jsx(UiTaskBarMainMenu,{}),jsxRuntimeExports.jsx(UiTaskBarDock,{})]})})},DocumentBody=({children:j})=>{const R=reactExports.useRef(null),N=useRefScrollState(R);return jsxRuntimeExports.jsxs("div",{className:style$7.documentBodyContain,ref:R,children:[jsxRuntimeExports.jsx(UiTaskBar,{isScrolled:N}),j]})},LayoutStandard=({children:j})=>jsxRuntimeExports.jsxs("div",{className:style$b.layout,children:[jsxRuntimeExports.jsx(UiNav,{}),jsxRuntimeExports.jsx(DocumentBody,{children:j})]}),body="Vh",header="KU",cite="tc",style$3={body,header,cite},contain="_5M",logo="cf",waves="Jd",style$2={contain,logo,waves};function OceanCmsLogo(){return jsxRuntimeExports.jsxs("div",{className:style$2.contain,children:[jsxRuntimeExports.jsx("div",{className:style$2.logo,children:jsxRuntimeExports.jsx(Logo,{mode:"swashing",width:40,theme:"white"})}),jsxRuntimeExports.jsx("div",{className:style$2.waves,children:jsxRuntimeExports.jsxs("svg",{viewBox:"0 24 150 28",preserveAspectRatio:"none",children:[jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("path",{id:"gentle-wave",d:"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"})}),jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("use",{xlinkHref:"#gentle-wave",x:"48",y:"0"}),jsxRuntimeExports.jsx("use",{xlinkHref:"#gentle-wave",x:"48",y:"3"}),jsxRuntimeExports.jsx("use",{xlinkHref:"#gentle-wave",x:"48",y:"5"}),jsxRuntimeExports.jsx("use",{xlinkHref:"#gentle-wave",x:"48",y:"7"})]})]})})]})}const gloriousBackground="wT",inTheme="G3",style$1={gloriousBackground,inTheme},GloriousBackground=({inTheme:j,children:R})=>jsxRuntimeExports.jsx("div",{className:`${style$1.gloriousBackground} ${j&&style$1.inTheme}`,children:R}),LayoutPanel=({children:j})=>{const{cmsVersionText:R}=getStorage();return jsxRuntimeExports.jsxs(GloriousBackground,{children:[jsxRuntimeExports.jsx("div",{className:style$3.header,children:jsxRuntimeExports.jsx(OceanCmsLogo,{})}),jsxRuntimeExports.jsx("div",{className:style$3.body,children:jsxRuntimeExports.jsxs("div",{children:[j,jsxRuntimeExports.jsx("h5",{className:style$3.cite,children:R})]})})]})},extendFn=(j,R)=>{typeof R!="object"&&console.error("Cannot add object without key",{object:R});const N=Object.keys(R)[0];j[N]=R[N]};let uiLayouts={LayoutStandard,LayoutPanel},uiViews={ViewAuthScreen,ViewDashboard,ViewFileFinder,ViewPageNotFound,ViewUiForm,ViewUiFormBlockEditor,ViewUiListing};const extendUiView=j=>extendFn(uiViews,j);let uiFields={UiFieldColorPicker,UiFieldDatePicker,UiFieldEntityRelation:UiFieldContentTypeRelation,UiFieldFile,UiFieldInput,UiFieldLinkSelector,UiFieldPermalink,UiFieldRepeater,UiFieldSelect,UiFieldSensitive,UiFieldTemplateSelector,UiFieldTextarea,UiFieldToggle,UiFieldWysiwyg};const extendUiField=j=>extendFn(uiFields,j);let uiListingCells={UiListingCellCheck,UiListingCellGrip,UiListingCellHyperlink,UiListingCellIconAction,UiListingCellIconLink,UiListingCellPublishStatus,UiListingCellRaw,UiListingCellReverseEllipsis,UiListingCellThumbnail};const extendUiListingCell=j=>extendFn(uiListingCells,j),RouteRenderer=({routerProps:j})=>{const{entryTemplate:R}=usePreactStorage(),N=Object.assign({},uiViews)[R];return N&&jsxRuntimeExports.jsx(N,{...j})},LayoutRenderer=({children:j})=>{const{layout:R}=usePreactStorage(),N=uiLayouts[R];return N&&jsxRuntimeExports.jsx(N,{children:j})},routerLoading="Dw",style={routerLoading},RouterLoading=()=>jsxRuntimeExports.jsx("div",{className:style.routerLoading,children:jsxRuntimeExports.jsx(UiLoader,{})});let pagePropsToChange={};const useRouterState=()=>{const{cmsPrefixPath:j,appName:R,pageTitle:N}=getStorage(),[A,M]=reactExports.useState(!0),[z,H]=reactExports.useState(window.location.hash.slice(1)||"/");return reactExports.useEffect(()=>{window.document.title=N||R},[N]),useSubscribeRouteTo(({url:G,props:ee})=>{checkIfUserHasUnsavedChanges().then(()=>{window.location.hash=(G||"/").replace(j,""),pagePropsToChange=ee})}),useSubscribeRouteRefresh(()=>{checkIfUserHasUnsavedChanges().then(()=>{window.location.reload()})}),useListenWindow("hashchange",({newURL:G})=>{checkIfUserHasUnsavedChanges().then(()=>{const ee=G.split("#")[1]??"/";H(ee)})}),reactExports.useEffect(()=>{const G={pageUrl:z,setIsLoading:M},ee=()=>setPageStorage(pagePropsToChange);fetchRoute(G,ee,()=>{}).then(ee)},[z]),{isLoading:A}},Router=()=>{const{isLoading:j}=useRouterState(),{entryTemplate:R}=usePreactStorage();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!j&&jsxRuntimeExports.jsx(RouterLoading,{}),R&&jsxRuntimeExports.jsx(LayoutRenderer,{children:jsxRuntimeExports.jsx(RouteRenderer,{})})]})},BespokeCmsEntry=()=>{extendUiField({}),extendUiListingCell({}),extendUiView({})},rootElement=document.getElementById("app");setStorage(JSON.parse(rootElement.dataset.store)),applyColorScheme(),BespokeCmsEntry(),clientExports.createRoot(rootElement).render(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Router,{}),jsxRuntimeExports.jsx(UiNotification,{}),jsxRuntimeExports.jsx(UiModal,{}),jsxRuntimeExports.jsx(UiContextMenu,{})]}))})();