Σ(゚Д゚;≡;゚д゚)Σ(゚Д゚;≡;゚д゚)Σ(゚Д゚;≡;゚д゚)始,故人唐宰相鲁公,🆚开府南服,余以布衣从戎。明年,别公漳水湄。后明年,公以事过张睢阳庙及颜杲卿所尝往来处,悲歌慷慨,卒不负其言而从之游。今其诗具在,可考也。😭 HEX
HEX
Server: Apache
System: Linux webm006.cluster120.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User: studionolh (122383)
PHP: 7.3.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/s/t/u/studionolh/www/wp-includes/Requests/Cookie/reusable-blocks/components.tar
style.min.css000064400000355726152334540170007226 0ustar00@charset "UTF-8";:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.components-animate__appear{animation:components-animate__appear-animation .1s cubic-bezier(0,0,.2,1) 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-animate__appear{animation-duration:1ms;animation-delay:0s}}.components-animate__appear.is-from-top,.components-animate__appear.is-from-top.is-from-left{transform-origin:top left}.components-animate__appear.is-from-top.is-from-right{transform-origin:top right}.components-animate__appear.is-from-bottom,.components-animate__appear.is-from-bottom.is-from-left{transform-origin:bottom left}.components-animate__appear.is-from-bottom.is-from-right{transform-origin:bottom right}@keyframes components-animate__appear-animation{0%{transform:translateY(-2em) scaleY(0) scaleX(0)}to{transform:translateY(0) scaleY(1) scaleX(1)}}.components-animate__slide-in{animation:components-animate__slide-in-animation .1s cubic-bezier(0,0,.2,1);animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-animate__slide-in{animation-duration:1ms;animation-delay:0s}}.components-animate__slide-in.is-from-left{transform:translateX(100%)}.components-animate__slide-in.is-from-right{transform:translateX(-100%)}@keyframes components-animate__slide-in-animation{to{transform:translateX(0)}}.components-animate__loading{animation:components-animate__loading 1.6s ease-in-out infinite}@keyframes components-animate__loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.components-autocomplete__popover .components-popover__content>div{padding:16px;min-width:220px}.components-autocomplete__result.components-button{display:flex;height:auto;min-height:36px;text-align:left;width:100%}.components-autocomplete__result.components-button.is-selected{box-shadow:0 0 0 2px var(--wp-admin-theme-color)}.components-button-group{display:inline-block}.components-button-group .components-button{border-radius:0;display:inline-flex;color:#1e1e1e;box-shadow:inset 0 0 0 1px #1e1e1e}.components-button-group .components-button+.components-button{margin-left:-1px}.components-button-group .components-button:first-child{border-radius:2px 0 0 2px}.components-button-group .components-button:last-child{border-radius:0 2px 2px 0}.components-button-group .components-button.is-primary,.components-button-group .components-button:focus{position:relative;z-index:1}.components-button-group .components-button.is-primary{box-shadow:inset 0 0 0 1px #1e1e1e}.components-button{display:inline-flex;text-decoration:none;font-weight:400;font-size:13px;margin:0;border:0;cursor:pointer;-webkit-appearance:none;background:none;transition:box-shadow .1s linear;height:36px;align-items:center;box-sizing:border-box;padding:6px 12px;border-radius:2px;color:#1e1e1e}@media (prefers-reduced-motion:reduce){.components-button{transition-duration:0s;transition-delay:0s}}.components-button:hover,.components-button[aria-expanded=true]{color:var(--wp-admin-theme-color)}.components-button[aria-disabled=true]:hover{color:initial}.components-button:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid transparent}.components-button.is-primary{white-space:nowrap;background:var(--wp-admin-theme-color);color:#fff;text-decoration:none;text-shadow:none;outline:1px solid transparent}.components-button.is-primary:hover:not(:disabled){background:var(--wp-admin-theme-color-darker-10);color:#fff}.components-button.is-primary:active:not(:disabled){background:var(--wp-admin-theme-color-darker-20);border-color:var(--wp-admin-theme-color-darker-20);color:#fff}.components-button.is-primary:focus:not(:disabled){box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.is-primary:disabled,.components-button.is-primary:disabled:active:enabled,.components-button.is-primary[aria-disabled=true],.components-button.is-primary[aria-disabled=true]:active:enabled,.components-button.is-primary[aria-disabled=true]:enabled{color:hsla(0,0%,100%,.4);background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);opacity:1;outline:none}.components-button.is-primary:disabled:active:enabled:focus:enabled,.components-button.is-primary:disabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:active:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:focus:enabled{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-button.is-primary.is-busy,.components-button.is-primary.is-busy:disabled,.components-button.is-primary.is-busy[aria-disabled=true]{color:#fff;background-size:100px 100%;background-image:linear-gradient(-45deg,var(--wp-admin-theme-color) 33%,var(--wp-admin-theme-color-darker-20) 0,var(--wp-admin-theme-color-darker-20) 70%,var(--wp-admin-theme-color) 0);border-color:var(--wp-admin-theme-color)}.components-button.is-secondary,.components-button.is-tertiary{outline:1px solid transparent}.components-button.is-secondary:active:not(:disabled),.components-button.is-tertiary:active:not(:disabled){background:#ddd;color:var(--wp-admin-theme-color-darker-10);box-shadow:none}.components-button.is-secondary:hover:not(:disabled),.components-button.is-tertiary:hover:not(:disabled){color:var(--wp-admin-theme-color-darker-10);box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color-darker-10)}.components-button.is-secondary:disabled,.components-button.is-secondary[aria-disabled=true],.components-button.is-secondary[aria-disabled=true]:hover,.components-button.is-tertiary:disabled,.components-button.is-tertiary[aria-disabled=true],.components-button.is-tertiary[aria-disabled=true]:hover{color:#828282;background:#eaeaea;transform:none;opacity:1;box-shadow:none;outline:none}.components-button.is-secondary{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);outline:1px solid transparent}.components-button.is-secondary,.components-button.is-tertiary{white-space:nowrap;color:var(--wp-admin-theme-color);background:transparent}.components-button.is-tertiary{padding:6px}.components-button.is-tertiary .dashicon{display:inline-block;flex:0 0 auto}.components-button.is-destructive{color:#cc1818;box-shadow:inset 0 0 0 1px #cc1818}.components-button.is-destructive:hover:not(:disabled){color:#710d0d;box-shadow:inset 0 0 0 1px #710d0d}.components-button.is-destructive:focus:not(:disabled){color:var(--wp-admin-theme-color)}.components-button.is-destructive:active:not(:disabled){background:#ccc}.components-button.is-destructive.is-primary{color:#fff;background:#cc1818;box-shadow:inset 0 0 0 1px #cc1818}.components-button.is-destructive.is-primary:hover:not(:disabled){color:#fff;background:#710d0d;box-shadow:inset 0 0 0 1px #710d0d}.components-button.is-link{margin:0;padding:0;box-shadow:none;border:0;border-radius:0;background:none;outline:none;text-align:left;color:var(--wp-admin-theme-color);text-decoration:underline;transition-property:border,background,color;transition-duration:.05s;transition-timing-function:ease-in-out;height:auto}@media (prefers-reduced-motion:reduce){.components-button.is-link{transition-duration:0s;transition-delay:0s}}.components-button.is-link:focus{border-radius:2px}.components-button.is-link.is-destructive{color:#cc1818}.components-button.is-link.is-destructive:active:not(:disabled),.components-button.is-link.is-destructive:hover:not(:disabled){color:#710d0d;background:none}.components-button.is-link.is-destructive:focus:not(:disabled){color:var(--wp-admin-theme-color)}.components-button:not([aria-disabled=true]):active{color:inherit}.components-button:disabled,.components-button[aria-disabled=true]{cursor:default;opacity:.3}.components-button.is-busy,.components-button.is-secondary.is-busy,.components-button.is-secondary.is-busy:disabled,.components-button.is-secondary.is-busy[aria-disabled=true]{animation:components-button__busy-animation 2.5s linear infinite;opacity:1;background-size:100px 100%;background-image:linear-gradient(-45deg,#fafafa 33%,#e0e0e0 0,#e0e0e0 70%,#fafafa 0)}.components-button.is-small{height:24px;line-height:22px;padding:0 8px;font-size:11px}.components-button.is-small.has-icon:not(.has-text){padding:0 8px;width:24px}.components-button.has-icon{padding:6px;min-width:36px;justify-content:center}.components-button.has-icon .dashicon{display:inline-block;flex:0 0 auto;margin-left:2px;margin-right:2px}.components-button.has-icon.has-text{justify-content:left}.components-button.has-icon.has-text svg{margin-right:8px}.components-button.has-icon.has-text .dashicon{margin-right:10px}.components-button.is-pressed{color:#fff;background:#1e1e1e}.components-button.is-pressed:focus:not(:disabled){box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.components-button.is-pressed:hover:not(:disabled){color:#fff;background:#1e1e1e}.components-button svg{fill:currentColor;outline:none}.components-button .components-visually-hidden{height:auto}@keyframes components-button__busy-animation{0%{background-position:200px 0}}.components-checkbox-control__input[type=checkbox]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;font-size:16px;line-height:normal;border:1px solid #1e1e1e;transition:none;border-radius:2px;background:#fff;color:#1e1e1e;clear:none;cursor:pointer;display:inline-block;line-height:0;margin:0 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:top;width:24px;height:24px;-webkit-appearance:none;appearance:none;transition:border-color .1s ease-in-out}@media (min-width:600px){.components-checkbox-control__input[type=checkbox]{font-size:13px;line-height:normal}}.components-checkbox-control__input[type=checkbox]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{margin:-3px -5px;color:#fff}@media (min-width:782px){.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{margin:-4px 0 0 -5px}}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{content:"";float:left;display:inline-block;vertical-align:middle;width:16px;font:normal 30px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:782px){.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{float:none;font-size:21px}}@media (min-width:600px){.components-checkbox-control__input[type=checkbox]{height:20px;width:20px}}@media (prefers-reduced-motion:reduce){.components-checkbox-control__input[type=checkbox]{transition-duration:0s;transition-delay:0s}}.components-checkbox-control__input[type=checkbox]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid transparent}.components-checkbox-control__input[type=checkbox]:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]:checked::-ms-check{opacity:0}.components-checkbox-control__input[type=checkbox]:checked:before{content:none}.components-checkbox-control__input-container{position:relative;display:inline-block;margin-right:12px;vertical-align:middle;width:24px;height:24px}@media (min-width:600px){.components-checkbox-control__input-container{width:20px;height:20px}}svg.components-checkbox-control__checked{fill:#fff;cursor:pointer;position:absolute;left:0;top:0;width:24px;height:24px;-webkit-user-select:none;user-select:none;pointer-events:none}@media (min-width:600px){svg.components-checkbox-control__checked{left:-2px;top:-2px}}.components-circular-option-picker{display:inline-block;width:100%;min-width:188px}.components-circular-option-picker .components-circular-option-picker__custom-clear-wrapper{display:flex;justify-content:flex-end}.components-circular-option-picker .components-circular-option-picker__swatches{margin-right:-12px}.components-circular-option-picker__option-wrapper{display:inline-block;height:28px;width:28px;margin-right:12px;margin-bottom:12px;vertical-align:top;transform:scale(1);transition:transform .1s ease}@media (prefers-reduced-motion:reduce){.components-circular-option-picker__option-wrapper{transition-duration:0s;transition-delay:0s}}.components-circular-option-picker__option-wrapper:hover{transform:scale(1.2)}.components-circular-option-picker__option-wrapper>div{height:100%;width:100%}.components-circular-option-picker__option-wrapper:before{content:"";position:absolute;top:1px;left:1px;bottom:1px;right:1px;border-radius:50%;z-index:-1;background:url("data:image/svg+xml;charset=utf-8,%3Csvg width='28' height='28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8V6H4v2h2zm2 0V6h2v2H8zm2 8H8v-2h2v2zm2 0v-2h2v2h-2zm0 2v-2h-2v2H8v2h2v-2h2zm2 0v2h-2v-2h2zm2 0h-2v-2h2v2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z' fill='%23555D65'/%3E%3Cpath d='M18 18v2h-2v-2h2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z' fill='%23555D65'/%3E%3C/svg%3E")}.components-circular-option-picker__option{display:inline-block;vertical-align:top;height:100%;width:100%;border:none;border-radius:50%;background:transparent;box-shadow:inset 0 0 0 14px;transition:box-shadow .1s ease;cursor:pointer}@media (prefers-reduced-motion:reduce){.components-circular-option-picker__option{transition-duration:0s;transition-delay:0s}}.components-circular-option-picker__option:hover{box-shadow:inset 0 0 0 14px!important}.components-circular-option-picker__option.is-pressed{box-shadow:inset 0 0 0 4px;position:relative;z-index:1;overflow:visible}.components-circular-option-picker__option.is-pressed+svg{position:absolute;left:2px;top:2px;border-radius:50%;z-index:2;pointer-events:none}.components-circular-option-picker__option:after{content:"";position:absolute;top:-1px;left:-1px;bottom:-1px;right:-1px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);border:1px solid transparent}.components-circular-option-picker__option:focus:after{content:"";border:2px solid #757575;width:32px;height:32px;position:absolute;top:-2px;left:-2px;border-radius:50%;box-shadow:inset 0 0 0 2px #fff}.components-circular-option-picker__option.components-button:focus{background-color:transparent;box-shadow:inset 0 0 0 14px;outline:none}.components-circular-option-picker__button-action .components-circular-option-picker__option{color:#fff;background:#fff}.components-circular-option-picker__dropdown-link-action{margin-right:16px}.components-circular-option-picker__dropdown-link-action .components-button{line-height:22px}.components-color-edit__color-option-main-area{display:flex;align-items:center}.components-color-edit__color-option-main-area div.components-circular-option-picker__option-wrapper{display:block;margin:8px}.components-color-edit__color-option.is-hover{background:#e0e0e0}.components-color-edit__cancel-button{float:right}.components-color-edit__color-option-color-name{width:100%}.components-color-edit__label-and-insert-container{display:flex;align-items:center;justify-content:space-between}.components-color-edit__insert-button{margin-top:-8px}.components-color-edit__hidden-control{position:relative;left:-9999px}.components-color-edit__color-option-color-name-input .components-base-control__field{margin-bottom:0;margin-right:8px}.components-color-edit__slug-input{margin-left:8px}.components-color-edit__reset-button{float:right}.component-color-indicator{width:25px;height:16px;margin-left:.8rem;border:1px solid #dadada;display:inline-block}.component-color-indicator+.component-color-indicator{margin-left:.5rem}.components-color-picker{width:100%}.components-color-picker *{box-sizing:border-box}.components-color-picker__saturation{width:100%;padding-bottom:55%;position:relative}.components-color-picker__body{padding:16px 16px 12px}.components-color-picker__controls{display:flex}.components-color-picker__alpha-pointer,.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{padding:0;position:absolute;cursor:pointer;box-shadow:none;border:none}.components-color-picker__swatch{margin-right:8px;width:32px;height:32px;border-radius:50%;position:relative;overflow:hidden;background-image:linear-gradient(45deg,#ddd 25%,transparent 0),linear-gradient(-45deg,#ddd 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ddd 0),linear-gradient(-45deg,transparent 75%,#ddd 0);background-size:10px 10px;background-position:0 0,0 5px,5px -5px,-5px 0}.is-alpha-disabled .components-color-picker__swatch{width:12px;height:12px;margin-top:0}.components-color-picker__active{border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);z-index:2}.components-color-picker__active,.components-color-picker__saturation-black,.components-color-picker__saturation-color,.components-color-picker__saturation-white{position:absolute;top:0;left:0;right:0;bottom:0}.components-color-picker__saturation-color{overflow:visible}.components-color-picker__saturation-white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.components-color-picker__saturation-black{background:linear-gradient(0deg,#000,transparent)}.components-button.components-color-picker__saturation-pointer{width:14px;height:14px;padding:0;border-radius:50%;background-color:transparent;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #fff,inset 0 0 0 1px #000,0 0 0 2px #000}.components-button.components-color-picker__saturation-pointer:focus:not(:disabled){box-shadow:0 0 0 2px #fff,inset 0 0 0 1px #000,0 0 0 3px #000}.components-color-picker__toggles{flex:1}.components-color-picker__alpha{background-image:linear-gradient(45deg,#ddd 25%,transparent 0),linear-gradient(-45deg,#ddd 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ddd 0),linear-gradient(-45deg,transparent 75%,#ddd 0);background-size:10px 10px;background-position:0 0,0 5px,5px -5px,-5px 0}.components-color-picker__alpha-gradient,.components-color-picker__hue-gradient{position:absolute;top:0;left:0;right:0;bottom:0}.components-color-picker__alpha,.components-color-picker__hue{height:12px;position:relative}.is-alpha-enabled .components-color-picker__hue{margin-bottom:8px}.components-color-picker__alpha-bar,.components-color-picker__hue-bar{position:relative;margin:0 3px;height:100%;padding:0 2px}.components-color-picker__hue-gradient{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.components-color-picker__alpha-pointer,.components-color-picker__hue-pointer{left:0;width:14px;height:14px;border-radius:50%;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);background:#fff;transform:translate(-7px,-1px)}.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{transition-duration:0s;transition-delay:0s}}.components-color-picker__saturation-pointer:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color),0 0 5px 0 var(--wp-admin-theme-color),inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4)}.components-color-picker__alpha-pointer:focus,.components-color-picker__hue-pointer:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 2px var(--wp-admin-theme-color),0 0 3px 0 var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.components-color-picker__inputs-wrapper{margin:0 -4px;padding-top:16px;display:flex;align-items:flex-end;min-width:255px}.components-color-picker__inputs-wrapper fieldset{flex:1;border:none;margin:0;padding:0}.components-color-picker__inputs-wrapper .components-color-picker__inputs-fields .components-text-control__input[type=number]{padding:6px 3px;margin:0}.components-color-picker__inputs-field{width:100%}.components-color-picker__inputs-fields{display:flex;direction:ltr;flex-grow:1;margin-right:4px}.components-color-picker__inputs-fields .components-base-control+.components-base-control{margin-top:0}.components-color-picker__inputs-fields .components-base-control__field{margin:0 2px}.components-color-picker__inputs-toggle{height:30px;padding:0 5px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{width:100%;border:none;box-shadow:none;font-size:16px;padding:2px;margin:0;line-height:inherit;min-height:auto}@media (min-width:600px){input.components-combobox-control__input[type=text]{font-size:13px}}input.components-combobox-control__input[type=text]:focus{outline:none;box-shadow:none}.components-combobox-control__suggestions-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:flex-start;width:100%;margin:0 0 8px;padding:4px}@media (prefers-reduced-motion:reduce){.components-combobox-control__suggestions-container{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__reset.components-button{display:flex;height:24px;min-width:24px;padding:0}.components-color-list-picker,.components-color-list-picker__swatch-button{width:100%}.components-custom-gradient-picker__gradient-bar:not(.has-gradient){opacity:.4}.components-custom-gradient-picker__gradient-bar{margin-top:12px;width:100%;height:36px;border-radius:36px;margin-bottom:12px;padding-left:6px;padding-right:30px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__markers-container{position:relative}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point{border-radius:50%;background:#fff;padding:2px;top:6px;min-width:24px;width:24px;height:24px;position:relative;color:#1e1e1e}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point svg{height:100%;width:100%}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button{border:2px solid transparent;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #fff;border-radius:50%;height:24px;width:24px;padding:0;position:absolute;top:6px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button.is-active,.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #1e1e1e}.components-custom-gradient-picker__color-picker-popover .components-custom-gradient-picker__remove-control-point{margin-left:auto;margin-right:auto;display:block;margin-bottom:8px}.components-custom-gradient-picker__inserter{width:100%}.components-custom-gradient-picker__liner-gradient-indicator{display:inline-block;flex:0 auto;width:20px;height:20px}.components-custom-gradient-picker .components-custom-gradient-picker__ui-line{margin-bottom:16px}.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-angle-picker,.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-custom-gradient-picker__type-picker{margin-bottom:0}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar{border:none}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar>div+div{margin-left:1px}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar button.is-pressed>svg{background:#fff;border:1px solid #949494;border-radius:2px}.components-custom-select-control{position:relative}.components-custom-select-control__label{display:block;margin-bottom:8px}.components-custom-select-control__button{border:1px solid #757575;border-radius:2px;min-height:30px;min-width:130px;position:relative;text-align:left}.components-custom-select-control__button.components-custom-select-control__button{padding-right:24px}.components-custom-select-control__button:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-custom-select-control__button .components-custom-select-control__button-icon{height:100%;padding:0;position:absolute;right:0;top:0}.components-custom-select-control__menu{border:1px solid #1e1e1e;background-color:#fff;border-radius:2px;outline:none;transition:none;max-height:400px;min-width:100%;overflow:auto;padding:0;position:absolute;z-index:1000000}.components-custom-select-control__menu[aria-hidden=true]{display:none}.components-custom-select-control__item{align-items:center;display:flex;list-style-type:none;padding:8px;cursor:default;line-height:28px}.components-custom-select-control__item.is-highlighted{background:#ddd}.components-custom-select-control__item .components-custom-select-control__item-icon{margin-right:0;margin-left:auto}.components-custom-select-control__item:last-child{margin-bottom:0}.PresetDateRangePicker_panel{padding:0 22px 11px}.PresetDateRangePicker_button{position:relative;height:100%;text-align:center;background:0 0;border:2px solid #00a699;color:#00a699;padding:4px 12px;margin-right:8px;font:inherit;font-weight:700;line-height:normal;overflow:visible;box-sizing:border-box;cursor:pointer}.PresetDateRangePicker_button:active{outline:0}.PresetDateRangePicker_button__selected{color:#fff;background:#00a699}.SingleDatePickerInput{display:inline-block;background-color:#fff}.SingleDatePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb}.SingleDatePickerInput__rtl{direction:rtl}.SingleDatePickerInput__disabled{background-color:#f2f2f2}.SingleDatePickerInput__block{display:block}.SingleDatePickerInput__showClearDate{padding-right:30px}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;transform:translateY(-50%)}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%}.SingleDatePickerInput_clearDate__small{padding:6px}.SingleDatePickerInput_clearDate__hide{visibility:hidden}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle}.SingleDatePickerInput_clearDate_svg__small{height:9px}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle}.SingleDatePicker{position:relative;display:inline-block}.SingleDatePicker__block{display:block}.SingleDatePicker_picker{z-index:1;background-color:#fff;position:absolute}.SingleDatePicker_picker__rtl{direction:rtl}.SingleDatePicker_picker__directionLeft{left:0}.SingleDatePicker_picker__directionRight{right:0}.SingleDatePicker_picker__portal{background-color:rgba(0,0,0,.3);position:fixed;top:0;left:0;height:100%;width:100%}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:#b0b3b4;text-decoration:none}.SingleDatePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;cursor:pointer;font-size:14px}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0}.DayPickerKeyboardShortcuts_show{width:22px;position:absolute;z-index:2}.DayPickerKeyboardShortcuts_show__bottomRight{border-top:26px solid transparent;border-right:33px solid #00a699;bottom:0;right:0}.DayPickerKeyboardShortcuts_show__bottomRight:hover{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topRight{border-bottom:26px solid transparent;border-right:33px solid #00a699;top:0;right:0}.DayPickerKeyboardShortcuts_show__topRight:hover{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topLeft{border-bottom:26px solid transparent;border-left:33px solid #00a699;top:0;left:0}.DayPickerKeyboardShortcuts_show__topLeft:hover{border-left:33px solid #008489}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:-28px}.DayPickerKeyboardShortcuts_showSpan__topRight{top:1px;right:-28px}.DayPickerKeyboardShortcuts_showSpan__topLeft{top:1px;left:-28px}.DayPickerKeyboardShortcuts_panel{overflow:auto;background:#fff;border:1px solid #dbdbdb;border-radius:2px;position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;padding:22px;margin:33px}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0}.DayPickerKeyboardShortcuts_list{list-style:none;padding:0;font-size:14px}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2}.DayPickerKeyboardShortcuts_close:active{outline:0}.DayPickerKeyboardShortcuts_closeSvg{height:15px;width:15px;fill:#cacccd}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a}.CalendarDay{box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center}.CalendarDay:active{outline:0}.CalendarDay__defaultCursor{cursor:default}.CalendarDay__default{border:1px solid #e4e7e7;color:#484848;background:#fff}.CalendarDay__default:hover{background:#e4e7e7;border:1px double #e4e7e7;color:inherit}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit}.CalendarDay__outside{border:0;background:#fff;color:#484848}.CalendarDay__outside:hover{border:0}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848}.CalendarDay__selected_span{background:#66e2da;border:1px solid #33dacd;color:#fff}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px solid #33dacd;color:#fff}.CalendarDay__last_in_range{border-right:#00a699}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px solid #00a699;color:#fff}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px solid #80e8e0;color:#007a87}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px solid #80e8e0;color:#007a87}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd}.CalendarMonth{background:#fff;text-align:center;vertical-align:top;-webkit-user-select:none;user-select:none}.CalendarMonth_table{border-collapse:collapse;border-spacing:0}.CalendarMonth_verticalSpacing{border-collapse:separate}.CalendarMonth_caption{color:#484848;font-size:18px;text-align:center;padding-top:22px;padding-bottom:37px;caption-side:top}.CalendarMonth_caption__verticalScrollable{padding-top:12px;padding-bottom:7px}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0}.CalendarMonthGrid__animating{z-index:1}.CalendarMonthGrid__horizontal{position:absolute;left:0}.CalendarMonthGrid__vertical{margin:0 auto}.CalendarMonthGrid__vertical_scrollable{margin:0 auto;overflow-y:scroll}.CalendarMonthGrid_month__horizontal{display:inline-block;vertical-align:top;min-height:100%}.CalendarMonthGrid_month__hideForAnimation{position:absolute;z-index:-1;opacity:0;pointer-events:none}.CalendarMonthGrid_month__hidden{visibility:hidden}.DayPickerNavigation{position:relative;z-index:2}.DayPickerNavigation__horizontal{height:0}.DayPickerNavigation__verticalDefault{position:absolute;width:100%;height:52px;bottom:0;left:0}.DayPickerNavigation__verticalScrollableDefault{position:relative}.DayPickerNavigation_button{cursor:pointer;-webkit-user-select:none;user-select:none;border:0;padding:0;margin:0}.DayPickerNavigation_button__default{border:1px solid #e4e7e7;background-color:#fff;color:#757575}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4}.DayPickerNavigation_button__default:active{background:#f2f2f2}.DayPickerNavigation_button__horizontalDefault{position:absolute;top:18px;line-height:.78;border-radius:3px;padding:6px 9px}.DayPickerNavigation_leftButton__horizontalDefault{left:22px}.DayPickerNavigation_rightButton__horizontalDefault{right:22px}.DayPickerNavigation_button__verticalDefault{padding:5px;background:#fff;box-shadow:0 0 5px 2px rgba(0,0,0,.1);position:relative;display:inline-block;height:100%;width:50%}.DayPickerNavigation_nextButton__verticalDefault{border-left:0}.DayPickerNavigation_nextButton__verticalScrollableDefault{width:100%}.DayPickerNavigation_svg__horizontal{height:19px;width:19px;fill:#82888a;display:block}.DayPickerNavigation_svg__vertical{height:42px;width:42px;fill:#484848;display:block}.DayPicker{position:relative;text-align:left}.DayPicker,.DayPicker__horizontal{background:#fff}.DayPicker__verticalScrollable{height:100%}.DayPicker__hidden{visibility:hidden}.DayPicker__withBorder{box-shadow:0 2px 6px rgba(0,0,0,.05),0 0 0 1px rgba(0,0,0,.07);border-radius:3px}.DayPicker_portal__horizontal{box-shadow:none;position:absolute;left:50%;top:50%}.DayPicker_portal__vertical{position:static}.DayPicker_focusRegion{outline:0}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top}.DayPicker_weekHeaders{position:relative}.DayPicker_weekHeaders__horizontal{margin-left:13px}.DayPicker_weekHeader{color:#757575;position:absolute;top:62px;z-index:2;text-align:left;padding:0!important}.DayPicker_weekHeader__vertical{left:50%}.DayPicker_weekHeader__verticalScrollable{top:0;display:table-row;border-bottom:1px solid #dbdbdb;background:#fff;margin-left:0;left:0;width:100%;text-align:center}.DayPicker_weekHeader_ul{list-style:none;margin:1px 0;padding-left:0;padding-right:0;font-size:14px}.DayPicker_weekHeader_li{display:inline-block;text-align:center;margin:0 1px}.DayPicker_transitionContainer{position:relative;overflow:hidden;border-radius:3px}.DayPicker_transitionContainer__horizontal{transition:height .2s ease-in-out}.DayPicker_transitionContainer__vertical{width:100%}.DayPicker_transitionContainer__verticalScrollable{padding-top:20px;height:100%;position:absolute;top:0;bottom:0;right:0;left:0;overflow-y:scroll}.DateInput{margin:0;padding:0;background:#fff;position:relative;display:inline-block;width:130px;vertical-align:middle}.DateInput__small{width:97px}.DateInput__block{width:100%}.DateInput__disabled{background:#f2f2f2;color:#dbdbdb}.DateInput_input{font-weight:200;font-size:19px;line-height:24px;color:#484848;background-color:#fff;width:100%;padding:11px 11px 9px;border:0;border-bottom:2px solid transparent;border-radius:0}.DateInput_input__small{font-size:15px;line-height:18px;letter-spacing:.2px;padding:7px 7px 5px}.DateInput_input__regular{font-weight:auto}.DateInput_input__readOnly{-webkit-user-select:none;user-select:none}.DateInput_input__focused{outline:0;background:#fff;border:0;border-bottom:2px solid #008489}.DateInput_input__disabled{background:#f2f2f2;font-style:italic}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.DateInput_fang{position:absolute;width:20px;height:10px;left:22px;z-index:2}.DateInput_fangShape{fill:#fff}.DateInput_fangStroke{stroke:#dbdbdb;fill:transparent}.DateRangePickerInput{background-color:#fff;display:inline-block}.DateRangePickerInput__disabled{background:#f2f2f2}.DateRangePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb}.DateRangePickerInput__rtl{direction:rtl}.DateRangePickerInput__block{display:block}.DateRangePickerInput__showClearDates{padding-right:30px}.DateRangePickerInput_arrow{display:inline-block;vertical-align:middle;color:#484848}.DateRangePickerInput_arrow_svg{vertical-align:middle;fill:#484848;height:24px;width:24px}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;transform:translateY(-50%)}.DateRangePickerInput_clearDates__small{padding:6px}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%}.DateRangePickerInput_clearDates__hide{visibility:hidden}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle}.DateRangePickerInput_clearDates_svg__small{height:9px}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle}.DateRangePicker{position:relative;display:inline-block}.DateRangePicker__block{display:block}.DateRangePicker_picker{z-index:1;background-color:#fff;position:absolute}.DateRangePicker_picker__rtl{direction:rtl}.DateRangePicker_picker__directionLeft{left:0}.DateRangePicker_picker__directionRight{right:0}.DateRangePicker_picker__portal{background-color:rgba(0,0,0,.3);position:fixed;top:0;left:0;height:100%;width:100%}.DateRangePicker_picker__fullScreenPortal{background-color:#fff}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:#b0b3b4;text-decoration:none}.DateRangePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd}.components-datetime{padding:16px}.components-panel__body .components-datetime{padding:0}.components-datetime .components-datetime__calendar-help{padding:16px}.components-datetime .components-datetime__calendar-help h4{margin:0}.components-datetime .components-datetime__buttons{display:flex;justify-content:space-between}.components-datetime .components-datetime__date-help-toggle{display:block;margin-left:auto}.components-datetime fieldset{border:0;padding:0;margin:0}.components-datetime input,.components-datetime select{box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575}@media (prefers-reduced-motion:reduce){.components-datetime input,.components-datetime select{transition-duration:0s;transition-delay:0s}}.components-datetime .components-button,.components-datetime input[type=number],.components-datetime select{height:30px;margin-top:0;margin-bottom:0}.components-datetime__date{min-height:236px;border-top:1px solid #ddd}.components-datetime__date .DayPickerNavigation_leftButton__horizontalDefault{
  /*!rtl:begin:ignore*/left:13px
  /*!rtl:end:ignore*/}.components-datetime__date .CalendarMonth_caption{font-size:13px}.components-datetime__date .CalendarMonth_table{border-collapse:separate;border-spacing:2px}.components-datetime__date .CalendarDay{font-size:13px;border:none;border-radius:50%;text-align:center}.components-datetime__date .CalendarDay:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 3px #fff;outline:2px solid transparent}.components-datetime__date .CalendarDay__selected{background:var(--wp-admin-theme-color);border:2px solid transparent}.components-datetime__date .CalendarDay__selected:hover{background:var(--wp-admin-theme-color-darker-20)}.components-datetime__date .CalendarDay__selected:focus{box-shadow:inset 0 0 0 1px #fff}.components-datetime__date .DayPickerNavigation_button__horizontalDefault{padding:2px 8px;top:20px}.components-datetime__date .DayPickerNavigation_button__horizontalDefault:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-datetime__date .DayPicker_weekHeader{top:50px}.components-datetime__date .DayPicker_weekHeader .DayPicker_weekHeader_ul{margin:1px;padding-left:0;padding-right:0}.components-datetime__date.is-description-visible .DayPicker{visibility:hidden}.components-datetime__date .CalendarDay .components-datetime__date__day{height:100%;display:flex;justify-content:center;align-content:center;flex-direction:column;position:relative}.components-datetime__date .CalendarDay .components-datetime__date__day.has-events:before{content:" ";width:4px;height:4px;border-radius:2px;position:absolute;left:50%;margin-left:-2px;bottom:0;background-color:#fff}.components-datetime__date .CalendarDay:not(.CalendarDay__selected) .components-datetime__date__day.has-events:before{background:var(--wp-admin-theme-color)}.components-datetime__time{padding-bottom:16px}.components-datetime__time fieldset{position:relative;margin-bottom:.5em}.components-datetime__time fieldset+fieldset{margin-bottom:0}.components-datetime__time .components-datetime__time-field-am-pm fieldset{margin-top:0}.components-datetime__time .components-datetime__time-wrapper{display:flex}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-separator{display:inline-block;padding:0 3px 0 0}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field-time{direction:ltr}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select{margin-right:4px}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select:focus{position:relative;z-index:1}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]{padding:2px;margin-right:4px;text-align:center;-moz-appearance:textfield}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]:focus{position:relative;z-index:1}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.components-datetime__time.is-12-hour .components-datetime__time-field-day input{margin:-4px 0 0!important;border-radius:2px 0 0 2px!important}.components-datetime__time.is-12-hour .components-datetime__time-field-year input{border-radius:0 2px 2px 0!important}.components-datetime__timezone{line-height:30px;margin-left:4px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.components-datetime__time-legend{font-weight:600;margin-top:.5em}.components-datetime__time-legend.invisible{position:absolute;top:-999em;left:-999em}.components-datetime__time-field-day-input,.components-datetime__time-field-hours-input,.components-datetime__time-field-minutes-input{width:35px}.components-datetime__time-field-year-input{width:55px}.components-datetime__time-field-month-select{max-width:145px}.components-popover .components-datetime__date{padding-left:4px}.block-editor-dimension-control .components-base-control__field{display:flex;align-items:center}.block-editor-dimension-control .components-base-control__label{display:flex;align-items:center;margin-right:1em;margin-bottom:0}.block-editor-dimension-control .components-base-control__label .dashicon{margin-right:.5em}.block-editor-dimension-control.is-manual .components-base-control__label{width:10em}body.is-dragging-components-draggable{cursor:move;cursor:grabbing!important}.components-draggable__invisible-drag-image{position:fixed;left:-1000px;height:50px;width:50px}.components-draggable__clone{position:fixed;padding:0;background:transparent;pointer-events:none;z-index:1000000000}.components-drop-zone{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;visibility:hidden;opacity:0;transition:opacity .3s,background-color .3s,visibility 0s .3s;border:2px solid var(--wp-admin-theme-color);border-radius:2px}@media (prefers-reduced-motion:reduce){.components-drop-zone{transition-duration:0s;transition-delay:0s}}.components-drop-zone.is-active{opacity:1;visibility:visible;transition:opacity .3s,background-color .3s}@media (prefers-reduced-motion:reduce){.components-drop-zone.is-active{transition-duration:0s;transition-delay:0s}}.components-drop-zone.is-dragging-over-element{background-color:var(--wp-admin-theme-color)}.components-drop-zone__content{position:absolute;top:50%;left:0;right:0;z-index:50;transform:translateY(-50%);width:100%;text-align:center;color:#fff;transition:transform .2s ease-in-out}@media (prefers-reduced-motion:reduce){.components-drop-zone__content{transition-duration:0s;transition-delay:0s}}.components-drop-zone.is-dragging-over-element .components-drop-zone__content{transform:translateY(-50%) scale(1.05)}.components-drop-zone__content-icon,.components-drop-zone__content-text{display:block}.components-drop-zone__content-icon{margin:0 auto;line-height:0;fill:currentColor}.components-drop-zone__content-text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.components-dropdown{display:inline-block}.components-dropdown__content .components-popover__content>div{padding:12px}.components-dropdown-menu__popover .components-popover__content{min-width:200px}.components-dropdown-menu__menu{width:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4}.components-dropdown-menu__menu .components-dropdown-menu__menu-item,.components-dropdown-menu__menu .components-menu-item{width:100%;padding:6px;outline:none;cursor:pointer;white-space:nowrap}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator,.components-dropdown-menu__menu .components-menu-item.has-separator{margin-top:6px;position:relative;overflow:visible}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator:before,.components-dropdown-menu__menu .components-menu-item.has-separator:before{display:block;content:"";box-sizing:content-box;background-color:#ddd;position:absolute;top:-3px;left:0;right:0;height:1px}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-active svg,.components-dropdown-menu__menu .components-menu-item.is-active svg{color:#fff;background:#1e1e1e;box-shadow:0 0 0 1px #1e1e1e;border-radius:1px}.components-dropdown-menu__menu .components-dropdown-menu__menu-item>svg,.components-dropdown-menu__menu .components-menu-item>svg{border-radius:2px;width:24px;height:24px}.components-dropdown-menu__menu .components-menu-item__button,.components-dropdown-menu__menu .components-menu-item__button.components-button{min-height:36px;height:auto;text-align:left;padding-left:8px;padding-right:8px}.components-dropdown-menu__menu .components-menu-group{padding:12px;margin:0 -12px}.components-dropdown-menu__menu .components-menu-group:first-child{margin-top:-12px}.components-dropdown-menu__menu .components-menu-group:last-child{margin-bottom:-12px}.components-dropdown-menu__menu .components-menu-group+.components-menu-group{margin-top:0;border-top:1px solid #ccc;padding:12px}.is-alternate .components-dropdown-menu__menu .components-menu-group+.components-menu-group{border-color:#1e1e1e}.components-font-size-picker__controls{max-width:248px;display:flex;flex-wrap:wrap;align-items:center;margin-bottom:24px}.components-font-size-picker__controls .components-unit-control-wrapper{margin-right:8px}.components-font-size-picker__controls .components-unit-control-wrapper .components-input-control__label{font-weight:300;padding-bottom:0!important;margin-bottom:8px!important}.components-font-size-picker__controls .components-custom-select-control__button{min-width:120px}.components-font-size-picker__controls .components-font-size-picker__number{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:inline-block;font-weight:500;height:30px;margin:8px 8px 0 0;width:54px}@media (prefers-reduced-motion:reduce){.components-font-size-picker__controls .components-font-size-picker__number{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-font-size-picker__controls .components-font-size-picker__number{font-size:13px;line-height:normal}}.components-font-size-picker__controls .components-font-size-picker__number:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-font-size-picker__controls .components-font-size-picker__number::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-font-size-picker__controls .components-font-size-picker__number::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-font-size-picker__controls .components-font-size-picker__number:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-font-size-picker__controls .components-font-size-picker__number[value=""]+.components-button{cursor:default;opacity:.3;pointer-events:none}.components-font-size-picker__controls .components-font-size-picker__number-container{display:flex;flex-direction:column}.components-font-size-picker__controls .components-font-size-picker__select{margin-right:8px}.components-font-size-picker__controls .components-color-palette__clear{height:30px;margin-top:26px}.components-font-size-picker__custom-input .components-range-control__slider+.dashicon{width:30px;height:30px}.components-font-size-picker{border:0;padding:0;margin:0}.components-form-toggle{position:relative;display:inline-block}.components-form-toggle .components-form-toggle__track{content:"";display:inline-block;box-sizing:border-box;vertical-align:top;background-color:#fff;border:1px solid #1e1e1e;width:36px;height:18px;border-radius:9px;transition:background .2s ease}@media (prefers-reduced-motion:reduce){.components-form-toggle .components-form-toggle__track{transition-duration:0s;transition-delay:0s}}.components-form-toggle .components-form-toggle__thumb{display:block;position:absolute;box-sizing:border-box;top:3px;left:3px;width:12px;height:12px;border-radius:50%;transition:transform .1s ease;background-color:#1e1e1e;border:5px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.components-form-toggle .components-form-toggle__thumb{transition-duration:0s;transition-delay:0s}}.components-form-toggle.is-checked .components-form-toggle__track{background-color:var(--wp-admin-theme-color);border:9px solid transparent}.components-form-toggle .components-form-toggle__input:focus+.components-form-toggle__track{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:2px}.components-form-toggle.is-checked .components-form-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.components-disabled .components-form-toggle,.components-form-toggle.is-disabled{opacity:.3}.components-form-toggle input.components-form-toggle__input[type=checkbox]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;margin:0;padding:0;z-index:1;border:none}.components-form-toggle input.components-form-toggle__input[type=checkbox]:checked{background:none}.components-form-toggle input.components-form-toggle__input[type=checkbox]:before{content:""}.components-form-token-field__input-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:center;width:100%;margin:0 0 8px;padding:2px 4px;cursor:text}@media (prefers-reduced-motion:reduce){.components-form-token-field__input-container{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-form-token-field__input-container{font-size:13px;line-height:normal}}.components-form-token-field__input-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-form-token-field__input-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-form-token-field__input-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container.is-disabled{background:#ddd;border-color:#ddd}.components-form-token-field__input-container.is-active{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-form-token-field__input-container input[type=text].components-form-token-field__input{display:inline-block;flex:1;font-size:16px;width:100%;max-width:100%;margin-left:4px;padding:0;min-height:24px;min-width:50px;background:inherit;border:0;color:#1e1e1e;box-shadow:none}@media (min-width:600px){.components-form-token-field__input-container input[type=text].components-form-token-field__input{font-size:13px}}.components-form-token-field.is-active .components-form-token-field__input-container input[type=text].components-form-token-field__input,.components-form-token-field__input-container input[type=text].components-form-token-field__input:focus{outline:none;box-shadow:none}.components-form-token-field__input-container .components-form-token-field__token+input[type=text].components-form-token-field__input{width:auto}.components-form-token-field__label{display:inline-block;margin-bottom:4px}.components-form-token-field__help{font-size:12px;font-style:normal;color:#757575}.components-form-token-field__token{font-size:13px;display:flex;margin:2px 4px 2px 0;color:#1e1e1e;max-width:100%}.components-form-token-field__token.is-success .components-form-token-field__remove-token,.components-form-token-field__token.is-success .components-form-token-field__token-text{background:#4ab866}.components-form-token-field__token.is-error .components-form-token-field__remove-token,.components-form-token-field__token.is-error .components-form-token-field__token-text{background:#cc1818}.components-form-token-field__token.is-validating .components-form-token-field__remove-token,.components-form-token-field__token.is-validating .components-form-token-field__token-text{color:#757575}.components-form-token-field__token.is-borderless{position:relative;padding:0 16px 0 0}.components-form-token-field__token.is-borderless .components-form-token-field__token-text{background:transparent;color:var(--wp-admin-theme-color)}.components-form-token-field__token.is-borderless .components-form-token-field__remove-token{background:transparent;color:#757575;position:absolute;top:1px;right:0}.components-form-token-field__token.is-borderless.is-success .components-form-token-field__token-text{color:#4ab866}.components-form-token-field__token.is-borderless.is-error .components-form-token-field__token-text{color:#cc1818;border-radius:4px 0 0 4px;padding:0 4px 0 6px}.components-form-token-field__token.is-borderless.is-validating .components-form-token-field__token-text{color:#1e1e1e}.components-form-token-field__token.is-disabled .components-form-token-field__remove-token{cursor:default}.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{display:inline-block;line-height:24px;height:auto;background:#ddd;min-width:unset;transition:all .2s cubic-bezier(.4,1,.4,1)}@media (prefers-reduced-motion:reduce){.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-delay:0s}}.components-form-token-field__token-text{border-radius:2px 0 0 2px;padding:0 0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.components-form-token-field__remove-token.components-button{cursor:pointer;border-radius:0 2px 2px 0;padding:0 2px;color:#1e1e1e;line-height:10px;overflow:initial}.components-form-token-field__remove-token.components-button:hover{color:#1e1e1e}.components-form-token-field__suggestions-list{flex:1 0 100%;min-width:100%;max-height:9em;overflow-y:auto;transition:all .15s ease-in-out;list-style:none;border-top:1px solid #757575;margin:4px -4px -4px;padding:0}@media (prefers-reduced-motion:reduce){.components-form-token-field__suggestions-list{transition-duration:0s;transition-delay:0s}}.components-form-token-field__suggestion{color:#757575;display:block;font-size:13px;padding:4px 8px;margin:0;cursor:pointer}.components-form-token-field__suggestion.is-selected{background:var(--wp-admin-theme-color);color:#fff}.components-form-token-field__suggestion-match{text-decoration:underline}@media (min-width:600px){.components-guide{width:600px}}.components-guide .components-modal__header{background:none;border-bottom:none;width:100%;padding:0;margin:0}.components-guide .components-modal__header .components-button{align-self:flex-start;margin:8px 8px 0 0;position:static}.components-guide .components-modal__header .components-button:hover svg{fill:#fff}.components-guide__container{display:flex;flex-direction:column;justify-content:space-between;margin-top:-60px;min-height:100%}.components-guide__page{display:flex;flex-direction:column;justify-content:center;position:relative}@media (min-width:600px){.components-guide__page{min-height:300px}}.components-guide__footer{align-content:center;display:flex;height:30px;justify-content:center;margin:0 0 24px;padding:0 32px;position:relative;width:100%}@media (max-width:600px){.components-guide__footer{position:absolute;bottom:0}}.components-guide__page-control{margin:0;text-align:center}.components-guide__page-control li{display:inline-block;margin:0}.components-guide__page-control .components-button{height:30px;min-width:20px;margin:-6px 0}.components-guide .components-modal__content{padding:0}.components-modal__frame.components-guide{border:none;min-width:312px;height:80vh;max-height:575px}@media (max-width:600px){.components-modal__frame.components-guide{bottom:5%;left:16px;right:16px;top:5%;margin:0 auto}}.components-button.components-guide__back-button,.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{height:30px;position:absolute}.components-button.components-guide__back-button,.components-button.components-guide__forward-button{font-size:13px;padding:4px 2px}.components-button.components-guide__back-button.has-text svg,.components-button.components-guide__forward-button.has-text svg{margin:0}.components-button.components-guide__back-button:hover,.components-button.components-guide__forward-button:hover{text-decoration:underline}.components-button.components-guide__back-button{left:32px}.components-button.components-guide__forward-button{right:32px;color:#1386bf;font-weight:700}.components-button.components-guide__finish-button{right:32px}.components-button.components-guide__inline-finish-button{display:none}[role=region]{position:relative}.is-focusing-regions [role=region]:focus:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;outline:4px solid transparent;box-shadow:inset 0 0 0 4px var(--wp-admin-theme-color)}@supports (outline-offset:1px){.is-focusing-regions [role=region]:focus:after{content:none}.is-focusing-regions [role=region]:focus{outline-style:solid;outline-color:var(--wp-admin-theme-color);outline-width:4px;outline-offset:-4px}}.components-menu-group+.components-menu-group{margin-top:8px;padding-top:8px;border-top:1px solid #1e1e1e}.components-menu-group+.components-menu-group.has-hidden-separator{border-top:none;margin-top:0;padding-top:0}.components-menu-group__label{padding:0 8px;margin-top:4px;margin-bottom:12px;color:#757575;text-transform:uppercase;font-size:11px;font-weight:500}.components-menu-item__button,.components-menu-item__button.components-button{width:100%}.components-menu-item__button.components-button .components-menu-items__item-icon,.components-menu-item__button .components-menu-items__item-icon{margin-right:-2px;margin-left:24px;display:inline-block;flex:0 0 auto}.components-menu-item__button.components-button .components-menu-item__shortcut+.components-menu-items__item-icon,.components-menu-item__button .components-menu-item__shortcut+.components-menu-items__item-icon{margin-left:8px}.components-menu-item__button .block-editor-block-icon,.components-menu-item__button.components-button .block-editor-block-icon{margin-left:-2px;margin-right:8px}.components-menu-item__button.components-button.is-primary,.components-menu-item__button.is-primary{justify-content:center}.components-menu-item__button.components-button.is-primary .components-menu-item__item,.components-menu-item__button.is-primary .components-menu-item__item{margin-right:0}.components-menu-item__info-wrapper{display:flex;flex-direction:column;margin-right:auto}.components-menu-item__info{margin-top:4px;font-size:12px;color:#757575;white-space:normal}.components-menu-item__item{white-space:nowrap;margin-right:auto;display:inline-flex;align-items:center}.components-menu-item__shortcut{align-self:center;margin-right:0;margin-left:auto;padding-left:24px;color:currentColor;display:none}@media (min-width:480px){.components-menu-item__shortcut{display:inline}}.components-menu-items-choice.components-button svg,.components-menu-items-choice svg{margin-right:12px}.components-menu-items-choice.components-button.has-icon,.components-menu-items-choice.has-icon{padding-left:12px}.components-modal__screen-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.35);z-index:100000;animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-modal__screen-overlay{animation-duration:1ms;animation-delay:0s}}.components-modal__frame{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box;margin:0;background:#fff;box-shadow:0 10px 10px rgba(0,0,0,.25);border-radius:2px;overflow:auto}@media (min-width:600px){.components-modal__frame{top:50%;right:auto;bottom:auto;left:50%;min-width:360px;max-width:calc(100% - 32px);max-height:90%;transform:translate(-50%,-50%);animation:components-modal__appear-animation .1s ease-out;animation-fill-mode:forwards}}@media (min-width:600px) and (prefers-reduced-motion:reduce){.components-modal__frame{animation-duration:1ms;animation-delay:0s}}@keyframes components-modal__appear-animation{0%{margin-top:32px}to{margin-top:0}}.components-modal__header{box-sizing:border-box;border-bottom:1px solid #ddd;padding:0 32px;display:flex;flex-direction:row;justify-content:space-between;background:#fff;align-items:center;height:60px;z-index:10;position:relative;position:sticky;top:0;margin:0 -32px 24px}@supports (-ms-ime-align:auto){.components-modal__header{position:fixed;width:100%}}.components-modal__header .components-modal__header-heading{font-size:1rem;font-weight:600}.components-modal__header h1{line-height:1;margin:0}.components-modal__header .components-button{position:relative;left:8px}.components-modal__header-heading-container{align-items:center;flex-grow:1;display:flex;flex-direction:row;justify-content:left}.components-modal__header-icon-container{display:inline-block}.components-modal__header-icon-container svg{max-width:36px;max-height:36px;padding:8px}.components-modal__content{box-sizing:border-box;height:100%;padding:0 32px 24px}@supports (-ms-ime-align:auto){.components-modal__content{padding-top:60px}}.components-notice{display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#fff;border-left:4px solid var(--wp-admin-theme-color);margin:5px 15px 2px;padding:8px 12px;align-items:center}.components-notice.is-dismissible{padding-right:36px;position:relative}.components-notice.is-success{border-left-color:#4ab866;background-color:#eff9f1}.components-notice.is-warning{border-left-color:#f0b849;background-color:#fef8ee}.components-notice.is-error{border-left-color:#cc1818;background-color:#f4a2a2}.components-notice__content{flex-grow:1;margin:4px 25px 4px 0}.components-notice__actions{display:flex;flex-wrap:wrap}.components-notice__action.components-button{margin-right:8px}.components-notice__action.components-button,.components-notice__action.components-button.is-link{margin-left:12px}.components-notice__action.components-button.is-secondary{vertical-align:initial}.components-notice__dismiss{color:#757575;align-self:flex-start;flex-shrink:0}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:#1e1e1e;background-color:transparent}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{box-shadow:none}.components-notice-list{max-width:100vw;box-sizing:border-box}.components-notice-list .components-notice__content{margin-top:12px;margin-bottom:12px;line-height:2}.components-notice-list .components-notice__action.components-button{display:block;margin-left:0;margin-top:8px}.components-panel{background:#fff;border:1px solid #e0e0e0}.components-panel>.components-panel__body:first-child,.components-panel>.components-panel__header:first-child{margin-top:-1px}.components-panel>.components-panel__body:last-child,.components-panel>.components-panel__header:last-child{border-bottom-width:0}.components-panel+.components-panel{margin-top:-1px}.components-panel__body{border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0}.components-panel__body h3{margin:0 0 .5em}.components-panel__body.is-opened{padding:16px}.components-panel__header{display:flex;justify-content:space-between;align-items:center;padding:0 16px;height:48px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.components-panel__header h2{margin:0;font-size:inherit;color:inherit}.components-panel__body+.components-panel__body,.components-panel__body+.components-panel__header,.components-panel__header+.components-panel__body,.components-panel__header+.components-panel__header{margin-top:-1px}.components-panel__body>.components-panel__body-title{display:block;padding:0;font-size:inherit;margin-top:0;margin-bottom:0;transition:background .1s ease-in-out}@media (prefers-reduced-motion:reduce){.components-panel__body>.components-panel__body-title{transition-duration:0s;transition-delay:0s}}.components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-panel__body>.components-panel__body-title:hover{background:#f0f0f0;border:none}.components-panel__body-toggle.components-button{position:relative;padding:16px 48px 16px 16px;outline:none;width:100%;font-weight:500;text-align:left;color:#1e1e1e;border:none;box-shadow:none;transition:background .1s ease-in-out;height:auto}@media (prefers-reduced-motion:reduce){.components-panel__body-toggle.components-button{transition-duration:0s;transition-delay:0s}}.components-panel__body-toggle.components-button:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);border-radius:0}.components-panel__body-toggle.components-button .components-panel__arrow{position:absolute;right:16px;top:50%;transform:translateY(-50%);color:#1e1e1e;fill:currentColor;transition:color .1s ease-in-out}@media (prefers-reduced-motion:reduce){.components-panel__body-toggle.components-button .components-panel__arrow{transition-duration:0s;transition-delay:0s}}body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right{transform:scaleX(-1);-ms-filter:fliph;filter:FlipH;margin-top:-10px}.components-panel__icon{color:#757575;margin:-2px 0 -2px 6px}.components-panel__body-toggle-icon{margin-right:-5px}.components-panel__color-title{float:left;height:19px}.components-panel__row{display:flex;justify-content:space-between;align-items:center;margin-top:8px;min-height:36px}.components-panel__row select{min-width:0}.components-panel__row label{margin-right:12px;flex-shrink:0;max-width:75%}.components-panel__row:empty,.components-panel__row:first-of-type{margin-top:0}.components-panel .circle-picker{padding-bottom:20px}.components-placeholder.components-placeholder{box-sizing:border-box;position:relative;padding:1em;min-height:200px;width:100%;text-align:left;margin:0;color:#1e1e1e;-moz-font-smoothing:subpixel-antialiased;-webkit-font-smoothing:subpixel-antialiased;border-radius:2px;background-color:#fff;box-shadow:inset 0 0 0 1px #1e1e1e;outline:1px solid transparent}@supports (position:sticky){.components-placeholder.components-placeholder{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}}.components-placeholder.components-placeholder .components-base-control__label{font-size:13px}.components-placeholder__error,.components-placeholder__fieldset,.components-placeholder__instructions,.components-placeholder__label{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-placeholder__label{display:flex;font-weight:600;margin-bottom:16px;align-items:center}.components-placeholder__label .block-editor-block-icon,.components-placeholder__label .dashicon,.components-placeholder__label>svg{fill:currentColor;margin-right:1ch}.components-placeholder__label:empty{display:none}.components-placeholder__fieldset,.components-placeholder__fieldset form{display:flex;flex-direction:row;width:100%;flex-wrap:wrap}.components-placeholder__fieldset form p,.components-placeholder__fieldset p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-placeholder__fieldset.is-column-layout,.components-placeholder__fieldset.is-column-layout form{flex-direction:column}.components-placeholder__input[type=url]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;margin:0 8px 0 0;flex:1 1 auto}@media (prefers-reduced-motion:reduce){.components-placeholder__input[type=url]{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-placeholder__input[type=url]{font-size:13px;line-height:normal}}.components-placeholder__input[type=url]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-placeholder__input[type=url]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__instructions{margin-bottom:1em}.components-placeholder__error{margin-top:1em;width:100%}.components-placeholder__preview img{margin:3%;width:50%}.components-placeholder__fieldset .components-button{margin-right:12px;margin-bottom:12px}.components-placeholder__fieldset .components-button:last-child{margin-bottom:0;margin-right:0}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link{margin-left:10px;margin-right:10px}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link:last-child{margin-right:0}.components-placeholder.is-large .components-placeholder__label{font-size:18pt;font-weight:400}.components-placeholder.is-medium .components-placeholder__instructions,.components-placeholder.is-small .components-placeholder__instructions{display:none}.components-placeholder.is-medium .components-placeholder__fieldset,.components-placeholder.is-medium .components-placeholder__fieldset form,.components-placeholder.is-small .components-placeholder__fieldset,.components-placeholder.is-small .components-placeholder__fieldset form{flex-direction:column}.components-placeholder.is-medium .components-placeholder__fieldset .components-button,.components-placeholder.is-small .components-placeholder__fieldset .components-button{margin-right:auto}.components-placeholder.is-small .components-button{padding:0 8px 2px}

/*!rtl:begin:ignore*/.components-popover{position:fixed;z-index:1000000;top:0;left:0;opacity:0}.components-popover.is-expanded,.components-popover[data-x-axis][data-y-axis]{opacity:1}.components-popover.is-expanded{top:0;left:0;right:0;bottom:0;z-index:1000000!important}.components-popover:not(.is-without-arrow){margin-left:2px}.components-popover:not(.is-without-arrow):before{border:8px solid #ccc}.components-popover:not(.is-without-arrow).is-alternate:before{border-color:#1e1e1e}.components-popover:not(.is-without-arrow):after{border:8px solid #fff}.components-popover:not(.is-without-arrow):after,.components-popover:not(.is-without-arrow):before{content:"";position:absolute;height:0;width:0;line-height:0}.components-popover:not(.is-without-arrow)[data-y-axis=top]{margin-top:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:after,.components-popover:not(.is-without-arrow)[data-y-axis=top]:before{border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-style:solid;margin-left:-10px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]{margin-top:8px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after,.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;margin-left:-10px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]{margin-left:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:before{right:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:after{right:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:after,.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:before{border-bottom-color:transparent;border-left-style:solid;border-right:none;border-top-color:transparent}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]{margin-left:8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:before{left:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:after{left:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:after,.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:before{border-bottom-color:transparent;border-left:none;border-right-style:solid;border-top-color:transparent}.components-popover[data-y-axis=top]{bottom:100%}.components-popover[data-y-axis=bottom]{top:100%}.components-popover[data-y-axis=middle]{align-items:center;display:flex}.components-popover.is-from-top{margin-top:12px}.components-popover.is-from-bottom{margin-top:-12px}.components-popover.is-from-left:not(.is-from-top):not(.is-from-bottom){margin-left:12px}.components-popover.is-from-right:not(.is-from-top):not(.is-from-bottom){margin-right:12px}.components-popover__content{height:100%;background:#fff;border:1px solid #ccc;box-shadow:0 2px 6px rgba(0,0,0,.05);border-radius:2px}.is-alternate .components-popover__content{border:1px solid #1e1e1e;box-shadow:none}.components-popover .components-popover__content{position:absolute;height:auto;overflow-y:auto}.components-popover.is-expanded .components-popover__content{position:static;height:calc(100% - 48px);overflow-y:visible;min-width:auto;border:none;border-top:1px solid #1e1e1e}.components-popover[data-y-axis=top] .components-popover__content{bottom:100%}.components-popover[data-x-axis=center] .components-popover__content{left:50%;transform:translateX(-50%)}.components-popover[data-x-axis=right] .components-popover__content{position:absolute;left:100%}.components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-25px}.components-popover[data-x-axis=left] .components-popover__content{position:absolute;right:100%}.components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-25px}.components-popover__header{align-items:center;background:#fff;display:flex;height:48px;justify-content:space-between;padding:0 8px 0 16px}.components-popover__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.components-popover__close.components-button{z-index:5}

/*!rtl:end:ignore*/.components-radio-control{display:flex;flex-direction:column}.components-radio-control .components-base-control__help{margin-top:0}.components-radio-control .components-base-control__field{margin-bottom:0}.components-radio-control__option:not(:last-child){margin-bottom:4px}.components-radio-control__input[type=radio]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;font-size:16px;line-height:normal;border:1px solid #1e1e1e;transition:none;border-radius:50%;width:24px;height:24px;margin-top:0;margin-right:6px}@media (prefers-reduced-motion:reduce){.components-radio-control__input[type=radio]{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-radio-control__input[type=radio]{font-size:13px;line-height:normal}}.components-radio-control__input[type=radio]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-radio-control__input[type=radio]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-radio-control__input[type=radio]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-radio-control__input[type=radio]:-ms-input-placeholder{color:rgba(30,30,30,.62)}@media (min-width:600px){.components-radio-control__input[type=radio]{height:20px;width:20px}}.components-radio-control__input[type=radio]:checked:before{box-sizing:inherit;width:8px;height:8px;transform:translate(7px,7px);margin:0;background-color:#fff;border:4px solid #fff}@media (min-width:600px){.components-radio-control__input[type=radio]:checked:before{transform:translate(5px,5px)}}.components-radio-control__input[type=radio]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid transparent}.components-radio-control__input[type=radio]:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-resizable-box__handle{display:none;width:23px;height:23px;z-index:2}.components-resizable-box__container.has-show-handle .components-resizable-box__handle{display:block}.components-resizable-box__handle:after{display:block;content:"";width:15px;height:15px;border:2px solid var(--wp-admin-theme-color);border-radius:50%;background:#fff;cursor:inherit;position:absolute;top:calc(50% - 8px);right:calc(50% - 8px)}.components-resizable-box__side-handle:before{display:block;border-radius:2px;content:"";width:3px;height:3px;background:var(--wp-admin-theme-color);cursor:inherit;position:absolute;top:calc(50% - 1px);right:calc(50% - 1px);transition:transform .1s ease-in;opacity:0}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle:before{transition-duration:0s;transition-delay:0s}}.components-resizable-box__corner-handle,.components-resizable-box__side-handle{z-index:2}.components-resizable-box__side-handle.components-resizable-box__handle-bottom,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:before,.components-resizable-box__side-handle.components-resizable-box__handle-top,.components-resizable-box__side-handle.components-resizable-box__handle-top:before{width:100%;left:0;border-left:0;border-right:0}.components-resizable-box__side-handle.components-resizable-box__handle-left,.components-resizable-box__side-handle.components-resizable-box__handle-left:before,.components-resizable-box__side-handle.components-resizable-box__handle-right,.components-resizable-box__side-handle.components-resizable-box__handle-right:before{height:100%;top:0;border-top:0;border-bottom:0}.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:components-resizable-box__top-bottom-animation .1s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation-duration:1ms;animation-delay:0s}}.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before{animation:components-resizable-box__left-right-animation .1s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before{animation-duration:1ms;animation-delay:0s}}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:none}}}@keyframes components-resizable-box__top-bottom-animation{0%{transform:scaleX(0);opacity:0}to{transform:scaleX(1);opacity:1}}@keyframes components-resizable-box__left-right-animation{0%{transform:scaleY(0);opacity:0}to{transform:scaleY(1);opacity:1}}
/*!rtl:begin:ignore*/.components-resizable-box__handle-right{right:-11.5px}.components-resizable-box__handle-left{left:-11.5px}.components-resizable-box__handle-top{top:-11.5px}.components-resizable-box__handle-bottom{bottom:-11.5px}

/*!rtl:end:ignore*/.components-responsive-wrapper{position:relative;max-width:100%}.components-responsive-wrapper,.components-responsive-wrapper>span{display:block}.components-responsive-wrapper__content{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:auto}.components-sandbox{overflow:hidden}iframe.components-sandbox{width:100%}body.lockscroll,html.lockscroll{overflow:hidden}.components-select-control__input{background:#fff;height:36px;line-height:36px;margin:1px;outline:0;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)!important}@media (min-width:782px){.components-select-control__input{height:28px;line-height:28px}}@media (max-width:782px){.components-base-control .components-base-control__field .components-select-control__input{font-size:16px}}.components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#1e1e1e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer;pointer-events:auto}@media (min-width:600px){.components-snackbar{width:-moz-fit-content;width:fit-content}}.components-snackbar:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-snackbar.components-snackbar-explicit-dismiss{cursor:default}.components-snackbar .components-snackbar__content-with-icon{margin-left:24px}.components-snackbar .components-snackbar__icon{position:absolute;top:24px;left:28px}.components-snackbar .components-snackbar__dismiss-button{margin-left:32px;cursor:pointer}.components-snackbar__action.components-button{margin-left:32px;color:#fff;height:auto;flex-shrink:0;line-height:1.4;padding:0}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary){text-decoration:underline;background-color:transparent}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus{color:#fff;box-shadow:none;outline:1px dotted #fff}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:var(--wp-admin-theme-color)}.components-snackbar__content{display:flex;align-items:baseline;justify-content:space-between;line-height:1.4}.components-snackbar-list{position:absolute;z-index:100000;width:100%;box-sizing:border-box;pointer-events:none}.components-snackbar-list__notice-container{position:relative;padding-top:8px}.components-swatch{width:18px;height:18px;border-radius:50%;color:transparent;background:transparent}.components-swatch:after{content:"";display:block;width:100%;height:100%;border:1px solid rgba(0,0,0,.2);border-radius:50%}.components-button.has-icon.has-text .components-swatch{margin-right:8px}.components-tab-panel__tabs{display:flex;align-items:stretch;flex-direction:row}.components-tab-panel__tabs[aria-orientation=vertical]{flex-direction:column}.components-tab-panel__tabs-item{background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-left:0;font-weight:500;transition:box-shadow .1s linear;box-sizing:border-box}.components-tab-panel__tabs-item:after{content:attr(data-label);display:block;height:0;overflow:hidden;speak:none;visibility:hidden}.components-tab-panel__tabs-item:focus:not(:disabled){box-shadow:inset 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-tab-panel__tabs-item.is-active{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) transparent,inset 0 -4px 0 0 var(--wp-admin-theme-color);position:relative}.components-tab-panel__tabs-item.is-active:before{content:"";position:absolute;top:0;bottom:1px;right:0;left:0;border-bottom:4px solid transparent}.components-tab-panel__tabs-item:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-tab-panel__tabs-item.is-active:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 -4px 0 0 var(--wp-admin-theme-color)}.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{width:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal}@media (prefers-reduced-motion:reduce){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{font-size:13px;line-height:normal}}.components-text-control__input:focus,.components-text-control__input[type=color]:focus,.components-text-control__input[type=date]:focus,.components-text-control__input[type=datetime-local]:focus,.components-text-control__input[type=datetime]:focus,.components-text-control__input[type=email]:focus,.components-text-control__input[type=month]:focus,.components-text-control__input[type=number]:focus,.components-text-control__input[type=password]:focus,.components-text-control__input[type=tel]:focus,.components-text-control__input[type=text]:focus,.components-text-control__input[type=time]:focus,.components-text-control__input[type=url]:focus,.components-text-control__input[type=week]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-text-control__input::-webkit-input-placeholder,.components-text-control__input[type=color]::-webkit-input-placeholder,.components-text-control__input[type=date]::-webkit-input-placeholder,.components-text-control__input[type=datetime-local]::-webkit-input-placeholder,.components-text-control__input[type=datetime]::-webkit-input-placeholder,.components-text-control__input[type=email]::-webkit-input-placeholder,.components-text-control__input[type=month]::-webkit-input-placeholder,.components-text-control__input[type=number]::-webkit-input-placeholder,.components-text-control__input[type=password]::-webkit-input-placeholder,.components-text-control__input[type=tel]::-webkit-input-placeholder,.components-text-control__input[type=text]::-webkit-input-placeholder,.components-text-control__input[type=time]::-webkit-input-placeholder,.components-text-control__input[type=url]::-webkit-input-placeholder,.components-text-control__input[type=week]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-text-control__input::-moz-placeholder,.components-text-control__input[type=color]::-moz-placeholder,.components-text-control__input[type=date]::-moz-placeholder,.components-text-control__input[type=datetime-local]::-moz-placeholder,.components-text-control__input[type=datetime]::-moz-placeholder,.components-text-control__input[type=email]::-moz-placeholder,.components-text-control__input[type=month]::-moz-placeholder,.components-text-control__input[type=number]::-moz-placeholder,.components-text-control__input[type=password]::-moz-placeholder,.components-text-control__input[type=tel]::-moz-placeholder,.components-text-control__input[type=text]::-moz-placeholder,.components-text-control__input[type=time]::-moz-placeholder,.components-text-control__input[type=url]::-moz-placeholder,.components-text-control__input[type=week]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-text-control__input:-ms-input-placeholder,.components-text-control__input[type=color]:-ms-input-placeholder,.components-text-control__input[type=date]:-ms-input-placeholder,.components-text-control__input[type=datetime-local]:-ms-input-placeholder,.components-text-control__input[type=datetime]:-ms-input-placeholder,.components-text-control__input[type=email]:-ms-input-placeholder,.components-text-control__input[type=month]:-ms-input-placeholder,.components-text-control__input[type=number]:-ms-input-placeholder,.components-text-control__input[type=password]:-ms-input-placeholder,.components-text-control__input[type=tel]:-ms-input-placeholder,.components-text-control__input[type=text]:-ms-input-placeholder,.components-text-control__input[type=time]:-ms-input-placeholder,.components-text-control__input[type=url]:-ms-input-placeholder,.components-text-control__input[type=week]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-tip{display:flex;color:#757575}.components-tip svg{align-self:center;fill:#f0b849;flex-shrink:0;margin-right:16px}.components-tip p{margin:0}.components-toggle-control .components-base-control__field{display:flex;margin-bottom:12px;line-height:normal;align-items:center}.components-toggle-control .components-base-control__field .components-form-toggle{margin-right:12px}.components-toggle-control .components-base-control__field .components-toggle-control__label{display:block}.components-accessible-toolbar{display:inline-flex;border:1px solid #1e1e1e;border-radius:2px;flex-shrink:0}.components-accessible-toolbar>.components-toolbar-group:last-child{border-right:none}.components-accessible-toolbar .components-button,.components-toolbar .components-button{position:relative;height:48px;z-index:1;padding-left:16px;padding-right:16px}.components-accessible-toolbar .components-button:focus:enabled,.components-toolbar .components-button:focus:enabled{box-shadow:none;outline:none}.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{content:"";position:absolute;display:block;border-radius:2px;height:32px;left:8px;right:8px;z-index:-1;animation:components-button__appear-animation .1s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{animation-duration:1ms;animation-delay:0s}}.components-accessible-toolbar .components-button svg,.components-toolbar .components-button svg{position:relative;margin-left:auto;margin-right:auto}.components-accessible-toolbar .components-button.is-pressed,.components-accessible-toolbar .components-button.is-pressed:hover,.components-toolbar .components-button.is-pressed,.components-toolbar .components-button.is-pressed:hover{background:transparent}.components-accessible-toolbar .components-button.is-pressed:before,.components-toolbar .components-button.is-pressed:before{background:#1e1e1e}.components-accessible-toolbar .components-button:focus:before,.components-toolbar .components-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.components-accessible-toolbar .components-button.has-icon,.components-toolbar .components-button.has-icon{padding-left:8px;padding-right:8px;min-width:48px;justify-content:center}.components-accessible-toolbar .components-button.components-tab-button,.components-toolbar .components-button.components-tab-button{font-weight:500}.components-accessible-toolbar .components-button.components-tab-button span,.components-toolbar .components-button.components-tab-button span{display:inline-block;padding-left:0;padding-right:0;position:relative}@keyframes components-button__appear-animation{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.components-toolbar__control.components-button{position:relative}.components-toolbar__control.components-button[data-subscript] svg{padding:5px 10px 5px 0}.components-toolbar__control.components-button[data-subscript]:after{content:attr(data-subscript);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:12px;position:absolute;right:8px;bottom:10px}.components-toolbar__control.components-button:active:before{display:none}.components-toolbar__control.components-button:not(:disabled).is-pressed[data-subscript]:after{color:#fff}.components-toolbar-group{min-height:48px;border-right:1px solid #1e1e1e;background-color:#fff;display:inline-flex;flex-shrink:0;flex-wrap:wrap;line-height:0}.components-toolbar-group .components-toolbar-group.components-toolbar-group{border-width:0;margin:0}.components-toolbar{min-height:48px;margin:0;border:1px solid #1e1e1e;background-color:#fff;display:inline-flex;flex-shrink:0;flex-wrap:wrap}.components-toolbar .components-toolbar.components-toolbar{border-width:0;margin:0}div.components-toolbar>div{display:block;margin:0}@supports (position:sticky){div.components-toolbar>div{display:flex}}div.components-toolbar>div+div.has-left-divider{margin-left:6px;position:relative;overflow:visible}div.components-toolbar>div+div.has-left-divider:before{display:inline-block;content:"";box-sizing:content-box;background-color:#ddd;position:absolute;top:8px;left:-3px;width:1px;height:20px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>* .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>.components-button.components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child:last-child,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>* .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>* .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>* .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child:last-child,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>* .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child:last-child,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button{min-width:48px;padding-left:12px;padding-right:12px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>* .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child:last-child:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button:before{left:8px;right:8px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:first-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:first-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:first-child>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:first-child>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:first-child>.components-button{min-width:42px;padding-left:11px;padding-right:6px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:first-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:first-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:first-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:first-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:first-child>.components-button:before{left:8px;right:2px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div>.components-button{min-width:36px;padding-left:6px;padding-right:6px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button svg,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown .components-button svg,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown .components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown .components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div>.components-button svg,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button svg,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown .components-button svg,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div>.components-button svg,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button svg,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown .components-button svg,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div>.components-button svg{min-width:24px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div>.components-button:before{left:2px;right:2px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:last-child,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:last-child .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:last-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:last-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:last-child>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:last-child,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:last-child>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:last-child,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:last-child>.components-button{min-width:42px;padding-left:6px;padding-right:11px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:last-child:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:last-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:last-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:last-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:last-child:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:last-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:last-child:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:last-child>.components-button:before{left:2px;right:8px}.components-tooltip.components-popover{z-index:1000002}.components-tooltip.components-popover .components-popover__content{min-width:0}.components-tooltip .components-popover__content{background:#1e1e1e;border-radius:2px;border-width:0;color:#fff;white-space:nowrap;text-align:center;line-height:1.4;font-size:12px;box-shadow:none}.components-tooltip .components-popover__content>div{padding:4px 8px}.components-tooltip__shortcut{display:inline-block;margin-left:8px}.disabled-element-wrapper{position:relative}.disabled-element-wrapper .event-catcher{z-index:100002;position:absolute;width:100%;height:100%;top:0;left:0;bottom:0;right:0}.components-visually-hidden{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.components-visually-hidden:focus{background-color:#ddd;clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}style-rtl.min.css000064400000355537152334540170010025 0ustar00@charset "UTF-8";:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.components-animate__appear{animation:components-animate__appear-animation .1s cubic-bezier(0,0,.2,1) 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-animate__appear{animation-duration:1ms;animation-delay:0s}}.components-animate__appear.is-from-top,.components-animate__appear.is-from-top.is-from-left{transform-origin:top right}.components-animate__appear.is-from-top.is-from-right{transform-origin:top left}.components-animate__appear.is-from-bottom,.components-animate__appear.is-from-bottom.is-from-left{transform-origin:bottom right}.components-animate__appear.is-from-bottom.is-from-right{transform-origin:bottom left}@keyframes components-animate__appear-animation{0%{transform:translateY(-2em) scaleY(0) scaleX(0)}to{transform:translateY(0) scaleY(1) scaleX(1)}}.components-animate__slide-in{animation:components-animate__slide-in-animation .1s cubic-bezier(0,0,.2,1);animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-animate__slide-in{animation-duration:1ms;animation-delay:0s}}.components-animate__slide-in.is-from-left{transform:translateX(-100%)}.components-animate__slide-in.is-from-right{transform:translateX(100%)}@keyframes components-animate__slide-in-animation{to{transform:translateX(0)}}.components-animate__loading{animation:components-animate__loading 1.6s ease-in-out infinite}@keyframes components-animate__loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.components-autocomplete__popover .components-popover__content>div{padding:16px;min-width:220px}.components-autocomplete__result.components-button{display:flex;height:auto;min-height:36px;text-align:right;width:100%}.components-autocomplete__result.components-button.is-selected{box-shadow:0 0 0 2px var(--wp-admin-theme-color)}.components-button-group{display:inline-block}.components-button-group .components-button{border-radius:0;display:inline-flex;color:#1e1e1e;box-shadow:inset 0 0 0 1px #1e1e1e}.components-button-group .components-button+.components-button{margin-right:-1px}.components-button-group .components-button:first-child{border-radius:0 2px 2px 0}.components-button-group .components-button:last-child{border-radius:2px 0 0 2px}.components-button-group .components-button.is-primary,.components-button-group .components-button:focus{position:relative;z-index:1}.components-button-group .components-button.is-primary{box-shadow:inset 0 0 0 1px #1e1e1e}.components-button{display:inline-flex;text-decoration:none;font-weight:400;font-size:13px;margin:0;border:0;cursor:pointer;-webkit-appearance:none;background:none;transition:box-shadow .1s linear;height:36px;align-items:center;box-sizing:border-box;padding:6px 12px;border-radius:2px;color:#1e1e1e}@media (prefers-reduced-motion:reduce){.components-button{transition-duration:0s;transition-delay:0s}}.components-button:hover,.components-button[aria-expanded=true]{color:var(--wp-admin-theme-color)}.components-button[aria-disabled=true]:hover{color:initial}.components-button:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid transparent}.components-button.is-primary{white-space:nowrap;background:var(--wp-admin-theme-color);color:#fff;text-decoration:none;text-shadow:none;outline:1px solid transparent}.components-button.is-primary:hover:not(:disabled){background:var(--wp-admin-theme-color-darker-10);color:#fff}.components-button.is-primary:active:not(:disabled){background:var(--wp-admin-theme-color-darker-20);border-color:var(--wp-admin-theme-color-darker-20);color:#fff}.components-button.is-primary:focus:not(:disabled){box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.is-primary:disabled,.components-button.is-primary:disabled:active:enabled,.components-button.is-primary[aria-disabled=true],.components-button.is-primary[aria-disabled=true]:active:enabled,.components-button.is-primary[aria-disabled=true]:enabled{color:hsla(0,0%,100%,.4);background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);opacity:1;outline:none}.components-button.is-primary:disabled:active:enabled:focus:enabled,.components-button.is-primary:disabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:active:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:focus:enabled{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-button.is-primary.is-busy,.components-button.is-primary.is-busy:disabled,.components-button.is-primary.is-busy[aria-disabled=true]{color:#fff;background-size:100px 100%;background-image:linear-gradient(45deg,var(--wp-admin-theme-color) 33%,var(--wp-admin-theme-color-darker-20) 0,var(--wp-admin-theme-color-darker-20) 70%,var(--wp-admin-theme-color) 0);border-color:var(--wp-admin-theme-color)}.components-button.is-secondary,.components-button.is-tertiary{outline:1px solid transparent}.components-button.is-secondary:active:not(:disabled),.components-button.is-tertiary:active:not(:disabled){background:#ddd;color:var(--wp-admin-theme-color-darker-10);box-shadow:none}.components-button.is-secondary:hover:not(:disabled),.components-button.is-tertiary:hover:not(:disabled){color:var(--wp-admin-theme-color-darker-10);box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color-darker-10)}.components-button.is-secondary:disabled,.components-button.is-secondary[aria-disabled=true],.components-button.is-secondary[aria-disabled=true]:hover,.components-button.is-tertiary:disabled,.components-button.is-tertiary[aria-disabled=true],.components-button.is-tertiary[aria-disabled=true]:hover{color:#828282;background:#eaeaea;transform:none;opacity:1;box-shadow:none;outline:none}.components-button.is-secondary{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);outline:1px solid transparent}.components-button.is-secondary,.components-button.is-tertiary{white-space:nowrap;color:var(--wp-admin-theme-color);background:transparent}.components-button.is-tertiary{padding:6px}.components-button.is-tertiary .dashicon{display:inline-block;flex:0 0 auto}.components-button.is-destructive{color:#cc1818;box-shadow:inset 0 0 0 1px #cc1818}.components-button.is-destructive:hover:not(:disabled){color:#710d0d;box-shadow:inset 0 0 0 1px #710d0d}.components-button.is-destructive:focus:not(:disabled){color:var(--wp-admin-theme-color)}.components-button.is-destructive:active:not(:disabled){background:#ccc}.components-button.is-destructive.is-primary{color:#fff;background:#cc1818;box-shadow:inset 0 0 0 1px #cc1818}.components-button.is-destructive.is-primary:hover:not(:disabled){color:#fff;background:#710d0d;box-shadow:inset 0 0 0 1px #710d0d}.components-button.is-link{margin:0;padding:0;box-shadow:none;border:0;border-radius:0;background:none;outline:none;text-align:right;color:var(--wp-admin-theme-color);text-decoration:underline;transition-property:border,background,color;transition-duration:.05s;transition-timing-function:ease-in-out;height:auto}@media (prefers-reduced-motion:reduce){.components-button.is-link{transition-duration:0s;transition-delay:0s}}.components-button.is-link:focus{border-radius:2px}.components-button.is-link.is-destructive{color:#cc1818}.components-button.is-link.is-destructive:active:not(:disabled),.components-button.is-link.is-destructive:hover:not(:disabled){color:#710d0d;background:none}.components-button.is-link.is-destructive:focus:not(:disabled){color:var(--wp-admin-theme-color)}.components-button:not([aria-disabled=true]):active{color:inherit}.components-button:disabled,.components-button[aria-disabled=true]{cursor:default;opacity:.3}.components-button.is-busy,.components-button.is-secondary.is-busy,.components-button.is-secondary.is-busy:disabled,.components-button.is-secondary.is-busy[aria-disabled=true]{animation:components-button__busy-animation 2.5s linear infinite;opacity:1;background-size:100px 100%;background-image:linear-gradient(45deg,#fafafa 33%,#e0e0e0 0,#e0e0e0 70%,#fafafa 0)}.components-button.is-small{height:24px;line-height:22px;padding:0 8px;font-size:11px}.components-button.is-small.has-icon:not(.has-text){padding:0 8px;width:24px}.components-button.has-icon{padding:6px;min-width:36px;justify-content:center}.components-button.has-icon .dashicon{display:inline-block;flex:0 0 auto;margin-right:2px;margin-left:2px}.components-button.has-icon.has-text{justify-content:left}.components-button.has-icon.has-text svg{margin-left:8px}.components-button.has-icon.has-text .dashicon{margin-left:10px}.components-button.is-pressed{color:#fff;background:#1e1e1e}.components-button.is-pressed:focus:not(:disabled){box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.components-button.is-pressed:hover:not(:disabled){color:#fff;background:#1e1e1e}.components-button svg{fill:currentColor;outline:none}.components-button .components-visually-hidden{height:auto}@keyframes components-button__busy-animation{0%{background-position:200px 0}}.components-checkbox-control__input[type=checkbox]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;font-size:16px;line-height:normal;border:1px solid #1e1e1e;transition:none;border-radius:2px;background:#fff;color:#1e1e1e;clear:none;cursor:pointer;display:inline-block;line-height:0;margin:0 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:top;width:24px;height:24px;-webkit-appearance:none;appearance:none;transition:border-color .1s ease-in-out}@media (min-width:600px){.components-checkbox-control__input[type=checkbox]{font-size:13px;line-height:normal}}.components-checkbox-control__input[type=checkbox]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{margin:-3px -5px;color:#fff}@media (min-width:782px){.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{margin:-4px -5px 0 0}}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{content:"";float:right;display:inline-block;vertical-align:middle;width:16px;font:normal 30px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:782px){.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{float:none;font-size:21px}}@media (min-width:600px){.components-checkbox-control__input[type=checkbox]{height:20px;width:20px}}@media (prefers-reduced-motion:reduce){.components-checkbox-control__input[type=checkbox]{transition-duration:0s;transition-delay:0s}}.components-checkbox-control__input[type=checkbox]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid transparent}.components-checkbox-control__input[type=checkbox]:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]:checked::-ms-check{opacity:0}.components-checkbox-control__input[type=checkbox]:checked:before{content:none}.components-checkbox-control__input-container{position:relative;display:inline-block;margin-left:12px;vertical-align:middle;width:24px;height:24px}@media (min-width:600px){.components-checkbox-control__input-container{width:20px;height:20px}}svg.components-checkbox-control__checked{fill:#fff;cursor:pointer;position:absolute;right:0;top:0;width:24px;height:24px;-webkit-user-select:none;user-select:none;pointer-events:none}@media (min-width:600px){svg.components-checkbox-control__checked{right:-2px;top:-2px}}.components-circular-option-picker{display:inline-block;width:100%;min-width:188px}.components-circular-option-picker .components-circular-option-picker__custom-clear-wrapper{display:flex;justify-content:flex-end}.components-circular-option-picker .components-circular-option-picker__swatches{margin-left:-12px}.components-circular-option-picker__option-wrapper{display:inline-block;height:28px;width:28px;margin-left:12px;margin-bottom:12px;vertical-align:top;transform:scale(1);transition:transform .1s ease}@media (prefers-reduced-motion:reduce){.components-circular-option-picker__option-wrapper{transition-duration:0s;transition-delay:0s}}.components-circular-option-picker__option-wrapper:hover{transform:scale(1.2)}.components-circular-option-picker__option-wrapper>div{height:100%;width:100%}.components-circular-option-picker__option-wrapper:before{content:"";position:absolute;top:1px;right:1px;bottom:1px;left:1px;border-radius:50%;z-index:-1;background:url("data:image/svg+xml;charset=utf-8,%3Csvg width='28' height='28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8V6H4v2h2zm2 0V6h2v2H8zm2 8H8v-2h2v2zm2 0v-2h2v2h-2zm0 2v-2h-2v2H8v2h2v-2h2zm2 0v2h-2v-2h2zm2 0h-2v-2h2v2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z' fill='%23555D65'/%3E%3Cpath d='M18 18v2h-2v-2h2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z' fill='%23555D65'/%3E%3C/svg%3E")}.components-circular-option-picker__option{display:inline-block;vertical-align:top;height:100%;width:100%;border:none;border-radius:50%;background:transparent;box-shadow:inset 0 0 0 14px;transition:box-shadow .1s ease;cursor:pointer}@media (prefers-reduced-motion:reduce){.components-circular-option-picker__option{transition-duration:0s;transition-delay:0s}}.components-circular-option-picker__option:hover{box-shadow:inset 0 0 0 14px!important}.components-circular-option-picker__option.is-pressed{box-shadow:inset 0 0 0 4px;position:relative;z-index:1;overflow:visible}.components-circular-option-picker__option.is-pressed+svg{position:absolute;right:2px;top:2px;border-radius:50%;z-index:2;pointer-events:none}.components-circular-option-picker__option:after{content:"";position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);border:1px solid transparent}.components-circular-option-picker__option:focus:after{content:"";border:2px solid #757575;width:32px;height:32px;position:absolute;top:-2px;right:-2px;border-radius:50%;box-shadow:inset 0 0 0 2px #fff}.components-circular-option-picker__option.components-button:focus{background-color:transparent;box-shadow:inset 0 0 0 14px;outline:none}.components-circular-option-picker__button-action .components-circular-option-picker__option{color:#fff;background:#fff}.components-circular-option-picker__dropdown-link-action{margin-left:16px}.components-circular-option-picker__dropdown-link-action .components-button{line-height:22px}.components-color-edit__color-option-main-area{display:flex;align-items:center}.components-color-edit__color-option-main-area div.components-circular-option-picker__option-wrapper{display:block;margin:8px}.components-color-edit__color-option.is-hover{background:#e0e0e0}.components-color-edit__cancel-button{float:left}.components-color-edit__color-option-color-name{width:100%}.components-color-edit__label-and-insert-container{display:flex;align-items:center;justify-content:space-between}.components-color-edit__insert-button{margin-top:-8px}.components-color-edit__hidden-control{position:relative;right:-9999px}.components-color-edit__color-option-color-name-input .components-base-control__field{margin-bottom:0;margin-left:8px}.components-color-edit__slug-input{margin-right:8px}.components-color-edit__reset-button{float:left}.component-color-indicator{width:25px;height:16px;margin-right:.8rem;border:1px solid #dadada;display:inline-block}.component-color-indicator+.component-color-indicator{margin-right:.5rem}.components-color-picker{width:100%}.components-color-picker *{box-sizing:border-box}.components-color-picker__saturation{width:100%;padding-bottom:55%;position:relative}.components-color-picker__body{padding:16px 16px 12px}.components-color-picker__controls{display:flex}.components-color-picker__alpha-pointer,.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{padding:0;position:absolute;cursor:pointer;box-shadow:none;border:none}.components-color-picker__swatch{margin-left:8px;width:32px;height:32px;border-radius:50%;position:relative;overflow:hidden;background-image:linear-gradient(-45deg,#ddd 25%,transparent 0),linear-gradient(45deg,#ddd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#ddd 0),linear-gradient(45deg,transparent 75%,#ddd 0);background-size:10px 10px;background-position:100% 0,100% 5px,5px -5px,-5px 0}.is-alpha-disabled .components-color-picker__swatch{width:12px;height:12px;margin-top:0}.components-color-picker__active{border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);z-index:2}.components-color-picker__active,.components-color-picker__saturation-black,.components-color-picker__saturation-color,.components-color-picker__saturation-white{position:absolute;top:0;right:0;left:0;bottom:0}.components-color-picker__saturation-color{overflow:visible}.components-color-picker__saturation-white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.components-color-picker__saturation-black{background:linear-gradient(0deg,#000,transparent)}.components-button.components-color-picker__saturation-pointer{width:14px;height:14px;padding:0;border-radius:50%;background-color:transparent;transform:translate(50%,-50%);box-shadow:0 0 0 1px #fff,inset 0 0 0 1px #000,0 0 0 2px #000}.components-button.components-color-picker__saturation-pointer:focus:not(:disabled){box-shadow:0 0 0 2px #fff,inset 0 0 0 1px #000,0 0 0 3px #000}.components-color-picker__toggles{flex:1}.components-color-picker__alpha{background-image:linear-gradient(-45deg,#ddd 25%,transparent 0),linear-gradient(45deg,#ddd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#ddd 0),linear-gradient(45deg,transparent 75%,#ddd 0);background-size:10px 10px;background-position:100% 0,100% 5px,5px -5px,-5px 0}.components-color-picker__alpha-gradient,.components-color-picker__hue-gradient{position:absolute;top:0;right:0;left:0;bottom:0}.components-color-picker__alpha,.components-color-picker__hue{height:12px;position:relative}.is-alpha-enabled .components-color-picker__hue{margin-bottom:8px}.components-color-picker__alpha-bar,.components-color-picker__hue-bar{position:relative;margin:0 3px;height:100%;padding:0 2px}.components-color-picker__hue-gradient{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.components-color-picker__alpha-pointer,.components-color-picker__hue-pointer{left:0;width:14px;height:14px;border-radius:50%;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);background:#fff;transform:translate(7px,-1px)}.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{transition-duration:0s;transition-delay:0s}}.components-color-picker__saturation-pointer:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color),0 0 5px 0 var(--wp-admin-theme-color),inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4)}.components-color-picker__alpha-pointer:focus,.components-color-picker__hue-pointer:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 2px var(--wp-admin-theme-color),0 0 3px 0 var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.components-color-picker__inputs-wrapper{margin:0 -4px;padding-top:16px;display:flex;align-items:flex-end;min-width:255px}.components-color-picker__inputs-wrapper fieldset{flex:1;border:none;margin:0;padding:0}.components-color-picker__inputs-wrapper .components-color-picker__inputs-fields .components-text-control__input[type=number]{padding:6px 3px;margin:0}.components-color-picker__inputs-field{width:100%}.components-color-picker__inputs-fields{display:flex;direction:ltr;flex-grow:1;margin-left:4px}.components-color-picker__inputs-fields .components-base-control+.components-base-control{margin-top:0}.components-color-picker__inputs-fields .components-base-control__field{margin:0 2px}.components-color-picker__inputs-toggle{height:30px;padding:0 5px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{width:100%;border:none;box-shadow:none;font-size:16px;padding:2px;margin:0;line-height:inherit;min-height:auto}@media (min-width:600px){input.components-combobox-control__input[type=text]{font-size:13px}}input.components-combobox-control__input[type=text]:focus{outline:none;box-shadow:none}.components-combobox-control__suggestions-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:flex-start;width:100%;margin:0 0 8px;padding:4px}@media (prefers-reduced-motion:reduce){.components-combobox-control__suggestions-container{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__reset.components-button{display:flex;height:24px;min-width:24px;padding:0}.components-color-list-picker,.components-color-list-picker__swatch-button{width:100%}.components-custom-gradient-picker__gradient-bar:not(.has-gradient){opacity:.4}.components-custom-gradient-picker__gradient-bar{margin-top:12px;width:100%;height:36px;border-radius:36px;margin-bottom:12px;padding-right:6px;padding-left:30px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__markers-container{position:relative}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point{border-radius:50%;background:#fff;padding:2px;top:6px;min-width:24px;width:24px;height:24px;position:relative;color:#1e1e1e}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point svg{height:100%;width:100%}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button{border:2px solid transparent;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #fff;border-radius:50%;height:24px;width:24px;padding:0;position:absolute;top:6px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button.is-active,.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #1e1e1e}.components-custom-gradient-picker__color-picker-popover .components-custom-gradient-picker__remove-control-point{margin-right:auto;margin-left:auto;display:block;margin-bottom:8px}.components-custom-gradient-picker__inserter{width:100%}.components-custom-gradient-picker__liner-gradient-indicator{display:inline-block;flex:0 auto;width:20px;height:20px}.components-custom-gradient-picker .components-custom-gradient-picker__ui-line{margin-bottom:16px}.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-angle-picker,.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-custom-gradient-picker__type-picker{margin-bottom:0}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar{border:none}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar>div+div{margin-right:1px}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar button.is-pressed>svg{background:#fff;border:1px solid #949494;border-radius:2px}.components-custom-select-control{position:relative}.components-custom-select-control__label{display:block;margin-bottom:8px}.components-custom-select-control__button{border:1px solid #757575;border-radius:2px;min-height:30px;min-width:130px;position:relative;text-align:right}.components-custom-select-control__button.components-custom-select-control__button{padding-left:24px}.components-custom-select-control__button:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-custom-select-control__button .components-custom-select-control__button-icon{height:100%;padding:0;position:absolute;left:0;top:0}.components-custom-select-control__menu{border:1px solid #1e1e1e;background-color:#fff;border-radius:2px;outline:none;transition:none;max-height:400px;min-width:100%;overflow:auto;padding:0;position:absolute;z-index:1000000}.components-custom-select-control__menu[aria-hidden=true]{display:none}.components-custom-select-control__item{align-items:center;display:flex;list-style-type:none;padding:8px;cursor:default;line-height:28px}.components-custom-select-control__item.is-highlighted{background:#ddd}.components-custom-select-control__item .components-custom-select-control__item-icon{margin-left:0;margin-right:auto}.components-custom-select-control__item:last-child{margin-bottom:0}.PresetDateRangePicker_panel{padding:0 22px 11px}.PresetDateRangePicker_button{position:relative;height:100%;text-align:center;background:0 0;border:2px solid #00a699;color:#00a699;padding:4px 12px;margin-right:8px;font:inherit;font-weight:700;line-height:normal;overflow:visible;box-sizing:border-box;cursor:pointer}.PresetDateRangePicker_button:active{outline:0}.PresetDateRangePicker_button__selected{color:#fff;background:#00a699}.SingleDatePickerInput{display:inline-block;background-color:#fff}.SingleDatePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb}.SingleDatePickerInput__rtl{direction:rtl}.SingleDatePickerInput__disabled{background-color:#f2f2f2}.SingleDatePickerInput__block{display:block}.SingleDatePickerInput__showClearDate{padding-right:30px}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;transform:translateY(-50%)}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%}.SingleDatePickerInput_clearDate__small{padding:6px}.SingleDatePickerInput_clearDate__hide{visibility:hidden}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle}.SingleDatePickerInput_clearDate_svg__small{height:9px}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle}.SingleDatePicker{position:relative;display:inline-block}.SingleDatePicker__block{display:block}.SingleDatePicker_picker{z-index:1;background-color:#fff;position:absolute}.SingleDatePicker_picker__rtl{direction:rtl}.SingleDatePicker_picker__directionLeft{left:0}.SingleDatePicker_picker__directionRight{right:0}.SingleDatePicker_picker__portal{background-color:rgba(0,0,0,.3);position:fixed;top:0;left:0;height:100%;width:100%}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:#b0b3b4;text-decoration:none}.SingleDatePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;cursor:pointer;font-size:14px}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0}.DayPickerKeyboardShortcuts_show{width:22px;position:absolute;z-index:2}.DayPickerKeyboardShortcuts_show__bottomRight{border-top:26px solid transparent;border-right:33px solid #00a699;bottom:0;right:0}.DayPickerKeyboardShortcuts_show__bottomRight:hover{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topRight{border-bottom:26px solid transparent;border-right:33px solid #00a699;top:0;right:0}.DayPickerKeyboardShortcuts_show__topRight:hover{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topLeft{border-bottom:26px solid transparent;border-left:33px solid #00a699;top:0;left:0}.DayPickerKeyboardShortcuts_show__topLeft:hover{border-left:33px solid #008489}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:-28px}.DayPickerKeyboardShortcuts_showSpan__topRight{top:1px;right:-28px}.DayPickerKeyboardShortcuts_showSpan__topLeft{top:1px;left:-28px}.DayPickerKeyboardShortcuts_panel{overflow:auto;background:#fff;border:1px solid #dbdbdb;border-radius:2px;position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;padding:22px;margin:33px}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0}.DayPickerKeyboardShortcuts_list{list-style:none;padding:0;font-size:14px}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2}.DayPickerKeyboardShortcuts_close:active{outline:0}.DayPickerKeyboardShortcuts_closeSvg{height:15px;width:15px;fill:#cacccd}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a}.CalendarDay{box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center}.CalendarDay:active{outline:0}.CalendarDay__defaultCursor{cursor:default}.CalendarDay__default{border:1px solid #e4e7e7;color:#484848;background:#fff}.CalendarDay__default:hover{background:#e4e7e7;border:1px double #e4e7e7;color:inherit}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit}.CalendarDay__outside{border:0;background:#fff;color:#484848}.CalendarDay__outside:hover{border:0}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848}.CalendarDay__selected_span{background:#66e2da;border:1px solid #33dacd;color:#fff}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px solid #33dacd;color:#fff}.CalendarDay__last_in_range{border-right:#00a699}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px solid #00a699;color:#fff}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px solid #80e8e0;color:#007a87}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px solid #80e8e0;color:#007a87}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd}.CalendarMonth{background:#fff;text-align:center;vertical-align:top;-webkit-user-select:none;user-select:none}.CalendarMonth_table{border-collapse:collapse;border-spacing:0}.CalendarMonth_verticalSpacing{border-collapse:separate}.CalendarMonth_caption{color:#484848;font-size:18px;text-align:center;padding-top:22px;padding-bottom:37px;caption-side:top}.CalendarMonth_caption__verticalScrollable{padding-top:12px;padding-bottom:7px}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0}.CalendarMonthGrid__animating{z-index:1}.CalendarMonthGrid__horizontal{position:absolute;left:0}.CalendarMonthGrid__vertical{margin:0 auto}.CalendarMonthGrid__vertical_scrollable{margin:0 auto;overflow-y:scroll}.CalendarMonthGrid_month__horizontal{display:inline-block;vertical-align:top;min-height:100%}.CalendarMonthGrid_month__hideForAnimation{position:absolute;z-index:-1;opacity:0;pointer-events:none}.CalendarMonthGrid_month__hidden{visibility:hidden}.DayPickerNavigation{position:relative;z-index:2}.DayPickerNavigation__horizontal{height:0}.DayPickerNavigation__verticalDefault{position:absolute;width:100%;height:52px;bottom:0;left:0}.DayPickerNavigation__verticalScrollableDefault{position:relative}.DayPickerNavigation_button{cursor:pointer;-webkit-user-select:none;user-select:none;border:0;padding:0;margin:0}.DayPickerNavigation_button__default{border:1px solid #e4e7e7;background-color:#fff;color:#757575}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4}.DayPickerNavigation_button__default:active{background:#f2f2f2}.DayPickerNavigation_button__horizontalDefault{position:absolute;top:18px;line-height:.78;border-radius:3px;padding:6px 9px}.DayPickerNavigation_leftButton__horizontalDefault{left:22px}.DayPickerNavigation_rightButton__horizontalDefault{right:22px}.DayPickerNavigation_button__verticalDefault{padding:5px;background:#fff;box-shadow:0 0 5px 2px rgba(0,0,0,.1);position:relative;display:inline-block;height:100%;width:50%}.DayPickerNavigation_nextButton__verticalDefault{border-left:0}.DayPickerNavigation_nextButton__verticalScrollableDefault{width:100%}.DayPickerNavigation_svg__horizontal{height:19px;width:19px;fill:#82888a;display:block}.DayPickerNavigation_svg__vertical{height:42px;width:42px;fill:#484848;display:block}.DayPicker{position:relative;text-align:left}.DayPicker,.DayPicker__horizontal{background:#fff}.DayPicker__verticalScrollable{height:100%}.DayPicker__hidden{visibility:hidden}.DayPicker__withBorder{box-shadow:0 2px 6px rgba(0,0,0,.05),0 0 0 1px rgba(0,0,0,.07);border-radius:3px}.DayPicker_portal__horizontal{box-shadow:none;position:absolute;left:50%;top:50%}.DayPicker_portal__vertical{position:static}.DayPicker_focusRegion{outline:0}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top}.DayPicker_weekHeaders{position:relative}.DayPicker_weekHeaders__horizontal{margin-left:13px}.DayPicker_weekHeader{color:#757575;position:absolute;top:62px;z-index:2;text-align:left;padding:0!important}.DayPicker_weekHeader__vertical{left:50%}.DayPicker_weekHeader__verticalScrollable{top:0;display:table-row;border-bottom:1px solid #dbdbdb;background:#fff;margin-left:0;left:0;width:100%;text-align:center}.DayPicker_weekHeader_ul{list-style:none;margin:1px 0;padding-left:0;padding-right:0;font-size:14px}.DayPicker_weekHeader_li{display:inline-block;text-align:center;margin:0 1px}.DayPicker_transitionContainer{position:relative;overflow:hidden;border-radius:3px}.DayPicker_transitionContainer__horizontal{transition:height .2s ease-in-out}.DayPicker_transitionContainer__vertical{width:100%}.DayPicker_transitionContainer__verticalScrollable{padding-top:20px;height:100%;position:absolute;top:0;bottom:0;right:0;left:0;overflow-y:scroll}.DateInput{margin:0;padding:0;background:#fff;position:relative;display:inline-block;width:130px;vertical-align:middle}.DateInput__small{width:97px}.DateInput__block{width:100%}.DateInput__disabled{background:#f2f2f2;color:#dbdbdb}.DateInput_input{font-weight:200;font-size:19px;line-height:24px;color:#484848;background-color:#fff;width:100%;padding:11px 11px 9px;border:0;border-bottom:2px solid transparent;border-radius:0}.DateInput_input__small{font-size:15px;line-height:18px;letter-spacing:.2px;padding:7px 7px 5px}.DateInput_input__regular{font-weight:auto}.DateInput_input__readOnly{-webkit-user-select:none;user-select:none}.DateInput_input__focused{outline:0;background:#fff;border:0;border-bottom:2px solid #008489}.DateInput_input__disabled{background:#f2f2f2;font-style:italic}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.DateInput_fang{position:absolute;width:20px;height:10px;left:22px;z-index:2}.DateInput_fangShape{fill:#fff}.DateInput_fangStroke{stroke:#dbdbdb;fill:transparent}.DateRangePickerInput{background-color:#fff;display:inline-block}.DateRangePickerInput__disabled{background:#f2f2f2}.DateRangePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb}.DateRangePickerInput__rtl{direction:rtl}.DateRangePickerInput__block{display:block}.DateRangePickerInput__showClearDates{padding-right:30px}.DateRangePickerInput_arrow{display:inline-block;vertical-align:middle;color:#484848}.DateRangePickerInput_arrow_svg{vertical-align:middle;fill:#484848;height:24px;width:24px}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;transform:translateY(-50%)}.DateRangePickerInput_clearDates__small{padding:6px}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%}.DateRangePickerInput_clearDates__hide{visibility:hidden}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle}.DateRangePickerInput_clearDates_svg__small{height:9px}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle}.DateRangePicker{position:relative;display:inline-block}.DateRangePicker__block{display:block}.DateRangePicker_picker{z-index:1;background-color:#fff;position:absolute}.DateRangePicker_picker__rtl{direction:rtl}.DateRangePicker_picker__directionLeft{left:0}.DateRangePicker_picker__directionRight{right:0}.DateRangePicker_picker__portal{background-color:rgba(0,0,0,.3);position:fixed;top:0;left:0;height:100%;width:100%}.DateRangePicker_picker__fullScreenPortal{background-color:#fff}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:#b0b3b4;text-decoration:none}.DateRangePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd}.components-datetime{padding:16px}.components-panel__body .components-datetime{padding:0}.components-datetime .components-datetime__calendar-help{padding:16px}.components-datetime .components-datetime__calendar-help h4{margin:0}.components-datetime .components-datetime__buttons{display:flex;justify-content:space-between}.components-datetime .components-datetime__date-help-toggle{display:block;margin-right:auto}.components-datetime fieldset{border:0;padding:0;margin:0}.components-datetime input,.components-datetime select{box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575}@media (prefers-reduced-motion:reduce){.components-datetime input,.components-datetime select{transition-duration:0s;transition-delay:0s}}.components-datetime .components-button,.components-datetime input[type=number],.components-datetime select{height:30px;margin-top:0;margin-bottom:0}.components-datetime__date{min-height:236px;border-top:1px solid #ddd}.components-datetime__date .DayPickerNavigation_leftButton__horizontalDefault{left:13px}.components-datetime__date .CalendarMonth_caption{font-size:13px}.components-datetime__date .CalendarMonth_table{border-collapse:separate;border-spacing:2px}.components-datetime__date .CalendarDay{font-size:13px;border:none;border-radius:50%;text-align:center}.components-datetime__date .CalendarDay:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 3px #fff;outline:2px solid transparent}.components-datetime__date .CalendarDay__selected{background:var(--wp-admin-theme-color);border:2px solid transparent}.components-datetime__date .CalendarDay__selected:hover{background:var(--wp-admin-theme-color-darker-20)}.components-datetime__date .CalendarDay__selected:focus{box-shadow:inset 0 0 0 1px #fff}.components-datetime__date .DayPickerNavigation_button__horizontalDefault{padding:2px 8px;top:20px}.components-datetime__date .DayPickerNavigation_button__horizontalDefault:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-datetime__date .DayPicker_weekHeader{top:50px}.components-datetime__date .DayPicker_weekHeader .DayPicker_weekHeader_ul{margin:1px;padding-right:0;padding-left:0}.components-datetime__date.is-description-visible .DayPicker{visibility:hidden}.components-datetime__date .CalendarDay .components-datetime__date__day{height:100%;display:flex;justify-content:center;align-content:center;flex-direction:column;position:relative}.components-datetime__date .CalendarDay .components-datetime__date__day.has-events:before{content:" ";width:4px;height:4px;border-radius:2px;position:absolute;right:50%;margin-right:-2px;bottom:0;background-color:#fff}.components-datetime__date .CalendarDay:not(.CalendarDay__selected) .components-datetime__date__day.has-events:before{background:var(--wp-admin-theme-color)}.components-datetime__time{padding-bottom:16px}.components-datetime__time fieldset{position:relative;margin-bottom:.5em}.components-datetime__time fieldset+fieldset{margin-bottom:0}.components-datetime__time .components-datetime__time-field-am-pm fieldset{margin-top:0}.components-datetime__time .components-datetime__time-wrapper{display:flex}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-separator{display:inline-block;padding:0 0 0 3px}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field-time{direction:ltr}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select{margin-left:4px}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select:focus{position:relative;z-index:1}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]{padding:2px;margin-left:4px;text-align:center;-moz-appearance:textfield}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]:focus{position:relative;z-index:1}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.components-datetime__time.is-12-hour .components-datetime__time-field-day input{margin:-4px 0 0!important;border-radius:0 2px 2px 0!important}.components-datetime__time.is-12-hour .components-datetime__time-field-year input{border-radius:2px 0 0 2px!important}.components-datetime__timezone{line-height:30px;margin-right:4px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.components-datetime__time-legend{font-weight:600;margin-top:.5em}.components-datetime__time-legend.invisible{position:absolute;top:-999em;right:-999em}.components-datetime__time-field-day-input,.components-datetime__time-field-hours-input,.components-datetime__time-field-minutes-input{width:35px}.components-datetime__time-field-year-input{width:55px}.components-datetime__time-field-month-select{max-width:145px}.components-popover .components-datetime__date{padding-right:4px}.block-editor-dimension-control .components-base-control__field{display:flex;align-items:center}.block-editor-dimension-control .components-base-control__label{display:flex;align-items:center;margin-left:1em;margin-bottom:0}.block-editor-dimension-control .components-base-control__label .dashicon{margin-left:.5em}.block-editor-dimension-control.is-manual .components-base-control__label{width:10em}body.is-dragging-components-draggable{cursor:move;cursor:grabbing!important}.components-draggable__invisible-drag-image{position:fixed;right:-1000px;height:50px;width:50px}.components-draggable__clone{position:fixed;padding:0;background:transparent;pointer-events:none;z-index:1000000000}.components-drop-zone{position:absolute;top:0;left:0;bottom:0;right:0;z-index:40;visibility:hidden;opacity:0;transition:opacity .3s,background-color .3s,visibility 0s .3s;border:2px solid var(--wp-admin-theme-color);border-radius:2px}@media (prefers-reduced-motion:reduce){.components-drop-zone{transition-duration:0s;transition-delay:0s}}.components-drop-zone.is-active{opacity:1;visibility:visible;transition:opacity .3s,background-color .3s}@media (prefers-reduced-motion:reduce){.components-drop-zone.is-active{transition-duration:0s;transition-delay:0s}}.components-drop-zone.is-dragging-over-element{background-color:var(--wp-admin-theme-color)}.components-drop-zone__content{position:absolute;top:50%;right:0;left:0;z-index:50;transform:translateY(-50%);width:100%;text-align:center;color:#fff;transition:transform .2s ease-in-out}@media (prefers-reduced-motion:reduce){.components-drop-zone__content{transition-duration:0s;transition-delay:0s}}.components-drop-zone.is-dragging-over-element .components-drop-zone__content{transform:translateY(-50%) scale(1.05)}.components-drop-zone__content-icon,.components-drop-zone__content-text{display:block}.components-drop-zone__content-icon{margin:0 auto;line-height:0;fill:currentColor}.components-drop-zone__content-text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.components-dropdown{display:inline-block}.components-dropdown__content .components-popover__content>div{padding:12px}.components-dropdown-menu__popover .components-popover__content{min-width:200px}.components-dropdown-menu__menu{width:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4}.components-dropdown-menu__menu .components-dropdown-menu__menu-item,.components-dropdown-menu__menu .components-menu-item{width:100%;padding:6px;outline:none;cursor:pointer;white-space:nowrap}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator,.components-dropdown-menu__menu .components-menu-item.has-separator{margin-top:6px;position:relative;overflow:visible}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator:before,.components-dropdown-menu__menu .components-menu-item.has-separator:before{display:block;content:"";box-sizing:content-box;background-color:#ddd;position:absolute;top:-3px;right:0;left:0;height:1px}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-active svg,.components-dropdown-menu__menu .components-menu-item.is-active svg{color:#fff;background:#1e1e1e;box-shadow:0 0 0 1px #1e1e1e;border-radius:1px}.components-dropdown-menu__menu .components-dropdown-menu__menu-item>svg,.components-dropdown-menu__menu .components-menu-item>svg{border-radius:2px;width:24px;height:24px}.components-dropdown-menu__menu .components-menu-item__button,.components-dropdown-menu__menu .components-menu-item__button.components-button{min-height:36px;height:auto;text-align:right;padding-right:8px;padding-left:8px}.components-dropdown-menu__menu .components-menu-group{padding:12px;margin:0 -12px}.components-dropdown-menu__menu .components-menu-group:first-child{margin-top:-12px}.components-dropdown-menu__menu .components-menu-group:last-child{margin-bottom:-12px}.components-dropdown-menu__menu .components-menu-group+.components-menu-group{margin-top:0;border-top:1px solid #ccc;padding:12px}.is-alternate .components-dropdown-menu__menu .components-menu-group+.components-menu-group{border-color:#1e1e1e}.components-font-size-picker__controls{max-width:248px;display:flex;flex-wrap:wrap;align-items:center;margin-bottom:24px}.components-font-size-picker__controls .components-unit-control-wrapper{margin-left:8px}.components-font-size-picker__controls .components-unit-control-wrapper .components-input-control__label{font-weight:300;padding-bottom:0!important;margin-bottom:8px!important}.components-font-size-picker__controls .components-custom-select-control__button{min-width:120px}.components-font-size-picker__controls .components-font-size-picker__number{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:inline-block;font-weight:500;height:30px;margin:8px 0 0 8px;width:54px}@media (prefers-reduced-motion:reduce){.components-font-size-picker__controls .components-font-size-picker__number{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-font-size-picker__controls .components-font-size-picker__number{font-size:13px;line-height:normal}}.components-font-size-picker__controls .components-font-size-picker__number:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-font-size-picker__controls .components-font-size-picker__number::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-font-size-picker__controls .components-font-size-picker__number::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-font-size-picker__controls .components-font-size-picker__number:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-font-size-picker__controls .components-font-size-picker__number[value=""]+.components-button{cursor:default;opacity:.3;pointer-events:none}.components-font-size-picker__controls .components-font-size-picker__number-container{display:flex;flex-direction:column}.components-font-size-picker__controls .components-font-size-picker__select{margin-left:8px}.components-font-size-picker__controls .components-color-palette__clear{height:30px;margin-top:26px}.components-font-size-picker__custom-input .components-range-control__slider+.dashicon{width:30px;height:30px}.components-font-size-picker{border:0;padding:0;margin:0}.components-form-toggle{position:relative;display:inline-block}.components-form-toggle .components-form-toggle__track{content:"";display:inline-block;box-sizing:border-box;vertical-align:top;background-color:#fff;border:1px solid #1e1e1e;width:36px;height:18px;border-radius:9px;transition:background .2s ease}@media (prefers-reduced-motion:reduce){.components-form-toggle .components-form-toggle__track{transition-duration:0s;transition-delay:0s}}.components-form-toggle .components-form-toggle__thumb{display:block;position:absolute;box-sizing:border-box;top:3px;right:3px;width:12px;height:12px;border-radius:50%;transition:transform .1s ease;background-color:#1e1e1e;border:5px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.components-form-toggle .components-form-toggle__thumb{transition-duration:0s;transition-delay:0s}}.components-form-toggle.is-checked .components-form-toggle__track{background-color:var(--wp-admin-theme-color);border:9px solid transparent}.components-form-toggle .components-form-toggle__input:focus+.components-form-toggle__track{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:2px}.components-form-toggle.is-checked .components-form-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(-18px)}.components-disabled .components-form-toggle,.components-form-toggle.is-disabled{opacity:.3}.components-form-toggle input.components-form-toggle__input[type=checkbox]{position:absolute;top:0;right:0;width:100%;height:100%;opacity:0;margin:0;padding:0;z-index:1;border:none}.components-form-toggle input.components-form-toggle__input[type=checkbox]:checked{background:none}.components-form-toggle input.components-form-toggle__input[type=checkbox]:before{content:""}.components-form-token-field__input-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:center;width:100%;margin:0 0 8px;padding:2px 4px;cursor:text}@media (prefers-reduced-motion:reduce){.components-form-token-field__input-container{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-form-token-field__input-container{font-size:13px;line-height:normal}}.components-form-token-field__input-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-form-token-field__input-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-form-token-field__input-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container.is-disabled{background:#ddd;border-color:#ddd}.components-form-token-field__input-container.is-active{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-form-token-field__input-container input[type=text].components-form-token-field__input{display:inline-block;flex:1;font-size:16px;width:100%;max-width:100%;margin-right:4px;padding:0;min-height:24px;min-width:50px;background:inherit;border:0;color:#1e1e1e;box-shadow:none}@media (min-width:600px){.components-form-token-field__input-container input[type=text].components-form-token-field__input{font-size:13px}}.components-form-token-field.is-active .components-form-token-field__input-container input[type=text].components-form-token-field__input,.components-form-token-field__input-container input[type=text].components-form-token-field__input:focus{outline:none;box-shadow:none}.components-form-token-field__input-container .components-form-token-field__token+input[type=text].components-form-token-field__input{width:auto}.components-form-token-field__label{display:inline-block;margin-bottom:4px}.components-form-token-field__help{font-size:12px;font-style:normal;color:#757575}.components-form-token-field__token{font-size:13px;display:flex;margin:2px 0 2px 4px;color:#1e1e1e;max-width:100%}.components-form-token-field__token.is-success .components-form-token-field__remove-token,.components-form-token-field__token.is-success .components-form-token-field__token-text{background:#4ab866}.components-form-token-field__token.is-error .components-form-token-field__remove-token,.components-form-token-field__token.is-error .components-form-token-field__token-text{background:#cc1818}.components-form-token-field__token.is-validating .components-form-token-field__remove-token,.components-form-token-field__token.is-validating .components-form-token-field__token-text{color:#757575}.components-form-token-field__token.is-borderless{position:relative;padding:0 0 0 16px}.components-form-token-field__token.is-borderless .components-form-token-field__token-text{background:transparent;color:var(--wp-admin-theme-color)}.components-form-token-field__token.is-borderless .components-form-token-field__remove-token{background:transparent;color:#757575;position:absolute;top:1px;left:0}.components-form-token-field__token.is-borderless.is-success .components-form-token-field__token-text{color:#4ab866}.components-form-token-field__token.is-borderless.is-error .components-form-token-field__token-text{color:#cc1818;border-radius:0 4px 4px 0;padding:0 6px 0 4px}.components-form-token-field__token.is-borderless.is-validating .components-form-token-field__token-text{color:#1e1e1e}.components-form-token-field__token.is-disabled .components-form-token-field__remove-token{cursor:default}.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{display:inline-block;line-height:24px;height:auto;background:#ddd;min-width:unset;transition:all .2s cubic-bezier(.4,1,.4,1)}@media (prefers-reduced-motion:reduce){.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-delay:0s}}.components-form-token-field__token-text{border-radius:0 2px 2px 0;padding:0 8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.components-form-token-field__remove-token.components-button{cursor:pointer;border-radius:2px 0 0 2px;padding:0 2px;color:#1e1e1e;line-height:10px;overflow:initial}.components-form-token-field__remove-token.components-button:hover{color:#1e1e1e}.components-form-token-field__suggestions-list{flex:1 0 100%;min-width:100%;max-height:9em;overflow-y:auto;transition:all .15s ease-in-out;list-style:none;border-top:1px solid #757575;margin:4px -4px -4px;padding:0}@media (prefers-reduced-motion:reduce){.components-form-token-field__suggestions-list{transition-duration:0s;transition-delay:0s}}.components-form-token-field__suggestion{color:#757575;display:block;font-size:13px;padding:4px 8px;margin:0;cursor:pointer}.components-form-token-field__suggestion.is-selected{background:var(--wp-admin-theme-color);color:#fff}.components-form-token-field__suggestion-match{text-decoration:underline}@media (min-width:600px){.components-guide{width:600px}}.components-guide .components-modal__header{background:none;border-bottom:none;width:100%;padding:0;margin:0}.components-guide .components-modal__header .components-button{align-self:flex-start;margin:8px 0 0 8px;position:static}.components-guide .components-modal__header .components-button:hover svg{fill:#fff}.components-guide__container{display:flex;flex-direction:column;justify-content:space-between;margin-top:-60px;min-height:100%}.components-guide__page{display:flex;flex-direction:column;justify-content:center;position:relative}@media (min-width:600px){.components-guide__page{min-height:300px}}.components-guide__footer{align-content:center;display:flex;height:30px;justify-content:center;margin:0 0 24px;padding:0 32px;position:relative;width:100%}@media (max-width:600px){.components-guide__footer{position:absolute;bottom:0}}.components-guide__page-control{margin:0;text-align:center}.components-guide__page-control li{display:inline-block;margin:0}.components-guide__page-control .components-button{height:30px;min-width:20px;margin:-6px 0}.components-guide .components-modal__content{padding:0}.components-modal__frame.components-guide{border:none;min-width:312px;height:80vh;max-height:575px}@media (max-width:600px){.components-modal__frame.components-guide{bottom:5%;right:16px;left:16px;top:5%;margin:0 auto}}.components-button.components-guide__back-button,.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{height:30px;position:absolute}.components-button.components-guide__back-button,.components-button.components-guide__forward-button{font-size:13px;padding:4px 2px}.components-button.components-guide__back-button.has-text svg,.components-button.components-guide__forward-button.has-text svg{margin:0}.components-button.components-guide__back-button:hover,.components-button.components-guide__forward-button:hover{text-decoration:underline}.components-button.components-guide__back-button{right:32px}.components-button.components-guide__forward-button{left:32px;color:#1386bf;font-weight:700}.components-button.components-guide__finish-button{left:32px}.components-button.components-guide__inline-finish-button{display:none}[role=region]{position:relative}.is-focusing-regions [role=region]:focus:after{content:"";position:absolute;top:0;bottom:0;right:0;left:0;pointer-events:none;outline:4px solid transparent;box-shadow:inset 0 0 0 4px var(--wp-admin-theme-color)}@supports (outline-offset:1px){.is-focusing-regions [role=region]:focus:after{content:none}.is-focusing-regions [role=region]:focus{outline-style:solid;outline-color:var(--wp-admin-theme-color);outline-width:4px;outline-offset:-4px}}.components-menu-group+.components-menu-group{margin-top:8px;padding-top:8px;border-top:1px solid #1e1e1e}.components-menu-group+.components-menu-group.has-hidden-separator{border-top:none;margin-top:0;padding-top:0}.components-menu-group__label{padding:0 8px;margin-top:4px;margin-bottom:12px;color:#757575;text-transform:uppercase;font-size:11px;font-weight:500}.components-menu-item__button,.components-menu-item__button.components-button{width:100%}.components-menu-item__button.components-button .components-menu-items__item-icon,.components-menu-item__button .components-menu-items__item-icon{margin-left:-2px;margin-right:24px;display:inline-block;flex:0 0 auto}.components-menu-item__button.components-button .components-menu-item__shortcut+.components-menu-items__item-icon,.components-menu-item__button .components-menu-item__shortcut+.components-menu-items__item-icon{margin-right:8px}.components-menu-item__button .block-editor-block-icon,.components-menu-item__button.components-button .block-editor-block-icon{margin-right:-2px;margin-left:8px}.components-menu-item__button.components-button.is-primary,.components-menu-item__button.is-primary{justify-content:center}.components-menu-item__button.components-button.is-primary .components-menu-item__item,.components-menu-item__button.is-primary .components-menu-item__item{margin-left:0}.components-menu-item__info-wrapper{display:flex;flex-direction:column;margin-left:auto}.components-menu-item__info{margin-top:4px;font-size:12px;color:#757575;white-space:normal}.components-menu-item__item{white-space:nowrap;margin-left:auto;display:inline-flex;align-items:center}.components-menu-item__shortcut{align-self:center;margin-left:0;margin-right:auto;padding-right:24px;color:currentColor;display:none}@media (min-width:480px){.components-menu-item__shortcut{display:inline}}.components-menu-items-choice.components-button svg,.components-menu-items-choice svg{margin-left:12px}.components-menu-items-choice.components-button.has-icon,.components-menu-items-choice.has-icon{padding-right:12px}.components-modal__screen-overlay{position:fixed;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,.35);z-index:100000;animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-modal__screen-overlay{animation-duration:1ms;animation-delay:0s}}.components-modal__frame{position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;margin:0;background:#fff;box-shadow:0 10px 10px rgba(0,0,0,.25);border-radius:2px;overflow:auto}@media (min-width:600px){.components-modal__frame{top:50%;left:auto;bottom:auto;right:50%;min-width:360px;max-width:calc(100% - 32px);max-height:90%;transform:translate(50%,-50%);animation:components-modal__appear-animation .1s ease-out;animation-fill-mode:forwards}}@media (min-width:600px) and (prefers-reduced-motion:reduce){.components-modal__frame{animation-duration:1ms;animation-delay:0s}}@keyframes components-modal__appear-animation{0%{margin-top:32px}to{margin-top:0}}.components-modal__header{box-sizing:border-box;border-bottom:1px solid #ddd;padding:0 32px;display:flex;flex-direction:row;justify-content:space-between;background:#fff;align-items:center;height:60px;z-index:10;position:relative;position:sticky;top:0;margin:0 -32px 24px}@supports (-ms-ime-align:auto){.components-modal__header{position:fixed;width:100%}}.components-modal__header .components-modal__header-heading{font-size:1rem;font-weight:600}.components-modal__header h1{line-height:1;margin:0}.components-modal__header .components-button{position:relative;right:8px}.components-modal__header-heading-container{align-items:center;flex-grow:1;display:flex;flex-direction:row;justify-content:left}.components-modal__header-icon-container{display:inline-block}.components-modal__header-icon-container svg{max-width:36px;max-height:36px;padding:8px}.components-modal__content{box-sizing:border-box;height:100%;padding:0 32px 24px}@supports (-ms-ime-align:auto){.components-modal__content{padding-top:60px}}.components-notice{display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#fff;border-right:4px solid var(--wp-admin-theme-color);margin:5px 15px 2px;padding:8px 12px;align-items:center}.components-notice.is-dismissible{padding-left:36px;position:relative}.components-notice.is-success{border-right-color:#4ab866;background-color:#eff9f1}.components-notice.is-warning{border-right-color:#f0b849;background-color:#fef8ee}.components-notice.is-error{border-right-color:#cc1818;background-color:#f4a2a2}.components-notice__content{flex-grow:1;margin:4px 0 4px 25px}.components-notice__actions{display:flex;flex-wrap:wrap}.components-notice__action.components-button{margin-left:8px}.components-notice__action.components-button,.components-notice__action.components-button.is-link{margin-right:12px}.components-notice__action.components-button.is-secondary{vertical-align:initial}.components-notice__dismiss{color:#757575;align-self:flex-start;flex-shrink:0}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:#1e1e1e;background-color:transparent}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{box-shadow:none}.components-notice-list{max-width:100vw;box-sizing:border-box}.components-notice-list .components-notice__content{margin-top:12px;margin-bottom:12px;line-height:2}.components-notice-list .components-notice__action.components-button{display:block;margin-right:0;margin-top:8px}.components-panel{background:#fff;border:1px solid #e0e0e0}.components-panel>.components-panel__body:first-child,.components-panel>.components-panel__header:first-child{margin-top:-1px}.components-panel>.components-panel__body:last-child,.components-panel>.components-panel__header:last-child{border-bottom-width:0}.components-panel+.components-panel{margin-top:-1px}.components-panel__body{border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0}.components-panel__body h3{margin:0 0 .5em}.components-panel__body.is-opened{padding:16px}.components-panel__header{display:flex;justify-content:space-between;align-items:center;padding:0 16px;height:48px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.components-panel__header h2{margin:0;font-size:inherit;color:inherit}.components-panel__body+.components-panel__body,.components-panel__body+.components-panel__header,.components-panel__header+.components-panel__body,.components-panel__header+.components-panel__header{margin-top:-1px}.components-panel__body>.components-panel__body-title{display:block;padding:0;font-size:inherit;margin-top:0;margin-bottom:0;transition:background .1s ease-in-out}@media (prefers-reduced-motion:reduce){.components-panel__body>.components-panel__body-title{transition-duration:0s;transition-delay:0s}}.components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-panel__body>.components-panel__body-title:hover{background:#f0f0f0;border:none}.components-panel__body-toggle.components-button{position:relative;padding:16px 16px 16px 48px;outline:none;width:100%;font-weight:500;text-align:right;color:#1e1e1e;border:none;box-shadow:none;transition:background .1s ease-in-out;height:auto}@media (prefers-reduced-motion:reduce){.components-panel__body-toggle.components-button{transition-duration:0s;transition-delay:0s}}.components-panel__body-toggle.components-button:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);border-radius:0}.components-panel__body-toggle.components-button .components-panel__arrow{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:#1e1e1e;fill:currentColor;transition:color .1s ease-in-out}@media (prefers-reduced-motion:reduce){.components-panel__body-toggle.components-button .components-panel__arrow{transition-duration:0s;transition-delay:0s}}body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right{transform:scaleX(-1);-ms-filter:fliph;filter:FlipH;margin-top:-10px}.components-panel__icon{color:#757575;margin:-2px 6px -2px 0}.components-panel__body-toggle-icon{margin-left:-5px}.components-panel__color-title{float:right;height:19px}.components-panel__row{display:flex;justify-content:space-between;align-items:center;margin-top:8px;min-height:36px}.components-panel__row select{min-width:0}.components-panel__row label{margin-left:12px;flex-shrink:0;max-width:75%}.components-panel__row:empty,.components-panel__row:first-of-type{margin-top:0}.components-panel .circle-picker{padding-bottom:20px}.components-placeholder.components-placeholder{box-sizing:border-box;position:relative;padding:1em;min-height:200px;width:100%;text-align:right;margin:0;color:#1e1e1e;-moz-font-smoothing:subpixel-antialiased;-webkit-font-smoothing:subpixel-antialiased;border-radius:2px;background-color:#fff;box-shadow:inset 0 0 0 1px #1e1e1e;outline:1px solid transparent}@supports (position:sticky){.components-placeholder.components-placeholder{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}}.components-placeholder.components-placeholder .components-base-control__label{font-size:13px}.components-placeholder__error,.components-placeholder__fieldset,.components-placeholder__instructions,.components-placeholder__label{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-placeholder__label{display:flex;font-weight:600;margin-bottom:16px;align-items:center}.components-placeholder__label .block-editor-block-icon,.components-placeholder__label .dashicon,.components-placeholder__label>svg{fill:currentColor;margin-left:1ch}.components-placeholder__label:empty{display:none}.components-placeholder__fieldset,.components-placeholder__fieldset form{display:flex;flex-direction:row;width:100%;flex-wrap:wrap}.components-placeholder__fieldset form p,.components-placeholder__fieldset p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-placeholder__fieldset.is-column-layout,.components-placeholder__fieldset.is-column-layout form{flex-direction:column}.components-placeholder__input[type=url]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;margin:0 0 0 8px;flex:1 1 auto}@media (prefers-reduced-motion:reduce){.components-placeholder__input[type=url]{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-placeholder__input[type=url]{font-size:13px;line-height:normal}}.components-placeholder__input[type=url]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-placeholder__input[type=url]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__instructions{margin-bottom:1em}.components-placeholder__error{margin-top:1em;width:100%}.components-placeholder__preview img{margin:3%;width:50%}.components-placeholder__fieldset .components-button{margin-left:12px;margin-bottom:12px}.components-placeholder__fieldset .components-button:last-child{margin-bottom:0;margin-left:0}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link{margin-right:10px;margin-left:10px}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link:last-child{margin-left:0}.components-placeholder.is-large .components-placeholder__label{font-size:18pt;font-weight:400}.components-placeholder.is-medium .components-placeholder__instructions,.components-placeholder.is-small .components-placeholder__instructions{display:none}.components-placeholder.is-medium .components-placeholder__fieldset,.components-placeholder.is-medium .components-placeholder__fieldset form,.components-placeholder.is-small .components-placeholder__fieldset,.components-placeholder.is-small .components-placeholder__fieldset form{flex-direction:column}.components-placeholder.is-medium .components-placeholder__fieldset .components-button,.components-placeholder.is-small .components-placeholder__fieldset .components-button{margin-left:auto}.components-placeholder.is-small .components-button{padding:0 8px 2px}.components-popover{position:fixed;z-index:1000000;top:0;left:0;opacity:0}.components-popover.is-expanded,.components-popover[data-x-axis][data-y-axis]{opacity:1}.components-popover.is-expanded{top:0;left:0;right:0;bottom:0;z-index:1000000!important}.components-popover:not(.is-without-arrow){margin-left:2px}.components-popover:not(.is-without-arrow):before{border:8px solid #ccc}.components-popover:not(.is-without-arrow).is-alternate:before{border-color:#1e1e1e}.components-popover:not(.is-without-arrow):after{border:8px solid #fff}.components-popover:not(.is-without-arrow):after,.components-popover:not(.is-without-arrow):before{content:"";position:absolute;height:0;width:0;line-height:0}.components-popover:not(.is-without-arrow)[data-y-axis=top]{margin-top:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:after,.components-popover:not(.is-without-arrow)[data-y-axis=top]:before{border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-style:solid;margin-left:-10px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]{margin-top:8px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after,.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;margin-left:-10px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]{margin-left:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:before{right:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:after{right:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:after,.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:before{border-bottom-color:transparent;border-left-style:solid;border-right:none;border-top-color:transparent}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]{margin-left:8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:before{left:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:after{left:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:after,.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:before{border-bottom-color:transparent;border-left:none;border-right-style:solid;border-top-color:transparent}.components-popover[data-y-axis=top]{bottom:100%}.components-popover[data-y-axis=bottom]{top:100%}.components-popover[data-y-axis=middle]{align-items:center;display:flex}.components-popover.is-from-top{margin-top:12px}.components-popover.is-from-bottom{margin-top:-12px}.components-popover.is-from-left:not(.is-from-top):not(.is-from-bottom){margin-left:12px}.components-popover.is-from-right:not(.is-from-top):not(.is-from-bottom){margin-right:12px}.components-popover__content{height:100%;background:#fff;border:1px solid #ccc;box-shadow:0 2px 6px rgba(0,0,0,.05);border-radius:2px}.is-alternate .components-popover__content{border:1px solid #1e1e1e;box-shadow:none}.components-popover .components-popover__content{position:absolute;height:auto;overflow-y:auto}.components-popover.is-expanded .components-popover__content{position:static;height:calc(100% - 48px);overflow-y:visible;min-width:auto;border:none;border-top:1px solid #1e1e1e}.components-popover[data-y-axis=top] .components-popover__content{bottom:100%}.components-popover[data-x-axis=center] .components-popover__content{left:50%;transform:translateX(-50%)}.components-popover[data-x-axis=right] .components-popover__content{position:absolute;left:100%}.components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-25px}.components-popover[data-x-axis=left] .components-popover__content{position:absolute;right:100%}.components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-25px}.components-popover__header{align-items:center;background:#fff;display:flex;height:48px;justify-content:space-between;padding:0 8px 0 16px}.components-popover__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.components-popover__close.components-button{z-index:5}.components-radio-control{display:flex;flex-direction:column}.components-radio-control .components-base-control__help{margin-top:0}.components-radio-control .components-base-control__field{margin-bottom:0}.components-radio-control__option:not(:last-child){margin-bottom:4px}.components-radio-control__input[type=radio]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;font-size:16px;line-height:normal;border:1px solid #1e1e1e;transition:none;border-radius:50%;width:24px;height:24px;margin-top:0;margin-left:6px}@media (prefers-reduced-motion:reduce){.components-radio-control__input[type=radio]{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-radio-control__input[type=radio]{font-size:13px;line-height:normal}}.components-radio-control__input[type=radio]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-radio-control__input[type=radio]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-radio-control__input[type=radio]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-radio-control__input[type=radio]:-ms-input-placeholder{color:rgba(30,30,30,.62)}@media (min-width:600px){.components-radio-control__input[type=radio]{height:20px;width:20px}}.components-radio-control__input[type=radio]:checked:before{box-sizing:inherit;width:8px;height:8px;transform:translate(-7px,7px);margin:0;background-color:#fff;border:4px solid #fff}@media (min-width:600px){.components-radio-control__input[type=radio]:checked:before{transform:translate(-5px,5px)}}.components-radio-control__input[type=radio]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid transparent}.components-radio-control__input[type=radio]:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-resizable-box__handle{display:none;width:23px;height:23px;z-index:2}.components-resizable-box__container.has-show-handle .components-resizable-box__handle{display:block}.components-resizable-box__handle:after{display:block;content:"";width:15px;height:15px;border:2px solid var(--wp-admin-theme-color);border-radius:50%;background:#fff;cursor:inherit;position:absolute;top:calc(50% - 8px);left:calc(50% - 8px)}.components-resizable-box__side-handle:before{display:block;border-radius:2px;content:"";width:3px;height:3px;background:var(--wp-admin-theme-color);cursor:inherit;position:absolute;top:calc(50% - 1px);left:calc(50% - 1px);transition:transform .1s ease-in;opacity:0}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle:before{transition-duration:0s;transition-delay:0s}}.components-resizable-box__corner-handle,.components-resizable-box__side-handle{z-index:2}.components-resizable-box__side-handle.components-resizable-box__handle-bottom,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:before,.components-resizable-box__side-handle.components-resizable-box__handle-top,.components-resizable-box__side-handle.components-resizable-box__handle-top:before{width:100%;right:0;border-right:0;border-left:0}.components-resizable-box__side-handle.components-resizable-box__handle-left,.components-resizable-box__side-handle.components-resizable-box__handle-left:before,.components-resizable-box__side-handle.components-resizable-box__handle-right,.components-resizable-box__side-handle.components-resizable-box__handle-right:before{height:100%;top:0;border-top:0;border-bottom:0}.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:components-resizable-box__top-bottom-animation .1s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation-duration:1ms;animation-delay:0s}}.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before{animation:components-resizable-box__left-right-animation .1s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before{animation-duration:1ms;animation-delay:0s}}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:none}}}@keyframes components-resizable-box__top-bottom-animation{0%{transform:scaleX(0);opacity:0}to{transform:scaleX(1);opacity:1}}@keyframes components-resizable-box__left-right-animation{0%{transform:scaleY(0);opacity:0}to{transform:scaleY(1);opacity:1}}.components-resizable-box__handle-right{right:-11.5px}.components-resizable-box__handle-left{left:-11.5px}.components-resizable-box__handle-top{top:-11.5px}.components-resizable-box__handle-bottom{bottom:-11.5px}.components-responsive-wrapper{position:relative;max-width:100%}.components-responsive-wrapper,.components-responsive-wrapper>span{display:block}.components-responsive-wrapper__content{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;margin:auto}.components-sandbox{overflow:hidden}iframe.components-sandbox{width:100%}body.lockscroll,html.lockscroll{overflow:hidden}.components-select-control__input{background:#fff;height:36px;line-height:36px;margin:1px;outline:0;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)!important}@media (min-width:782px){.components-select-control__input{height:28px;line-height:28px}}@media (max-width:782px){.components-base-control .components-base-control__field .components-select-control__input{font-size:16px}}.components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#1e1e1e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer;pointer-events:auto}@media (min-width:600px){.components-snackbar{width:-moz-fit-content;width:fit-content}}.components-snackbar:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-snackbar.components-snackbar-explicit-dismiss{cursor:default}.components-snackbar .components-snackbar__content-with-icon{margin-right:24px}.components-snackbar .components-snackbar__icon{position:absolute;top:24px;right:28px}.components-snackbar .components-snackbar__dismiss-button{margin-right:32px;cursor:pointer}.components-snackbar__action.components-button{margin-right:32px;color:#fff;height:auto;flex-shrink:0;line-height:1.4;padding:0}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary){text-decoration:underline;background-color:transparent}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus{color:#fff;box-shadow:none;outline:1px dotted #fff}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:var(--wp-admin-theme-color)}.components-snackbar__content{display:flex;align-items:baseline;justify-content:space-between;line-height:1.4}.components-snackbar-list{position:absolute;z-index:100000;width:100%;box-sizing:border-box;pointer-events:none}.components-snackbar-list__notice-container{position:relative;padding-top:8px}.components-swatch{width:18px;height:18px;border-radius:50%;color:transparent;background:transparent}.components-swatch:after{content:"";display:block;width:100%;height:100%;border:1px solid rgba(0,0,0,.2);border-radius:50%}.components-button.has-icon.has-text .components-swatch{margin-left:8px}.components-tab-panel__tabs{display:flex;align-items:stretch;flex-direction:row}.components-tab-panel__tabs[aria-orientation=vertical]{flex-direction:column}.components-tab-panel__tabs-item{background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-right:0;font-weight:500;transition:box-shadow .1s linear;box-sizing:border-box}.components-tab-panel__tabs-item:after{content:attr(data-label);display:block;height:0;overflow:hidden;speak:none;visibility:hidden}.components-tab-panel__tabs-item:focus:not(:disabled){box-shadow:inset 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-tab-panel__tabs-item.is-active{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) transparent,inset 0 -4px 0 0 var(--wp-admin-theme-color);position:relative}.components-tab-panel__tabs-item.is-active:before{content:"";position:absolute;top:0;bottom:1px;left:0;right:0;border-bottom:4px solid transparent}.components-tab-panel__tabs-item:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-tab-panel__tabs-item.is-active:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 -4px 0 0 var(--wp-admin-theme-color)}.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{width:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal}@media (prefers-reduced-motion:reduce){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{transition-duration:0s;transition-delay:0s}}@media (min-width:600px){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{font-size:13px;line-height:normal}}.components-text-control__input:focus,.components-text-control__input[type=color]:focus,.components-text-control__input[type=date]:focus,.components-text-control__input[type=datetime-local]:focus,.components-text-control__input[type=datetime]:focus,.components-text-control__input[type=email]:focus,.components-text-control__input[type=month]:focus,.components-text-control__input[type=number]:focus,.components-text-control__input[type=password]:focus,.components-text-control__input[type=tel]:focus,.components-text-control__input[type=text]:focus,.components-text-control__input[type=time]:focus,.components-text-control__input[type=url]:focus,.components-text-control__input[type=week]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-text-control__input::-webkit-input-placeholder,.components-text-control__input[type=color]::-webkit-input-placeholder,.components-text-control__input[type=date]::-webkit-input-placeholder,.components-text-control__input[type=datetime-local]::-webkit-input-placeholder,.components-text-control__input[type=datetime]::-webkit-input-placeholder,.components-text-control__input[type=email]::-webkit-input-placeholder,.components-text-control__input[type=month]::-webkit-input-placeholder,.components-text-control__input[type=number]::-webkit-input-placeholder,.components-text-control__input[type=password]::-webkit-input-placeholder,.components-text-control__input[type=tel]::-webkit-input-placeholder,.components-text-control__input[type=text]::-webkit-input-placeholder,.components-text-control__input[type=time]::-webkit-input-placeholder,.components-text-control__input[type=url]::-webkit-input-placeholder,.components-text-control__input[type=week]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-text-control__input::-moz-placeholder,.components-text-control__input[type=color]::-moz-placeholder,.components-text-control__input[type=date]::-moz-placeholder,.components-text-control__input[type=datetime-local]::-moz-placeholder,.components-text-control__input[type=datetime]::-moz-placeholder,.components-text-control__input[type=email]::-moz-placeholder,.components-text-control__input[type=month]::-moz-placeholder,.components-text-control__input[type=number]::-moz-placeholder,.components-text-control__input[type=password]::-moz-placeholder,.components-text-control__input[type=tel]::-moz-placeholder,.components-text-control__input[type=text]::-moz-placeholder,.components-text-control__input[type=time]::-moz-placeholder,.components-text-control__input[type=url]::-moz-placeholder,.components-text-control__input[type=week]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-text-control__input:-ms-input-placeholder,.components-text-control__input[type=color]:-ms-input-placeholder,.components-text-control__input[type=date]:-ms-input-placeholder,.components-text-control__input[type=datetime-local]:-ms-input-placeholder,.components-text-control__input[type=datetime]:-ms-input-placeholder,.components-text-control__input[type=email]:-ms-input-placeholder,.components-text-control__input[type=month]:-ms-input-placeholder,.components-text-control__input[type=number]:-ms-input-placeholder,.components-text-control__input[type=password]:-ms-input-placeholder,.components-text-control__input[type=tel]:-ms-input-placeholder,.components-text-control__input[type=text]:-ms-input-placeholder,.components-text-control__input[type=time]:-ms-input-placeholder,.components-text-control__input[type=url]:-ms-input-placeholder,.components-text-control__input[type=week]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-tip{display:flex;color:#757575}.components-tip svg{align-self:center;fill:#f0b849;flex-shrink:0;margin-left:16px}.components-tip p{margin:0}.components-toggle-control .components-base-control__field{display:flex;margin-bottom:12px;line-height:normal;align-items:center}.components-toggle-control .components-base-control__field .components-form-toggle{margin-left:12px}.components-toggle-control .components-base-control__field .components-toggle-control__label{display:block}.components-accessible-toolbar{display:inline-flex;border:1px solid #1e1e1e;border-radius:2px;flex-shrink:0}.components-accessible-toolbar>.components-toolbar-group:last-child{border-left:none}.components-accessible-toolbar .components-button,.components-toolbar .components-button{position:relative;height:48px;z-index:1;padding-right:16px;padding-left:16px}.components-accessible-toolbar .components-button:focus:enabled,.components-toolbar .components-button:focus:enabled{box-shadow:none;outline:none}.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{content:"";position:absolute;display:block;border-radius:2px;height:32px;right:8px;left:8px;z-index:-1;animation:components-button__appear-animation .1s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{animation-duration:1ms;animation-delay:0s}}.components-accessible-toolbar .components-button svg,.components-toolbar .components-button svg{position:relative;margin-right:auto;margin-left:auto}.components-accessible-toolbar .components-button.is-pressed,.components-accessible-toolbar .components-button.is-pressed:hover,.components-toolbar .components-button.is-pressed,.components-toolbar .components-button.is-pressed:hover{background:transparent}.components-accessible-toolbar .components-button.is-pressed:before,.components-toolbar .components-button.is-pressed:before{background:#1e1e1e}.components-accessible-toolbar .components-button:focus:before,.components-toolbar .components-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.components-accessible-toolbar .components-button.has-icon,.components-toolbar .components-button.has-icon{padding-right:8px;padding-left:8px;min-width:48px;justify-content:center}.components-accessible-toolbar .components-button.components-tab-button,.components-toolbar .components-button.components-tab-button{font-weight:500}.components-accessible-toolbar .components-button.components-tab-button span,.components-toolbar .components-button.components-tab-button span{display:inline-block;padding-right:0;padding-left:0;position:relative}@keyframes components-button__appear-animation{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.components-toolbar__control.components-button{position:relative}.components-toolbar__control.components-button[data-subscript] svg{padding:5px 0 5px 10px}.components-toolbar__control.components-button[data-subscript]:after{content:attr(data-subscript);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:12px;position:absolute;left:8px;bottom:10px}.components-toolbar__control.components-button:active:before{display:none}.components-toolbar__control.components-button:not(:disabled).is-pressed[data-subscript]:after{color:#fff}.components-toolbar-group{min-height:48px;border-left:1px solid #1e1e1e;background-color:#fff;display:inline-flex;flex-shrink:0;flex-wrap:wrap;line-height:0}.components-toolbar-group .components-toolbar-group.components-toolbar-group{border-width:0;margin:0}.components-toolbar{min-height:48px;margin:0;border:1px solid #1e1e1e;background-color:#fff;display:inline-flex;flex-shrink:0;flex-wrap:wrap}.components-toolbar .components-toolbar.components-toolbar{border-width:0;margin:0}div.components-toolbar>div{display:block;margin:0}@supports (position:sticky){div.components-toolbar>div{display:flex}}div.components-toolbar>div+div.has-left-divider{margin-right:6px;position:relative;overflow:visible}div.components-toolbar>div+div.has-left-divider:before{display:inline-block;content:"";box-sizing:content-box;background-color:#ddd;position:absolute;top:8px;right:-3px;width:1px;height:20px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>* .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>.components-button.components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child:last-child,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>* .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>* .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>* .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child:last-child,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>* .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child:last-child,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button{min-width:48px;padding-right:12px;padding-left:12px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>* .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child:last-child:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>* .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot.components-dropdown>.components-button.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child:last-child:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child:last-child .components-button:before{right:8px;left:8px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:first-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:first-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:first-child>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:first-child>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:first-child>.components-button{min-width:42px;padding-right:11px;padding-left:6px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:first-child:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:first-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:first-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:first-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:first-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:first-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:first-child:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:first-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:first-child:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:first-child .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:first-child>.components-button:before{right:8px;left:2px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div>.components-button{min-width:36px;padding-right:6px;padding-left:6px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button svg,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown .components-button svg,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown .components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown .components-button svg,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div>.components-button svg,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button svg,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown .components-button svg,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div>.components-button svg,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button svg,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown .components-button svg,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div>.components-button svg{min-width:24px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div>.components-button:before{right:2px;left:2px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:last-child,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:last-child .components-button,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:last-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:last-child>.components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:last-child,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:last-child>.components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:last-child,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:last-child>.components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:last-child,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:last-child>.components-button{min-width:42px;padding-right:6px;padding-left:11px}.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-button:last-child:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group>div:last-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-button:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-dropdown>div:last-child>.components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-button:last-child:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.block-editor-block-toolbar__slot>.components-toolbar>div:last-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-button:last-child:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar-group>.block-editor-block-toolbar__slot>div:last-child>.components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-button:last-child:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>.components-dropdown:last-child .components-button:before,.block-editor-block-toolbar>.components-toolbar>.block-editor-block-toolbar__slot>div:last-child>.components-button:before{right:2px;left:8px}.components-tooltip.components-popover{z-index:1000002}.components-tooltip.components-popover .components-popover__content{min-width:0}.components-tooltip .components-popover__content{background:#1e1e1e;border-radius:2px;border-width:0;color:#fff;white-space:nowrap;text-align:center;line-height:1.4;font-size:12px;box-shadow:none}.components-tooltip .components-popover__content>div{padding:4px 8px}.components-tooltip__shortcut{display:inline-block;margin-right:8px}.disabled-element-wrapper{position:relative}.disabled-element-wrapper .event-catcher{z-index:100002;position:absolute;width:100%;height:100%;top:0;right:0;bottom:0;left:0}.components-visually-hidden{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.components-visually-hidden:focus{background-color:#ddd;clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#444;display:block;font-size:1em;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}style-rtl.css000064400000432461152334540170007233 0ustar00@charset "UTF-8";
/**
 * Colors
 */
/**
 * Breakpoints & Media Queries
 */
/**
 * SCSS Variables.
 *
 * Please use variables from this sheet to ensure consistency across the UI.
 * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
 * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
 */
/**
 * Colors
 */
/**
 * Fonts & basic variables.
 */
/**
 * Grid System.
 * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
 */
/**
 * Dimensions.
 */
/**
 * Shadows.
 */
/**
 * Editor widths.
 */
/**
 * Block & Editor UI.
 */
/**
 * Block paddings.
 */
/**
 * React Native specific.
 * These variables do not appear to be used anywhere else.
 */
/**
 * Breakpoint mixins
 */
/**
 * Long content fade mixin
 *
 * Creates a fading overlay to signify that the content is longer
 * than the space allows.
 */
/**
 * Focus styles.
 */
/**
 * Applies editor left position to the selector passed as argument
 */
/**
 * Styles that are reused verbatim in a few places
 */
/**
 * Allows users to opt-out of animations via OS-level preferences.
 */
/**
 * Reset default styles for JavaScript UI based pages.
 * This is a WP-admin agnostic reset
 */
/**
 * Reset the WP Admin page styles for Gutenberg-like pages.
 */
:root {
  --wp-admin-theme-color: #007cba;
  --wp-admin-theme-color-darker-10: #006ba1;
  --wp-admin-theme-color-darker-20: #005a87;
  --wp-admin-border-width-focus: 2px;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  :root {
    --wp-admin-border-width-focus: 1.5px;
  }
}

.components-animate__appear {
  animation: components-animate__appear-animation 0.1s cubic-bezier(0, 0, 0.2, 1) 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-animate__appear {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}
.components-animate__appear.is-from-top, .components-animate__appear.is-from-top.is-from-left {
  transform-origin: top right;
}
.components-animate__appear.is-from-top.is-from-right {
  transform-origin: top left;
}
.components-animate__appear.is-from-bottom, .components-animate__appear.is-from-bottom.is-from-left {
  transform-origin: bottom right;
}
.components-animate__appear.is-from-bottom.is-from-right {
  transform-origin: bottom left;
}

@keyframes components-animate__appear-animation {
  from {
    transform: translateY(-2em) scaleY(0) scaleX(0);
  }
  to {
    transform: translateY(0%) scaleY(1) scaleX(1);
  }
}
.components-animate__slide-in {
  animation: components-animate__slide-in-animation 0.1s cubic-bezier(0, 0, 0.2, 1);
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-animate__slide-in {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}
.components-animate__slide-in.is-from-left {
  transform: translateX(-100%);
}
.components-animate__slide-in.is-from-right {
  transform: translateX(100%);
}

@keyframes components-animate__slide-in-animation {
  100% {
    transform: translateX(0%);
  }
}
.components-animate__loading {
  animation: components-animate__loading 1.6s ease-in-out infinite;
}

@keyframes components-animate__loading {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}
.components-autocomplete__popover .components-popover__content > div {
  padding: 16px;
  min-width: 220px;
}

.components-autocomplete__result.components-button {
  display: flex;
  height: auto;
  min-height: 36px;
  text-align: right;
  width: 100%;
}
.components-autocomplete__result.components-button.is-selected {
  box-shadow: 0 0 0 2px var(--wp-admin-theme-color);
}

.components-button-group {
  display: inline-block;
}
.components-button-group .components-button {
  border-radius: 0;
  display: inline-flex;
  color: #1e1e1e;
  box-shadow: inset 0 0 0 1px #1e1e1e;
}
.components-button-group .components-button + .components-button {
  margin-right: -1px;
}
.components-button-group .components-button:first-child {
  border-radius: 0 2px 2px 0;
}
.components-button-group .components-button:last-child {
  border-radius: 2px 0 0 2px;
}
.components-button-group .components-button:focus, .components-button-group .components-button.is-primary {
  position: relative;
  z-index: 1;
}
.components-button-group .components-button.is-primary {
  box-shadow: inset 0 0 0 1px #1e1e1e;
}

.components-button {
  display: inline-flex;
  text-decoration: none;
  font-weight: normal;
  font-size: 13px;
  margin: 0;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  background: none;
  transition: box-shadow 0.1s linear;
  height: 36px;
  align-items: center;
  box-sizing: border-box;
  padding: 6px 12px;
  border-radius: 2px;
  color: #1e1e1e;
  /**
   * Primary button style.
   */
  /**
   * Secondary and tertiary buttons.
   */
  /**
   * Secondary button style.
   */
  /**
   * Tertiary buttons.
   */
  /**
   * Destructive buttons.
   */
  /**
   * Link buttons.
   */
}
@media (prefers-reduced-motion: reduce) {
  .components-button {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-button[aria-expanded=true], .components-button:hover {
  color: var(--wp-admin-theme-color);
}
.components-button[aria-disabled=true]:hover {
  color: initial;
}
.components-button:focus:not(:disabled) {
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
  outline: 3px solid transparent;
}
.components-button.is-primary {
  white-space: nowrap;
  background: var(--wp-admin-theme-color);
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  outline: 1px solid transparent;
}
.components-button.is-primary:hover:not(:disabled) {
  background: var(--wp-admin-theme-color-darker-10);
  color: #fff;
}
.components-button.is-primary:active:not(:disabled) {
  background: var(--wp-admin-theme-color-darker-20);
  border-color: var(--wp-admin-theme-color-darker-20);
  color: #fff;
}
.components-button.is-primary:focus:not(:disabled) {
  box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
.components-button.is-primary:disabled, .components-button.is-primary:disabled:active:enabled, .components-button.is-primary[aria-disabled=true], .components-button.is-primary[aria-disabled=true]:enabled, .components-button.is-primary[aria-disabled=true]:active:enabled {
  color: rgba(255, 255, 255, 0.4);
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
  opacity: 1;
  outline: none;
}
.components-button.is-primary:disabled:focus:enabled, .components-button.is-primary:disabled:active:enabled:focus:enabled, .components-button.is-primary[aria-disabled=true]:focus:enabled, .components-button.is-primary[aria-disabled=true]:enabled:focus:enabled, .components-button.is-primary[aria-disabled=true]:active:enabled:focus:enabled {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
}
.components-button.is-primary.is-busy, .components-button.is-primary.is-busy:disabled, .components-button.is-primary.is-busy[aria-disabled=true] {
  color: #fff;
  background-size: 100px 100%;
  /* stylelint-disable */
  background-image: linear-gradient(45deg, var(--wp-admin-theme-color) 33%, var(--wp-admin-theme-color-darker-20) 33%, var(--wp-admin-theme-color-darker-20) 70%, var(--wp-admin-theme-color) 70%);
  /* stylelint-enable */
  border-color: var(--wp-admin-theme-color);
}
.components-button.is-secondary, .components-button.is-tertiary {
  outline: 1px solid transparent;
}
.components-button.is-secondary:active:not(:disabled), .components-button.is-tertiary:active:not(:disabled) {
  background: #ddd;
  color: var(--wp-admin-theme-color-darker-10);
  box-shadow: none;
}
.components-button.is-secondary:hover:not(:disabled), .components-button.is-tertiary:hover:not(:disabled) {
  color: var(--wp-admin-theme-color-darker-10);
  box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color-darker-10);
}
.components-button.is-secondary:disabled, .components-button.is-secondary[aria-disabled=true], .components-button.is-secondary[aria-disabled=true]:hover, .components-button.is-tertiary:disabled, .components-button.is-tertiary[aria-disabled=true], .components-button.is-tertiary[aria-disabled=true]:hover {
  color: #828282;
  background: #eaeaea;
  transform: none;
  opacity: 1;
  box-shadow: none;
  outline: none;
}
.components-button.is-secondary {
  box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color);
  outline: 1px solid transparent;
  white-space: nowrap;
  color: var(--wp-admin-theme-color);
  background: transparent;
}
.components-button.is-tertiary {
  white-space: nowrap;
  color: var(--wp-admin-theme-color);
  background: transparent;
  padding: 6px;
}
.components-button.is-tertiary .dashicon {
  display: inline-block;
  flex: 0 0 auto;
}
.components-button.is-destructive {
  color: #cc1818;
  box-shadow: inset 0 0 0 1px #cc1818;
}
.components-button.is-destructive:hover:not(:disabled) {
  color: #710d0d;
  box-shadow: inset 0 0 0 1px #710d0d;
}
.components-button.is-destructive:focus:not(:disabled) {
  color: var(--wp-admin-theme-color);
}
.components-button.is-destructive:active:not(:disabled) {
  background: #ccc;
}
.components-button.is-destructive.is-primary {
  color: #fff;
  background: #cc1818;
  box-shadow: inset 0 0 0 1px #cc1818;
}
.components-button.is-destructive.is-primary:hover:not(:disabled) {
  color: #fff;
  background: #710d0d;
  box-shadow: inset 0 0 0 1px #710d0d;
}
.components-button.is-link {
  margin: 0;
  padding: 0;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  background: none;
  outline: none;
  text-align: right;
  color: var(--wp-admin-theme-color);
  text-decoration: underline;
  transition-property: border, background, color;
  transition-duration: 0.05s;
  transition-timing-function: ease-in-out;
  height: auto;
}
@media (prefers-reduced-motion: reduce) {
  .components-button.is-link {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-button.is-link:focus {
  border-radius: 2px;
}
.components-button.is-link.is-destructive {
  color: #cc1818;
}
.components-button.is-link.is-destructive:active:not(:disabled), .components-button.is-link.is-destructive:hover:not(:disabled) {
  color: #710d0d;
  background: none;
}
.components-button.is-link.is-destructive:focus:not(:disabled) {
  color: var(--wp-admin-theme-color);
}
.components-button:not([aria-disabled=true]):active {
  color: inherit;
}
.components-button:disabled, .components-button[aria-disabled=true] {
  cursor: default;
  opacity: 0.3;
}
.components-button.is-busy, .components-button.is-secondary.is-busy, .components-button.is-secondary.is-busy:disabled, .components-button.is-secondary.is-busy[aria-disabled=true] {
  animation: components-button__busy-animation 2500ms infinite linear;
  opacity: 1;
  background-size: 100px 100%;
  /* stylelint-disable */
  background-image: linear-gradient(45deg, #fafafa 33%, #e0e0e0 33%, #e0e0e0 70%, #fafafa 70%);
  /* stylelint-enable */
}
.components-button.is-small {
  height: 24px;
  line-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}
.components-button.is-small.has-icon:not(.has-text) {
  padding: 0 8px;
  width: 24px;
}
.components-button.has-icon {
  padding: 6px;
  min-width: 36px;
  justify-content: center;
}
.components-button.has-icon .dashicon {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 2px;
  margin-left: 2px;
}
.components-button.has-icon.has-text {
  justify-content: left;
}
.components-button.has-icon.has-text svg {
  margin-left: 8px;
}
.components-button.has-icon.has-text .dashicon {
  margin-left: 10px;
}
.components-button.is-pressed {
  color: #fff;
  background: #1e1e1e;
}
.components-button.is-pressed:focus:not(:disabled) {
  box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-button.is-pressed:hover:not(:disabled) {
  color: #fff;
  background: #1e1e1e;
}
.components-button svg {
  fill: currentColor;
  outline: none;
}
.components-button .components-visually-hidden {
  height: auto;
}

@keyframes components-button__busy-animation {
  0% {
    background-position: 200px 0;
  }
}
.components-checkbox-control__input[type=checkbox] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  border: 1px solid #1e1e1e;
  margin-left: 12px;
  transition: none;
  border-radius: 2px;
  background: #fff;
  color: #1e1e1e;
  clear: none;
  cursor: pointer;
  display: inline-block;
  line-height: 0;
  margin: 0 0 0 4px;
  outline: 0;
  padding: 0 !important;
  text-align: center;
  vertical-align: top;
  width: 24px;
  height: 24px;
  -webkit-appearance: none;
          appearance: none;
  transition: 0.1s border-color ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-checkbox-control__input[type=checkbox] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-checkbox-control__input[type=checkbox] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-checkbox-control__input[type=checkbox]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-checkbox-control__input[type=checkbox]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-checkbox-control__input[type=checkbox]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-checkbox-control__input[type=checkbox]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-checkbox-control__input[type=checkbox]:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-checkbox-control__input[type=checkbox]:checked {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}
.components-checkbox-control__input[type=checkbox]:checked::-ms-check {
  opacity: 0;
}
.components-checkbox-control__input[type=checkbox]:checked::before, .components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
  margin: -3px -5px;
  color: #fff;
}
@media (min-width: 782px) {
  .components-checkbox-control__input[type=checkbox]:checked::before, .components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
    margin: -4px -5px 0 0;
  }
}
.components-checkbox-control__input[type=checkbox][aria-checked=mixed] {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}
.components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
  content: "";
  float: right;
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  /* stylelint-disable */
  font: normal 30px/1 dashicons;
  /* stylelint-enable */
  speak: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 782px) {
  .components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
    float: none;
    font-size: 21px;
  }
}
@media (min-width: 600px) {
  .components-checkbox-control__input[type=checkbox] {
    height: 20px;
    width: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .components-checkbox-control__input[type=checkbox] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-checkbox-control__input[type=checkbox]:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-checkbox-control__input[type=checkbox]:checked {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}
.components-checkbox-control__input[type=checkbox]:checked::-ms-check {
  opacity: 0;
}
.components-checkbox-control__input[type=checkbox]:checked::before {
  content: none;
}

.components-checkbox-control__input-container {
  position: relative;
  display: inline-block;
  margin-left: 12px;
  vertical-align: middle;
  width: 24px;
  height: 24px;
}
@media (min-width: 600px) {
  .components-checkbox-control__input-container {
    width: 20px;
    height: 20px;
  }
}

svg.components-checkbox-control__checked {
  fill: #fff;
  cursor: pointer;
  position: absolute;
  right: 0;
  top: 0;
  width: 24px;
  height: 24px;
  -webkit-user-select: none;
          user-select: none;
  pointer-events: none;
}
@media (min-width: 600px) {
  svg.components-checkbox-control__checked {
    right: -2px;
    top: -2px;
  }
}

.components-circular-option-picker {
  display: inline-block;
  width: 100%;
  min-width: 188px;
}
.components-circular-option-picker .components-circular-option-picker__custom-clear-wrapper {
  display: flex;
  justify-content: flex-end;
}
.components-circular-option-picker .components-circular-option-picker__swatches {
  margin-left: -12px;
}

.components-circular-option-picker__option-wrapper {
  display: inline-block;
  height: 28px;
  width: 28px;
  margin-left: 12px;
  margin-bottom: 12px;
  vertical-align: top;
  transform: scale(1);
  transition: 100ms transform ease;
}
@media (prefers-reduced-motion: reduce) {
  .components-circular-option-picker__option-wrapper {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-circular-option-picker__option-wrapper:hover {
  transform: scale(1.2);
}
.components-circular-option-picker__option-wrapper > div {
  height: 100%;
  width: 100%;
}

.components-circular-option-picker__option-wrapper::before {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  left: 1px;
  border-radius: 50%;
  z-index: -1;
  /* stylelint-disable-next-line function-url-quotes */
  background: url('data:image/svg+xml,%3Csvg width="28" height="28" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M6 8V6H4v2h2zM8 8V6h2v2H8zM10 16H8v-2h2v2zM12 16v-2h2v2h-2zM12 18v-2h-2v2H8v2h2v-2h2zM14 18v2h-2v-2h2zM16 18h-2v-2h2v2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z" fill="%23555D65"/%3E%3Cpath d="M18 18v2h-2v-2h2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z" fill="%23555D65"/%3E%3C/svg%3E');
}

.components-circular-option-picker__option {
  display: inline-block;
  vertical-align: top;
  height: 100%;
  width: 100%;
  border: none;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 14px;
  transition: 100ms box-shadow ease;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .components-circular-option-picker__option {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-circular-option-picker__option:hover {
  box-shadow: inset 0 0 0 14px !important;
}
.components-circular-option-picker__option.is-pressed {
  box-shadow: inset 0 0 0 4px;
  position: relative;
  z-index: 1;
  overflow: visible;
}
.components-circular-option-picker__option.is-pressed + svg {
  position: absolute;
  right: 2px;
  top: 2px;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}
.components-circular-option-picker__option::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  left: -1px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
}
.components-circular-option-picker__option:focus::after {
  content: "";
  border: 2px solid #757575;
  width: 32px;
  height: 32px;
  position: absolute;
  top: -2px;
  right: -2px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #fff;
}
.components-circular-option-picker__option.components-button:focus {
  background-color: transparent;
  box-shadow: inset 0 0 0 14px;
  outline: none;
}

.components-circular-option-picker__button-action .components-circular-option-picker__option {
  color: #fff;
  background: #fff;
}

.components-circular-option-picker__dropdown-link-action {
  margin-left: 16px;
}
.components-circular-option-picker__dropdown-link-action .components-button {
  line-height: 22px;
}

.components-color-edit__color-option-main-area {
  display: flex;
  align-items: center;
}
.components-color-edit__color-option-main-area div.components-circular-option-picker__option-wrapper {
  display: block;
  margin: 8px;
}

.components-color-edit__color-option.is-hover {
  background: #e0e0e0;
}

.components-color-edit__cancel-button {
  float: left;
}

.components-color-edit__color-option-color-name {
  width: 100%;
}

.components-color-edit__label-and-insert-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.components-color-edit__insert-button {
  margin-top: -8px;
}

.components-color-edit__hidden-control {
  position: relative;
  right: -9999px;
}

.components-color-edit__color-option-color-name-input .components-base-control__field {
  margin-bottom: 0;
  margin-left: 8px;
}

.components-color-edit__slug-input {
  margin-right: 8px;
}

.components-color-edit__reset-button {
  float: left;
}

.component-color-indicator {
  width: 25px;
  height: 16px;
  margin-right: 0.8rem;
  border: 1px solid #dadada;
  display: inline-block;
}
.component-color-indicator + .component-color-indicator {
  margin-right: 0.5rem;
}

/**
 * Parts of this source were derived and modified from react-color,
 * released under the MIT license.
 *
 * https://github.com/casesandberg/react-color/
 *
 * Copyright (c) 2015 Case Sandberg
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
.components-color-picker {
  width: 100%;
}
.components-color-picker * {
  box-sizing: border-box;
}

.components-color-picker__saturation {
  width: 100%;
  padding-bottom: 55%;
  position: relative;
}

.components-color-picker__body {
  padding: 16px 16px 12px;
}

.components-color-picker__controls {
  display: flex;
}

.components-color-picker__saturation-pointer,
.components-color-picker__hue-pointer,
.components-color-picker__alpha-pointer {
  padding: 0;
  position: absolute;
  cursor: pointer;
  box-shadow: none;
  border: none;
}

/* CURRENT COLOR COMPONENT */
.components-color-picker__swatch {
  margin-left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, transparent 75%, #ddd 75%), linear-gradient(45deg, transparent 75%, #ddd 75%);
  background-size: 10px 10px;
  background-position: 100% 0, 100% 5px, 5px -5px, -5px 0;
}
.is-alpha-disabled .components-color-picker__swatch {
  width: 12px;
  height: 12px;
  margin-top: 0;
}

.components-color-picker__active {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* SATURATION COMPONENT */
.components-color-picker__saturation-color,
.components-color-picker__saturation-white,
.components-color-picker__saturation-black {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
}

.components-color-picker__saturation-color {
  overflow: visible;
}

.components-color-picker__saturation-white {
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.components-color-picker__saturation-black {
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.components-button.components-color-picker__saturation-pointer {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  background-color: transparent;
  transform: translate(50%, -50%);
  box-shadow: 0 0 0 1px #fff, inset 0 0 0 1px #000, 0 0 0 2px #000;
}
.components-button.components-color-picker__saturation-pointer:focus:not(:disabled) {
  box-shadow: 0 0 0 2px #fff, inset 0 0 0 1px #000, 0 0 0 3px #000;
}

/* HUE & ALPHA BARS */
.components-color-picker__toggles {
  flex: 1;
}

.components-color-picker__alpha {
  background-image: linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, transparent 75%, #ddd 75%), linear-gradient(45deg, transparent 75%, #ddd 75%);
  background-size: 10px 10px;
  background-position: 100% 0, 100% 5px, 5px -5px, -5px 0;
}

.components-color-picker__hue-gradient,
.components-color-picker__alpha-gradient {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
}

.components-color-picker__hue,
.components-color-picker__alpha {
  height: 12px;
  position: relative;
}

.is-alpha-enabled .components-color-picker__hue {
  margin-bottom: 8px;
}

.components-color-picker__hue-bar,
.components-color-picker__alpha-bar {
  position: relative;
  margin: 0 3px;
  height: 100%;
  padding: 0 2px;
}

.components-color-picker__hue-gradient {
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}

.components-color-picker__hue-pointer,
.components-color-picker__alpha-pointer {
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
  background: #fff;
  transform: translate(7px, -1px);
}

.components-color-picker__hue-pointer,
.components-color-picker__saturation-pointer {
  transition: box-shadow 0.1s linear;
}
@media (prefers-reduced-motion: reduce) {
  .components-color-picker__hue-pointer,
.components-color-picker__saturation-pointer {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-color-picker__saturation-pointer:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color), 0 0 5px 0 var(--wp-admin-theme-color), inset 0 0 1px 1px rgba(0, 0, 0, 0.3), 0 0 1px 2px rgba(0, 0, 0, 0.4);
}

.components-color-picker__hue-pointer:focus,
.components-color-picker__alpha-pointer:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 2px var(--wp-admin-theme-color), 0 0 3px 0 var(--wp-admin-theme-color);
  outline: 2px solid transparent;
  outline-offset: -2px;
}

/* INPUTS COMPONENT */
.components-color-picker__inputs-wrapper {
  margin: 0 -4px;
  padding-top: 16px;
  display: flex;
  align-items: flex-end;
  min-width: 255px;
}
.components-color-picker__inputs-wrapper fieldset {
  flex: 1;
  border: none;
  margin: 0;
  padding: 0;
}
.components-color-picker__inputs-wrapper .components-color-picker__inputs-fields .components-text-control__input[type=number] {
  padding: 6px 3px;
  margin: 0;
}

.components-color-picker__inputs-field {
  width: 100%;
}

.components-color-picker__inputs-fields {
  display: flex;
  direction: ltr;
  flex-grow: 1;
  margin-left: 4px;
}
.components-color-picker__inputs-fields .components-base-control + .components-base-control {
  margin-top: 0;
}
.components-color-picker__inputs-fields .components-base-control__field {
  margin: 0 2px;
}

.components-color-picker__inputs-toggle {
  height: 30px;
  padding: 0 5px;
}

.components-combobox-control {
  width: 100%;
}

input.components-combobox-control__input[type=text] {
  width: 100%;
  border: none;
  box-shadow: none;
  font-size: 16px;
  padding: 2px;
  margin: 0;
  line-height: inherit;
  min-height: auto;
}
@media (min-width: 600px) {
  input.components-combobox-control__input[type=text] {
    font-size: 13px;
  }
}
input.components-combobox-control__input[type=text]:focus {
  outline: none;
  box-shadow: none;
}

.components-combobox-control__suggestions-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  margin: 0 0 8px 0;
  padding: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .components-combobox-control__suggestions-container {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-combobox-control__suggestions-container {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-combobox-control__suggestions-container:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-combobox-control__suggestions-container::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-combobox-control__suggestions-container::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-combobox-control__suggestions-container:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-combobox-control__suggestions-container:focus-within {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}

.components-combobox-control__reset.components-button {
  display: flex;
  height: 24px;
  min-width: 24px;
  padding: 0;
}

.components-color-list-picker,
.components-color-list-picker__swatch-button {
  width: 100%;
}

.components-custom-gradient-picker__gradient-bar:not(.has-gradient) {
  opacity: 0.4;
}

.components-custom-gradient-picker__gradient-bar {
  margin-top: 12px;
  width: 100%;
  height: 36px;
  border-radius: 36px;
  margin-bottom: 12px;
  padding-right: 6px;
  padding-left: 30px;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__markers-container {
  position: relative;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point {
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  top: 6px;
  min-width: 24px;
  width: 24px;
  height: 24px;
  position: relative;
  color: #1e1e1e;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point svg {
  height: 100%;
  width: 100%;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button {
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #fff;
  border-radius: 50%;
  height: 24px;
  width: 24px;
  padding: 0;
  position: absolute;
  top: 6px;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button:focus, .components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button.is-active {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px #1e1e1e;
}

.components-custom-gradient-picker__color-picker-popover .components-custom-gradient-picker__remove-control-point {
  margin-right: auto;
  margin-left: auto;
  display: block;
  margin-bottom: 8px;
}

.components-custom-gradient-picker__inserter {
  width: 100%;
}

.components-custom-gradient-picker__liner-gradient-indicator {
  display: inline-block;
  flex: 0 auto;
  width: 20px;
  height: 20px;
}

.components-custom-gradient-picker .components-custom-gradient-picker__ui-line {
  margin-bottom: 16px;
}
.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-angle-picker,
.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-custom-gradient-picker__type-picker {
  margin-bottom: 0;
}

.components-custom-gradient-picker .components-custom-gradient-picker__toolbar {
  border: none;
}
.components-custom-gradient-picker .components-custom-gradient-picker__toolbar > div + div {
  margin-right: 1px;
}
.components-custom-gradient-picker .components-custom-gradient-picker__toolbar button.is-pressed > svg {
  background: #fff;
  border: 1px solid #949494;
  border-radius: 2px;
}

.components-custom-select-control {
  position: relative;
}

.components-custom-select-control__label {
  display: block;
  margin-bottom: 8px;
}

.components-custom-select-control__button {
  border: 1px solid #757575;
  border-radius: 2px;
  min-height: 30px;
  min-width: 130px;
  position: relative;
  text-align: right;
}
.components-custom-select-control__button.components-custom-select-control__button {
  padding-left: 24px;
}
.components-custom-select-control__button:focus:not(:disabled) {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
}
.components-custom-select-control__button .components-custom-select-control__button-icon {
  height: 100%;
  padding: 0;
  position: absolute;
  left: 0;
  top: 0;
}

.components-custom-select-control__menu {
  border: 1px solid #1e1e1e;
  background-color: #fff;
  border-radius: 2px;
  outline: none;
  transition: none;
  max-height: 400px;
  min-width: 100%;
  overflow: auto;
  padding: 0;
  position: absolute;
  z-index: 1000000;
}
.components-custom-select-control__menu[aria-hidden=true] {
  display: none;
}

.components-custom-select-control__item {
  align-items: center;
  display: flex;
  list-style-type: none;
  padding: 8px;
  cursor: default;
  line-height: 28px;
}
.components-custom-select-control__item.is-highlighted {
  background: #ddd;
}
.components-custom-select-control__item .components-custom-select-control__item-icon {
  margin-left: 0;
  margin-right: auto;
}
.components-custom-select-control__item:last-child {
  margin-bottom: 0;
}

/**
 * Parts of this source were derived and modified from react-dates,
 * released under the MIT license.
 *
 * https://github.com/airbnb/react-dates
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 Airbnb
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
.PresetDateRangePicker_panel {
  padding: 0 22px 11px;
}

.PresetDateRangePicker_button {
  position: relative;
  height: 100%;
  text-align: center;
  background: 0 0;
  border: 2px solid #00a699;
  color: #00a699;
  padding: 4px 12px;
  margin-right: 8px;
  font: inherit;
  font-weight: 700;
  line-height: normal;
  overflow: visible;
  box-sizing: border-box;
  cursor: pointer;
}

.PresetDateRangePicker_button:active {
  outline: 0;
}

.PresetDateRangePicker_button__selected {
  color: #fff;
  background: #00a699;
}

.SingleDatePickerInput {
  display: inline-block;
  background-color: #fff;
}

.SingleDatePickerInput__withBorder {
  border-radius: 2px;
  border: 1px solid #dbdbdb;
}

.SingleDatePickerInput__rtl {
  direction: rtl;
}

.SingleDatePickerInput__disabled {
  background-color: #f2f2f2;
}

.SingleDatePickerInput__block {
  display: block;
}

.SingleDatePickerInput__showClearDate {
  padding-right: 30px;
}

.SingleDatePickerInput_clearDate {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  padding: 10px;
  margin: 0 10px 0 5px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.SingleDatePickerInput_clearDate__default:focus,
.SingleDatePickerInput_clearDate__default:hover {
  background: #dbdbdb;
  border-radius: 50%;
}

.SingleDatePickerInput_clearDate__small {
  padding: 6px;
}

.SingleDatePickerInput_clearDate__hide {
  visibility: hidden;
}

.SingleDatePickerInput_clearDate_svg {
  fill: #82888a;
  height: 12px;
  width: 15px;
  vertical-align: middle;
}

.SingleDatePickerInput_clearDate_svg__small {
  height: 9px;
}

.SingleDatePickerInput_calendarIcon {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  padding: 10px;
  margin: 0 5px 0 10px;
}

.SingleDatePickerInput_calendarIcon_svg {
  fill: #82888a;
  height: 15px;
  width: 14px;
  vertical-align: middle;
}

.SingleDatePicker {
  position: relative;
  display: inline-block;
}

.SingleDatePicker__block {
  display: block;
}

.SingleDatePicker_picker {
  z-index: 1;
  background-color: #fff;
  position: absolute;
}

.SingleDatePicker_picker__rtl {
  direction: rtl;
}

.SingleDatePicker_picker__directionLeft {
  left: 0;
}

.SingleDatePicker_picker__directionRight {
  right: 0;
}

.SingleDatePicker_picker__portal {
  background-color: rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.SingleDatePicker_picker__fullScreenPortal {
  background-color: #fff;
}

.SingleDatePicker_closeButton {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  padding: 15px;
  z-index: 2;
}

.SingleDatePicker_closeButton:focus,
.SingleDatePicker_closeButton:hover {
  color: #b0b3b4;
  text-decoration: none;
}

.SingleDatePicker_closeButton_svg {
  height: 15px;
  width: 15px;
  fill: #cacccd;
}

.DayPickerKeyboardShortcuts_buttonReset {
  background: 0 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
}

.DayPickerKeyboardShortcuts_buttonReset:active {
  outline: 0;
}

.DayPickerKeyboardShortcuts_show {
  width: 22px;
  position: absolute;
  z-index: 2;
}

.DayPickerKeyboardShortcuts_show__bottomRight {
  border-top: 26px solid transparent;
  border-right: 33px solid #00a699;
  bottom: 0;
  right: 0;
}

.DayPickerKeyboardShortcuts_show__bottomRight:hover {
  border-right: 33px solid #008489;
}

.DayPickerKeyboardShortcuts_show__topRight {
  border-bottom: 26px solid transparent;
  border-right: 33px solid #00a699;
  top: 0;
  right: 0;
}

.DayPickerKeyboardShortcuts_show__topRight:hover {
  border-right: 33px solid #008489;
}

.DayPickerKeyboardShortcuts_show__topLeft {
  border-bottom: 26px solid transparent;
  border-left: 33px solid #00a699;
  top: 0;
  left: 0;
}

.DayPickerKeyboardShortcuts_show__topLeft:hover {
  border-left: 33px solid #008489;
}

.DayPickerKeyboardShortcuts_showSpan {
  color: #fff;
  position: absolute;
}

.DayPickerKeyboardShortcuts_showSpan__bottomRight {
  bottom: 0;
  right: -28px;
}

.DayPickerKeyboardShortcuts_showSpan__topRight {
  top: 1px;
  right: -28px;
}

.DayPickerKeyboardShortcuts_showSpan__topLeft {
  top: 1px;
  left: -28px;
}

.DayPickerKeyboardShortcuts_panel {
  overflow: auto;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 2px;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 2;
  padding: 22px;
  margin: 33px;
}

.DayPickerKeyboardShortcuts_title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.DayPickerKeyboardShortcuts_list {
  list-style: none;
  padding: 0;
  font-size: 14px;
}

.DayPickerKeyboardShortcuts_close {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
}

.DayPickerKeyboardShortcuts_close:active {
  outline: 0;
}

.DayPickerKeyboardShortcuts_closeSvg {
  height: 15px;
  width: 15px;
  fill: #cacccd;
}

.DayPickerKeyboardShortcuts_closeSvg:focus,
.DayPickerKeyboardShortcuts_closeSvg:hover {
  fill: #82888a;
}

.CalendarDay {
  box-sizing: border-box;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}

.CalendarDay:active {
  outline: 0;
}

.CalendarDay__defaultCursor {
  cursor: default;
}

.CalendarDay__default {
  border: 1px solid #e4e7e7;
  color: #484848;
  background: #fff;
}

.CalendarDay__default:hover {
  background: #e4e7e7;
  border: 1px double #e4e7e7;
  color: inherit;
}

.CalendarDay__hovered_offset {
  background: #f4f5f5;
  border: 1px double #e4e7e7;
  color: inherit;
}

.CalendarDay__outside {
  border: 0;
  background: #fff;
  color: #484848;
}

.CalendarDay__outside:hover {
  border: 0;
}

.CalendarDay__blocked_minimum_nights {
  background: #fff;
  border: 1px solid #eceeee;
  color: #cacccd;
}

.CalendarDay__blocked_minimum_nights:active,
.CalendarDay__blocked_minimum_nights:hover {
  background: #fff;
  color: #cacccd;
}

.CalendarDay__highlighted_calendar {
  background: #ffe8bc;
  color: #484848;
}

.CalendarDay__highlighted_calendar:active,
.CalendarDay__highlighted_calendar:hover {
  background: #ffce71;
  color: #484848;
}

.CalendarDay__selected_span {
  background: #66e2da;
  border: 1px solid #33dacd;
  color: #fff;
}

.CalendarDay__selected_span:active,
.CalendarDay__selected_span:hover {
  background: #33dacd;
  border: 1px solid #33dacd;
  color: #fff;
}

.CalendarDay__last_in_range {
  border-right: #00a699;
}

.CalendarDay__selected,
.CalendarDay__selected:active,
.CalendarDay__selected:hover {
  background: #00a699;
  border: 1px solid #00a699;
  color: #fff;
}

.CalendarDay__hovered_span,
.CalendarDay__hovered_span:hover {
  background: #b2f1ec;
  border: 1px solid #80e8e0;
  color: #007a87;
}

.CalendarDay__hovered_span:active {
  background: #80e8e0;
  border: 1px solid #80e8e0;
  color: #007a87;
}

.CalendarDay__blocked_calendar,
.CalendarDay__blocked_calendar:active,
.CalendarDay__blocked_calendar:hover {
  background: #cacccd;
  border: 1px solid #cacccd;
  color: #82888a;
}

.CalendarDay__blocked_out_of_range,
.CalendarDay__blocked_out_of_range:active,
.CalendarDay__blocked_out_of_range:hover {
  background: #fff;
  border: 1px solid #e4e7e7;
  color: #cacccd;
}

.CalendarMonth {
  background: #fff;
  text-align: center;
  vertical-align: top;
  -webkit-user-select: none;
  user-select: none;
}

.CalendarMonth_table {
  border-collapse: collapse;
  border-spacing: 0;
}

.CalendarMonth_verticalSpacing {
  border-collapse: separate;
}

.CalendarMonth_caption {
  color: #484848;
  font-size: 18px;
  text-align: center;
  padding-top: 22px;
  padding-bottom: 37px;
  caption-side: initial;
}

.CalendarMonth_caption__verticalScrollable {
  padding-top: 12px;
  padding-bottom: 7px;
}

.CalendarMonthGrid {
  background: #fff;
  text-align: left;
  z-index: 0;
}

.CalendarMonthGrid__animating {
  z-index: 1;
}

.CalendarMonthGrid__horizontal {
  position: absolute;
  left: 0;
}

.CalendarMonthGrid__vertical {
  margin: 0 auto;
}

.CalendarMonthGrid__vertical_scrollable {
  margin: 0 auto;
  overflow-y: scroll;
}

.CalendarMonthGrid_month__horizontal {
  display: inline-block;
  vertical-align: top;
  min-height: 100%;
}

.CalendarMonthGrid_month__hideForAnimation {
  position: absolute;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

.CalendarMonthGrid_month__hidden {
  visibility: hidden;
}

.DayPickerNavigation {
  position: relative;
  z-index: 2;
}

.DayPickerNavigation__horizontal {
  height: 0;
}

.DayPickerNavigation__verticalDefault {
  position: absolute;
  width: 100%;
  height: 52px;
  bottom: 0;
  left: 0;
}

.DayPickerNavigation__verticalScrollableDefault {
  position: relative;
}

.DayPickerNavigation_button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border: 0;
  padding: 0;
  margin: 0;
}

.DayPickerNavigation_button__default {
  border: 1px solid #e4e7e7;
  background-color: #fff;
  color: #757575;
}

.DayPickerNavigation_button__default:focus,
.DayPickerNavigation_button__default:hover {
  border: 1px solid #c4c4c4;
}

.DayPickerNavigation_button__default:active {
  background: #f2f2f2;
}

.DayPickerNavigation_button__horizontalDefault {
  position: absolute;
  top: 18px;
  line-height: 0.78;
  border-radius: 3px;
  padding: 6px 9px;
}

.DayPickerNavigation_leftButton__horizontalDefault {
  left: 22px;
}

.DayPickerNavigation_rightButton__horizontalDefault {
  right: 22px;
}

.DayPickerNavigation_button__verticalDefault {
  padding: 5px;
  background: #fff;
  box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  display: inline-block;
  height: 100%;
  width: 50%;
}

.DayPickerNavigation_nextButton__verticalDefault {
  border-left: 0;
}

.DayPickerNavigation_nextButton__verticalScrollableDefault {
  width: 100%;
}

.DayPickerNavigation_svg__horizontal {
  height: 19px;
  width: 19px;
  fill: #82888a;
  display: block;
}

.DayPickerNavigation_svg__vertical {
  height: 42px;
  width: 42px;
  fill: #484848;
  display: block;
}

.DayPicker {
  background: #fff;
  position: relative;
  text-align: left;
}

.DayPicker__horizontal {
  background: #fff;
}

.DayPicker__verticalScrollable {
  height: 100%;
}

.DayPicker__hidden {
  visibility: hidden;
}

.DayPicker__withBorder {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.07);
  border-radius: 3px;
}

.DayPicker_portal__horizontal {
  box-shadow: none;
  position: absolute;
  left: 50%;
  top: 50%;
}

.DayPicker_portal__vertical {
  position: initial;
}

.DayPicker_focusRegion {
  outline: 0;
}

.DayPicker_calendarInfo__horizontal,
.DayPicker_wrapper__horizontal {
  display: inline-block;
  vertical-align: top;
}

.DayPicker_weekHeaders {
  position: relative;
}

.DayPicker_weekHeaders__horizontal {
  margin-left: 13px;
}

.DayPicker_weekHeader {
  color: #757575;
  position: absolute;
  top: 62px;
  z-index: 2;
  text-align: left;
  padding: 0 !important;
}

.DayPicker_weekHeader__vertical {
  left: 50%;
}

.DayPicker_weekHeader__verticalScrollable {
  top: 0;
  display: table-row;
  border-bottom: 1px solid #dbdbdb;
  background: #fff;
  margin-left: 0;
  left: 0;
  width: 100%;
  text-align: center;
}

.DayPicker_weekHeader_ul {
  list-style: none;
  margin: 1px 0;
  padding-left: 0;
  padding-right: 0;
  font-size: 14px;
}

.DayPicker_weekHeader_li {
  display: inline-block;
  text-align: center;
  margin: 0 1px;
}

.DayPicker_transitionContainer {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

.DayPicker_transitionContainer__horizontal {
  transition: height 0.2s ease-in-out;
}

.DayPicker_transitionContainer__vertical {
  width: 100%;
}

.DayPicker_transitionContainer__verticalScrollable {
  padding-top: 20px;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  overflow-y: scroll;
}

.DateInput {
  margin: 0;
  padding: 0;
  background: #fff;
  position: relative;
  display: inline-block;
  width: 130px;
  vertical-align: middle;
}

.DateInput__small {
  width: 97px;
}

.DateInput__block {
  width: 100%;
}

.DateInput__disabled {
  background: #f2f2f2;
  color: #dbdbdb;
}

.DateInput_input {
  font-weight: 200;
  font-size: 19px;
  line-height: 24px;
  color: #484848;
  background-color: #fff;
  width: 100%;
  padding: 11px 11px 9px;
  border: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 2px solid transparent;
  border-left: 0;
  border-radius: 0;
}

.DateInput_input__small {
  font-size: 15px;
  line-height: 18px;
  letter-spacing: 0.2px;
  padding: 7px 7px 5px;
}

.DateInput_input__regular {
  font-weight: auto;
}

.DateInput_input__readOnly {
  -webkit-user-select: none;
  user-select: none;
}

.DateInput_input__focused {
  outline: 0;
  background: #fff;
  border: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 2px solid #008489;
  border-left: 0;
}

.DateInput_input__disabled {
  background: #f2f2f2;
  font-style: italic;
}

.DateInput_screenReaderMessage {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.DateInput_fang {
  position: absolute;
  width: 20px;
  height: 10px;
  left: 22px;
  z-index: 2;
}

.DateInput_fangShape {
  fill: #fff;
}

.DateInput_fangStroke {
  stroke: #dbdbdb;
  fill: transparent;
}

.DateRangePickerInput {
  background-color: #fff;
  display: inline-block;
}

.DateRangePickerInput__disabled {
  background: #f2f2f2;
}

.DateRangePickerInput__withBorder {
  border-radius: 2px;
  border: 1px solid #dbdbdb;
}

.DateRangePickerInput__rtl {
  direction: rtl;
}

.DateRangePickerInput__block {
  display: block;
}

.DateRangePickerInput__showClearDates {
  padding-right: 30px;
}

.DateRangePickerInput_arrow {
  display: inline-block;
  vertical-align: middle;
  color: #484848;
}

.DateRangePickerInput_arrow_svg {
  vertical-align: middle;
  fill: #484848;
  height: 24px;
  width: 24px;
}

.DateRangePickerInput_clearDates {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  padding: 10px;
  margin: 0 10px 0 5px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.DateRangePickerInput_clearDates__small {
  padding: 6px;
}

.DateRangePickerInput_clearDates_default:focus,
.DateRangePickerInput_clearDates_default:hover {
  background: #dbdbdb;
  border-radius: 50%;
}

.DateRangePickerInput_clearDates__hide {
  visibility: hidden;
}

.DateRangePickerInput_clearDates_svg {
  fill: #82888a;
  height: 12px;
  width: 15px;
  vertical-align: middle;
}

.DateRangePickerInput_clearDates_svg__small {
  height: 9px;
}

.DateRangePickerInput_calendarIcon {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  padding: 10px;
  margin: 0 5px 0 10px;
}

.DateRangePickerInput_calendarIcon_svg {
  fill: #82888a;
  height: 15px;
  width: 14px;
  vertical-align: middle;
}

.DateRangePicker {
  position: relative;
  display: inline-block;
}

.DateRangePicker__block {
  display: block;
}

.DateRangePicker_picker {
  z-index: 1;
  background-color: #fff;
  position: absolute;
}

.DateRangePicker_picker__rtl {
  direction: rtl;
}

.DateRangePicker_picker__directionLeft {
  left: 0;
}

.DateRangePicker_picker__directionRight {
  right: 0;
}

.DateRangePicker_picker__portal {
  background-color: rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.DateRangePicker_picker__fullScreenPortal {
  background-color: #fff;
}

.DateRangePicker_closeButton {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  padding: 15px;
  z-index: 2;
}

.DateRangePicker_closeButton:focus,
.DateRangePicker_closeButton:hover {
  color: #b0b3b4;
  text-decoration: none;
}

.DateRangePicker_closeButton_svg {
  height: 15px;
  width: 15px;
  fill: #cacccd;
}
.components-datetime {
  padding: 16px;
}
.components-panel__body .components-datetime {
  padding: 0;
}
.components-datetime .components-datetime__calendar-help {
  padding: 16px;
}
.components-datetime .components-datetime__calendar-help h4 {
  margin: 0;
}
.components-datetime .components-datetime__buttons {
  display: flex;
  justify-content: space-between;
}
.components-datetime .components-datetime__date-help-toggle {
  display: block;
  margin-right: auto;
}
.components-datetime fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.components-datetime select,
.components-datetime input {
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
}
@media (prefers-reduced-motion: reduce) {
  .components-datetime select,
.components-datetime input {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-datetime select,
.components-datetime input[type=number],
.components-datetime .components-button {
  height: 30px;
  margin-top: 0;
  margin-bottom: 0;
}

.components-datetime__date {
  min-height: 236px;
  border-top: 1px solid #ddd;
}
.components-datetime__date .DayPickerNavigation_leftButton__horizontalDefault {
  left: 13px;
}
.components-datetime__date .CalendarMonth_caption {
  font-size: 13px;
}
.components-datetime__date .CalendarMonth_table {
  border-collapse: separate;
  border-spacing: 2px;
}
.components-datetime__date .CalendarDay {
  font-size: 13px;
  border: none;
  border-radius: 50%;
  text-align: center;
}
.components-datetime__date .CalendarDay:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px #fff;
  outline: 2px solid transparent;
}
.components-datetime__date .CalendarDay__selected {
  background: var(--wp-admin-theme-color);
  border: 2px solid transparent;
}
.components-datetime__date .CalendarDay__selected:hover {
  background: var(--wp-admin-theme-color-darker-20);
}
.components-datetime__date .CalendarDay__selected:focus {
  box-shadow: inset 0 0 0 1px #fff;
}
.components-datetime__date .DayPickerNavigation_button__horizontalDefault {
  padding: 2px 8px;
  top: 20px;
}
.components-datetime__date .DayPickerNavigation_button__horizontalDefault:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-datetime__date .DayPicker_weekHeader {
  top: 50px;
}
.components-datetime__date .DayPicker_weekHeader .DayPicker_weekHeader_ul {
  margin: 1px;
  padding-right: 0;
  padding-left: 0;
}
.components-datetime__date.is-description-visible .DayPicker {
  visibility: hidden;
}

.components-datetime__date .CalendarDay .components-datetime__date__day {
  height: 100%;
  display: flex;
  justify-content: center;
  align-content: center;
  flex-direction: column;
  position: relative;
}
.components-datetime__date .CalendarDay .components-datetime__date__day.has-events::before {
  content: " ";
  width: 4px;
  height: 4px;
  border-radius: 2px;
  position: absolute;
  right: 50%;
  margin-right: -2px;
  bottom: 0;
  background-color: #fff;
}

.components-datetime__date .CalendarDay:not(.CalendarDay__selected) .components-datetime__date__day.has-events::before {
  background: var(--wp-admin-theme-color);
}

.components-datetime__time {
  padding-bottom: 16px;
}
.components-datetime__time fieldset {
  position: relative;
  margin-bottom: 0.5em;
}
.components-datetime__time fieldset + fieldset {
  margin-bottom: 0;
}
.components-datetime__time .components-datetime__time-field-am-pm fieldset {
  margin-top: 0;
}
.components-datetime__time .components-datetime__time-wrapper {
  display: flex;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-separator {
  display: inline-block;
  padding: 0 0 0 3px;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field-time {
  direction: ltr;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select {
  margin-left: 4px;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select:focus {
  position: relative;
  z-index: 1;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number] {
  padding: 2px;
  margin-left: 4px;
  text-align: center;
  -moz-appearance: textfield;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]:focus {
  position: relative;
  z-index: 1;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.components-datetime__time.is-12-hour .components-datetime__time-field-day input {
  margin: -4px 0 0 !important;
  border-radius: 0 2px 2px 0 !important;
}
.components-datetime__time.is-12-hour .components-datetime__time-field-year input {
  border-radius: 2px 0 0 2px !important;
}

.components-datetime__timezone {
  line-height: 30px;
  margin-right: 4px;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

.components-datetime__time-legend {
  font-weight: 600;
  margin-top: 0.5em;
}
.components-datetime__time-legend.invisible {
  position: absolute;
  top: -999em;
  right: -999em;
}

.components-datetime__time-field-hours-input,
.components-datetime__time-field-minutes-input,
.components-datetime__time-field-day-input {
  width: 35px;
}

.components-datetime__time-field-year-input {
  width: 55px;
}

.components-datetime__time-field-month-select {
  max-width: 145px;
}

.components-popover .components-datetime__date {
  padding-right: 4px;
}

.block-editor-dimension-control .components-base-control__field {
  display: flex;
  align-items: center;
}
.block-editor-dimension-control .components-base-control__label {
  display: flex;
  align-items: center;
  margin-left: 1em;
  margin-bottom: 0;
}
.block-editor-dimension-control .components-base-control__label .dashicon {
  margin-left: 0.5em;
}
.block-editor-dimension-control.is-manual .components-base-control__label {
  width: 10em;
}

body.is-dragging-components-draggable {
  cursor: move;
  /* Fallback for IE/Edge < 14 */
  cursor: grabbing !important;
}

.components-draggable__invisible-drag-image {
  position: fixed;
  right: -1000px;
  height: 50px;
  width: 50px;
}

.components-draggable__clone {
  position: fixed;
  padding: 0;
  background: transparent;
  pointer-events: none;
  z-index: 1000000000;
}

.components-drop-zone {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 40;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s opacity, 0.3s background-color, 0s visibility 0.3s;
  border: 2px solid var(--wp-admin-theme-color);
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .components-drop-zone {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-drop-zone.is-active {
  opacity: 1;
  visibility: visible;
  transition: 0.3s opacity, 0.3s background-color;
}
@media (prefers-reduced-motion: reduce) {
  .components-drop-zone.is-active {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-drop-zone.is-dragging-over-element {
  background-color: var(--wp-admin-theme-color);
}

.components-drop-zone__content {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 50;
  transform: translateY(-50%);
  width: 100%;
  text-align: center;
  color: #fff;
  transition: transform 0.2s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-drop-zone__content {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-drop-zone.is-dragging-over-element .components-drop-zone__content {
  transform: translateY(-50%) scale(1.05);
}

.components-drop-zone__content-icon,
.components-drop-zone__content-text {
  display: block;
}

.components-drop-zone__content-icon {
  margin: 0 auto;
  line-height: 0;
  fill: currentColor;
}

.components-drop-zone__content-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.components-dropdown {
  display: inline-block;
}

.components-dropdown__content .components-popover__content > div {
  padding: 12px;
}

.components-dropdown-menu__popover .components-popover__content {
  min-width: 200px;
}

.components-dropdown-menu__menu {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  line-height: 1.4;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item,
.components-dropdown-menu__menu .components-menu-item {
  width: 100%;
  padding: 6px;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator,
.components-dropdown-menu__menu .components-menu-item.has-separator {
  margin-top: 6px;
  position: relative;
  overflow: visible;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator::before,
.components-dropdown-menu__menu .components-menu-item.has-separator::before {
  display: block;
  content: "";
  box-sizing: content-box;
  background-color: #ddd;
  position: absolute;
  top: -3px;
  right: 0;
  left: 0;
  height: 1px;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-active svg,
.components-dropdown-menu__menu .components-menu-item.is-active svg {
  color: #fff;
  background: #1e1e1e;
  box-shadow: 0 0 0 1px #1e1e1e;
  border-radius: 1px;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item > svg,
.components-dropdown-menu__menu .components-menu-item > svg {
  border-radius: 2px;
  width: 24px;
  height: 24px;
}
.components-dropdown-menu__menu .components-menu-item__button,
.components-dropdown-menu__menu .components-menu-item__button.components-button {
  min-height: 36px;
  height: auto;
  text-align: right;
  padding-right: 8px;
  padding-left: 8px;
}
.components-dropdown-menu__menu .components-menu-group {
  padding: 12px;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: -12px;
  margin-left: -12px;
}
.components-dropdown-menu__menu .components-menu-group:first-child {
  margin-top: -12px;
}
.components-dropdown-menu__menu .components-menu-group:last-child {
  margin-bottom: -12px;
}
.components-dropdown-menu__menu .components-menu-group + .components-menu-group {
  margin-top: 0;
  border-top: 1px solid #ccc;
  padding: 12px;
}
.is-alternate .components-dropdown-menu__menu .components-menu-group + .components-menu-group {
  border-color: #1e1e1e;
}

.components-font-size-picker__controls {
  max-width: 248px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.components-font-size-picker__controls .components-unit-control-wrapper {
  margin-left: 8px;
}
.components-font-size-picker__controls .components-unit-control-wrapper .components-input-control__label {
  font-weight: 300;
  padding-bottom: 0 !important;
  margin-bottom: 8px !important;
}
.components-font-size-picker__controls .components-custom-select-control__button {
  min-width: 120px;
}
.components-font-size-picker__controls .components-font-size-picker__number {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  display: inline-block;
  font-weight: 500;
  height: 30px;
  margin-bottom: 0;
  margin-right: 0;
  margin-left: 8px;
  margin-top: 8px;
  width: 54px;
}
@media (prefers-reduced-motion: reduce) {
  .components-font-size-picker__controls .components-font-size-picker__number {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-font-size-picker__controls .components-font-size-picker__number {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-font-size-picker__controls .components-font-size-picker__number:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-font-size-picker__controls .components-font-size-picker__number::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-font-size-picker__controls .components-font-size-picker__number::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-font-size-picker__controls .components-font-size-picker__number:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-font-size-picker__controls .components-font-size-picker__number[value=""] + .components-button {
  cursor: default;
  opacity: 0.3;
  pointer-events: none;
}
.components-font-size-picker__controls .components-font-size-picker__number-container {
  display: flex;
  flex-direction: column;
}
.components-font-size-picker__controls .components-font-size-picker__select {
  margin-left: 8px;
}
.components-font-size-picker__controls .components-color-palette__clear {
  height: 30px;
  margin-top: 26px;
}

.components-font-size-picker__custom-input .components-range-control__slider + .dashicon {
  width: 30px;
  height: 30px;
}

.components-font-size-picker {
  border: 0;
  padding: 0;
  margin: 0;
}

.components-form-toggle {
  position: relative;
  display: inline-block;
}
.components-form-toggle .components-form-toggle__track {
  content: "";
  display: inline-block;
  box-sizing: border-box;
  vertical-align: top;
  background-color: #fff;
  border: 1px solid #1e1e1e;
  width: 36px;
  height: 18px;
  border-radius: 9px;
  transition: 0.2s background ease;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-toggle .components-form-toggle__track {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-form-toggle .components-form-toggle__thumb {
  display: block;
  position: absolute;
  box-sizing: border-box;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: 0.1s transform ease;
  background-color: #1e1e1e;
  border: 5px solid #1e1e1e;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-toggle .components-form-toggle__thumb {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-form-toggle.is-checked .components-form-toggle__track {
  background-color: var(--wp-admin-theme-color);
  border: 1px solid var(--wp-admin-theme-color);
  border: 9px solid transparent;
}
.components-form-toggle .components-form-toggle__input:focus + .components-form-toggle__track {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.components-form-toggle.is-checked .components-form-toggle__thumb {
  background-color: #fff;
  border-width: 0;
  transform: translateX(-18px);
}
.components-form-toggle.is-disabled, .components-disabled .components-form-toggle {
  opacity: 0.3;
}

.components-form-toggle input.components-form-toggle__input[type=checkbox] {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  padding: 0;
  z-index: 1;
  border: none;
}
.components-form-toggle input.components-form-toggle__input[type=checkbox]:checked {
  background: none;
}
.components-form-toggle input.components-form-toggle__input[type=checkbox]::before {
  content: "";
}

.components-form-token-field__input-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  margin: 0 0 8px 0;
  padding: 2px 4px;
  cursor: text;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-token-field__input-container {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-form-token-field__input-container {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-form-token-field__input-container:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-form-token-field__input-container::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-form-token-field__input-container::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-form-token-field__input-container:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-form-token-field__input-container.is-disabled {
  background: #ddd;
  border-color: #ddd;
}
.components-form-token-field__input-container.is-active {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-form-token-field__input-container input[type=text].components-form-token-field__input {
  display: inline-block;
  flex: 1;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  margin-right: 4px;
  padding: 0;
  min-height: 24px;
  min-width: 50px;
  background: inherit;
  border: 0;
  color: #1e1e1e;
  box-shadow: none;
}
@media (min-width: 600px) {
  .components-form-token-field__input-container input[type=text].components-form-token-field__input {
    font-size: 13px;
  }
}
.components-form-token-field__input-container input[type=text].components-form-token-field__input:focus, .components-form-token-field.is-active .components-form-token-field__input-container input[type=text].components-form-token-field__input {
  outline: none;
  box-shadow: none;
}
.components-form-token-field__input-container .components-form-token-field__token + input[type=text].components-form-token-field__input {
  width: auto;
}

.components-form-token-field__label {
  display: inline-block;
  margin-bottom: 4px;
}

.components-form-token-field__help {
  font-size: 12px;
  font-style: normal;
  color: #757575;
}

.components-form-token-field__token {
  font-size: 13px;
  display: flex;
  margin: 2px 0 2px 4px;
  color: #1e1e1e;
  max-width: 100%;
}
.components-form-token-field__token.is-success .components-form-token-field__token-text,
.components-form-token-field__token.is-success .components-form-token-field__remove-token {
  background: #4ab866;
}
.components-form-token-field__token.is-error .components-form-token-field__token-text,
.components-form-token-field__token.is-error .components-form-token-field__remove-token {
  background: #cc1818;
}
.components-form-token-field__token.is-validating .components-form-token-field__token-text,
.components-form-token-field__token.is-validating .components-form-token-field__remove-token {
  color: #757575;
}
.components-form-token-field__token.is-borderless {
  position: relative;
  padding: 0 0 0 16px;
}
.components-form-token-field__token.is-borderless .components-form-token-field__token-text {
  background: transparent;
  color: var(--wp-admin-theme-color);
}
.components-form-token-field__token.is-borderless .components-form-token-field__remove-token {
  background: transparent;
  color: #757575;
  position: absolute;
  top: 1px;
  left: 0;
}
.components-form-token-field__token.is-borderless.is-success .components-form-token-field__token-text {
  color: #4ab866;
}
.components-form-token-field__token.is-borderless.is-error .components-form-token-field__token-text {
  color: #cc1818;
  border-radius: 0 4px 4px 0;
  padding: 0 6px 0 4px;
}
.components-form-token-field__token.is-borderless.is-validating .components-form-token-field__token-text {
  color: #1e1e1e;
}
.components-form-token-field__token.is-disabled .components-form-token-field__remove-token {
  cursor: default;
}

.components-form-token-field__token-text,
.components-form-token-field__remove-token.components-button {
  display: inline-block;
  line-height: 24px;
  height: auto;
  background: #ddd;
  min-width: unset;
  transition: all 0.2s cubic-bezier(0.4, 1, 0.4, 1);
}
@media (prefers-reduced-motion: reduce) {
  .components-form-token-field__token-text,
.components-form-token-field__remove-token.components-button {
    transition-duration: 0s;
    transition-delay: 0s;
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

.components-form-token-field__token-text {
  border-radius: 0 2px 2px 0;
  padding: 0 8px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.components-form-token-field__remove-token.components-button {
  cursor: pointer;
  border-radius: 2px 0 0 2px;
  padding: 0 2px;
  color: #1e1e1e;
  line-height: 10px;
  overflow: initial;
}
.components-form-token-field__remove-token.components-button:hover {
  color: #1e1e1e;
}

.components-form-token-field__suggestions-list {
  flex: 1 0 100%;
  min-width: 100%;
  max-height: 9em;
  overflow-y: auto;
  transition: all 0.15s ease-in-out;
  list-style: none;
  border-top: 1px solid #757575;
  margin: 4px -4px -4px;
  padding: 0;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-token-field__suggestions-list {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-form-token-field__suggestion {
  color: #757575;
  display: block;
  font-size: 13px;
  padding: 4px 8px;
  margin: 0;
  cursor: pointer;
}
.components-form-token-field__suggestion.is-selected {
  background: var(--wp-admin-theme-color);
  color: #fff;
}

.components-form-token-field__suggestion-match {
  text-decoration: underline;
}

@media (min-width: 600px) {
  .components-guide {
    width: 600px;
  }
}
.components-guide .components-modal__header {
  background: none;
  border-bottom: none;
  width: 100%;
  padding: 0;
  margin: 0;
}
.components-guide .components-modal__header .components-button {
  align-self: flex-start;
  margin: 8px 0 0 8px;
  position: static;
}
.components-guide .components-modal__header .components-button:hover svg {
  fill: #fff;
}
.components-guide__container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: -60px;
  min-height: 100%;
}
.components-guide__page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
@media (min-width: 600px) {
  .components-guide__page {
    min-height: 300px;
  }
}
.components-guide__footer {
  align-content: center;
  display: flex;
  height: 30px;
  justify-content: center;
  margin: 0 0 24px 0;
  padding: 0 32px;
  position: relative;
  width: 100%;
}
@media (max-width: 600px) {
  .components-guide__footer {
    position: absolute;
    bottom: 0;
  }
}
.components-guide__page-control {
  margin: 0;
  text-align: center;
}
.components-guide__page-control li {
  display: inline-block;
  margin: 0;
}
.components-guide__page-control .components-button {
  height: 30px;
  min-width: 20px;
  margin: -6px 0;
}
.components-guide .components-modal__content {
  padding: 0;
}

.components-modal__frame.components-guide {
  border: none;
  min-width: 312px;
  height: 80vh;
  max-height: 575px;
}
@media (max-width: 600px) {
  .components-modal__frame.components-guide {
    bottom: 5%;
    right: 16px;
    left: 16px;
    top: 5%;
    margin: 0 auto;
  }
}

.components-button.components-guide__back-button, .components-button.components-guide__forward-button, .components-button.components-guide__finish-button {
  height: 30px;
  position: absolute;
}
.components-button.components-guide__back-button, .components-button.components-guide__forward-button {
  font-size: 13px;
  padding: 4px 2px;
}
.components-button.components-guide__back-button.has-text svg, .components-button.components-guide__forward-button.has-text svg {
  margin: 0;
}
.components-button.components-guide__back-button:hover, .components-button.components-guide__forward-button:hover {
  text-decoration: underline;
}
.components-button.components-guide__back-button {
  right: 32px;
}
.components-button.components-guide__forward-button {
  left: 32px;
  color: #1386bf;
  font-weight: bold;
}
.components-button.components-guide__finish-button {
  left: 32px;
}
.components-button.components-guide__inline-finish-button {
  display: none;
}

[role=region] {
  position: relative;
}

.is-focusing-regions [role=region]:focus::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  pointer-events: none;
  outline: 4px solid transparent;
  box-shadow: inset 0 0 0 4px var(--wp-admin-theme-color);
}
@supports (outline-offset: 1px) {
  .is-focusing-regions [role=region]:focus::after {
    content: none;
  }
  .is-focusing-regions [role=region]:focus {
    outline-style: solid;
    outline-color: var(--wp-admin-theme-color);
    outline-width: 4px;
    outline-offset: -4px;
  }
}

.components-menu-group + .components-menu-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1e1e1e;
}
.components-menu-group + .components-menu-group.has-hidden-separator {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.components-menu-group__label {
  padding: 0 8px;
  margin-top: 4px;
  margin-bottom: 12px;
  color: #757575;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 500;
}

.components-menu-item__button,
.components-menu-item__button.components-button {
  width: 100%;
}
.components-menu-item__button .components-menu-items__item-icon,
.components-menu-item__button.components-button .components-menu-items__item-icon {
  margin-left: -2px;
  margin-right: 24px;
  display: inline-block;
  flex: 0 0 auto;
}
.components-menu-item__button .components-menu-item__shortcut + .components-menu-items__item-icon,
.components-menu-item__button.components-button .components-menu-item__shortcut + .components-menu-items__item-icon {
  margin-right: 8px;
}
.components-menu-item__button .block-editor-block-icon,
.components-menu-item__button.components-button .block-editor-block-icon {
  margin-right: -2px;
  margin-left: 8px;
}
.components-menu-item__button.is-primary,
.components-menu-item__button.components-button.is-primary {
  justify-content: center;
}
.components-menu-item__button.is-primary .components-menu-item__item,
.components-menu-item__button.components-button.is-primary .components-menu-item__item {
  margin-left: 0;
}

.components-menu-item__info-wrapper {
  display: flex;
  flex-direction: column;
  margin-left: auto;
}

.components-menu-item__info {
  margin-top: 4px;
  font-size: 12px;
  color: #757575;
  white-space: normal;
}

.components-menu-item__item {
  white-space: nowrap;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.components-menu-item__shortcut {
  align-self: center;
  margin-left: 0;
  margin-right: auto;
  padding-right: 24px;
  color: currentColor;
  display: none;
}
@media (min-width: 480px) {
  .components-menu-item__shortcut {
    display: inline;
  }
}

.components-menu-items-choice svg,
.components-menu-items-choice.components-button svg {
  margin-left: 12px;
}
.components-menu-items-choice.has-icon,
.components-menu-items-choice.components-button.has-icon {
  padding-right: 12px;
}

.components-modal__screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 100000;
  animation: edit-post__fade-in-animation 0.2s ease-out 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-modal__screen-overlay {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

.components-modal__frame {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  box-sizing: border-box;
  margin: 0;
  background: #fff;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  overflow: auto;
}
@media (min-width: 600px) {
  .components-modal__frame {
    top: 50%;
    left: auto;
    bottom: auto;
    right: 50%;
    min-width: 360px;
    max-width: calc(100% - 16px - 16px);
    max-height: 90%;
    transform: translate(50%, -50%);
    animation: components-modal__appear-animation 0.1s ease-out;
    animation-fill-mode: forwards;
  }
}
@media (min-width: 600px) and (prefers-reduced-motion: reduce) {
  .components-modal__frame {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

@keyframes components-modal__appear-animation {
  from {
    margin-top: 32px;
  }
  to {
    margin-top: 0;
  }
}
.components-modal__header {
  box-sizing: border-box;
  border-bottom: 1px solid #ddd;
  padding: 0 32px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background: #fff;
  align-items: center;
  height: 60px;
  z-index: 10;
  position: relative;
  position: sticky;
  top: 0;
  margin: 0 -32px 24px;
}
@supports (-ms-ime-align: auto) {
  .components-modal__header {
    position: fixed;
    width: 100%;
  }
}
.components-modal__header .components-modal__header-heading {
  font-size: 1rem;
  font-weight: 600;
}
.components-modal__header h1 {
  line-height: 1;
  margin: 0;
}
.components-modal__header .components-button {
  position: relative;
  right: 8px;
}

.components-modal__header-heading-container {
  align-items: center;
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  justify-content: left;
}

.components-modal__header-icon-container {
  display: inline-block;
}
.components-modal__header-icon-container svg {
  max-width: 36px;
  max-height: 36px;
  padding: 8px;
}

.components-modal__content {
  box-sizing: border-box;
  height: 100%;
  padding: 0 32px 24px;
}
@supports (-ms-ime-align: auto) {
  .components-modal__content {
    padding-top: 60px;
  }
}

.components-notice {
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  background-color: #fff;
  border-right: 4px solid var(--wp-admin-theme-color);
  margin: 5px 15px 2px;
  padding: 8px 12px;
  align-items: center;
}
.components-notice.is-dismissible {
  padding-left: 36px;
  position: relative;
}
.components-notice.is-success {
  border-right-color: #4ab866;
  background-color: #eff9f1;
}
.components-notice.is-warning {
  border-right-color: #f0b849;
  background-color: #fef8ee;
}
.components-notice.is-error {
  border-right-color: #cc1818;
  background-color: #f4a2a2;
}

.components-notice__content {
  flex-grow: 1;
  margin: 4px 0 4px 25px;
}

.components-notice__actions {
  display: flex;
  flex-wrap: wrap;
}

.components-notice__action.components-button {
  margin-left: 8px;
}
.components-notice__action.components-button, .components-notice__action.components-button.is-link {
  margin-right: 12px;
}
.components-notice__action.components-button.is-secondary {
  vertical-align: initial;
}

.components-notice__dismiss {
  color: #757575;
  align-self: flex-start;
  flex-shrink: 0;
}
.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover, .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active, .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus {
  color: #1e1e1e;
  background-color: transparent;
}
.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover {
  box-shadow: none;
}

.components-notice-list {
  max-width: 100vw;
  box-sizing: border-box;
}
.components-notice-list .components-notice__content {
  margin-top: 12px;
  margin-bottom: 12px;
  line-height: 2;
}
.components-notice-list .components-notice__action.components-button {
  display: block;
  margin-right: 0;
  margin-top: 8px;
}

.components-panel {
  background: #fff;
  border: 1px solid #e0e0e0;
}
.components-panel > .components-panel__header:first-child,
.components-panel > .components-panel__body:first-child {
  margin-top: -1px;
}
.components-panel > .components-panel__header:last-child,
.components-panel > .components-panel__body:last-child {
  border-bottom-width: 0;
}

.components-panel + .components-panel {
  margin-top: -1px;
}

.components-panel__body {
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}
.components-panel__body h3 {
  margin: 0 0 0.5em;
}
.components-panel__body.is-opened {
  padding: 16px;
}

.components-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.components-panel__header h2 {
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.components-panel__body + .components-panel__body,
.components-panel__body + .components-panel__header,
.components-panel__header + .components-panel__body,
.components-panel__header + .components-panel__header {
  margin-top: -1px;
}

.components-panel__body > .components-panel__body-title {
  display: block;
  padding: 0;
  font-size: inherit;
  margin-top: 0;
  margin-bottom: 0;
  transition: 0.1s background ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-panel__body > .components-panel__body-title {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-panel__body.is-opened > .components-panel__body-title {
  margin: -16px;
  margin-bottom: 5px;
}

.components-panel__body > .components-panel__body-title:hover {
  background: #f0f0f0;
  border: none;
}

.components-panel__body-toggle.components-button {
  position: relative;
  padding: 16px 16px 16px 48px;
  outline: none;
  width: 100%;
  font-weight: 500;
  text-align: right;
  color: #1e1e1e;
  border: none;
  box-shadow: none;
  transition: 0.1s background ease-in-out;
  height: auto;
}
@media (prefers-reduced-motion: reduce) {
  .components-panel__body-toggle.components-button {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-panel__body-toggle.components-button:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
  border-radius: 0;
}
.components-panel__body-toggle.components-button .components-panel__arrow {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #1e1e1e;
  fill: currentColor;
  transition: 0.1s color ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-panel__body-toggle.components-button .components-panel__arrow {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right {
  transform: scaleX(-1);
  -ms-filter: fliph;
  filter: FlipH;
  margin-top: -10px;
}

.components-panel__icon {
  color: #757575;
  margin: -2px 6px -2px 0;
}

.components-panel__body-toggle-icon {
  margin-left: -5px;
}

.components-panel__color-title {
  float: right;
  height: 19px;
}

.components-panel__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  min-height: 36px;
}
.components-panel__row select {
  min-width: 0;
}
.components-panel__row label {
  margin-left: 12px;
  flex-shrink: 0;
  max-width: 75%;
}
.components-panel__row:empty, .components-panel__row:first-of-type {
  margin-top: 0;
}

.components-panel .circle-picker {
  padding-bottom: 20px;
}

.components-placeholder.components-placeholder {
  box-sizing: border-box;
  position: relative;
  padding: 1em;
  min-height: 200px;
  width: 100%;
  text-align: right;
  margin: 0;
  color: #1e1e1e;
  -moz-font-smoothing: subpixel-antialiased;
  -webkit-font-smoothing: subpixel-antialiased;
  border-radius: 2px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px #1e1e1e;
  outline: 1px solid transparent;
}
@supports (position: sticky) {
  .components-placeholder.components-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
}
.components-placeholder.components-placeholder .components-base-control__label {
  font-size: 13px;
}

.components-placeholder__error,
.components-placeholder__instructions,
.components-placeholder__label,
.components-placeholder__fieldset {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
}

.components-placeholder__label {
  display: flex;
  font-weight: 600;
  margin-bottom: 16px;
  align-items: center;
}
.components-placeholder__label > svg,
.components-placeholder__label .dashicon,
.components-placeholder__label .block-editor-block-icon {
  fill: currentColor;
  margin-left: 1ch;
}
.components-placeholder__label:empty {
  display: none;
}

.components-placeholder__fieldset,
.components-placeholder__fieldset form {
  display: flex;
  flex-direction: row;
  width: 100%;
  flex-wrap: wrap;
}
.components-placeholder__fieldset p,
.components-placeholder__fieldset form p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
}

.components-placeholder__fieldset.is-column-layout,
.components-placeholder__fieldset.is-column-layout form {
  flex-direction: column;
}

.components-placeholder__input[type=url] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  margin: 0 0 0 8px;
  flex: 1 1 auto;
}
@media (prefers-reduced-motion: reduce) {
  .components-placeholder__input[type=url] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-placeholder__input[type=url] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-placeholder__input[type=url]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-placeholder__input[type=url]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-placeholder__input[type=url]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-placeholder__input[type=url]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}

.components-placeholder__instructions {
  margin-bottom: 1em;
}

.components-placeholder__error {
  margin-top: 1em;
  width: 100%;
}

.components-placeholder__preview img {
  margin: 3%;
  width: 50%;
}

.components-placeholder__fieldset .components-button {
  margin-left: 12px;
  margin-bottom: 12px;
}
.components-placeholder__fieldset .components-button:last-child {
  margin-bottom: 0;
  margin-left: 0;
}

.components-placeholder__fieldset .components-button:not(.is-link) ~ .components-button.is-link {
  margin-right: 10px;
  margin-left: 10px;
}
.components-placeholder__fieldset .components-button:not(.is-link) ~ .components-button.is-link:last-child {
  margin-left: 0;
}

.components-placeholder.is-large .components-placeholder__label {
  font-size: 18pt;
  font-weight: normal;
}
.components-placeholder.is-medium .components-placeholder__instructions, .components-placeholder.is-small .components-placeholder__instructions {
  display: none;
}
.components-placeholder.is-medium .components-placeholder__fieldset,
.components-placeholder.is-medium .components-placeholder__fieldset form, .components-placeholder.is-small .components-placeholder__fieldset,
.components-placeholder.is-small .components-placeholder__fieldset form {
  flex-direction: column;
}
.components-placeholder.is-medium .components-placeholder__fieldset .components-button, .components-placeholder.is-small .components-placeholder__fieldset .components-button {
  margin-left: auto;
}
.components-placeholder.is-small .components-button {
  padding: 0 8px 2px;
}
.components-popover {
  position: fixed;
  z-index: 1000000;
  top: 0;
  left: 0;
  opacity: 0;
}
.components-popover.is-expanded, .components-popover[data-x-axis][data-y-axis] {
  opacity: 1;
}
.components-popover.is-expanded {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000000 !important;
}
.components-popover:not(.is-without-arrow) {
  margin-left: 2px;
}
.components-popover:not(.is-without-arrow)::before {
  border: 8px solid #ccc;
}
.components-popover:not(.is-without-arrow).is-alternate::before {
  border-color: #1e1e1e;
}
.components-popover:not(.is-without-arrow)::after {
  border: 8px solid #fff;
}
.components-popover:not(.is-without-arrow)::before, .components-popover:not(.is-without-arrow)::after {
  content: "";
  position: absolute;
  height: 0;
  width: 0;
  line-height: 0;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top] {
  margin-top: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top]::before {
  bottom: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top]::after {
  bottom: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top]::before, .components-popover:not(.is-without-arrow)[data-y-axis=top]::after {
  border-bottom: none;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top-style: solid;
  margin-left: -10px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom] {
  margin-top: 8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom]::before {
  top: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom]::after {
  top: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom]::before, .components-popover:not(.is-without-arrow)[data-y-axis=bottom]::after {
  border-bottom-style: solid;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top: none;
  margin-left: -10px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left] {
  margin-left: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::before {
  right: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::after {
  right: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::before, .components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::after {
  border-bottom-color: transparent;
  border-left-style: solid;
  border-right: none;
  border-top-color: transparent;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right] {
  margin-left: 8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::before {
  left: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::after {
  left: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::before, .components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::after {
  border-bottom-color: transparent;
  border-left: none;
  border-right-style: solid;
  border-top-color: transparent;
}
.components-popover[data-y-axis=top] {
  bottom: 100%;
}
.components-popover[data-y-axis=bottom] {
  top: 100%;
}
.components-popover[data-y-axis=middle] {
  align-items: center;
  display: flex;
}
.components-popover.is-from-top {
  margin-top: 12px;
}
.components-popover.is-from-bottom {
  margin-top: -12px;
}
.components-popover.is-from-left:not(.is-from-top):not(.is-from-bottom) {
  margin-left: 12px;
}
.components-popover.is-from-right:not(.is-from-top):not(.is-from-bottom) {
  margin-right: 12px;
}

.components-popover__content {
  height: 100%;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}
.is-alternate .components-popover__content {
  border: 1px solid #1e1e1e;
  box-shadow: none;
}
.components-popover .components-popover__content {
  position: absolute;
  height: auto;
  overflow-y: auto;
}
.components-popover.is-expanded .components-popover__content {
  position: static;
  height: calc(100% - 48px);
  overflow-y: visible;
  min-width: auto;
  border: none;
  border-top: 1px solid #1e1e1e;
}
.components-popover[data-y-axis=top] .components-popover__content {
  bottom: 100%;
}
.components-popover[data-x-axis=center] .components-popover__content {
  left: 50%;
  transform: translateX(-50%);
}
.components-popover[data-x-axis=right] .components-popover__content {
  position: absolute;
  left: 100%;
}
.components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content {
  margin-left: -25px;
}
.components-popover[data-x-axis=left] .components-popover__content {
  position: absolute;
  right: 100%;
}
.components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content {
  margin-right: -25px;
}

.components-popover__header {
  align-items: center;
  background: #fff;
  display: flex;
  height: 48px;
  justify-content: space-between;
  padding: 0 8px 0 16px;
}

.components-popover__header-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.components-popover__close.components-button {
  z-index: 5;
}
.components-radio-control {
  display: flex;
  flex-direction: column;
}
.components-radio-control .components-base-control__help {
  margin-top: 0;
}
.components-radio-control .components-base-control__field {
  margin-bottom: 0;
}

.components-radio-control__option:not(:last-child) {
  margin-bottom: 4px;
}

.components-radio-control__input[type=radio] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  border: 1px solid #1e1e1e;
  margin-left: 12px;
  transition: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin-top: 0;
  margin-left: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .components-radio-control__input[type=radio] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-radio-control__input[type=radio] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-radio-control__input[type=radio]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-radio-control__input[type=radio]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-radio-control__input[type=radio]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-radio-control__input[type=radio]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
@media (min-width: 600px) {
  .components-radio-control__input[type=radio] {
    height: 20px;
    width: 20px;
  }
}
.components-radio-control__input[type=radio]:checked::before {
  box-sizing: inherit;
  width: 8px;
  height: 8px;
  transform: translate(-7px, 7px);
  margin: 0;
  background-color: #fff;
  border: 4px solid #fff;
}
@media (min-width: 600px) {
  .components-radio-control__input[type=radio]:checked::before {
    transform: translate(-5px, 5px);
  }
}
.components-radio-control__input[type=radio]:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-radio-control__input[type=radio]:checked {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}

.components-resizable-box__handle {
  display: none;
  width: 23px;
  height: 23px;
  z-index: 2;
}
.components-resizable-box__container.has-show-handle .components-resizable-box__handle {
  display: block;
}

.components-resizable-box__handle::after {
  display: block;
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid var(--wp-admin-theme-color);
  border-radius: 50%;
  background: #fff;
  cursor: inherit;
  position: absolute;
  top: calc(50% - 8px);
  left: calc(50% - 8px);
}

.components-resizable-box__side-handle::before {
  display: block;
  border-radius: 2px;
  content: "";
  width: 3px;
  height: 3px;
  background: var(--wp-admin-theme-color);
  cursor: inherit;
  position: absolute;
  top: calc(50% - 1px);
  left: calc(50% - 1px);
  transition: transform 0.1s ease-in;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .components-resizable-box__side-handle::before {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-resizable-box__side-handle {
  z-index: 2;
}

.components-resizable-box__corner-handle {
  z-index: 2;
}

.components-resizable-box__side-handle.components-resizable-box__handle-top,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom,
.components-resizable-box__side-handle.components-resizable-box__handle-top::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom::before {
  width: 100%;
  right: 0;
  border-right: 0;
  border-left: 0;
}

.components-resizable-box__side-handle.components-resizable-box__handle-left,
.components-resizable-box__side-handle.components-resizable-box__handle-right,
.components-resizable-box__side-handle.components-resizable-box__handle-left::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right::before {
  height: 100%;
  top: 0;
  border-top: 0;
  border-bottom: 0;
}

.components-resizable-box__side-handle.components-resizable-box__handle-top:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-top:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
  animation: components-resizable-box__top-bottom-animation 0.1s ease-out 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-resizable-box__side-handle.components-resizable-box__handle-top:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-top:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

.components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:active::before {
  animation: components-resizable-box__left-right-animation 0.1s ease-out 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:active::before {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

/* This CSS is shown only to Safari, which has a bug with table-caption making it jumpy.
See https://bugs.webkit.org/show_bug.cgi?id=187903. */
@media not all and (-webkit-min-device-pixel-ratio: 0), not all and (min-resolution: 0.001dpcm) {
  @supports (-webkit-appearance: none) {
    .components-resizable-box__side-handle.components-resizable-box__handle-top:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-top:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
      animation: none;
    }

    .components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:active::before {
      animation: none;
    }
  }
}
@keyframes components-resizable-box__top-bottom-animation {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
@keyframes components-resizable-box__left-right-animation {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}
.components-resizable-box__handle-right {
  right: calc(11.5px * -1);
}

.components-resizable-box__handle-left {
  left: calc(11.5px * -1);
}

.components-resizable-box__handle-top {
  top: calc(11.5px * -1);
}

.components-resizable-box__handle-bottom {
  bottom: calc(11.5px * -1);
}
.components-responsive-wrapper {
  position: relative;
  max-width: 100%;
}
.components-responsive-wrapper, .components-responsive-wrapper > span {
  display: block;
}

.components-responsive-wrapper__content {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  margin: auto;
}

.components-sandbox {
  overflow: hidden;
}

iframe.components-sandbox {
  width: 100%;
}

html.lockscroll,
body.lockscroll {
  overflow: hidden;
}

.components-select-control__input {
  background: #fff;
  height: 36px;
  line-height: 36px;
  margin: 1px;
  outline: 0;
  width: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}
@media (min-width: 782px) {
  .components-select-control__input {
    height: 28px;
    line-height: 28px;
  }
}

@media (max-width: 782px) {
  .components-base-control .components-base-control__field .components-select-control__input {
    font-size: 16px;
  }
}
.components-snackbar {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  background-color: #1e1e1e;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  color: #fff;
  padding: 16px 24px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  cursor: pointer;
  pointer-events: auto;
}
@media (min-width: 600px) {
  .components-snackbar {
    width: -moz-fit-content;
    width: fit-content;
  }
}
.components-snackbar:focus {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
}
.components-snackbar.components-snackbar-explicit-dismiss {
  cursor: default;
}
.components-snackbar .components-snackbar__content-with-icon {
  margin-right: 24px;
}
.components-snackbar .components-snackbar__icon {
  position: absolute;
  top: 24px;
  right: 28px;
}
.components-snackbar .components-snackbar__dismiss-button {
  margin-right: 32px;
  cursor: pointer;
}

.components-snackbar__action.components-button {
  margin-right: 32px;
  color: #fff;
  height: auto;
  flex-shrink: 0;
  line-height: 1.4;
  padding: 0;
}
.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary) {
  text-decoration: underline;
  background-color: transparent;
}
.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus {
  color: #fff;
  box-shadow: none;
  outline: 1px dotted #fff;
}
.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover {
  color: var(--wp-admin-theme-color);
}

.components-snackbar__content {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  line-height: 1.4;
}

.components-snackbar-list {
  position: absolute;
  z-index: 100000;
  width: 100%;
  box-sizing: border-box;
  pointer-events: none;
}

.components-snackbar-list__notice-container {
  position: relative;
  padding-top: 8px;
}

.components-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: transparent;
  background: transparent;
}
.components-swatch::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}

.components-button.has-icon.has-text .components-swatch {
  margin-left: 8px;
}

.components-tab-panel__tabs {
  display: flex;
  align-items: stretch;
  flex-direction: row;
}
.components-tab-panel__tabs[aria-orientation=vertical] {
  flex-direction: column;
}

.components-tab-panel__tabs-item {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;
  height: 48px;
  padding: 3px 16px;
  margin-right: 0;
  font-weight: 500;
  transition: box-shadow 0.1s linear;
  box-sizing: border-box;
}
.components-tab-panel__tabs-item::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  speak: none;
  visibility: hidden;
}
.components-tab-panel__tabs-item:focus:not(:disabled) {
  box-shadow: inset 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
.components-tab-panel__tabs-item.is-active {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -4px 0 0 var(--wp-admin-theme-color);
  position: relative;
}
.components-tab-panel__tabs-item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 1px;
  left: 0;
  right: 0;
  border-bottom: 4px solid transparent;
}
.components-tab-panel__tabs-item:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
.components-tab-panel__tabs-item.is-active:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
}

.components-text-control__input,
.components-text-control__input[type=text],
.components-text-control__input[type=tel],
.components-text-control__input[type=time],
.components-text-control__input[type=url],
.components-text-control__input[type=week],
.components-text-control__input[type=password],
.components-text-control__input[type=color],
.components-text-control__input[type=date],
.components-text-control__input[type=datetime],
.components-text-control__input[type=datetime-local],
.components-text-control__input[type=email],
.components-text-control__input[type=month],
.components-text-control__input[type=number] {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
}
@media (prefers-reduced-motion: reduce) {
  .components-text-control__input,
.components-text-control__input[type=text],
.components-text-control__input[type=tel],
.components-text-control__input[type=time],
.components-text-control__input[type=url],
.components-text-control__input[type=week],
.components-text-control__input[type=password],
.components-text-control__input[type=color],
.components-text-control__input[type=date],
.components-text-control__input[type=datetime],
.components-text-control__input[type=datetime-local],
.components-text-control__input[type=email],
.components-text-control__input[type=month],
.components-text-control__input[type=number] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-text-control__input,
.components-text-control__input[type=text],
.components-text-control__input[type=tel],
.components-text-control__input[type=time],
.components-text-control__input[type=url],
.components-text-control__input[type=week],
.components-text-control__input[type=password],
.components-text-control__input[type=color],
.components-text-control__input[type=date],
.components-text-control__input[type=datetime],
.components-text-control__input[type=datetime-local],
.components-text-control__input[type=email],
.components-text-control__input[type=month],
.components-text-control__input[type=number] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-text-control__input:focus,
.components-text-control__input[type=text]:focus,
.components-text-control__input[type=tel]:focus,
.components-text-control__input[type=time]:focus,
.components-text-control__input[type=url]:focus,
.components-text-control__input[type=week]:focus,
.components-text-control__input[type=password]:focus,
.components-text-control__input[type=color]:focus,
.components-text-control__input[type=date]:focus,
.components-text-control__input[type=datetime]:focus,
.components-text-control__input[type=datetime-local]:focus,
.components-text-control__input[type=email]:focus,
.components-text-control__input[type=month]:focus,
.components-text-control__input[type=number]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-text-control__input::-webkit-input-placeholder,
.components-text-control__input[type=text]::-webkit-input-placeholder,
.components-text-control__input[type=tel]::-webkit-input-placeholder,
.components-text-control__input[type=time]::-webkit-input-placeholder,
.components-text-control__input[type=url]::-webkit-input-placeholder,
.components-text-control__input[type=week]::-webkit-input-placeholder,
.components-text-control__input[type=password]::-webkit-input-placeholder,
.components-text-control__input[type=color]::-webkit-input-placeholder,
.components-text-control__input[type=date]::-webkit-input-placeholder,
.components-text-control__input[type=datetime]::-webkit-input-placeholder,
.components-text-control__input[type=datetime-local]::-webkit-input-placeholder,
.components-text-control__input[type=email]::-webkit-input-placeholder,
.components-text-control__input[type=month]::-webkit-input-placeholder,
.components-text-control__input[type=number]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-text-control__input::-moz-placeholder,
.components-text-control__input[type=text]::-moz-placeholder,
.components-text-control__input[type=tel]::-moz-placeholder,
.components-text-control__input[type=time]::-moz-placeholder,
.components-text-control__input[type=url]::-moz-placeholder,
.components-text-control__input[type=week]::-moz-placeholder,
.components-text-control__input[type=password]::-moz-placeholder,
.components-text-control__input[type=color]::-moz-placeholder,
.components-text-control__input[type=date]::-moz-placeholder,
.components-text-control__input[type=datetime]::-moz-placeholder,
.components-text-control__input[type=datetime-local]::-moz-placeholder,
.components-text-control__input[type=email]::-moz-placeholder,
.components-text-control__input[type=month]::-moz-placeholder,
.components-text-control__input[type=number]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-text-control__input:-ms-input-placeholder,
.components-text-control__input[type=text]:-ms-input-placeholder,
.components-text-control__input[type=tel]:-ms-input-placeholder,
.components-text-control__input[type=time]:-ms-input-placeholder,
.components-text-control__input[type=url]:-ms-input-placeholder,
.components-text-control__input[type=week]:-ms-input-placeholder,
.components-text-control__input[type=password]:-ms-input-placeholder,
.components-text-control__input[type=color]:-ms-input-placeholder,
.components-text-control__input[type=date]:-ms-input-placeholder,
.components-text-control__input[type=datetime]:-ms-input-placeholder,
.components-text-control__input[type=datetime-local]:-ms-input-placeholder,
.components-text-control__input[type=email]:-ms-input-placeholder,
.components-text-control__input[type=month]:-ms-input-placeholder,
.components-text-control__input[type=number]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}

.components-tip {
  display: flex;
  color: #757575;
}
.components-tip svg {
  align-self: center;
  fill: #f0b849;
  flex-shrink: 0;
  margin-left: 16px;
}
.components-tip p {
  margin: 0;
}

.components-toggle-control .components-base-control__field {
  display: flex;
  margin-bottom: 12px;
  line-height: initial;
  align-items: center;
}
.components-toggle-control .components-base-control__field .components-form-toggle {
  margin-left: 12px;
}
.components-toggle-control .components-base-control__field .components-toggle-control__label {
  display: block;
}

.components-accessible-toolbar {
  display: inline-flex;
  border: 1px solid #1e1e1e;
  border-radius: 2px;
  flex-shrink: 0;
}
.components-accessible-toolbar > .components-toolbar-group:last-child {
  border-left: none;
}

.components-accessible-toolbar .components-button,
.components-toolbar .components-button {
  position: relative;
  height: 48px;
  z-index: 1;
  padding-right: 16px;
  padding-left: 16px;
}
.components-accessible-toolbar .components-button:focus:enabled,
.components-toolbar .components-button:focus:enabled {
  box-shadow: none;
  outline: none;
}
.components-accessible-toolbar .components-button::before,
.components-toolbar .components-button::before {
  content: "";
  position: absolute;
  display: block;
  border-radius: 2px;
  height: 32px;
  right: 8px;
  left: 8px;
  z-index: -1;
  animation: components-button__appear-animation 0.1s ease;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-accessible-toolbar .components-button::before,
.components-toolbar .components-button::before {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}
.components-accessible-toolbar .components-button svg,
.components-toolbar .components-button svg {
  position: relative;
  margin-right: auto;
  margin-left: auto;
}
.components-accessible-toolbar .components-button.is-pressed,
.components-toolbar .components-button.is-pressed {
  background: transparent;
}
.components-accessible-toolbar .components-button.is-pressed:hover,
.components-toolbar .components-button.is-pressed:hover {
  background: transparent;
}
.components-accessible-toolbar .components-button.is-pressed::before,
.components-toolbar .components-button.is-pressed::before {
  background: #1e1e1e;
}
.components-accessible-toolbar .components-button:focus::before,
.components-toolbar .components-button:focus::before {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 4px #fff;
  outline: 2px solid transparent;
}
.components-accessible-toolbar .components-button.has-icon,
.components-toolbar .components-button.has-icon {
  padding-right: 8px;
  padding-left: 8px;
  min-width: 48px;
  justify-content: center;
}
.components-accessible-toolbar .components-button.components-tab-button,
.components-toolbar .components-button.components-tab-button {
  font-weight: 500;
}
.components-accessible-toolbar .components-button.components-tab-button span,
.components-toolbar .components-button.components-tab-button span {
  display: inline-block;
  padding-right: 0;
  padding-left: 0;
  position: relative;
}

@keyframes components-button__appear-animation {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.components-toolbar__control.components-button {
  position: relative;
}
.components-toolbar__control.components-button[data-subscript] svg {
  padding: 5px 0 5px 10px;
}
.components-toolbar__control.components-button[data-subscript]::after {
  content: attr(data-subscript);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 12px;
  position: absolute;
  left: 8px;
  bottom: 10px;
}
.components-toolbar__control.components-button:active::before {
  display: none;
}
.components-toolbar__control.components-button:not(:disabled).is-pressed[data-subscript]::after {
  color: #fff;
}

.components-toolbar-group {
  min-height: 48px;
  border-left: 1px solid #1e1e1e;
  background-color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  line-height: 0;
}
.components-toolbar-group .components-toolbar-group.components-toolbar-group {
  border-width: 0;
  margin: 0;
}

.components-toolbar {
  min-height: 48px;
  margin: 0;
  border: 1px solid #1e1e1e;
  background-color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.components-toolbar .components-toolbar.components-toolbar {
  border-width: 0;
  margin: 0;
}

div.components-toolbar > div {
  display: block;
  margin: 0;
}
@supports (position: sticky) {
  div.components-toolbar > div {
    display: flex;
  }
}
div.components-toolbar > div + div.has-left-divider {
  margin-right: 6px;
  position: relative;
  overflow: visible;
}
div.components-toolbar > div + div.has-left-divider::before {
  display: inline-block;
  content: "";
  box-sizing: content-box;
  background-color: #ddd;
  position: absolute;
  top: 8px;
  right: -3px;
  width: 1px;
  height: 20px;
}

.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child:last-child,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > * .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child:last-child,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > * .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > * .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > * .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child:last-child,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > * .components-button {
  min-width: 48px;
  padding-right: 12px;
  padding-left: 12px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button::before, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button::before, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > * .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > * .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > * .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > * .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child:last-child::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > * .components-button::before {
  right: 8px;
  left: 8px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:first-child > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:first-child > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:first-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:first-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:first-child > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child .components-button {
  min-width: 42px;
  padding-right: 11px;
  padding-left: 6px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:first-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:first-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:first-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:first-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:first-child > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child .components-button::before {
  right: 8px;
  left: 2px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown .components-button {
  min-width: 36px;
  padding-right: 6px;
  padding-left: 6px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button svg,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div > .components-button svg,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button svg,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button svg,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div > .components-button svg,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown .components-button svg,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button svg,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div > .components-button svg,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown .components-button svg {
  min-width: 24px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown .components-button::before {
  right: 2px;
  left: 2px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:last-child,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:last-child > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:last-child,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:last-child > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:last-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:last-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:last-child,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:last-child > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:last-child .components-button {
  min-width: 42px;
  padding-right: 6px;
  padding-left: 11px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:last-child::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:last-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:last-child::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:last-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:last-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:last-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:last-child::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:last-child > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:last-child .components-button::before {
  right: 2px;
  left: 8px;
}

.components-tooltip.components-popover {
  z-index: 1000002;
}
.components-tooltip.components-popover .components-popover__content {
  min-width: 0;
}

.components-tooltip .components-popover__content {
  background: #1e1e1e;
  border-radius: 2px;
  border-width: 0;
  color: #fff;
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
  font-size: 12px;
  box-shadow: none;
}
.components-tooltip .components-popover__content > div {
  padding: 4px 8px;
}

.components-tooltip__shortcut {
  display: inline-block;
  margin-right: 8px;
}

.disabled-element-wrapper {
  position: relative;
}
.disabled-element-wrapper .event-catcher {
  z-index: 100002;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.components-visually-hidden {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.components-visually-hidden:focus {
  background-color: #ddd;
  clip: auto !important;
  -webkit-clip-path: none;
          clip-path: none;
  color: #444;
  display: block;
  font-size: 1em;
  height: auto;
  right: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}style.css000064400000433130152334540170006426 0ustar00@charset "UTF-8";
/**
 * Colors
 */
/**
 * Breakpoints & Media Queries
 */
/**
 * SCSS Variables.
 *
 * Please use variables from this sheet to ensure consistency across the UI.
 * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
 * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
 */
/**
 * Colors
 */
/**
 * Fonts & basic variables.
 */
/**
 * Grid System.
 * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
 */
/**
 * Dimensions.
 */
/**
 * Shadows.
 */
/**
 * Editor widths.
 */
/**
 * Block & Editor UI.
 */
/**
 * Block paddings.
 */
/**
 * React Native specific.
 * These variables do not appear to be used anywhere else.
 */
/**
 * Breakpoint mixins
 */
/**
 * Long content fade mixin
 *
 * Creates a fading overlay to signify that the content is longer
 * than the space allows.
 */
/**
 * Focus styles.
 */
/**
 * Applies editor left position to the selector passed as argument
 */
/**
 * Styles that are reused verbatim in a few places
 */
/**
 * Allows users to opt-out of animations via OS-level preferences.
 */
/**
 * Reset default styles for JavaScript UI based pages.
 * This is a WP-admin agnostic reset
 */
/**
 * Reset the WP Admin page styles for Gutenberg-like pages.
 */
:root {
  --wp-admin-theme-color: #007cba;
  --wp-admin-theme-color-darker-10: #006ba1;
  --wp-admin-theme-color-darker-20: #005a87;
  --wp-admin-border-width-focus: 2px;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  :root {
    --wp-admin-border-width-focus: 1.5px;
  }
}

.components-animate__appear {
  animation: components-animate__appear-animation 0.1s cubic-bezier(0, 0, 0.2, 1) 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-animate__appear {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}
.components-animate__appear.is-from-top, .components-animate__appear.is-from-top.is-from-left {
  transform-origin: top left;
}
.components-animate__appear.is-from-top.is-from-right {
  transform-origin: top right;
}
.components-animate__appear.is-from-bottom, .components-animate__appear.is-from-bottom.is-from-left {
  transform-origin: bottom left;
}
.components-animate__appear.is-from-bottom.is-from-right {
  transform-origin: bottom right;
}

@keyframes components-animate__appear-animation {
  from {
    transform: translateY(-2em) scaleY(0) scaleX(0);
  }
  to {
    transform: translateY(0%) scaleY(1) scaleX(1);
  }
}
.components-animate__slide-in {
  animation: components-animate__slide-in-animation 0.1s cubic-bezier(0, 0, 0.2, 1);
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-animate__slide-in {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}
.components-animate__slide-in.is-from-left {
  transform: translateX(100%);
}
.components-animate__slide-in.is-from-right {
  transform: translateX(-100%);
}

@keyframes components-animate__slide-in-animation {
  100% {
    transform: translateX(0%);
  }
}
.components-animate__loading {
  animation: components-animate__loading 1.6s ease-in-out infinite;
}

@keyframes components-animate__loading {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}
.components-autocomplete__popover .components-popover__content > div {
  padding: 16px;
  min-width: 220px;
}

.components-autocomplete__result.components-button {
  display: flex;
  height: auto;
  min-height: 36px;
  text-align: left;
  width: 100%;
}
.components-autocomplete__result.components-button.is-selected {
  box-shadow: 0 0 0 2px var(--wp-admin-theme-color);
}

.components-button-group {
  display: inline-block;
}
.components-button-group .components-button {
  border-radius: 0;
  display: inline-flex;
  color: #1e1e1e;
  box-shadow: inset 0 0 0 1px #1e1e1e;
}
.components-button-group .components-button + .components-button {
  margin-left: -1px;
}
.components-button-group .components-button:first-child {
  border-radius: 2px 0 0 2px;
}
.components-button-group .components-button:last-child {
  border-radius: 0 2px 2px 0;
}
.components-button-group .components-button:focus, .components-button-group .components-button.is-primary {
  position: relative;
  z-index: 1;
}
.components-button-group .components-button.is-primary {
  box-shadow: inset 0 0 0 1px #1e1e1e;
}

.components-button {
  display: inline-flex;
  text-decoration: none;
  font-weight: normal;
  font-size: 13px;
  margin: 0;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  background: none;
  transition: box-shadow 0.1s linear;
  height: 36px;
  align-items: center;
  box-sizing: border-box;
  padding: 6px 12px;
  border-radius: 2px;
  color: #1e1e1e;
  /**
   * Primary button style.
   */
  /**
   * Secondary and tertiary buttons.
   */
  /**
   * Secondary button style.
   */
  /**
   * Tertiary buttons.
   */
  /**
   * Destructive buttons.
   */
  /**
   * Link buttons.
   */
}
@media (prefers-reduced-motion: reduce) {
  .components-button {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-button[aria-expanded=true], .components-button:hover {
  color: var(--wp-admin-theme-color);
}
.components-button[aria-disabled=true]:hover {
  color: initial;
}
.components-button:focus:not(:disabled) {
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
  outline: 3px solid transparent;
}
.components-button.is-primary {
  white-space: nowrap;
  background: var(--wp-admin-theme-color);
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  outline: 1px solid transparent;
}
.components-button.is-primary:hover:not(:disabled) {
  background: var(--wp-admin-theme-color-darker-10);
  color: #fff;
}
.components-button.is-primary:active:not(:disabled) {
  background: var(--wp-admin-theme-color-darker-20);
  border-color: var(--wp-admin-theme-color-darker-20);
  color: #fff;
}
.components-button.is-primary:focus:not(:disabled) {
  box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
.components-button.is-primary:disabled, .components-button.is-primary:disabled:active:enabled, .components-button.is-primary[aria-disabled=true], .components-button.is-primary[aria-disabled=true]:enabled, .components-button.is-primary[aria-disabled=true]:active:enabled {
  color: rgba(255, 255, 255, 0.4);
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
  opacity: 1;
  outline: none;
}
.components-button.is-primary:disabled:focus:enabled, .components-button.is-primary:disabled:active:enabled:focus:enabled, .components-button.is-primary[aria-disabled=true]:focus:enabled, .components-button.is-primary[aria-disabled=true]:enabled:focus:enabled, .components-button.is-primary[aria-disabled=true]:active:enabled:focus:enabled {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
}
.components-button.is-primary.is-busy, .components-button.is-primary.is-busy:disabled, .components-button.is-primary.is-busy[aria-disabled=true] {
  color: #fff;
  background-size: 100px 100%;
  /* stylelint-disable */
  background-image: linear-gradient(-45deg, var(--wp-admin-theme-color) 33%, var(--wp-admin-theme-color-darker-20) 33%, var(--wp-admin-theme-color-darker-20) 70%, var(--wp-admin-theme-color) 70%);
  /* stylelint-enable */
  border-color: var(--wp-admin-theme-color);
}
.components-button.is-secondary, .components-button.is-tertiary {
  outline: 1px solid transparent;
}
.components-button.is-secondary:active:not(:disabled), .components-button.is-tertiary:active:not(:disabled) {
  background: #ddd;
  color: var(--wp-admin-theme-color-darker-10);
  box-shadow: none;
}
.components-button.is-secondary:hover:not(:disabled), .components-button.is-tertiary:hover:not(:disabled) {
  color: var(--wp-admin-theme-color-darker-10);
  box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color-darker-10);
}
.components-button.is-secondary:disabled, .components-button.is-secondary[aria-disabled=true], .components-button.is-secondary[aria-disabled=true]:hover, .components-button.is-tertiary:disabled, .components-button.is-tertiary[aria-disabled=true], .components-button.is-tertiary[aria-disabled=true]:hover {
  color: #828282;
  background: #eaeaea;
  transform: none;
  opacity: 1;
  box-shadow: none;
  outline: none;
}
.components-button.is-secondary {
  box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color);
  outline: 1px solid transparent;
  white-space: nowrap;
  color: var(--wp-admin-theme-color);
  background: transparent;
}
.components-button.is-tertiary {
  white-space: nowrap;
  color: var(--wp-admin-theme-color);
  background: transparent;
  padding: 6px;
}
.components-button.is-tertiary .dashicon {
  display: inline-block;
  flex: 0 0 auto;
}
.components-button.is-destructive {
  color: #cc1818;
  box-shadow: inset 0 0 0 1px #cc1818;
}
.components-button.is-destructive:hover:not(:disabled) {
  color: #710d0d;
  box-shadow: inset 0 0 0 1px #710d0d;
}
.components-button.is-destructive:focus:not(:disabled) {
  color: var(--wp-admin-theme-color);
}
.components-button.is-destructive:active:not(:disabled) {
  background: #ccc;
}
.components-button.is-destructive.is-primary {
  color: #fff;
  background: #cc1818;
  box-shadow: inset 0 0 0 1px #cc1818;
}
.components-button.is-destructive.is-primary:hover:not(:disabled) {
  color: #fff;
  background: #710d0d;
  box-shadow: inset 0 0 0 1px #710d0d;
}
.components-button.is-link {
  margin: 0;
  padding: 0;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  background: none;
  outline: none;
  text-align: left;
  color: var(--wp-admin-theme-color);
  text-decoration: underline;
  transition-property: border, background, color;
  transition-duration: 0.05s;
  transition-timing-function: ease-in-out;
  height: auto;
}
@media (prefers-reduced-motion: reduce) {
  .components-button.is-link {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-button.is-link:focus {
  border-radius: 2px;
}
.components-button.is-link.is-destructive {
  color: #cc1818;
}
.components-button.is-link.is-destructive:active:not(:disabled), .components-button.is-link.is-destructive:hover:not(:disabled) {
  color: #710d0d;
  background: none;
}
.components-button.is-link.is-destructive:focus:not(:disabled) {
  color: var(--wp-admin-theme-color);
}
.components-button:not([aria-disabled=true]):active {
  color: inherit;
}
.components-button:disabled, .components-button[aria-disabled=true] {
  cursor: default;
  opacity: 0.3;
}
.components-button.is-busy, .components-button.is-secondary.is-busy, .components-button.is-secondary.is-busy:disabled, .components-button.is-secondary.is-busy[aria-disabled=true] {
  animation: components-button__busy-animation 2500ms infinite linear;
  opacity: 1;
  background-size: 100px 100%;
  /* stylelint-disable */
  background-image: linear-gradient(-45deg, #fafafa 33%, #e0e0e0 33%, #e0e0e0 70%, #fafafa 70%);
  /* stylelint-enable */
}
.components-button.is-small {
  height: 24px;
  line-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}
.components-button.is-small.has-icon:not(.has-text) {
  padding: 0 8px;
  width: 24px;
}
.components-button.has-icon {
  padding: 6px;
  min-width: 36px;
  justify-content: center;
}
.components-button.has-icon .dashicon {
  display: inline-block;
  flex: 0 0 auto;
  margin-left: 2px;
  margin-right: 2px;
}
.components-button.has-icon.has-text {
  justify-content: left;
}
.components-button.has-icon.has-text svg {
  margin-right: 8px;
}
.components-button.has-icon.has-text .dashicon {
  margin-right: 10px;
}
.components-button.is-pressed {
  color: #fff;
  background: #1e1e1e;
}
.components-button.is-pressed:focus:not(:disabled) {
  box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-button.is-pressed:hover:not(:disabled) {
  color: #fff;
  background: #1e1e1e;
}
.components-button svg {
  fill: currentColor;
  outline: none;
}
.components-button .components-visually-hidden {
  height: auto;
}

@keyframes components-button__busy-animation {
  0% {
    background-position: 200px 0;
  }
}
.components-checkbox-control__input[type=checkbox] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  border: 1px solid #1e1e1e;
  margin-right: 12px;
  transition: none;
  border-radius: 2px;
  background: #fff;
  color: #1e1e1e;
  clear: none;
  cursor: pointer;
  display: inline-block;
  line-height: 0;
  margin: 0 4px 0 0;
  outline: 0;
  padding: 0 !important;
  text-align: center;
  vertical-align: top;
  width: 24px;
  height: 24px;
  -webkit-appearance: none;
          appearance: none;
  transition: 0.1s border-color ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-checkbox-control__input[type=checkbox] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-checkbox-control__input[type=checkbox] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-checkbox-control__input[type=checkbox]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-checkbox-control__input[type=checkbox]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-checkbox-control__input[type=checkbox]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-checkbox-control__input[type=checkbox]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-checkbox-control__input[type=checkbox]:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-checkbox-control__input[type=checkbox]:checked {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}
.components-checkbox-control__input[type=checkbox]:checked::-ms-check {
  opacity: 0;
}
.components-checkbox-control__input[type=checkbox]:checked::before, .components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
  margin: -3px -5px;
  color: #fff;
}
@media (min-width: 782px) {
  .components-checkbox-control__input[type=checkbox]:checked::before, .components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
    margin: -4px 0 0 -5px;
  }
}
.components-checkbox-control__input[type=checkbox][aria-checked=mixed] {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}
.components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
  content: "";
  float: left;
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  /* stylelint-disable */
  font: normal 30px/1 dashicons;
  /* stylelint-enable */
  speak: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 782px) {
  .components-checkbox-control__input[type=checkbox][aria-checked=mixed]::before {
    float: none;
    font-size: 21px;
  }
}
@media (min-width: 600px) {
  .components-checkbox-control__input[type=checkbox] {
    height: 20px;
    width: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .components-checkbox-control__input[type=checkbox] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-checkbox-control__input[type=checkbox]:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-checkbox-control__input[type=checkbox]:checked {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}
.components-checkbox-control__input[type=checkbox]:checked::-ms-check {
  opacity: 0;
}
.components-checkbox-control__input[type=checkbox]:checked::before {
  content: none;
}

.components-checkbox-control__input-container {
  position: relative;
  display: inline-block;
  margin-right: 12px;
  vertical-align: middle;
  width: 24px;
  height: 24px;
}
@media (min-width: 600px) {
  .components-checkbox-control__input-container {
    width: 20px;
    height: 20px;
  }
}

svg.components-checkbox-control__checked {
  fill: #fff;
  cursor: pointer;
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  -webkit-user-select: none;
          user-select: none;
  pointer-events: none;
}
@media (min-width: 600px) {
  svg.components-checkbox-control__checked {
    left: -2px;
    top: -2px;
  }
}

.components-circular-option-picker {
  display: inline-block;
  width: 100%;
  min-width: 188px;
}
.components-circular-option-picker .components-circular-option-picker__custom-clear-wrapper {
  display: flex;
  justify-content: flex-end;
}
.components-circular-option-picker .components-circular-option-picker__swatches {
  margin-right: -12px;
}

.components-circular-option-picker__option-wrapper {
  display: inline-block;
  height: 28px;
  width: 28px;
  margin-right: 12px;
  margin-bottom: 12px;
  vertical-align: top;
  transform: scale(1);
  transition: 100ms transform ease;
}
@media (prefers-reduced-motion: reduce) {
  .components-circular-option-picker__option-wrapper {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-circular-option-picker__option-wrapper:hover {
  transform: scale(1.2);
}
.components-circular-option-picker__option-wrapper > div {
  height: 100%;
  width: 100%;
}

.components-circular-option-picker__option-wrapper::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  bottom: 1px;
  right: 1px;
  border-radius: 50%;
  z-index: -1;
  /* stylelint-disable-next-line function-url-quotes */
  background: url('data:image/svg+xml,%3Csvg width="28" height="28" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M6 8V6H4v2h2zM8 8V6h2v2H8zM10 16H8v-2h2v2zM12 16v-2h2v2h-2zM12 18v-2h-2v2H8v2h2v-2h2zM14 18v2h-2v-2h2zM16 18h-2v-2h2v2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z" fill="%23555D65"/%3E%3Cpath d="M18 18v2h-2v-2h2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z" fill="%23555D65"/%3E%3C/svg%3E');
}

.components-circular-option-picker__option {
  display: inline-block;
  vertical-align: top;
  height: 100%;
  width: 100%;
  border: none;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 14px;
  transition: 100ms box-shadow ease;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .components-circular-option-picker__option {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-circular-option-picker__option:hover {
  box-shadow: inset 0 0 0 14px !important;
}
.components-circular-option-picker__option.is-pressed {
  box-shadow: inset 0 0 0 4px;
  position: relative;
  z-index: 1;
  overflow: visible;
}
.components-circular-option-picker__option.is-pressed + svg {
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}
.components-circular-option-picker__option::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  bottom: -1px;
  right: -1px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
}
.components-circular-option-picker__option:focus::after {
  content: "";
  border: 2px solid #757575;
  width: 32px;
  height: 32px;
  position: absolute;
  top: -2px;
  left: -2px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #fff;
}
.components-circular-option-picker__option.components-button:focus {
  background-color: transparent;
  box-shadow: inset 0 0 0 14px;
  outline: none;
}

.components-circular-option-picker__button-action .components-circular-option-picker__option {
  color: #fff;
  background: #fff;
}

.components-circular-option-picker__dropdown-link-action {
  margin-right: 16px;
}
.components-circular-option-picker__dropdown-link-action .components-button {
  line-height: 22px;
}

.components-color-edit__color-option-main-area {
  display: flex;
  align-items: center;
}
.components-color-edit__color-option-main-area div.components-circular-option-picker__option-wrapper {
  display: block;
  margin: 8px;
}

.components-color-edit__color-option.is-hover {
  background: #e0e0e0;
}

.components-color-edit__cancel-button {
  float: right;
}

.components-color-edit__color-option-color-name {
  width: 100%;
}

.components-color-edit__label-and-insert-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.components-color-edit__insert-button {
  margin-top: -8px;
}

.components-color-edit__hidden-control {
  position: relative;
  left: -9999px;
}

.components-color-edit__color-option-color-name-input .components-base-control__field {
  margin-bottom: 0;
  margin-right: 8px;
}

.components-color-edit__slug-input {
  margin-left: 8px;
}

.components-color-edit__reset-button {
  float: right;
}

.component-color-indicator {
  width: 25px;
  height: 16px;
  margin-left: 0.8rem;
  border: 1px solid #dadada;
  display: inline-block;
}
.component-color-indicator + .component-color-indicator {
  margin-left: 0.5rem;
}

/**
 * Parts of this source were derived and modified from react-color,
 * released under the MIT license.
 *
 * https://github.com/casesandberg/react-color/
 *
 * Copyright (c) 2015 Case Sandberg
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
.components-color-picker {
  width: 100%;
}
.components-color-picker * {
  box-sizing: border-box;
}

.components-color-picker__saturation {
  width: 100%;
  padding-bottom: 55%;
  position: relative;
}

.components-color-picker__body {
  padding: 16px 16px 12px;
}

.components-color-picker__controls {
  display: flex;
}

.components-color-picker__saturation-pointer,
.components-color-picker__hue-pointer,
.components-color-picker__alpha-pointer {
  padding: 0;
  position: absolute;
  cursor: pointer;
  box-shadow: none;
  border: none;
}

/* CURRENT COLOR COMPONENT */
.components-color-picker__swatch {
  margin-right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}
.is-alpha-disabled .components-color-picker__swatch {
  width: 12px;
  height: 12px;
  margin-top: 0;
}

.components-color-picker__active {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* SATURATION COMPONENT */
.components-color-picker__saturation-color,
.components-color-picker__saturation-white,
.components-color-picker__saturation-black {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.components-color-picker__saturation-color {
  overflow: visible;
}

.components-color-picker__saturation-white {
  /*rtl:ignore*/
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.components-color-picker__saturation-black {
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.components-button.components-color-picker__saturation-pointer {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  background-color: transparent;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px #fff, inset 0 0 0 1px #000, 0 0 0 2px #000;
}
.components-button.components-color-picker__saturation-pointer:focus:not(:disabled) {
  box-shadow: 0 0 0 2px #fff, inset 0 0 0 1px #000, 0 0 0 3px #000;
}

/* HUE & ALPHA BARS */
.components-color-picker__toggles {
  flex: 1;
}

.components-color-picker__alpha {
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}

.components-color-picker__hue-gradient,
.components-color-picker__alpha-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.components-color-picker__hue,
.components-color-picker__alpha {
  height: 12px;
  position: relative;
}

.is-alpha-enabled .components-color-picker__hue {
  margin-bottom: 8px;
}

.components-color-picker__hue-bar,
.components-color-picker__alpha-bar {
  position: relative;
  margin: 0 3px;
  height: 100%;
  padding: 0 2px;
}

.components-color-picker__hue-gradient {
  /*rtl:ignore*/
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}

.components-color-picker__hue-pointer,
.components-color-picker__alpha-pointer {
  /*rtl:ignore*/
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
  background: #fff;
  transform: translate(-7px, -1px);
}

.components-color-picker__hue-pointer,
.components-color-picker__saturation-pointer {
  transition: box-shadow 0.1s linear;
}
@media (prefers-reduced-motion: reduce) {
  .components-color-picker__hue-pointer,
.components-color-picker__saturation-pointer {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-color-picker__saturation-pointer:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color), 0 0 5px 0 var(--wp-admin-theme-color), inset 0 0 1px 1px rgba(0, 0, 0, 0.3), 0 0 1px 2px rgba(0, 0, 0, 0.4);
}

.components-color-picker__hue-pointer:focus,
.components-color-picker__alpha-pointer:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 2px var(--wp-admin-theme-color), 0 0 3px 0 var(--wp-admin-theme-color);
  outline: 2px solid transparent;
  outline-offset: -2px;
}

/* INPUTS COMPONENT */
.components-color-picker__inputs-wrapper {
  margin: 0 -4px;
  padding-top: 16px;
  display: flex;
  align-items: flex-end;
  min-width: 255px;
}
.components-color-picker__inputs-wrapper fieldset {
  flex: 1;
  border: none;
  margin: 0;
  padding: 0;
}
.components-color-picker__inputs-wrapper .components-color-picker__inputs-fields .components-text-control__input[type=number] {
  padding: 6px 3px;
  margin: 0;
}

.components-color-picker__inputs-field {
  width: 100%;
}

.components-color-picker__inputs-fields {
  display: flex;
  /*rtl:ignore*/
  direction: ltr;
  flex-grow: 1;
  margin-right: 4px;
}
.components-color-picker__inputs-fields .components-base-control + .components-base-control {
  margin-top: 0;
}
.components-color-picker__inputs-fields .components-base-control__field {
  margin: 0 2px;
}

.components-color-picker__inputs-toggle {
  height: 30px;
  padding: 0 5px;
}

.components-combobox-control {
  width: 100%;
}

input.components-combobox-control__input[type=text] {
  width: 100%;
  border: none;
  box-shadow: none;
  font-size: 16px;
  padding: 2px;
  margin: 0;
  line-height: inherit;
  min-height: auto;
}
@media (min-width: 600px) {
  input.components-combobox-control__input[type=text] {
    font-size: 13px;
  }
}
input.components-combobox-control__input[type=text]:focus {
  outline: none;
  box-shadow: none;
}

.components-combobox-control__suggestions-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  margin: 0 0 8px 0;
  padding: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .components-combobox-control__suggestions-container {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-combobox-control__suggestions-container {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-combobox-control__suggestions-container:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-combobox-control__suggestions-container::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-combobox-control__suggestions-container::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-combobox-control__suggestions-container:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-combobox-control__suggestions-container:focus-within {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}

.components-combobox-control__reset.components-button {
  display: flex;
  height: 24px;
  min-width: 24px;
  padding: 0;
}

.components-color-list-picker,
.components-color-list-picker__swatch-button {
  width: 100%;
}

.components-custom-gradient-picker__gradient-bar:not(.has-gradient) {
  opacity: 0.4;
}

.components-custom-gradient-picker__gradient-bar {
  margin-top: 12px;
  width: 100%;
  height: 36px;
  border-radius: 36px;
  margin-bottom: 12px;
  padding-left: 6px;
  padding-right: 30px;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__markers-container {
  position: relative;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point {
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  top: 6px;
  min-width: 24px;
  width: 24px;
  height: 24px;
  position: relative;
  color: #1e1e1e;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point svg {
  height: 100%;
  width: 100%;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button {
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #fff;
  border-radius: 50%;
  height: 24px;
  width: 24px;
  padding: 0;
  position: absolute;
  top: 6px;
}
.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button:focus, .components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button.is-active {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px #1e1e1e;
}

.components-custom-gradient-picker__color-picker-popover .components-custom-gradient-picker__remove-control-point {
  margin-left: auto;
  margin-right: auto;
  display: block;
  margin-bottom: 8px;
}

.components-custom-gradient-picker__inserter {
  width: 100%;
}

.components-custom-gradient-picker__liner-gradient-indicator {
  display: inline-block;
  flex: 0 auto;
  width: 20px;
  height: 20px;
}

.components-custom-gradient-picker .components-custom-gradient-picker__ui-line {
  margin-bottom: 16px;
}
.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-angle-picker,
.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-custom-gradient-picker__type-picker {
  margin-bottom: 0;
}

.components-custom-gradient-picker .components-custom-gradient-picker__toolbar {
  border: none;
}
.components-custom-gradient-picker .components-custom-gradient-picker__toolbar > div + div {
  margin-left: 1px;
}
.components-custom-gradient-picker .components-custom-gradient-picker__toolbar button.is-pressed > svg {
  background: #fff;
  border: 1px solid #949494;
  border-radius: 2px;
}

.components-custom-select-control {
  position: relative;
}

.components-custom-select-control__label {
  display: block;
  margin-bottom: 8px;
}

.components-custom-select-control__button {
  border: 1px solid #757575;
  border-radius: 2px;
  min-height: 30px;
  min-width: 130px;
  position: relative;
  text-align: left;
}
.components-custom-select-control__button.components-custom-select-control__button {
  padding-right: 24px;
}
.components-custom-select-control__button:focus:not(:disabled) {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
}
.components-custom-select-control__button .components-custom-select-control__button-icon {
  height: 100%;
  padding: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.components-custom-select-control__menu {
  border: 1px solid #1e1e1e;
  background-color: #fff;
  border-radius: 2px;
  outline: none;
  transition: none;
  max-height: 400px;
  min-width: 100%;
  overflow: auto;
  padding: 0;
  position: absolute;
  z-index: 1000000;
}
.components-custom-select-control__menu[aria-hidden=true] {
  display: none;
}

.components-custom-select-control__item {
  align-items: center;
  display: flex;
  list-style-type: none;
  padding: 8px;
  cursor: default;
  line-height: 28px;
}
.components-custom-select-control__item.is-highlighted {
  background: #ddd;
}
.components-custom-select-control__item .components-custom-select-control__item-icon {
  margin-right: 0;
  margin-left: auto;
}
.components-custom-select-control__item:last-child {
  margin-bottom: 0;
}

/**
 * Parts of this source were derived and modified from react-dates,
 * released under the MIT license.
 *
 * https://github.com/airbnb/react-dates
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 Airbnb
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
/*rtl:begin:ignore*/
.PresetDateRangePicker_panel {
  padding: 0 22px 11px;
}

.PresetDateRangePicker_button {
  position: relative;
  height: 100%;
  text-align: center;
  background: 0 0;
  border: 2px solid #00a699;
  color: #00a699;
  padding: 4px 12px;
  margin-right: 8px;
  font: inherit;
  font-weight: 700;
  line-height: normal;
  overflow: visible;
  box-sizing: border-box;
  cursor: pointer;
}

.PresetDateRangePicker_button:active {
  outline: 0;
}

.PresetDateRangePicker_button__selected {
  color: #fff;
  background: #00a699;
}

.SingleDatePickerInput {
  display: inline-block;
  background-color: #fff;
}

.SingleDatePickerInput__withBorder {
  border-radius: 2px;
  border: 1px solid #dbdbdb;
}

.SingleDatePickerInput__rtl {
  direction: rtl;
}

.SingleDatePickerInput__disabled {
  background-color: #f2f2f2;
}

.SingleDatePickerInput__block {
  display: block;
}

.SingleDatePickerInput__showClearDate {
  padding-right: 30px;
}

.SingleDatePickerInput_clearDate {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  padding: 10px;
  margin: 0 10px 0 5px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.SingleDatePickerInput_clearDate__default:focus,
.SingleDatePickerInput_clearDate__default:hover {
  background: #dbdbdb;
  border-radius: 50%;
}

.SingleDatePickerInput_clearDate__small {
  padding: 6px;
}

.SingleDatePickerInput_clearDate__hide {
  visibility: hidden;
}

.SingleDatePickerInput_clearDate_svg {
  fill: #82888a;
  height: 12px;
  width: 15px;
  vertical-align: middle;
}

.SingleDatePickerInput_clearDate_svg__small {
  height: 9px;
}

.SingleDatePickerInput_calendarIcon {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  padding: 10px;
  margin: 0 5px 0 10px;
}

.SingleDatePickerInput_calendarIcon_svg {
  fill: #82888a;
  height: 15px;
  width: 14px;
  vertical-align: middle;
}

.SingleDatePicker {
  position: relative;
  display: inline-block;
}

.SingleDatePicker__block {
  display: block;
}

.SingleDatePicker_picker {
  z-index: 1;
  background-color: #fff;
  position: absolute;
}

.SingleDatePicker_picker__rtl {
  direction: rtl;
}

.SingleDatePicker_picker__directionLeft {
  left: 0;
}

.SingleDatePicker_picker__directionRight {
  right: 0;
}

.SingleDatePicker_picker__portal {
  background-color: rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.SingleDatePicker_picker__fullScreenPortal {
  background-color: #fff;
}

.SingleDatePicker_closeButton {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  padding: 15px;
  z-index: 2;
}

.SingleDatePicker_closeButton:focus,
.SingleDatePicker_closeButton:hover {
  color: #b0b3b4;
  text-decoration: none;
}

.SingleDatePicker_closeButton_svg {
  height: 15px;
  width: 15px;
  fill: #cacccd;
}

.DayPickerKeyboardShortcuts_buttonReset {
  background: 0 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
}

.DayPickerKeyboardShortcuts_buttonReset:active {
  outline: 0;
}

.DayPickerKeyboardShortcuts_show {
  width: 22px;
  position: absolute;
  z-index: 2;
}

.DayPickerKeyboardShortcuts_show__bottomRight {
  border-top: 26px solid transparent;
  border-right: 33px solid #00a699;
  bottom: 0;
  right: 0;
}

.DayPickerKeyboardShortcuts_show__bottomRight:hover {
  border-right: 33px solid #008489;
}

.DayPickerKeyboardShortcuts_show__topRight {
  border-bottom: 26px solid transparent;
  border-right: 33px solid #00a699;
  top: 0;
  right: 0;
}

.DayPickerKeyboardShortcuts_show__topRight:hover {
  border-right: 33px solid #008489;
}

.DayPickerKeyboardShortcuts_show__topLeft {
  border-bottom: 26px solid transparent;
  border-left: 33px solid #00a699;
  top: 0;
  left: 0;
}

.DayPickerKeyboardShortcuts_show__topLeft:hover {
  border-left: 33px solid #008489;
}

.DayPickerKeyboardShortcuts_showSpan {
  color: #fff;
  position: absolute;
}

.DayPickerKeyboardShortcuts_showSpan__bottomRight {
  bottom: 0;
  right: -28px;
}

.DayPickerKeyboardShortcuts_showSpan__topRight {
  top: 1px;
  right: -28px;
}

.DayPickerKeyboardShortcuts_showSpan__topLeft {
  top: 1px;
  left: -28px;
}

.DayPickerKeyboardShortcuts_panel {
  overflow: auto;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 2px;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 2;
  padding: 22px;
  margin: 33px;
}

.DayPickerKeyboardShortcuts_title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.DayPickerKeyboardShortcuts_list {
  list-style: none;
  padding: 0;
  font-size: 14px;
}

.DayPickerKeyboardShortcuts_close {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
}

.DayPickerKeyboardShortcuts_close:active {
  outline: 0;
}

.DayPickerKeyboardShortcuts_closeSvg {
  height: 15px;
  width: 15px;
  fill: #cacccd;
}

.DayPickerKeyboardShortcuts_closeSvg:focus,
.DayPickerKeyboardShortcuts_closeSvg:hover {
  fill: #82888a;
}

.CalendarDay {
  box-sizing: border-box;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}

.CalendarDay:active {
  outline: 0;
}

.CalendarDay__defaultCursor {
  cursor: default;
}

.CalendarDay__default {
  border: 1px solid #e4e7e7;
  color: #484848;
  background: #fff;
}

.CalendarDay__default:hover {
  background: #e4e7e7;
  border: 1px double #e4e7e7;
  color: inherit;
}

.CalendarDay__hovered_offset {
  background: #f4f5f5;
  border: 1px double #e4e7e7;
  color: inherit;
}

.CalendarDay__outside {
  border: 0;
  background: #fff;
  color: #484848;
}

.CalendarDay__outside:hover {
  border: 0;
}

.CalendarDay__blocked_minimum_nights {
  background: #fff;
  border: 1px solid #eceeee;
  color: #cacccd;
}

.CalendarDay__blocked_minimum_nights:active,
.CalendarDay__blocked_minimum_nights:hover {
  background: #fff;
  color: #cacccd;
}

.CalendarDay__highlighted_calendar {
  background: #ffe8bc;
  color: #484848;
}

.CalendarDay__highlighted_calendar:active,
.CalendarDay__highlighted_calendar:hover {
  background: #ffce71;
  color: #484848;
}

.CalendarDay__selected_span {
  background: #66e2da;
  border: 1px solid #33dacd;
  color: #fff;
}

.CalendarDay__selected_span:active,
.CalendarDay__selected_span:hover {
  background: #33dacd;
  border: 1px solid #33dacd;
  color: #fff;
}

.CalendarDay__last_in_range {
  border-right: #00a699;
}

.CalendarDay__selected,
.CalendarDay__selected:active,
.CalendarDay__selected:hover {
  background: #00a699;
  border: 1px solid #00a699;
  color: #fff;
}

.CalendarDay__hovered_span,
.CalendarDay__hovered_span:hover {
  background: #b2f1ec;
  border: 1px solid #80e8e0;
  color: #007a87;
}

.CalendarDay__hovered_span:active {
  background: #80e8e0;
  border: 1px solid #80e8e0;
  color: #007a87;
}

.CalendarDay__blocked_calendar,
.CalendarDay__blocked_calendar:active,
.CalendarDay__blocked_calendar:hover {
  background: #cacccd;
  border: 1px solid #cacccd;
  color: #82888a;
}

.CalendarDay__blocked_out_of_range,
.CalendarDay__blocked_out_of_range:active,
.CalendarDay__blocked_out_of_range:hover {
  background: #fff;
  border: 1px solid #e4e7e7;
  color: #cacccd;
}

.CalendarMonth {
  background: #fff;
  text-align: center;
  vertical-align: top;
  -webkit-user-select: none;
  user-select: none;
}

.CalendarMonth_table {
  border-collapse: collapse;
  border-spacing: 0;
}

.CalendarMonth_verticalSpacing {
  border-collapse: separate;
}

.CalendarMonth_caption {
  color: #484848;
  font-size: 18px;
  text-align: center;
  padding-top: 22px;
  padding-bottom: 37px;
  caption-side: initial;
}

.CalendarMonth_caption__verticalScrollable {
  padding-top: 12px;
  padding-bottom: 7px;
}

.CalendarMonthGrid {
  background: #fff;
  text-align: left;
  z-index: 0;
}

.CalendarMonthGrid__animating {
  z-index: 1;
}

.CalendarMonthGrid__horizontal {
  position: absolute;
  left: 0;
}

.CalendarMonthGrid__vertical {
  margin: 0 auto;
}

.CalendarMonthGrid__vertical_scrollable {
  margin: 0 auto;
  overflow-y: scroll;
}

.CalendarMonthGrid_month__horizontal {
  display: inline-block;
  vertical-align: top;
  min-height: 100%;
}

.CalendarMonthGrid_month__hideForAnimation {
  position: absolute;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

.CalendarMonthGrid_month__hidden {
  visibility: hidden;
}

.DayPickerNavigation {
  position: relative;
  z-index: 2;
}

.DayPickerNavigation__horizontal {
  height: 0;
}

.DayPickerNavigation__verticalDefault {
  position: absolute;
  width: 100%;
  height: 52px;
  bottom: 0;
  left: 0;
}

.DayPickerNavigation__verticalScrollableDefault {
  position: relative;
}

.DayPickerNavigation_button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border: 0;
  padding: 0;
  margin: 0;
}

.DayPickerNavigation_button__default {
  border: 1px solid #e4e7e7;
  background-color: #fff;
  color: #757575;
}

.DayPickerNavigation_button__default:focus,
.DayPickerNavigation_button__default:hover {
  border: 1px solid #c4c4c4;
}

.DayPickerNavigation_button__default:active {
  background: #f2f2f2;
}

.DayPickerNavigation_button__horizontalDefault {
  position: absolute;
  top: 18px;
  line-height: 0.78;
  border-radius: 3px;
  padding: 6px 9px;
}

.DayPickerNavigation_leftButton__horizontalDefault {
  left: 22px;
}

.DayPickerNavigation_rightButton__horizontalDefault {
  right: 22px;
}

.DayPickerNavigation_button__verticalDefault {
  padding: 5px;
  background: #fff;
  box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  display: inline-block;
  height: 100%;
  width: 50%;
}

.DayPickerNavigation_nextButton__verticalDefault {
  border-left: 0;
}

.DayPickerNavigation_nextButton__verticalScrollableDefault {
  width: 100%;
}

.DayPickerNavigation_svg__horizontal {
  height: 19px;
  width: 19px;
  fill: #82888a;
  display: block;
}

.DayPickerNavigation_svg__vertical {
  height: 42px;
  width: 42px;
  fill: #484848;
  display: block;
}

.DayPicker {
  background: #fff;
  position: relative;
  text-align: left;
}

.DayPicker__horizontal {
  background: #fff;
}

.DayPicker__verticalScrollable {
  height: 100%;
}

.DayPicker__hidden {
  visibility: hidden;
}

.DayPicker__withBorder {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.07);
  border-radius: 3px;
}

.DayPicker_portal__horizontal {
  box-shadow: none;
  position: absolute;
  left: 50%;
  top: 50%;
}

.DayPicker_portal__vertical {
  position: initial;
}

.DayPicker_focusRegion {
  outline: 0;
}

.DayPicker_calendarInfo__horizontal,
.DayPicker_wrapper__horizontal {
  display: inline-block;
  vertical-align: top;
}

.DayPicker_weekHeaders {
  position: relative;
}

.DayPicker_weekHeaders__horizontal {
  margin-left: 13px;
}

.DayPicker_weekHeader {
  color: #757575;
  position: absolute;
  top: 62px;
  z-index: 2;
  text-align: left;
  padding: 0 !important;
}

.DayPicker_weekHeader__vertical {
  left: 50%;
}

.DayPicker_weekHeader__verticalScrollable {
  top: 0;
  display: table-row;
  border-bottom: 1px solid #dbdbdb;
  background: #fff;
  margin-left: 0;
  left: 0;
  width: 100%;
  text-align: center;
}

.DayPicker_weekHeader_ul {
  list-style: none;
  margin: 1px 0;
  padding-left: 0;
  padding-right: 0;
  font-size: 14px;
}

.DayPicker_weekHeader_li {
  display: inline-block;
  text-align: center;
  margin: 0 1px;
}

.DayPicker_transitionContainer {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

.DayPicker_transitionContainer__horizontal {
  transition: height 0.2s ease-in-out;
}

.DayPicker_transitionContainer__vertical {
  width: 100%;
}

.DayPicker_transitionContainer__verticalScrollable {
  padding-top: 20px;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  overflow-y: scroll;
}

.DateInput {
  margin: 0;
  padding: 0;
  background: #fff;
  position: relative;
  display: inline-block;
  width: 130px;
  vertical-align: middle;
}

.DateInput__small {
  width: 97px;
}

.DateInput__block {
  width: 100%;
}

.DateInput__disabled {
  background: #f2f2f2;
  color: #dbdbdb;
}

.DateInput_input {
  font-weight: 200;
  font-size: 19px;
  line-height: 24px;
  color: #484848;
  background-color: #fff;
  width: 100%;
  padding: 11px 11px 9px;
  border: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 2px solid transparent;
  border-left: 0;
  border-radius: 0;
}

.DateInput_input__small {
  font-size: 15px;
  line-height: 18px;
  letter-spacing: 0.2px;
  padding: 7px 7px 5px;
}

.DateInput_input__regular {
  font-weight: auto;
}

.DateInput_input__readOnly {
  -webkit-user-select: none;
  user-select: none;
}

.DateInput_input__focused {
  outline: 0;
  background: #fff;
  border: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 2px solid #008489;
  border-left: 0;
}

.DateInput_input__disabled {
  background: #f2f2f2;
  font-style: italic;
}

.DateInput_screenReaderMessage {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.DateInput_fang {
  position: absolute;
  width: 20px;
  height: 10px;
  left: 22px;
  z-index: 2;
}

.DateInput_fangShape {
  fill: #fff;
}

.DateInput_fangStroke {
  stroke: #dbdbdb;
  fill: transparent;
}

.DateRangePickerInput {
  background-color: #fff;
  display: inline-block;
}

.DateRangePickerInput__disabled {
  background: #f2f2f2;
}

.DateRangePickerInput__withBorder {
  border-radius: 2px;
  border: 1px solid #dbdbdb;
}

.DateRangePickerInput__rtl {
  direction: rtl;
}

.DateRangePickerInput__block {
  display: block;
}

.DateRangePickerInput__showClearDates {
  padding-right: 30px;
}

.DateRangePickerInput_arrow {
  display: inline-block;
  vertical-align: middle;
  color: #484848;
}

.DateRangePickerInput_arrow_svg {
  vertical-align: middle;
  fill: #484848;
  height: 24px;
  width: 24px;
}

.DateRangePickerInput_clearDates {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  padding: 10px;
  margin: 0 10px 0 5px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.DateRangePickerInput_clearDates__small {
  padding: 6px;
}

.DateRangePickerInput_clearDates_default:focus,
.DateRangePickerInput_clearDates_default:hover {
  background: #dbdbdb;
  border-radius: 50%;
}

.DateRangePickerInput_clearDates__hide {
  visibility: hidden;
}

.DateRangePickerInput_clearDates_svg {
  fill: #82888a;
  height: 12px;
  width: 15px;
  vertical-align: middle;
}

.DateRangePickerInput_clearDates_svg__small {
  height: 9px;
}

.DateRangePickerInput_calendarIcon {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  padding: 10px;
  margin: 0 5px 0 10px;
}

.DateRangePickerInput_calendarIcon_svg {
  fill: #82888a;
  height: 15px;
  width: 14px;
  vertical-align: middle;
}

.DateRangePicker {
  position: relative;
  display: inline-block;
}

.DateRangePicker__block {
  display: block;
}

.DateRangePicker_picker {
  z-index: 1;
  background-color: #fff;
  position: absolute;
}

.DateRangePicker_picker__rtl {
  direction: rtl;
}

.DateRangePicker_picker__directionLeft {
  left: 0;
}

.DateRangePicker_picker__directionRight {
  right: 0;
}

.DateRangePicker_picker__portal {
  background-color: rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.DateRangePicker_picker__fullScreenPortal {
  background-color: #fff;
}

.DateRangePicker_closeButton {
  background: 0 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: normal;
  overflow: visible;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  padding: 15px;
  z-index: 2;
}

.DateRangePicker_closeButton:focus,
.DateRangePicker_closeButton:hover {
  color: #b0b3b4;
  text-decoration: none;
}

.DateRangePicker_closeButton_svg {
  height: 15px;
  width: 15px;
  fill: #cacccd;
}

/*rtl:end:ignore*/
.components-datetime {
  padding: 16px;
}
.components-panel__body .components-datetime {
  padding: 0;
}
.components-datetime .components-datetime__calendar-help {
  padding: 16px;
}
.components-datetime .components-datetime__calendar-help h4 {
  margin: 0;
}
.components-datetime .components-datetime__buttons {
  display: flex;
  justify-content: space-between;
}
.components-datetime .components-datetime__date-help-toggle {
  display: block;
  margin-left: auto;
}
.components-datetime fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.components-datetime select,
.components-datetime input {
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
}
@media (prefers-reduced-motion: reduce) {
  .components-datetime select,
.components-datetime input {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-datetime select,
.components-datetime input[type=number],
.components-datetime .components-button {
  height: 30px;
  margin-top: 0;
  margin-bottom: 0;
}

.components-datetime__date {
  min-height: 236px;
  border-top: 1px solid #ddd;
}
.components-datetime__date .DayPickerNavigation_leftButton__horizontalDefault {
  /*!rtl:begin:ignore*/
  left: 13px;
  /*!rtl:end:ignore*/
}
.components-datetime__date .CalendarMonth_caption {
  font-size: 13px;
}
.components-datetime__date .CalendarMonth_table {
  border-collapse: separate;
  border-spacing: 2px;
}
.components-datetime__date .CalendarDay {
  font-size: 13px;
  border: none;
  border-radius: 50%;
  text-align: center;
}
.components-datetime__date .CalendarDay:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px #fff;
  outline: 2px solid transparent;
}
.components-datetime__date .CalendarDay__selected {
  background: var(--wp-admin-theme-color);
  border: 2px solid transparent;
}
.components-datetime__date .CalendarDay__selected:hover {
  background: var(--wp-admin-theme-color-darker-20);
}
.components-datetime__date .CalendarDay__selected:focus {
  box-shadow: inset 0 0 0 1px #fff;
}
.components-datetime__date .DayPickerNavigation_button__horizontalDefault {
  padding: 2px 8px;
  top: 20px;
}
.components-datetime__date .DayPickerNavigation_button__horizontalDefault:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-datetime__date .DayPicker_weekHeader {
  top: 50px;
}
.components-datetime__date .DayPicker_weekHeader .DayPicker_weekHeader_ul {
  margin: 1px;
  padding-left: 0;
  padding-right: 0;
}
.components-datetime__date.is-description-visible .DayPicker {
  visibility: hidden;
}

.components-datetime__date .CalendarDay .components-datetime__date__day {
  height: 100%;
  display: flex;
  justify-content: center;
  align-content: center;
  flex-direction: column;
  position: relative;
}
.components-datetime__date .CalendarDay .components-datetime__date__day.has-events::before {
  content: " ";
  width: 4px;
  height: 4px;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  margin-left: -2px;
  bottom: 0;
  background-color: #fff;
}

.components-datetime__date .CalendarDay:not(.CalendarDay__selected) .components-datetime__date__day.has-events::before {
  background: var(--wp-admin-theme-color);
}

.components-datetime__time {
  padding-bottom: 16px;
}
.components-datetime__time fieldset {
  position: relative;
  margin-bottom: 0.5em;
}
.components-datetime__time fieldset + fieldset {
  margin-bottom: 0;
}
.components-datetime__time .components-datetime__time-field-am-pm fieldset {
  margin-top: 0;
}
.components-datetime__time .components-datetime__time-wrapper {
  display: flex;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-separator {
  display: inline-block;
  padding: 0 3px 0 0;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field-time {
  /*rtl:ignore*/
  direction: ltr;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select {
  margin-right: 4px;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select:focus {
  position: relative;
  z-index: 1;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number] {
  padding: 2px;
  margin-right: 4px;
  text-align: center;
  -moz-appearance: textfield;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]:focus {
  position: relative;
  z-index: 1;
}
.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.components-datetime__time.is-12-hour .components-datetime__time-field-day input {
  margin: -4px 0 0 !important;
  border-radius: 2px 0 0 2px !important;
}
.components-datetime__time.is-12-hour .components-datetime__time-field-year input {
  border-radius: 0 2px 2px 0 !important;
}

.components-datetime__timezone {
  line-height: 30px;
  margin-left: 4px;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

.components-datetime__time-legend {
  font-weight: 600;
  margin-top: 0.5em;
}
.components-datetime__time-legend.invisible {
  position: absolute;
  top: -999em;
  left: -999em;
}

.components-datetime__time-field-hours-input,
.components-datetime__time-field-minutes-input,
.components-datetime__time-field-day-input {
  width: 35px;
}

.components-datetime__time-field-year-input {
  width: 55px;
}

.components-datetime__time-field-month-select {
  max-width: 145px;
}

.components-popover .components-datetime__date {
  padding-left: 4px;
}

.block-editor-dimension-control .components-base-control__field {
  display: flex;
  align-items: center;
}
.block-editor-dimension-control .components-base-control__label {
  display: flex;
  align-items: center;
  margin-right: 1em;
  margin-bottom: 0;
}
.block-editor-dimension-control .components-base-control__label .dashicon {
  margin-right: 0.5em;
}
.block-editor-dimension-control.is-manual .components-base-control__label {
  width: 10em;
}

body.is-dragging-components-draggable {
  cursor: move;
  /* Fallback for IE/Edge < 14 */
  cursor: grabbing !important;
}

.components-draggable__invisible-drag-image {
  position: fixed;
  left: -1000px;
  height: 50px;
  width: 50px;
}

.components-draggable__clone {
  position: fixed;
  padding: 0;
  background: transparent;
  pointer-events: none;
  z-index: 1000000000;
}

.components-drop-zone {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s opacity, 0.3s background-color, 0s visibility 0.3s;
  border: 2px solid var(--wp-admin-theme-color);
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .components-drop-zone {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-drop-zone.is-active {
  opacity: 1;
  visibility: visible;
  transition: 0.3s opacity, 0.3s background-color;
}
@media (prefers-reduced-motion: reduce) {
  .components-drop-zone.is-active {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-drop-zone.is-dragging-over-element {
  background-color: var(--wp-admin-theme-color);
}

.components-drop-zone__content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 50;
  transform: translateY(-50%);
  width: 100%;
  text-align: center;
  color: #fff;
  transition: transform 0.2s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-drop-zone__content {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-drop-zone.is-dragging-over-element .components-drop-zone__content {
  transform: translateY(-50%) scale(1.05);
}

.components-drop-zone__content-icon,
.components-drop-zone__content-text {
  display: block;
}

.components-drop-zone__content-icon {
  margin: 0 auto;
  line-height: 0;
  fill: currentColor;
}

.components-drop-zone__content-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.components-dropdown {
  display: inline-block;
}

.components-dropdown__content .components-popover__content > div {
  padding: 12px;
}

.components-dropdown-menu__popover .components-popover__content {
  min-width: 200px;
}

.components-dropdown-menu__menu {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  line-height: 1.4;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item,
.components-dropdown-menu__menu .components-menu-item {
  width: 100%;
  padding: 6px;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator,
.components-dropdown-menu__menu .components-menu-item.has-separator {
  margin-top: 6px;
  position: relative;
  overflow: visible;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator::before,
.components-dropdown-menu__menu .components-menu-item.has-separator::before {
  display: block;
  content: "";
  box-sizing: content-box;
  background-color: #ddd;
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 1px;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-active svg,
.components-dropdown-menu__menu .components-menu-item.is-active svg {
  color: #fff;
  background: #1e1e1e;
  box-shadow: 0 0 0 1px #1e1e1e;
  border-radius: 1px;
}
.components-dropdown-menu__menu .components-dropdown-menu__menu-item > svg,
.components-dropdown-menu__menu .components-menu-item > svg {
  border-radius: 2px;
  width: 24px;
  height: 24px;
}
.components-dropdown-menu__menu .components-menu-item__button,
.components-dropdown-menu__menu .components-menu-item__button.components-button {
  min-height: 36px;
  height: auto;
  text-align: left;
  padding-left: 8px;
  padding-right: 8px;
}
.components-dropdown-menu__menu .components-menu-group {
  padding: 12px;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: -12px;
  margin-right: -12px;
}
.components-dropdown-menu__menu .components-menu-group:first-child {
  margin-top: -12px;
}
.components-dropdown-menu__menu .components-menu-group:last-child {
  margin-bottom: -12px;
}
.components-dropdown-menu__menu .components-menu-group + .components-menu-group {
  margin-top: 0;
  border-top: 1px solid #ccc;
  padding: 12px;
}
.is-alternate .components-dropdown-menu__menu .components-menu-group + .components-menu-group {
  border-color: #1e1e1e;
}

.components-font-size-picker__controls {
  max-width: 248px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.components-font-size-picker__controls .components-unit-control-wrapper {
  margin-right: 8px;
}
.components-font-size-picker__controls .components-unit-control-wrapper .components-input-control__label {
  font-weight: 300;
  padding-bottom: 0 !important;
  margin-bottom: 8px !important;
}
.components-font-size-picker__controls .components-custom-select-control__button {
  min-width: 120px;
}
.components-font-size-picker__controls .components-font-size-picker__number {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  display: inline-block;
  font-weight: 500;
  height: 30px;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 8px;
  margin-top: 8px;
  width: 54px;
}
@media (prefers-reduced-motion: reduce) {
  .components-font-size-picker__controls .components-font-size-picker__number {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-font-size-picker__controls .components-font-size-picker__number {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-font-size-picker__controls .components-font-size-picker__number:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-font-size-picker__controls .components-font-size-picker__number::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-font-size-picker__controls .components-font-size-picker__number::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-font-size-picker__controls .components-font-size-picker__number:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-font-size-picker__controls .components-font-size-picker__number[value=""] + .components-button {
  cursor: default;
  opacity: 0.3;
  pointer-events: none;
}
.components-font-size-picker__controls .components-font-size-picker__number-container {
  display: flex;
  flex-direction: column;
}
.components-font-size-picker__controls .components-font-size-picker__select {
  margin-right: 8px;
}
.components-font-size-picker__controls .components-color-palette__clear {
  height: 30px;
  margin-top: 26px;
}

.components-font-size-picker__custom-input .components-range-control__slider + .dashicon {
  width: 30px;
  height: 30px;
}

.components-font-size-picker {
  border: 0;
  padding: 0;
  margin: 0;
}

.components-form-toggle {
  position: relative;
  display: inline-block;
}
.components-form-toggle .components-form-toggle__track {
  content: "";
  display: inline-block;
  box-sizing: border-box;
  vertical-align: top;
  background-color: #fff;
  border: 1px solid #1e1e1e;
  width: 36px;
  height: 18px;
  border-radius: 9px;
  transition: 0.2s background ease;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-toggle .components-form-toggle__track {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-form-toggle .components-form-toggle__thumb {
  display: block;
  position: absolute;
  box-sizing: border-box;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: 0.1s transform ease;
  background-color: #1e1e1e;
  border: 5px solid #1e1e1e;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-toggle .components-form-toggle__thumb {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-form-toggle.is-checked .components-form-toggle__track {
  background-color: var(--wp-admin-theme-color);
  border: 1px solid var(--wp-admin-theme-color);
  border: 9px solid transparent;
}
.components-form-toggle .components-form-toggle__input:focus + .components-form-toggle__track {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.components-form-toggle.is-checked .components-form-toggle__thumb {
  background-color: #fff;
  border-width: 0;
  transform: translateX(18px);
}
.components-form-toggle.is-disabled, .components-disabled .components-form-toggle {
  opacity: 0.3;
}

.components-form-toggle input.components-form-toggle__input[type=checkbox] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  padding: 0;
  z-index: 1;
  border: none;
}
.components-form-toggle input.components-form-toggle__input[type=checkbox]:checked {
  background: none;
}
.components-form-toggle input.components-form-toggle__input[type=checkbox]::before {
  content: "";
}

.components-form-token-field__input-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  margin: 0 0 8px 0;
  padding: 2px 4px;
  cursor: text;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-token-field__input-container {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-form-token-field__input-container {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-form-token-field__input-container:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-form-token-field__input-container::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-form-token-field__input-container::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-form-token-field__input-container:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-form-token-field__input-container.is-disabled {
  background: #ddd;
  border-color: #ddd;
}
.components-form-token-field__input-container.is-active {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-form-token-field__input-container input[type=text].components-form-token-field__input {
  display: inline-block;
  flex: 1;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  margin-left: 4px;
  padding: 0;
  min-height: 24px;
  min-width: 50px;
  background: inherit;
  border: 0;
  color: #1e1e1e;
  box-shadow: none;
}
@media (min-width: 600px) {
  .components-form-token-field__input-container input[type=text].components-form-token-field__input {
    font-size: 13px;
  }
}
.components-form-token-field__input-container input[type=text].components-form-token-field__input:focus, .components-form-token-field.is-active .components-form-token-field__input-container input[type=text].components-form-token-field__input {
  outline: none;
  box-shadow: none;
}
.components-form-token-field__input-container .components-form-token-field__token + input[type=text].components-form-token-field__input {
  width: auto;
}

.components-form-token-field__label {
  display: inline-block;
  margin-bottom: 4px;
}

.components-form-token-field__help {
  font-size: 12px;
  font-style: normal;
  color: #757575;
}

.components-form-token-field__token {
  font-size: 13px;
  display: flex;
  margin: 2px 4px 2px 0;
  color: #1e1e1e;
  max-width: 100%;
}
.components-form-token-field__token.is-success .components-form-token-field__token-text,
.components-form-token-field__token.is-success .components-form-token-field__remove-token {
  background: #4ab866;
}
.components-form-token-field__token.is-error .components-form-token-field__token-text,
.components-form-token-field__token.is-error .components-form-token-field__remove-token {
  background: #cc1818;
}
.components-form-token-field__token.is-validating .components-form-token-field__token-text,
.components-form-token-field__token.is-validating .components-form-token-field__remove-token {
  color: #757575;
}
.components-form-token-field__token.is-borderless {
  position: relative;
  padding: 0 16px 0 0;
}
.components-form-token-field__token.is-borderless .components-form-token-field__token-text {
  background: transparent;
  color: var(--wp-admin-theme-color);
}
.components-form-token-field__token.is-borderless .components-form-token-field__remove-token {
  background: transparent;
  color: #757575;
  position: absolute;
  top: 1px;
  right: 0;
}
.components-form-token-field__token.is-borderless.is-success .components-form-token-field__token-text {
  color: #4ab866;
}
.components-form-token-field__token.is-borderless.is-error .components-form-token-field__token-text {
  color: #cc1818;
  border-radius: 4px 0 0 4px;
  padding: 0 4px 0 6px;
}
.components-form-token-field__token.is-borderless.is-validating .components-form-token-field__token-text {
  color: #1e1e1e;
}
.components-form-token-field__token.is-disabled .components-form-token-field__remove-token {
  cursor: default;
}

.components-form-token-field__token-text,
.components-form-token-field__remove-token.components-button {
  display: inline-block;
  line-height: 24px;
  height: auto;
  background: #ddd;
  min-width: unset;
  transition: all 0.2s cubic-bezier(0.4, 1, 0.4, 1);
}
@media (prefers-reduced-motion: reduce) {
  .components-form-token-field__token-text,
.components-form-token-field__remove-token.components-button {
    transition-duration: 0s;
    transition-delay: 0s;
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

.components-form-token-field__token-text {
  border-radius: 2px 0 0 2px;
  padding: 0 0 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.components-form-token-field__remove-token.components-button {
  cursor: pointer;
  border-radius: 0 2px 2px 0;
  padding: 0 2px;
  color: #1e1e1e;
  line-height: 10px;
  overflow: initial;
}
.components-form-token-field__remove-token.components-button:hover {
  color: #1e1e1e;
}

.components-form-token-field__suggestions-list {
  flex: 1 0 100%;
  min-width: 100%;
  max-height: 9em;
  overflow-y: auto;
  transition: all 0.15s ease-in-out;
  list-style: none;
  border-top: 1px solid #757575;
  margin: 4px -4px -4px;
  padding: 0;
}
@media (prefers-reduced-motion: reduce) {
  .components-form-token-field__suggestions-list {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-form-token-field__suggestion {
  color: #757575;
  display: block;
  font-size: 13px;
  padding: 4px 8px;
  margin: 0;
  cursor: pointer;
}
.components-form-token-field__suggestion.is-selected {
  background: var(--wp-admin-theme-color);
  color: #fff;
}

.components-form-token-field__suggestion-match {
  text-decoration: underline;
}

@media (min-width: 600px) {
  .components-guide {
    width: 600px;
  }
}
.components-guide .components-modal__header {
  background: none;
  border-bottom: none;
  width: 100%;
  padding: 0;
  margin: 0;
}
.components-guide .components-modal__header .components-button {
  align-self: flex-start;
  margin: 8px 8px 0 0;
  position: static;
}
.components-guide .components-modal__header .components-button:hover svg {
  fill: #fff;
}
.components-guide__container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: -60px;
  min-height: 100%;
}
.components-guide__page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
@media (min-width: 600px) {
  .components-guide__page {
    min-height: 300px;
  }
}
.components-guide__footer {
  align-content: center;
  display: flex;
  height: 30px;
  justify-content: center;
  margin: 0 0 24px 0;
  padding: 0 32px;
  position: relative;
  width: 100%;
}
@media (max-width: 600px) {
  .components-guide__footer {
    position: absolute;
    bottom: 0;
  }
}
.components-guide__page-control {
  margin: 0;
  text-align: center;
}
.components-guide__page-control li {
  display: inline-block;
  margin: 0;
}
.components-guide__page-control .components-button {
  height: 30px;
  min-width: 20px;
  margin: -6px 0;
}
.components-guide .components-modal__content {
  padding: 0;
}

.components-modal__frame.components-guide {
  border: none;
  min-width: 312px;
  height: 80vh;
  max-height: 575px;
}
@media (max-width: 600px) {
  .components-modal__frame.components-guide {
    bottom: 5%;
    left: 16px;
    right: 16px;
    top: 5%;
    margin: 0 auto;
  }
}

.components-button.components-guide__back-button, .components-button.components-guide__forward-button, .components-button.components-guide__finish-button {
  height: 30px;
  position: absolute;
}
.components-button.components-guide__back-button, .components-button.components-guide__forward-button {
  font-size: 13px;
  padding: 4px 2px;
}
.components-button.components-guide__back-button.has-text svg, .components-button.components-guide__forward-button.has-text svg {
  margin: 0;
}
.components-button.components-guide__back-button:hover, .components-button.components-guide__forward-button:hover {
  text-decoration: underline;
}
.components-button.components-guide__back-button {
  left: 32px;
}
.components-button.components-guide__forward-button {
  right: 32px;
  color: #1386bf;
  font-weight: bold;
}
.components-button.components-guide__finish-button {
  right: 32px;
}
.components-button.components-guide__inline-finish-button {
  display: none;
}

[role=region] {
  position: relative;
}

.is-focusing-regions [role=region]:focus::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  outline: 4px solid transparent;
  box-shadow: inset 0 0 0 4px var(--wp-admin-theme-color);
}
@supports (outline-offset: 1px) {
  .is-focusing-regions [role=region]:focus::after {
    content: none;
  }
  .is-focusing-regions [role=region]:focus {
    outline-style: solid;
    outline-color: var(--wp-admin-theme-color);
    outline-width: 4px;
    outline-offset: -4px;
  }
}

.components-menu-group + .components-menu-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1e1e1e;
}
.components-menu-group + .components-menu-group.has-hidden-separator {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.components-menu-group__label {
  padding: 0 8px;
  margin-top: 4px;
  margin-bottom: 12px;
  color: #757575;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 500;
}

.components-menu-item__button,
.components-menu-item__button.components-button {
  width: 100%;
}
.components-menu-item__button .components-menu-items__item-icon,
.components-menu-item__button.components-button .components-menu-items__item-icon {
  margin-right: -2px;
  margin-left: 24px;
  display: inline-block;
  flex: 0 0 auto;
}
.components-menu-item__button .components-menu-item__shortcut + .components-menu-items__item-icon,
.components-menu-item__button.components-button .components-menu-item__shortcut + .components-menu-items__item-icon {
  margin-left: 8px;
}
.components-menu-item__button .block-editor-block-icon,
.components-menu-item__button.components-button .block-editor-block-icon {
  margin-left: -2px;
  margin-right: 8px;
}
.components-menu-item__button.is-primary,
.components-menu-item__button.components-button.is-primary {
  justify-content: center;
}
.components-menu-item__button.is-primary .components-menu-item__item,
.components-menu-item__button.components-button.is-primary .components-menu-item__item {
  margin-right: 0;
}

.components-menu-item__info-wrapper {
  display: flex;
  flex-direction: column;
  margin-right: auto;
}

.components-menu-item__info {
  margin-top: 4px;
  font-size: 12px;
  color: #757575;
  white-space: normal;
}

.components-menu-item__item {
  white-space: nowrap;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
}

.components-menu-item__shortcut {
  align-self: center;
  margin-right: 0;
  margin-left: auto;
  padding-left: 24px;
  color: currentColor;
  display: none;
}
@media (min-width: 480px) {
  .components-menu-item__shortcut {
    display: inline;
  }
}

.components-menu-items-choice svg,
.components-menu-items-choice.components-button svg {
  margin-right: 12px;
}
.components-menu-items-choice.has-icon,
.components-menu-items-choice.components-button.has-icon {
  padding-left: 12px;
}

.components-modal__screen-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 100000;
  animation: edit-post__fade-in-animation 0.2s ease-out 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-modal__screen-overlay {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

.components-modal__frame {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  margin: 0;
  background: #fff;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  overflow: auto;
}
@media (min-width: 600px) {
  .components-modal__frame {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    min-width: 360px;
    max-width: calc(100% - 16px - 16px);
    max-height: 90%;
    transform: translate(-50%, -50%);
    animation: components-modal__appear-animation 0.1s ease-out;
    animation-fill-mode: forwards;
  }
}
@media (min-width: 600px) and (prefers-reduced-motion: reduce) {
  .components-modal__frame {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

@keyframes components-modal__appear-animation {
  from {
    margin-top: 32px;
  }
  to {
    margin-top: 0;
  }
}
.components-modal__header {
  box-sizing: border-box;
  border-bottom: 1px solid #ddd;
  padding: 0 32px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background: #fff;
  align-items: center;
  height: 60px;
  z-index: 10;
  position: relative;
  position: sticky;
  top: 0;
  margin: 0 -32px 24px;
}
@supports (-ms-ime-align: auto) {
  .components-modal__header {
    position: fixed;
    width: 100%;
  }
}
.components-modal__header .components-modal__header-heading {
  font-size: 1rem;
  font-weight: 600;
}
.components-modal__header h1 {
  line-height: 1;
  margin: 0;
}
.components-modal__header .components-button {
  position: relative;
  left: 8px;
}

.components-modal__header-heading-container {
  align-items: center;
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  justify-content: left;
}

.components-modal__header-icon-container {
  display: inline-block;
}
.components-modal__header-icon-container svg {
  max-width: 36px;
  max-height: 36px;
  padding: 8px;
}

.components-modal__content {
  box-sizing: border-box;
  height: 100%;
  padding: 0 32px 24px;
}
@supports (-ms-ime-align: auto) {
  .components-modal__content {
    padding-top: 60px;
  }
}

.components-notice {
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  background-color: #fff;
  border-left: 4px solid var(--wp-admin-theme-color);
  margin: 5px 15px 2px;
  padding: 8px 12px;
  align-items: center;
}
.components-notice.is-dismissible {
  padding-right: 36px;
  position: relative;
}
.components-notice.is-success {
  border-left-color: #4ab866;
  background-color: #eff9f1;
}
.components-notice.is-warning {
  border-left-color: #f0b849;
  background-color: #fef8ee;
}
.components-notice.is-error {
  border-left-color: #cc1818;
  background-color: #f4a2a2;
}

.components-notice__content {
  flex-grow: 1;
  margin: 4px 25px 4px 0;
}

.components-notice__actions {
  display: flex;
  flex-wrap: wrap;
}

.components-notice__action.components-button {
  margin-right: 8px;
}
.components-notice__action.components-button, .components-notice__action.components-button.is-link {
  margin-left: 12px;
}
.components-notice__action.components-button.is-secondary {
  vertical-align: initial;
}

.components-notice__dismiss {
  color: #757575;
  align-self: flex-start;
  flex-shrink: 0;
}
.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover, .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active, .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus {
  color: #1e1e1e;
  background-color: transparent;
}
.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover {
  box-shadow: none;
}

.components-notice-list {
  max-width: 100vw;
  box-sizing: border-box;
}
.components-notice-list .components-notice__content {
  margin-top: 12px;
  margin-bottom: 12px;
  line-height: 2;
}
.components-notice-list .components-notice__action.components-button {
  display: block;
  margin-left: 0;
  margin-top: 8px;
}

.components-panel {
  background: #fff;
  border: 1px solid #e0e0e0;
}
.components-panel > .components-panel__header:first-child,
.components-panel > .components-panel__body:first-child {
  margin-top: -1px;
}
.components-panel > .components-panel__header:last-child,
.components-panel > .components-panel__body:last-child {
  border-bottom-width: 0;
}

.components-panel + .components-panel {
  margin-top: -1px;
}

.components-panel__body {
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}
.components-panel__body h3 {
  margin: 0 0 0.5em;
}
.components-panel__body.is-opened {
  padding: 16px;
}

.components-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.components-panel__header h2 {
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.components-panel__body + .components-panel__body,
.components-panel__body + .components-panel__header,
.components-panel__header + .components-panel__body,
.components-panel__header + .components-panel__header {
  margin-top: -1px;
}

.components-panel__body > .components-panel__body-title {
  display: block;
  padding: 0;
  font-size: inherit;
  margin-top: 0;
  margin-bottom: 0;
  transition: 0.1s background ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-panel__body > .components-panel__body-title {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-panel__body.is-opened > .components-panel__body-title {
  margin: -16px;
  margin-bottom: 5px;
}

.components-panel__body > .components-panel__body-title:hover {
  background: #f0f0f0;
  border: none;
}

.components-panel__body-toggle.components-button {
  position: relative;
  padding: 16px 48px 16px 16px;
  outline: none;
  width: 100%;
  font-weight: 500;
  text-align: left;
  color: #1e1e1e;
  border: none;
  box-shadow: none;
  transition: 0.1s background ease-in-out;
  height: auto;
  /* rtl:begin:ignore */
  /* rtl:end:ignore */
}
@media (prefers-reduced-motion: reduce) {
  .components-panel__body-toggle.components-button {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
.components-panel__body-toggle.components-button:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
  border-radius: 0;
}
.components-panel__body-toggle.components-button .components-panel__arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #1e1e1e;
  fill: currentColor;
  transition: 0.1s color ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .components-panel__body-toggle.components-button .components-panel__arrow {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right {
  transform: scaleX(-1);
  -ms-filter: fliph;
  filter: FlipH;
  margin-top: -10px;
}

.components-panel__icon {
  color: #757575;
  margin: -2px 0 -2px 6px;
}

.components-panel__body-toggle-icon {
  margin-right: -5px;
}

.components-panel__color-title {
  float: left;
  height: 19px;
}

.components-panel__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  min-height: 36px;
}
.components-panel__row select {
  min-width: 0;
}
.components-panel__row label {
  margin-right: 12px;
  flex-shrink: 0;
  max-width: 75%;
}
.components-panel__row:empty, .components-panel__row:first-of-type {
  margin-top: 0;
}

.components-panel .circle-picker {
  padding-bottom: 20px;
}

.components-placeholder.components-placeholder {
  box-sizing: border-box;
  position: relative;
  padding: 1em;
  min-height: 200px;
  width: 100%;
  text-align: left;
  margin: 0;
  color: #1e1e1e;
  -moz-font-smoothing: subpixel-antialiased;
  -webkit-font-smoothing: subpixel-antialiased;
  border-radius: 2px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px #1e1e1e;
  outline: 1px solid transparent;
}
@supports (position: sticky) {
  .components-placeholder.components-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
}
.components-placeholder.components-placeholder .components-base-control__label {
  font-size: 13px;
}

.components-placeholder__error,
.components-placeholder__instructions,
.components-placeholder__label,
.components-placeholder__fieldset {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
}

.components-placeholder__label {
  display: flex;
  font-weight: 600;
  margin-bottom: 16px;
  align-items: center;
}
.components-placeholder__label > svg,
.components-placeholder__label .dashicon,
.components-placeholder__label .block-editor-block-icon {
  fill: currentColor;
  margin-right: 1ch;
}
.components-placeholder__label:empty {
  display: none;
}

.components-placeholder__fieldset,
.components-placeholder__fieldset form {
  display: flex;
  flex-direction: row;
  width: 100%;
  flex-wrap: wrap;
}
.components-placeholder__fieldset p,
.components-placeholder__fieldset form p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
}

.components-placeholder__fieldset.is-column-layout,
.components-placeholder__fieldset.is-column-layout form {
  flex-direction: column;
}

.components-placeholder__input[type=url] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  margin: 0 8px 0 0;
  flex: 1 1 auto;
}
@media (prefers-reduced-motion: reduce) {
  .components-placeholder__input[type=url] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-placeholder__input[type=url] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-placeholder__input[type=url]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-placeholder__input[type=url]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-placeholder__input[type=url]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-placeholder__input[type=url]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}

.components-placeholder__instructions {
  margin-bottom: 1em;
}

.components-placeholder__error {
  margin-top: 1em;
  width: 100%;
}

.components-placeholder__preview img {
  margin: 3%;
  width: 50%;
}

.components-placeholder__fieldset .components-button {
  margin-right: 12px;
  margin-bottom: 12px;
}
.components-placeholder__fieldset .components-button:last-child {
  margin-bottom: 0;
  margin-right: 0;
}

.components-placeholder__fieldset .components-button:not(.is-link) ~ .components-button.is-link {
  margin-left: 10px;
  margin-right: 10px;
}
.components-placeholder__fieldset .components-button:not(.is-link) ~ .components-button.is-link:last-child {
  margin-right: 0;
}

.components-placeholder.is-large .components-placeholder__label {
  font-size: 18pt;
  font-weight: normal;
}
.components-placeholder.is-medium .components-placeholder__instructions, .components-placeholder.is-small .components-placeholder__instructions {
  display: none;
}
.components-placeholder.is-medium .components-placeholder__fieldset,
.components-placeholder.is-medium .components-placeholder__fieldset form, .components-placeholder.is-small .components-placeholder__fieldset,
.components-placeholder.is-small .components-placeholder__fieldset form {
  flex-direction: column;
}
.components-placeholder.is-medium .components-placeholder__fieldset .components-button, .components-placeholder.is-small .components-placeholder__fieldset .components-button {
  margin-right: auto;
}
.components-placeholder.is-small .components-button {
  padding: 0 8px 2px;
}

/*!rtl:begin:ignore*/
.components-popover {
  position: fixed;
  z-index: 1000000;
  top: 0;
  left: 0;
  opacity: 0;
}
.components-popover.is-expanded, .components-popover[data-x-axis][data-y-axis] {
  opacity: 1;
}
.components-popover.is-expanded {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000000 !important;
}
.components-popover:not(.is-without-arrow) {
  margin-left: 2px;
}
.components-popover:not(.is-without-arrow)::before {
  border: 8px solid #ccc;
}
.components-popover:not(.is-without-arrow).is-alternate::before {
  border-color: #1e1e1e;
}
.components-popover:not(.is-without-arrow)::after {
  border: 8px solid #fff;
}
.components-popover:not(.is-without-arrow)::before, .components-popover:not(.is-without-arrow)::after {
  content: "";
  position: absolute;
  height: 0;
  width: 0;
  line-height: 0;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top] {
  margin-top: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top]::before {
  bottom: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top]::after {
  bottom: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=top]::before, .components-popover:not(.is-without-arrow)[data-y-axis=top]::after {
  border-bottom: none;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top-style: solid;
  margin-left: -10px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom] {
  margin-top: 8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom]::before {
  top: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom]::after {
  top: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=bottom]::before, .components-popover:not(.is-without-arrow)[data-y-axis=bottom]::after {
  border-bottom-style: solid;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top: none;
  margin-left: -10px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left] {
  margin-left: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::before {
  right: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::after {
  right: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::before, .components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]::after {
  border-bottom-color: transparent;
  border-left-style: solid;
  border-right: none;
  border-top-color: transparent;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right] {
  margin-left: 8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::before {
  left: -8px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::after {
  left: -6px;
}
.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::before, .components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]::after {
  border-bottom-color: transparent;
  border-left: none;
  border-right-style: solid;
  border-top-color: transparent;
}
.components-popover[data-y-axis=top] {
  bottom: 100%;
}
.components-popover[data-y-axis=bottom] {
  top: 100%;
}
.components-popover[data-y-axis=middle] {
  align-items: center;
  display: flex;
}
.components-popover.is-from-top {
  margin-top: 12px;
}
.components-popover.is-from-bottom {
  margin-top: -12px;
}
.components-popover.is-from-left:not(.is-from-top):not(.is-from-bottom) {
  margin-left: 12px;
}
.components-popover.is-from-right:not(.is-from-top):not(.is-from-bottom) {
  margin-right: 12px;
}

.components-popover__content {
  height: 100%;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}
.is-alternate .components-popover__content {
  border: 1px solid #1e1e1e;
  box-shadow: none;
}
.components-popover .components-popover__content {
  position: absolute;
  height: auto;
  overflow-y: auto;
}
.components-popover.is-expanded .components-popover__content {
  position: static;
  height: calc(100% - 48px);
  overflow-y: visible;
  min-width: auto;
  border: none;
  border-top: 1px solid #1e1e1e;
}
.components-popover[data-y-axis=top] .components-popover__content {
  bottom: 100%;
}
.components-popover[data-x-axis=center] .components-popover__content {
  left: 50%;
  transform: translateX(-50%);
}
.components-popover[data-x-axis=right] .components-popover__content {
  position: absolute;
  left: 100%;
}
.components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content {
  margin-left: -25px;
}
.components-popover[data-x-axis=left] .components-popover__content {
  position: absolute;
  right: 100%;
}
.components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content {
  margin-right: -25px;
}

.components-popover__header {
  align-items: center;
  background: #fff;
  display: flex;
  height: 48px;
  justify-content: space-between;
  padding: 0 8px 0 16px;
}

.components-popover__header-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.components-popover__close.components-button {
  z-index: 5;
}

/*!rtl:end:ignore*/
.components-radio-control {
  display: flex;
  flex-direction: column;
}
.components-radio-control .components-base-control__help {
  margin-top: 0;
}
.components-radio-control .components-base-control__field {
  margin-bottom: 0;
}

.components-radio-control__option:not(:last-child) {
  margin-bottom: 4px;
}

.components-radio-control__input[type=radio] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
  border: 1px solid #1e1e1e;
  margin-right: 12px;
  transition: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin-top: 0;
  margin-right: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .components-radio-control__input[type=radio] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-radio-control__input[type=radio] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-radio-control__input[type=radio]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-radio-control__input[type=radio]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-radio-control__input[type=radio]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-radio-control__input[type=radio]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
@media (min-width: 600px) {
  .components-radio-control__input[type=radio] {
    height: 20px;
    width: 20px;
  }
}
.components-radio-control__input[type=radio]:checked::before {
  box-sizing: inherit;
  width: 8px;
  height: 8px;
  transform: translate(7px, 7px);
  margin: 0;
  background-color: #fff;
  border: 4px solid #fff;
}
@media (min-width: 600px) {
  .components-radio-control__input[type=radio]:checked::before {
    transform: translate(5px, 5px);
  }
}
.components-radio-control__input[type=radio]:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-radio-control__input[type=radio]:checked {
  background: var(--wp-admin-theme-color);
  border-color: var(--wp-admin-theme-color);
}

.components-resizable-box__handle {
  display: none;
  width: 23px;
  height: 23px;
  z-index: 2;
}
.components-resizable-box__container.has-show-handle .components-resizable-box__handle {
  display: block;
}

.components-resizable-box__handle::after {
  display: block;
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid var(--wp-admin-theme-color);
  border-radius: 50%;
  background: #fff;
  cursor: inherit;
  position: absolute;
  top: calc(50% - 8px);
  right: calc(50% - 8px);
}

.components-resizable-box__side-handle::before {
  display: block;
  border-radius: 2px;
  content: "";
  width: 3px;
  height: 3px;
  background: var(--wp-admin-theme-color);
  cursor: inherit;
  position: absolute;
  top: calc(50% - 1px);
  right: calc(50% - 1px);
  transition: transform 0.1s ease-in;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .components-resizable-box__side-handle::before {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}

.components-resizable-box__side-handle {
  z-index: 2;
}

.components-resizable-box__corner-handle {
  z-index: 2;
}

.components-resizable-box__side-handle.components-resizable-box__handle-top,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom,
.components-resizable-box__side-handle.components-resizable-box__handle-top::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom::before {
  width: 100%;
  left: 0;
  border-left: 0;
  border-right: 0;
}

.components-resizable-box__side-handle.components-resizable-box__handle-left,
.components-resizable-box__side-handle.components-resizable-box__handle-right,
.components-resizable-box__side-handle.components-resizable-box__handle-left::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right::before {
  height: 100%;
  top: 0;
  border-top: 0;
  border-bottom: 0;
}

.components-resizable-box__side-handle.components-resizable-box__handle-top:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-top:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
  animation: components-resizable-box__top-bottom-animation 0.1s ease-out 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-resizable-box__side-handle.components-resizable-box__handle-top:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-top:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

.components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:active::before {
  animation: components-resizable-box__left-right-animation 0.1s ease-out 0s;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:active::before {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}

/* This CSS is shown only to Safari, which has a bug with table-caption making it jumpy.
See https://bugs.webkit.org/show_bug.cgi?id=187903. */
@media not all and (-webkit-min-device-pixel-ratio: 0), not all and (min-resolution: 0.001dpcm) {
  @supports (-webkit-appearance: none) {
    .components-resizable-box__side-handle.components-resizable-box__handle-top:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-top:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
      animation: none;
    }

    .components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
.components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
.components-resizable-box__side-handle.components-resizable-box__handle-right:active::before {
      animation: none;
    }
  }
}
@keyframes components-resizable-box__top-bottom-animation {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
@keyframes components-resizable-box__left-right-animation {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}
/*!rtl:begin:ignore*/
.components-resizable-box__handle-right {
  right: calc(11.5px * -1);
}

.components-resizable-box__handle-left {
  left: calc(11.5px * -1);
}

.components-resizable-box__handle-top {
  top: calc(11.5px * -1);
}

.components-resizable-box__handle-bottom {
  bottom: calc(11.5px * -1);
}

/*!rtl:end:ignore*/
.components-responsive-wrapper {
  position: relative;
  max-width: 100%;
}
.components-responsive-wrapper, .components-responsive-wrapper > span {
  display: block;
}

.components-responsive-wrapper__content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: auto;
}

.components-sandbox {
  overflow: hidden;
}

iframe.components-sandbox {
  width: 100%;
}

html.lockscroll,
body.lockscroll {
  overflow: hidden;
}

.components-select-control__input {
  background: #fff;
  height: 36px;
  line-height: 36px;
  margin: 1px;
  outline: 0;
  width: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}
@media (min-width: 782px) {
  .components-select-control__input {
    height: 28px;
    line-height: 28px;
  }
}

@media (max-width: 782px) {
  .components-base-control .components-base-control__field .components-select-control__input {
    font-size: 16px;
  }
}
.components-snackbar {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  background-color: #1e1e1e;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  color: #fff;
  padding: 16px 24px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  cursor: pointer;
  pointer-events: auto;
}
@media (min-width: 600px) {
  .components-snackbar {
    width: -moz-fit-content;
    width: fit-content;
  }
}
.components-snackbar:focus {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
}
.components-snackbar.components-snackbar-explicit-dismiss {
  cursor: default;
}
.components-snackbar .components-snackbar__content-with-icon {
  margin-left: 24px;
}
.components-snackbar .components-snackbar__icon {
  position: absolute;
  top: 24px;
  left: 28px;
}
.components-snackbar .components-snackbar__dismiss-button {
  margin-left: 32px;
  cursor: pointer;
}

.components-snackbar__action.components-button {
  margin-left: 32px;
  color: #fff;
  height: auto;
  flex-shrink: 0;
  line-height: 1.4;
  padding: 0;
}
.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary) {
  text-decoration: underline;
  background-color: transparent;
}
.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus {
  color: #fff;
  box-shadow: none;
  outline: 1px dotted #fff;
}
.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover {
  color: var(--wp-admin-theme-color);
}

.components-snackbar__content {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  line-height: 1.4;
}

.components-snackbar-list {
  position: absolute;
  z-index: 100000;
  width: 100%;
  box-sizing: border-box;
  pointer-events: none;
}

.components-snackbar-list__notice-container {
  position: relative;
  padding-top: 8px;
}

.components-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: transparent;
  background: transparent;
}
.components-swatch::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}

.components-button.has-icon.has-text .components-swatch {
  margin-right: 8px;
}

.components-tab-panel__tabs {
  display: flex;
  align-items: stretch;
  flex-direction: row;
}
.components-tab-panel__tabs[aria-orientation=vertical] {
  flex-direction: column;
}

.components-tab-panel__tabs-item {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;
  height: 48px;
  padding: 3px 16px;
  margin-left: 0;
  font-weight: 500;
  transition: box-shadow 0.1s linear;
  box-sizing: border-box;
}
.components-tab-panel__tabs-item::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  speak: none;
  visibility: hidden;
}
.components-tab-panel__tabs-item:focus:not(:disabled) {
  box-shadow: inset 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
.components-tab-panel__tabs-item.is-active {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -4px 0 0 var(--wp-admin-theme-color);
  position: relative;
}
.components-tab-panel__tabs-item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 1px;
  right: 0;
  left: 0;
  border-bottom: 4px solid transparent;
}
.components-tab-panel__tabs-item:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
.components-tab-panel__tabs-item.is-active:focus {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
}

.components-text-control__input,
.components-text-control__input[type=text],
.components-text-control__input[type=tel],
.components-text-control__input[type=time],
.components-text-control__input[type=url],
.components-text-control__input[type=week],
.components-text-control__input[type=password],
.components-text-control__input[type=color],
.components-text-control__input[type=date],
.components-text-control__input[type=datetime],
.components-text-control__input[type=datetime-local],
.components-text-control__input[type=email],
.components-text-control__input[type=month],
.components-text-control__input[type=number] {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 6px 8px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.1s linear;
  border-radius: 2px;
  border: 1px solid #757575;
  /* Fonts smaller than 16px causes mobile safari to zoom. */
  font-size: 16px;
  /* Override core line-height. To be reviewed. */
  line-height: normal;
}
@media (prefers-reduced-motion: reduce) {
  .components-text-control__input,
.components-text-control__input[type=text],
.components-text-control__input[type=tel],
.components-text-control__input[type=time],
.components-text-control__input[type=url],
.components-text-control__input[type=week],
.components-text-control__input[type=password],
.components-text-control__input[type=color],
.components-text-control__input[type=date],
.components-text-control__input[type=datetime],
.components-text-control__input[type=datetime-local],
.components-text-control__input[type=email],
.components-text-control__input[type=month],
.components-text-control__input[type=number] {
    transition-duration: 0s;
    transition-delay: 0s;
  }
}
@media (min-width: 600px) {
  .components-text-control__input,
.components-text-control__input[type=text],
.components-text-control__input[type=tel],
.components-text-control__input[type=time],
.components-text-control__input[type=url],
.components-text-control__input[type=week],
.components-text-control__input[type=password],
.components-text-control__input[type=color],
.components-text-control__input[type=date],
.components-text-control__input[type=datetime],
.components-text-control__input[type=datetime-local],
.components-text-control__input[type=email],
.components-text-control__input[type=month],
.components-text-control__input[type=number] {
    font-size: 13px;
    /* Override core line-height. To be reviewed. */
    line-height: normal;
  }
}
.components-text-control__input:focus,
.components-text-control__input[type=text]:focus,
.components-text-control__input[type=tel]:focus,
.components-text-control__input[type=time]:focus,
.components-text-control__input[type=url]:focus,
.components-text-control__input[type=week]:focus,
.components-text-control__input[type=password]:focus,
.components-text-control__input[type=color]:focus,
.components-text-control__input[type=date]:focus,
.components-text-control__input[type=datetime]:focus,
.components-text-control__input[type=datetime-local]:focus,
.components-text-control__input[type=email]:focus,
.components-text-control__input[type=month]:focus,
.components-text-control__input[type=number]:focus {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
  outline: 2px solid transparent;
}
.components-text-control__input::-webkit-input-placeholder,
.components-text-control__input[type=text]::-webkit-input-placeholder,
.components-text-control__input[type=tel]::-webkit-input-placeholder,
.components-text-control__input[type=time]::-webkit-input-placeholder,
.components-text-control__input[type=url]::-webkit-input-placeholder,
.components-text-control__input[type=week]::-webkit-input-placeholder,
.components-text-control__input[type=password]::-webkit-input-placeholder,
.components-text-control__input[type=color]::-webkit-input-placeholder,
.components-text-control__input[type=date]::-webkit-input-placeholder,
.components-text-control__input[type=datetime]::-webkit-input-placeholder,
.components-text-control__input[type=datetime-local]::-webkit-input-placeholder,
.components-text-control__input[type=email]::-webkit-input-placeholder,
.components-text-control__input[type=month]::-webkit-input-placeholder,
.components-text-control__input[type=number]::-webkit-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}
.components-text-control__input::-moz-placeholder,
.components-text-control__input[type=text]::-moz-placeholder,
.components-text-control__input[type=tel]::-moz-placeholder,
.components-text-control__input[type=time]::-moz-placeholder,
.components-text-control__input[type=url]::-moz-placeholder,
.components-text-control__input[type=week]::-moz-placeholder,
.components-text-control__input[type=password]::-moz-placeholder,
.components-text-control__input[type=color]::-moz-placeholder,
.components-text-control__input[type=date]::-moz-placeholder,
.components-text-control__input[type=datetime]::-moz-placeholder,
.components-text-control__input[type=datetime-local]::-moz-placeholder,
.components-text-control__input[type=email]::-moz-placeholder,
.components-text-control__input[type=month]::-moz-placeholder,
.components-text-control__input[type=number]::-moz-placeholder {
  opacity: 1;
  color: rgba(30, 30, 30, 0.62);
}
.components-text-control__input:-ms-input-placeholder,
.components-text-control__input[type=text]:-ms-input-placeholder,
.components-text-control__input[type=tel]:-ms-input-placeholder,
.components-text-control__input[type=time]:-ms-input-placeholder,
.components-text-control__input[type=url]:-ms-input-placeholder,
.components-text-control__input[type=week]:-ms-input-placeholder,
.components-text-control__input[type=password]:-ms-input-placeholder,
.components-text-control__input[type=color]:-ms-input-placeholder,
.components-text-control__input[type=date]:-ms-input-placeholder,
.components-text-control__input[type=datetime]:-ms-input-placeholder,
.components-text-control__input[type=datetime-local]:-ms-input-placeholder,
.components-text-control__input[type=email]:-ms-input-placeholder,
.components-text-control__input[type=month]:-ms-input-placeholder,
.components-text-control__input[type=number]:-ms-input-placeholder {
  color: rgba(30, 30, 30, 0.62);
}

.components-tip {
  display: flex;
  color: #757575;
}
.components-tip svg {
  align-self: center;
  fill: #f0b849;
  flex-shrink: 0;
  margin-right: 16px;
}
.components-tip p {
  margin: 0;
}

.components-toggle-control .components-base-control__field {
  display: flex;
  margin-bottom: 12px;
  line-height: initial;
  align-items: center;
}
.components-toggle-control .components-base-control__field .components-form-toggle {
  margin-right: 12px;
}
.components-toggle-control .components-base-control__field .components-toggle-control__label {
  display: block;
}

.components-accessible-toolbar {
  display: inline-flex;
  border: 1px solid #1e1e1e;
  border-radius: 2px;
  flex-shrink: 0;
}
.components-accessible-toolbar > .components-toolbar-group:last-child {
  border-right: none;
}

.components-accessible-toolbar .components-button,
.components-toolbar .components-button {
  position: relative;
  height: 48px;
  z-index: 1;
  padding-left: 16px;
  padding-right: 16px;
}
.components-accessible-toolbar .components-button:focus:enabled,
.components-toolbar .components-button:focus:enabled {
  box-shadow: none;
  outline: none;
}
.components-accessible-toolbar .components-button::before,
.components-toolbar .components-button::before {
  content: "";
  position: absolute;
  display: block;
  border-radius: 2px;
  height: 32px;
  left: 8px;
  right: 8px;
  z-index: -1;
  animation: components-button__appear-animation 0.1s ease;
  animation-fill-mode: forwards;
}
@media (prefers-reduced-motion: reduce) {
  .components-accessible-toolbar .components-button::before,
.components-toolbar .components-button::before {
    animation-duration: 1ms;
    animation-delay: 0s;
  }
}
.components-accessible-toolbar .components-button svg,
.components-toolbar .components-button svg {
  position: relative;
  margin-left: auto;
  margin-right: auto;
}
.components-accessible-toolbar .components-button.is-pressed,
.components-toolbar .components-button.is-pressed {
  background: transparent;
}
.components-accessible-toolbar .components-button.is-pressed:hover,
.components-toolbar .components-button.is-pressed:hover {
  background: transparent;
}
.components-accessible-toolbar .components-button.is-pressed::before,
.components-toolbar .components-button.is-pressed::before {
  background: #1e1e1e;
}
.components-accessible-toolbar .components-button:focus::before,
.components-toolbar .components-button:focus::before {
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 4px #fff;
  outline: 2px solid transparent;
}
.components-accessible-toolbar .components-button.has-icon,
.components-toolbar .components-button.has-icon {
  padding-left: 8px;
  padding-right: 8px;
  min-width: 48px;
  justify-content: center;
}
.components-accessible-toolbar .components-button.components-tab-button,
.components-toolbar .components-button.components-tab-button {
  font-weight: 500;
}
.components-accessible-toolbar .components-button.components-tab-button span,
.components-toolbar .components-button.components-tab-button span {
  display: inline-block;
  padding-left: 0;
  padding-right: 0;
  position: relative;
}

@keyframes components-button__appear-animation {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.components-toolbar__control.components-button {
  position: relative;
}
.components-toolbar__control.components-button[data-subscript] svg {
  padding: 5px 10px 5px 0;
}
.components-toolbar__control.components-button[data-subscript]::after {
  content: attr(data-subscript);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 12px;
  position: absolute;
  right: 8px;
  bottom: 10px;
}
.components-toolbar__control.components-button:active::before {
  display: none;
}
.components-toolbar__control.components-button:not(:disabled).is-pressed[data-subscript]::after {
  color: #fff;
}

.components-toolbar-group {
  min-height: 48px;
  border-right: 1px solid #1e1e1e;
  background-color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  line-height: 0;
}
.components-toolbar-group .components-toolbar-group.components-toolbar-group {
  border-width: 0;
  margin: 0;
}

.components-toolbar {
  min-height: 48px;
  margin: 0;
  border: 1px solid #1e1e1e;
  background-color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.components-toolbar .components-toolbar.components-toolbar {
  border-width: 0;
  margin: 0;
}

div.components-toolbar > div {
  display: block;
  margin: 0;
}
@supports (position: sticky) {
  div.components-toolbar > div {
    display: flex;
  }
}
div.components-toolbar > div + div.has-left-divider {
  margin-left: 6px;
  position: relative;
  overflow: visible;
}
div.components-toolbar > div + div.has-left-divider::before {
  display: inline-block;
  content: "";
  box-sizing: content-box;
  background-color: #ddd;
  position: absolute;
  top: 8px;
  left: -3px;
  width: 1px;
  height: 20px;
}

.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child:last-child,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > * .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child:last-child,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > * .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > * .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > * .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child:last-child,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child:last-child .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > .components-button.components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > * .components-button {
  min-width: 48px;
  padding-left: 12px;
  padding-right: 12px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button::before, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button::before, .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot.components-dropdown > * .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot.components-dropdown > * .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar.components-dropdown > * .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown.components-dropdown > * .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child:last-child::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child:last-child .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > .components-button.components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group.components-dropdown > * .components-button::before {
  left: 8px;
  right: 8px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:first-child > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:first-child > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:first-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:first-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:first-child > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child .components-button {
  min-width: 42px;
  padding-left: 11px;
  padding-right: 6px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:first-child::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:first-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:first-child::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:first-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:first-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:first-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:first-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:first-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:first-child .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:first-child::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:first-child > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:first-child .components-button::before {
  left: 8px;
  right: 2px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown .components-button {
  min-width: 36px;
  padding-left: 6px;
  padding-right: 6px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button svg,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div > .components-button svg,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button svg,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button svg,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div > .components-button svg,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div > .components-button svg,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown .components-button svg,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button svg,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div > .components-button svg,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown .components-button svg {
  min-width: 24px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown .components-button::before {
  left: 2px;
  right: 2px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:last-child,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:last-child > .components-button,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:last-child,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:last-child > .components-button,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:last-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:last-child,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:last-child > .components-button,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:last-child .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:last-child,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:last-child > .components-button,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:last-child .components-button {
  min-width: 42px;
  padding-left: 6px;
  padding-right: 11px;
}
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-button:last-child::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > div:last-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-button:last-child::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > div:last-child > .components-button::before,
.block-editor-block-toolbar > .components-toolbar-group > .block-editor-block-toolbar__slot > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-button:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > div:last-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-button:last-child::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > div:last-child > .components-button::before,
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown > .components-dropdown:last-child .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-button:last-child::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > div:last-child > .components-button::before,
.block-editor-block-toolbar .block-editor-block-toolbar__slot .components-toolbar-group > .components-dropdown:last-child .components-button::before {
  left: 2px;
  right: 8px;
}

.components-tooltip.components-popover {
  z-index: 1000002;
}
.components-tooltip.components-popover .components-popover__content {
  min-width: 0;
}

.components-tooltip .components-popover__content {
  background: #1e1e1e;
  border-radius: 2px;
  border-width: 0;
  color: #fff;
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
  font-size: 12px;
  box-shadow: none;
}
.components-tooltip .components-popover__content > div {
  padding: 4px 8px;
}

.components-tooltip__shortcut {
  display: inline-block;
  margin-left: 8px;
}

.disabled-element-wrapper {
  position: relative;
}
.disabled-element-wrapper .event-catcher {
  z-index: 100002;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.components-visually-hidden {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.components-visually-hidden:focus {
  background-color: #ddd;
  clip: auto !important;
  -webkit-clip-path: none;
          clip-path: none;
  color: #444;
  display: block;
  font-size: 1em;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}init.php000064400000030273152336022500006223 0ustar00<?php
// phpcs:disable Generic.WhiteSpace.ScopeIndent -- our preference is to not indent the whole inner function in this scenario.
if ( ! function_exists( 'et_core_init' ) ) :
/**
 * {@see 'plugins_loaded' (9999999) Must run after cache plugins have been loaded.}
 */
function et_core_init() {
	ET_Core_API_Spam_Providers::instance();
	ET_Core_Cache_Directory::instance();
	ET_Core_PageResource::startup();
	ET_Core_CompatibilityWarning::instance();

	if ( defined( 'ET_CORE_UPDATED' ) ) {
		global $wp_rewrite;
		add_action( 'shutdown', array( $wp_rewrite, 'flush_rules' ) );

		update_option( 'et_core_page_resource_remove_all', true );
	}

	$cache_dir = ET_Core_PageResource::get_cache_directory();

	if ( file_exists( $cache_dir . '/DONOTCACHEPAGE' ) ) {
		! defined( 'DONOTCACHEPAGE' ) ? define( 'DONOTCACHEPAGE', true ) : '';
		@unlink( $cache_dir . '/DONOTCACHEPAGE' );
	}

	if ( get_option( 'et_core_page_resource_remove_all' ) ) {
		ET_Core_PageResource::remove_static_resources( 'all', 'all', true );
	}
}
endif;

if ( ! function_exists( 'et_core_site_has_builder' ) ) :
/**
 * Check is `et_core_site_has_builder` allowed.
 * We can clear cache managed by 3rd party plugins only
 * if Divi, Extra, or the Divi Builder plugin
 * is active when the core was called.
 *
 * @return boolean
 */
function et_core_site_has_builder() {
	global $shortname;

	$core_path                     = get_transient( 'et_core_path' );
	$is_divi_builder_plugin_active = false;

	if ( ! empty( $core_path ) && false !== strpos( $core_path, '/divi-builder/' ) && function_exists('is_plugin_active') ) {
		$is_divi_builder_plugin_active = is_plugin_active( 'divi-builder/divi-builder.php' );
	}

	if( $is_divi_builder_plugin_active || in_array( $shortname, array( 'divi', 'extra' ) ) ) {
		return true;
	}

	return false;
}
endif;

if ( ! function_exists( 'et_core_clear_wp_cache' ) ):
function et_core_clear_wp_cache( $post_id = '' ) {
	if ( ( ! wp_doing_cron() && ! et_core_security_check_passed( 'edit_posts' ) ) || ! et_core_site_has_builder() ) {
		return;
	}

	try {
		// Cache Plugins
		// Comet Cache
		if ( is_callable( 'comet_cache::clear' ) ) {
			comet_cache::clear();
		}

		// WP Rocket
		if ( function_exists( 'rocket_clean_post' ) ) {
			if ( '' !== $post_id ) {
				rocket_clean_post( $post_id );
			} else if ( function_exists( 'rocket_clean_domain' ) ) {
				rocket_clean_domain();
			}
		}

		// W3 Total Cache
		if ( has_action( 'w3tc_flush_post' ) ) {
			'' !== $post_id ? do_action( 'w3tc_flush_post', $post_id ) : do_action( 'w3tc_flush_posts' );
		}

		// WP Super Cache
		if ( function_exists( 'wp_cache_debug' ) && defined( 'WPCACHEHOME' ) ) {
			include_once WPCACHEHOME . 'wp-cache-phase1.php';
			include_once WPCACHEHOME . 'wp-cache-phase2.php';

			if ( '' !== $post_id && function_exists( 'clear_post_supercache' ) ) {
				clear_post_supercache( $post_id );
			} else if ( '' === $post_id && function_exists( 'wp_cache_clear_cache_on_menu' ) ) {
				wp_cache_clear_cache_on_menu();
			}
		}

		// WP Fastest Cache
		if ( isset( $GLOBALS['wp_fastest_cache'] ) ) {
			if ( '' !== $post_id && method_exists( $GLOBALS['wp_fastest_cache'], 'singleDeleteCache' ) ) {
				$GLOBALS['wp_fastest_cache']->singleDeleteCache( $post_id );
			} else if ( '' === $post_id && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
				$GLOBALS['wp_fastest_cache']->deleteCache();
			}
		}

		// Hummingbird
		if ( has_action( 'wphb_clear_page_cache' ) ) {
			'' !== $post_id ? do_action( 'wphb_clear_page_cache', $post_id ) : do_action( 'wphb_clear_page_cache' );
		}

		// WordPress Cache Enabler
		if ( has_action( 'ce_clear_cache' ) ) {
			'' !== $post_id ? do_action( 'ce_clear_post_cache', $post_id ) : do_action( 'ce_clear_cache' );
		}

		// LiteSpeed Cache v3.0+.
		if ( '' !== $post_id && has_action( 'litespeed_purge_post' ) ) {
			do_action( 'litespeed_purge_post', $post_id );
		} elseif ( '' === $post_id && has_action( 'litespeed_purge_all' ) ) {
			do_action( 'litespeed_purge_all' );
		}

		// LiteSpeed Cache v1.1.3 until v3.0.
		if ( '' !== $post_id && function_exists( 'litespeed_purge_single_post' ) ) {
			litespeed_purge_single_post( $post_id );
		} elseif ( '' === $post_id && is_callable( 'LiteSpeed_Cache_API::purge_all' ) ) {
			LiteSpeed_Cache_API::purge_all();
		} elseif ( is_callable( 'LiteSpeed_Cache::get_instance' ) ) {
			// LiteSpeed Cache v1.1.3 below. LiteSpeed_Cache still exist on v2.9.9.2, but no
			// longer exist on v3.0. Keep it here as backward compatibility for lower version.
			$litespeed = LiteSpeed_Cache::get_instance();

			if ( '' !== $post_id && method_exists( $litespeed, 'purge_post' ) ) {
				$litespeed->purge_post( $post_id );
			} else if ( '' === $post_id && method_exists( $litespeed, 'purge_all' ) ) {
				$litespeed->purge_all();
			}
		}

		// Hyper Cache
		if ( class_exists( 'HyperCache' ) && isset( HyperCache::$instance ) ) {
			if ( '' !== $post_id && method_exists( HyperCache::$instance, 'clean_post' ) ) {
				HyperCache::$instance->clean_post( $post_id );
			} else if ( '' === $post_id && method_exists( HyperCache::$instance, 'clean' ) ) {
				HyperCache::$instance->clean_post( $post_id );
			}
		}

		// Hosting Provider Caching
		// Pantheon Advanced Page Cache
		$pantheon_clear     = 'pantheon_wp_clear_edge_keys';
		$pantheon_clear_all = 'pantheon_wp_clear_edge_all';
		if ( function_exists( $pantheon_clear ) || function_exists( $pantheon_clear_all ) ) {
			if ( '' !== $post_id && function_exists( $pantheon_clear ) ) {
				pantheon_wp_clear_edge_keys( array( "post-{$post_id}" ) );
			} else if ( '' === $post_id && function_exists( $pantheon_clear_all ) ) {
				pantheon_wp_clear_edge_all();
			}
		}

		// Siteground
		if ( isset( $GLOBALS['sg_cachepress_supercacher'] ) ) {
			global $sg_cachepress_supercacher;

			if ( is_object( $sg_cachepress_supercacher ) && method_exists( $sg_cachepress_supercacher, 'purge_cache' ) ) {
				$sg_cachepress_supercacher->purge_cache( true );
			}

		} else if ( function_exists( 'sg_cachepress_purge_cache' ) ) {
			sg_cachepress_purge_cache();
		}

		// WP Engine
		if ( class_exists( 'WpeCommon' ) ) {
			is_callable( 'WpeCommon::purge_memcached' ) ? WpeCommon::purge_memcached() : '';
			is_callable( 'WpeCommon::clear_maxcdn_cache' ) ? WpeCommon::clear_maxcdn_cache() : '';
			is_callable( 'WpeCommon::purge_varnish_cache' ) ? WpeCommon::purge_varnish_cache() : '';

			if ( is_callable( 'WpeCommon::instance' ) && $instance = WpeCommon::instance() ) {
				method_exists( $instance, 'purge_object_cache' ) ? $instance->purge_object_cache() : '';
			}
		}

		// Bluehost
		if ( class_exists( 'Endurance_Page_Cache' ) ) {
			wp_doing_ajax() ? ET_Core_LIB_BluehostCache::get_instance()->clear( $post_id ) : do_action( 'epc_purge' );
		}

		// Pressable.
		if ( isset( $GLOBALS['batcache'] ) && is_object( $GLOBALS['batcache'] ) ) {
			wp_cache_flush();
		}

		// Cloudways - Breeze.
		if ( class_exists( 'Breeze_Admin' ) ) {
			$breeze_admin = new Breeze_Admin();
			$breeze_admin->breeze_clear_all_cache();
		}

		// Kinsta.
		if ( class_exists( '\Kinsta\Cache' ) && isset( $GLOBALS['kinsta_cache'] ) && is_object( $GLOBALS['kinsta_cache'] ) ) {
			global $kinsta_cache;

			if ( isset( $kinsta_cache->kinsta_cache_purge ) && method_exists( $kinsta_cache->kinsta_cache_purge, 'purge_complete_caches' ) ) {
				$kinsta_cache->kinsta_cache_purge->purge_complete_caches();
			}
		}

		// GoDaddy.
		if ( class_exists( '\WPaaS\Cache' ) ) {
			global $wpaas_cache_class;

			// Since GD System Plugin 4.51.1 the cache class instance can be accessed
			// with $wpaas_cache_class global. In addition to this, the 'has_ban' method
			// is no longer static. To cover both static and non-static versions we
			// can test if $wpaas_cache_class exists and use the correct type accordingly.
			$has_ban = $wpaas_cache_class ? $wpaas_cache_class->has_ban() : \WPaaS\Cache::has_ban();

			if ( ! $has_ban ) {
				$gd_cache_class = $wpaas_cache_class ? $wpaas_cache_class : '\WPaaS\Cache';

				remove_action( 'shutdown', array( $gd_cache_class, 'purge' ), PHP_INT_MAX );
				add_action( 'shutdown', array( $gd_cache_class, 'ban' ), PHP_INT_MAX );
			}
		}

		// Complimentary Performance Plugins.
		// Autoptimize.
		if ( is_callable( 'autoptimizeCache::clearall' ) ) {
			autoptimizeCache::clearall();
		}

		// WP Optimize.
		if ( class_exists( 'WP_Optimize' ) && defined( 'WPO_PLUGIN_MAIN_PATH' ) ) {
			if ( '' !== $post_id && is_callable( 'WPO_Page_Cache::delete_single_post_cache' ) ) {
				WPO_Page_Cache::delete_single_post_cache( $post_id );
			} elseif ( is_callable( array( 'WP_Optimize', 'get_page_cache' ) ) && is_callable( array( WP_Optimize()->get_page_cache(), 'purge' ) ) ) {
				WP_Optimize()->get_page_cache()->purge();
			}
		}
	} catch( Exception $err ) {
		ET_Core_Logger::error( 'An exception occurred while attempting to clear site cache.' );
	}
}
endif;


if ( ! function_exists( 'et_core_get_nonces' ) ):
/**
 * Returns the nonces for this component group.
 *
 * @return string[]
 */
function et_core_get_nonces() {
	static $nonces = null;

	return $nonces ? $nonces : $nonces = array(
		'clear_page_resources_nonce' => wp_create_nonce( 'clear_page_resources' ),
		'et_core_portability_export' => wp_create_nonce( 'et_core_portability_export' ),
	);
}
endif;


if ( ! function_exists( 'et_core_page_resource_auto_clear' ) ):
function et_core_page_resource_auto_clear() {
	ET_Core_PageResource::remove_static_resources( 'all', 'all' );
}
add_action( 'switch_theme', 'et_core_page_resource_auto_clear' );
add_action( 'activated_plugin', 'et_core_page_resource_auto_clear', 10, 0 );
add_action( 'deactivated_plugin', 'et_core_page_resource_auto_clear', 10, 0 );
endif;


if ( ! function_exists( 'et_core_page_resource_clear' ) ):
/**
 * Ajax handler for clearing cached page resources.
 */
function et_core_page_resource_clear() {
	et_core_security_check( 'manage_options', 'clear_page_resources' );

	if ( empty( $_POST['et_post_id'] ) ) {
		et_core_die();
	}

	$post_id = sanitize_key( $_POST['et_post_id'] );
	$owner   = sanitize_key( $_POST['et_owner'] );

	ET_Core_PageResource::remove_static_resources( $post_id, $owner );
}
add_action( 'wp_ajax_et_core_page_resource_clear', 'et_core_page_resource_clear' );
endif;


if ( ! function_exists( 'et_core_page_resource_get' ) ):
/**
 * Get a page resource instance.
 *
 * @param string     $owner    The owner of the instance (core|divi|builder|bloom|monarch|custom).
 * @param string     $slug     A string that uniquely identifies the resource.
 * @param string|int $post_id  The post id that the resource is associated with or `global`.
 *                             If `null`, the return value of {@link get_the_ID()} will be used.
 * @param string     $type     The resource type (style|script). Default: `style`.
 * @param string     $location Where the resource should be output (head|footer). Default: `head-late`.
 *
 * @return ET_Core_PageResource
 */
function et_core_page_resource_get( $owner, $slug, $post_id = null, $priority = 10, $location = 'head-late', $type = 'style' ) {
	$post_id = $post_id ? $post_id : et_core_page_resource_get_the_ID();
	$_slug   = "et-{$owner}-{$slug}-{$post_id}-cached-inline-{$type}s";

	$all_resources = ET_Core_PageResource::get_resources();

	return isset( $all_resources[ $_slug ] )
		? $all_resources[ $_slug ]
		: new ET_Core_PageResource( $owner, $slug, $post_id, $priority, $location, $type );
}
endif;


if ( ! function_exists( 'et_core_page_resource_get_the_ID' ) ):
function et_core_page_resource_get_the_ID() {
	static $post_id = null;

	if ( is_int( $post_id ) ) {
		return $post_id;
	}

	return $post_id = apply_filters( 'et_core_page_resource_current_post_id', get_the_ID() );
}
endif;


if ( ! function_exists( 'et_core_page_resource_is_singular' ) ):
function et_core_page_resource_is_singular() {
	return apply_filters( 'et_core_page_resource_is_singular', is_singular() );
}
endif;


if ( ! function_exists( 'et_debug' ) ):
function et_debug( $msg, $bt_index = 4, $log_ajax = true ) {
	ET_Core_Logger::debug( $msg, $bt_index, $log_ajax );
}
endif;


if ( ! function_exists( 'et_wrong' ) ):
function et_wrong( $msg, $error = false ) {
	$msg = "You're Doing It Wrong! {$msg}";

	if ( $error ) {
		et_error( $msg );
	} else {
		et_debug( $msg );
	}
}
endif;


if ( ! function_exists( 'et_error' ) ):
function et_error( $msg, $bt_index = 4 ) {
	ET_Core_Logger::error( "[ERROR]: {$msg}", $bt_index );
}
endif;
api/OAuthHelper.php000064400000021203152336022500010202 0ustar00<?php

/**
 * Wrapper for the ET_Core_OAuth library.
 *
 * @since   1.1.0
 * @package ET\Core\API
 *
 * @property string consumer_key
 * @property string consumer_secret
 * @property string access_token
 * @property string access_token_secret
 */
class ET_Core_API_OAuthHelper {

	/**
	 * URL for access token requests.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $ACCESS_TOKEN_URL;

	/**
	 * URL for authorizing applications.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $AUTHORIZATION_URL;

	/**
	 * URL for request token requests.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $REQUEST_TOKEN_URL;

	/**
	 * Instance URL, used by Salesforce.
	 *
	 * @since 4.9.0
	 * @var   string
	 */
	public $INSTANCE_URL; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Use uppercase to be consistent with existing code.

	/**
	 * The OAuth2 bearer for this instance. This is used as the value of the HTTP
	 * `Authorization` header. The format is: `Bearer {$access_token}`.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	private $bearer = null;

	/**
	 * The OAuth Consumer object for this instance.
	 *
	 * @since 1.1.0
	 * @var   ET_Core_LIB_OAuthConsumer
	 */
	public $consumer = null;

	/**
	 * The OAuth Token object for this instance.
	 *
	 * @since 1.1.0
	 * @var   ET_Core_LIB_OAuthToken
	 */
	public $token = null;

	/**
	 * ET_Core_API_OAuth_Helper constructor.
	 *
	 * @since 1.1.0
	 *
	 * @param array $data {
	 *     The consumer key/secret and access token/secret.
	 *
	 *     @type string $consumer_key      Consumer key. Required.
	 *     @type string $consumer_secret   Consumer secret. Required.
	 *     @type string $access_token      Previously obtained access token. Optional.
	 *     @type string $access_secret     Previously obtained access secret. Optional.
	 * }
	 * @param array $urls {
	 *     The service's OAuth endpoints.
	 *
	 *     @type string $request_token_url URL for request tokens. Required.
	 *     @type string $authorization_url URL for authorizations. Optional.
	 *     @type string $access_token_url  URL for access tokens. Required.
	 * }
	 */
	public function __construct( array $data, array $urls, $owner ) {
		$this->_initialize( $data, $urls );

		$this->sha1_method = new ET_Core_LIB_OAuthHMACSHA1();
		$this->consumer    = new ET_Core_LIB_OAuthConsumer( $this->consumer_key, $this->consumer_secret );

		if ( '' !== $this->access_token && '' !== $this->access_token_secret ) {
			$this->token = new ET_Core_LIB_OAuthToken( $this->access_token, $this->access_token_secret );
		} else if ( empty( $this->access_token ) && ! empty( $this->access_token_secret ) ) {
			$this->bearer = "Bearer {$this->access_token_secret}";
		}
	}

	/**
	 * @internal
	 *
	 * @param array $data {@see self::__construct()}
	 * @param array $urls {@see self::__construct()}
	 */
	private function _initialize( $data, $urls ) {
		$this->consumer_key        = isset( $data['consumer_key'] ) ? $data['consumer_key'] : '';
		$this->consumer_secret     = isset( $data['consumer_secret'] ) ? $data['consumer_secret'] : '';
		$this->access_token        = isset( $data['access_key'] ) ? $data['access_key'] : '';
		$this->access_token_secret = isset( $data['access_secret'] ) ? $data['access_secret'] : '';

		$this->REQUEST_TOKEN_URL = $urls['request_token_url'];
		$this->AUTHORIZATION_URL = $urls['authorization_url'];
		$this->ACCESS_TOKEN_URL  = $urls['access_token_url'];
		$this->REDIRECT_URL      = isset( $urls['redirect_url'] ) ? $urls['redirect_url'] : '';
	}

	protected function _get_oauth2_parameters( $args ) {
		et_core_nonce_verified_previously();

		return wp_parse_args( $args, array(
			'grant_type'    => 'authorization_code',
			'code'          => sanitize_text_field( $_GET['code'] ),
			'client_id'     => $this->consumer_key,
			'client_secret' => $this->consumer_secret,
			'redirect_uri'  => $this->REDIRECT_URL,
		) );
	}

	/**
	 * @param \ET_Core_HTTPRequest $request
	 *
	 * @return \ET_Core_HTTPRequest
	 */
	protected function _prepare_oauth_request( $request ) {
		$parameters = array();

		if ( is_array( $request->BODY ) && $request->BODY && ! $request->JSON_BODY ) {
			$parameters = $request->BODY;
		}

		$oauth_request = ET_Core_LIB_OAuthRequest::from_consumer_and_token(
			$this->consumer,
			$this->token,
			$request->METHOD,
			$request->URL,
			$parameters
		);

		$oauth_request->sign_request( $this->sha1_method, $this->consumer, $this->token );

		if ( 'GET' === $request->METHOD ) {
			$request->URL = $oauth_request->to_url();
		} else if ( 'POST' === $request->METHOD ) {
			$request->URL  = $request->JSON_BODY ? $oauth_request->to_url() : $oauth_request->get_normalized_http_url();
			$request->BODY = $request->JSON_BODY  ? json_encode( $request->BODY ) : $oauth_request->to_post_data();
		}

		return $request;
	}

	/**
	 * @param \ET_Core_HTTPRequest $request
	 *
	 * @return \ET_Core_HTTPRequest
	 */
	protected function _prepare_oauth2_request( $request ) {
		if ( null !== $this->bearer ) {
			$request->HEADERS['Authorization'] = $this->bearer;
		}

		if ( $request->JSON_BODY ) {
			return $request;
		}

		if ( is_array( $request->BODY ) && ! array_key_exists( 'code', $request->BODY ) ) {
			$request->URL  = add_query_arg( $request->BODY, $request->URL );
			$request->BODY = null;
		}

		return $request;
	}

	/**
	 * Finish the OAuth2 authorization process if needed.
	 */
	public static function finish_oauth2_authorization() {
		et_core_nonce_verified_previously();

		if ( ! isset( $_GET['state'] ) || 0 !== strpos( $_GET['state'], 'ET_Core' ) ) {
			return;
		}

		list( $_, $name, $account, $nonce ) = explode( '|', sanitize_text_field( rawurldecode( $_GET['state'] ) ) );

		if ( ! $name || ! $account || ! $nonce ) {
			return;
		}

		$_GET['nonce'] = $nonce;

		et_core_security_check( 'manage_options', 'et_core_api_service_oauth2', 'nonce', '_GET' );

		$providers = et_core_api_email_providers();

		if ( ! $providers->account_exists( $name, $account ) ) {
			et_core_die();
		}

		if ( ! $provider = $providers->get( $name, $account, 'ET_Core' ) ) {
			et_core_die();
		}

		$result = $provider->fetch_subscriber_lists();

		// Display the authorization results
		echo et_core_esc_previously( ET_Bloom::generate_modal_warning( $result ) );
	}

	/**
	 * Prepare a request for an access token.
	 *
	 * @param array $args {
	 *     For OAuth 1.0 & 1.0a:
	 *
	 *       @type string $verifier OAuth verifier token. Optional.
	 *
	 *     For OAuth 2.0:
	 *
	 *       @type string $code         The code returned when the user was redirected back to their dashboard.
	 *       @type string $grant_type   The desired grant type, as per the OAuth 2.0 spec.
	 *       @type string $redirect_uri The redirect URL from the original authorization request.
	 * }
	 *
	 * @return ET_Core_HTTPRequest
	 */
	public function prepare_access_token_request( $args = array() ) {
		et_core_nonce_verified_previously();
		$oauth2        = ! empty( $_GET['code'] );
		$request       = new ET_Core_HTTPRequest( $this->ACCESS_TOKEN_URL, 'POST', '', true );
		$request->BODY = $oauth2 ? $this->_get_oauth2_parameters( $args ) : $args;

		return $this->prepare_oauth_request( $request, $oauth2 );
	}

	/**
	 * Prepare an OAuth 1.0a or 2.0 request.
	 *
	 * @param ET_Core_HTTPRequest $request
	 * @param bool                $oauth2
	 *
	 * @return \ET_Core_HTTPRequest
	 */
	function prepare_oauth_request( $request, $oauth2 = false ) {
		return $oauth2 ? $this->_prepare_oauth2_request( $request ) : $this->_prepare_oauth_request( $request );
	}

	/**
	 * Process a response to an OAuth access token request and retrieve the access token if auth was successful.
	 *
	 * @param \ET_Core_HTTPResponse $response
	 */
	public function process_authentication_response( $response, $json = true ) {
		if ( $response->ERROR ) {
			return;
		}

		$response = $json ? $response->DATA : wp_parse_args( $response->DATA );

		// Salesforce returns an `instance_url` data in the auth response.
		if ( isset( $response['instance_url'] ) ) {
			$this->INSTANCE_URL = esc_url( $response['instance_url'] ); // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Use uppercase to be consistent with existing code.
		}

		if ( isset( $response['oauth_token'], $response['oauth_token_secret'] ) ) {
			// OAuth 1.0a
			$token       = sanitize_text_field( $response['oauth_token'] );
			$secret      = sanitize_text_field( $response['oauth_token_secret'] );
			$this->token = new ET_Core_LIB_OAuthToken( $token, $secret );
		} elseif ( isset( $response['access_token'] ) ) {
			// OAuth 2.0
			$this->token = new ET_Core_LIB_OAuthToken( '', sanitize_text_field( $response['access_token'] ) );
			if ( isset( $response['refresh_token'] ) ) {
				$this->token->refresh_token = sanitize_text_field( $response['refresh_token'] );
			}
		}
	}
}
api/README.md000064400000001201152336022500006564 0ustar00## Core API Component Group
This directory contains components that facilitate interacting with 3rd-party REST APIs.
 
### What's Inside
|File|Name|Description|
|:--------|:----------|:----------|
|**email**|**ET_Core_API_Email**|Email marketing service providers|
|**social**|**ET_Core_API_Social**|Social networks|
|Service.php|ET_Core_API_Service|Base class for all API components|
|OAuthHelper.php|ET_Core_API_OAuthHelper|Handles OAuth authorization flow|

> ***Note:*** Component groups are in **bold**.

### Class Hierarchy
<p align="center">
<img src="https://www.dropbox.com/s/lvwes19noua3jtu/2016-11-11_07-29-13-PM.png?dl=1" />
</p>api/social/Network.php000064400000001456152336022500010735 0ustar00<?php


abstract class ET_Core_API_SocialNetwork extends ET_Core_API_Service  {

	public function __construct( $owner = '', $account_name = '' ) {
		$this->service_type = 'social';

		parent::__construct( $owner, $account_name );
	}

	/**
	 * @inheritDoc
	 */
	protected function _get_data_keys() {
		// Implement _get_data_keys() method.
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		// Implement get_fields() method.
	}

	/**
	 * @inheritDoc
	 */
	protected function _get_accounts_data() {
		// Implement _get_accounts_data() method.
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array(), $custom_fields_key = '' ) {
		// Implement get_data_keymap() method.
	}

	/**
	 * @inheritDoc
	 */
	public function save_data() {
		// Implement save_data() method.
	}
}api/spam/Providers.php000064400000016205152336022500010745 0ustar00<?php

/**
 * Manages anti-spam provider class instances.
 *
 * @since 4.0.7
 */
class ET_Core_API_Spam_Providers {

	private static $_instance;

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	protected static $_fields;
	protected static $_metadata;
	protected static $_names;
	protected static $_names_by_slug;
	protected static $_slugs;

	public static $providers = array();

	public function __construct() {
		if ( null === self::$_metadata ) {
			$this->_initialize();
		}
	}

	protected function _initialize() {
		self::$_               = ET_Core_Data_Utils::instance();
		self::$_metadata       = et_core_get_components_metadata();
		$third_party_providers = et_core_get_third_party_components( 'api/spam' );

		$load_fields = is_admin() || et_core_is_saving_builder_modules_cache() || et_core_is_fb_enabled() || isset( $_GET['et_fb'] ); // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
		$all_names   = array(
			'official'    => self::$_metadata['groups']['api/spam']['members'],
			'third-party' => array_keys( $third_party_providers ),
		);

		$_names_by_slug = array();

		foreach ( $all_names as $provider_type => $provider_names ) {
			$_names_by_slug[ $provider_type ] = array();

			foreach ( $provider_names as $provider_name ) {
				if ( 'Fields' === $provider_name || self::$_->includes( $provider_name, 'Provider' ) ) {
					continue;
				}

				if ( 'official' === $provider_type ) {
					$class_name    = self::$_metadata[ $provider_name ];
					$provider_slug = self::$_metadata[ $class_name ]['slug'];
					$provider      = $load_fields ? new $class_name( 'ET_Core', '' ) : null;
				} else {
					$provider      = $third_party_providers[ $provider_name ];
					$provider_slug = is_object( $provider ) ? $provider->slug : '';
				}

				if ( ! $provider_slug ) {
					continue;
				}

				$_names_by_slug[ $provider_type ][ $provider_slug ] = $provider_name;

				if ( $load_fields && is_object( $provider ) ) {
					self::$_fields[ $provider_slug ] = $provider->get_account_fields();
				}
			}
		}

		/**
		 * Filters the enabled anti-spam providers.
		 *
		 * @since 4.0.7
		 *
		 * @param array[] $_names_by_slug {
		 *
		 *     @type string[] $provider_type {
		 *
		 *         @type string $slug Provider name
		 *     }
		 * }
		 */
		self::$_names_by_slug = apply_filters( 'et_core_api_spam_enabled_providers', $_names_by_slug );

		foreach ( array_keys( $all_names ) as $provider_type ) {
			self::$_names[ $provider_type ] = array_values( self::$_names_by_slug[ $provider_type ] );
			self::$_slugs[ $provider_type ] = array_keys( self::$_names_by_slug[ $provider_type ] );
		}
	}

	/**
	 * Returns the spam provider accounts array from core.
	 *
	 * @since 4.0.7
	 *
	 * @return array|mixed
	 */
	public function accounts() {
		return ET_Core_API_Spam_Provider::get_accounts();
	}

	/**
	 * @see {@link \ET_Core_API_Spam_Provider::account_exists()}
	 */
	public function account_exists( $provider, $account_name ) {
		return ET_Core_API_Spam_Provider::account_exists( $provider, $account_name );
	}

	public function account_fields( $provider = 'all' ) {
		if ( 'all' !== $provider ) {
			if ( isset( self::$_fields[ $provider ] ) ) {
				return self::$_fields[ $provider ];
			}

			if ( ! is_admin() && et_core_is_saving_builder_modules_cache() ) {
				// Need to initialize again because et_core_is_saving_builder_modules_cache
				// can't be called too early.
				$this->_initialize();
				return et_()->array_get( self::$_fields, $provider, array() );
			}
			return array();
		}

		return self::$_fields;
	}

	/**
	 * Get class instance for a provider. Instance will be created if necessary.
	 *
	 * @param string $name_or_slug The provider's name or slug.
	 * @param string $account_name The identifier for the desired account with the provider.
	 * @param string $owner        The owner for the instance.
	 *
	 * @return ET_Core_API_Spam_Provider|bool The provider instance or `false` if not found.
	 */
	public function get( $name_or_slug, $account_name, $owner = 'ET_Core' ) {
		$name_or_slug = str_replace( ' ', '', $name_or_slug );
		$is_official  = isset( self::$_metadata[ $name_or_slug ] );

		if ( ! $is_official && ! $this->is_third_party( $name_or_slug ) ) {
			return false;
		}

		if ( ! in_array( $name_or_slug, array_merge( self::names(), self::slugs() ) ) ) {
			return false;
		}

		// Make sure we have the component name
		if ( $is_official ) {
			$class_name = self::$_metadata[ $name_or_slug ];
			$name       = self::$_metadata[ $class_name ]['name'];
		} else {
			$components = et_core_get_third_party_components( 'api/spam' );

			if ( ! $name = array_search( $name_or_slug, self::$_names_by_slug['third-party'] ) ) {
				$name = $name_or_slug;
			}
		}

		if ( ! isset( self::$providers[ $name ][ $owner ] ) ) {
			self::$providers[ $name ][ $owner ] = $is_official
				? new $class_name( $owner, $account_name )
				: $components[ $name ];
		}

		return self::$providers[ $name ][ $owner ];
	}

	public static function instance() {
		if ( null === self::$_instance ) {
			self::$_instance = new self;
		}

		return self::$_instance;
	}

	public function is_third_party( $name_or_slug ) {
		$is_third_party = in_array( $name_or_slug, self::$_names['third-party'] );

		return $is_third_party ? $is_third_party : in_array( $name_or_slug, self::$_slugs['third-party'] );
	}

	/**
	 * Returns the names of available providers. List can optionally be filtered.
	 *
	 * @since 4.0.7
	 *
	 * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'.
	 *
	 * @return array
	 */
	public static function names( $type = 'all' ) {
		if ( 'all' === $type ) {
			$names = array_merge( self::$_names['third-party'], self::$_names['official'] );
		} else {
			$names = self::$_names[ $type ];
		}

		return $names;
	}

	/**
	 * Returns an array mapping the slugs of available providers to their names.
	 *
	 * @since 4.0.7
	 *
	 * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'.
	 *
	 * @return array
	 */
	public function names_by_slug( $type = 'all' ) {
		if ( 'all' === $type ) {
			$names_by_slug = array_merge( self::$_names_by_slug['third-party'], self::$_names_by_slug['official'] );
		} else {
			$names_by_slug = self::$_names_by_slug[ $type ];
		}

		return $names_by_slug;
	}

	/**
	 * @see {@link \ET_Core_API_Spam_Provider::remove_account()}
	 */
	public function remove_account( $provider, $account_name ) {
		ET_Core_API_Spam_Provider::remove_account( $provider, $account_name );
	}

	/**
	 * Returns the slugs of available providers. List can optionally be filtered.
	 *
	 * @since 4.0.7
	 *
	 * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'.
	 *
	 * @return array
	 */
	public static function slugs( $type = 'all' ) {
		if ( 'all' === $type ) {
			$names = array_merge( self::$_slugs['third-party'], self::$_slugs['official'] );
		} else {
			$names = self::$_slugs[ $type ];
		}

		return $names;
	}

	/**
	 * @since 4.0.7
	 *
	 * @see {@link \ET_Core_API_Spam_Provider::update_account()}
	 */
	public function update_account( $provider, $account, $data ) {
		ET_Core_API_Spam_Provider::update_account( $provider, $account, $data );
	}
}
api/spam/init.php000064400000004536152336022500007737 0ustar00<?php

if ( ! function_exists( 'et_core_api_spam_init' ) ):
function et_core_api_spam_init() {
	if ( is_admin() ) {
		return;
	}

	if ( ! et_core_api_spam_find_provider_account() ) {
		// Always instantiate ReCaptcha class
		ET_Core_API_Spam_Providers::instance()->get( 'recaptcha', '' );
	}
}
endif;


if ( ! function_exists('et_builder_spam_add_account' ) ):
function et_core_api_spam_add_account( $name_or_slug, $account, $api_key ) {
	et_core_security_check();

	if ( empty( $name_or_slug ) || empty( $account ) ) {
		return __( 'ERROR: Invalid arguments.', 'et_core' );
	}

	$providers = ET_Core_API_Spam_Providers::instance();
	$provider  = $providers->get( $name_or_slug, $account, 'builder' );

	if ( ! $provider ) {
		return '';
	}

	if ( is_array( $api_key ) ) {
		foreach ( $api_key as $field_name => $value ) {
			$provider->data[ $field_name ] = sanitize_text_field( $value );
		}
	} else if ( '' !== $api_key ) {
		$provider->data['api_key'] = sanitize_text_field( $api_key );
	}

	$provider->save_data();

	return 'success';
}
endif;


if ( ! function_exists( 'et_core_api_spam_find_provider_account' ) ):
function et_core_api_spam_find_provider_account() {
	$spam_providers = ET_Core_API_Spam_Providers::instance();

	if ( $accounts = $spam_providers->accounts() ) {
		$enabled_account = '';
		$provider        = '';

		foreach ( $accounts as $provider_slug => $provider_accounts ) {
			if ( empty( $provider_accounts ) ) {
				continue;
			}

			foreach ( $provider_accounts as $account_name => $account ) {
				if ( isset( $account['site_key'], $account['secret_key'] ) ) {
					$provider        = $provider_slug;
					$enabled_account = $account_name;
					break;
				}
			}
		}

		if ( $provider && $enabled_account ) {
			return $spam_providers->get( $provider, $enabled_account );
		}
	}

	return false;
}
endif;


if ( ! function_exists( 'et_core_api_spam_remove_account' ) ):
/**
 * Delete an existing provider account.
 *
 * @since 4.0.7
 *
 * @param string $name_or_slug The provider name or slug.
 * @param string $account      The account name.
 */
function et_core_api_spam_remove_account( $name_or_slug, $account ) {
	et_core_security_check();

	if ( empty( $name_or_slug ) || empty( $account ) ) {
		return;
	}

	$providers = ET_Core_API_Spam_Providers::instance();

	if ( $provider = $providers->get( $name_or_slug, $account ) ) {
		$provider->delete();
	}
}
endif;
api/spam/ReCaptcha.php000064400000010612152336022500010616 0ustar00<?php

/**
 * Wrapper for ProviderName's API.
 *
 * @since 4.0.7
 *
 * @package ET\Core\API\Misc\ReCaptcha
 */
class ET_Core_API_Spam_ReCaptcha extends ET_Core_API_Spam_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://www.google.com/recaptcha/api/siteverify';

	/**
	 * @inheritDoc
	 */
	public $max_accounts = 1;

	/**
	 * @inheritDoc
	 */
	public $name = 'ReCaptcha';

	/**
	 * @inheritDoc
	 */
	public $slug = 'recaptcha';

	public function __construct( $owner = 'ET_Core', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->_add_actions_and_filters();
	}

	protected function _add_actions_and_filters() {
		if ( ! is_admin() && ! et_core_is_fb_enabled() ) {
			add_action( 'wp_enqueue_scripts', array( $this, 'action_wp_enqueue_scripts' ) );
		}
	}

	public function action_wp_enqueue_scripts() {
		if ( ! $this->is_enabled() ) {
			return;
		}

		/**
		 * reCAPTCHA v3 actions may only contain alphanumeric characters and slashes/underscore.
		 * https://developers.google.com/recaptcha/docs/v3#actions
		 *
		 * Replace all non-alphanumeric characters with underscore.
		 * Ex: '?page_id=254980' => '_page_id_254980'
		 */
		$action = preg_replace( '/[^A-Za-z0-9]/', '_', basename( get_the_permalink() ) );
		$deps   = array( 'jquery', 'es6-promise', 'et-recaptcha-v3' );

		wp_register_script( 'et-recaptcha-v3', "https://www.google.com/recaptcha/api.js?render={$this->data['site_key']}", array(), ET_CORE_VERSION, true );
		wp_register_script( 'es6-promise', ET_CORE_URL . 'admin/js/es6-promise.auto.min.js', array(), ET_CORE_VERSION, true );

		wp_enqueue_script( 'et-core-api-spam-recaptcha', ET_CORE_URL . 'admin/js/recaptcha.js', $deps, ET_CORE_VERSION, true );
		wp_localize_script( 'et-core-api-spam-recaptcha', 'et_core_api_spam_recaptcha', array(
			'site_key'    => empty( $this->data['site_key'] ) ? '' : $this->data['site_key'],
			'page_action' => array( 'action' => $action ),
		) );
	}

	public function is_enabled() {
		$has_recaptcha_module = true;

		if ( class_exists( 'ET_Dynamic_Assets' ) ) {
			$et_dynamic_module_framework  = et_builder_dynamic_module_framework();
			$is_dynamic_framework_enabled = et_builder_is_frontend() && 'on' === $et_dynamic_module_framework;
			$is_dynamic_css_enabled       = et_builder_is_frontend() && et_use_dynamic_css();

			if ( $is_dynamic_framework_enabled && $is_dynamic_css_enabled ) {
				$et_dynamic_assets    = ET_Dynamic_Assets::init();
				$saved_shortcodes     = $et_dynamic_assets->get_saved_page_shortcodes();
				$recaptcha_modules    = array( 'et_pb_contact_form', 'et_pb_signup' );
				$has_recaptcha_module = ! empty( array_intersect( $saved_shortcodes, $recaptcha_modules ) );
			}
		}

		$has_key = isset( $this->data['site_key'], $this->data['secret_key'] )
			&& et_()->all( array( $this->data['site_key'], $this->data['secret_key'] ) );

		return $has_key && $has_recaptcha_module;
	}

	/**
	 * Verify a form submission.
	 *
	 * @since 4.0.7
	 *
	 * @global $_POST['token']
	 *
	 * @return mixed[]|string $result {
	 *     Interaction Result
	 *
	 *     @type bool     $success      Whether or not the request was valid for this site.
	 *     @type int      $score        Score for the request (0 < score < 1).
	 *     @type string   $action       Action name for this request (important to verify).
	 *     @type string   $challenge_ts Timestamp of the challenge load (ISO format yyyy-MM-ddTHH:mm:ssZZ).
	 *     @type string   $hostname     Hostname of the site where the challenge was solved.
	 *     @type string[] $error-codes  Optional
	 * }
	 */
	public function verify_form_submission() {
		$args = array(
			'secret'   => $this->data['secret_key'],
			'response' => et_()->array_get_sanitized( $_POST, 'token' ),
			'remoteip' => et_core_get_ip_address(),
		);

		$this->prepare_request( $this->BASE_URL, 'POST', false, $args );
		$this->make_remote_request();

		return $this->response->ERROR ? $this->response->ERROR_MESSAGE : $this->response->DATA;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'site_key'   => array(
				'label' => esc_html__( 'Site Key (v3)', 'et_core' ),
			),
			'secret_key' => array(
				'label' => esc_html__( 'Secret Key (v3)', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		return array(
			'ip_address' => 'remoteip',
			'response'   => 'response',
			'secret_key' => 'secret',
		);
	}
}
api/spam/Provider.php000064400000007477152336022500010575 0ustar00<?php

/**
 * High-level wrapper for interacting with the external API's offered by 3rd-party anti-spam providers.
 *
 * @since 4.0.7
 *
 * @package ET\Core\API\Spam
 */
abstract class ET_Core_API_Spam_Provider extends ET_Core_API_Service  {

	/**
	 * @since 4.0.7
	 *
	 * @inheritDoc
	 */
	public $service_type = 'spam';

	/**
	 * @since 4.0.7
	 *
	 * @inheritDoc
	 */
	protected function _get_data() {
		$options = parent::_get_data();

		// return empty array in case of empty name
		if ( '' === $this->account_name || ! is_string( $this->account_name ) ) {
			return array();
		}

		$provider = sanitize_text_field( $this->slug );
		$account  = sanitize_text_field( $this->account_name );

		if ( ! isset( $options['accounts'][ $provider ][ $account ] ) ) {
			$options['accounts'][ $provider ][ $account ] = array();
			update_option( 'et_core_api_spam_options', $options );
		}

		return $options['accounts'][ $provider ][ $account ];
	}

	/**
	 * Returns whether or not an account exists in the database.
	 *
	 * @since 4.0.7
	 *
	 * @param string $provider
	 * @param string $account_name
	 *
	 * @return bool
	 */
	public static function account_exists( $provider, $account_name ) {
		$all_accounts = self::get_accounts();

		return isset( $all_accounts[ $provider ][ $account_name ] );
	}

	/**
	 * @since 4.0.7
	 *
	 * @inheritDoc
	 */
	public function delete() {
		self::remove_account( $this->slug, $this->account_name );

		$this->account_name = '';

		$this->_get_data();
	}

	/**
	 * Retrieves the email accounts data from the database.
	 *
	 * @since 4.0.7
	 *
	 * @return array
	 */
	public static function get_accounts() {
		$options = (array) get_option( 'et_core_api_spam_options' );

		return isset( $options['accounts'] ) ? $options['accounts'] : array();
	}

	/**
	 * @since 4.0.7
	 *
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		return $keymap;
	}

	abstract public function is_enabled();

	/**
	 * Remove an account
	 *
	 * @since 4.0.7
	 *
	 * @param string $provider
	 * @param string $account_name
	 */
	public static function remove_account( $provider, $account_name ) {
		$options = (array) get_option( 'et_core_api_spam_options' );

		unset( $options['accounts'][ $provider ][ $account_name ] );

		update_option( 'et_core_api_spam_options', $options );
	}

	/**
	 * @since 4.0.7
	 *
	 * @inheritDoc
	 */
	public function save_data() {
		self::update_account( $this->slug, $this->account_name, $this->data );
	}

	/**
	 * @since 4.0.7
	 *
	 * @inheritDoc
	 */
	public function set_account_name( $name ) {
		$this->account_name = $name;
		$this->data = $this->_get_data();
	}

	/**
	 * Remove keys with brackets.
	 *
	 * Fixing my errors is no walk in the park; it's more like a hike up Mt.
	 *
	 * @param array $data Options array.
	 * @return void
	 */
	public static function remove_keys_with_brackets( &$data ) {
		foreach ( $data as $key => &$value ) {
			if ( is_array( $value ) ) {
				self::remove_keys_with_brackets( $value );
			}

			if ( strpos( $key, '[' ) === 0 && strpos( $key, ']' ) === strlen( $key ) - 1 ) {
				unset( $data[ $key ] );
			}
		}
	}

	/**
	 * Updates the data for a provider account.
	 *
	 * @since 4.0.7
	 *
	 * @param string $provider The provider's slug.
	 * @param string $account  The account name.
	 * @param array  $data     The new data for the account.
	 */
	public static function update_account( $provider, $account, $data ) {
		if ( empty( $account ) || empty( $provider ) ) {
			return;
		}

		$options  = (array) get_option( 'et_core_api_spam_options' );
		$provider = sanitize_text_field( $provider );
		$account  = sanitize_text_field( $account );

		self::remove_keys_with_brackets( $options );

		self::$_->array_update( $options, "accounts.$provider.$account", $data );

		update_option( 'et_core_api_spam_options', $options );
	}

	abstract public function verify_form_submission();
}
api/Service.php000064400000035063152336022500007433 0ustar00<?php

/**
 * High level, generic, wrapper for interacting with a external, 3rd-party API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API
 */
abstract class ET_Core_API_Service {

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	/**
	 * URL to request an OAuth access token.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $ACCESS_TOKEN_URL;

	/**
	 * URL to authorize an application using OAuth.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $AUTHORIZATION_URL;

	/**
	 * General failure message (translated & escaped).
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $FAILURE_MESSAGE;

	/**
	 * URL to request an OAuth request token.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $REQUEST_TOKEN_URL;

	/**
	 * Callback URL for OAuth Authorization.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $REDIRECT_URL;

	/**
	 * The base url for the service.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $BASE_URL;

	/**
	 * Instance of the OAuth wrapper class initialized for this service.
	 *
	 * @since 1.1.0
	 * @var   ET_Core_API_OAuthHelper
	 */
	public $OAuth_Helper;

	/**
	 * The form fields (shown in the dashboard) for the service account.
	 *
	 * @since 1.1.0
	 * @var   array
	 */
	public $account_fields;

	/**
	 * Each service can have multiple sets of credentials (accounts). This identifies which
	 * account an instance of this class will provide access to.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $account_name;

	/**
	 * Custom HTTP headers that should be added to all requests made to this service's API.
	 *
	 * @since 1.1.0
	 * @var   array
	 */
	public $custom_headers;

	/**
	 * The service's data. Typically this will be IDs, tokens, secrets, etc used for API authentication.
	 *
	 * @since 1.1.0
	 * @var   string[]
	 */
	public $data;

	/**
	 * The mapping of the key names we use to store the service's data to the key names used by the service's API.
	 *
	 * @since 1.1.0
	 * @var   string[]
	 */
	public $data_keys;

	/**
	 * An instance of our HTTP Interface (utility class).
	 *
	 * @since 1.1.0
	 * @var ET_Core_HTTPInterface
	 */
	public $http;

	/**
	 * If service uses HTTP Basic Auth, an array with details needed to generate the auth header, false otherwise.
	 *
	 * @since 1.1.0
	 * @var   bool|array {
	 *     Details needed to generate the HTTP Auth header.
	 *
	 *     @type string $username The data key name who's value should be used as the username, or a value to use instead.
	 *     @type string $password The data key name who's value should be used as the password, or a value to use instead.
	 * }
	 */
	public $http_auth = false;

	/**
	 * Maximum number of accounts user is allowed to add for the service.
	 *
	 * @since 4.0.7
	 * @var int
	 */
	public $max_accounts;

	/**
	 * The service's proper name (will be shown in the UI).
	 *
	 * @since 1.1.0
	 * @var string
	 */
	public $name;

	/**
	 * The OAuth version (if the service uses OAuth).
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $oauth_version;

	/**
	 * The OAuth verifier key (if the service uses OAuth along with verifier keys).
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $oauth_verifier;

	/**
	 * The name and version of the theme/plugin that created this class instance.
	 * Should be formatted like this: `Divi/3.0.23`.
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $owner;

	/**
	 * Convenience accessor for {@link self::http->request}
	 *
	 * @since 1.1.0
	 * @var \ET_Core_HTTPRequest?
	 */
	public $request;

	/**
	 * Convenience accessor for {@link self::http->response}
	 *
	 * @since 1.1.0
	 * @var \ET_Core_HTTPResponse?
	 */
	public $response;

	/**
	 * For services that return JSON responses, this is the top-level/root key for the returned data.
	 *
	 * @since 1.1.0
	 * @var string
	 */
	public $response_data_key;

	/**
	 * The service type (email, social, etc).
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $service_type;

	/**
	 * The slug for this service (not shown in the UI).
	 *
	 * @since 1.1.0
	 * @var   string
	 */
	public $slug;

	/**
	 * Whether or not the service uses OAuth.
	 *
	 * @since 1.1.0
	 * @var   bool
	 */
	public $uses_oauth;

	/**
	 * Data Utility class.
	 *
	 * @var ET_Core_Data_Utils
	 */
	public $data_utils;

	// phpcs:disable ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Existing codebase.
	/**
	 * Error message for when API Key is required.
	 *
	 * @var string
	 */
	public $API_KEY_REQUIRED;
	// phpcs:enable ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Existing codebase.

	/**
	 * ET_Core_API_Service constructor.
	 *
	 * @since 1.1.0
	 *
	 * @param string $owner        {@see self::owner}
	 * @param string $account_name The name of the service account that the instance will provide access to.
	 * @param string $api_key      The api key for the account. Optional (can be set after instantiation).
	 */
	public function __construct( $owner = 'ET_Core', $account_name = '', $api_key = '' ) {
		$this->account_name   = str_replace( '.', '', sanitize_text_field( $account_name ) );
		$this->owner          = sanitize_text_field( $owner );
		$this->account_fields = $this->get_account_fields();

		$this->data           = $this->_get_data();
		$this->data_keys      = $this->get_data_keymap();
		$this->oauth_verifier = '';

		$this->http = new ET_Core_HTTPInterface( $this->owner );

		self::$_ = $this->data_utils = new ET_Core_Data_Utils();

		$this->FAILURE_MESSAGE  = esc_html__( 'API request failed, please try again.', 'et_core' );
		$this->API_KEY_REQUIRED = esc_html__( 'API request failed. API Key is required.', 'et_core' );

		if ( '' !== $api_key ) {
			$this->data['api_key'] = sanitize_text_field( $api_key );
			$this->save_data();
		}

		if ( $this->uses_oauth && $this->is_authenticated() ) {
			$this->_initialize_oauth_helper();
		}
	}

	/**
	 * Generates a HTTP Basic Auth header and adds it to the current request object. Uses the value
	 * of {@link self::http_auth} to determine the correct values to use for the username and password.
	 */
	protected function _add_http_auth_header_to_request() {
		$username_key = $this->http_auth['username'];
		$password_key = $this->http_auth['password'];

		$username = isset( $this->data[ $username_key ] ) ? $this->data[ $username_key ] : $username_key;
		$password = isset( $this->data[ $password_key ] ) ? $this->data[ $password_key ] : $password_key;

		$this->request->HEADERS['Authorization'] = 'Basic ' . base64_encode( "{$username}:{$password}" );
	}

	/**
	 * Exchange a request/verifier token for an access token. This is the last step in the OAuth authorization process.
	 * If successful, the access token will be saved and used for future calls to the API.
	 *
	 * @return bool Whether or not authentication was successful.
	 */
	private function _do_oauth_access_token_request() {
		if ( ! $this->_initialize_oauth_helper() ) {
			return false;
		}

		$args = array();

		if ( '' !== $this->oauth_verifier ) {
			$args['oauth_verifier'] = $this->oauth_verifier;
		}

		$this->request = $this->http->request = $this->OAuth_Helper->prepare_access_token_request( $args );

		$this->request->HEADERS['Content-Type'] = 'application/x-www-form-urlencoded';

		$this->http->make_remote_request();
		$this->response = $this->http->response;

		if ( $this->response->ERROR ) {
			return false;
		}

		$this->OAuth_Helper->process_authentication_response( $this->response, $this->http->expects_json );

		if ( null === $this->OAuth_Helper->token ) {
			return false;
		}

		$this->data['access_key']    = $this->OAuth_Helper->token->key;
		$this->data['access_secret'] = $this->OAuth_Helper->token->secret;
		$this->data['is_authorized'] = true;

		if ( ! empty( $this->OAuth_Helper->token->refresh_token ) ) {
			$this->data['refresh_token'] = $this->OAuth_Helper->token->refresh_token;
		}

		// If there an `instance_url` returned from the auth response, save it.
		// Salesforce API should use this URL instead of the `login_url` provided by user.
		if ( ! empty( $this->OAuth_Helper->INSTANCE_URL ) ) { // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change the prop name.
			$this->data['instance_url'] = $this->OAuth_Helper->INSTANCE_URL; // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change the prop name.
		}

		return true;
	}

	/**
	 * The service's private data.
	 *
	 * @see      self::$_data
	 * @internal
	 * @since    1.1.0
	 *
	 * @return array
	 */
	protected function _get_data() {
		return (array) get_option( "et_core_api_{$this->service_type}_options" );
	}

	/**
	 * Initializes {@link self::OAuth_Helper}
	 *
	 * @return bool `true` if successful, `false` otherwise.
	 */
	protected function _initialize_oauth_helper() {
		if ( null !== $this->OAuth_Helper ) {
			return true;
		}

		$urls = array(
			'access_token_url'  => $this->ACCESS_TOKEN_URL,
			'request_token_url' => $this->REQUEST_TOKEN_URL,
			'authorization_url' => $this->AUTHORIZATION_URL,
			'redirect_url'      => $this->REDIRECT_URL,
		);

		$this->OAuth_Helper = new ET_Core_API_OAuthHelper( $this->data, $urls, $this->owner );

		return null !== $this->OAuth_Helper;
	}

	/**
	 * Returns the currently known custom fields for this service.
	 *
	 * @return array
	 */
	protected function _get_custom_fields() {
		return empty( $this->data['custom_fields'] ) ? array() : $this->data['custom_fields'];
	}

	/**
	 * Initiate OAuth Authorization Flow
	 *
	 * @return array|bool
	 */
	public function authenticate() {
		et_core_nonce_verified_previously();

		if ( '1.0a' === $this->oauth_version || ( '2.0' === $this->oauth_version && ! empty( $_GET['code'] ) ) ) {
			$authenticated = $this->_do_oauth_access_token_request();

			if ( $authenticated ) {
				$this->save_data();
				return true;
			}
		} elseif ( '2.0' === $this->oauth_version ) {
			$nonce = wp_create_nonce( 'et_core_api_service_oauth2' );
			$args  = array(
				'client_id'     => $this->data['api_key'],
				'response_type' => 'code',
				'state'         => rawurlencode( "ET_Core|{$this->slug}|{$this->account_name}|{$nonce}" ),
				'redirect_uri'  => $this->REDIRECT_URL, // @phpcs:ignore -- No need to change the class property
			);

			$this->save_data();

			return array( 'redirect_url' => add_query_arg( $args, $this->AUTHORIZATION_URL ) );
		}

		return false;
	}

	/**
	 * Remove the service account from the database. This cannot be undone. The instance
	 * will no longer be usable after a call to this method.
	 *
	 * @since  1.1.0
	 */
	abstract public function delete();

	/**
	 * Get the form fields to show in the WP Dashboard for this service's accounts.
	 *
	 * @since  1.1.0
	 *
	 * @return array
	 */
	abstract public function get_account_fields();

	/**
	 * Get an array that maps our data keys to those returned by the 3rd-party service's API.
	 *
	 * @since    1.1.0
	 *
	 * @param array $keymap A mapping of our data key addresses to those of the service, organized by type/category.
	 *
	 * @return array[] {
	 *
	 *     @type array $key_type {
	 *
	 *         @type string $our_key_address The corresponding key address on the service.
	 *         ...
	 *    }
	 *    ...
	 * }
	 */
	abstract public function get_data_keymap( $keymap = array() );

	/**
	 * Get error message for a response that has an ERROR status. If possible the provider's
	 * error message will be returned. Otherwise the HTTP error status description will be returned.
	 *
	 * @return string
	 */
	public function get_error_message() {
		if ( ! empty( $this->data_keys['error'] ) ) {
			$data = $this->transform_data_to_our_format( $this->response->DATA, 'error' );
			return isset( $data['error_message'] ) ? $data['error_message'] : '';
		}

		return $this->response->ERROR_MESSAGE;
	}

	/**
	 * Whether or not the current account has been authenticated with the service's API.
	 *
	 * @return bool
	 */
	public function is_authenticated() {
		return isset( $this->data['is_authorized'] ) && in_array( $this->data['is_authorized'], array( true, 'true' ) );
	}

	/**
	 * Makes a remote request using the current {@link self::http->request}. Automatically
	 * handles custom headers and OAuth when applicable.
	 */
	public function make_remote_request() {
		if ( ! empty( $this->custom_headers ) ) {
			$this->http->request->HEADERS = array_merge( $this->http->request->HEADERS, $this->custom_headers );
		}

		if ( $this->uses_oauth ) {
			$oauth2 = '2.0' === $this->oauth_version;
			$this->http->request = $this->OAuth_Helper->prepare_oauth_request( $this->http->request, $oauth2 );
		} else if ( $this->http_auth ) {
			$this->_add_http_auth_header_to_request();
		}

		$this->request = $this->http->request;

		$this->http->make_remote_request();

		$this->response = $this->http->response;
	}

	/**
	 * Convenience accessor for {@link self::http->prepare_request()}
	 *
	 * @param string $url
	 * @param string $method
	 * @param bool   $is_auth
	 * @param mixed  $body
	 * @param bool   $json_body
	 * @param bool   $ssl_verify
	 */
	public function prepare_request( $url, $method = 'GET', $is_auth = false, $body = null, $json_body = false, $ssl_verify = true ) {
		$this->http->prepare_request( $url, $method, $is_auth, $body, $json_body, $ssl_verify );
		$this->request = $this->http->request;
	}

	/**
	 * Save this service's data to the database.
	 *
	 * @return mixed
	 */
	abstract public function save_data();

	/**
	 * Set the account name for the instance. Changing the accounts name affects the
	 * value of {@link self::data}.
	 *
	 * @param string $name
	 */
	abstract public function set_account_name( $name );

	/**
	 * Transforms an array from our data format to that of the service provider.
	 *
	 * @param array  $data         The data to be transformed.
	 * @param string $key_type     The type of data. This corresponds to the key_type in {@link self::data_keys}.
	 * @param array  $exclude_keys Keys that should be excluded from the transformed data.
	 *
	 * @return array
	 */
	public function transform_data_to_our_format( $data, $key_type, $exclude_keys = array() ) {
		if ( ! isset( $this->data_keys[ $key_type ] ) ) {
			return array();
		}

		return self::$_->array_transform( $data, $this->data_keys[ $key_type ], '<-', $exclude_keys );
	}

	/**
	 * Transforms an array from the service provider's data format to our data format.
	 *
	 * @param array  $data         The data to be transformed.
	 * @param string $key_type     The type of data. This corresponds to the key_type in {@link self::data_keys}.
	 * @param array  $exclude_keys Keys that should be excluded from the transformed data.
	 *
	 * @return array
	 */
	public function transform_data_to_provider_format( $data, $key_type, $exclude_keys = array() ) {
		if ( ! isset( $this->data_keys[ $key_type ] ) ) {
			return array();
		}

		return self::$_->array_transform( $data, $this->data_keys[ $key_type ], '->', $exclude_keys );
	}
}
api/ElegantThemes.php000064400000013147152336022500010557 0ustar00<?php

if ( ! class_exists( 'ET_Core_API_ElegantThemes' ) ):
/**
 * Handles communication with the main ET API.
 *
 * @since 3.10
 *
 * @private
 *
 * @package ET\Core\API
 */
class ET_Core_API_ElegantThemes {
	/**
	 * Base API URL.
	 *
	 * @var string
	 */
	protected $api_url = 'https://www.elegantthemes.com/api/';

	/**
	 * API username.
	 *
	 * @var string
	 */
	protected $username = '';

	/**
	 * API key.
	 *
	 * @var string
	 */
	protected $api_key = '';

	/**
	 * ET_Core_API_Client constructor.
	 *
	 * @since 3.10
	 *
	 * @param string $username
	 * @param string $api_key
	 * @param string $api
	 */
	public function __construct( $username, $api_key ) {
		$this->username = sanitize_text_field( $username );
		$this->api_key = sanitize_text_field( $api_key );
	}

	/**
	 * Decorate a payload array with common data.
	 *
	 * @since 3.10
	 *
	 * @param array $payload
	 *
	 * @return array
	 */
	protected function _get_decorated_payload( $payload ) {
		if ( ! isset( $payload['username'] ) ) {
			$payload['username'] = $this->username;
		}

		if ( ! isset( $payload['api_key'] ) ) {
			$payload['api_key'] = $this->api_key;
		}

		return $payload;
	}

	/**
	 * Decorate request options array with common options.
	 *
	 * @since 3.10
	 *
	 * @param array $options
	 *
	 * @return array
	 */
	protected function _get_decorated_request_options( $options = array() ) {
		global $wp_version;

		$options = array_merge( array(
			'timeout'    => 10,
			'user-agent' => 'WordPress/' . $wp_version . '; Elegant Themes/' . ET_CORE_VERSION . '; ' . home_url( '/' ),
		), $options );

		return $options;
	}

	/**
	 * Parse a response from the API.
	 *
	 * @since 3.10
	 *
	 * @param array|WP_Error $response
	 *
	 * @return object|WP_Error
	 */
	protected function _parse_response( $response ) {
		if ( is_wp_error( $response ) ) {
			return $response;
		}

		$response_body = trim( wp_remote_retrieve_body( $response ) );

		if ( '' === $response_body ) {
			return new WP_Error( 'et_unknown', esc_html__( 'An unknown error has occurred. Please try again later.', 'et-core' ) );
		}

		$credentials_errors = array(
			'Username is not set.',
			'Subscription is not active',
		);

		if ( in_array( $response_body, $credentials_errors )  ) {
			return new WP_Error( 'et_invalid_api_credentials', esc_html__( 'Invalid Username and/or API Key provided.', 'et-core' ) );
		}

		return maybe_unserialize( $response_body );
	}

	/**
	 * Get the full API endpoint.
	 *
	 * @since 3.10
	 *
	 * @param string $endpoint "api" or "api_downloads"
	 *
	 * @return string
	 */
	protected function _get_endpoint( $endpoint = 'api' ) {
		$allowed_endpoints = array( 'api', 'api_downloads' );
		$suffix = '.php';

		if ( ! in_array( $endpoint, $allowed_endpoints ) ) {
			$endpoint = $allowed_endpoints[0];
		}

		return esc_url_raw( $this->api_url . $endpoint . $suffix );
	}

	/**
	 * Submit a GET request to the API.
	 *
	 * @since 3.10
	 *
	 * @param array $payload
	 * @param string $endpoint
	 *
	 * @return object|WP_Error
	 */
	protected function _get( $payload, $endpoint = 'api' ) {
		$payload = $this->_get_decorated_payload( $payload );
		$options = $this->_get_decorated_request_options();
		$url = esc_url_raw( add_query_arg( $payload, $this->_get_endpoint( $endpoint ) ) );

		$response = wp_remote_get( $url, $options );

		return $this->_parse_response( $response );
	}

	/**
	 * Submit a POST request to the API.
	 *
	 * @since 3.10
	 *
	 * @param array $payload
	 * @param string $endpoint
	 *
	 * @return object|WP_Error
	 */
	protected function _post( $payload, $endpoint = 'api' ) {
		$payload = $this->_get_decorated_payload( $payload );
		$options = $this->_get_decorated_request_options( array(
			'body' => $payload,
		) );

		$response = wp_remote_post( $this->_get_endpoint( $endpoint ), $options );

		return $this->_parse_response( $response );
	}

	/**
	 * Check if a product is available.
	 *
	 * @since 3.10
	 *
	 * @param string $product_name
	 * @param string $version
	 *
	 * @return bool|WP_Error
	 */
	public function is_product_available( $product_name, $version ) {
		$response = $this->_get( array(
			'api_update' => 1,
			'action'     => 'check_version_status',
			'product'    => $product_name,
			'version'    => $version,
		) );

		if ( is_wp_error( $response ) ) {
			return $response;
		}

		if ( ! is_array( $response ) ) {
			return new WP_Error( 'et_unknown', esc_html__( 'An unexpected response was received from the version server. Please try again later.', 'et-core' ) );
		}

		switch ( $response['status'] ) {
			case 'not_available':
				return new WP_Error( 'et_version_rollback_not_available', sprintf(
					esc_html__( 'The previously used version of %1$s does not support version rollback.', 'et-core' ),
					esc_html( $product_name )
				) );

			case 'blocklisted':
				return new WP_Error( 'et_version_rollback_blocklisted', et_get_safe_localization( sprintf(
					__( 'For privacy and security reasons, you cannot rollback to <strong>Version %1$s</strong>.', 'et-core' ),
					esc_html( $version )
				) ) );

			case 'available':
				return true;
		}

		return new WP_Error( 'et_unknown', esc_html__( 'An unknown error has occurred. Please try again later.', 'et-core' ) );
	}

	/**
	 * Get a product download url for a specific version, if available.
	 *
	 * @since 3.10
	 *
	 * @param string $product_name
	 * @param string $version
	 *
	 * @return string|WP_Error
	 */
	public function get_download_url( $product_name, $version ) {
		$payload = $this->_get_decorated_payload( array(
			'api_update' => 1,
			'theme'      => $product_name,
			'version'    => $version,
		) );
		return esc_url_raw( add_query_arg( $payload, $this->_get_endpoint( 'api_downloads' ) ) );
	}
}
endif;
api/init.php000064400000000302152336022500006762 0ustar00<?php

if ( ! function_exists( 'et_core_api_init' ) ):
function et_core_api_init() {
	add_action( 'admin_init', array( 'ET_Core_API_OAuthHelper', 'finish_oauth2_authorization' ), 20 );
}
endif;
api/email/MadMimi.php000064400000007251152336022500010435 0ustar00<?php

/**
 * Wrapper for MadMimi's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_MadMimi extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.madmimi.com';

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://api.madmimi.com/audience_lists/lists.json';

	/**
	 * @inheritDoc
	 */
	public $SUBSCRIBE_URL = 'https://api.madmimi.com/audience_lists/@list_id@/add';

	/**
	 * @inheritDoc
	 */
	public $custom_fields = 'dynamic';

	/**
	 * @inheritDoc
	 */
	public $name = 'MadMimi';

	/**
	 * @inheritDoc
	 */
	public $slug = 'madmimi';

	public function __construct( $owner, $account_name, $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->_maybe_set_urls();
	}

	protected function _maybe_set_urls( $list_id = '' ) {
		if ( ! empty( $this->data['api_key'] ) && ! empty( $this->data['username'] ) ) {
			$args = array(
				'username' => rawurlencode( $this->data['username'] ),
				'api_key'  => $this->data['api_key'],
			);

			$this->LISTS_URL     = add_query_arg( $args, $this->LISTS_URL );
			$this->SUBSCRIBE_URL = add_query_arg( $args, $this->SUBSCRIBE_URL );

			if ( $list_id ) {
				$this->SUBSCRIBE_URL = str_replace( '@list_id@', rawurlencode( $list_id ), $this->SUBSCRIBE_URL );
			}
		}
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, $field_id, $value );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'username' => array(
				'label' => esc_html__( 'Username', 'et_core' ),
			),
			'api_key'  => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'       => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => 'list_size',
			),
			'subscriber' => array(
				'name'          => 'first_name',
				'last_name'     => 'last_name',
				'email'         => 'email',
				'custom_fields' => 'custom_fields',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) || empty( $this->data['username'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_maybe_set_urls();

		$this->response_data_key = false;

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		if ( empty( $this->data['api_key'] ) || empty( $this->data['username'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_maybe_set_urls( $args['list_id'] );

		$ip_address = 'true' === self::$_->array_get( $args, 'ip_address', 'true' ) ? et_core_get_ip_address() : '0.0.0.0';

		$args                   = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$args                   = $this->_process_custom_fields( $args );
		$args['ip_address']     = $ip_address;
		$args['subscribed_via'] = $this->SUBSCRIBED_VIA;

		$this->SUBSCRIBE_URL = add_query_arg( $args, $this->SUBSCRIBE_URL );

		$this->prepare_request( $this->SUBSCRIBE_URL, 'POST', false );

		return parent::subscribe( $args, $url );
	}
}
api/email/Mailster.php000064400000013053152336022500010675 0ustar00<?php

/**
 * Wrapper for integration with Mailster plugin.
 *
 * @license
 * Copyright © 2017 Elegant Themes, Inc.
 * Copyright © 2017 Xaver Birsak
 *
 * @since   1.1.0
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_Mailster extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $name = 'Mailster';

	/**
	 * @inheritDoc
	 */
	public $slug = 'mailster';

	/**
	 * @inheritDoc
	 */
	public $uses_oauth = false;

	/**
	 * Creates a referrer string that includes the name of the opt-in used to subscribe.
	 *
	 * @param array $args The args array that was passed to {@link self::subscribe()}
	 *
	 * @return string
	 */
	protected function _get_referrer( $args ) {
		$optin_name = '';
		$owner      = ucfirst( $this->owner );

		if ( 'bloom' === $this->owner && isset( $args['optin_id'] ) ) {
			$optin_form = ET_Bloom::get_this()->dashboard_options[ $args['optin_id'] ];
			$optin_name = $optin_form['optin_name'];
		}

		return sprintf( '%1$s %2$s "%3$s" on %4$s',
			esc_html( $owner ),
			esc_html__( 'Opt-in', 'et_core' ),
			esc_html( $optin_name ),
			wp_get_referer()
		);
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		static $fields = null;

		if ( is_null( $fields ) ) {
			$customfields = mailster()->get_custom_fields();

			if ( empty( $customfields ) ) {
				return $fields;
			}
			
			$field_types = self::$_->array_get( $this->data_keys, 'custom_field_type' );
			foreach ( $customfields as $field_id => $field ) {
				$field             = $this->transform_data_to_our_format( $field, 'custom_field' );
				$type              = self::$_->array_get( $field, 'type', 'any' );
				$field['field_id'] = $field_id;

				if ( $field_types && ! isset( $field_types[ $type ] ) ) {
					// Unsupported field type. Make it 'text' instead.
					$type = 'textfield';
				}
				$field['type'] = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'input' );

				$fields[ $field_id ] = $field;
			}
		}

		return $fields;
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );
		$registered_custom_fields = self::$_->array_get( $this->data, 'custom_fields', array() );
		foreach ( $fields as $field_id => $value ) {
			$field_type = isset( $registered_custom_fields[ $field_id ] ) && isset( $registered_custom_fields[ $field_id ]['type'] ) ? $registered_custom_fields[ $field_id ]['type'] : false;
			// Mailster doesn't support multiple checkboxes and if it appears here that means the checkbox is checked
			if ( 'checkbox' === $field_type ) {
				$value = 1;
			}

			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, $field_id, $value );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array();
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'       => array(
				'list_id'           => 'ID',
				'name'              => 'name',
				'subscribers_count' => 'subscribers',
			),
			'subscriber' => array(
				'dbl_optin'     => 'status',
				'email'         => 'email',
				'last_name'     => 'lastname',
				'name'          => 'firstname',
				'custom_fields' => 'custom_fields',
			),
			'custom_field'      => array(
				'name'     => 'name',
				'type'     => 'type',
				'options'  => 'values',
				'hidden'   => 'hidden',
			),
			'custom_field_type' => array(
				// Us => Them
				'textarea'   => 'textarea',
				'radio'      => 'radio',
				'checkbox'   => 'checkbox',
				'input'      => 'textfield',
				'select'     => 'dropdown',
				// Them => Us
				'textfield'  => 'input',
				'dropdown'   => 'select',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	public function fetch_subscriber_lists() {
		if ( ! function_exists( 'mailster' ) ) {
			return esc_html__( 'Mailster Newsletter Plugin is not enabled!', 'et_core' );
		}

		$lists         = mailster( 'lists' )->get( null, null, true );
		$error_message = esc_html__( 'No lists were found. Please create a Mailster list first!', 'et_core' );

		if ( $lists ) {
			$error_message               = 'success';
			$this->data['lists']         = $this->_process_subscriber_lists( $lists );
			$this->data['is_authorized'] = true;
			$this->data['custom_fields'] = $this->_fetch_custom_fields();
			$this->save_data();
		}

		return $error_message;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$error = esc_html__( 'An error occurred. Please try again later.', 'et_core' );

		if ( ! function_exists( 'mailster' ) ) {
			return $error;
		}

		$params       = $this->transform_data_to_provider_format( $args, 'subscriber', array( 'dbl_optin' ) );
		$params       = $this->_process_custom_fields( $params );
		$extra_params = array(
			'status'   => 'disable' === $args['dbl_optin'] ? 1 : 0,
			'referrer' => $this->_get_referrer( $args ),
		);

		$params        = array_merge( $params, $extra_params );
		$subscriber_id = mailster( 'subscribers' )->merge( $params );

		if ( is_wp_error( $subscriber_id ) ) {
			$result = htmlspecialchars_decode( $subscriber_id->get_error_message() );
		} else if ( mailster( 'subscribers' )->assign_lists( $subscriber_id, $args['list_id'], false ) ) {
			$result = 'success';
		} else {
			$result = $error;
		}

		return $result;
	}
}
api/email/_MailPoet2.php000064400000007735152336022500011062 0ustar00<?php

/**
 * Wrapper for MailPoet's API.
 *
 * @since   3.0.76
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_MailPoet2 extends ET_Core_API_Email_Provider {

	public static $PLUGIN_REQUIRED;

	/**
	 * @inheritDoc
	 */
	public $name = 'MailPoet';

	/**
	 * @inheritDoc
	 */
	public $slug = 'mailpoet';

	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		if ( null === self::$PLUGIN_REQUIRED ) {
			self::$PLUGIN_REQUIRED = esc_html__( 'MailPoet plugin is either not installed or not activated.', 'et_core' );
		}
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array();
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'       => array(
				'list_id' => 'id',
				'name'    => 'name',
			),
			'subscriber' => array(
				'name'      => 'first_name',
				'last_name' => 'last_name',
				'email'     => 'email',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( ! class_exists( 'WYSIJA' ) ) {
			return self::$PLUGIN_REQUIRED;
		}

		$lists           = array();
		$list_model      = WYSIJA::get( 'list', 'model' );
		$all_lists_array = $list_model->get( array( 'name', 'list_id' ), array( 'is_enabled' => '1' ) );

		foreach ( $all_lists_array as $list_details ) {
			$lists[ $list_details['list_id'] ]['name'] = sanitize_text_field( $list_details['name'] );

			$user_model            = WYSIJA::get( 'user_list', 'model' );
			$all_subscribers_array = $user_model->get( array( 'user_id' ), array( 'list_id' => $list_details['list_id'] ) );

			$subscribers_count                                      = count( $all_subscribers_array );
			$lists[ $list_details['list_id'] ]['subscribers_count'] = sanitize_text_field( $subscribers_count );
		}

		$this->data['is_authorized'] = true;

		if ( ! empty( $lists ) ) {
			$this->data['lists'] = $lists;
		}

		$this->save_data();

		return array( 'success' => $this->data );
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		if ( ! class_exists( 'WYSIJA' ) ) {
			ET_Core_Logger::error( self::$PLUGIN_REQUIRED );
			return esc_html__( 'An error occurred. Please try again later.', 'et_core' );
		}

		global $wpdb;
		$wpdb->wysija_user_table       = $wpdb->prefix . 'wysija_user';
		$wpdb->wysija_user_lists_table = $wpdb->prefix . 'wysija_user_list';

		// get the ID of subscriber if they're in the list already
		$subscriber_id = $wpdb->get_var( $wpdb->prepare(
			"SELECT user_id FROM {$wpdb->wysija_user_table} WHERE email = %s",
			array(
				et_core_sanitized_previously( $args['email'] ),
			)
		) );
		$already_subscribed = 0;

		// if current email is subscribed, then check whether it subscribed to the current list
		if ( ! empty( $subscriber_id ) ) {
			$already_subscribed = (int) $wpdb->get_var( $wpdb->prepare(
				"SELECT COUNT(*) FROM {$wpdb->wysija_user_lists_table} WHERE user_id = %s AND list_id = %s",
				array(
					$subscriber_id,
					et_core_sanitized_previously( $args['list_id'] ),
				)
			) );
		}

		unset( $wpdb->wysija_user_table );
		unset( $wpdb->wysija_user_list_table );

		// if email is not subscribed to current list, then subscribe.
		if ( 0 === $already_subscribed ) {
			$new_user = array(
				'user'      => array(
					'email'     => et_core_sanitized_previously( $args['email'] ),
					'firstname' => et_core_sanitized_previously( $args['name'] ),
					'lastname'  => et_core_sanitized_previously( $args['last_name'] ),
				),
				'user_list' => array(
					'list_ids' => array( et_core_sanitized_previously( $args['list_id'] ) ),
				),
			);

			$mailpoet_class = WYSIJA::get( 'user', 'helper' );
			$error_message  = $mailpoet_class->addSubscriber( $new_user );
			$error_message  = is_int( $error_message ) ? 'success' : $error_message;
		} else {
			$error_message = esc_html__( 'Already Subscribed', 'bloom' );
		}

		return $error_message;
	}
}
api/email/init.php000064400000007425152336022500010066 0ustar00<?php

if ( ! function_exists( 'et_core_api_email_init' ) ):
function et_core_api_email_init() {
	if ( defined( 'ET_CORE_UPDATED' ) ) {
		et_core_api_email_fetch_all_lists();
	}
}
endif;


if ( ! function_exists( 'et_core_api_email_fetch_all_lists' ) ):
/**
 * Fetch the latest email lists for all provider accounts and update the database accordingly.
 *
 * @since 3.4
 */
function et_core_api_email_fetch_all_lists() {
	$providers    = ET_Core_API_Email_Providers::instance();
	$all_accounts = $providers->accounts();

	foreach ( $all_accounts as $provider_slug => $accounts ) {
		$provider = $providers->get( $provider_slug, '' );

		foreach ( $accounts as $account ) {
			$provider->set_account_name( $account );
			$provider->fetch_subscriber_lists();
		}
	}
}
endif;


if ( ! function_exists( 'et_core_api_email_fetch_lists' ) ):
/**
 * Fetch the latest email lists for a provider account and update the database accordingly.
 *
 * @param string $name_or_slug The provider name or slug.
 * @param string $account      The account name.
 * @param string $api_key      Optional. The api key (if fetch succeeds, the key will be saved).
 *
 * @return string 'success' if successful, an error message otherwise.
 */
function et_core_api_email_fetch_lists( $name_or_slug, $account, $api_key = '' ) {
	if ( ! empty( $api_key ) ) {
		// The account provided either doesn't exist yet or has a new api key.
		et_core_security_check( 'manage_options' );
	}

	if ( empty( $name_or_slug ) || empty( $account ) ) {
		return __( 'ERROR: Invalid arguments.', 'et_core' );
	}

	$providers = ET_Core_API_Email_Providers::instance();
	$provider  = $providers->get( $name_or_slug, $account, 'builder' );

	if ( ! $provider ) {
		return '';
	}

	if ( is_array( $api_key ) ) {
		foreach ( $api_key as $field_name => $value ) {
			$provider->data[ $field_name ] = sanitize_text_field( $value );
		}
	} else if ( '' !== $api_key ) {
		$provider->data['api_key'] = sanitize_text_field( $api_key );
	}

	return $provider->fetch_subscriber_lists();
}
endif;


if ( ! function_exists( 'et_core_api_email_providers' ) ):
/**
 * @deprecated {@see ET_Core_API_Email_Providers::instance()}
 *
 * @return ET_Core_API_Email_Providers
 */
function et_core_api_email_providers() {
	return ET_Core_API_Email_Providers::instance();
}
endif;


if ( ! function_exists( 'et_core_api_email_remove_account' ) ):
/**
 * Delete an existing provider account.
 *
 * @param string $name_or_slug The provider name or slug.
 * @param string $account      The account name.
 */
function et_core_api_email_remove_account( $name_or_slug, $account ) {
	et_core_security_check( 'manage_options' );

	if ( empty( $name_or_slug ) || empty( $account ) ) {
		return;
	}

	// If the account being removed is a legacy account (pre-dates core api), remove the old data.
	switch( $account ) {
		case 'Divi Builder Aweber':
			et_delete_option( 'divi_aweber_consumer_key' );
			et_delete_option( 'divi_aweber_consumer_secret' );
			et_delete_option( 'divi_aweber_access_key' );
			et_delete_option( 'divi_aweber_access_secret' );
			break;
		case 'Divi Builder Plugin Aweber':
			$opts  = (array) get_option( 'et_pb_builder_options' );
			unset( $opts['aweber_consumer_key'], $opts['aweber_consumer_secret'], $opts['aweber_access_key'], $opts['aweber_access_secret'] );
			update_option( 'et_pb_builder_options', $opts );
			break;
		case 'Divi Builder MailChimp':
			et_delete_option( 'divi_mailchimp_api_key' );
			break;
		case 'Divi Builder Plugin MailChimp':
			$options  = (array) get_option( 'et_pb_builder_options' );
			unset( $options['newsletter_main_mailchimp_key'] );
			update_option( 'et_pb_builder_options', $options );
			break;
	}

	$providers = ET_Core_API_Email_Providers::instance();
	$provider  = $providers->get( $name_or_slug, $account );

	if ( $provider ) {
		$provider->delete();
	}
}
endif;
api/email/MailPoet.php000064400000005160152336022500010627 0ustar00<?php

/**
 * Wrapper for MailPoet's API.
 *
 * @since   3.0.76
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_MailPoet extends ET_Core_API_Email_Provider {

	/**
	 * @var ET_Core_API_Email_Provider
	 */
	private $_MP;

	public static $PLUGIN_REQUIRED;

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'MailPoet';

	/**
	 * @inheritDoc
	 */
	public $slug = 'mailpoet';

	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		if ( null === self::$PLUGIN_REQUIRED ) {
			self::$PLUGIN_REQUIRED = esc_html__( 'MailPoet plugin is either not installed or not activated.', 'et_core' );
		}

		$has_php53 = version_compare( PHP_VERSION, '5.3', '>=' );

		if ( $has_php53 && class_exists( '\MailPoet\API\API' ) ) {
			require_once( ET_CORE_PATH . 'components/api/email/_MailPoet3.php' );
			$this->_init_provider_class( '3', $owner, $account_name, $api_key );

		} else if ( class_exists( 'WYSIJA' ) ) {
			require_once( ET_CORE_PATH . 'components/api/email/_MailPoet2.php' );
			$this->_init_provider_class( '2', $owner, $account_name, $api_key );
		}
	}

	/**
	 * Initiate provider class based on the version number.
	 *
	 * @param  string $version      Version number.
	 * @param  string $owner        Owner.
	 * @param  string $account_name Account name.
	 * @param  string $api_key      API key.
	 */
	protected function _init_provider_class( $version, $owner, $account_name, $api_key ) {
		if ( '3' === $version ) {
			$this->_MP = new ET_Core_API_Email_MailPoet3( $owner, $account_name, $api_key );
		} else {
			$this->_MP           = new ET_Core_API_Email_MailPoet2( $owner, $account_name, $api_key );
			$this->custom_fields = false;
		}
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array();
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		if ( $this->_MP ) {
			return $this->_MP->get_data_keymap( $keymap );
		}

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		$lists_data = $this->_MP ? $this->_MP->fetch_subscriber_lists() : self::$PLUGIN_REQUIRED;

		// Update data in Main MailPoet class, so correct lists data can be accessed
		if ( isset( $lists_data['success'] ) ) {
			$this->data = $lists_data['success'];

			$this->save_data();

			return 'success';
		}

		return $lists_data;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		return $this->_MP ? $this->_MP->subscribe( $args, $url ) : self::$PLUGIN_REQUIRED;
	}
}
api/email/MailChimp.php000064400000022672152336022500010767 0ustar00<?php

/**
 * Wrapper for MailChimp's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_MailChimp extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = '';

	/**
	 * Use this variable to hold the pattern and update $BASE_URL dynamically when needed
	 */
	public $BASE_URL_PATTERN = 'https://@datacenter@.api.mailchimp.com/3.0';

	/**
	 * @inheritDoc
	 */
	public $http_auth = array(
		'username' => '-',
		'password' => 'api_key',
	);

	/**
	 * @inheritDoc
	 */
	public $name = 'MailChimp';

	/**
	 * @inheritDoc
	 */
	public $slug = 'mailchimp';

	public function __construct( $owner, $account_name, $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		if ( ! empty( $this->data['api_key'] ) ) {
			$this->_set_base_url();
		}

		$this->http_auth['username'] = $owner;
	}

	protected function _add_note_to_subscriber( $email, $url ) {
		$email = md5( $email );

		$this->prepare_request( "{$url}/$email/notes", 'POST' );

		$this->request->BODY = json_encode( array( 'note' => $this->SUBSCRIBED_VIA ) );

		$this->make_remote_request();
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$this->response_data_key = 'merge_fields';

		$this->prepare_request( "{$this->BASE_URL}/lists/{$list_id}/merge-fields?count={$this->COUNT}" );

		$fields = parent::_fetch_custom_fields( $list_id, $list );

		foreach ( $fields as $id => $field ) {
			if ( in_array( $id, array( 1, 2 ) ) ) {
				unset( $fields[ $id ] );
			}
		}

		// MailChimp is weird in that they treat checkbox fields as an entirely different concept in their API (Groups)
		// We'll grab the groups and treat them as checkbox fields in our UI.
		$groups = $this->_fetch_subscriber_list_groups( $list_id );

		return $fields + $groups;
	}

	protected function _fetch_subscriber_list_group_options( $list_id, $group_id ) {
		$this->prepare_request( "{$this->BASE_URL}/lists/{$list_id}/interest-categories/{$group_id}/interests?count={$this->COUNT}" );

		$this->make_remote_request();

		if ( $this->response->ERROR ) {
			et_debug( $this->get_error_message() );

			return array();
		}

		$data    = $this->response->DATA['interests'];
		$options = array();

		foreach ( $data as $option ) {
			$option = $this->transform_data_to_our_format( $option, 'group_option' );
			$id     = $option['id'];

			$options[ $id ] = $option['name'];
		}

		return $options;
	}

	protected function _fetch_subscriber_list_groups( $list_id ) {
		$this->response_data_key = 'categories';

		$this->prepare_request( "{$this->BASE_URL}/lists/{$list_id}/interest-categories?count={$this->COUNT}" );
		$this->make_remote_request();

		$groups = array();

		if ( false !== $this->response_data_key && empty( $this->response_data_key ) ) {
			// Let child class handle parsing the response data themselves.
			return $groups;
		}

		if ( $this->response->ERROR ) {
			et_debug( $this->get_error_message() );

			return $groups;
		}

		$data = $this->response->DATA[ $this->response_data_key ];

		foreach ( $data as $group ) {
			$group    = $this->transform_data_to_our_format( $group, 'group' );
			$field_id = $group['field_id'];
			$type     = $group['type'];

			if ( 'hidden' === $type ) {
				// MailChimp only allows groups of type: 'checkbox' to be hidden.
				$group['type']   = 'checkbox';
				$group['hidden'] = true;
			}

			$group['is_group'] = true;
			$group['options']  = $this->_fetch_subscriber_list_group_options( $list_id, $field_id );
			$group['type']     = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'text' );

			$groups[ $field_id ] = $group;
		}

		return $groups;
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];
		$list_id = self::$_->array_get( $args, 'list_id', '' );

		unset( $args['custom_fields'] );
		unset( $args['list_id'] );

		$custom_fields_data = self::$_->array_get( $this->data, "lists.{$list_id}.custom_fields", array() );

		foreach ( $fields as $field_id => $value ) {
			$is_group = self::$_->array_get( $custom_fields_data, "{$field_id}.is_group", false );

			if ( is_array( $value ) && $value ) {
				foreach ( $value as $id => $field_value ) {
					if ( $is_group ) {
						// If it is a group custom field, set as `interests` and don't process the `merge_fields`
						self::$_->array_set( $args, "interests.{$id}", true );
						$field_id = false;
					} else {
						$value = $field_value;
					}
				}
			}

			if ( false === $field_id ) {
				continue;
			}

			// In previous version of Mailchimp implementation we only supported default field tag, but it can be customized and our code fails.
			// Added `field_tag` attribute which is actual field tag. Fallback to default field tag if `field_tag` doesn't exist for backward compatibility.
			$custom_field_tag = self::$_->array_get( $custom_fields_data, "{$field_id}.field_tag", "MMERGE{$field_id}" );

			// Need to strips existing slash chars.
			self::$_->array_set( $args, "merge_fields.{$custom_field_tag}", stripslashes( $value ) );
		}

		return $args;
	}

	protected function _set_base_url() {
		$api_key_pieces = explode( '-', $this->data['api_key'] );
		$datacenter     = empty( $api_key_pieces[1] ) ? '' : $api_key_pieces[1];
		$this->BASE_URL = str_replace( '@datacenter@', $datacenter, $this->BASE_URL_PATTERN );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_set_base_url();

		/**
		 * The maximum number of subscriber lists to request from MailChimp's API.
		 *
		 * @since 2.0.0
		 *
		 * @param int $max_lists
		 */
		$max_lists = (int) apply_filters( 'et_core_api_email_mailchimp_max_lists', 250 );

		$url = "{$this->BASE_URL}/lists?count={$max_lists}&fields=lists.name,lists.id,lists.stats,lists.double_optin";

		$this->prepare_request( $url );

		$this->response_data_key = 'lists';

		$result = parent::fetch_subscriber_lists();

		return $result;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'              => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'double_optin'      => 'double_optin',
				'subscribers_count' => 'stats.member_count',
			),
			'subscriber'        => array(
				'email'         => 'email_address',
				'name'          => 'merge_fields.FNAME',
				'last_name'     => 'merge_fields.LNAME',
				'custom_fields' => 'custom_fields',
			),
			'error'             => array(
				'error_message' => 'detail',
			),
			'custom_field'      => array(
				'field_id'  => 'merge_id',
				'field_tag' => 'tag',
				'name'      => 'name',
				'type'      => 'type',
				'hidden'    => '!public',
				'options'   => 'options.choices',
			),
			'custom_field_type' => array(
				// Us <=> Them
				'radio'      => 'radio',
				// Us => Them
				'input'      => 'text',
				'select'     => 'dropdown',
				'checkbox'   => 'checkboxes',
				// Them => Us
				'text'       => 'input',
				'dropdown'   => 'select',
				'checkboxes' => 'checkbox',
			),
			'group'             => array(
				'field_id' => 'id',
				'name'     => 'title',
				'type'     => 'type',
			),
			'group_option'      => array(
				'id'   => 'id',
				'name' => 'name',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	public function get_subscriber( $list_id, $email ) {
		$hash = md5( strtolower( $email ) );
		$this->prepare_request( implode( '/', array( $this->BASE_URL, 'lists', $list_id, 'members', $hash ) ) );
		$this->make_remote_request();

		return $this->response->STATUS_CODE !== 200 ? null : $this->response->DATA;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$list_id   = $args['list_id'];
		$args      = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$url       = "{$this->BASE_URL}/lists/{$list_id}/members";
		$email     = $args['email_address'];
		$err       = esc_html__( 'An error occurred, please try later.', 'et_core' );
		$dbl_optin = self::$_->array_get( $this->data, "lists.{$list_id}.double_optin", true );

		$ip_address = 'true' === self::$_->array_get( $args, 'ip_address', 'true' ) ? et_core_get_ip_address() : '0.0.0.0';

		$args['ip_signup'] = $ip_address;
		$args['status']    = $dbl_optin ? 'pending' : 'subscribed';
		$args['list_id']   = $list_id;

		$args = $this->_process_custom_fields( $args );

		$this->prepare_request( $url, 'POST', false, $args, true );
		$result = parent::subscribe( $args, $url );

		if ( false !== stripos( $result, 'already a list member' ) ) {
			$result = $err;

			if ( $user = $this->get_subscriber( $list_id, $email ) ) {
				if ( 'subscribed' === $user['status'] ) {
					$result = 'success';
				} else {
					$this->prepare_request( implode( '/', array( $url, $user['id'] ) ), 'PUT', false, $args, true );

					$result = parent::subscribe( $args, $url );
				}
			}
		}

		if ( 'success' === $result ) {
			$this->_add_note_to_subscriber( $email, $url );
		} else if ( false !== stripos( $result, 'has signed up to a lot of lists ' ) ) {
			// return message which can be translated. Generic Mailchimp messages are not translatable.
			$result = esc_html__( 'You have signed up to a lot of lists very recently, please try again later', 'et_core' );
		} else {
			$result = $err;
		}

		return $result;
	}
}
api/email/ConvertKit.php000064400000013045152336022500011206 0ustar00<?php

/**
 * Wrapper for ConvertKit's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_ConvertKit extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.convertkit.com/v3';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'ConvertKit';

	/**
	 * @inheritDoc
	 */
	public $name_field_only = true;

	/**
	 * @inheritDoc
	 */
	public $slug = 'convertkit';

	/**
	 * @inheritDoc
	 */
	public $uses_oauth = false;

	/**
	 * ET_Core_API_Email_ConvertKit constructor.
	 *
	 * @inheritDoc
	 */
	public function __construct( $owner, $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		// ConvertKit doesn't have "lists". They have "forms" so we use "forms" as if they were "lists".
		$this->LISTS_URL = "{$this->BASE_URL}/forms";
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$this->response_data_key = 'custom_fields';

		$this->prepare_request( $this->_generate_url_for_request( "{$this->BASE_URL}/custom_fields" ) );

		return parent::_fetch_custom_fields( $list_id, $list );
	}

	/**
	 * Generates the URL for adding subscribers.
	 *
	 * @param $list_id
	 *
	 * @since 1.1.0
	 *
	 * @return string
	 */
	protected function _get_subscribe_url( $list_id ) {
		return "{$this->LISTS_URL}/{$list_id}/subscribe";
	}

	protected function _get_subscriber_counts( $forms ) {
		$result = array();

		foreach ( (array) $forms as $form_info ) {
			$url = $this->_generate_url_for_request( "{$this->LISTS_URL}/{$form_info['id']}/subscriptions", true );

			$this->prepare_request( $url );
			$this->make_remote_request();

			if ( $this->response->ERROR || ! isset( $this->response->DATA['total_subscriptions'] ) ) {
				continue;
			}

			$form_info['total_subscriptions'] = $this->response->DATA['total_subscriptions'];

			$result[] = $form_info;
		}

		return $result;
	}

	/**
	 * Adds default args for all API requests to given url.
	 *
	 * @since 1.1.0
	 *
	 * @param string $url
	 * @param bool   $with_secret
	 *
	 * @return string
	 */
	protected function _generate_url_for_request( $url, $with_secret = false ) {
		$key = $with_secret ? $this->data['api_secret'] : $this->data['api_key'];
		$key_type = $with_secret ? 'api_secret' : 'api_key';

		return esc_url_raw( add_query_arg( $key_type, $key, $url ) );
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, "fields.{$field_id}", $value );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
			'api_secret' => array(
				'label' => esc_html__( 'API Secret', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'         => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => 'total_subscriptions',
			),
			'subscriber'   => array(
				'email'         => 'email',
				'name'          => 'first_name',
				'custom_fields' => 'custom_fields',
			),
			'error'        => array(
				'error_message' => 'message',
			),
			'custom_field' => array(
				'field_id' => 'key',
				'name'     => 'label',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$url    = $this->_generate_url_for_request( $this->LISTS_URL );
		$result = 'success';

		$this->response_data_key = '';

		$this->prepare_request( $url );
		parent::fetch_subscriber_lists();

		if ( ! $this->response->ERROR && ! empty( $this->response->DATA['forms'] ) ) {
			/**
			 * We need to store `$forms` to avoid using mutated `$this->response->DATA['forms']` down the line.
			 *
			 * `$this->response->DATA['forms']` will be mutated to `NULL` in this code block since it is a shared state
			 * and is used by other functions all over. This fixes the issue.
			 *
			 * @see: https://github.com/elegantthemes/Divi/issues/25296
			 */
			$forms                       = $this->response->DATA['forms'];
			$with_subscriber_counts      = $this->_get_subscriber_counts( $forms );
			$this->data['lists']         = $this->_process_subscriber_lists( $with_subscriber_counts );
			$this->data['is_authorized'] = 'true';
			$this->data['custom_fields'] = $this->_fetch_custom_fields( '', array_shift( $forms ) );
			$this->save_data();
		} elseif ( $this->response->ERROR ) {
			$result = $this->get_error_message();
		}

		return $result;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$url = $this->_generate_url_for_request( $this->_get_subscribe_url( $args['list_id'] ) );
		$params = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$params = $this->_process_custom_fields( $params );
		$params['fields']['notes'] = $this->SUBSCRIBED_VIA;

		$this->prepare_request( $url, 'POST', false, $params );

		return parent::subscribe( $params, $url );
	}
}
api/email/Ontraport.php000064400000016741152336022500011114 0ustar00<?php

/**
 * Wrapper for Ontraport's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_Ontraport extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $FIELDS_URL = 'https://api.ontraport.com/1/Contacts/meta';

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://api.ontraport.com/1/objects?objectID=5';

	/**
	 * @inheritDoc
	 */
	public $SUBSCRIBE_URL = 'https://api.ontraport.com/1';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'Ontraport';

	/**
	 * @inheritDoc
	 */
	public $slug = 'ontraport';

	/**
	 * @inheritDoc
	 * @internal If true, oauth endpoints properties must also be defined.
	 */
	public $uses_oauth = false;

	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->_maybe_set_custom_headers();
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		static $fields = null;

		if ( is_null( $fields ) ) {
			$this->response_data_key = null;

			parent::_fetch_custom_fields( $list_id, $list );

			if ( $this->response->ERROR ) {
				et_debug( $this->get_error_message() );

				return array();
			}

			$fields             = array();
			$fields_unprocessed = self::$_->array_get( $this->response->DATA, 'data.[0].fields', $fields );

			foreach ( $fields_unprocessed as $field_id => $field ) {
				if ( in_array( $field_id, array( 'firstname', 'lastname', 'email' ) ) ) {
					continue;
				}

				$type = $field['type'];

				$field['field_id'] = $field_id;
				$field['type']     = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'text' );

				$fields[ $field_id ] = $this->transform_data_to_our_format( $field, 'custom_field' );
			}
		}

		return $fields;
	}

	protected function _get_subscriber_list_type( $list_id ) {
		$sequence_key = 'seq:' . $list_id;
		$campaign_key = 'camp:' . $list_id;

		if ( isset( $this->data['lists'][ $campaign_key ] ) ) {
			return 'Campaign';
		}

		if ( isset( $this->data['lists'][ $sequence_key ] ) ) {
			return 'Sequence';
		}

		return 'Campaign';
	}

	protected function _maybe_set_custom_headers() {
		if ( empty( $this->custom_headers ) && isset( $this->data['api_key'] )  && isset( $this->data['client_id'] ) ) {
			$this->custom_headers = array(
				'Api-Appid' => sanitize_text_field( $this->data['client_id'] ),
				'Api-Key'   => sanitize_text_field( $this->data['api_key'] ),
			);
		}
	}

	protected function _prefix_subscriber_lists( $name_prefix, $id_prefix ) {
		$lists = array();

		foreach ( $this->data['lists'] as $list_id => $list ) {
			$key = $id_prefix . $list_id;

			if ( ! $list['name'] ) {
				$list['name'] = $list_id;
			}

			$lists[ $key ]            = $list;
			$lists[ $key ]['name']    = $name_prefix . $list['name'];
			$lists[ $key ]['list_id'] = $key;
		}

		$this->data['lists'] = $lists;

		$this->save_data();
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_keys( $value );

				if ( 'checkbox' === $this->data['custom_fields'][ $field_id ]['type'] ) {
					// Determine if checkbox is a single checkbox or a list. 
					// In case of single checkbox pass `1` as a value
					if ( ! empty( $this->data['custom_fields'][ $field_id ]['options'] ) ) {
						$value = implode( '*/*', $value );
						$value = "*/*{$value}*/*";
					} else {
						$value = '1';
					}
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, $field_id, $value );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key'   => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
			'client_id' => array(
				'label' => esc_html__( 'APP ID', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'              => array(
				'name'              => 'name',
				'list_id'           => 'drip_id',
				'subscribers_count' => 'subscriber_count',
			),
			'subscriber'        => array(
				'name'          => 'firstname',
				'last_name'     => 'lastname',
				'email'         => 'email',
				'custom_fields' => 'custom_fields',
			),
			'custom_field'      => array(
				'field_id' => 'field_id',
				'type'     => 'type',
				'name'     => 'alias',
				'options'  => 'options',
			),
			'custom_field_type' => array(
				// Us => Them
				'input'    => 'text',
				'textarea' => 'textlong',
				'checkbox' => 'list',
				'select'   => 'drop',
				// Them => Us
				'text'     => 'input',
				'textlong' => 'textarea',
				'list'     => 'checkbox',
				'check'    => 'checkbox',
				'drop'     => 'select',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) || empty( $this->data['client_id'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_maybe_set_custom_headers();

		$this->response_data_key = 'data';

		parent::fetch_subscriber_lists();

		$this->_prefix_subscriber_lists( 'Sequence: ', 'seq:' );

		$sequences = $this->data['lists'];
		$url       = 'https://api.ontraport.com/1/CampaignBuilderItems';
		$url       = add_query_arg( 'listFields', 'id,name,subs', $url );

		$this->data_keys['list']['list_id']           = 'id';
		$this->data_keys['list']['subscribers_count'] = 'subs';

		$this->prepare_request( $url );

		$this->response_data_key = 'data';

		$result = parent::fetch_subscriber_lists();

		$this->_prefix_subscriber_lists( 'Campaign: ', 'camp:' );

		$this->data['lists'] = array_merge( $this->data['lists'], $sequences );

		$this->save_data();

		return $result;
	}

	public function get_subscriber( $email ) {
		$args = array(
			'objectID' => '0',
			'email' => rawurlencode( $email ),
		);

		$url = add_query_arg( $args, $this->SUBSCRIBE_URL . '/object/getByEmail' );

		$this->prepare_request( $url );
		$this->make_remote_request();

		return self::$_->array_get( $this->response->DATA, 'data.id', false );
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		if ( empty( $this->data['api_key'] ) || empty( $this->data['client_id'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$list_id          = $args['list_id'];
		$args             = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$args             = $this->_process_custom_fields( $args );
		$args['objectID'] = 0;
		$url              = $this->SUBSCRIBE_URL . '/Contacts/saveorupdate';

		// Create or update contact
		$this->prepare_request( $url, 'POST', false, $args );
		$this->make_remote_request();

		if ( $this->response->ERROR ) {
			return $this->get_error_message();
		}

		$list_id_parts = explode( ':', $list_id );
		$list_id       = array_pop( $list_id_parts );
		$data          = $this->response->DATA['data'];

		// Subscribe contact to list
		$url  = $this->SUBSCRIBE_URL . '/objects/subscribe';
		$args = array(
			'ids'      => self::$_->array_get( $data, 'id', $data['attrs']['id'] ),
			'add_list' => $list_id,
			'sub_type' => $this->_get_subscriber_list_type( $list_id ),
			'objectID' => 0,
		);

		$this->prepare_request( $url, 'PUT', false, $args );

		return parent::subscribe( $args, $url );
	}
}
api/email/_MailPoet3.php000064400000012565152336022500011060 0ustar00<?php

/**
 * Wrapper for MailPoet's API.
 *
 * @since   3.0.76
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_MailPoet3 extends ET_Core_API_Email_Provider {

	public static $PLUGIN_REQUIRED;

	/**
	 * @inheritDoc
	 */
	public $name = 'MailPoet';

	/**
	 * @inheritDoc
	 */
	public $slug = 'mailpoet';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		if ( null === self::$PLUGIN_REQUIRED ) {
			self::$PLUGIN_REQUIRED = esc_html__( 'MailPoet plugin is either not installed or not activated.', 'et_core' );
		}
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		static $processed = null;

		if ( is_null( $processed ) ) {
			$fields    = \MailPoet\API\API::MP( 'v1' )->getSubscriberFields();
			$processed = array();

			foreach ( $fields as $field ) {
				$field_id   = $field['id'];
				$field_name = $field['name'];

				if ( in_array( $field_id, array( 'email', 'first_name', 'last_name' ) ) ) {
					continue;
				}

				$processed[ $field_id ] = array(
					'field_id' => $field_id,
					'name'     => $field_name,
					'type'     => 'any',
				);
			}
		}

		return $processed;
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$custom_fields = $args['custom_fields'];

		$required_fields = $this->_get_required_custom_fields();

		// Filter missing required custom field.
		$missing_fields = array_diff( $required_fields, array_keys( $custom_fields ) );

		// Fill-up missing required custom fields with dummy content and merge with available ones.
		// This is required because of how MailPoet API validates the custom fields currently
		// and there's no filters available to alter this behavior right now.
		$fields = array_merge( $custom_fields, array_fill_keys( $missing_fields, 'n/a' ) );

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_keys( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, $field_id, $value );
		}

		return $args;
	}

	/**
	 * Get required custom fields.
	 *
	 * @return $required_fields
	 */
	protected function _get_required_custom_fields() {
		$fields          = \MailPoet\API\API::MP( 'v1' )->getSubscriberFields();
		$required_fields = [];

		foreach ( $fields as $field ) {
			// Custom field ids have `cf_` prefix. Also we need only the required ones.
			if ( false !== strpos( $field['id'], 'cf_' ) && $field['params']['required'] ) {
				$required_fields[] = $field['id'];
			}
		}

		return $required_fields;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array();
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'       => array(
				'list_id' => 'id',
				'name'    => 'name',
			),
			'subscriber' => array(
				'name'          => 'first_name',
				'last_name'     => 'last_name',
				'email'         => 'email',
				'custom_fields' => 'custom_fields',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( ! class_exists( '\MailPoet\API\API' ) ) {
			return self::$PLUGIN_REQUIRED;
		}

		$data = \MailPoet\API\API::MP( 'v1' )->getLists();

		if ( ! empty( $data ) ) {
			$this->data['lists'] = $this->_process_subscriber_lists( $data );

			$list                        = is_array( $data ) ? array_shift( $data ) : array();
			$this->data['custom_fields'] = $this->_fetch_custom_fields( '', $list );
		}

		$this->data['is_authorized'] = true;

		$this->save_data();

		return array( 'success' => $this->data );
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		if ( ! class_exists( '\MailPoet\API\API' ) ) {
			ET_Core_Logger::error( self::$PLUGIN_REQUIRED );

			return esc_html__( 'An error occurred. Please try again later.', 'et_core' );
		}

		$subscriber      = array();
		$args            = et_core_sanitized_previously( $args );
		$subscriber_data = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$subscriber_data = $this->_process_custom_fields( $subscriber_data );
		$subscriber_data = self::$_->array_flatten( $subscriber_data );
		$result          = 'success';
		$lists           = array( $args['list_id'] );

		unset( $subscriber_data['custom_fields'] );

		/**
		 * Check if the subscriber with this email already exists.
		 */
		try {
			$subscriber = \MailPoet\API\API::MP( 'v1' )->getSubscriber( $subscriber_data['email'] );
		} catch ( \Exception $e ) {
			$subscriber = array();
		}

		/**
		 * If subscriber is not found, add as a new subscriber. Otherwise, add existing subscriber to the lists.
		 */
		if ( empty( $subscriber ) ) {
			try {
				\MailPoet\API\API::MP( 'v1' )->addSubscriber( $subscriber_data, $lists );
			} catch ( Exception $exception ) {
				$result = $exception->getMessage();
			}
		} else {
			try {
				\MailPoet\API\API::MP( 'v1' )->subscribeToLists( $subscriber['id'], $lists );
			} catch ( Exception $exception ) {
				$result = $exception->getMessage();
			}
		}

		return $result;
	}
}
api/email/Feedblitz.php000064400000010115152336022500011021 0ustar00<?php

/**
 * Wrapper for Feedblitz's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_Feedblitz extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://www.feedblitz.com';

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://www.feedblitz.com/f.api/syndications';

	/**
	 * @inheritDoc
	 */
	public $SUBSCRIBE_URL = 'https://www.feedblitz.com/f';

	/**
	 * @inheritDoc
	 */
	public $custom_fields = 'dynamic';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'Feedblitz';

	/**
	 * @inheritDoc
	 */
	public $slug = 'feedblitz';

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, $field_id, rawurlencode( $value ) );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'       => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => 'subscribersummary.subscribers',
			),
			'subscriber' => array(
				'list_id'       => 'listid',
				'email'         => 'email',
				'name'          => 'FirstName',
				'last_name'     => 'LastName',
				'custom_fields' => 'custom_fields',
			),
			'error'      => array(
				'error_message' => 'rsp.err.@attributes.msg',
			)
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->http->expects_json = false;
		$this->response_data_key  = false;
		$this->LISTS_URL          = add_query_arg( 'key', $this->data['api_key'], $this->LISTS_URL );

		parent::fetch_subscriber_lists();

		$response = $this->data_utils->process_xmlrpc_response( $this->response->DATA, true );
		$response = $this->data_utils->xml_to_array( $response );

		if ( $this->response->ERROR || ! empty( $response['rsp']['err']['@attributes']['msg'] ) ) {
			return $this->get_error_message();
		}

		$this->data['lists']         = $this->_process_subscriber_lists( $response['syndications']['syndication'] );
		$this->data['is_authorized'] = true;

		$this->save_data();

		return 'success';
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$query_args = array(
			'email'         => rawurlencode( $args['email'] ),
			'name'          => empty( $args['name'] ) ? '' : rawurlencode( $args['name'] ),
			'last_name'     => empty( $args['last_name'] ) ? '' : rawurlencode( $args['last_name'] ),
			'custom_fields' => $args['custom_fields'],
			'list_id'       => $args['list_id'],
		);

		$query        = $this->transform_data_to_provider_format( $query_args, 'subscriber' );
		$query        = $this->_process_custom_fields( $query );
		$query['key'] = rawurlencode( $this->data['api_key'] );
		$url          = add_query_arg( $query, "{$this->SUBSCRIBE_URL}?SimpleApiSubscribe" );

		$this->prepare_request( $url, 'GET', false, null, false, false );
		$this->make_remote_request();

		$response = $this->data_utils->process_xmlrpc_response( $this->response->DATA, true );
		$response = $this->data_utils->xml_to_array( $response );

		if ( $this->response->ERROR || ! empty( $response['rsp']['err']['@attributes']['msg'] ) ) {
			return $this->get_error_message();
		}

		if ( ! empty( $response['rsp']['success']['@attributes']['msg'] ) ) {
			return $response['rsp']['success']['@attributes']['msg'];
		}

		return 'success';
	}
}
api/email/Aweber.php000064400000013603152336022500010323 0ustar00<?php

/**
 * Wrapper for Aweber's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_Aweber extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $ACCESS_TOKEN_URL = 'https://auth.aweber.com/1.0/oauth/access_token';

	/**
	 * @inheritDoc
	 */
	public $AUTHORIZATION_URL = 'https://auth.aweber.com/1.0/oauth/authorize';

	/**
	 * @inheritDoc
	 */
	public $REQUEST_TOKEN_URL = 'https://auth.aweber.com/1.0/oauth/request_token';

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.aweber.com/1.0';

	/**
	 * @var string
	 */
	public $accounts_url;

	/**
	 * @inheritDoc
	 */
	public $name = 'Aweber';

	/**
	 * @inheritDoc
	 */
	public $name_field_only = true;

	/**
	 * @inheritDoc
	 */
	public $slug = 'aweber';

	/**
	 * @inheritDoc
	 */
	public $oauth_version = '1.0a';

	/**
	 * @inheritDoc
	 */
	public $uses_oauth = true;

	/**
	 * ET_Core_API_Email_Aweber constructor.
	 *
	 * @inheritDoc
	 */
	public function __construct( $owner, $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );
		$this->accounts_url = "{$this->BASE_URL}/accounts";
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$this->prepare_request( $list['custom_fields_collection_link'] );

		return parent::_fetch_custom_fields( $list_id, $list );
	}

	protected function _get_lists_collection_url() {
		$this->prepare_request( $this->accounts_url );
		$this->make_remote_request();
		$url = '';

		if ( ! $this->response->ERROR && ! empty( $this->response->DATA['entries'][0]['lists_collection_link'] ) ) {
			$url = $this->response->DATA['entries'][0]['lists_collection_link'];
		}

		return $url;
	}

	protected static function _parse_ID( $ID ) {
		$values = explode( '|', $ID );

		return ( count( $values ) === 6 ) ? $values : null;
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			$list_id    = $args['list_id'];
			$field_name = self::$_->array_get( $this->data, "lists.{$list_id}.custom_fields.{$field_id}.name" );

			self::$_->array_set( $args, "custom_fields.{$field_name}", $value );
		}

		return $args;
	}

	/**
	 * Uses the app's authorization code to get an access token
	 */
	public function authenticate() {
		if ( empty( $this->data['api_key'] ) ) {
			return false;
		}

		$key_parts = self::_parse_ID( $this->data['api_key'] );

		if ( null === $key_parts ) {
			return false;
		}

		list( $consumer_key, $consumer_secret, $request_token, $request_secret, $verifier ) = $key_parts;

		if ( ! $verifier ) {
			return false;
		}

		$this->data['consumer_key']    = $consumer_key;
		$this->data['consumer_secret'] = $consumer_secret;
		$this->data['access_key']      = $request_token;
		$this->data['access_secret']   = $request_secret;
		$this->oauth_verifier          = $verifier;

		// AWeber returns oauth access key in url query format :face_with_rolling_eyes:
		$this->http->expects_json = false;

		return parent::authenticate();
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'Authorization Code', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_error_message() {
		$error_message = parent::get_error_message();

		return preg_replace('/https.*/m', '', $error_message );
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'         => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => 'total_subscribers',
			),
			'subscriber'   => array(
				'name'          => 'name',
				'email'         => 'email',
				'ad_tracking'   => 'ad_tracking',
				'custom_fields' => 'custom_fields',
			),
			'error'        => array(
				'error_message' => 'error.message',
			),
			'custom_field' => array(
				'field_id' => 'id',
				'name'     => 'name',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		$needs_to_authenticate = ! $this->is_authenticated() || ! $this->_initialize_oauth_helper();

		if ( $needs_to_authenticate && ! $this->authenticate() ) {
			if ( empty( $this->response->DATA ) ) {
				return '';
			}

			$this->response->DATA = json_decode( $this->response->DATA, true );
			return $this->get_error_message();
		}

		$this->http->expects_json = true;
		$this->LISTS_URL          = $this->_get_lists_collection_url();

		if ( empty( $this->LISTS_URL ) ) {
			return '';
		}

		$this->response_data_key = 'entries';

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$lists_url  = $this->_get_lists_collection_url();
		$url        = "{$lists_url}/{$args['list_id']}/subscribers";
		$ip_address = 'true' === self::$_->array_get( $args, 'ip_address', 'true' );

		$params = $this->_process_custom_fields( $args );
		$params = $this->transform_data_to_provider_format( $params, 'subscriber' );
		$params = array_merge( $params, array(
			'ws.op'      => 'create',
			'ip_address' => $ip_address ? et_core_get_ip_address() : '0.0.0.0',
			'misc_notes' => $this->SUBSCRIBED_VIA,
		) );

		// There is a bug in AWeber some characters not encoded properly on AWeber side when sending data in x-www-form-urlencoded format so use json instead
		$this->prepare_request( $url, 'POST', false, $params, true );
		$this->request->HEADERS['Content-Type'] = 'application/json';

		return parent::subscribe( $params, $url );
	}
}
api/email/Providers.php000064400000022552152336022500011076 0ustar00<?php

/**
 * Manages email provider class instances.
 */
class ET_Core_API_Email_Providers {

	private static $_instance;

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	protected static $_any_custom_field_type;
	protected static $_custom_fields_support;
	protected static $_fields;
	protected static $_metadata;
	protected static $_names;
	protected static $_names_by_slug;
	protected static $_name_field_only = array();
	protected static $_slugs;

	public static $providers = array();

	public function __construct() {
		if ( null === self::$_metadata ) {
			$this->_initialize();
		}
	}

	protected function _initialize() {
		self::$_               = ET_Core_Data_Utils::instance();
		self::$_metadata       = et_core_get_components_metadata();
		$third_party_providers = et_core_get_third_party_components( 'api/email' );

		$load_fields = is_admin() || et_core_is_saving_builder_modules_cache() || et_core_is_fb_enabled() || isset( $_GET['et_fb'] ); // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
		$all_names   = array(
			'official'    => self::$_metadata['groups']['api/email']['members'],
			'third-party' => array_keys( $third_party_providers ),
		);

		$_names_by_slug         = array();
		$_custom_fields_support = array( 'dynamic' => array(), 'predefined' => array(), 'none' => array() );
		$_any_custom_field_type = array();

		foreach ( $all_names as $provider_type => $provider_names ) {
			$_names_by_slug[ $provider_type ] = array();

			foreach ( $provider_names as $provider_name ) {
				if ( 'Fields' === $provider_name || self::$_->includes( $provider_name, 'Provider' ) ) {
					continue;
				}

				if ( 'official' === $provider_type ) {
					$class_name    = self::$_metadata[ $provider_name ];
					$provider_slug = self::$_metadata[ $class_name ]['slug'];
					$provider      = $load_fields ? new $class_name( 'ET_Core', '' ) : null;
				} else {
					$provider      = $third_party_providers[ $provider_name ];
					$provider_slug = is_object( $provider ) ? $provider->slug : '';
				}

				if ( ! $provider_slug ) {
					continue;
				}

				$_names_by_slug[ $provider_type ][ $provider_slug ] = $provider_name;

				if ( $load_fields && is_object( $provider ) ) {
					self::$_fields[ $provider_slug ] = $provider->get_account_fields();

					if ( $scope = $provider->custom_fields ) {
						$_custom_fields_support[ $scope ][ $provider_slug ] = $provider_name;

						if ( ! self::$_->array_get( $provider->data_keys, 'custom_field_type' ) ) {
							$_any_custom_field_type[] = $provider_slug;
						}
					} else {
						$_custom_fields_support['none'][ $provider_slug ] = $provider_name;
					}
				}
			}
		}

		/**
		 * Filters the enabled email providers.
		 *
		 * @param array[] {
		 *
		 *     @type string[] $provider_type {
		 *
		 *         @type string $slug Provider name
		 *     }
		 * }
		 */
		self::$_names_by_slug = apply_filters( 'et_core_api_email_enabled_providers', $_names_by_slug );

		foreach ( array_keys( $all_names ) as $provider_type ) {
			self::$_names[ $provider_type ] = array_values( self::$_names_by_slug[ $provider_type ] );
			self::$_slugs[ $provider_type ] = array_keys( self::$_names_by_slug[ $provider_type ] );
		}

		self::$_name_field_only       = self::$_metadata['groups']['api/email']['name_field_only'];
		self::$_custom_fields_support = $_custom_fields_support;
		self::$_any_custom_field_type = $_any_custom_field_type;
	}

	/**
	 * Returns the email provider accounts array from core.
	 *
	 * @return array|mixed
	 */
	public function accounts() {
		return ET_Core_API_Email_Provider::get_accounts();
	}

	/**
	 * @see {@link \ET_Core_API_Email_Provider::account_exists()}
	 */
	public function account_exists( $provider, $account_name ) {
		return ET_Core_API_Email_Provider::account_exists( $provider, $account_name );
	}

	public function account_fields( $provider = 'all' ) {
		if ( 'all' !== $provider ) {
			return isset( self::$_fields[ $provider ] ) ? self::$_fields[ $provider ] : array();
		}

		return self::$_fields;
	}

	public function custom_fields_data() {
		$enabled_providers  = self::slugs();
		$custom_fields_data = array();

		foreach ( $this->accounts() as $provider_slug => $accounts ) {
			if ( ! in_array( $provider_slug, $enabled_providers ) ) {
				continue;
			}

			foreach ( $accounts as $account_name => $account_details ) {
				if ( empty( $account_details['lists'] ) ) {
					continue;
				}

				if ( ! empty( $account_details['custom_fields'] ) ) {
					$custom_fields_data[$provider_slug][$account_name]['custom_fields'] = $account_details['custom_fields'];
					continue;
				}

				foreach ( (array) $account_details['lists'] as $list_id => $list_details ) {
					if ( ! empty( $list_details['custom_fields'] ) ) {
						$custom_fields_data[$provider_slug][$account_name][$list_id] = $list_details['custom_fields'];
					}
				}
			}
		}

		return $custom_fields_data;
	}

	/**
	 * Get class instance for a provider. Instance will be created if necessary.
	 *
	 * @param string $name_or_slug The provider's name or slug.
	 * @param string $account_name The identifier for the desired account with the provider.
	 * @param string $owner        The owner for the instance.
	 *
	 * @return bool|ET_Core_API_Email_Provider The provider instance or `false` if not found.
	 */
	public function get( $name_or_slug, $account_name, $owner = 'ET_Core' ) {
		$name_or_slug = str_replace( ' ', '', $name_or_slug );
		$is_official  = isset( self::$_metadata[ $name_or_slug ] );

		if ( ! $is_official && ! $this->is_third_party( $name_or_slug ) ) {
			return false;
		}

		if ( ! in_array( $name_or_slug, array_merge( self::names(), self::slugs() ) ) ) {
			return false;
		}

		// Make sure we have the component name
		if ( $is_official ) {
			$class_name = self::$_metadata[ $name_or_slug ];
			$name       = self::$_metadata[ $class_name ]['name'];
		} else {
			$components = et_core_get_third_party_components( 'api/email' );

			if ( ! $name = array_search( $name_or_slug, self::$_names_by_slug['third-party'] ) ) {
				$name = $name_or_slug;
			}
		}

		if ( ! isset( self::$providers[ $name ][ $owner ] ) ) {
			self::$providers[ $name ][ $owner ] = $is_official
				? new $class_name( $owner, $account_name )
				: $components[ $name ];
		}

		return self::$providers[ $name ][ $owner ];
	}

	public static function instance() {
		if ( null === self::$_instance ) {
			self::$_instance = new self;
		}

		return self::$_instance;
	}

	public function is_third_party( $name_or_slug ) {
		$is_third_party = in_array( $name_or_slug, self::$_names['third-party'] );

		return $is_third_party ? $is_third_party : in_array( $name_or_slug, self::$_slugs['third-party'] );
	}

	/**
	 * Returns the names of available providers. List can optionally be filtered.
	 *
	 * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'.
	 *
	 * @return array
	 */
	public function names( $type = 'all' ) {
		if ( 'all' === $type ) {
			$names = array_merge( self::$_names['third-party'], self::$_names['official'] );
		} else {
			$names = self::$_names[ $type ];
		}

		return $names;
	}

	/**
	 * Returns an array mapping the slugs of available providers to their names. List can optionally be filtered.
	 *
	 * @param string $type   The component type to include ('official'|'third-party'|'all'). Default is 'all'.
	 * @param string $filter Optionally filter the list by a condition.
	 *                       Accepts 'name_field_only', 'predefined_custom_fields', 'dynamic_custom_fields',
	 *                       'no_custom_fields', 'any_custom_field_type', 'custom_fields'.
	 *
	 * @return array
	 */
	public function names_by_slug( $type = 'all', $filter = '' ) {
		if ( 'all' === $type ) {
			$names_by_slug = array_merge( self::$_names_by_slug['third-party'], self::$_names_by_slug['official'] );
		} else {
			$names_by_slug = self::$_names_by_slug[ $type ];
		}

		if ( 'name_field_only' === $filter ) {
			$names_by_slug = self::$_name_field_only;
		} else if ( 'predefined_custom_fields' === $filter ) {
			$names_by_slug = self::$_custom_fields_support['predefined'];
		} else if ( 'dynamic_custom_fields' === $filter ) {
			$names_by_slug = self::$_custom_fields_support['dynamic'];
		} else if ( 'no_custom_fields' === $filter ) {
			$names_by_slug = self::$_custom_fields_support['none'];
		} else if ( 'any_custom_field_type' === $filter ) {
			$names_by_slug = self::$_any_custom_field_type;
		} else if ( 'custom_fields' === $filter ) {
			$names_by_slug = array_merge( self::$_custom_fields_support['predefined'], self::$_custom_fields_support['dynamic'] );
		}

		return $names_by_slug;
	}

	/**
	 * @see {@link \ET_Core_API_Email_Provider::remove_account()}
	 */
	public function remove_account( $provider, $account_name ) {
		ET_Core_API_Email_Provider::remove_account( $provider, $account_name );
	}

	/**
	 * Returns the slugs of available providers. List can optionally be filtered.
	 *
	 * @param string $type The component type to include ('official'|'third-party'|'all'). Default is 'all'.
	 *
	 * @return array
	 */
	public function slugs( $type = 'all' ) {
		if ( 'all' === $type ) {
			$names = array_merge( self::$_slugs['third-party'], self::$_slugs['official'] );
		} else {
			$names = self::$_slugs[ $type ];
		}

		return $names;
	}

	/**
	 * @see {@link \ET_Core_API_Email_Provider::update_account()}
	 */
	public function update_account( $provider, $account, $data ) {
		ET_Core_API_Email_Provider::update_account( $provider, $account, $data );
	}
}
api/email/Emma.php000064400000007333152336022500010000 0ustar00<?php

/**
 * Wrapper for Emma's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_Emma extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.e2ma.net';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $http_auth = array(
		'username' => 'api_key',
		'password' => 'private_api_key',
	);

	/**
	 * @inheritDoc
	 */
	public $name = 'Emma';

	/**
	 * @inheritDoc
	 */
	public $slug = 'emma';

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$this->response_data_key = false;

		$this->prepare_request( $this->_get_custom_fields_url() );

		return parent::_fetch_custom_fields( $list_id, $list );
	}

	protected function _get_custom_fields_url() {
		return "https://api.e2ma.net/{$this->data['user_id']}/fields?group_types=all";
	}

	protected function _get_lists_url() {
		return "https://api.e2ma.net/{$this->data['user_id']}/groups?group_types=all";
	}

	protected function _get_subscribe_url() {
		return "https://api.e2ma.net/{$this->data['user_id']}/members/signup";
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );
			}

			self::$_->array_set( $args, "fields.{$field_id}", $value );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key'         => array(
				'label' => esc_html__( 'Public API Key', 'et_core' ),
			),
			'private_api_key' => array(
				'label' => esc_html__( 'Private API Key', 'et_core' ),
			),
			'user_id'         => array(
				'label' => esc_html__( 'Account ID', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'              => array(
				'name'              => 'group_name',
				'list_id'           => 'member_group_id',
				'subscribers_count' => 'active_count',
			),
			'subscriber'        => array(
				'email'         => 'email',
				'name'          => 'fields.first_name',
				'last_name'     => 'fields.last_name',
				'list_id'       => '@group_ids',
				'custom_fields' => 'custom_fields',
			),
			'custom_field'      => array(
				'field_id' => 'shortcut_name',
				'name'     => 'display_name',
				'options'  => 'options',
				'type'     => 'widget_type',
			),
			'custom_field_type' => array(
				// Us <=> Them
				'radio'          => 'radio',
				// Us => Them
				'select'         => 'select one',
				'text'           => 'long',
				'checkbox'       => 'check_multiple',
				// Them => Us
				'text'           => 'input',
				'long'           => 'text',
				'check_multiple' => 'checkbox',
				'select one'     => 'select',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->LISTS_URL         = $this->_get_lists_url();
		$this->response_data_key = false;

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$url                     = $this->_get_subscribe_url();
		$this->response_data_key = 'member_id';

		$args = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$args = $this->_process_custom_fields( $args );

		$this->prepare_request( $url, 'POST', false, $args, true );

		return parent::subscribe( $args, $url );
	}
}
api/email/_ProviderName.php000064400000002712152336022500011647 0ustar00<?php

/**
 * Wrapper for ProviderName's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_ProviderName extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = '';

	/**
	 * @inheritDoc
	 */
	public $name = 'ProviderName';

	/**
	 * Whether or not only a single name field is supported instead of first/last name fields.
	 *
	 * @var string
	 */
	public static $name_field_only = false;

	/**
	 * @inheritDoc
	 */
	public $slug = 'providername';

	/**
	 * @inheritDoc
	 * @internal If true, oauth endpoints properties must also be defined.
	 */
	public $uses_oauth = false;

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		// Implement get_account_fields() method.
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array(), $custom_fields_key = '' ) {
		// Implement get_data_keys() method.
		$keymap = array(
			'list'       => array(
				'list_id'           => '',
				'name'              => '',
				'subscribers_count' => '',
			),
			'subscriber' => array(
				'name'       => '',
				'email'      => '',
				'list_id'    => '',
				'ip_address' => '',
			),
		);

		return parent::get_data_keymap( $keymap, $custom_fields_key );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		// Implement get_subscriber_lists() method.
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		// Implement subscribe() method.
	}
}
api/email/Infusionsoft.php000064400000027340152336022500011607 0ustar00<?php

/**
 * Wrapper for Infusionsoft's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_Infusionsoft extends ET_Core_API_Email_Provider {

	private static $_data_keys = array(
		'app_name' => 'client_id',
		'api_key'  => 'api_key',
	);

	/**
	 * @inheritDoc
	 */
	public $ACCESS_TOKEN_URL = 'https://api.infusionsoft.com/token';

	/**
	 * @inheritDoc
	 */
	public $AUTHORIZATION_URL = 'https://signin.infusionsoft.com/app/oauth/authorize';

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = '';

	/**
	 * @inheritDoc
	 * Use this variable to hold the pattern and update $BASE_URL dynamically when needed
	 */
	public $BASE_URL_PATTERN = 'https://@app_name@.infusionsoft.com/api/xmlrpc';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'Infusionsoft';

	/**
	 * @inheritDoc
	 */
	public $oauth_version = '2.0';

	/**
	 * @inheritDoc
	 */
	public $slug = 'infusionsoft';

	/**
	 * @inheritDoc
	 * @internal If true, oauth endpoints properties must also be defined.
	 */
	public $uses_oauth = false;

	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->http->expects_json = false;
	}

	protected function _add_contact_to_list( $contact_id, $list_id ) {
		$params = array( $this->data[ self::$_data_keys['api_key'] ], (int) $contact_id, (int) $list_id );
		$data = self::$_->prepare_xmlrpc_method_call( 'ContactService.addToGroup', $params );

		$this->_do_request( $data );

		if ( $this->response->ERROR ) {
			return false;
		}

		return self::$_->process_xmlrpc_response( $this->response->DATA );
	}

	protected function _create_contact( $contact_details ) {
		$params = array( $this->data[ self::$_data_keys['api_key'] ], $contact_details );
		$data   = self::$_->prepare_xmlrpc_method_call( 'ContactService.add', $params );

		$this->_do_request( $data );

		if ( $this->response->ERROR ) {
			return false;
		}

		$result = self::$_->process_xmlrpc_response( $this->response->DATA );

		return $result;
	}

	protected function _do_request( $data ) {
		$this->prepare_request( $this->_get_base_url(), 'POST', false, $data );
		$this->request->HEADERS = array( 'Content-Type' => 'application/xml', 'Accept-Charset' => 'UTF-8' );
		$this->make_remote_request();
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$params = array( $this->data[ self::$_data_keys['api_key'] ], 'DataFormField', 100, 0, array( 'FormId' => -1 ), array( 'Name', 'Label', 'DataType', 'Values' ) );
		$data   = self::$_->prepare_xmlrpc_method_call( 'DataService.query', $params );

		$this->_do_request( $data );

		if ( $this->response->ERROR ) {
			return array();
		}

		$data = self::$_->process_xmlrpc_response( $this->response->DATA );

		foreach ( $data as &$custom_field ) {
			$custom_field = (array) $custom_field;
			$custom_field = $this->transform_data_to_our_format( $custom_field, 'custom_field' );
		}

		$fields = array();

		foreach ( $data as $field ) {
			$field_id = $field['field_id'];
			$type     = self::$_->array_get( $field, 'type', 'any' );

			$field['type'] = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'any' );

			if ( isset( $field['options'] ) ) {
				$field['options'] = explode( "\n", $field['options'] );
				$field['options'] = array_filter( $field['options'] );
			}

			$fields[ $field_id ] = $field;
		}

		return $fields;
	}

	protected function _get_base_url() {
		$this->BASE_URL = str_replace( '@app_name@', $this->data[ self::$_data_keys['app_name'] ], $this->BASE_URL_PATTERN );
		return $this->BASE_URL;
	}

	protected function _get_contact_by_email( $email ) {
		$params = array( $this->data[ self::$_data_keys['api_key'] ], 'Contact', 1, 0, array( 'Email' => $email ), array( 'Id', 'Groups' ) );
		$data   = self::$_->prepare_xmlrpc_method_call( 'DataService.query', $params );

		$this->_do_request( $data );

		if ( $this->response->ERROR ) {
			return false;
		}

		return self::$_->process_xmlrpc_response( $this->response->DATA );
	}

	protected function _optin_email_address( $email ) {
		$params = array( $this->data[ self::$_data_keys['api_key'] ], $email, $this->SUBSCRIBED_VIA );
		$data   = self::$_->prepare_xmlrpc_method_call('APIEmailService.optIn', $params );

		$this->_do_request( $data );

		if ( $this->response->ERROR ) {
			return false;
		}

		return self::$_->process_xmlrpc_response( $this->response->DATA );
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return array();
		}

		$fields = array();

		foreach ( $args['custom_fields'] as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );
				$value = implode( ',', $value );
			}

			$fields[ "_{$field_id}" ] = $value;
		}

		return $fields;
	}

	public function retrieve_subscribers_count() {
		$existing_lists = $this->data['lists'];

		if ( empty( $existing_lists ) ) {
			return;
		}

		foreach( $existing_lists as $list_id => $list_data ) {
			$params = array( $this->data[ self::$_data_keys['api_key'] ], 'Contact', array( 'Groups' => "%{$list_id}%" ) );
			$data   = self::$_->prepare_xmlrpc_method_call( 'DataService.count', $params );

			$this->_do_request( $data );

			if ( $this->response->ERROR ) {
				continue;
			}

			$subscribers_count = self::$_->process_xmlrpc_response( $this->response->DATA );

			if ( empty( $subscribers_count ) || self::$_->is_xmlrpc_error( $subscribers_count ) ) {
				$subscribers_count = 0;
			}

			$existing_lists[ $list_id ]['subscribers_count'] = $subscribers_count;

			$this->data['lists'] = $existing_lists;

			$this->save_data();
		}
	}

	/**
	 * @inheritDoc
	 */
	protected function _process_subscriber_lists( $lists ) {
		$result = array();

		if ( empty( $lists ) || ! is_array( $lists ) ) {
			return $result;
		}

		foreach( $lists as $list ) {
			$list_id   = (string) $list->Id;
			$list_name = (string) $list->GroupName;

			$result[ $list_id ]['list_id']           = $list_id;
			$result[ $list_id ]['name']              = $list_name;
			$result[ $list_id ]['subscribers_count'] = 0;
		}

		return $result;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			self::$_data_keys['api_key']  => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
			self::$_data_keys['app_name'] => array(
				'label' => esc_html__( 'App Name', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'subscriber'        => array(
				'name'          => 'FirstName',
				'last_name'     => 'LastName',
				'email'         => 'Email',
				'custom_fields' => 'custom_fields',
			),
			'custom_field'      => array(
				'field_id' => 'Name',
				'name'     => 'Label',
				'type'     => 'DataType',
				'options'  => 'Values',
			),
			'custom_field_type' => array(
				// Us => Them
				'input'    => 15,
				'textarea' => 16,
				'checkbox' => 17,
				'radio'    => 20,
				'select'   => 21,
				// Them => Us
				15         => 'input',
				16         => 'textarea',
				17         => 'checkbox',
				20         => 'radio',
				21         => 'select',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data[ self::$_data_keys['api_key'] ] ) || empty( $this->data[ self::$_data_keys['app_name'] ] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->response_data_key = false;

		$params_count = array( $this->data[ self::$_data_keys['api_key'] ], 'ContactGroup', array( 'Id' => '%' ) );
		$data_count   = self::$_->prepare_xmlrpc_method_call( 'DataService.count', $params_count );

		$this->_do_request( $data_count );

		if ( $this->response->ERROR ) {
			return $this->response->ERROR_MESSAGE;
		}

		$records_count = (int) self::$_->process_xmlrpc_response( $this->http->response->DATA );

		if ( 0 === $records_count ) {
			return 'success';
		}

		// determine how many requests we need to retrieve all lists
		$number_of_additional_requests = floor( $records_count / 1000 );

		$list_data = array();

		for ( $i = 0; $i <= $number_of_additional_requests; $i++ ) {
			$params = array( $this->data[ self::$_data_keys['api_key'] ], 'ContactGroup', 1000, $i, array( 'Id' => '%' ), array( 'Id', 'GroupName' ) );
			$data   = self::$_->prepare_xmlrpc_method_call( 'DataService.query', $params );

			$this->_do_request( $data );

			if ( $this->http->response->ERROR ) {
				return $this->http->response->ERROR_MESSAGE;
			}

			$response = self::$_->process_xmlrpc_response( $this->http->response->DATA );

			if ( self::$_->is_xmlrpc_error( $response ) ) {
				return $response->faultString;
			}

			$list_data = array_merge( $list_data, $response );
		}

		$lists = $this->_process_subscriber_lists( $list_data );

		if ( false === $lists ) {
			return $this->response->ERROR_MESSAGE;
		} else if ( self::$_->is_xmlrpc_error( $lists ) ) {
			return $lists->faultString;
		}

		$result = 'success';

		$this->data['lists']         = $lists;
		$this->data['custom_fields'] = $this->_fetch_custom_fields();
		$this->data['is_authorized'] = true;

		// retrieve counts right away if it can be done in reasonable time ( in 20 seconds )
		if ( 20 >= count( $lists ) ) {
			$this->retrieve_subscribers_count();
		} else {
			// estimate the time for all lists update assuming that one list can be updated in 1 second
			$estimated_time = ceil( count( $lists ) / 60 );
			$result         = array(
				'need_counts_update' => true,
				'message'            => sprintf(
					esc_html__( 'Successfully authorized. Subscribers count will be updated in background, please check back in %1$s %2$s', 'et_core' ),
					$estimated_time,
					1 === (int) $estimated_time ? esc_html__( 'minute', 'et_core' ) : esc_html__( 'minutes', 'et_core' )
				),
			);
		}

		$this->save_data();

		return $result;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		if ( empty( $this->data[ self::$_data_keys['api_key'] ] ) || empty( $this->data[ self::$_data_keys['app_name'] ] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$message       = '';
		$search_result = $this->_get_contact_by_email( $args['email'] );

		if ( false === $search_result ) {
			return $this->response->ERROR_MESSAGE;
		} else if ( self::$_->is_xmlrpc_error( $search_result ) ) {
			return $search_result->faultString;
		}

		if ( ! empty( $search_result ) ) {
			$message = esc_html__( 'Already subscribed', 'bloom' );

			if ( false === strpos( $search_result[0]->Groups, $args['list_id'] ) ) {
				$result = $this->_add_contact_to_list( $search_result[0]->Id, $args['list_id'] );
				$message = 'success';

				if ( false === $result ) {
					return $this->response->ERROR_MESSAGE;
				} else if ( self::$_->is_xmlrpc_error( $result ) ) {
					return $result->faultString;
				}
			}
		} else {
			$custom_fields   = $this->_process_custom_fields( $args );
			$contact_details = array(
				'FirstName' => $args['name'],
				'LastName'  => $args['last_name'],
				'Email'     => $args['email'],
			);

			$new_contact_id = $this->_create_contact( array_merge( $contact_details, $custom_fields ) );

			if ( false === $new_contact_id ) {
				return $this->response->ERROR_MESSAGE;
			} else if ( self::$_->is_xmlrpc_error( $new_contact_id ) ) {
				return $new_contact_id->faultString;
			}

			$result = $this->_add_contact_to_list( $new_contact_id, $args['list_id'] );

			if ( false === $result ) {
				return $this->response->ERROR_MESSAGE;
			} else if ( self::$_->is_xmlrpc_error( $result ) ) {
				return $search_result->faultString;
			}

			if ( $this->_optin_email_address( $args['email'] ) ) {
				$message = 'success';
			}
		}

		return ( '' !== $message ) ? $message : $this->FAILURE_MESSAGE;
	}
}
api/email/FluentCRM.php000064400000023075152336022500010721 0ustar00<?php
/**
 * ET_Core_API_Email_FluentCRM class file.
 *
 * @class   ET_Core_API_Email_FluentCRM
 * @package ET\Core\API\Email
 */

// phpcs:disable Squiz.Commenting.VariableComment.MissingVar -- All the class level variables here inherit parent inline documentation. Please check ET_Core_API_Email_Provider or ET_Core_API_Service class.
// phpcs:disable Squiz.Commenting.FunctionComment.MissingParamTag -- Almost all the methods here inherit parent inline documentation. Please check ET_Core_API_Email_Provider or ET_Core_API_Service class.

/**
 * Wrapper for FluentCRM's API.
 *
 * @since 4.9.1
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_FluentCRM extends ET_Core_API_Email_Provider {

	/**
	 * Warning message text if the required plugin doesn't exist.
	 *
	 * @var boolean
	 */
	public static $PLUGIN_REQUIRED; // phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Widely used on all email provider classes.

	/**
	 * {@inheritdoc}
	 */
	public $name = 'FluentCRM';

	/**
	 * {@inheritdoc}
	 */
	public $slug = 'fluentcrm';

	/**
	 * {@inheritdoc}
	 */
	public $custom_fields = 'predefined';

	/**
	 * {@inheritdoc}
	 */
	public $custom_fields_scope = 'account';

	/**
	 * ET_Core_API_Email_FluentCRM constructor.
	 */
	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		if ( null === self::$PLUGIN_REQUIRED ) { // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
			self::$PLUGIN_REQUIRED = esc_html__( 'FluentCRM plugin is either not installed or not activated.', 'et_core' ); // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
		}
	}

	/**
	 * {@inheritdoc}
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'                => array(
				'list_id' => 'id',
				'name'    => 'title',
			),
			'subscriber'          => array(
				'email'         => 'email',
				'last_name'     => 'last_name',
				'name'          => 'first_name',
				'custom_fields' => 'custom_fields',
			),
			'custom_field'        => array(
				'field_id' => 'slug',
				'name'     => 'label',
				'type'     => 'type',
				'hidden'   => 'hidden',
				'options'  => 'options',
			),
			'custom_field_option' => array(
				'id'   => 'value',
				'name' => 'value',
			),
			'custom_field_type'   => array(
				// Us <=> Them.
				'radio'        => 'radio',
				'checkbox'     => 'checkbox',
				// Us => Them.
				'input'        => 'text',
				'select'       => 'select-one',
				// Them => Us.
				'text'         => 'input',
				'number'       => 'input',
				'date'         => 'input',
				'date_time'    => 'input',
				'select-one'   => 'select',
				'select-multi' => 'checkbox',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * {@inheritdoc}
	 *
	 * FluentCRM is self hosted and all the fields can be managed on the plugin itself.
	 */
	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {

		static $processed = null;

		if ( is_null( $processed ) ) {
			// A. Default custom fields.
			$processed = array(
				'address_line_1' => array(
					'field_id' => 'address_line_1',
					'name'     => __( 'Address Line 1', 'et_builder' ),
					'type'     => 'input',
					'hidden'   => false,
				),
				'address_line_2' => array(
					'field_id' => 'address_line_2',
					'name'     => __( 'Address Line 2', 'et_builder' ),
					'type'     => 'input',
					'hidden'   => false,
				),
				'postal_code'    => array(
					'field_id' => 'postal_code',
					'name'     => __( 'Postal Code', 'et_builder' ),
					'type'     => 'input',
					'hidden'   => false,
				),
				'city'           => array(
					'field_id' => 'city',
					'name'     => __( 'City', 'et_builder' ),
					'type'     => 'input',
					'hidden'   => false,
				),
				'state'          => array(
					'field_id' => 'state',
					'name'     => __( 'State', 'et_builder' ),
					'type'     => 'input',
					'hidden'   => false,
				),
				'country'        => array(
					'field_id' => 'country',
					'name'     => __( 'Country', 'et_builder' ),
					'type'     => 'input',
					'hidden'   => false,
				),
				'phone'          => array(
					'field_id' => 'phone',
					'name'     => __( 'Phone', 'et_builder' ),
					'type'     => 'input',
					'hidden'   => false,
				),
				'status'         => array(
					'field_id'      => 'status',
					'name'          => __( 'Enable Double Optin', 'et_builder' ),
					'type'          => 'input',
					'required_mark' => 'off',
					'default'       => 'pending',
					'hidden'        => true,
				),
			);

			// B. Contact custom fields.
			$contact_custom_fields = fluentcrm_get_option( 'contact_custom_fields', array() );

			if ( ! empty( $contact_custom_fields ) ) {
				foreach ( $contact_custom_fields as $field ) {
					// 1. Transform field data to fit our format.
					$field    = $this->transform_data_to_our_format( $field, 'custom_field' );
					$field_id = $field['field_id'];
					$type     = $field['type'];

					// 2. Transform field type to fit our supported field type.
					$field['type'] = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'any' );

					if ( 'select-multi' === $type ) {
						$field['type_origin'] = $type;
					}

					// 3. Transform `options` data to fit our format (`id` => `name`).
					if ( ! empty( $field['options'] ) ) {
						$options = array();

						foreach ( $field['options'] as $option ) {
							$option = array( 'value' => $option );
							$option = $this->transform_data_to_our_format( $option, 'custom_field_option' );

							$options[ $option['id'] ] = $option['name'];
						}

						$field['options'] = $options;
					}

					$processed[ $field_id ] = $field;
				}
			}
		}

		return $processed;
	}

	/**
	 * {@inheritdoc}
	 *
	 * FluentCRM is self hosted and all the fields can be managed on the plugin itself.
	 */
	public function get_account_fields() {
		return array();
	}

	/**
	 * {@inheritdoc}
	 *
	 * FluentCRM is self hosted and all the lists can be managed on the plugin itself.
	 */
	public function fetch_subscriber_lists() {
		if ( ! defined( 'FLUENTCRM' ) ) {
			return self::$PLUGIN_REQUIRED; // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
		}

		$list_tags = array();

		// Lists.
		$lists = FluentCrmApi( 'lists' )->all();

		foreach ( $lists as $list ) {
			$list_tags[ 'list_' . $list->id ] = array(
				'list_id'           => 'list_' . $list->id,
				'name'              => 'List: ' . $list->title,
				'subscribers_count' => 0,
			);
		}

		// Tags.
		$tags = FluentCrmApi( 'tags' )->all();

		foreach ( $tags as $tag ) {
			$list_tags[ 'tags_' . $tag->id ] = array(
				'list_id'           => 'tags_' . $tag->id,
				'name'              => 'Tag: ' . $tag->title,
				'subscribers_count' => 0,
			);
		}

		// Combine both of lists and tags because there is no other way to display both
		// with different fields.
		$this->data['lists']         = $list_tags;
		$this->data['custom_fields'] = $this->_fetch_custom_fields( '', array() );
		$this->data['is_authorized'] = true;

		$this->save_data();

		return 'success';
	}

	/**
	 * {@inheritdoc}
	 */
	protected function _process_custom_fields( $args ) {
		if ( ! empty( $args['custom_fields'] ) ) {
			$custom_fields = $args['custom_fields'];

			foreach ( $custom_fields as $field_id => $field_value ) {
				if ( $field_value ) {
					$field_type        = self::$_->array_get( $this->data['custom_fields'][ $field_id ], 'type' );
					$field_type_origin = self::$_->array_get( $this->data['custom_fields'][ $field_id ], 'type_origin' );

					// Transform `checkbox` value into string separated by comma i.e. 'val1,val2'.
					// However, if the field type origin is `select-multi`, we have to use array
					// values instead.
					if ( 'checkbox' === $field_type ) {
						$field_value = 'select-multi' === $field_type_origin ? array_values( $field_value ) : implode( ',', $field_value );
					}

					$args[ $field_id ] = $field_value;
				}
			}

			if ( isset( $custom_fields['status'] ) ) {
				$args['status'] = 'pending';
			}

			unset( $args['custom_fields'] );
		}

		return $args;
	}

	/**
	 * {@inheritdoc}
	 */
	public function subscribe( $args, $url = '' ) {
		if ( ! defined( 'FLUENTCRM' ) ) {
			ET_Core_Logger::error( self::$PLUGIN_REQUIRED ); // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
			return esc_html__( 'An error occurred. Please try again later.', 'et_core' );
		}

		$contact = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$contact = $this->_process_custom_fields( $contact );

		// IP Address.
		$ip_address            = 'true' === self::$_->array_get( $args, 'ip_address', 'true' ) ? et_core_get_ip_address() : '';
		$contact['ip_address'] = $ip_address;

		// Name.
		if ( empty( $contact['last_name'] ) ) {
			$contact['full_name'] = $contact['first_name'];
			unset( $contact['first_name'] );
			unset( $contact['last_name'] );
		}

		// List or Tag.
		$list_or_tag_id = $args['list_id'];

		if ( false === strpos( $list_or_tag_id, 'tags_' ) ) {
			$contact['lists'] = array( intval( str_replace( 'list_', '', $list_or_tag_id ) ) );
		} else {
			$contact['tags'] = array( intval( str_replace( 'tags_', '', $list_or_tag_id ) ) );
		}

		$contact = array_filter( $contact );

		// Email.
		if ( empty( $contact['email'] ) || ! is_email( $contact['email'] ) ) {
			return esc_html__( 'Email Validation has been failed.', 'et_core' );
		}

		FluentCrmApi( 'contacts' )->createOrUpdate( $contact );

		return 'success';
	}
}
api/email/SalesForce.php000064400000027051152336022500011146 0ustar00<?php

/**
 * Wrapper for SalesForce's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_SalesForce extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $ACCESS_TOKEN_URL = 'https://login.salesforce.com/services/oauth2/token';

	/**
	 * @inheritDoc
	 */
	public $AUTHORIZATION_URL = 'https://login.salesforce.com/services/oauth2/authorize';

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = '';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'SalesForce';

	/**
	 * @inheritDoc
	 */
	public $slug = 'salesforce';

	/**
	 * @inheritDoc
	 */
	public $oauth_version = '2.0';

	/**
	 * @inheritDoc
	 */
	public $uses_oauth = true;

	/**
	 * ET_Core_API_SalesForce constructor.
	 *
	 * @inheritDoc
	 */
	public function __construct( $owner, $account_name = '' ) {
		parent::__construct( $owner, $account_name );

		if ( 'builder' === $owner ) {
			$this->REDIRECT_URL = add_query_arg( 'et-core-api-email-auth', 1, home_url( '', 'https' ) ); // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change prop name.
		} else {
			$this->REDIRECT_URL = admin_url( 'admin.php?page=et_bloom_options', 'https' ); // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change prop name.
		}

		$this->_set_base_url();
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		static $fields = null;

		$this->response_data_key = 'fields';

		$this->prepare_request( "{$this->BASE_URL}/services/data/v39.0/sobjects/Lead/describe" );

		if ( is_null( $fields ) ) {
			$fields = parent::_fetch_custom_fields( $list_id, $list );

			foreach ( $fields as $index => $field ) {
				if ( ! isset( $field['custom'] ) || ! $field['custom'] ) {
					unset( $fields[ $index ] );
				}
			}
		}

		return $fields;
	}

	/**
	 * @return string
	 */
	protected function _fetch_subscriber_lists() {
		$query = urlencode( 'SELECT Id, Name, NumberOfLeads from Campaign LIMIT 100' );
		$url   = "{$this->BASE_URL}/services/data/v39.0/query?q={$query}";

		$this->response_data_key = 'records';

		$this->prepare_request( $url );

		return parent::fetch_subscriber_lists();
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( 'checkbox' === $this->data['custom_fields'][ $field_id ]['type'] ) {
					$value = implode( ';', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, "custom_fields.{$field_id}", $value );
		}

		return $args;
	}

	public function _set_base_url() {
		// If we already have the `instance_url`, use it as the base API url.
		if ( isset( $this->data['instance_url'] ) && ! empty( $this->data['instance_url'] ) ) {
			$this->BASE_URL = untrailingslashit( $this->data['instance_url'] ); // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change prop name.
		} else {
			$this->BASE_URL = empty( $this->data['login_url'] ) ? '' : untrailingslashit( $this->data['login_url'] ); // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change prop name.
		}
	}

	public function authenticate() {
		$this->data['consumer_secret'] = $this->data['client_secret'];
		$this->data['consumer_key']    = $this->data['api_key'];

		return parent::authenticate();
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			// SalesForce supports OAuth for SSL websites so generate different fields in this case
			'login_url'       => array(
				'label'    => esc_html__( 'Instance URL', 'et_core' ),
				'required' => 'https',
				'show_if'  => array( 'function.protocol' => 'https' ),
			),
			'api_key'         => array(
				'label'    => esc_html__( 'Consumer Key', 'et_core' ),
				'required' => 'https',
				'show_if'  => array( 'function.protocol' => 'https' ),
			),
			'client_secret'   => array(
				'label'    => esc_html__( 'Consumer Secret', 'et_core' ),
				'required' => 'https',
				'show_if'  => array( 'function.protocol' => 'https' ),
			),
			// This has to be the last field because is the only one shown in both cases and
			// CANCEL / SUBMIT buttons will be attached to it.
			'organization_id' => array(
				'label'        => esc_html__( 'Organization ID', 'et_core' ),
				'required' => 'http',
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		$this->_set_base_url();
		// SalesForce supports 2 types of authentication: Simple and OAuth2
		if ( isset( $this->data['api_key'], $this->data['client_secret'] ) && ! empty( $this->data['api_key'] ) && ! empty( $this->data['client_secret'] ) ) {

			// Fetch lists if user already authenticated.
			if ( $this->is_authenticated() ) {
				return $this->_fetch_subscriber_lists();
			}

			$authenticated = $this->authenticate();
			// If the authenticating process returns an array with redirect url to complete OAuth authorization.
			if ( is_array( $authenticated ) ) {
				return $authenticated;
			}

			if ( true === $authenticated ) {
				// Need to reinitialize the OAuthHelper with the new data, to set the authorization header in the next request.
				$urls               = array(
					'access_token_url'  => $this->ACCESS_TOKEN_URL, // @phpcs:ignore -- No need to change the class property
					'request_token_url' => $this->REQUEST_TOKEN_URL, // @phpcs:ignore -- No need to change the class property
					'authorization_url' => $this->AUTHORIZATION_URL, // @phpcs:ignore -- No need to change the class property
					'redirect_url'      => $this->REDIRECT_URL, // @phpcs:ignore -- No need to change the class property
				);
				$this->OAuth_Helper = new ET_Core_API_OAuthHelper( $this->data, $urls, $this->owner ); // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- No need to change the prop name.
				return $this->_fetch_subscriber_lists();
			}

			return false;
		} elseif ( isset( $this->data['organization_id'] ) && '' !== $this->data['organization_id'] ) {
			// Simple
			$this->data['is_authorized'] = 'true';
			$this->data['lists']         = array( array( 'list_id' => 0, 'name' => 'WebToLead', 'subscribers_count' => 0 ) );

			$this->save_data();

			// return 'success' immediately in case of simple authentication. Lists cannot be retrieved with this type.
			return 'success';
		} else {
			return esc_html__( 'Organization ID cannot be empty', 'et_core' );
		}
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'              => array(
				'list_id'           => 'Id',
				'name'              => 'Name',
				'subscribers_count' => 'NumberOfLeads',
			),
			'subscriber'        => array(
				'name'          => 'FirstName',
				'last_name'     => 'LastName',
				'email'         => 'Email',
				'custom_fields' => 'custom_fields',
			),
			'custom_field'      => array(
				'field_id' => 'name',
				'name'     => 'label',
				'type'     => 'type',
				'options'  => 'valueSet',
			),
			'custom_field_type' => array(
				// Us => Them
				'input'               => 'Text',
				'textarea'            => 'TextArea',
				'checkbox'            => 'MultiselectPicklist',
				'select'              => 'Picklist',
				// Them => Us
				'Text'                => 'input',
				'TextArea'            => 'textarea',
				'MultiselectPicklist' => 'checkbox',
				'Picklist'            => 'select',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	public function get_subscriber( $email ) {
		$query = urlencode( "SELECT Id from Lead where Email='{$email}' LIMIT 100" );
		$url   = "{$this->BASE_URL}/services/data/v39.0/query?q={$query}";

		$this->response_data_key = 'records';

		$this->prepare_request( $url );
		$this->make_remote_request();

		$response = $this->response;

		if ( $response->ERROR || empty( $response->DATA['records'] ) ) {
			return false;
		}

		return isset( $response->DATA['records'][0]['Id'] ) ? $response->DATA['records'][0]['Id'] : false;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		if ( empty( $this->data['access_secret'] ) ) {
			// Try to use simple web form
			return $this->subscribe_salesforce_web( $args );
		}

		$error_message = esc_html__( 'An error occurred. Please try again.', 'et_core' );
		$subscriber_id = $this->get_subscriber( $args['email'] );

		if ( ! $subscriber_id ) {
			$url                = "{$this->BASE_URL}/services/data/v39.0/sobjects/Lead";
			$content            = $this->transform_data_to_provider_format( $args, 'subscriber' );
			$content            = $this->_process_custom_fields( $content );
			$content['Company'] = 'Bloom';
			if ( isset( $content['custom_fields'] ) && is_array( $content['custom_fields'] ) ) {
				$content = array_merge( $content, $content['custom_fields'] );
				unset( $content['custom_fields'] );
			}

			// The LastName is required by Salesforce, whereas it is possible for Optin Form to not have the last name field.
			if ( ! isset( $content['LastName'] ) || empty( $content['LastName'] ) ) {
				$content['LastName'] = '[not provided]';
			}

			$this->prepare_request( $url, 'POST', false, json_encode( $content ), true );

			$this->response_data_key = false;

			$result = parent::subscribe( $content, $url );

			if ( 'success' !== $result || empty( $this->response->DATA['id'] ) ) {
				return $error_message;
			}

			$subscriber_id = $this->response->DATA['id'];
		}

		$url     = "{$this->BASE_URL}/services/data/v39.0/sobjects/CampaignMember";
		$content = array(
			'LeadId'     => $subscriber_id,
			'CampaignId' => $args['list_id'],
		);

		$this->prepare_request( $url, 'POST', false, json_encode( $content ), true );

		$result = parent::subscribe( $content, $url );

		if ( 'success' !== $result && ! empty( $this->response->DATA['errors'] ) ) {
			return $this->response->DATA['errors'][0];
		} else if ( 'success' !== $result ) {
			return $error_message;
		}

		return 'success';
	}

	/**
	 * Post web-to-lead request to SalesForce
	 *
	 * @return string
	 */
	public function subscribe_salesforce_web( $args ) {
		if ( ! isset( $this->data['organization_id'] ) || '' === $this->data['organization_id'] ) {
			return esc_html__( 'Unknown Organization ID', 'et_core' );
		}

		// Define SalesForce web-to-lead endpoint
		$url  = 'https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8';
		$args = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$args = $this->_process_custom_fields( $args );

		// Prepare arguments for web-to-lead POST
		$form_args = array(
			'body' => array(
				'oid'    => sanitize_text_field( $this->data['organization_id'] ),
				'retURL' => esc_url( home_url( '/' ) ),
				'email'  => sanitize_email( $args['Email'] ),
			),
		);

		if ( '' !== $args['FirstName'] ) {
			$form_args['body']['first_name'] = sanitize_text_field( $args['FirstName'] );
		}

		if ( '' !== $args['LastName'] ) {
			$form_args['body']['last_name'] = sanitize_text_field( $args['LastName'] );
		}

		if ( isset( $args['custom_fields'] ) && is_array( $args['custom_fields'] ) ) {
			$form_args = array_merge( $form_args, $args['custom_fields'] );
		}

		// Post to SalesForce web-to-lead endpoint
		$request = wp_remote_post( $url, $form_args );

		if ( ! is_wp_error( $request ) && 200 === wp_remote_retrieve_response_code( $request ) ) {
			return 'success';
		}

		return esc_html__( 'An error occurred. Please try again.', 'et_core' );
	}
}
api/email/HubSpot.php000064400000023104152336022500010477 0ustar00<?php

/**
 * Wrapper for HubSpot's API.
 *
 * @since   3.0.72
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_HubSpot extends ET_Core_API_Email_Provider {
	/**
	 * Access Token required error message.
	 *
	 * @var string
	 */
	public static $TOKEN_REQUIRED; // phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Widely used on all email provider classes.

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.hubapi.com/contacts/v1';

	/**
	 * @inheritDoc
	 */
	public $FIELDS_URL = 'https://api.hubapi.com/properties/v1/contacts/properties';

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://api.hubapi.com/contacts/v1/lists/static';

	/**
	 * @inheritDoc
	 */
	public $SUBSCRIBE_URL = 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/@email@';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'HubSpot';

	/**
	 * @inheritDoc
	 */
	public $slug = 'hubspot';

	/**
	 * ET_Core_API_Email_HubSpot constructor.
	 *
	 * @inheritDoc
	 *
	 * @param string $owner        {@see self::owner}.
	 * @param string $account_name The name of the service account that the instance will provide access to.
	 * @param string $api_key      The api key for the account. Optional (can be set after instantiation).
	 */
	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		if ( null === self::$TOKEN_REQUIRED ) { // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
			self::$TOKEN_REQUIRED = esc_html__( 'API request failed. Access Token is required.', 'et_core' ); // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
		}

		$this->_maybe_set_custom_headers();
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$this->response_data_key = false;

		$fields_unprocessed = parent::_fetch_custom_fields( $list_id, $list );
		$fields             = array();

		foreach ( $fields_unprocessed as $field ) {
			$field_id = $field['field_id'];

			if ( ! isset( $field['options'] ) ) {
				$fields[ $field_id ] = $field;
				continue;
			}

			$options = array();

			foreach ( $field['options'] as $option ) {
				$option = $this->transform_data_to_our_format( $option, 'custom_field_option' );
				$id     = $option['id'];

				$options[ $id ] = $option['name'];
			}

			$field['options'] = $options;

			$fields[ $field_id ] = $field;
		}

		return $fields;
	}

	/**
	 * Whether current request needs API Key instead.
	 *
	 * It's needed to check existing API Key implementation when no Access Token presents.
	 *
	 * @since 4.18.1
	 *
	 * @return boolean API Key status.
	 */
	protected function _is_api_key_needed() {
		// Bail early if Access Token exists.
		if ( ! empty( $this->data['token'] ) ) {
			return false;
		}

		// Otherwise check API Key.
		return ! empty( $this->data['api_key'] );
	}

	/**
	 * Get list add contact URL.
	 *
	 * @since 3.0.72
	 * @since 4.18.1 Replaces hapikey query string with authentication on headers.
	 *
	 * @param string $list_id List ID.
	 *
	 * @return string URL for adding contact to list.
	 */
	protected function _get_list_add_contact_url( $list_id ) {
		$url = "{$this->BASE_URL}/lists/{$list_id}/add";

		if ( $this->_is_api_key_needed() ) {
			$url = add_query_arg( 'hapikey', $this->data['api_key'], $url );
		}

		return $url;
	}

	/**
	 * Maybe need to set custom headers.
	 *
	 * @since 4.18.1
	 */
	protected function _maybe_set_custom_headers() {
		if ( ! empty( $this->custom_headers ) ) {
			return;
		}

		if ( ! empty( $this->data['token'] ) ) {
			$this->custom_headers = array(
				'authorization' => 'Bearer ' . sanitize_text_field( $this->data['token'] ),
			);
		}
	}

	/**
	 * Maybe set URLs.
	 *
	 * @since 3.0.72
	 * @since 4.18.1 Replaces hapikey query string with access token headers.
	 *
	 * @param string $email Contact email.
	 */
	protected function _maybe_set_urls( $email = '' ) {
		// Only use `hapikey` when Access Token doesn't exist and the API Key not empty.
		if ( $this->_is_api_key_needed() ) {
			$this->FIELDS_URL    = add_query_arg( 'hapikey', $this->data['api_key'], $this->FIELDS_URL ); // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
			$this->LISTS_URL     = add_query_arg( 'hapikey', $this->data['api_key'], $this->LISTS_URL ); // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
			$this->SUBSCRIBE_URL = add_query_arg( 'hapikey', $this->data['api_key'], $this->SUBSCRIBE_URL ); // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
		}

		if ( $email ) {
			$this->SUBSCRIBE_URL = str_replace( '@email@', rawurlencode( $email ), $this->SUBSCRIBE_URL );
		}
	}

	protected function _process_custom_fields( $args ) {
		$args['properties'] = array();

		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields     = $args['custom_fields'];
		$properties = array();

		unset( $args['custom_fields'] );

		$field_types = array(
			'radio',
			'booleancheckbox',
		);

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );
				$value = implode( ';', $value );
			} elseif ( in_array( $this->data['custom_fields'][ $field_id ]['type'], $field_types, true ) ) {
				// Should use array key. Sometimes it's different than value and Hubspot expects the key
				$radio_options = $this->data['custom_fields'][ $field_id ]['options'];
				$value         = array_search( $value, $radio_options );
			}

			$properties[] = array(
				'property' => $field_id,
				'value'    => $value,
			);
		}

		$args['properties'] = $properties;

		return $args;
	}

	/**
	 * @inheritDoc
	 *
	 * @since 4.18.1 Replaces api_key field with token.
	 */
	public function get_account_fields() {
		return array(
			'token' => array(
				'label' => esc_html__( 'Access Token', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'                => array(
				'list_id'           => 'listId',
				'name'              => 'name',
				'subscribers_count' => 'metaData.size',
			),
			'subscriber'          => array(
				'email'         => 'email',
				'name'          => 'firstname',
				'last_name'     => 'lastname',
				'custom_fields' => 'custom_fields',
			),
			'error'               => array(
				'error_message' => 'message',
			),
			'custom_field'        => array(
				'field_id' => 'name',
				'name'     => 'label',
				'type'     => 'fieldType',
				'options'  => 'options',
				'hidden'   => 'hidden',
			),
			'custom_field_option' => array(
				'id'   => 'value',
				'name' => 'label',
			),
			'custom_field_type'   => array(
				// Us <=> Them
				'select'          => 'select',
				'radio'           => 'radio',
				'checkbox'        => 'checkbox',
				// Us => Them
				'input'           => 'text',
				'textarea'        => 'text',
				// Them => Us
				'text'            => 'input',
				'booleancheckbox' => 'booleancheckbox',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 *
	 * @since 4.18.1 Replaces API Key usage with Access Token.
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['token'] ) && empty( $this->data['api_key'] ) ) {
			return self::$TOKEN_REQUIRED; // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
		}

		$this->_maybe_set_custom_headers();
		$this->_maybe_set_urls();

		/**
		 * The maximum number of subscriber lists to request from Hubspot's API at a time.
		 *
		 * @since 3.0.75
		 *
		 * @param int $max_lists Value must be <= 250.
		 */
		$max_lists = (int) apply_filters( 'et_core_api_email_hubspot_max_lists', 250 );

		$this->LISTS_URL = add_query_arg( 'count', $max_lists, $this->LISTS_URL );

		$this->response_data_key = 'lists';

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 *
	 * @since 4.18.1 Replaces API Key usage with Access Token.
	 */
	public function subscribe( $args, $url = '' ) {
		if ( empty( $this->data['token'] ) && empty( $this->data['api_key'] ) ) {
			return self::$TOKEN_REQUIRED; // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Widely used on all email provider classes.
		}

		$this->_maybe_set_custom_headers();
		$this->_maybe_set_urls( $args['email'] );

		$args = $this->_process_custom_fields( $args );

		$data = array(
			'properties' => array(
				array(
					'property' => 'email',
					'value'    => et_core_sanitized_previously( $args['email'] ),
				),
				array(
					'property' => 'firstname',
					'value'    => et_core_sanitized_previously( $args['name'] ),
				),
				array(
					'property' => 'lastname',
					'value'    => et_core_sanitized_previously( $args['last_name'] ),
				),
			),
		);

		$data['properties'] = array_merge( $data['properties'], $args['properties'] );

		$this->prepare_request( $this->SUBSCRIBE_URL, 'POST', false, $data, true );
		$this->make_remote_request();

		if ( $this->response->ERROR ) {
			return $this->get_error_message();
		}

		$url  = $this->_get_list_add_contact_url( $args['list_id'] );
		$data = array(
			'emails' => array( $args['email'] ),
		);

		$this->prepare_request( $url, 'POST', false, $data, true );
		$this->make_remote_request();

		if ( $this->response->ERROR ) {
			return $this->get_error_message();
		}

		return 'success';
	}
}
api/email/CampaignMonitor.php000064400000014355152336022500012212 0ustar00<?php

/**
 * Wrapper for Campaign Monitor's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_CampaignMonitor extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.createsend.com/api/v3.1';

	/**
	 * @inheritDoc
	 */
	public $http_auth = array(
		'username' => 'api_key',
		'password' => '-',
	);

	/**
	 * @inheritDoc
	 */
	public $name = 'CampaignMonitor';

	/**
	 * @inheritDoc
	 */
	public $name_field_only = true;

	/**
	 * @inheritDoc
	 */
	public $slug = 'campaign_monitor';

	/**
	 * @inheritDoc
	 * @internal If true, oauth endpoints properties must also be defined.
	 */
	public $uses_oauth = false;

	public function __construct( $owner, $account_name, $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->http_auth['password'] = $owner;
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$this->prepare_request( "{$this->BASE_URL}/lists/{$list_id}/customfields.json" );
		$this->make_remote_request();

		$result = array();

		if ( $this->response->ERROR ) {
			et_debug( $this->get_error_message() );

			return $result;
		}

		foreach ( $this->response->DATA as &$custom_field ) {
			$custom_field = $this->transform_data_to_our_format( $custom_field, 'custom_field' );
			$custom_field['field_id'] = ltrim( rtrim( $custom_field['field_id'], ']' ), '[' );
		}

		$fields = array();

		foreach ( $this->response->DATA as $field ) {
			$field_id = $field['field_id'];
			$type     = self::$_->array_get( $field, 'type', 'any' );

			$field['type'] = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'any' );

			$fields[ $field_id ] = $field;
		}

		return $fields;
	}

	protected function _get_clients() {
		$url = "{$this->BASE_URL}/clients.json";

		$this->prepare_request( $url );
		$this->make_remote_request();

		if ( $this->response->ERROR ) {
			return $this->get_error_message();
		}

		return (array) $this->response->DATA;
	}

	protected function _get_subscriber_counts() {
		$subscriber_lists = $this->_process_subscriber_lists( $this->response->DATA );
		$with_counts      = array();

		foreach ( $subscriber_lists as $subscriber_list ) {
			$list_id                 = $subscriber_list['list_id'];
			$with_counts[ $list_id ] = $subscriber_list;
			$url                     = "{$this->BASE_URL}/lists/{$list_id}/stats.json";

			$this->prepare_request( $url );
			$this->make_remote_request();

			if ( $this->response->ERROR  ) {
				continue;
			}

			if ( isset( $this->response->DATA['TotalActiveSubscribers'] ) ) {
				$with_counts[ $list_id ]['subscribers_count'] = $this->response->DATA['TotalActiveSubscribers'];
			} else {
				$with_counts[ $list_id ]['subscribers_count'] = 0;
			}

			usleep( 500000 ); // 0.5 seconds
		}

		return $with_counts;
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields_unprocessed = $args['custom_fields'];

		unset( $args['custom_fields'] );

		$fields = array();

		foreach ( $fields_unprocessed as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox)
				foreach ( $value as $selected_option ) {
					$fields[] = array(
						'Key'   => $field_id,
						'Value' => $selected_option,
					);
				}
			} else {
				$fields[] = array(
					'Key'   => $field_id,
					'Value' => $value,
				);
			}
		}

		$args['CustomFields'] = $fields;

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'              => array(
				'list_id'           => 'ListID',
				'name'              => 'Name',
				'subscribers_count' => 'TotalActiveSubscribers',
			),
			'subscriber'        => array(
				'name'          => 'Name',
				'email'         => 'EmailAddress',
				'custom_fields' => 'custom_fields',
			),
			'error'             => array(
				'error_message' => 'Message',
			),
			'custom_field'      => array(
				'field_id' => 'Key',
				'name'     => 'FieldName',
				'type'     => 'DataType',
				'options'  => 'FieldOptions',
			),
			'custom_field_type' => array(
				// Us => Them
				'input'           => 'Text',
				'select'          => 'MultiSelectOne',
				'checkbox'        => 'MultiSelectMany',
				// Them => Us
				'Text'            => 'input',
				'Number'          => 'input',
				'Date'            => 'input',
				'MultiSelectOne'  => 'select',
				'MultiSelectMany' => 'checkbox',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$clients = $this->_get_clients();
		$lists   = array();

		if ( ! is_array( $clients ) ) {
			// Request failed with an error, return the error message.
			return $clients;
		}

		foreach ( $clients as $client_info ) {
			if ( empty( $client_info['ClientID'] ) ) {
				continue;
			}

			$url = "{$this->BASE_URL}/clients/{$client_info['ClientID']}/lists.json";

			$this->prepare_request( $url );

			parent::fetch_subscriber_lists();

			if ( $this->response->ERROR ) {
				return $this->get_error_message();
			}

			if ( isset( $this->response->DATA ) ) {
				$with_counts                 = $this->_get_subscriber_counts();
				$lists                       = $lists + $with_counts;
				$this->data['is_authorized'] = true;

				$this->save_data();
			}
		}

		if ( empty( $this->data['lists'] ) || ! empty( $lists ) ) {
			$this->data['lists'] = $lists;
			$this->save_data();
		}

		return $this->is_authenticated() ? 'success' : $this->FAILURE_MESSAGE;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$url    = "{$this->BASE_URL}/subscribers/{$args['list_id']}.json";
		$params = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$params = $this->_process_custom_fields( $params );

		$params['CustomFields'][] = array( 'Key' => 'Note', 'Value' => $this->SUBSCRIBED_VIA );

		$this->prepare_request( $url, 'POST', false, $params, true );

		return parent::subscribe( $params, $url );
	}
}
api/email/Provider.php000064400000025175152336022500010717 0ustar00<?php

/**
 * High-level wrapper for interacting with the external API's offered by 3rd-party mailing list providers.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API
 */
abstract class ET_Core_API_Email_Provider extends ET_Core_API_Service  {

	/**
	 * The URL from which custom fields for a list on this account can be retrieved.
	 *
	 * @var string
	 */
	public $FIELDS_URL;

	/**
	 * The URL from which groups/tags for a list on this account can be retrieved.
	 *
	 * @var string
	 */
	public $GROUPS_URL;

	/**
	 * The number of records to return from API (per request).
	 *
	 * @var int
	 */
	public $COUNT;

	/**
	 * The URL from which subscriber lists for this account can be retrieved.
	 *
	 * @var string
	 */
	public $LISTS_URL;

	/**
	 * The URL to which new subscribers can be posted.
	 *
	 * @var string
	 */
	public $SUBSCRIBE_URL;

	/**
	 * The URL from which subscribers for this account can be retrieved.
	 *
	 * @var string
	 */
	public $SUBSCRIBERS_URL;

	/**
	 * "Subscribed via..." translated string.
	 *
	 * @var string
	 */
	public $SUBSCRIBED_VIA;

	/**
	 * Type of support for custom fields offered by provider.
	 *
	 * @since 3.17.2
	 *
	 * @var bool|string Accepts `dynamic`, `predefined`, `false`. Default `predefined`.
	 */
	public $custom_fields = 'predefined';

	/**
	 * Type of support for custom fields offered by provider.
	 *
	 * @since 3.17.2
	 *
	 * @var string Accepts `list`, `account`.
	 */
	public $custom_fields_scope = 'list';

	/**
	 * Whether or not only a single name field is supported instead of first/last name fields.
	 *
	 * @var string
	 */
	public $name_field_only = false;

	/**
	 * ET_Core_API_Email_Provider constructor.
	 *
	 * @inheritDoc
	 */
	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		$this->service_type = 'email';

		parent::__construct( $owner, $account_name, $api_key );

		if ( 'builder' === $this->owner ) {
			$owner = 'Divi Builder';
		} else {
			$owner = ucfirst( $this->owner );
		}

		$this->SUBSCRIBED_VIA = sprintf( '%1$s %2$s.', esc_html__( 'Subscribed via', 'et_core' ), $owner );

		/**
		 * Filters the max number of results returned from email API provider per request.
		 *
		 * @since 3.17.2
		 *
		 * @param int $max_results_count
		 */
		$this->COUNT = apply_filters( 'et_core_api_email_max_results_count', 250 );
	}

	/**
	 * Get custom fields for a subscriber list.
	 *
	 * @param int|string $list_id
	 * @param array      $list
	 *
	 * @return array
	 */
	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		if ( 'dynamic' === $this->custom_fields ) {
			return array();
		}

		if ( null === $this->request || $this->request->COMPLETE ) {
			$this->prepare_request( $this->FIELDS_URL );
		}

		$this->make_remote_request();

		$result = array();

		if ( false !== $this->response_data_key && empty( $this->response_data_key ) ) {
			// Let child class handle parsing the response data themselves.
			return $result;
		}

		if ( $this->response->ERROR ) {
			et_debug( $this->get_error_message() );
			return $result;
		}

		if ( false === $this->response_data_key ) {
			// The data returned by the service is not nested.
			$data = $this->response->DATA;
		} else {
			// The data returned by the service is nested under a single key.
			$data = $this->response->DATA[ $this->response_data_key ];
		}

		foreach ( $data as &$custom_field ) {
			$custom_field = $this->transform_data_to_our_format( $custom_field, 'custom_field' );
		}

		$fields      = array();
		$field_types = self::$_->array_get( $this->data_keys, 'custom_field_type' );

		foreach ( $data as $field ) {
			$field_id = $field['field_id'];
			$type     = self::$_->array_get( $field, 'type', 'any' );

			if ( $field_types && ! isset( $field_types[ $type ] ) ) {
				// Unsupported field type. Make it 'text' instead.
				$type = 'text';
			}

			if ( isset( $field['hidden'] ) && is_string( $field['hidden'] ) ) {
				$field['hidden'] = 'false' === $field['hidden'] ? false : true;
			}

			$field['type'] = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'any' );

			$fields[ $field_id ] = $field;
		}

		return $fields;
	}

	/**
	 * @inheritDoc
	 */
	protected function _get_data() {
		$options = parent::_get_data();

		// return empty array in case of empty name
		if ( '' === $this->account_name || ! is_string( $this->account_name ) ) {
			return array();
		}

		$provider = sanitize_text_field( $this->slug );
		$account  = sanitize_text_field( $this->account_name );

		if ( ! isset( $options['accounts'][ $provider ][ $account ] ) ) {
			$options['accounts'][ $provider ][ $account ] = array();
			update_option( "et_core_api_email_options", $options );
		}

		return $options['accounts'][ $provider ][ $account ];
	}

	protected function _process_custom_fields( $args ) {
		return $args;
	}

	/**
	 * Processes subscriber lists data from the provider's API and returns only the data we're interested in.
	 *
	 * @since 1.1.0
	 *
	 * @param array $lists Subscriber lists data to process.
	 *
	 * @return array
	 */
	protected function _process_subscriber_lists( $lists ) {
		$id_key = $this->data_keys['list']['list_id'];
		$result = array();

		foreach ( (array) $lists as $list ) {
			if ( ! is_array( $list ) ) {
				$list = (array) $list;
			}

			if ( ! isset( $list[ $id_key ] ) ) {
				continue;
			}

			$id            = $list[ $id_key ];
			$result[ $id ] = $this->transform_data_to_our_format( $list, 'list' );

			if ( ! array_key_exists( 'subscribers_count', $result[ $id ] ) ) {
				$result[ $id ]['subscribers_count'] = 0;
			}

			$get_custom_fields = $this->custom_fields && 'list' === $this->custom_fields_scope;

			if ( $get_custom_fields && $custom_fields = $this->_fetch_custom_fields( $id, $list ) ) {
				$result[ $id ]['custom_fields'] = $custom_fields;
			}
		}

		return $result;
	}

	/**
	 * Returns whether or not an account exists in the database.
	 *
	 * @param string $provider
	 * @param string $account_name
	 *
	 * @return bool
	 */
	public static function account_exists( $provider, $account_name ) {
		$all_accounts = self::get_accounts();

		return isset( $all_accounts[ $provider ][ $account_name ] );
	}

	/**
	 * @inheritDoc
	 */
	public function delete() {
		self::remove_account( $this->slug, $this->account_name );

		$this->account_name = '';

		$this->_get_data();
	}

	/**
	 * Retrieves the email accounts data from the database.
	 *
	 * @return array
	 */
	public static function get_accounts() {
		$options = (array) get_option( 'et_core_api_email_options' );

		return isset( $options['accounts'] ) ? $options['accounts'] : array();
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		return $keymap;
	}

	/**
	 * Retrieves the subscriber lists for the account assigned to the current instance.
	 *
	 * @return string 'success' if successful, an error message otherwise.
	 */
	public function fetch_subscriber_lists() {
		if ( null === $this->request || $this->request->COMPLETE ) {
			$this->prepare_request( $this->LISTS_URL );
		}

		$this->make_remote_request();
		$result = 'success';

		if ( false !== $this->response_data_key && empty( $this->response_data_key ) ) {
			// Let child class handle parsing the response data themselves.
			return '';
		}

		if ( $this->response->ERROR ) {
			return $this->get_error_message();
		}

		if ( false === $this->response_data_key ) {
			// The data returned by the service is not nested.
			$data = $this->response->DATA;
		} else {
			// The data returned by the service is nested under a single key.
			$data = $this->response->DATA[ $this->response_data_key ];
		}

		if ( ! empty( $data ) ) {
			$this->data['lists']         = $this->_process_subscriber_lists( $data );
			$this->data['is_authorized'] = true;

			$list = is_array( $data ) ? array_shift( $data ) : array();

			if ( $this->custom_fields && 'account' === $this->custom_fields_scope ) {
				$this->data['custom_fields'] = $this->_fetch_custom_fields( '', $list );
			}

			$this->save_data();
		}

		return $result;
	}

	/**
	 * Remove an account
	 *
	 * @param $provider
	 * @param $account_name
	 */
	public static function remove_account( $provider, $account_name ) {
		$options = (array) get_option( 'et_core_api_email_options' );

		unset( $options['accounts'][ $provider ][ $account_name ] );

		update_option( 'et_core_api_email_options', $options );
	}

	/**
	 * @inheritDoc
	 */
	public function save_data() {
		self::update_account( $this->slug, $this->account_name, $this->data );
	}

	/**
	 * @inheritDoc
	 */
	public function set_account_name( $name ) {
		$this->account_name = $name;
		$this->data = $this->_get_data();
	}

	/**
	 * Makes an HTTP POST request to add a subscriber to a list.
	 *
	 * @param string[] $args Data for the POST request.
	 * @param string   $url  The URL for the POST request. Optional when called on child classes.
	 *
	 * @return string 'success' if successful, an error message otherwise.
	 */
	public function subscribe( $args, $url = '' ) {
		if ( null === $this->request || $this->request->COMPLETE ) {
			if ( ! in_array( 'ip_address', $args ) || 'true' === $args['ip_address'] ) {
				$args['ip_address'] = et_core_get_ip_address();
			} else if ( 'false' === $args['ip_address'] ) {
				$args['ip_address'] = '0.0.0.0';
			}

			$args = $this->transform_data_to_provider_format( $args, 'subscriber' );

			if ( $this->custom_fields ) {
				$args = $this->_process_custom_fields( $args );
			}

			$this->prepare_request( $url, 'POST', false, $args );
		} else if ( $this->request->JSON_BODY && ! is_string( $this->request->BODY ) && ! $this->uses_oauth ) {
			$this->request->BODY = json_encode( $this->request->BODY );
		} else if ( is_array( $this->request->BODY ) ) {
			$this->request->BODY = array_merge( $this->request->BODY, $args );
		} else if ( ! $this->request->JSON_BODY ) {
			$this->request->BODY = $args;
		}

		$this->make_remote_request();

		return $this->response->ERROR ? $this->get_error_message() : 'success';
	}

	/**
	 * Updates the data for a provider account.
	 *
	 * @param string $provider The provider's slug.
	 * @param string $account  The account name.
	 * @param array  $data     The new data for the account.
	 */
	public static function update_account( $provider, $account, $data ) {
		$options       = (array) get_option( 'et_core_api_email_options' );
		$existing_data = array();

		if ( empty( $account ) || empty( $provider ) ) {
			return;
		}

		$provider = sanitize_text_field( $provider );
		$account  = sanitize_text_field( $account );

		if ( isset( $options['accounts'][ $provider ][ $account ] ) ) {
			$existing_data = $options['accounts'][ $provider ][ $account ];
		}

		$options['accounts'][ $provider ][ $account ] = array_merge( $existing_data, $data );

		update_option( 'et_core_api_email_options', $options );
	}
}
api/email/ConstantContact.php000064400000013722152336022500012225 0ustar00<?php

/**
 * Wrapper for ConstantContact's API.
 *
 * @since   3.0.75
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_ConstantContact extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.constantcontact.com/v2';

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://api.constantcontact.com/v2/lists';

	/**
	 * @inheritDoc
	 */
	public $SUBSCRIBE_URL = 'https://api.constantcontact.com/v2/contacts';

	/**
	 * @inheritDoc
	 */
	public $SUBSCRIBERS_URL = 'https://api.constantcontact.com/v2/contacts';

	protected $_subscriber;

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'ConstantContact';

	/**
	 * @inheritDoc
	 */
	public $slug = 'constant_contact';

	/**
	 * ET_Core_API_Email_ConstantContact constructor.
	 *
	 * @inheritDoc
	 */
	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->_maybe_set_custom_headers();
	}

	protected function _create_subscriber_data_array( $args ) {
		return $this->transform_data_to_provider_format( $args, 'subscriber' );
	}

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$fields = array();

		foreach ( range( 1, 15 ) as $i ) {
			$fields["custom_field_{$i}"] = array(
				'field_id' => "custom_field_{$i}",
				'name'     => "custom_field_{$i}",
				'type'     => 'any',
			);
		}

		return $fields;
	}

	protected function _get_list_from_subscriber( $subscriber, $list_id ) {
		if ( ! isset( $subscriber['lists'] ) ) {
			return false;
		}

		foreach ( $subscriber['lists'] as &$list ) {
			if ( $list['id'] === $list_id ) {
				return $list;
			}
		}

		return false;
	}

	protected function _maybe_set_custom_headers() {
		if ( empty( $this->custom_headers ) && isset( $this->data['token'] ) ) {
			$this->custom_headers = array(
				'Authorization' => 'Bearer ' . sanitize_text_field( $this->data['token'] ),
			);
		}
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields           = $args['custom_fields'];
		$processed_fields = array();

		unset( $args['custom_fields'], $this->_subscriber['custom_fields_unprocessed'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			$processed_fields[] = array(
				'name'  => $field_id,
				'value' => $value,
			);
		}

		if ( isset( $this->_subscriber['custom_fields'] ) ) {
			$processed_fields = array_merge( $processed_fields, $this->_subscriber['custom_fields'] );
		}

		$this->_subscriber['custom_fields'] = array_unique( $processed_fields, SORT_REGULAR );

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
			'token'   => array(
				'label' => esc_html__( 'Access Token', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'         => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => 'contact_count',
			),
			'subscriber'   => array(
				'name'          => 'first_name',
				'last_name'     => 'last_name',
				'email'         => 'email_addresses.[0].email_address',
				'list_id'       => 'lists.[0].id',
				'custom_fields' => 'custom_fields_unprocessed',
			),
			'error'        => array(
				'error_message' => '[0].error_message',
			),
			'custom_field' => array(
				'field_id' => 'name',
				'name'     => 'name',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	public function get_subscriber( $email ) {
		$url = add_query_arg( 'email', $email, $this->SUBSCRIBERS_URL );

		$this->prepare_request( $url, 'GET', false );
		$this->make_remote_request();

		if ( $this->response->ERROR || ! isset( $this->response->DATA['results'] ) ) {
			return array();
		}

		return $this->response->DATA['results'];
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) || empty( $this->data['token'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_maybe_set_custom_headers();

		$this->response_data_key = false;

		$this->LISTS_URL = add_query_arg( 'api_key', $this->data['api_key'], $this->LISTS_URL );

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$this->SUBSCRIBERS_URL = add_query_arg( 'api_key', $this->data['api_key'], $this->SUBSCRIBERS_URL );
		$result                = null;
		$args['list_id']       = (string) $args['list_id'];

		$subscriber = $this->get_subscriber( $args['email'] );
		$subscriber = $subscriber ? $subscriber[0] : $subscriber;

		$query_args = array( 'api_key' => $this->data['api_key'], 'action_by' => 'ACTION_BY_VISITOR' );

		if ( $subscriber ) {
			if ( $list = $this->_get_list_from_subscriber( $subscriber, $args['list_id'] ) ) {
				$result = 'success';
			} else {
				$subscriber['lists'][] = array( 'id' => $args['list_id'] );

				$this->_subscriber = &$subscriber;

				$args = $this->_process_custom_fields( $args );

				$url = add_query_arg( $query_args, "{$this->SUBSCRIBE_URL}/{$subscriber['id']}" );

				$this->prepare_request( $url, 'PUT', false, $subscriber, true );
			}

		} else {
			$url        = add_query_arg( $query_args, $this->SUBSCRIBE_URL );
			$subscriber = $this->_create_subscriber_data_array( $args );

			$this->_subscriber = &$subscriber;

			$args = $this->_process_custom_fields( $args );

			$this->prepare_request( $url, 'POST', false, $subscriber, true );
		}

		if ( 'success' !== $result ) {
			$result = parent::subscribe( $args, $this->SUBSCRIBE_URL );
		}

		return $result;
	}
}
api/email/GetResponse.php000064400000010064152336022500011352 0ustar00<?php

/**
 * Wrapper for GetResponse's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_GetResponse extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.getresponse.com/v3';

	/**
	 * @inheritDoc
	 */
	public $FIELDS_URL = 'https://api.getresponse.com/v3/custom-fields';

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://api.getresponse.com/v3/campaigns';

	/**
	 * @inheritDoc
	 */
	public $SUBSCRIBE_URL = 'https://api.getresponse.com/v3/contacts';

	/**
	 * @inheritDoc
	 */
	public $name = 'GetResponse';

	/**
	 * @inheritDoc
	 */
	public $name_field_only = true;

	/**
	 * @inheritDoc
	 */
	public $slug = 'getresponse';

	/**
	 * @inheritDoc
	 * @internal If true, oauth endpoints properties must also be defined.
	 */
	public $uses_oauth = false;

	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->_maybe_set_custom_headers();
	}

	protected function _maybe_set_custom_headers() {
		if ( empty( $this->custom_headers ) && isset( $this->data['api_key'] ) ) {
			$this->custom_headers = array( 'X-Auth-Token' => "api-key {$this->data['api_key']}" );
		}
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields_unprocessed = $args['custom_fields'];
		$fields             = array();

		unset( $args['custom_fields'] );

		foreach ( $fields_unprocessed as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );
			} else {
				$value = array( $value );
			}

			$fields[] = array(
				'customFieldId' => $field_id,
				'value'         => $value,
			);
		}

		$args['customFieldValues'] = $fields;

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'              => array(
				'name'              => 'name',
				'list_id'           => 'campaignId',
				'subscribers_count' => 'totalSubscribers',
			),
			'subscriber'        => array(
				'name'          => 'name',
				'email'         => 'email',
				'list_id'       => 'campaign.campaignId',
				'ip_address'    => 'ipAddress',
				'custom_fields' => 'custom_fields',
			),
			'error'             => array(
				'error_message' => 'message',
			),
			'custom_field'      => array(
				'field_id' => 'customFieldId',
				'name'     => 'name',
				'type'     => 'fieldType',
				'options'  => 'values',
				'hidden'   => 'hidden',
			),
			'custom_field_type' => array(
				// Us <=> Them
				'textarea'      => 'textarea',
				'radio'         => 'radio',
				'checkbox'      => 'checkbox',
				// Us => Them
				'input'         => 'text',
				'select'        => 'single_select',
				// Them => Us
				'text'          => 'input',
				'single_select' => 'select',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_maybe_set_custom_headers();

		$this->response_data_key = false;

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$ip_address = 'true' === self::$_->array_get( $args, 'ip_address', 'true' ) ? et_core_get_ip_address() : '0.0.0.0';

		$args['ip_address'] = $ip_address;
		$args               = $this->transform_data_to_provider_format( $args, 'subscriber' );
		$args               = $this->_process_custom_fields( $args );
		$args['note']       = $this->SUBSCRIBED_VIA;
		$args['dayOfCycle'] = 0;

		if ( empty( $args['name'] ) ) {
			unset( $args['name'] );
		}

		$this->prepare_request( $this->SUBSCRIBE_URL, 'POST', false, $args );

		return parent::subscribe( $args, $this->SUBSCRIBE_URL );
	}
}
api/email/MailerLite.php000064400000006046152336022500011150 0ustar00<?php

/**
 * Wrapper for MailerLite's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_MailerLite extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.mailerlite.com/api/v2';

	/**
	 * @inheritDoc
	 */
	public $FIELDS_URL = 'https://api.mailerlite.com/api/v2/fields';

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://api.mailerlite.com/api/v2/groups';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'MailerLite';

	/**
	 * @inheritDoc
	 */
	public $slug = 'mailerlite';

	/**
	 * @inheritDoc
	 * @internal If true, oauth endpoints properties must also be defined.
	 */
	public $uses_oauth = false;

	public function __construct( $owner = '', $account_name = '', $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->_maybe_set_custom_headers();
	}

	protected function _maybe_set_custom_headers() {
		if ( empty( $this->custom_headers ) && isset( $this->data['api_key'] ) ) {
			$this->custom_headers = array( 'X-MailerLite-ApiKey' => "{$this->data['api_key']}" );
		}
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, "fields.{$field_id}", $value );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'         => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => 'active',
			),
			'subscriber'   => array(
				'name'          => 'fields.name',
				'last_name'     => 'fields.last_name',
				'email'         => 'email',
				'custom_fields' => 'custom_fields',
				'resubscribe'   => 'resubscribe',
			),
			'error'        => array(
				'error_message' => 'error.message',
			),
			'custom_field' => array(
				'field_id' => 'key',
				'name'     => 'title',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_maybe_set_custom_headers();

		$this->response_data_key = false;

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$args['resubscribe'] = 1;
		$url = "{$this->LISTS_URL}/{$args['list_id']}/subscribers";

		return parent::subscribe( $args, $url );
	}
}
api/email/Fields.php000064400000037122152336022500010326 0ustar00<?php


class ET_Core_API_Email_Fields {

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	protected static $_any_custom_field_type_support;
	protected static $_predefined_custom_field_support;

	/**
	 * @var ET_Core_API_Email_Providers
	 */
	protected static $_providers;

	public static $owner;

	protected static function _custom_field_definitions() {
		$readonly_dependency   = 'builder' === self::$owner ? 'parentModule:provider' : 'email_provider';
		$custom_fields_support = array_keys( self::$_providers->names_by_slug( 'all', 'custom_fields' ) );
		$custom_fields_data    = self::$_providers->custom_fields_data();
		$fields                = array();

		if ( 'bloom' === self::$owner ) {
			$fields = array(
				'use_custom_fields' => array(
					'label'       => esc_html__( 'Use Custom Fields', 'et_core' ),
					'type'        => 'yes_no_button',
					'options'     => array(
						'on'  => esc_html__( 'Yes', 'et_core' ),
						'off' => esc_html__( 'No', 'et_core' ),
					),
					'default'     => 'off',
					'show_if'     => array(
						'email_provider' => $custom_fields_support,
					),
					'allow_dynamic' => array_keys( self::$_providers->names_by_slug( 'all', 'dynamic_custom_fields' ) ),
					'description'   => esc_html__( 'Enable this option to use custom fields in your opt-in form.', 'et_core' ),
				),
				'custom_fields'     => array(
					'type'    => 'sortable_list',
					'label'   => '',
					'default' => '[]',
				),
				'editing_field'     => array(
					'type'    => 'skip',
					'default' => 'off',
				),
			);
		}

		foreach ( $custom_fields_data as $provider => $accounts ) {
			foreach ( $accounts as $account => $lists ) {
				$account_name = str_replace( ' ', '', strtolower( $account ) );
				$key          = "predefined_field_{$provider}_{$account_name}";

				if ( isset( $lists['custom_fields'] ) ) {
					// Custom fields are per account
					$fields[ $key ] = self::_predefined_custom_field_select( $lists['custom_fields'], $provider, $account );
					continue;
				}

				foreach ( $lists as $list_id => $custom_fields ) {
					// Custom fields are per list
					$key            = "predefined_field_{$provider}_{$account_name}_{$list_id}";
					$fields[ $key ] = self::_predefined_custom_field_select( $custom_fields, $provider, $account, $list_id );
				}
			}
		}

		$labels = array(
			'link_url'      => esc_html__( 'Link URL', 'et_core' ),
			'link_text'     => esc_html__( 'Link Text', 'et_core' ),
			'link_cancel'   => esc_html__( 'Discard Changes', 'et_core' ),
			'link_save'     => esc_html__( 'Save Changes', 'et_core' ),
			'link_settings' => esc_html__( 'Option Link', 'et_core' ),
		);

		$fields = array_merge( $fields, array(
			'predefined_field' => array(
				'type'    => 'skip',
				'default' => 'none',
			),
			'field_id'         => array(
				'label'       => esc_html__( 'ID', 'et_core' ),
				'type'        => 'text',
				'default'     => '', // <--- Intentional
				'description' => esc_html__( 'Define a unique ID for this field. You should use only English characters without special characters or spaces.', 'et_core' ),
				'toggle_slug' => 'main_content',
				'readonly_if' => array(
					$readonly_dependency => self::$_predefined_custom_field_support,
				),
			),
			'field_title'      => array(
				'label'           => esc_html__( 'Name', 'et_core' ),
				'type'            => 'text',
				'description'     => esc_html__( 'Set the label that will appear above this field in the opt-in form.', 'et_core' ),
				'toggle_slug'     => 'main_content',
				'readonly_if'     => array(
					$readonly_dependency => self::$_predefined_custom_field_support,
				),
				'readonly_if_not' => array(
					$readonly_dependency => array( 'getresponse', 'sendinblue', 'constant_contact', 'fluentcrm' ),
				),
			),
			'field_type'       => array(
				'label'           => esc_html__( 'Type', 'et_core' ),
				'type'            => 'select',
				'default'         => 'none',
				'option_category' => 'basic_option',
				'options'         => array(
					'none'     => esc_html__( 'Choose a field type...', 'et_core' ),
					'input'    => esc_html__( 'Input Field', 'et_core' ),
					'email'    => esc_html__( 'Email Field', 'et_core' ),
					'text'     => esc_html__( 'Textarea', 'et_core' ),
					'checkbox' => esc_html__( 'Checkboxes', 'et_core' ),
					'radio'    => esc_html__( 'Radio Buttons', 'et_core' ),
					'select'   => esc_html__( 'Select Dropdown', 'et_core' ),
				),
				'description'     => esc_html__( 'Choose the type of field', 'et_core' ),
				'toggle_slug'     => 'field_options',
				'readonly_if'     => array(
					$readonly_dependency => self::$_predefined_custom_field_support,
				),
				'readonly_if_not' => array(
					$readonly_dependency => self::$_any_custom_field_type_support,
				),
			),
			'checkbox_checked' => array(
				'label'           => esc_html__( 'Checked By Default', 'et_core' ),
				'description'     => esc_html__( 'If enabled, the check mark will be automatically selected for the visitor. They can still deselect it.', 'et_core' ),
				'type'            => 'hidden',
				'option_category' => 'layout',
				'default'         => 'off',
				'toggle_slug'     => 'field_options',
				'show_if'         => array(
					'field_type' => 'checkbox',
				),
			),
			'checkbox_options' => array(
				'label'           => esc_html__( 'Options', 'et_core' ),
				'type'            => 'sortable_list',
				'checkbox'        => true,
				'option_category' => 'basic_option',
				'toggle_slug'     => 'field_options',
				'readonly_if'     => array(
					$readonly_dependency => self::$_predefined_custom_field_support,
				),
				'readonly_if_not' => array(
					$readonly_dependency => self::$_any_custom_field_type_support,
				),
				'show_if'         => array(
					'field_type' => 'checkbox',
				),
				'right_actions'   => 'move|link|copy|delete',
				'right_actions_readonly' => 'move|link',
				'labels'          => $labels,
			),
			'radio_options'    => array(
				'label'           => esc_html__( 'Options', 'et_core' ),
				'type'            => 'sortable_list',
				'radio'           => true,
				'option_category' => 'basic_option',
				'toggle_slug'     => 'field_options',
				'readonly_if'     => array(
					$readonly_dependency => self::$_predefined_custom_field_support,
				),
				'readonly_if_not' => array(
					$readonly_dependency => self::$_any_custom_field_type_support,
				),
				'show_if'         => array(
					'field_type' => 'radio',
				),
				'right_actions'   => 'move|link|copy|delete',
				'right_actions_readonly' => 'move|link',
				'labels'          => $labels,
			),
			'select_options'   => array(
				'label'           => esc_html__( 'Options', 'et_core' ),
				'type'            => 'sortable_list',
				'option_category' => 'basic_option',
				'toggle_slug'     => 'field_options',
				'readonly_if'     => array(
					$readonly_dependency => self::$_predefined_custom_field_support,
				),
				'readonly_if_not' => array(
					$readonly_dependency => self::$_any_custom_field_type_support,
				),
				'show_if'         => array(
					'field_type' => 'select',
				),
				'right_actions'   => 'move|copy|delete',
				'right_actions_readonly' => 'move',
			),
			'min_length'       => array(
				'label'           => esc_html__( 'Minimum Length', 'et_core' ),
				'description'     => esc_html__( 'Leave at 0 to remove restriction', 'et_core' ),
				'type'            => 'range',
				'default'         => '0',
				'unitless'        => true,
				'range_settings'  => array(
					'min'  => '0',
					'max'  => '255',
					'step' => '1',
				),
				'option_category' => 'basic_option',
				'toggle_slug'     => 'field_options',
				'show_if'         => array(
					'field_type' => 'input',
				),
			),
			'max_length'       => array(
				'label'           => esc_html__( 'Maximum Length', 'et_core' ),
				'description'     => esc_html__( 'Leave at 0 to remove restriction', 'et_core' ),
				'type'            => 'range',
				'default'         => '0',
				'unitless'        => true,
				'range_settings'  => array(
					'min'  => '0',
					'max'  => '255',
					'step' => '1',
				),
				'option_category' => 'basic_option',
				'toggle_slug'     => 'field_options',
				'show_if'         => array(
					'field_type' => 'input',
				),
			),
			'allowed_symbols'  => array(
				'label'           => esc_html__( 'Allowed Symbols', 'et_core' ),
				'description'     => esc_html__( 'You can validate certain types of information by disallowing certain symbols. Symbols added here will prevent the form from being submitted if added by the user.', 'et_core' ),
				'type'            => 'select',
				'default'         => 'all',
				'options'         => array(
					'all'          => esc_html__( 'All', 'et_core' ),
					'letters'      => esc_html__( 'Letters Only (A-Z)', 'et_core' ),
					'numbers'      => esc_html__( 'Numbers Only (0-9)', 'et_core' ),
					'alphanumeric' => esc_html__( 'Alphanumeric Only (A-Z, 0-9)', 'et_core' ),
				),
				'option_category' => 'basic_option',
				'toggle_slug'     => 'field_options',
				'show_if'         => array(
					'field_type' => 'input',
				),
			),
			'required_mark'    => array(
				'label'           => esc_html__( 'Required Field', 'et_core' ),
				'type'            => 'yes_no_button',
				'option_category' => 'configuration',
				'default'         => 'on',
				'options'         => array(
					'on'  => esc_html__( 'Yes', 'et_core' ),
					'off' => esc_html__( 'No', 'et_core' ),
				),
				'description'     => esc_html__( 'Define whether the field should be required or optional', 'et_core' ),
				'toggle_slug'     => 'field_options',
				'show_if_not'     => array(
					'email_provider' => 'getresponse',
				),
			),
			'hidden'           => array(
				'label'           => esc_html__( 'Hidden Field', 'et_core' ),
				'type'            => 'yes_no_button',
				'option_category' => 'configuration',
				'default'         => 'off',
				'options'         => array(
					'on'  => esc_html__( 'Yes', 'et_core' ),
					'off' => esc_html__( 'No', 'et_core' ),
				),
				'description'     => esc_html__( 'Define whether or not the field should be visible.', 'et_core' ),
				'toggle_slug'     => 'field_options',
				'readonly_if'     => array(
					$readonly_dependency => self::$_predefined_custom_field_support,
				),
				'readonly_if_not' => array(
					$readonly_dependency => self::$_any_custom_field_type_support,
				),
			),
			'fullwidth_field'  => array(
				'label'           => esc_html__( 'Make Fullwidth', 'et_core' ),
				'type'            => 'yes_no_button',
				'option_category' => 'layout',
				'options'         => array(
					'on'  => esc_html__( 'Yes', 'et_core' ),
					'off' => esc_html__( 'No', 'et_core' ),
				),
				'tab_slug'        => 'advanced',
				'toggle_slug'     => 'layout',
				'description'     => esc_html__( 'If enabled, the field will take 100% of the width of the form, otherwise it will take 50%', 'et_core' ),
				'default'         => array( 'parent:layout', array(
					'left_right' => 'on',
					'right_left' => 'on',
					'top_bottom' => 'off',
					'bottom_top' => 'off',
				)),
			),
		) );

		if ( 'builder' === self::$owner ) {
			$fields = array_merge( $fields, array(
				'field_background_color'     => array(
					'label'        => esc_html__( 'Field Background Color', 'et_core' ),
					'description'  => esc_html__( "Pick a color to fill the module's input fields.", 'et_core' ),
					'type'         => 'color-alpha',
					'custom_color' => true,
					'toggle_slug'  => 'form_field',
					'tab_slug'     => 'advanced',
				),
				'conditional_logic'          => array(
					'label'           => esc_html__( 'Enable', 'et_core' ),
					'type'            => 'yes_no_button',
					'option_category' => 'layout',
					'default'         => 'off',
					'options'         => array(
						'on'  => esc_html__( 'Yes', 'et_core' ),
						'off' => esc_html__( 'No', 'et_core' ),
					),
					'description'     => et_get_safe_localization( __( "Enabling conditional logic makes this field only visible when any or all of the rules below are fulfilled<br><strong>Note:</strong> Only fields with an unique and non-empty field ID can be used", 'et_core' ) ),
					'toggle_slug'     => 'conditional_logic',
				),
				'conditional_logic_relation' => array(
					'label'           => esc_html__( 'Relation', 'et_core' ),
					'type'            => 'yes_no_button',
					'option_category' => 'layout',
					'options'         => array(
						'on'  => esc_html__( 'All', 'et_core' ),
						'off' => esc_html__( 'Any', 'et_core' ),
					),
					'default'         => 'off',
					'button_options'  => array(
						'button_type' => 'equal',
					),
					'description'     => esc_html__( 'Choose whether any or all of the rules should be fulfilled', 'et_core' ),
					'toggle_slug'     => 'conditional_logic',
					'show_if'         => array(
						'conditional_logic' => 'on',
					),
				),
				'conditional_logic_rules'    => array(
					'label'           => esc_html__( 'Rules', 'et_core' ),
					'description'     => esc_html__( 'Conditional logic rules can be used to hide and display different input fields conditionally based on how the visitor has interacted with different inputs.', 'et_core' ),
					'type'            => 'conditional_logic',
					'option_category' => 'layout',
					'depends_show_if' => 'on',
					'toggle_slug'     => 'conditional_logic',
					'show_if'         => array(
						'conditional_logic' => 'on',
					),
				),
			) );
		}

		if ( 'bloom' === self::$owner ) {
			foreach ( $fields as $field_slug => &$field ) {
				if ( 'use_custom_fields' !== $field_slug ) {
					self::$_->array_set( $field, 'show_if.use_custom_fields', 'on' );
				}
			}
		}

		return $fields;
	}

	protected static function _predefined_custom_field_select( $custom_fields, $provider, $account_name, $list_id = '' ) {
		$is_builder = 'builder' === self::$owner;
		$is_bloom   = 'bloom' === self::$owner;
		$dependency = $is_builder ? 'parentModule:provider' : 'email_provider';
		$show_if    = array(
			$dependency => $provider,
		);

		if ( $is_bloom ) {
			$show_if['account_name'] = $account_name;
		}

		if ( $list_id && $is_builder ) {
			$dependency             = "parentModule:{$provider}_list";
			$show_if[ $dependency ] = "{$account_name}|{$list_id}";
		} else if ( $list_id && $is_bloom ) {
			$show_if['email_list'] = (string) $list_id;
		}

		$options = array( 'none' => esc_html__( 'Choose a field...', 'et_core' ) );

		foreach ( $custom_fields as $field ) {
			$field_id             = isset( $field['group_id'] ) ? $field['group_id'] : $field['field_id'];
			$options[ $field_id ] = $field['name'];
		}

		return array(
			'label'       => esc_html__( 'Field', 'et_core' ),
			'type'        => 'select',
			'options'     => $options,
			'order'       => array_keys( $options ),
			'show_if'     => $show_if,
			'toggle_slug' => 'main_content',
			'default'     => 'none',
			'description' => esc_html__( 'Choose a custom field. Custom fields must be defined in your email provider account.', 'et_core' ),
		);
	}

	/**
	 * Get field definitions
	 *
	 * @since 3.10
	 *
	 * @param string $type Accepts 'custom_field'
	 * @param string $for Accepts 'builder', 'bloom'
	 *
	 * @return array
	 */
	public static function get_definitions( $for, $type = 'custom_field' ) {
		self::$owner = $for;
		$fields      = array();

		if ( 'custom_field' === $type ) {
			$fields = self::_custom_field_definitions();
		}

		return $fields;
	}

	public static function initialize() {
		self::$_          = ET_Core_Data_Utils::instance();
		self::$_providers = ET_Core_API_Email_Providers::instance();

		self::$_predefined_custom_field_support = array_keys( self::$_providers->names_by_slug( 'all', 'predefined_custom_fields' ) );
		self::$_any_custom_field_type_support   = self::$_providers->names_by_slug( 'all', 'any_custom_field_type' );
	}
}


ET_Core_API_Email_Fields::initialize();
api/email/ActiveCampaign.php000064400000020236152336022500011771 0ustar00<?php

/**
 * Wrapper for ActiveCampaign's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_ActiveCampaign extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $name = 'ActiveCampaign';

	/**
	 * @inheritDoc
	 */
	public $slug = 'activecampaign';

	/**
	 * @inheritDoc
	 */
	public $uses_oauth = false;

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		// These general / default fields are static (it can not be edited or deleted in the ActiveCampaign dashboard) and not returned by the rest API,
		// so just add it here as the default custom fields for ActiveCampaign.
		$fields = array(
			'%phone%'              => array(
				'field_id' => '%phone%',
				'hidden'   => false,
				'name'     => 'Phone',
				'type'     => 'input',
			),
			'%customer_acct_name%' => array(
				'field_id' => '%customer_acct_name%',
				'hidden'   => false,
				'name'     => 'Account',
				'type'     => 'input',
			),
		);

		foreach ( $list['fields'] as $field ) {
			$field    = $this->transform_data_to_our_format( $field, 'custom_field' );
			$field_id = $field['field_id'];
			$type     = $field['type'];

			$field['type'] = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'text' );

			if ( isset( $field['options'] ) ) {
				$options = array();

				foreach ( $field['options'] as $option ) {
					$option = $this->transform_data_to_our_format( $option, 'custom_field_option' );
					$id     = $option['id'];

					$options[ $id ] = $option['name'];
				}

				$field['options'] = $options;
			}

			$fields[ $field_id ] = $field;
		}

		return $fields;
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( 'checkbox' === $this->data['custom_fields'][ $field_id ]['type'] ) {
					$value = implode( '||', $value );
					$value = "||{$value}||";
				} else {
					$value = array_pop( $value );
				}
			}

			// Check if the custom field is an ActiveCampaign general field,
			// it should be posted as dedicated param instead of `field[{$field_id},0]` param.
			if ( preg_match( '/%(.*)%/', $field_id, $matches ) ) {
				self::$_->array_set( $args, $matches[1], $value );
			} else {
				self::$_->array_set( $args, "field[{$field_id},0]", $value );
			}
		}

		return $args;
	}

	/**
	 * Returns the requests URL for the account assigned to this class instance.
	 *
	 * @return string
	 */
	protected function _get_requests_url() {
		$base_url = untrailingslashit( $this->data['api_url'] );

		return "{$base_url}/admin/api.php";
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
			'api_url' => array(
				'label'               => esc_html__( 'API URL', 'et_core' ),
				'apply_password_mask' => false,
			),
			'form_id' => array(
				'label'               => esc_html__( 'Form ID', 'et_core' ),
				'not_required'        => true,
				'apply_password_mask' => false,
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'                => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => 'subscriber_count',
			),
			'subscriber'          => array(
				'email'         => 'email',
				'last_name'     => 'last_name',
				'name'          => 'first_name',
				'custom_fields' => 'custom_fields',
			),
			'error'               => array(
				'error_message' => 'result_message',
			),
			'custom_field'        => array(
				'field_id' => 'id',
				'name'     => 'title',
				'type'     => 'type',
				'hidden'   => '!visible',
				'options'  => 'options',
			),
			'custom_field_option' => array(
				'id'   => 'value',
				'name' => 'name',
			),
			'custom_field_type'   => array(
				// Us <=> Them
				'checkbox' => 'checkbox',
				'radio'    => 'radio',
				'textarea' => 'textarea',
				'hidden'   => 'hidden',
				// Us => Them
				'select'   => 'dropdown',
				'input'    => 'text',
				// Them => Us
				'dropdown' => 'select',
				'text'     => 'input',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) || empty( $this->data['api_url'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$query_args = array(
			'api_key'       => $this->data['api_key'],
			'api_action'    => 'list_list',
			'api_output'    => 'json',
			'ids'           => 'all',
			'full'          => '1',
			'global_fields' => '1',
		);

		$request_url = add_query_arg( $query_args, $this->_get_requests_url() );
		$request_url = esc_url_raw( $request_url, array( 'https' ) );

		$this->prepare_request( $request_url );
		$this->request->HEADERS['Content-Type'] = 'application/x-www-form-urlencoded';

		parent::fetch_subscriber_lists();

		if ( $this->response->ERROR ) {
			return $this->get_error_message();
		}

		$lists = array();

		foreach ( $this->response->DATA as $key => $list_data ) {
			if ( ! is_numeric( $key ) ) {
				continue;
			}

			if ( ! empty( $list_data ) ) {
				$lists[] = $list_data;
			}
		}

		$this->data['lists']         = $this->_process_subscriber_lists( $lists );
		$this->data['custom_fields'] = $this->_fetch_custom_fields( '', array_shift( $this->response->DATA ) );
		$this->data['is_authorized'] = 'true';

		$this->save_data();

		et_debug($this->data);

		return 'success';
	}

	/**
	 * Get ActiveCampaign subscriber info by email.
	 *
	 * @param string $email
	 *
	 * @return array
	 */
	public function get_subscriber( $email ) {
		$query_args = array(
			'api_key'    => $this->data['api_key'],
			'api_action' => 'subscriber_view_email',
			'api_output' => 'json',
			'email'      => $email,
		);

		// Build request URL. This action only accept GET method.
		$request_url = add_query_arg( $query_args, $this->_get_requests_url() );
		$request_url = esc_url_raw( $request_url, array( 'https' ) );

		// Prepare and send the request.
		$this->prepare_request( $request_url );
		$this->request->HEADERS['Content-Type'] = 'application/x-www-form-urlencoded';
		$this->make_remote_request();

		// Ensure no error happen and it's included in one of the lists.
		$list_id     = self::$_->array_get( $this->response->DATA, 'listid', false );
		$result_code = self::$_->array_get( $this->response->DATA, 'result_code', false );
		if ( $this->response->ERROR || ! $list_id || ! $result_code ) {
			return false;
		}

		return $this->response->DATA;
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url= '' ) {
		// Ensure to skip subscribe action if current email already subscribed.
		$subscriber_data  = $this->get_subscriber( $args['email'] );
		$subscriber_lists = self::$_->array_get( $subscriber_data, 'lists', array() );
		$subscriber_list  = self::$_->array_get( $subscriber_lists, $args['list_id'], false );
		if ( $subscriber_list ) {
			return 'success';
		}

		$list_id_key    = 'p[' . $args['list_id'] . ']';
		$status_key     = 'status[' . $args['list_id'] . ']';
		$responders_key = 'instantresponders[' . $args['list_id'] . ']';
		$list_id        = $args['list_id'];

		$args = $this->transform_data_to_provider_format( $args, 'subscriber', array( 'list_id' ) );
		$args = $this->_process_custom_fields( $args );

		$query_args = array(
			'api_key'    => $this->data['api_key'],
			'api_action' => 'contact_sync',
			'api_output' => 'json',
		);

		$url = esc_url_raw( add_query_arg( $query_args, $this->_get_requests_url() ) );

		$args[ $list_id_key ]    = $list_id;
		$args[ $status_key ]     = 1;
		$args[ $responders_key ] = 1;

		if ( ! empty( $this->data['form_id'] ) ) {
			$args['form'] = (int) $this->data['form_id'];
		}

		$this->prepare_request( $url, 'POST', false, $args );
		$this->request->HEADERS['Content-Type'] = 'application/x-www-form-urlencoded';

		return parent::subscribe( $args, $url );
	}
}
api/email/SendinBlue.php000064400000020354152336022500011147 0ustar00<?php

/**
 * Wrapper for SendinBlue's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_SendinBlue extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://api.sendinblue.com/v3'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name.

	/**
	 * @inheritDoc
	 */
	public $FIELDS_URL = 'https://api.sendinblue.com/v3/contacts/attributes'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name.

	/**
	 * @inheritDoc
	 */
	public $LISTS_URL = 'https://api.sendinblue.com/v3/contacts/lists/'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name.

	/**
	 * The URL to which new subscribers can be posted.
	 *
	 * @var string
	 */
	public $SUBSCRIBE_URL = 'https://api.sendinblue.com/v3/contacts'; // @phpcs:ignore ET.Sniffs.ValidVariableName.PropertyNotSnakeCase -- Keep the variable name.

	/**
	 * The URL to get the subscriber information.
	 * Only used by legacy mode (v2) to check whether we should create or update subscription.
	 *
	 * @var string
	 */
	public $USERS_URL = 'https://api.sendinblue.com/v2.0/user';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'SendinBlue';

	/**
	 * @inheritDoc
	 */
	public $slug = 'sendinblue';

	/**
	 * @inheritDoc
	 */
	public $uses_oauth = false;

	public function __construct( $owner, $account_name, $api_key = '' ) {
		parent::__construct( $owner, $account_name, $api_key );

		$this->_maybe_set_custom_headers();
	}

	protected function _maybe_set_custom_headers() {
		if ( empty( $this->custom_headers ) && isset( $this->data['api_key'] ) ) {
			$this->custom_headers = array( 'api-key' => $this->data['api_key'] );
		}
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields      = $args['custom_fields'];
		$fileds_info = $args['fileds_info'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( ! isset( $fileds_info[ $field_id ] ) ) {
				continue;
			}

			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$type = self::$_->array_get( $fileds_info, "{$field_id}.native_type" );

					// User checked the checkbox, when native type is Boolean.
					$value = 'boolean' === $type ? true : array_pop( $value );
				}
			}

			self::$_->array_set( $args, "attributes.{$field_id}", $value );
		}

		return $args;
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'api_key' => array(
				'label' => esc_html__( 'API Key', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'         => array(
				'list_id'           => 'id',
				'name'              => 'name',
				'subscribers_count' => $this->_should_use_legacy_api() ? 'total_subscribers' : 'totalSubscribers',
			),
			'subscriber'   => array(
				'email'         => 'email',
				'name'          => 'attributes.FIRSTNAME',
				'last_name'     => 'attributes.LASTNAME',
				'list_id'       => $this->_should_use_legacy_api() ? '@listid' : '@listIds',
				'custom_fields' => 'custom_fields',
				'updateEnabled' => 'updateEnabled',
			),
			'custom_field' => array(
				'native_type' => 'type',
				'field_id'    => 'name',
				'name'        => 'name',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	public function get_subscriber( $email ) {
		$this->prepare_request( "{$this->USERS_URL}/{$email}", 'GET' );
		$this->make_remote_request();

		if ( $this->response->ERROR || ! isset( $this->response->DATA['listid'] ) ) {
			return false;
		}

		if ( isset( $this->response->DATA['code'] ) && 'success' !== $this->response->DATA['code'] ) {
			return false;
		}

		return $this->response->DATA;
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['api_key'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		if ( empty( $this->custom_headers ) ) {
			$this->_maybe_set_custom_headers();
		}

		$use_legacy_api = $this->_should_use_legacy_api();
		if ( $use_legacy_api ) {
			$this->LISTS_URL         = 'https://api.sendinblue.com/v2.0/list'; // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Keep the variable name.
			$this->response_data_key = 'data';
			$params                  = array(
				'page'       => 1,
				'page_limit' => 2,
			);
		} else {
			$this->response_data_key = 'lists';
			$params                  = array();
		}

		/**
		 * The maximum number of subscriber lists to request from Sendinblue's API.
		 *
		 * @since 4.11.4
		 *
		 * @param int $max_lists
		 */
		$max_lists = (int) apply_filters( 'et_core_api_email_sendinblue_max_lists', 50 );
		$url       = "{$this->LISTS_URL}?limit={$max_lists}&offset=0&sort=desc";

		$this->prepare_request( $url, 'GET', false, $params );

		$this->request->data_format = 'body';

		parent::fetch_subscriber_lists();

		if ( $this->response->ERROR ) {
			return $this->response->ERROR_MESSAGE;
		}

		if ( isset( $this->response->DATA['code'] ) && 'success' !== $this->response->DATA['code'] ) {
			return $this->response->DATA['message'];
		}

		$result                      = 'success';
		$this->data['is_authorized'] = 'true';
		$list_data                   = $use_legacy_api ? $this->response->DATA['data']['lists'] : ( isset( $this->response->DATA['lists'] ) ? $this->response->DATA['lists'] : [] );

		if ( ! empty( $list_data ) ) {
			$this->data['lists'] = $this->_process_subscriber_lists( $list_data );
			$this->save_data();
		}

		return $result;
	}

	/**
	 * Get custom fields for a subscriber list.
	 * Need to override the method in the child class to dynamically use the API endpoint
	 * and response_data_key based on the API version being used.
	 *
	 * @param int|string $list_id The list ID.
	 * @param array      $list    The lists array.
	 *
	 * @return array
	 */
	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		if ( $this->_should_use_legacy_api() ) {
			$this->FIELDS_URL        = 'https://api.sendinblue.com/v2.0/attribute/normal'; // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Keep the variable name.
			$this->response_data_key = 'data';
		} else {
			$this->response_data_key = 'attributes';
		}

		return parent::_fetch_custom_fields( $list_id, $list );
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		$args['list_id'] = array( absint( $args['list_id'] ) ); // in V3 the list id has to be integer.
		if ( $this->_should_use_legacy_api() ) {
			$this->SUBSCRIBE_URL = 'https://api.sendinblue.com/v2.0/user/createdituser'; // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Keep the variable name.
			$existing_user       = $this->get_subscriber( $args['email'] );
			if ( false !== $existing_user ) {
				$args['list_id'] = array_unique( array_merge( $args['list_id'], $existing_user['listid'] ) );
			}
		} else {
			$args['updateEnabled'] = true; // Update existing contact if exists.
			// Process data and encode to json, the new API (v3) uses json encoded body params.
			if ( ! in_array( 'ip_address', $args, true ) || 'true' === $args['ip_address'] ) {
				$args['ip_address'] = et_core_get_ip_address();
			} elseif ( 'false' === $args['ip_address'] ) {
				$args['ip_address'] = '0.0.0.0';
			}

			$args = $this->transform_data_to_provider_format( $args, 'subscriber' );
			if ( $this->custom_fields ) {
				$args['fileds_info'] = $this->_fetch_custom_fields();

				$args = $this->_process_custom_fields( $args );
			}
			$this->prepare_request( $this->SUBSCRIBE_URL, 'POST', false, $args, true ); // @phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- Keep the variable name.
		}

		return parent::subscribe( $args, $this->SUBSCRIBE_URL );
	}

	/**
	 * Check if the api-key being used is legacy (v2).
	 *
	 * @return boolean
	 */
	protected function _should_use_legacy_api() {
		$api_key = isset( $this->data['api_key'] ) ? $this->data['api_key'] : '';
		return ! empty( $api_key ) && 'xkeysib-' !== substr( $api_key, 0, 8 );
	}
}
api/email/iContact.php000064400000015607152336022500010670 0ustar00<?php

/**
 * Wrapper for iContact's API.
 *
 * @since   1.1.0
 *
 * @package ET\Core\API\Email
 */
class ET_Core_API_Email_iContact extends ET_Core_API_Email_Provider {

	/**
	 * @inheritDoc
	 */
	public $BASE_URL = 'https://app.icontact.com/icp/a';

	/**
	 * @inheritDoc
	 */
	public $custom_fields_scope = 'account';

	/**
	 * @inheritDoc
	 */
	public $name = 'iContact';

	/**
	 * @inheritDoc
	 */
	public $slug = 'icontact';

	protected function _fetch_custom_fields( $list_id = '', $list = array() ) {
		$this->prepare_request( $this->FIELDS_URL );
		$this->make_remote_request();

		$result = array();

		if ( $this->response->ERROR ) {
			et_debug( $this->get_error_message() );

			return $result;
		}

		$data = $this->response->DATA['customfields'];

		foreach ( $data as &$custom_field ) {
			$custom_field = $this->transform_data_to_our_format( $custom_field, 'custom_field' );
		}

		$fields = array();

		foreach ( $data as $field ) {
			if ( 'text' !== $field['type'] ) {
				continue;
			}

			$field_id = $field['field_id'];
			$type     = self::$_->array_get( $field, 'type', 'any' );

			$field['type'] = self::$_->array_get( $this->data_keys, "custom_field_type.{$type}", 'any' );

			$fields[ $field_id ] = $field;
		}

		return $fields;
	}

	protected function _set_custom_headers() {
		if ( ! empty( $this->custom_headers ) ) {
			return;
		}

		$this->custom_headers = array(
			'Accept'       => 'application/json',
			'API-Version'  => '2.2',
			'API-AppId'    => sanitize_text_field( $this->data['client_id'] ),
			'API-Username' => sanitize_text_field( $this->data['username'] ),
			'API-Password' => sanitize_text_field( $this->data['password'] ),
		);
	}

	protected function _get_account_id() {
		if ( ! empty( $this->data['account_id'] ) ) {
			return $this->data['account_id'];
		}

		$this->prepare_request( 'https://app.icontact.com/icp/a' );
		$this->make_remote_request();

		if ( isset( $this->response->DATA['accounts'][0]['accountId'] ) ) {
			$this->data['account_id'] = $this->response->DATA['accounts'][0]['accountId'];
		}

		return $this->data['account_id'];
	}

	protected function _get_subscriber( $args, $exclude = null ) {
		$default_excludes = array( 'name', 'last_name' );

		if ( is_array( $exclude ) ) {
			$exclude = array_merge( $default_excludes, $exclude );
		} else if ( $exclude ) {
			$default_excludes[] = $exclude;
			$exclude            = $default_excludes;
		}

		$args = $this->transform_data_to_provider_format( $args, 'subscriber', $exclude );
		$url  = add_query_arg( $args, $this->SUBSCRIBERS_URL );

		$this->prepare_request( $url );
		$this->make_remote_request();

		if ( $this->response->ERROR || ! $this->response->DATA['contacts'] ) {
			return false;
		}

		return $this->response->DATA['contacts'][0];
	}

	protected function _get_folder_id() {
		if ( ! empty( $this->data['folder_id'] ) ) {
			return $this->data['folder_id'];
		}

		$this->prepare_request( "{$this->BASE_URL}/{$this->data['account_id']}/c" );
		$this->make_remote_request();

		if ( isset( $this->response->DATA['clientfolders'][0]['clientFolderId'] ) ) {
			$this->data['folder_id'] = $this->response->DATA['clientfolders'][0]['clientFolderId'];
		}

		return $this->data['folder_id'];
	}

	protected function _process_custom_fields( $args ) {
		if ( ! isset( $args['custom_fields'] ) ) {
			return $args;
		}

		$fields = $args['custom_fields'];

		unset( $args['custom_fields'] );

		foreach ( $fields as $field_id => $value ) {
			if ( is_array( $value ) && $value ) {
				// This is a multiple choice field (eg. checkbox, radio, select)
				$value = array_values( $value );

				if ( count( $value ) > 1 ) {
					$value = implode( ',', $value );
				} else {
					$value = array_pop( $value );
				}
			}

			self::$_->array_set( $args, $field_id, $value );
		}

		return $args;
	}

	protected function _set_urls() {
		$this->_set_custom_headers();

		$account_id = $this->_get_account_id();
		$folder_id  = $this->_get_folder_id();

		$this->BASE_URL        = "{$this->BASE_URL}/{$account_id}/c/{$folder_id}";
		$this->FIELDS_URL      = "{$this->BASE_URL}/customfields";
		$this->LISTS_URL       = "{$this->BASE_URL}/lists";
		$this->SUBSCRIBE_URL   = "{$this->BASE_URL}/subscriptions";
		$this->SUBSCRIBERS_URL = "{$this->BASE_URL}/contacts";
	}

	/**
	 * @inheritDoc
	 */
	public function get_account_fields() {
		return array(
			'client_id' => array(
				'label' => esc_html__( 'App ID', 'et_core' ),
			),
			'username'  => array(
				'label' => esc_html__( 'Username', 'et_core' ),
			),
			'password'  => array(
				'label' => esc_html__( 'App Password', 'et_core' ),
			),
		);
	}

	/**
	 * @inheritDoc
	 */
	public function get_data_keymap( $keymap = array() ) {
		$keymap = array(
			'list'              => array(
				'list_id'           => 'listId',
				'name'              => 'name',
				'subscribers_count' => 'total',
			),
			'subscriber'        => array(
				'name'          => 'firstName',
				'last_name'     => 'lastName',
				'email'         => 'email',
				'list_id'       => 'listId',
				'custom_fields' => 'custom_fields',
			),
			'subscriptions'     => array(
				'list_id'    => 'listId',
				'message_id' => 'confirmationMessageId',
			),
			'custom_field'      => array(
				'field_id' => 'privateName',
				'name'     => 'publicName',
				'type'     => 'fieldType',
				'hidden'   => '!displayToUser',
			),
		);

		return parent::get_data_keymap( $keymap );
	}

	/**
	 * @inheritDoc
	 */
	public function fetch_subscriber_lists() {
		if ( empty( $this->data['client_id'] ) || empty( $this->data['username'] ) || empty( $this->data['password'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_set_urls();

		$this->response_data_key = 'lists';

		return parent::fetch_subscriber_lists();
	}

	/**
	 * @inheritDoc
	 */
	public function subscribe( $args, $url = '' ) {
		if ( empty( $this->data['client_id'] ) || empty( $this->data['username'] ) || empty( $this->data['password'] ) ) {
			return $this->API_KEY_REQUIRED;
		}

		$this->_set_urls();

		if ( $this->_get_subscriber( $args ) ) {
			// Subscriber exists and is already subscribed to the list.
			return 'success';
		}

		if ( ! $contact = $this->_get_subscriber( $args, 'list_id' ) ) {
			// Create new contact
			$body = $this->transform_data_to_provider_format( $args, 'subscriber' );
			$body = $this->_process_custom_fields( $body );

			$this->prepare_request( $this->SUBSCRIBERS_URL, 'POST', false, array( $body ), true );
			$this->make_remote_request();

			if ( $this->response->ERROR ) {
				return $this->get_error_message();
			}

			$contact = $this->response->DATA['contacts'][0];
		}

		// Subscribe contact to list
		$body              = $this->transform_data_to_provider_format( $args, 'subscriptions' );
		$body['contactId'] = $contact['contactId'];
		$body['status']    = isset( $args['message_id'] ) ? 'pending' : 'normal';

		$this->prepare_request( $this->SUBSCRIBE_URL, 'POST', false, array( $body ), true );

		return parent::subscribe( $args, $this->SUBSCRIBE_URL );
	}
}
Updates.php000064400000106110152336022500006657 0ustar00<?php
// phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect, Generic.WhiteSpace.ScopeIndent.IncorrectExact -- Until we reformat this entire file, this rule makes reviewing PRs very difficult.
if ( ! class_exists( 'ET_Core_Updates' ) ):
/**
 * Handles the updates workflow.
 *
 * @private
 *
 * @package ET\Core\Updates
 */
final class ET_Core_Updates {
	protected $core_url;
	protected $options;
	protected $account_status;
	protected $product_version;
	protected $all_et_products_domains;
	protected $upgrading_et_product;
	protected $up_to_date_products_data;

	// class version
	protected $version;

	// Is a product being upgraded in the current API request.
	protected $upgraded_a_product = false;

	private static $_this;

	function __construct( $core_url, $product_version ) {
		global $wp_version;

		// Don't allow more than one instance of the class
		if ( isset( self::$_this ) ) {
			wp_die( sprintf( esc_html__( '%s: You cannot create a second instance of this class.', 'et-core' ),
				esc_html( get_class( $this ) )
			) );
		}

		self::$_this = $this;

		$this->core_url = $core_url;
		$this->version  = '1.2';

		$this->up_to_date_products_data = array();

		$this->product_version = $product_version;

		$this->get_options();

		$this->upgrading_et_product = false;

		$this->update_product_domains();

		$this->maybe_force_update_requests();

		add_filter( 'wp_prepare_themes_for_js', array( $this, 'replace_theme_update_notification' ) );
		add_filter( 'upgrader_package_options', array( $this, 'check_upgrading_product' ) );

		// The 4th parameter, $hook_extra was added in WordPress 5.5.0.
		if ( version_compare( $wp_version, '5.5.0', '>=' ) ) {
			add_filter( 'upgrader_pre_download', array( $this, 'update_error_message' ), 20, 4 );
		} else {
			add_filter( 'upgrader_pre_download', array( $this, 'update_error_message' ), 20, 3 );
		}

		add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_plugins_updates' ) );
		add_filter( 'plugins_api', array( $this, 'maybe_modify_plugins_changelog' ), 20, 3 );

		add_filter( 'pre_set_site_transient_update_themes', array( $this, 'check_themes_updates' ) );

		add_filter( 'self_admin_url', array( $this, 'change_plugin_changelog_url' ), 10, 2 );
		add_filter( 'admin_url', array( $this, 'change_plugin_changelog_url' ), 10, 2 );
		add_filter( 'network_admin_url', array( $this, 'change_plugin_changelog_url' ), 10, 2 );

		add_action( 'admin_notices', array( $this, 'maybe_show_account_notice' ) );

		add_action( 'admin_enqueue_scripts', array( $this, 'load_scripts_styles' ) );

		add_action( 'plugins_loaded', array( $this, 'remove_updater_plugin_actions' ), 30 );

		add_action( 'after_setup_theme', array( $this, 'remove_theme_update_actions' ), 11 );

		add_action( 'admin_init', array( $this, 'remove_plugin_update_actions' ) );

		add_action( 'update_site_option_et_automatic_updates_options', array( $this, 'force_update_requests' ) );
		add_action( 'update_option_et_automatic_updates_options', array( $this, 'force_update_requests' ) );

		add_action( 'deleted_site_transient', array( $this, 'maybe_reset_et_products_update_transient' ) );

		add_action( 'upgrader_process_complete', array( $this, 'upgraded_a_product' ), 9, 0 );
	}

	function check_upgrading_product( $options ) {
		if ( ! isset( $options['hook_extra'] ) ) {
			return $options;
		}

		$hook_name = isset( $options['hook_extra']['plugin'] ) ? 'plugin' : 'theme';

		// set the upgrading_et_product flag if one of ET plugins or themes is about to upgrade
		if ( isset( $options['hook_extra'][ $hook_name ] ) && in_array( $options['hook_extra'][ $hook_name ], $this->all_et_products_domains[ $hook_name ] ) ) {
			$this->upgrading_et_product = true;
		}

		return $options;
	}

	function maybe_append_custom_notification( $plugin_data, $response ) {
		if ( empty( $response ) ) {
			$package_available = false;
		} else {
			// for themes response is array for plugins - object, so check the format of data to get the correct results
			$package_available = is_array( $response ) ? ! empty( $response['package'] ) : ! empty( $response->package );
		}

		if ( $package_available ) {
			return;
		}

		$message = empty( $custom_message = $this->get_custom_update_notification_message( $plugin_data['url'] ) )
			? et_get_safe_localization( __( 'For all Elegant Themes products, please <a href="https://www.elegantthemes.com/documentation/divi/update-divi/" target="_blank">authenticate your subscription</a> via the Updates tab in your theme & plugin settings to enable product updates. Make sure that your Username and API Key have been entered correctly.', 'et-core' ) )
			: $custom_message;
		echo "</p><p>{$message}";
	}

	/**
	 * Check if we need to force update options removal in case a customer clicked on "Check Again" button
	 * in the notification area.
	 */
	function maybe_force_update_requests() {
		if ( wp_doing_ajax() ) {
			return;
		}

		if ( empty( $_GET['et_action'] ) || 'update_account_details' !== $_GET['et_action'] ) {
			return;
		}

		if ( empty( $_GET['et_update_account_details_nonce'] ) || ! wp_verify_nonce( $_GET['et_update_account_details_nonce'], 'et_update_account_details' )
		) {
			return;
		}

		$this->force_update_requests();
	}

	function get_custom_update_notification_message( $update_message ) {
		$is_valid_api_key_status = empty( $account_api_key_status = get_site_option( 'et_account_api_key_status' ) ) || 'invalid' !== $account_api_key_status;

		if ( $is_valid_api_key_status && false !== strpos( $update_message, '/wp-json/api/v1/changelog/product_id/' ) ) {
			return et_get_safe_localization( __( '<em>The license for this Divi Marketplace product has expired. Please <a target="_blank" href="https://www.elegantthemes.com/members-area/marketplace/">renew the license</a> to continue receiving product updates and support.</em>', 'et-core' ) );
		}

		if ( false !== strpos( $update_message, 'Automatic update is unavailable for this theme' ) ) {
			return 'expired' === $this->account_status
				? et_get_safe_localization( __( '<em>Your Elegant Themes subscription has expired. You must <a href="https://www.elegantthemes.com/members-area/renew/" target="_blank">renew your account</a> to regain access to product updates and support.</em>', 'et-core' ) )
				: et_get_safe_localization( __( '<em>Before you can receive product updates, you must first authenticate your Elegant Themes subscription. To do this, you need to enter both your Elegant Themes Username and your Elegant Themes API Key into the Updates Tab in your theme and plugin settings. To locate your API Key, <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">log in</a> to your Elegant Themes account and navigate to the <strong>Account > API Key</strong> page. <a href="https://www.elegantthemes.com/documentation/divi/update-divi/" target="_blank">Learn more here</a></em>. If you still get this message, please make sure that your Username and API Key have been entered correctly', 'et-core' ) );
		}

		return '';
	}

	function replace_theme_update_notification( $themes_array ) {
		if ( empty( $themes_array ) ) {
			return $themes_array;
		}

		if ( empty( $this->all_et_products_domains['theme'] ) ) {
			return $themes_array;
		}

		foreach ( $themes_array as $id => $theme_data ) {
			// replace default error message with custom message for ET themes.
			if ( ! in_array( $id, $this->all_et_products_domains['theme'] )
				|| false === strpos( $theme_data['update'], 'Automatic update is unavailable for this theme' ) ) {
				continue;
			}

			if ( ! empty( $custom_message = $this->get_custom_update_notification_message( $theme_data['update'] ) ) ) {
				$themes_array[ $id ]['update'] = sprintf(
					'<p>%1$s<br/> %2$s</p>',
					$theme_data['update'],
					$custom_message
				);
			}
		}

		return $themes_array;
	}

	function update_error_message( $reply, $package, $upgrader, $hook_extra = array() ) {
		if ( ! $this->upgrading_et_product ) {
			return $reply;
		}

		// reset the upgrading_et_product flag
		$this->upgrading_et_product = false;

		if ( ! empty( $package ) ) {
			return $reply;
		}

		$hook_name = ! empty( $hook_extra['theme'] ) ? 'theme' : 'plugin';
		$site_transient = 'theme' === $hook_name ? get_site_transient( 'et_update_themes' ) : get_site_transient( 'et_update_plugins' );

		$changelog_url = '';
		if ( isset( $site_transient->response ) && ! empty( $site_transient->response[ $hook_extra[ $hook_name ] ] ) ) {
			$changelog_url = 'theme' === $hook_name
				? $site_transient->response[ $hook_extra[ $hook_name ] ]['url']
				: $site_transient->response[ $hook_extra[ $hook_name ] ]->url;
		}

		if ( false !== strpos( $changelog_url, '/wp-json/api/v1/changelog/product_id/' ) ) {
			$error_message = $this->get_custom_update_notification_message( $changelog_url );
		} else {
			$error_message = 'expired' === $this->account_status
				? et_get_safe_localization( __( '<em>Your Elegant Themes subscription has expired. You must <a href="https://www.elegantthemes.com/members-area/renew/" target="_blank">renew your account</a> to regain access to product updates and support.</em>', 'et-core' ) )
				: et_get_safe_localization( __( '<em>Before you can receive product updates, you must first authenticate your Elegant Themes subscription. To do this, you need to enter both your Elegant Themes Username and your Elegant Themes API Key into the Updates Tab in your theme and plugin settings. To locate your API Key, <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">log in</a> to your Elegant Themes account and navigate to the <strong>Account > API Key</strong> page. <a href="https://www.elegantthemes.com/documentation/divi/update-divi/" target="_blank">Learn more here</a></em>. If you still get this message, please make sure that your Username and API Key have been entered correctly', 'et-core' ) );
		}

		// output custom error message for ET Products if package is empty

		return new WP_Error( 'no_package', $error_message );
	}

	/**
	 * Get all Elegant Themes products, returned from the API request
	 */
	function get_et_api_products() {
		$products = array(
			'theme'  => array(),
			'plugin' => array(),
		);

		$update_transients = array(
			'et_update_themes',
			'et_update_plugins',
		);

		foreach ( $update_transients as $update_transient_name ) {
			$type = 'et_update_themes' === $update_transient_name ? 'theme' : 'plugin';

			if (
				false !== ( $update_transient = get_site_transient( $update_transient_name ) )
				&& ! empty( $update_transient->response )
				&& is_array( $update_transient->response )
			) {
				$et_product_stylesheet_names = array_keys( $update_transient->response );

				foreach ( $et_product_stylesheet_names as $et_product_stylesheet_name ) {
					$products[ $type ][] = $et_product_stylesheet_name;
				}
			}
		}

		return $products;
	}

	function get_all_et_products() {
		$checked_et_products = $this->get_et_api_products();

		return $checked_et_products;
	}

	function remove_theme_update_actions() {
		remove_filter( 'pre_set_site_transient_update_themes', 'et_check_themes_updates' );
		remove_filter( 'site_transient_update_themes', 'et_add_themes_to_update_notification' );
	}

	function remove_plugin_update_actions() {
		remove_filter( 'pre_set_site_transient_update_plugins', 'et_shortcodes_plugin_check_updates' );
		remove_filter( 'site_transient_update_plugins', 'et_shortcodes_plugin_add_to_update_notification' );
	}

	/**
	 * Removes Updater plugin actions and filters,
	 * so it doesn't make additional requests to API
	 *
	 * @return void
	 */
	function remove_updater_plugin_actions() {
		if ( ! class_exists( 'ET_Automatic_Updates' ) ) {
			return;
		}

		$updates_class = ET_Automatic_Updates::get_this();

		remove_filter( 'after_setup_theme', array( $updates_class, 'remove_default_updates' ), 11 );

		remove_filter( 'init', array( $updates_class, 'remove_default_plugins_updates' ), 20 );

		remove_action( 'admin_notices', array( $updates_class, 'maybe_display_expired_message' ) );
	}

	/**
	 * Returns an instance of the object
	 *
	 * @return object
	 */
	static function get_this() {
		return self::$_this;
	}

	/**
	 * Adds automatic updates data only if Username and API key options are set
	 *
	 * @param array $send_to_api Data sent to server
	 * @return array Modified data set if Username and API key are set, original data if not
	 */
	function maybe_add_automatic_updates_data( $send_to_api ) {
		if ( $this->options && isset( $this->options['username'] ) && isset( $this->options['api_key'] ) ) {
			$send_to_api['automatic_updates'] = 'on';

			$send_to_api['username'] = urlencode( sanitize_text_field( $this->options['username'] ) );
			$send_to_api['api_key']  = sanitize_text_field( $this->options['api_key'] );

			// Add divi_5 parameter if Divi 5 updates are enabled or user is already on Divi 5
			$send_to_api = et_core_maybe_add_divi5_api_parameter( $send_to_api );

			$send_to_api = apply_filters( 'et_add_automatic_updates_data', $send_to_api );
		}

		return $send_to_api;
	}

	/**
	 * Gets plugin options
	 *
	 * @return void
	 */
	function get_options() {
		if ( ! $this->options = get_site_option( 'et_automatic_updates_options' ) ) {
			$this->options = get_option( 'et_automatic_updates_options' );
		}

		if ( ! $this->account_status = get_site_option( 'et_account_status' ) ) {
			$this->account_status = get_option( 'et_account_status' );
		}
	}

	function load_scripts_styles( $hook ) {
		if ( 'plugin-install.php' !== $hook ) {
			return;
		}

		wp_enqueue_style( 'et_core_updates', $this->core_url . 'admin/css/updates.css', array(), $this->product_version );
	}

	function add_up_to_date_products_data( $update_data, $settings = array() ) {
		$settings = $this->process_request_settings( $settings );

		$products_category = $settings['is_plugin_response'] ? 'plugins' : 'themes';

		if ( ! empty( $this->up_to_date_products_data[ $products_category ] ) ) {
			$update_data->no_update = $this->up_to_date_products_data[ $products_category ];
		}

		return $update_data;
	}

	/**
	 * Merges product information from cached et updates transients
	 * to the main WordPress updates transients.
	 *
	 * @param array $update_transient The main WordPress themes or plugins updates transient.
	 * @param array $et_update_products_data The cached et themes or plugins updates transient.
	 * @return array
	 */
	function merge_et_products_response( $update_transient, $et_update_products_data ) {
		// If $et_update_products_data is empty or both its response and no_update arrays are empty, there is no cached data to merge and we can return the main WordPress transient.
		if ( empty( $et_update_products_data ) || ( empty( $et_update_products_data->response ) && empty( $et_update_products_data->no_update ) ) ) {
			return $update_transient; // Return the original transient if true.
		}

		// Fields to merge.
		$merge_data_fields = array(
			'response',
			'no_update',
		);

		// Merge the fields.
		foreach ( $merge_data_fields as $data_field_name ) {
			if ( empty( $et_update_products_data->$data_field_name ) ) {
				continue; // Skip if the field is empty.
			}

			// Get the default response data.
			$default_response_data = ! empty( $update_transient->$data_field_name ) ? $update_transient->$data_field_name : array();

			// Merge the data.
			$update_transient->$data_field_name = array_merge( $default_response_data, (array) $et_update_products_data->$data_field_name );
		}

		// Check if the response array is empty in the cached transient, which is where products that need to be updated are listed. Before merging, we need to make sure the latest version isn't already installed, in which case it needs to be moved to the no_update array.
		if ( ! empty( $et_update_products_data->response ) ) {
			foreach ( $et_update_products_data->response as $product => $data ) {
				// Get the currently installed product version from the primary WordPress update transient.
				$installed_version = isset( $update_transient->checked[ $product ] ) ? $update_transient->checked[ $product ] : null;
				// Get the latest product version from the cached transient, handling both array and object cases.
				if ( is_array( $data ) ) {
					$latest_version = isset( $data['new_version'] ) ? $data['new_version'] : null;
				} elseif ( is_object( $data ) ) {
					$latest_version = isset( $data->new_version ) ? $data->new_version : null;
				}

				// If the currently installed version is the latest version, we need to move the product to the no_update array and remove the product from the response array.
				if ( $installed_version && $latest_version && version_compare( $installed_version, $latest_version, '>=' ) ) {
					$update_transient->no_update[ $product ] = $data;
					unset( $update_transient->response[ $product ] );
				}
			}
		}

		// Now we need to do the opposite. Check if the no_update array is empty in the cached transient, which is where products that don't need to be updated are listed. If an update is required, move the product to the response array.
		if ( ! empty( $et_update_products_data->no_update ) ) {
			foreach ( $et_update_products_data->no_update as $product => $data ) {
				// Get the currently installed product version from the primary WordPress update transient.
				$installed_version = isset( $update_transient->checked[ $product ] ) ? $update_transient->checked[ $product ] : null;
				// Get the latest product version from the cached transient, handling both array and object cases.
				if ( is_array( $data ) ) {
					$latest_version = isset( $data['new_version'] ) ? $data['new_version'] : null;
				} elseif ( is_object( $data ) ) {
					$latest_version = isset( $data->new_version ) ? $data->new_version : null;
				}

				// If the currently installed version is not the latest version, we need to move the product to the response array and remove the product from the no_update array.
				if ( $installed_version && $latest_version && version_compare( $installed_version, $latest_version, '<' ) ) {
					$update_transient->response[ $product ] = $data;
					unset( $update_transient->no_update[ $product ] );
				}
			}
		}

		return $update_transient; // Return the merged transient updated with the most recently cached product info.
	}

	function check_plugins_updates( $update_transient ) {
		global $wp_version;

		if ( ! isset( $update_transient->response ) ) {
			return $update_transient;
		}

		$plugins = [];

		$et_update_plugins = get_site_transient( 'et_update_plugins' );

		// update_plugins transient gets set two times, so we ensure we make a request once
		if (
			! $this->upgraded_a_product
			&& isset( $et_update_plugins->last_checked )
			&& isset( $update_transient->last_checked )
			&& $et_update_plugins->last_checked > ( $update_transient->last_checked - 10 * MINUTE_IN_SECONDS )
		) {
			return $this->merge_et_products_response( $update_transient, $et_update_plugins );
		}

		$_plugins = get_plugins();

		if ( empty( $_plugins ) ) {
			return $update_transient;
		}

		foreach ( $_plugins as $file => $plugin ) {
			$update_uri = isset( $plugin['UpdateURI'] ) ? $plugin['UpdateURI'] : '';
			$is_et_uri  = false !== strpos( $update_uri, 'elegantthemes.com' );

			// Continue to the next iteration if the Update URI
			// is not empty and not using Elegant Themes's domain.
			if ( ! empty( $update_uri ) && ! $is_et_uri ) {
				continue;
			}

			$plugins[ $file ] = $plugin['Version'];
		}

		do_action( 'et_core_updates_before_request' );

		$send_to_api = array(
			'action'            => 'check_all_plugins_updates',
			'installed_plugins' => $plugins,
			'class_version'     => $this->version,
		);

		// Add automatic updates data if Username and API key are set correctly
		$send_to_api = $this->maybe_add_automatic_updates_data( $send_to_api );

		// If we don't have update values cached in the transient, we need to bypass rate limiting.
		if ( $et_update_plugins ) {
			$rate_limit = 'true';
		} else {
			$rate_limit = 'false';
		}

		$options = array(
			'timeout'    => ( ( defined('DOING_CRON') && DOING_CRON ) ? 10 : 3),
			'body'       => $send_to_api,
			'headers'    => array(
				'rate_limit' => $rate_limit,
			),
			'user-agent' => 'WordPress/' . $wp_version . '; Plugin Updates/' . ET_CORE_VERSION . '; ' . home_url( '/' ),
		);

		$last_update = new stdClass();

		$plugins_request = wp_remote_post( 'https://www.elegantthemes.com/api/api.php', $options );

		$plugins_response = [];
		$et_update_plugins_updated = false;

		if ( ! is_wp_error( $plugins_request ) && wp_remote_retrieve_response_code( $plugins_request ) === 200 ){
			$plugins_response = maybe_unserialize( wp_remote_retrieve_body( $plugins_request ) );

			if ( ! empty( $plugins_response ) && is_array( $plugins_response ) ) {
				$et_update_plugins_updated = true;

				$request_settings = array( 'is_plugin_response' => true );

				$plugins_response = $this->process_additional_response_settings( $plugins_response, $request_settings );

				$last_update->checked  = $plugins;
				$last_update->response = $plugins_response;

				$last_update = $this->add_up_to_date_products_data( $last_update, $request_settings );

				$last_update->last_checked = time();

				$update_transient = $this->merge_et_products_response( $update_transient, $plugins_response );

				set_site_transient( 'et_update_plugins', $last_update );

				$this->update_product_domains();
			}
		}

		// if this is a rate limited or failed request, fallback to the last et_update_plugins value
		// rather than overwrite it with an empty response
		if ( ! $et_update_plugins_updated ) {
			$update_transient = $this->merge_et_products_response( $update_transient, $et_update_plugins );
		}

		return $update_transient;
	}

	public function maybe_modify_plugins_changelog( $false, $action, $args ) {
		if ( 'plugin_information' !== $action ) {
			return $false;
		}

		if ( isset( $args->slug ) ) {
			$et_update_lb_plugin = get_site_transient( 'et_update_plugins' );

			$plugin_basename = sprintf( '%1$s/%1$s.php', sanitize_text_field( $args->slug ) );

			if ( isset( $et_update_lb_plugin->response[ $plugin_basename ] ) ) {
				$plugin_info = $et_update_lb_plugin->response[ $plugin_basename ];

				if ( isset( $plugin_info->et_sections_used ) && 'on' === $plugin_info->et_sections_used ) {
					return $plugin_info;
				}
			}
		}

		return $false;
	}

	function process_account_settings( $response ) {
		if ( empty( $response['et_account_data'] ) ) {
			return $response;
		}

		$additional_settings_fields = array(
			'et_username_status',
			'et_api_key_status',
			'et_expired_subscription',
		);

		$et_account_data = $response['et_account_data'];

		$additional_settings = array();

		$is_theme_response = is_array( $et_account_data );

		foreach ( $additional_settings_fields as $additional_settings_field ) {
			$field = '';

			$field_exists = $is_theme_response ? array_key_exists( $additional_settings_field, $et_account_data ) : ! empty( $et_account_data->$additional_settings_field );

			if ( $field_exists ) {
				$field = $is_theme_response ? $et_account_data[ $additional_settings_field ] : $et_account_data->$additional_settings_field;
			}

			$additional_settings[ $additional_settings_field ] = $field;
		}

		if (
			! empty( $additional_settings[ 'et_username_status' ] )
			&& in_array( $additional_settings[ 'et_username_status' ], array( 'active', 'expired', 'not_found' ) )
		) {
			$this->account_status = sanitize_text_field( $additional_settings['et_username_status'] );
		} else {
			// Set the account status to expired if the response array has 'et_expired_subscription' key
			$this->account_status = ! empty( $additional_settings[ 'et_expired_subscription' ] ) ? 'expired' : 'active';
		}

		update_site_option( 'et_account_status', $this->account_status );

		if ( ! empty( $additional_settings[ 'et_api_key_status' ] ) ) {
			update_site_option( 'et_account_api_key_status', sanitize_text_field( $additional_settings['et_api_key_status'] ) );
		} else {
			delete_site_option( 'et_account_api_key_status' );
		}

		unset( $response['et_account_data'] );

		return $response;
	}

	function process_up_to_date_products_settings( $response, $settings ) {
		if ( empty( $response['et_up_to_date_products'] ) ) {
			return $response;
		}

		$products_category = $settings['is_plugin_response'] ? 'plugins' : 'themes';

		$this->up_to_date_products_data[ $products_category ] = $response['et_up_to_date_products'];

		unset( $response['et_up_to_date_products'] );

		return $response;
	}

	function process_request_settings( $settings = array() ) {
		$defaults = array(
			'is_plugin_response' => false,
		);

		return array_merge( $defaults, $settings );
	}

	function process_additional_response_settings( $response, $settings = array() ) {
		if ( empty( $response ) ) {
			return $response;
		}

		$settings = $this->process_request_settings( $settings );

		$response = $this->process_account_settings( $response );

		$response = $this->process_up_to_date_products_settings( $response, $settings );

		return $response;
	}

	/**
	 * Sends a request to server, gets current themes versions
	 *
	 * @param object $update_transient Update transient option
	 * @return object Update transient option
	 */
	function check_themes_updates( $update_transient ){
		global $wp_version;

		$et_update_themes = get_site_transient( 'et_update_themes' );

		// update_themes transient gets set two times, so we ensure we make a request once
		if (
			! $this->upgraded_a_product
			&& isset( $et_update_themes->last_checked )
			&& isset( $update_transient->last_checked )
			&& $et_update_themes->last_checked > ( $update_transient->last_checked - 10 * MINUTE_IN_SECONDS )
		) {
			return $this->merge_et_products_response( $update_transient, $et_update_themes );
		}

		if ( ! isset( $update_transient->checked ) ) {
			return $update_transient;
		}

		$themes = $update_transient->checked;

		do_action( 'et_core_updates_before_request' );

		$send_to_api = array(
			'action'           => 'check_theme_updates',
			'installed_themes' => $themes,
			'class_version'    => $this->version,
		);

		// Add automatic updates data if Username and API key are set correctly
		$send_to_api = $this->maybe_add_automatic_updates_data( $send_to_api );

		// If we don't have update values cached in the transient, we need to bypass rate limiting.
		if ( $et_update_themes ) {
			$rate_limit = 'true';
		} else {
			$rate_limit = 'false';
		}

		$options = array(
			'timeout'    => ( ( defined('DOING_CRON') && DOING_CRON ) ? 10 : 3 ),
			'body'       => $send_to_api,
			'headers'    => array(
				'rate_limit' => $rate_limit,
			),
			'user-agent' => 'WordPress/' . $wp_version . '; Theme Updates/' . ET_CORE_VERSION . '; ' . home_url( '/' ),
		);

		$last_update = new stdClass();

		$theme_request = wp_remote_post( 'https://www.elegantthemes.com/api/api.php', $options );
		$theme_response = [];
		$et_update_themes_updated = false;

		if ( ! is_wp_error( $theme_request ) && wp_remote_retrieve_response_code( $theme_request ) === 200 ){
			$theme_response = maybe_unserialize( wp_remote_retrieve_body( $theme_request ) );

			if ( ! empty( $theme_response ) && is_array( $theme_response ) ) {
				$et_update_themes_updated = true;

				$theme_response = $this->process_additional_response_settings( $theme_response );

				$last_update->checked  = $themes;
				$last_update->response = $theme_response;

				$last_update = $this->add_up_to_date_products_data( $last_update );

				$last_update->last_checked = time();

				$update_transient = $this->merge_et_products_response( $update_transient, $last_update );

				set_site_transient( 'et_update_themes', $last_update );

				$this->update_product_domains();
			}
		}

		// if this is a rate limited or failed request, fallback to the last et_update_themes value
		// rather than overwrite it with an empty response
		if ( ! $et_update_themes_updated ) {
			$update_transient = $this->merge_et_products_response( $update_transient, $et_update_themes );
		}

		return $update_transient;
	}

	function maybe_show_account_notice() {
		// Don't show notice on onboarding page.
		if ( isset( $_GET['page'] ) && 'et_onboarding' === $_GET['page'] ) {
			return;
		}

		if ( empty( $this->options['username'] ) || empty( $this->options['api_key'] ) ) {
			return;
		}

		$all_products   = $this->get_et_api_products();
		$total_products = count( $all_products['theme'] ) + count( $all_products['plugin'] );

		if ( 1 === $total_products && et_()->includes( $all_products['plugin'], 'Divi Dash' ) ) {
			// Don't show the notice when Divi Dash is the only product
			return;
		}

		$output = '';

		$messages = array();

		$account_api_key_status = get_site_option( 'et_account_api_key_status' );

		$is_expired_account = 'expired' === $this->account_status;

		$is_invalid_account = 'not_found' === $this->account_status;

		if (
			! $is_expired_account
			&& ! $is_invalid_account
			&& empty( $account_api_key_status )
		) {
			return;
		}

		if ( $is_expired_account ) {
			$messages[] = et_get_safe_localization( __( 'Your Elegant Themes subscription has expired. You must <a href="https://www.elegantthemes.com/members-area/" target="_blank">renew your account</a> to regain access to product updates and support. To ensure compatibility and security, it is important to always keep your themes and plugins updated.', 'et-core' ) );
		} else if ( $is_invalid_account ) {
			$messages[] = et_get_safe_localization( __( 'The Elegant Themes username you entered is invalid. Please enter a valid username to receive product updates. If you forgot your username you can <a href="https://www.elegantthemes.com/members-area/retrieve-username/" target="_blank">request it here</a>.', 'et-core' ) );
		}

		if ( ! empty( $account_api_key_status ) ) {
			switch ( $account_api_key_status ) {
				case 'deactivated':
					$status = 'not active';

					break;
				default:
					$status = 'invalid';

					break;
			}

			$messages[] = et_get_safe_localization( __(
				sprintf( 'The Elegant Themes API key you entered is %1$s. Please make sure that your API has been entered correctly and that it is <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">enabled</a> in your account.', $status ),
				'et-core'
			) );
		}

		foreach ( $messages as $message ) {
			$output .= sprintf( '<p>%1$s</p>', $message );
		}

		if ( empty( $output ) ) {
			return;
		}

		$dashboard_url = add_query_arg( 'et_action', 'update_account_details', admin_url( 'update-core.php' ) );

		printf(
			'<div class="notice notice-warning">
				%1$s
				<p><a href="%2$s">%3$s</a></p>
			</div>',
			$output,
			esc_url( wp_nonce_url( $dashboard_url, 'et_update_account_details', 'et_update_account_details_nonce' ) ),
			esc_html__( 'Check Again', 'et-core' )
		);
	}

	function change_plugin_changelog_url( $url, $path ) {
		if ( 0 !== strpos( $path, 'plugin-install.php?tab=plugin-information&plugin=' ) ) {
			return $url;
		}

		$matches                 = array();
		$update_transient        = get_site_transient( 'et_update_plugins' );
		$et_updated_plugins_data = get_transient( 'et_updated_plugins_data' );
		$has_last_checked        = ! empty( $update_transient->last_checked ) && ! empty( $et_updated_plugins_data->last_checked );

		if ( ! is_object( $update_transient ) ) {
			return $url;
		}

		/*
		 * Attempt to use a cached list of updated plugins.
		 * Re-save the list, whenever the update transient last checked time changes.
		 */
		if ( false === $et_updated_plugins_data || ( $has_last_checked && $update_transient->last_checked !== $et_updated_plugins_data->last_checked ) ) {
			$et_updated_plugins_data = new stdClass();

			if ( ! empty( $update_transient->last_checked ) ) {
				$et_updated_plugins_data->last_checked = $update_transient->last_checked;
			}

			foreach ( $update_transient->response as $response_plugin_settings ) {
				$slug = sanitize_text_field( $response_plugin_settings->slug );

				$et_updated_plugins_data->changelogs[ $slug ] = esc_url_raw( $response_plugin_settings->url . '?TB_iframe=true&width=1024&height=800' );
			}

			set_transient( 'et_updated_plugins_data', $et_updated_plugins_data );
		}

		if ( ! empty( $update_transient->no_update ) ) {
			foreach ( $update_transient->no_update as $no_update_plugin_settings ) {
				$slug = sanitize_text_field( $no_update_plugin_settings->slug );

				$et_updated_plugins_data->changelogs[ $slug ] = esc_url_raw( $no_update_plugin_settings->url . '?TB_iframe=true&width=1024&height=800' );
			}
		}

		preg_match( '/plugin=([^&]*)/', $path, $matches );

		$current_plugin_slug = $matches[1];

		// Check if we're dealing with a product that has a custom changelog URL
		if ( ! empty( $et_updated_plugins_data->changelogs[ $current_plugin_slug ] ) ) {
			$url = esc_url_raw( $et_updated_plugins_data->changelogs[ $current_plugin_slug ] );
		}

		return $url;
	}

	function force_update_requests() {
		$update_transients = array(
			'update_themes',
			'update_plugins',
			'et_update_themes',
			'et_update_plugins',
		);

		foreach ( $update_transients as $update_transient ) {
			if ( get_site_transient( $update_transient ) ) {
				delete_site_transient( $update_transient );
			}
		}
	}

	function update_product_domains() {
		$this->all_et_products_domains = $this->get_all_et_products();

		$append_notification_action_name = 'maybe_append_custom_notification';

		// update notifications for ET products if needed
		foreach ( array( 'theme', 'plugin' ) as $product_type ) {
			if ( empty( $this->all_et_products_domains[ $product_type] ) ) {
				continue;
			}

			foreach ( $this->all_et_products_domains[ $product_type ] as $product_key ) {
				$action_name = sanitize_text_field( sprintf(
					'in_%1$s_update_message-%2$s',
					$product_type,
					$product_key
				) );

				if ( has_action( $action_name, array( $this, $append_notification_action_name ) ) ) {
					continue;
				}

				add_action( $action_name, array( $this, $append_notification_action_name ), 10, 2 );
			}
		}
	}

	/**
	 * Delete Elegant Themes update products transient, whenever default WordPress update transient gets removed
	 */
	function maybe_reset_et_products_update_transient( $transient_name ) {
		// Transient names for update transients we're interested in.
		$update_transients_names = array(
			'update_themes'  => 'et_update_themes',
			'update_plugins' => 'et_update_plugins',
		);

		// Check if the transient name is one of the update transients we're interested in.
		if ( empty( $update_transients_names[ $transient_name ] ) ) {
			return;
		}

		// Check the last_checked time in the transient, and only delete it if it's older than 24 hours.
		$et_update_transient = get_site_transient( $update_transients_names[ $transient_name ] );

		if (
			! empty( $et_update_transient->last_checked )
			&& $et_update_transient->last_checked > ( time() - DAY_IN_SECONDS )
		) {
			return;
		}

		// Delete the ET update transient, because it's older than 24 hours.
		delete_site_transient( $update_transients_names[ $transient_name ] );
	}

	/**
	 * Detects if the current API request is related to a product update.
	 * In this case, we need to allow the request to bypass rate limiting
	 * since the update process requests two requests.
	 */
	function upgraded_a_product() {
		$this->upgraded_a_product = true;
	}
}
endif;

if ( ! function_exists( 'et_core_enable_automatic_updates' ) ) :
function et_core_enable_automatic_updates( $deprecated, $version ) {
	if ( ! is_admin() && ! wp_doing_cron() ) {
		return;
	}

	if ( isset( $GLOBALS['et_core_updates'] ) ) {
		return;
	}

	if ( defined( 'ET_CORE_URL' ) ) {
		$url = ET_CORE_URL;
	} else {
		$url = trailingslashit( $deprecated ) . 'core/';
	}

	$GLOBALS['et_core_updates'] = new ET_Core_Updates( $url, $version );

}
endif;
Logger.php000064400000007324152336022500006500 0ustar00<?php


class ET_Core_Logger {

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	/**
	 * Checksum for every log message output during the current request.
	 *
	 * @var string[]
	 */
	protected static $HISTORY = array();

	/**
	 * Writes a message to the debug log if it hasn't already been written once.
	 *
	 * @since 3.10
	 *
	 * @param mixed $message
	 * @param int   $bt_index
	 * @param boolean $log_ajax Whether or not to log on AJAX calls.
	 */
	protected static function _maybe_write_log( $message, $bt_index = 4, $log_ajax = true ) {
		global $ET_IS_TESTING_DEPRECATIONS;

		if ( ! is_scalar( $message ) ) {
			$message = print_r( $message, true );
		}

		$message = (string) $message;
		$hash    = md5( $message );

		if ( ! $log_ajax && wp_doing_ajax() ) {
			return;
		}

		if ( $ET_IS_TESTING_DEPRECATIONS ) {
			trigger_error( $message );

		} else if ( getenv( 'CI' ) || ! in_array( $hash, self::$HISTORY ) ) {
			self::$HISTORY[] = $hash;

			self::_write_log( $message, $bt_index );
		}
	}

	/**
	 * Writes a message to the WP Debug and PHP Error logs.
	 *
	 * @param string $message
	 * @param int    $bt_index
	 */
	private static function _write_log( $message, $bt_index = 4 ) {
		$message   = trim( $message );
		$backtrace = debug_backtrace( 1 );
		$class     = '';
		$function  = '';

		if ( ! isset( $backtrace[ $bt_index ] ) ) {
			while ( $bt_index > 0 && ! isset( $backtrace[ $bt_index ] ) ) {
				$bt_index--;
			}

			// We need two stacks to get all the data we need so let's go down one more
			$bt_index--;
		}

		$stack = $backtrace[ $bt_index ];
		$file  = self::$_->array_get( $stack, 'file', '<unknown file>' );
		$line  = self::$_->array_get( $stack, 'line', '<unknown line>' );

		// Name of the function and class (if applicable) are in the previous stack (stacks are in reverse order)
		$stack    = $backtrace[ $bt_index + 1 ];
		$class    = self::$_->array_get( $stack, 'class', '' );
		$function = self::$_->array_get( $stack, 'function', '<unknown function>' );

		if ( $class ) {
			$class .= '::';
		}

		if ( '<unknown file>' !== $file ) {
			$file  = _et_core_normalize_path( $file );
			$parts = explode( '/', $file );
			$parts = array_slice( $parts, -2 );
			$file  = ".../{$parts[0]}/{$parts[1]}";
		}

		$message = " {$file}:{$line}  {$class}{$function}():\n{$message}\n";

		error_log( $message );
	}

	/**
	 * Writes message to the logs if {@link WP_DEBUG} is `true`, otherwise does nothing.
	 *
	 * @since 1.1.0
	 *
	 * @param mixed $message
	 * @param int   $bt_index
	 * @param boolean $log_ajax Whether or not to log on AJAX calls.
	 */
	public static function debug( $message, $bt_index = 4, $log_ajax = true ) {
		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
			self::_maybe_write_log( $message, $bt_index, $log_ajax );
		}
	}

	public static function disable_php_notices() {
		$error_reporting = error_reporting();
		$notices_enabled = $error_reporting & E_NOTICE;

		if ( $notices_enabled ) {
			error_reporting( $error_reporting & ~E_NOTICE );
		}
	}

	/**
	 * Writes an error message to the logs regardless of whether or not debug mode is enabled.
	 *
	 * @since 1.1.0
	 *
	 * @param mixed $message
	 * @param int   $bt_index
	 */
	public static function error( $message, $bt_index = 4 ) {
		self::_maybe_write_log( $message, $bt_index );
	}

	public static function enable_php_notices() {
		$error_reporting = error_reporting();
		$notices_enabled = $error_reporting & E_NOTICE;

		if ( ! $notices_enabled ) {
			error_reporting( $error_reporting | E_NOTICE );
		}
	}

	public static function initialize() {
		self::$_ = ET_Core_Data_Utils::instance();
	}

	public static function php_notices_enabled() {
		$error_reporting = error_reporting();
		return $error_reporting & E_NOTICE;
	}
}


ET_Core_Logger::initialize();
SupportCenterMUAutoloader.php000064400000003135152336022500012354 0ustar00<?php
/**
 * Plugin Name: ET Support Center :: Must-Use Plugins Autoloader
 * Plugin URI: http://www.elegantthemes.com
 * Description: This plugin enables the Elegant Themes Support Center to provide more consistent functionality when Safe Mode is active.
 * Author: Elegant Themes
 * Author URI: http://www.elegantthemes.com
 * License: GPLv2 or later
 *
 * @package ET\Core\SupportCenter\SafeModeDisablePlugins
 * @author Elegant Themes <http://www.elegantthemes.com>
 * @license GNU General Public License v2 <http://www.gnu.org/licenses/gpl-2.0.html>
 */

// The general idea here is loosely based on <https://codex.wordpress.org/Must_Use_Plugins#Autoloader_Example>.

// Quick exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// We only want to load these MU Plugins if Support Center is installed
$support_center_installed = get_option( 'et_support_center_installed' );

if ( $support_center_installed ) {
	// Compile a list of plugins in the `mu-plugins/et-safe-mode` directory
	// (see `$pathname_to` in `ET_Core_SupportCenter::maybe_add_mu_autoloader()`)
	if ( $mu_plugins = glob( dirname( __FILE__ ) . '/et-safe-mode/*.php' ) ) {
		// Verbose logging: only log if `wp-config.php` has defined `ET_DEBUG='support_center'`
		$DEBUG_ET_SUPPORT_CENTER = defined( 'ET_DEBUG' ) && 'support_center' === ET_DEBUG;

		// Loop through the list of plugins and require each in turn
		foreach ( $mu_plugins as $plugin ) {
			if ( file_exists( $plugin ) ) {
				if ( $DEBUG_ET_SUPPORT_CENTER ) {
					error_log( 'ET Support Center: loading mu-plugin: ' . $plugin );
				}
				require_once( $plugin );
			}
		}
	}
}
Portability.php000064400000316770152336022500007573 0ustar00<?php
/**
 * Import and Export data.
 *
 * @package Core\Portability
 */

/**
 * Handles the portability workflow.
 *
 * @package ET\Core\Portability
 */
class ET_Core_Portability {

	/**
	 * Current instance.
	 *
	 * @since 2.7.0
	 *
	 * @type object
	 */
	public $instance;

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	/**
	 * Whether or not an import is in progress.
	 *
	 * @since 3.0.99
	 *
	 * @var bool
	 */
	protected static $_doing_import = false;

	/**
	 * Constructor.
	 *
	 * @param string $context Portability context previously registered.
	 */
	public function __construct( $context ) {
		$this->instance = et_core_cache_get( $context, 'et_core_portability' );

		self::$_ = ET_Core_Data_Utils::instance();

		if ( $this->instance && $this->instance->view ) {
			if ( et_core_is_fb_enabled() ) {
				$this->assets();
			} else {
				add_action( 'admin_footer', array( $this, 'modal' ) );
				add_action( 'customize_controls_print_footer_scripts', array( $this, 'modal' ) );
				add_action( 'admin_enqueue_scripts', array( $this, 'assets' ), 5 );
			}
		}
	}

	public static function doing_import() {
		return self::$_doing_import;
	}

	/**
	 * Import a previously exported layout.
	 *
	 * @since 3.10    Return the result of the import instead of dieing.
	 * @since 2.7.0
	 *
	 * @param string $file_context Accepts 'upload', 'sideload'. Default 'upload'.
	 *
	 * @return bool|array
	 */
	public function import( $file_context = 'upload' ) {
		global $shortname;

		$this->prevent_failure();

		self::$_doing_import = true;

		$timestamp    = $this->get_timestamp();
		$filesystem   = $this->set_filesystem();
		$temp_file_id = sanitize_file_name( $timestamp );
		$temp_file    = $this->has_temp_file( $temp_file_id, 'et_core_import' );

		// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verification is handled earlier.
		$include_global_presets = isset( $_POST['include_global_presets'] ) ? wp_validate_boolean( sanitize_text_field( $_POST['include_global_presets'] ) ) : false;
		$return_json            = isset( $_POST['et_cloud_return_json'] ) ? wp_validate_boolean( sanitize_text_field( $_POST['et_cloud_return_json'] ) ) : false;
		$temp_presets           = isset( $_POST['et_cloud_use_temp_presets'] ) ? wp_validate_boolean( sanitize_text_field( $_POST['et_cloud_use_temp_presets'] ) ) : false;
		$is_update_preset_id    = isset( $_POST['onboarding'] ) ? wp_validate_boolean( sanitize_text_field( $_POST['onboarding'] ) ) : false;
		$preset_prefix          = isset( $_POST['preset_prefix'] ) ? sanitize_text_field( $_POST['preset_prefix'] ) : '';
		// phpcs:enable WordPress.Security.NonceVerification.Missing

		$global_presets = '';

		if ( $temp_file ) {
			$import = json_decode( $filesystem->get_contents( $temp_file ), true );
		} else {
			if ( ! isset( $_FILES['file']['name'] ) || ! et_()->ends_with( sanitize_file_name( $_FILES['file']['name'] ), '.json' ) ) {
				return array( 'message' => 'invalideFile' );
			}

			if ( ! in_array( $file_context, array( 'upload', 'sideload' ) ) ) {
				$file_context = 'upload';
			}

			$handle_file = "wp_handle_{$file_context}";
			$upload      = $handle_file( $_FILES['file'], array(
				'test_size' => false,
				'test_type' => false,
				'test_form' => false,
			) );

			/**
			 * Fires before an uploaded Portability JSON file is processed.
			 *
			 * @since 3.0.99
			 *
			 * @param string $file The absolute path to the uploaded JSON file's temporary location.
			 */
			do_action( 'et_core_portability_import_file', $upload['file'] );

			$temp_file    = $this->temp_file( $temp_file_id, 'et_core_import', $upload['file'] );
			$file_content = preg_replace( '/\x{FEFF}/u', '', $filesystem->get_contents( $temp_file ) ); // Replace BOM with empty string.
			$import       = json_decode( $file_content, true );
			$import       = $this->validate( $import );

			if ( $return_json ) {
				return array( 'jsonFromFile' => $import );
			}

			// Check if Import contains Google Api Settings.
			if ( isset( $import['data']['et_google_api_settings'] ) && ( 'epanel' === $this->instance->context || 'epanel_temp' === $this->instance->context ) ) {
				$et_google_api_settings = $import['data']['et_google_api_settings'];
			}

			if ( ! isset( $import['context'] ) || ( isset( $import['context'] ) && $import['context'] !== $this->instance->context ) ) {
				$this->delete_temp_files( 'et_core_import', [ $temp_file_id => $temp_file ] );

				return array( 'message' => 'importContextFail' );
			}

			$import['data'] = $this->apply_query( $import['data'], 'set' );

			$filesystem->put_contents( $upload['file'], wp_json_encode( (array) $import ) );
		}

		// Upload images and replace current urls.
		if ( isset( $import['images'] ) ) {
			$images = $this->maybe_paginate_images( (array) $import['images'], 'upload_images', $timestamp );
			$import['data'] = $this->replace_images_urls( $images, $import['data'] );
		}

		if ( ! empty( $import['global_colors'] ) ) {
			$import['data'] = $this->_maybe_inject_gcid( $import['data'], $import['global_colors'] );
		}

		$data = $import['data'];
		$success = array( 'timestamp' => $timestamp );

		$this->delete_temp_files( 'et_core_import', [ $temp_file_id => $temp_file ] );

		if ( 'options' === $this->instance->type ) {
			// Reset all data besides excluded data.
			$current_data = $this->apply_query( get_option( $this->instance->target, array() ), 'unset' );

			if ( isset( $data['wp_custom_css'] ) && function_exists( 'wp_update_custom_css_post' ) ) {
				wp_update_custom_css_post( $data['wp_custom_css'] );

				if ( 'yes' === get_theme_mod( 'et_pb_css_synced', 'no' ) ) {
					// If synced, clear the legacy custom css value to avoid unwanted merging of old and new css.
					$data[ "{$shortname}_custom_css" ] = '';
				}
			}

			// Import Google API settings.
			if ( isset( $et_google_api_settings ) ) {
				// Get exising Google API key, sine it is not added to export.
				$et_previous_google_api_settings   = get_option( 'et_google_api_settings' );
				$et_previous_google_api_key        = isset( $et_previous_google_api_settings['api_key'] ) ? $et_previous_google_api_settings['api_key'] : '';
				$et_google_api_settings['api_key'] = $et_previous_google_api_key;

				update_option( 'et_google_api_settings', $et_google_api_settings );
			}

			// Merge remaining current data with new data and update options.
			update_option( $this->instance->target, array_merge( $current_data, $data ) );

			set_theme_mod( 'et_pb_css_synced', 'no' );
		}

		// Pass the post content and let js save the post.
		if ( 'post' === $this->instance->type ) {
			$success['postContent'] = reset( $data );

			// In some cases we receive the post array instaed of shortcode string. Handle this case.
			$shortcode_string = is_array( $success['postContent'] ) && ! empty( $success['postContent']['post_content'] ) ? $success['postContent']['post_content'] : $success['postContent'];

			if ( ! empty( $import['presets'] ) ) {
				$preset_rewrite_map = [];

				if ( $include_global_presets && ! $is_update_preset_id ) {
					$preset_rewrite_map = $this->prepare_to_import_layout_presets( $import['presets'] );
					$global_presets     = $import['presets'];
				}

				$shortcode_object = et_fb_process_shortcode( $shortcode_string );

				if ( $is_update_preset_id ) {
					$global_presets    = $import['presets'];
					$vb_presets_lookup = $this->_get_importing_presets_id_name_pairs( $global_presets );
					$this->_update_shortcode_with_onboarding_preset( $shortcode_object, $vb_presets_lookup );
				} else {
					$this->rewrite_module_preset_ids( $shortcode_object, $import['presets'], $preset_rewrite_map );
				}

				$shortcode_string = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
			}

			do_shortcode( $shortcode_string );

			$success['postContent'] = $shortcode_string;
			$success['migrations']  = ET_Builder_Module_Settings_Migration::$migrated;
			$success['presets']     = isset( $import['presets'] ) && is_array( $import['presets'] ) ? $import['presets'] : (object) array();
		}

		if ( 'post_type' === $this->instance->type ) {
			$preset_rewrite_map = array();
			if ( ! empty( $import['presets'] ) && $include_global_presets ) {
				$preset_rewrite_map = $this->prepare_to_import_layout_presets( $import['presets'] );
				$global_presets = $import['presets'];
			}

			foreach ( $data as &$post ) {
				$shortcode_object = et_fb_process_shortcode( $post['post_content'] );

				if ( ! empty( $import['presets'] ) ) {
					if ( $include_global_presets ) {
						$this->rewrite_module_preset_ids( $shortcode_object, $import['presets'], $preset_rewrite_map );
					} else {
						$this->_apply_global_presets( $shortcode_object, $import['presets'] );
					}
				}

				$post_content = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
				// Add slashes for post content to avoid unwanted unslashing (by wp_unslash) while post is inserting.
				$post['post_content'] = wp_slash( $post_content );

				// Upload thumbnail image if exist.
				if ( ! empty( $post['post_meta'] ) && ! empty( $post['post_meta']['_thumbnail_id'] ) ) {
					$post_thumbnail_origin_id = (int) $post['post_meta']['_thumbnail_id'][0];

					if ( ! empty( $import['thumbnails'] ) && ! empty( $import['thumbnails'][ $post_thumbnail_origin_id ] ) ) {
						$post_thumbnail_new = $this->upload_images( $import['thumbnails'][ $post_thumbnail_origin_id ] );
						$new_thumbnail_data = reset( $post_thumbnail_new );

						// New thumbnail image was uploaded and it should be updated.
						if ( isset( $new_thumbnail_data['replacement_id'] ) ) {
							$new_thumbnail_id  = $new_thumbnail_data['replacement_id'];
							$post['thumbnail'] = $new_thumbnail_id;

							if ( ! function_exists( 'wp_crop_image' ) ) {
								include ABSPATH . 'wp-admin/includes/image.php';
							}

							$thumbnail_path = get_attached_file( $new_thumbnail_id );

							// Generate all the image sizes and update thumbnail metadata.
							$new_metadata = wp_generate_attachment_metadata( $new_thumbnail_id, $thumbnail_path );
							wp_update_attachment_metadata( $new_thumbnail_id, $new_metadata );
						}
					}
				}
			}

			$imported_posts = $this->import_posts( $data );

			if ( false === $imported_posts ) {
				/**
				 * Filters the error message when {@see ET_Core_Portability::import()} fails.
				 *
				 * @since 3.0.99
				 *
				 * @param mixed $error_message Default is `null`.
				 */
				if ( $error_message = apply_filters( 'et_core_portability_import_error_message', false ) ) {
					$error_message = array( 'message' => $error_message );
				}

				return $error_message;
			} else {
				$success['imported_posts'] = $imported_posts;
			}
		}

		if ( ! empty( $global_presets ) ) {
			if ( ! $this->import_global_presets( $global_presets, $temp_presets, true, $preset_prefix, true ) ) {
				if ( $error_message = apply_filters( 'et_core_portability_import_error_message', false ) ) {
					$error_message = array( 'message' => $error_message );
				}

				return $error_message;
			}
		}

		if ( ! empty( $import['global_colors'] ) ) {
			$this->import_global_colors( $import['global_colors'] );
			$success['globalColors'] = et_builder_get_all_global_colors( true );
		}

		return $success;
	}

	/**
	 * Initiate Export.
	 *
	 * @since 2.7.0
	 *
	 * @param bool $return
	 *
	 * @return null|array
	 */
	public function export( $return = false, $include_used_presets = false ) {
		$this->prevent_failure();
		et_core_nonce_verified_previously();

		$timestamp            = $this->get_timestamp();
		$filesystem           = $this->set_filesystem();
		$temp_file_id         = sanitize_file_name( $timestamp );
		$temp_file            = $this->has_temp_file( $temp_file_id, 'et_core_export' );
		$apply_global_presets = isset( $_POST['apply_global_presets'] ) ? wp_validate_boolean( $_POST['apply_global_presets'] ) : false;
		$global_presets       = '';
		$global_colors        = '';
		$thumbnails           = '';

		if ( $temp_file ) {
			$file_data      = json_decode( $filesystem->get_contents( $temp_file ) );
			$data           = (array) $file_data->data;
			$global_presets = $file_data->presets;
			$global_colors  = $file_data->global_colors;
		} else {
			$temp_file = $this->temp_file( $temp_file_id, 'et_core_export' );

			if ( 'options' === $this->instance->type ) {
				$data = get_option( $this->instance->target, array() );

				// Export the Customizer "Additional CSS" value as well.
				if ( function_exists( 'wp_get_custom_css' ) ) {
					$data[ 'wp_custom_css' ] = wp_get_custom_css();
				}
			}

			if ( 'post' === $this->instance->type ) {
				if ( ! ( isset( $_POST['post'] ) || isset( $_POST['content'] ) ) ) {
					wp_send_json_error();
				}

				$fields_validatation = array(
					'ID' => 'intval',
					// no post_content as the default case for no fields_validation will run it through perms based wp_kses_post, which is exactly what we want.
				);

				$post_data = array(
					'post_content' => stripcslashes( $_POST['content'] ), // need to run this through stripcslashes() as thats what wp_kses_post() expects.
					'ID'           => $_POST['post'],
				);

				$post_data = $this->validate( $post_data, $fields_validatation );

				$data = array( $post_data['ID'] => $post_data['post_content'] );

				if ( isset( $_POST['global_presets'] ) ) {
					// phpcs:ignore ET.Sniffs.ValidatedSanitizedInput.InputNotSanitized -- filter_post_data() function does sanitation.
					$post_global_presets = $this->_filter_post_data( $_POST['global_presets'] );
					$global_presets      = json_decode( stripslashes( $post_global_presets ) );
				}

				if ( isset( $_POST['global_colors'] ) ) {
					// phpcs:ignore ET.Sniffs.ValidatedSanitizedInput.InputNotSanitized -- filter_post_data() function does sanitation.
					$post_global_colors = $this->_filter_post_data( $_POST['global_colors'] );
					$global_colors      = json_decode( stripslashes( $post_global_colors ) );
				}

				if ( $include_used_presets ) {
					$used_global_presets = array();
					$used_global_colors  = array();

					$shortcode_object   = et_fb_process_shortcode( $post_data['post_content'] );

					$used_global_presets = array_merge(
						$this->get_used_global_presets( $shortcode_object, $used_global_presets ),
						$used_global_presets
					);

					if ( ! empty( $used_global_presets ) ) {
						$global_presets = (object) $used_global_presets;
					}

					$used_global_colors = $this->_get_used_global_colors( $shortcode_object, $used_global_colors, $global_presets );

					if ( ! empty( $used_global_colors ) ) {
						$global_colors = $this->_get_global_colors_data( $used_global_colors );
					}
				}
			}

			if ( 'post_type' === $this->instance->type ) {
				$data = $this->export_posts_query();
			}

			$data = $this->apply_query( $data, 'set' );

			// Export Google API settings.
			if ( 'epanel' === $this->instance->context || 'epanel_temp' === $this->instance->context ) {
				$et_google_api_settings = get_option( 'et_google_api_settings', array() );

				// Unset google api_key settings to prevent exporting it.
				if ( isset( $et_google_api_settings['api_key'] ) ) {
					unset( $et_google_api_settings['api_key'] );
				}

				$data['et_google_api_settings'] = $et_google_api_settings;
			}

			if ( 'post_type' === $this->instance->type ) {
				$used_global_presets = array();
				$used_global_colors  = array();
				$options             = array(
					'apply_global_presets' => true,
				);

				foreach ( $data as $post ) {
					$shortcode_object = et_fb_process_shortcode( $post->post_content );

					// We have to always process global presets to get the global colors correctly.
					$global_presets_from_post = $this->get_used_global_presets( $shortcode_object, $used_global_presets );
					$used_global_presets      = array_merge(
						$global_presets_from_post,
						$used_global_presets
					);

					$used_global_colors = $this->_get_used_global_colors( $shortcode_object, $used_global_colors, $global_presets_from_post );

					if ( $apply_global_presets ) {
						$shortcode_object   = et_fb_process_to_shortcode( $shortcode_object, $options, '', false );
						$post->post_content = $shortcode_object;
					}
				}

				if ( ! empty ( $used_global_presets ) ) {
					$global_presets = (object) $used_global_presets;
				}

				if ( ! empty( $used_global_colors ) ) {
					$global_colors = $this->_get_global_colors_data( $used_global_colors );
				}
			}

			// put contents into file, this is temporary,
			// if images get paginated, this content will be brought back out
			// of a temp file in paginated request
			$file_data = array(
				'data'          => $data,
				'presets'       => $global_presets,
				'global_colors' => $global_colors,
			);
			$filesystem->put_contents( $temp_file, wp_json_encode( $file_data ) );
		}

		$thumbnails = $this->_get_thumbnail_images( $data );

		$images = $this->get_data_images( $data );
		$data = array(
			'context'       => $this->instance->context,
			'data'          => $data,
			'presets'       => $global_presets,
			'global_colors' => $global_colors,
			'images'        => $this->maybe_paginate_images( $images, 'encode_images', $timestamp ),
			'thumbnails'    => $thumbnails,
		);

		// Return exported content instead of printing it
		if ( $return ) {
			return array_merge( $data, [ 'timestamp' => $timestamp ] );
		}

		$filesystem->put_contents( $temp_file, wp_json_encode( (array) $data ) );

		wp_send_json_success( array( 'timestamp' => $timestamp ) );
	}

	/**
	 * Serialize a single layout post in chunks.
	 *
	 * @since 4.0
	 *
	 * @param integer $id Unique ID to represent this layout serialization.
	 * @param integer $post_id
	 * @param string $content
	 * @param array $theme_builder_meta
	 * @param integer $chunk
	 *
	 * @return array
	 */
	public function serialize_layout( $id, $post_id, $content, $theme_builder_meta = array(), $chunk = 0 ) {
		$this->prevent_failure();

		$fields_validatation = array(
			// No post_content as the default case for no fields_validation will run it through perms based wp_kses_post, which is exactly what we want.
			'ID' => 'intval',
		);

		$post_data = array(
			// Need to run this through stripcslashes() as thats what wp_kses_post() expects.
			'post_content' => stripcslashes( $content ),
			'ID'           => $post_id,
		);

		$shortcode_object   = et_fb_process_shortcode( $post_data['post_content'] );
		$used_global_colors = $this->get_theme_builder_library_used_global_colors( $shortcode_object );
		$post_data          = $this->validate( $post_data, $fields_validatation );
		$data               = array( $post_data['ID'] => $post_data['post_content'] );
		$data               = $this->apply_query( $data, 'set' );
		$images             = $this->get_data_images( $data );
		$images             = $this->chunk_images( $images, 'encode_images', $id, $chunk );

		// Generate list of used global colors.
		if ( ! empty( $used_global_colors ) ) {
			$global_colors = $this->_get_global_colors_data( $used_global_colors );
		}

		$data   = array(
			'context'       => 'et_builder',
			'data'          => $data,
			'images'        => $images['images'],
			'post_title'    => get_post_field( 'post_title', $post_id ),
			'post_type'     => get_post_type( $post_id ),
			'theme_builder' => $theme_builder_meta,
			'global_colors' => $global_colors,
		);
		$chunks    = $images['chunks'];
		$ready     = $images['ready'];

		return array(
			'ready'  => $ready,
			'chunks' => $chunks,
			'data'   => $data,
		);
	}

	/**
	 * Serialize Theme Builder templates in chunks.
	 *
	 * @since 4.0
	 *
	 * @param integer $id Unique ID to represent this theme builder serialization process.
	 * @param array $step
	 * @param integer $steps
	 * @param integer $step_index
	 * @param integer $chunk
	 *
	 * @return array|false
	 */
	public function serialize_theme_builder( $id, $step, $steps, $step_index = 0, $chunk = 0 ) {
		if ( $step_index >= $steps ) {
			return false;
		}

		$this->prevent_failure();

		$temp_file_id = sanitize_file_name( 'et_theme_builder_' . $id );
		$temp_file    = $this->has_temp_file( $temp_file_id, 'et_core_export' );

		if ( $temp_file ) {
			$data = json_decode( $this->get_filesystem()->get_contents( $temp_file ), true );
		} else {
			$temp_file = $this->temp_file( $temp_file_id, 'et_core_export' );
			$data      = array(
				'context'              => 'et_theme_builder',
				'templates'            => array(),
				'layouts'              => array(),
				'presets'             => array(),
				'has_default_template' => false,
				'has_global_layouts'   => false,
			);
		}

		$chunks = 1;

		switch ( $step['type'] ) {
			case 'template':
				$header_id  = $step['data']['layouts']['header']['id'];
				$body_id    = $step['data']['layouts']['body']['id'];
				$footer_id  = $step['data']['layouts']['footer']['id'];
				$is_default = $step['data']['default'];

				if ( 0 !== $header_id && ! current_user_can( 'edit_post', $header_id ) ) {
					$step['data']['layouts']['header']['id'] = 0;
				}

				if ( 0 !== $body_id && ! current_user_can( 'edit_post', $body_id ) ) {
					$step['data']['layouts']['body']['id'] = 0;
				}

				if ( 0 !== $footer_id && ! current_user_can( 'edit_post', $footer_id ) ) {
					$step['data']['layouts']['footer']['id'] = 0;
				}

				if ( $is_default ) {
					$data['has_default_template'] = true;
				}

				$data['templates'][] = $step['data'];
				break;

			case 'layout':
				$post_id   = $step['data']['post_id'];
				$is_global = $step['data']['is_global'];

				if ( ! current_user_can( 'edit_post', $post_id ) ) {
					break;
				}

				if ( 0 === $chunk && isset( $data['layouts'][ $post_id ] ) ) {
					// The layout is already exported.
					break;
				}

				if ( $is_global ) {
					$data['has_global_layouts'] = true;
				}

				$step_data = $this->serialize_layout(
					$id,
					$post_id,
					get_post_field( 'post_content', $post_id ),
					array(
						'is_global' => $is_global,
					),
					$chunk
				);

				$step_data['data']['post_meta'] = array_merge(
					et_()->array_get( $step_data, 'data.post_meta', array() ),
					et_core_get_post_builder_meta( $post_id )
				);

				$data['layouts'][ $post_id ] = $step_data['data'];
				$chunks = $step_data['chunks'];
				break;

			case 'presets':
				$data['presets'] = $step['data'];
				break;
		}

		$ready = ( $step_index + 1 >= $steps ) && ( $chunk + 1 >= $chunks );

		if ( ! $ready ) {
			$this->get_filesystem()->put_contents( $temp_file, wp_json_encode( $data ) );
		} else {
			$this->delete_temp_files( 'et_core_export', array( $temp_file_id => $temp_file ) );
		}

		return array(
			'ready'  => $ready,
			'chunks' => $chunks,
			'data'   => $data,
		);
	}

	/**
	 * Export Theme Builder templates in chunks.
	 *
	 * @since 4.0
	 *
	 * @param integer $id Unique ID to represent this theme builder export process.
	 * @param array $step
	 * @param integer $steps
	 * @param integer $step_index
	 * @param integer $chunk
	 *
	 * @return array|false
	 */
	public function export_theme_builder( $id, $step, $steps, $step_index = 0, $chunk = 0 ) {
		$result = $this->serialize_theme_builder( $id, $step, $steps, $step_index, $chunk );

		if ( false === $result ) {
			return false;
		}

		$temp_file_id = sanitize_file_name( 'et_theme_builder_export_' . $id );
		$temp_file    = $this->temp_file( $temp_file_id, 'et_core_export' );

		if ( $result['ready'] ) {
			$this->get_filesystem()->put_contents( $temp_file, wp_json_encode( $result[ 'data' ] ) );
		}

		return array_merge( $result, array(
			'temp_file'    => $temp_file,
			'temp_file_id' => $temp_file_id,
		) );
	}

	/**
	 * Get whether an array represents a valid Theme Builder export.
	 *
	 * @since 4.0
	 *
	 * @param array $export
	 *
	 * @return boolean
	 */
	public function is_valid_theme_builder_export( $export ) {
		$valid_context = isset( $export['context'] ) && $export['context'] === $this->instance->context;
		$has_templates = isset( $export['templates'] ) && is_array( $export['templates'] );
		$has_layouts   = isset( $export['layouts'] ) && is_array( $export['layouts'] );

		return $valid_context && $has_templates && $has_layouts;
	}

	/**
	 * Import a single layout in chunks.
	 *
	 * @since 4.0
	 *
	 * @param string $id Unique ID to represent this layout serialization.
	 * @param array $layout
	 * @param integer $chunk
	 *
	 * @return array|false
	 */
	public function import_layout( $id, $layout, $chunk = 0 ) {
		$post_id = 0;
		$import  = $this->validate( $layout );

		if ( false === $import ) {
			return false;
		}

		$import['data'] = $this->apply_query( $import['data'], 'set' );

		if ( ! isset( $import['context'] ) || ( isset( $import['context'] ) && 'et_builder' !== $import['context'] ) ) {
			return false;
		}

		$result = $this->chunk_images( self::$_->array_get( $import, 'images', array() ), 'upload_images', $id, $chunk );

		if ( $result['ready'] ) {
			$import['data']   = $this->replace_images_urls( $result['images'], $import['data'] );
			$post_type        = self::$_->array_get( $import, 'post_type', 'post' );
			$post_title       = self::$_->array_get( $import, 'post_title', '' );
			$post_status      = self::$_->array_get( $import, 'post_status', 'publish' );
			$post_meta        = self::$_->array_get( $import, 'post_meta', array() );
			$post_type_object = get_post_type_object( $post_type );

			if ( ! $post_type_object || ! current_user_can( $post_type_object->cap->create_posts ) ) {
				return false;
			}

			$content = array_values( $import['data'] );
			$content = $content[0];
			$args    = array(
				'post_status'  => $post_status,
				'post_type'    => $post_type,
				'post_content' => current_user_can( 'unfiltered_html' ) ? $content : wp_kses_post( $content ),
			);

			if ( ! empty( $post_title ) ) {
				$args['post_title'] = current_user_can( 'unfiltered_html' ) ? $post_title : wp_kses( $post_title, 'entities' );
			}

			$post_id = et_theme_builder_insert_layout( $args );

			if ( is_wp_error( $post_id ) ) {
				return false;
			}

			foreach ( $post_meta as $entry ) {
				update_post_meta( $post_id, $entry['key'], $entry['value'] );
			}

			// Import Global Colors for each layout.
			if ( ! empty( $import['global_colors'] ) ) {
				$this->import_global_colors( $import['global_colors'] );
			}
		}

		return array(
			'ready'   => $result['ready'],
			'chunks'  => $result['chunks'],
			'id'      => $post_id,
		);
	}

	/**
	 * Get importing presets ID and name pairs from presets data.
	 *
	 * @since 4.26.1
	 *
	 * @param array $presets Presets data.
	 */
	protected function _get_importing_presets_id_name_pairs( $presets ) {
		$presets_lookup = [];

		foreach ( $presets as $module_type => $value ) {
			$presets_lookup[ $module_type ] = [];

			foreach ( $value['presets'] as $module_preset_id => $preset ) {
				$presets_lookup[ $module_type ][ $module_preset_id ] = $preset['name'];
			}
		}

		return $presets_lookup;
	}

	/**
	 * Import Theme Builder templates in chunks.
	 *
	 * @since 4.0
	 *
	 * @param integer $id Unique ID to represent this theme builder import process.
	 * @param array $step
	 * @param integer $steps
	 * @param integer $step_index
	 * @param integer $chunk
	 *
	 * @return array|false
	 */
	public function import_theme_builder( $id, $step, $steps, $step_index = 0, $chunk = 0 ) {
		if ( $step_index >= $steps ) {
			return false;
		}

		$layout_id_map = array();
		$chunks        = 1;

		if ( ! isset( $step['type'] ) ) {
			$step['type'] = '';
		}

		switch ( $step['type'] ) {
			case 'layout':
				$presets             = et_()->array_get( $step, 'presets', array() );
				$presets_rewrite_map = et_()->array_get( $step, 'presets_rewrite_map', array() );
				$is_update_preset_id = et_()->array_get( $step, 'is_update_preset_id', false );
				$import_presets      = et_()->array_get( $step, 'import_presets', false );
				$layouts             = et_()->array_get( $step['data'], 'data', array() );

				if ( $is_update_preset_id ) {
					$tb_presets_lookup = $this->_get_importing_presets_id_name_pairs( $presets );
				}

				// Apply any presets to the layouts' shortcodes prior to importing them.
				if ( ! empty( $presets ) && ! empty( $layouts ) ) {
					foreach ( $layouts as $key => $layout ) {
						$shortcode_object = et_fb_process_shortcode( $layout );

						if ( $import_presets ) {
							if ( $is_update_preset_id ) {
								$this->_update_shortcode_with_onboarding_preset( $shortcode_object, $tb_presets_lookup );
							} else {
								$this->rewrite_module_preset_ids( $shortcode_object, $presets, $presets_rewrite_map );
							}
						} else {
							$this->_apply_global_presets( $shortcode_object, $presets );
						}

						$layouts[ $key ] = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
					}

					$step['data']['data'] = $layouts;
				}

				$result = $this->import_layout( $id, $step['data'], $chunk );

				if ( false === $result ) {
					break;
				}

				if ( $result['ready'] ) {
					if ( ! isset( $layout_id_map[ $step['id'] ] ) ) {
						$layout_id_map[ $step['id'] ] = array();
					}

					// Since a single layout can be duplicated multiple times if
					// it's global we have to keep an array of duplicated ids.
					$layout_id_map[ $step['id'] ][ $step['template_id'] ] = $result['id'];
				}

				$chunks = $result['chunks'];
				break;
		}

		$ready = ( $step_index + 1 >= $steps ) && ( $chunk + 1 >= $chunks );

		return array(
			'ready'         => $ready,
			'chunks'        => $chunks,
			'layout_id_map' => $layout_id_map,
		);
	}

	/**
	 * Download temporary file.
	 *
	 * @since 4.0
	 *
	 * @param string $filename
	 * @param string $temp_file_id
	 * @param string $temp_file
	 * @return void
	 */
	public function download_file( $filename, $temp_file_id, $temp_file ) {
		$this->prevent_failure();

		$filename = sanitize_file_name( $filename );

		header( 'Content-Description: File Transfer' );
		header( "Content-Disposition: attachment; filename=\"{$filename}.json\"" );
		header( 'Content-Type: application/json' );
		header( 'Pragma: no-cache' );

		if ( file_exists( $temp_file ) ) {
			echo et_core_esc_previously( $this->get_filesystem()->get_contents( $temp_file ) );
		}

		$this->delete_temp_files( 'et_core_export', array( $temp_file_id => $temp_file ) );

		wp_die();
	}

	/**
	 * Download Export Data.
	 *
	 * @since 2.7.0
	 */
	public function download_export() {
		$this->prevent_failure();
		et_core_nonce_verified_previously();

		// Retrieve data.
		$timestamp = isset( $_GET['timestamp'] ) ? sanitize_text_field( $_GET['timestamp'] ) : null;
		$name = isset( $_GET['name'] ) ? sanitize_text_field( rawurldecode( $_GET['name'] ) ) : $this->instance->name;
		$filesystem = $this->set_filesystem();
		$temp_file = $this->temp_file( sanitize_file_name( $timestamp ), 'et_core_export' );

		header( 'Content-Description: File Transfer' );
		header( "Content-Disposition: attachment; filename=\"{$name}.json\"" );
		header( 'Content-Type: application/json' );
		header( 'Pragma: no-cache' );

		if ( file_exists( $temp_file ) ) {
			echo et_core_esc_previously( $filesystem->get_contents( $temp_file ) );
		}

		$this->delete_temp_files( 'et_core_export' );

		exit;
	}

	protected function to_megabytes( $value ) {
		$unit = strtoupper( substr( $value, -1 ) );
		$amount = intval( substr( $value, 0, -1 ) );

		// Known units
		switch ( $unit ) {
			case 'G': return $amount << 10;
			case 'M': return $amount;
		}

		if ( is_numeric( $unit ) ) {
			// Numeric unit is present, assume bytes
			return intval( $value ) >> 20;
		}

		// Unknown unit ...
		return intval( $value );

	}// end to_megabytes()

	/**
	 * Get selected posts data.
	 *
	 * @since 2.7.0
	 */
	protected function export_posts_query() {
		et_core_nonce_verified_previously();

		$args = array(
			'post_type'      => $this->instance->target,
			'posts_per_page' => -1,
			'no_found_rows'  => true,
		);

		// Only include selected posts if set and not empty.
		if ( isset( $_POST['selection'] ) ) {
			$include = json_decode( stripslashes( $_POST['selection'] ), true );

			if ( ! empty( $include ) ) {
				$include = array_map( 'intval', array_values( $include ) );
				$args['post__in'] = $include;
			}
		}

		$get_posts = get_posts( apply_filters( "et_core_portability_export_wp_query_{$this->instance->context}", $args ) );
		$taxonomies = get_object_taxonomies( $this->instance->target );
		$posts = array();

		foreach ( $get_posts as $key => $post ) {
			unset(
				$post->post_author,
				$post->guid
			);

			$posts[$post->ID] = $post;

			// Include post meta.
			$post_meta = (array) get_post_meta( $post->ID );

			if ( isset( $post_meta['_edit_lock'] ) ) {
				unset(
					$post_meta['_edit_lock'],
					$post_meta['_edit_last']
				);
			}

			$posts[$post->ID]->post_meta = $post_meta;

			// Include terms.
			$get_terms = (array) wp_get_object_terms( $post->ID, $taxonomies );
			$terms = array();

			// Order terms to make sure children are after the parents.
			while ( $term = array_shift( $get_terms ) ) {
				if ( 0 === $term->parent || isset( $terms[$term->parent] ) ) {
					$terms[$term->term_id] = $term;
				} else {
					// if parent category is also exporting then add the term to the end of the list and process it later
					// otherwise add a term as usual
					if ( $this->is_parent_term_included( $get_terms, $term->parent ) ) {
						$get_terms[] = $term;
					} else {
						$terms[$term->term_id] = $term;
					}
				}
			}

			$posts[$post->ID]->terms = array();

			foreach ( $terms as $term ) {
				$parents_data = array();

				if ( $term->parent ) {
					$parent_slug = isset( $terms[$term->parent] ) ? $terms[$term->parent]->slug : $this->get_parent_slug( $term->parent, $term->taxonomy );
					$parents_data = $this->get_all_parents( $term->parent, $term->taxonomy );
				} else {
					$parent_slug = 0;
				}

				$posts[$post->ID]->terms[$term->term_id] = array(
					'name'        => $term->name,
					'slug'        => $term->slug,
					'taxonomy'    => $term->taxonomy,
					'parent'      => $parent_slug,
					'all_parents' => $parents_data,
					'description' => $term->description
				);
			}
		}

		return $posts;
	}

	/**
	 * Check whether the $parent_id included into the $terms_list.
	 *
	 * @since 2.7.0
	 *
	 * @param array $terms_list Array of term objects.
	 * @param int   $parent_id  .
	 *
	 * @return bool
	 */
	protected function is_parent_term_included( $terms_list, $parent_id ) {
		$is_parent_found = false;

		foreach ( $terms_list as $term => $term_details ) {
			if ( $parent_id === $term_details->term_id ) {
				$is_parent_found = true;
			}
		}

		return $is_parent_found;
	}

	/**
	 * Retrieve the term slug.
	 *
	 * @since 2.7.0
	 *
	 * @param int    $parent_id .
	 * @param string $taxonomy  .
	 *
	 * @return int|string
	 */
	protected function get_parent_slug( $parent_id, $taxonomy ) {
		$term_data = get_term( $parent_id, $taxonomy );
		$slug = '' === $term_data->slug ? 0 : $term_data->slug;

		return $slug;
	}

	/**
	 * Prepare array of all parents so the correct hierarchy can be restored during the import.
	 *
	 * @since 2.7.0
	 *
	 * @param int    $parent_id .
	 * @param string $taxonomy  .
	 *
	 * @return array
	 */
	protected function get_all_parents( $parent_id, $taxonomy ) {
		$parents_data_array = array();
		$parent = $parent_id;

		// retrieve data for all parent categories
		if ( 0 !== $parent  ) {
			while( 0 !== $parent ) {
				$parent_term_data = get_term( $parent, $taxonomy );
				$parents_data_array[$parent_term_data->slug] = array(
					'name' => $parent_term_data->name,
					'description' => $parent_term_data->description,
					'parent' => 0 !== $parent_term_data->parent ? $this->get_parent_slug( $parent_term_data->parent, $taxonomy ) : 0,
				);

				$parent = $parent_term_data->parent;
			}
		}
		//reverse order of items, to simplify the restoring process
		return array_reverse( $parents_data_array );
	}

	/**
	 * Check if a layout exists in the database already based on both its title and its slug.
	 *
	 * @param string $title
	 * @param string $slug
	 *
	 * @return int $post_id The post id if it exists, zero otherwise.
	 */
	protected static function layout_exists( $title, $slug ) {
		global $wpdb;

		return (int) $wpdb->get_var( $wpdb->prepare(
			"SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_name = %s",
			array(
				wp_unslash( sanitize_post_field( 'post_title', $title, 0, 'db' ) ),
				wp_unslash( sanitize_post_field( 'post_name', $slug, 0, 'db' ) ),
			)
		) );
	}

	/**
	 * Update shortcode with onboarding preset.
	 *
	 * @since 4.26.1
	 *
	 * @param array $shortcode_object - The shortcode object to be updated.
	 * @param array $presets_lookup   - The lookup table for presets.
	 */
	protected function _update_shortcode_with_onboarding_preset( &$shortcode_object, $presets_lookup ) {
		$global_presets_manager  = ET_Builder_Global_Presets_Settings::instance();
		$module_preset_attribute = ET_Builder_Global_Presets_Settings::MODULE_PRESET_ATTRIBUTE;
		$global_presets          = $global_presets_manager->get_global_presets();

		foreach ( $shortcode_object as &$module ) {
			$module_type = $global_presets_manager->maybe_convert_module_type( $module['type'], $module['attrs'] );

			if ( isset( $presets_lookup[ $module_type ] ) ) {
				$module_preset_id = et_()->array_get( $module, "attrs.{$module_preset_attribute}", 'default' );

				if ( 'default' === $module_preset_id ) {
					continue;
				}

				$module_preset_name = et_()->array_get( $presets_lookup, "{$module_type}.{$module_preset_id}", '' );

				foreach ( $global_presets->$module_type->presets as $preset_id => $preset ) {
					if ( $preset->name === $module_preset_name ) {
						$module['attrs'][ $module_preset_attribute ] = $preset_id;
						break;
					}
				}
			}

			if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
				$this->_update_shortcode_with_onboarding_preset( $module['content'], $presets_lookup );
			}
		}
	}

	/**
	 * Imports Global Presets
	 *
	 * @since 4.0.10 Made public.
	 *
	 * @param array  $presets           - The Global Presets to be imported.
	 * @param bool   $is_temp_presets   - Whether the presets are temporary or not.
	 * @param bool   $override_defaults - Whether the default presets should be overridden.
	 * @param string $preset_prefix     - A prefix to be prepended to preset name of the preset being imported, if override_defaults is true.
	 * @param bool   $skip_default      - Whether updating the default preset key should be skipped.
	 *
	 * @return boolean
	 */
	public function import_global_presets(
		$presets,
		$is_temp_presets   = false,
		$override_defaults = false,
		$preset_prefix     = '',
		$skip_default = false
	) {
		if ( ! is_array( $presets ) ) {
			return false;
		}

		$all_modules            = ET_Builder_Element::get_modules();
		$module_presets_manager = ET_Builder_Global_Presets_Settings::instance();
		$global_presets         = $module_presets_manager->get_global_presets();
		$temp_presets           = $module_presets_manager->get_temp_presets();
		$presets_to_import      = array();

		foreach ( $presets as $module_type => $module_presets ) {
			$presets_to_import[ $module_type ] = array(
				'presets' => array(),
			);

			if ( ! isset( $global_presets->$module_type->presets ) ) {
				$initial_preset_structure = ET_Builder_Global_Presets_Settings::generate_module_initial_presets_structure( $module_type, $all_modules );

				$global_presets->$module_type = $initial_preset_structure;
			}

			if ( $override_defaults && ! $skip_default ) {
				$global_presets->$module_type->default = $module_presets['default'];
			}

			$local_presets      = $global_presets->$module_type->presets;
			$local_preset_names = array();

			foreach ( $local_presets as $preset_id => $preset ) {
				// Skip temp presets.
				if ( ! isset( $temp_preset[ $module_type ]['presets'][ $preset_id ] ) ) {
					array_push( $local_preset_names, $preset->name );
				}
			}

			foreach ( $module_presets['presets'] as $preset_id => $preset ) {
				$name = sanitize_text_field( $preset['name'] );

				if ( $override_defaults && $preset_prefix ) {
					$name = $preset_prefix . ' ' . $name;

					// No duplicates allowed on override.
					if ( in_array( $name, $local_preset_names, true ) ) {
						continue;
					}
				} else {
					if ( in_array( $name, $local_preset_names, true ) ) {
						$name .= ' ' . esc_html__( 'imported', 'et-core' );
					}
				}

				$presets_to_import[ $module_type ]['presets'][ $preset_id ] = array(
					'name'     => $name,
					'created'  => time() * 1000,
					'updated'  => time() * 1000,
					'version'  => $preset['version'],
					'settings' => $preset['settings'],
				);
			}
		}

		if ( $is_temp_presets ) {
			et_update_option( ET_Builder_Global_Presets_Settings::GLOBAL_PRESETS_OPTION_TEMP, $presets_to_import );
		}

		// Merge existing Global Presets with imported ones
		foreach ( $presets_to_import as $module_type => $module_presets ) {
			foreach ( $module_presets['presets'] as $preset_id => $preset ) {
				$global_presets->$module_type->presets->$preset_id           = (object) array();
				$global_presets->$module_type->presets->$preset_id->name     = sanitize_text_field( $preset['name'] );
				$global_presets->$module_type->presets->$preset_id->created  = $preset['created'];
				$global_presets->$module_type->presets->$preset_id->updated  = $preset['updated'];
				$global_presets->$module_type->presets->$preset_id->version  = $preset['version'];
				$global_presets->$module_type->presets->$preset_id->settings = (object) array();

				foreach ( $preset['settings'] as $setting_name => $value ) {
					$setting_name_sanitized = sanitize_text_field( $setting_name );
					$value_sanitized        = sanitize_text_field( $value );

					$global_presets->$module_type->presets->$preset_id->settings->$setting_name_sanitized = $value_sanitized;
				}

				// Inject Global colors into imported presets.
				$preset_settings = (array) $global_presets->$module_type->presets->$preset_id->settings;
				$global_presets->$module_type->presets->$preset_id->settings = ET_Builder_Global_Presets_Settings::maybe_set_global_colors( $preset_settings );
			}
		}

		// Update option for product setting (last attr in args list).
		et_update_option( ET_Builder_Global_Presets_Settings::GLOBAL_PRESETS_OPTION, $global_presets, false, '', '', true );

		if ( ! $is_temp_presets ) {
			$global_presets_history = ET_Builder_Global_Presets_History::instance();
			$global_presets_history->add_global_history_record( $global_presets );
		}

		return true;
	}

	/**
	 * Prepare to import non-duplicate presets.
	 *
	 * @since 4.26.0
	 *
	 * @param array $presets Presets to import.
	 *
	 * @return array
	 */
	public function prepare_to_import_non_duplicate_presets( $presets ) {
		$global_presets_manager = ET_Builder_Global_Presets_Settings::instance();
		$existing_presets       = $global_presets_manager->get_global_presets();
		$existing_names         = [];

		foreach ( $existing_presets as $module_slug => $data ) {
			foreach ( $data->presets as $preset ) {
				$existing_names[ $module_slug ][ trim( $preset->name ) ] = true;
			}
		}

		foreach ( $presets as $module_slug => $data ) {
			foreach ( $data['presets'] as $preset_id => $preset ) {
				if ( isset( $existing_names[ $module_slug ][ trim( $preset['name'] ) ] ) ) {
					unset( $presets[ $module_slug ]['presets'][ $preset_id ] );
				}
			}
		}

		return $presets;
	}

	/**
	 * Import global colors.
	 *
	 * @since 4.9.0
	 *
	 * @param array $incoming_global_colors Global Colors Array.
	 *
	 * @return void
	 */
	public function import_global_colors( $incoming_global_colors ) {
		$excluded_colors = array( 'gcid-primary-color', 'gcid-secondary-color', 'gcid-heading-color', 'gcid-body-color' );
		$global_colors   = array();

		foreach ( $incoming_global_colors as $incoming_gcolor ) {
			$key                   = et_()->sanitize_text_fields( $incoming_gcolor[0] );

			// Skip excluded colors.
			if ( in_array( $key, $excluded_colors, true ) ) {
				continue;
			}

			$global_colors[ $key ] = et_()->sanitize_text_fields( $incoming_gcolor[1] );
		}

		$stored_global_colors = et_builder_get_all_global_colors();

		if ( ! empty( $stored_global_colors ) ) {
			$global_colors = array_merge( $global_colors, $stored_global_colors );
		}

		et_update_option( 'et_global_colors', $global_colors );
	}

	/**
	 * Import post.
	 *
	 * @since 2.7.0
	 *
	 * @param array $posts Array of data formatted by the portability exporter.
	 *
	 * @return bool
	 */
	protected function import_posts( $posts ) {
		/**
		 * Filters the array of builder layouts to import. Returning an empty value will
		 * short-circuit the import process.
		 *
		 * @since 3.0.99
		 *
		 * @param array $posts
		 */
		$posts = apply_filters( 'et_core_portability_import_posts', $posts );

		$imported_posts = array();

		if ( empty( $posts ) ) {
			return false;
		}

		foreach ( $posts as $post ) {
			if ( isset( $post['post_status'] ) && 'auto-draft' === $post['post_status'] ) {
				continue;
			}

			$fields_validatation = array(
				'ID'         => 'intval',
				'post_title' => 'sanitize_text_field',
				'post_type'  => 'sanitize_text_field',
			);

			if ( ! $post = $this->validate( $post, $fields_validatation ) ) {
				continue;
			}

			$layout_exists = self::layout_exists( $post['post_title'], $post['post_name'] );

			if ( $layout_exists && get_post_type( $layout_exists ) === $post['post_type'] ) {
				// Make sure the post is published.
				if ( 'publish' !== get_post_status( $layout_exists ) ) {
					wp_update_post( array(
						'ID'          => intval( $layout_exists ),
						'post_status' => 'publish',
					) );
				}

				$imported_posts[] = intval( $layout_exists );

				continue;
			}

			$post['import_id'] = $post['ID'];
			unset( $post['ID'] );

			$post['post_author'] = (int) get_current_user_id();

			// Insert or update post.
			$post_id = wp_insert_post( $post, true );

			if ( ! $post_id || is_wp_error( $post_id ) ) {
				continue;
			}

			$imported_posts[] = $post_id;

			// Insert and set terms.
			if ( isset( $post['terms'] ) && is_array( $post['terms'] ) ) {
				$processed_terms = array();

				foreach ( $post['terms'] as $term ) {
					$fields_validatation = array(
						'name'        => 'sanitize_text_field',
						'slug'        => 'sanitize_title',
						'taxonomy'    => 'sanitize_title',
						'parent'      => 'sanitize_title',
						'description' => 'wp_kses_post',
					);

					if ( ! $term = $this->validate( $term, $fields_validatation ) ) {
						continue;
					}

					if ( empty( $term['parent'] ) ) {
						$parent = 0;
					} else {
						if ( isset( $term['all_parents'] ) && ! empty( $term['all_parents'] ) ) {
							$this->restore_parent_categories( $term['all_parents'], $term['taxonomy'] );
						}

						$parent = term_exists( $term['parent'], $term['taxonomy'] );

						if ( is_array( $parent ) ){
							$parent = $parent['term_id'];
						}
					}

					if ( ! $insert = term_exists( $term['slug'], $term['taxonomy'] ) ) {
						$insert = wp_insert_term( $term['name'], $term['taxonomy'], array(
							'slug'        => $term['slug'],
							'description' => $term['description'],
							'parent'      => intval( $parent ),
						) );
					}

					if ( is_array( $insert ) && ! is_wp_error( $insert ) ) {
						$processed_terms[$term['taxonomy']][] = $term['slug'];
					}
				}

				// Set post terms.
				foreach ( $processed_terms as $taxonomy => $ids ) {
					wp_set_object_terms( $post_id, $ids, $taxonomy );
				}
			}

			// Insert or update post meta.
			if ( isset( $post['post_meta'] ) && is_array( $post['post_meta'] ) ) {
				foreach ( $post['post_meta'] as $meta_key => $meta ) {

					$meta_key = sanitize_text_field( $meta_key );

					if ( count( $meta ) < 2 ) {
						$meta = wp_kses_post( $meta[0] );
					} else {
						$meta = array_map( 'wp_kses_post', $meta );
					}

					update_post_meta( $post_id, $meta_key, $meta );
				}
			}

			// Assign new thumbnail if provided.
			if ( isset( $post['thumbnail'] ) ) {
				set_post_thumbnail( $post_id, $post['thumbnail'] );
			}
		}

		return $imported_posts;
	}

	/**
	 * Restore the categories hierarchy in library.
	 *
	 * @since 2.7.0
	 *
	 * @param array $parents_array    Array of parent categories data.
	 * @param string $taxonomy
	 */
	protected function restore_parent_categories( $parents_array, $taxonomy ) {
		foreach( $parents_array as $slug => $category_data ) {
			$current_category = term_exists( $slug, $taxonomy );

			if ( ! is_array( $current_category ) ) {
				$parent_id = 0 !== $category_data['parent'] ? term_exists( $category_data['parent'], $taxonomy ) : 0;
				wp_insert_term( $category_data['name'], $taxonomy, array(
					'slug'        => $slug,
					'description' => $category_data['description'],
					'parent'      => is_array( $parent_id ) ? $parent_id['term_id'] : $parent_id,
				) );
			} else if ( ( ! isset( $current_category['parent'] ) || 0 === $current_category['parent'] ) && 0 !== $category_data['parent'] ) {
				$parent_id = 0 !== $category_data['parent'] ? term_exists( $category_data['parent'], $taxonomy ) : 0;
				wp_update_term( $current_category['term_id'], $taxonomy, array( 'parent' => is_array( $parent_id ) ? $parent_id['term_id'] : $parent_id ) );
			}
		}
	}

	/**
	 * Generates UUIDs for the presets to avoid collisions.
	 *
	 * @since 4.5.0
	 *
	 * @param array $global_presets - The Global Presets to be imported
	 *
	 * @return array - The list of module types for which preset ids have been changed
	 */
	public function prepare_to_import_layout_presets( &$global_presets ) {
		$preset_rewrite_map = array();
		$initial_preset_id = ET_Builder_Global_Presets_Settings::MODULE_INITIAL_PRESET_ID;

		foreach ( $global_presets as $component_type => &$component_presets ) {
			$preset_rewrite_map[ $component_type ] = array();
			foreach ( $component_presets['presets'] as $preset_id => $preset ) {
				$new_id = ET_Core_Data_Utils::uuid_v4();
				$component_presets['presets'][ $new_id ] = $preset;
				$preset_rewrite_map[ $component_type ][ $preset_id ] = $new_id;
				unset( $component_presets['presets'][ $preset_id ] );
			}

			if ( $component_presets['default'] === $initial_preset_id && ! isset( $preset_rewrite_map[ $component_type ][ $initial_preset_id ] ) ) {
				$new_id = ET_Core_Data_Utils::uuid_v4();
				$component_presets['default'] = $new_id;
				if ( isset( $component_presets['presets'][ $initial_preset_id ] ) ) {
					$component_presets['presets'][ $new_id ] = $component_presets['presets'][ $initial_preset_id ];
					unset( $component_presets['presets'][ $initial_preset_id ] );
				}
				$preset_rewrite_map[ $component_type ][ $initial_preset_id ] = $new_id;
			} else {
				$component_presets['default'] = $preset_rewrite_map[ $component_type ][ $component_presets['default'] ];
			}
		}

		return $preset_rewrite_map;
	}

	/**
	 * Injects the given Global Presets settings into the imported layout
	 *
	 * @since 4.5.0
	 *
	 * @param array $shortcode_object - The multidimensional array representing a page/module structure
	 * @param array $global_presets - The Global Presets to be imported
	 * @param array $preset_rewrite_map - The list of module types for which preset ids have been changed
	 */
	protected function rewrite_module_preset_ids( &$shortcode_object, $global_presets, $preset_rewrite_map ) {
		$global_presets_manager  = ET_Builder_Global_Presets_Settings::instance();
		$module_preset_attribute = ET_Builder_Global_Presets_Settings::MODULE_PRESET_ATTRIBUTE;

		foreach ( $shortcode_object as &$module ) {
			$module_type      = $global_presets_manager->maybe_convert_module_type( $module['type'], $module['attrs'] );
			$module_preset_id = et_()->array_get( $module, "attrs.{$module_preset_attribute}", 'default' );

			if ( $module_preset_id === 'default' ) {
				$module['attrs'][ $module_preset_attribute ] = et_()->array_get( $global_presets, "{$module_type}.default", 'default' );
			} else {
				if ( isset( $preset_rewrite_map[ $module_type ][ $module_preset_id ] ) ) {
					$module['attrs'][ $module_preset_attribute ] = $preset_rewrite_map[ $module_type ][ $module_preset_id ];
				} else {
					$module['attrs'][ $module_preset_attribute ] = et_()->array_get( $global_presets, "{$module_type}.default", 'default' );
				}
			}

			if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
				$this->rewrite_module_preset_ids( $module['content'], $global_presets, $preset_rewrite_map );
			}
		}
	}

	/**
	 * Injects global color ids into the imported layout
	 *
	 * @since 4.10.0
	 *
	 * @param array $data - The multidimensional array representing a import object structure.
	 */
	protected function _maybe_inject_gcid( &$data, &$gcolors = null ) {
		foreach ( $data as $post_id => &$post_data ) {
			if ( is_array( $post_data ) ) {
				$shortcode_object = et_fb_process_shortcode( $post_data['post_content'] );
				$this->_inject_gcid( $shortcode_object, $gcolors );
				$data[ $post_id ]['post_content'] = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
			} else {
				$shortcode_object = et_fb_process_shortcode( $post_data );
				$this->_inject_gcid( $shortcode_object, $gcolors );
				$data[ $post_id ] = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
			}
		}

		unset( $post_data );

		return $data;
	}

	/**
	 * Process and inject global color ids into the shortcode
	 *
	 * @since 4.10.0
	 *
	 * @param array $shortcode_object - The multidimensional array representing a page/module structure.
	 */
	protected function _inject_gcid( &$shortcode_object, &$global_colors ) {
		foreach ( $shortcode_object as &$module ) {
			// No global colors set for this module.
			if ( ! empty( $module['attrs']['global_colors_info'] ) && ! empty( $global_colors ) ) {
				$colors_array = json_decode( $module['attrs']['global_colors_info'], true );

				if ( ! empty( $colors_array ) ) {
					foreach ( $colors_array as $color_id => $attrs_array ) {
						if ( ! empty( $attrs_array ) ) {
							// Get settings for this global color.
							$color = '';
							foreach ( $global_colors as $gcid ) {
								if ( $color_id === $gcid[0] && 'yes' === $gcid[1]['active'] ) {
									$color = $gcid[1]['color'];
								}
							}

							foreach ( $attrs_array as $attr_name ) {
								if ( isset( $module['attrs'][ $attr_name ] ) && '' !== $module['attrs'][ $attr_name ] ) {
									// Match substring (needed for attrs like gradient stops).
									$module['attrs'][ $attr_name ] = str_replace( $color, $color_id, $module['attrs'][ $attr_name ] );
								}
							}
						}
					}
				}
			}

			if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
				$this->_inject_gcid( $module['content'], $global_colors );
			}
		}
	}

	/**
	 * Injects the given Global Presets settings into the imported layout
	 *
	 * @since 3.26
	 *
	 * @param array $shortcode_object - The multidimensional array representing a page/module structure
	 * @param array $global_presets   - The Global Presets to be applied
	 */
	protected function _apply_global_presets( &$shortcode_object, $global_presets ) {
		$global_presets_manager  = ET_Builder_Global_Presets_Settings::instance();
		$module_preset_attribute = ET_Builder_Global_Presets_Settings::MODULE_PRESET_ATTRIBUTE;

		foreach ( $shortcode_object as &$module ) {
			$module_type = $global_presets_manager->maybe_convert_module_type( $module['type'], $module['attrs'] );

			if ( isset( $global_presets[ $module_type ] ) ) {
				$default_preset_id = et_()->array_get( $global_presets, "{$module_type}.default", null );
				$module_preset_id  = et_()->array_get( $module, "attrs.{$module_preset_attribute}", $default_preset_id );

				if ( 'default' === $module_preset_id ) {
					$module_preset_id = $default_preset_id;
				}

				$preset_settings = array();

				if ( isset( $global_presets[ $module_type ]['presets'][ $module_preset_id ] ) ) {
					$preset_settings = $global_presets[ $module_type ]['presets'][ $module_preset_id ]['settings'];
				} else {
					if ( isset( $global_presets[ $module_type ]['presets'][ $default_preset_id ]['settings'] ) ) {
						$preset_settings = $global_presets[ $module_type ]['presets'][ $default_preset_id ]['settings'];
					}
				}

				$merged_global_colors_info = array();

				if ( isset( $module['attrs']['global_colors_info'] ) ) {
					// Retrive global_colors_info from post meta, which saved as string[][].
					$gc_info_prepared = str_replace(
						array( '&#91;', '&#93;' ),
						array( '[', ']' ),
						$module['attrs']['global_colors_info']
					);

					$used_global_colors        = json_decode( $gc_info_prepared, true );
					$merged_global_colors_info = $used_global_colors;
				}

				// Merge Global Colors from preset.
				if ( isset( $preset_settings['global_colors_info'] ) ) {
					$preset_global_colors = json_decode( $preset_settings['global_colors_info'], true );

					if ( ! empty( $preset_global_colors ) ) {
						foreach ( $preset_global_colors as $color_id => $settings_list ) {
							if ( ! empty( $settings_list ) ) {
								if ( isset( $used_global_colors[ $color_id ] ) ) {
									$merged_global_colors_info[ $color_id ] = array_merge( $used_global_colors[ $color_id ], $settings_list );
								} else {
									$merged_global_colors_info[ $color_id ] = $settings_list;
								}

								foreach ( $settings_list as $setting_name ) {
									$preset_settings[ $setting_name ] = $color_id;
								}
							}
						}
					}
				}

				$module['attrs']                       = array_merge( $preset_settings, $module['attrs'] );
				$module['attrs']['global_colors_info'] = wp_json_encode( $merged_global_colors_info );
			}

			if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
				$this->_apply_global_presets( $module['content'], $global_presets );
			}
		}
	}

	/**
	 * Restrict data according the argument registered.
	 *
	 * @since 2.7.0
	 *
	 * @param array  $data   Array of data the query is applied on.
	 * @param string $method Whether data should be set or reset. Accepts 'set' or 'unset' which is
	 *                       should be used when treating existing data in the db.
	 *
	 * @return array
	 */
	protected function apply_query( $data, $method ) {
		$operator = ( $method === 'set' ) ? true : false;

		foreach ( $data as $id => $value ) {
			if ( ! empty( $this->instance->exclude ) && isset( $this->instance->exclude[$id] ) === $operator ) {
				unset( $data[$id] );
			}

			if ( ! empty( $this->instance->include ) && isset( $this->instance->include[$id] ) === ! $operator ) {
				unset( $data[$id] );
			}
		}

		return $data;
	}

	/**
	 * Serialize images in chunks.
	 *
	 * @since 4.0
	 *
	 * @param array $images
	 * @param string $method Method applied on images.
	 * @param string $id Unique ID to use for temporary files.
	 * @param integer $chunk
	 *
	 * @return array
	 */
	protected function chunk_images( $images, $method, $id, $chunk = 0 ) {
		$images_per_chunk = 5;
		$chunks           = 1;

		/**
		 * Filters whether or not images in the file being imported should be paginated.
		 *
		 * @since 3.0.99
		 *
		 * @param bool $paginate_images Default `true`.
		 */
		$paginate_images = apply_filters( 'et_core_portability_paginate_images', true );

		if ( $paginate_images && count( $images ) > $images_per_chunk ) {
			$chunks       = ceil( count( $images ) / $images_per_chunk );
			$slice        = $images_per_chunk * $chunk;
			$images       = array_slice( $images, $slice, $images_per_chunk );
			$images       = $this->$method( $images );
			$filesystem   = $this->get_filesystem();
			$temp_file_id = sanitize_file_name( "images_{$id}" );
			$temp_file    = $this->temp_file( $temp_file_id, 'et_core_export' );
			$temp_images  = json_decode( $filesystem->get_contents( $temp_file ), true );

			if ( is_array( $temp_images ) ) {
				$images = array_merge( $temp_images, $images );
			}

			if ( $chunk + 1 < $chunks ) {
				$filesystem->put_contents( $temp_file, wp_json_encode( (array) $images ) );
			} else {
				$this->delete_temp_files( 'et_core_export', array( $temp_file_id => $temp_file ) );
			}
		} else {
			$images = $this->$method( $images );
		}

		return array(
			'ready'  => $chunk + 1 >= $chunks,
			'chunks' => $chunks,
			'images' => $images,
		);
	}

	/**
	 * Paginate images processing.
	 *
	 * @since    1.0.0
	 *
	 * @param        $images
	 * @param string $method    Method applied on images.
	 * @param int    $timestamp Timestamp used to store data upon pagination.
	 *
	 * @return array
	 * @internal param array $data Array of images.
	 */
	protected function maybe_paginate_images( $images, $method, $timestamp ) {
		et_core_nonce_verified_previously();

		$page = isset( $_POST['page'] ) ? (int) $_POST['page'] : 1;
		$result = $this->chunk_images( $images, $method, $timestamp, max( $page - 1, 0 ) );

		if ( ! $result['ready'] ) {
			wp_send_json( array(
				'page'        => $page,
				'total_pages' => $result['chunks'],
				'timestamp'   => $timestamp,
			) );
		}

		return $result['images'];
	}

	/**
	 * Get all thumbnail images in the data given.
	 *
	 * @since 4.7.4
	 *
	 * @param array $data Array of data.
	 *
	 * @return array
	 */
	protected function _get_thumbnail_images( $data ) {
		$thumbnails = array();

		foreach ( $data as $post_data ) {
			// If post has thumbnail.
			if ( ! empty( $post_data->post_meta ) && ! empty( $post_data->post_meta->_thumbnail_id ) ) {
				$post_thumbnail = get_the_post_thumbnail_url( $post_data->ID );

				// If thumbnail image found in the WP Media library.
				if ( $post_thumbnail ) {
					$thumbnail_id    = (int) $post_data->post_meta->_thumbnail_id[0];
					$thumbnail_image = $this->encode_images( array( $thumbnail_id ) );

					$thumbnails[ $thumbnail_id ] = $thumbnail_image;
				}
			}
		}

		return $thumbnails;
	}

	/**
	 * Get all images in the data given.
	 *
	 * @since 2.7.0
	 *
	 * @param array $data  Array of data.
	 * @param bool  $force Set whether the value should be added by force. Usually used for image ids.
	 *
	 * @return array
	 */
	protected function get_data_images( $data, $force = false ) {
		if ( empty( $data ) ) {
			return array();
		}

		$images     = array();
		$images_src = array();
		$basenames  = array(
			'src',
			'image_url',
			'background_image',
			'image',
			'url',
			'bg_img_?\d?',
		);
		$suffixes  = array(
			'__hover',
			'_tablet',
			'_phone'
		);

		foreach ( $basenames as $basename ) {
			$images_src[] = $basename;
			foreach ( $suffixes as $suffix ) {
				$images_src[] = $basename . $suffix;
			}
		}

		foreach ( $data as $value ) {
			// If the $value is an object and there is no post_content property,
			// it's unlikely to contain any image data so we can continue with the next iteration.
			if ( is_object( $value ) && ! property_exists( $value, 'post_content' ) ) {
				continue;
			}

			if ( is_array( $value ) || is_object( $value ) ) {
				// If the $value contains the post_content property, set $value to use
				// this object's property value instead of the entire object.
				if ( is_object( $value ) && property_exists( $value, 'post_content' ) ) {
					$value = $value->post_content;
				}

				$images = array_merge( $images, $this->get_data_images( (array) $value ) );
				continue;
			}

			// Extract images from HTML or shortcodes.
			if ( preg_match_all( '/(' . implode( '|', $images_src ) . ')="(?P<src>\w+[^"]*)"/i', $value, $matches ) ) {
				foreach ( array_unique( $matches['src'] ) as $key => $src ) {
					$images = array_merge( $images, $this->get_data_images( array( $key => $src ) ) );
				}
			}

			// Extract images from shortcodes gallery.
			if ( preg_match_all( '/gallery_ids="(?P<ids>\w+[^"]*)"/i', $value, $matches ) ) {
				foreach ( array_unique( $matches['ids'] ) as $galleries ) {
					$explode = explode( ',', str_replace( ' ', '', $galleries ) );

					foreach ( $explode as $image_id ) {
						$images = array_merge( $images, $this->get_data_images( array( (int) $image_id ), true ) );
					}
				}
			}

			if ( preg_match( '/^.+?\.(jpg|jpeg|jpe|png|gif|svg|webp)/', $value, $match ) || $force ) {
				$basename = basename( $value );

				// Skip if the value is not a valid URL or an image ID (integer).
				if ( ! ( wp_http_validate_url( $value ) || is_int( $value ) ) ) {
					continue;
				}

				// Skip if the images array already contains the value to avoid duplicates.
				if ( isset( $images[$value] ) ) {
					continue;
				}

				$images[$value] = $value;
			}
		}

		return $images;
	}

	/**
	 * Get the attachment post id for the given url.
	 *
	 * @since 3.22.3
	 *
	 * @param string $url The url of an attachment file.
	 *
	 * @return int
	 */
	protected function _get_attachment_id_by_url( $url ) {
		global $wpdb;

		// Remove any thumbnail size suffix from the filename and use that as a fallback.
		$fallback_url = preg_replace( '/-\d+x\d+(\.[^.]+)$/i', '$1', $url );

		// Scenario: Trying to find the attachment for a file called x-150x150.jpg.
		// 1. Since WordPress adds the -150x150 suffix for thumbnail sizes we cannot be
		//    sure if this is an attachment or an attachment's generated thumbnail.
		// 2. Since both x.jpg and x-150x150.jpg can be uploaded as separate attachments
		//    we must decide which is a better match.
		// 3. The above is why we order by guid length and use the first result.
		$attachments_query = $wpdb->prepare( "
			SELECT id
			FROM $wpdb->posts
			WHERE `post_type` = %s
				AND `guid` IN ( %s, %s )
			ORDER BY CHAR_LENGTH( `guid` ) DESC
		", 'attachment', esc_url_raw( $url ), esc_url_raw( $fallback_url ) );

		$attachment_id = (int) $wpdb->get_var( $attachments_query );

		return $attachment_id;
	}

	/**
	 * Encode image in a base64 format.
	 *
	 * @since 2.7.0
	 *
	 * @param array $images Array of data for which images need to be encoded if any.
	 *
	 * @return array
	 */
	protected function encode_images( $images ) {
		$encoded = array();

		foreach ( $images as $url ) {
			$id = 0;
			$image = '';

			if ( is_int( $url ) ) {
				$id = $url;
				$url = wp_get_attachment_url( $id );
			} else {
				$id = $this->_get_attachment_id_by_url( $url );
			}

			if ( $id > 0 ) {
				$image = $this->_encode_attachment_image( $id );
			}

			if ( empty( $image ) ) {
				// Case 1: No attachment found.
				// Case 2: Attachment found, but file does not exist (may be stored on a CDN, for example).
				$image = $this->_encode_remote_image( $url );
			}

			if ( empty( $image ) ) {
				// All fetching methods have failed - bail on encoding.
				continue;
			}

			$encoded[ $url ] = array(
				'encoded' => $image,
				'url'     => $url,
			);

			// Add image id for replacement purposes.
			if ( $id > 0 ) {
				$encoded[ $url ]['id'] = $id;
			}
		}

		return $encoded;
	}

	/**
	 * Encode an image attachment.
	 *
	 * @since 3.22.3
	 *
	 * @param int $id
	 *
	 * @return string
	 */
	protected function _encode_attachment_image( $id ) {
		/**
		 * @var WP_Filesystem_Base $wp_filesystem
		 */
		global $wp_filesystem;

		if ( ! current_user_can( 'read_post', $id ) ) {
			return '';
		}

		$file = get_attached_file( $id );

		if ( ! $wp_filesystem->exists( $file ) ) {
			return '';
		}

		$image = $wp_filesystem->get_contents( $file );

		if ( empty( $image ) ) {
			return '';
		}

		return base64_encode( $image );
	}

	/**
	 * Encode a remote image.
	 *
	 * @since 3.22.3
	 *
	 * @param string $url
	 *
	 * @return string
	 */
	protected function _encode_remote_image( $url ) {
		$request = wp_remote_get( esc_url_raw( $url ), array(
			'timeout'     => 2,
			'redirection' => 2,
		) );

		if ( ! is_array( $request ) || is_wp_error( $request ) ) {
			return '';
		}

		if ( ! self::$_->includes( $request['headers']['content-type'], 'image' ) ) {
			return '';
		}

		$image = wp_remote_retrieve_body( $request );

		if ( ! $image ) {
			return '';
		}

		return base64_encode( $image );
	}

	/**
	 * Decode base64 formatted image and upload it to WP media.
	 *
	 * @since 2.7.0
	 *
	 * @param array $images Array of encoded images which needs to be uploaded.
	 *
	 * @return array
	 */
	protected function upload_images( $images ) {
		$filesystem = $this->set_filesystem();

		/**
		 * Filters whether or not to allow duplicate images to be uploaded
		 * during Portability import.
		 *
		 * @since 4.14.8
		 *
		 * @param bool $allow_duplicates Whether or not to allow duplicates. Default is `false`.
		 */
		$allow_duplicates = apply_filters( 'et_core_portability_import_attachment_allow_duplicates', false );

		foreach ( $images as $key => $image ) {
			$basename = sanitize_file_name( wp_basename( $image['url'] ) );
			$id       = 0;
			$url      = '';

			if ( ! $allow_duplicates ) {
				$attachments = get_posts( array(
					'posts_per_page' => -1,
					'post_type'      => 'attachment',
					'meta_key'       => '_wp_attached_file',
					'meta_value'     => pathinfo( $basename, PATHINFO_FILENAME ),
					'meta_compare'   => 'LIKE',
				) );

				// Avoid duplicates.
				if ( ! is_wp_error( $attachments ) && ! empty( $attachments ) ) {
					foreach ( $attachments as $attachment ) {
						$attachment_url = wp_get_attachment_url( $attachment->ID );
						$file           = get_attached_file( $attachment->ID );
						$filename       = sanitize_file_name( wp_basename( $file ) );

						// Use existing image only if the content matches.
						if ( $filesystem->get_contents( $file ) === base64_decode( $image['encoded'] ) ) {
							$id  = isset( $image['id'] ) ? $attachment->ID : 0;
							$url = $attachment_url;

							break;
						}
					}
				}
			}

			// Create new image.
			if ( empty( $url ) ) {
				$temp_file = wp_tempnam();
				$filesystem->put_contents( $temp_file, base64_decode( $image['encoded'] ) );
				$filetype = wp_check_filetype_and_ext( $temp_file, $basename );

				if ( ! $allow_duplicates && ! empty( $attachments ) && ! is_wp_error( $attachments ) ) {
					// Avoid further duplicates if the proper_filename matches an existing image.
					if ( isset( $filetype['proper_filename'] ) && $filetype['proper_filename'] !== $basename ) {
						foreach ( $attachments as $attachment ) {
							$attachment_url = wp_get_attachment_url( $attachment->ID );
							$file           = get_attached_file( $attachment->ID );
							$filename       = sanitize_file_name( wp_basename( $file ) );

							if ( isset( $filename ) && $filename === $filetype['proper_filename'] ) {
								// Use existing image only if the basenames and content match.
								if ( $filesystem->get_contents( $file ) === $filesystem->get_contents( $temp_file ) ) {
									$id  = isset( $image['id'] ) ? $attachment->ID : 0;
									$url = $attachment_url;

									$filesystem->delete( $temp_file );

									break;
								}
							}
						}
					}
				}

				$file = array(
					'name'     => $basename,
					'tmp_name' => $temp_file,
				);


				$upload        = media_handle_sideload( $file );
				$attachment_id = is_wp_error( $upload ) ? 0 : $upload;

				/**
				 * Fires when image attachments are created during portability import.
				 *
				 * @since 4.14.6
				 *
				 * @param int $attachment_id The attachment id or 0 if attachment upload failed.
				 */
				do_action( 'et_core_portability_import_attachment_created', $attachment_id );

				if ( ! is_wp_error( $upload ) ) {
					// Set the replacement as an id if the original image was set as an id (for gallery).
					$id = isset( $image['id'] ) ? $upload : 0;
					$url = wp_get_attachment_url( $upload );
				} else {
					// Make sure the temporary file is removed if media_handle_sideload didn't take care of it.
					$filesystem->delete( $temp_file );
				}
			}

			// Only declare the replace if a url is set.
			if ( $id > 0 ) {
				$images[$key]['replacement_id'] = $id;
			}

			if ( ! empty( $url ) ) {
				$images[$key]['replacement_url'] = $url;
			}

			unset( $url );
		}

		return $images;
	}

	/**
	 * Replace encoded image url with a real url
	 *
	 * @param $subject     - The string to perform replacing for
	 * @param array $image - The image settings
	 *
	 * @return string|string[]|null
	 */
	protected function replace_image_url( $subject, $image ) {
		if ( isset( $image['replacement_id'] ) && isset( $image['id'] ) ) {
			$search      = $image['id'];
			$replacement = $image['replacement_id'];
			$subject     = preg_replace( "/(gallery_ids=.*?){$search}(.*?)/", "\${1}{$replacement}\${2}", $subject );
		}

		if ( isset( $image['url'] ) && isset( $image['replacement_url'] ) && $image['url'] !== $image['replacement_url'] ) {
			$search      = $image['url'];
			$replacement = $image['replacement_url'];
			$subject     = str_replace( $search, $replacement, $subject );
		}

		return $subject;
	}

	/**
	 * Replace image urls with newly uploaded images.
	 *
	 * @since 2.7.0
	 *
	 * @param array $images Array of new images uploaded.
	 * @param array $data   Array of for which images url needs to be replaced.
	 *
	 * @return array|mixed|object
	 */
	protected function replace_images_urls( $images, $data ) {
		foreach ( $data as $post_id => &$post_data ) {
			foreach ( $images as $image ) {
				if ( is_array( $post_data ) ) {
					foreach ( $post_data as $post_param => &$param_value ) {
						if ( ! is_array( $param_value ) ) {
							$data[ $post_id ][ $post_param ] = $this->replace_image_url( $param_value, $image );
						}
					}
					unset($param_value);
				} else {
					$data[ $post_id ] = $this->replace_image_url( $post_data, $image );
				}
			}
		}
		unset($post_data);

		return $data;
	}

	/**
	 * Validate data and remove any malicious code.
	 *
	 * @since 2.7.0
	 *
	 * @param array $data              Array of data which needs to be validated.
	 * @param array $fields_validation Array of field and validation callback.
	 *
	 * @return array|bool
	 */
	protected function validate( $data, $fields_validation = array() ) {
		if ( ! is_array( $data ) ) {
			return false;
		}

		foreach ( $data as $key => $value ) {
			if ( empty( $value ) ) {
				continue;
			}

			if ( is_array( $value ) ) {
				$data[$key] = $this->validate( $value, $fields_validation );
			} else {
				if ( isset( $fields_validation[$key] ) ) {
					// @phpcs:ignore Generic.PHP.ForbiddenFunctions.Found
					$data[$key] = call_user_func( $fields_validation[$key], $value );
				} else {
					if ( current_user_can( 'unfiltered_html' ) ) {
						$data[ $key ] = $value;
					} else {
						$data[ $key ] = wp_kses_post( $value );
					}
				}
			}
		}

		return $data;
	}

	/**
	 * Filters a variable with string filter
	 *
	 * @param mixed $data - Value to filter.
	 *
	 * @return mixed
	 */
	protected function _filter_post_data( $data ) {
		return filter_var( $data, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES );
	}

	/**
	 * Prevent import and export timeout or memory failure.
	 *
	 * @since 2.7.0
	 *
	 * It doesn't need to be reset as in both case the request exit.
	 */
	protected function prevent_failure() {
		@set_time_limit( 0 );

		// Increase memory which is safe at this stage of the request.
		if ( et_core_get_memory_limit() < 256 ) {
			@ini_set( 'memory_limit', '256M' );
		}
	}

	/**
	 * Set WP filesystem to direct. This should only be use to create a temporary file.
	 *
	 * @since 2.7.0
	 *
	 * It is safe to do so since the created file is removed immediately after import. The method does'nt have
	 * to be reset since the ajax query is exited.
	 */
	protected function set_filesystem() {
		global $wp_filesystem;

		add_filter( 'filesystem_method', array( $this, 'replace_filesystem_method' ) );
		WP_Filesystem();

		return $wp_filesystem;
	}

	/**
	 * Proxy method for set_filesystem() to avoid calling it multiple times.
	 *
	 * @since 4.0
	 *
	 * @return WP_Filesystem_Direct
	 */
	protected function get_filesystem() {
		static $filesystem = null;

		if ( null === $filesystem ) {
			$filesystem = $this->set_filesystem();
		}

		return $filesystem;
	}

	/**
	 * Check if a temporary file is register. Returns temporary file if it exists.
	 *
	 * @since 4.0 Made method public.
	 *
	 * @param string $id    Unique id used when the temporary file was created.
	 * @param string $group Group name in which files are grouped.
	 *
	 * @return bool|string
	 */
	public function has_temp_file( $id, $group ) {
		$temp_files = get_option( '_et_core_portability_temp_files', array() );

		if ( isset( $temp_files[$group][$id] ) && file_exists( $temp_files[$group][$id] ) ) {
			return $temp_files[$group][$id];
		}

		return false;
	}

	/**
	 * Create a temp file and register it.
	 *
	 * @since 2.7.0
	 * @since 4.0 Made method public. Added $content parameter.
	 *
	 * @param string      $id        Unique id reference for the temporary file.
	 * @param string      $group     Group name in which files are grouped.
	 * @param string|bool $temp_file Path to the temporary file. False create a new temporary file.
	 *
	 * @return bool|string
	 */
	public function temp_file( $id, $group, $temp_file = false, $content = '' ) {
		$temp_files = get_option( '_et_core_portability_temp_files', array() );

		if ( ! isset( $temp_files[$group] ) ) {
			$temp_files[$group] = array();
		}

		if ( isset( $temp_files[$group][$id] ) && file_exists( $temp_files[$group][$id] ) ) {
			return $temp_files[$group][$id];
		}

		$temp_file = $temp_file ? $temp_file : wp_tempnam();
		$temp_files[$group][$id] = $temp_file;

		update_option( '_et_core_portability_temp_files', $temp_files, false );

		if ( ! empty( $content ) ) {
			$this->get_filesystem()->put_contents( $temp_file, $content );
		}

		return $temp_file;
	}

	/**
	 * Get temp file contents or an empty string if it does not exist.
	 *
	 * @since 4.0
	 *
	 * @param string $id    Unique id used when the temporary file was created.
	 * @param string $group Group name in which files are grouped.
	 *
	 * @return string
	 */
	public function get_temp_file_contents( $id, $group ) {
		$file = $this->has_temp_file( $id, $group );

		if ( ! $file ) {
			return '';
		}

		$content = $this->get_filesystem()->get_contents( $file );

		return $content ? $content : '';
	}

	/**
	 * Delete all the temp files.
	 *
	 * @since 2.7.0
	 *
	 * @param bool|string $group         Group name in which files are grouped. Set to true to remove all groups and files.
	 * @param array       $defined_files Array or temoporary files to delete. No argument deletes all temp files.
	 */
	public function delete_temp_files( $group = false, $defined_files = false ) {
		$filesystem = $this->set_filesystem();
		$temp_files = get_option( '_et_core_portability_temp_files', array() );

		// Remove all temp files accross all groups if group is true.
		if ( $group === true ) {
			foreach( $temp_files as $group_id => $_group ) {
				$this->delete_temp_files( $group_id );
			}
		}

		if ( ! isset( $temp_files[$group] ) ) {
			return;
		}

		$delete_files = ( is_array( $defined_files ) && ! empty( $defined_files ) ) ? $defined_files : $temp_files[$group];

		foreach ( $delete_files as $id => $temp_file ) {
			if ( isset( $temp_files[$group][$id] ) && $filesystem->delete( $temp_files[$group][$id] ) ) {
				unset( $temp_files[$group][$id] );
			}
		}

		if ( empty( $temp_files[$group] ) ) {
			unset( $temp_files[$group] );
		}

		if ( empty( $temp_files ) ) {
			delete_option( '_et_core_portability_temp_files' );
		} else {
			update_option( '_et_core_portability_temp_files', $temp_files, false );
		}
	}

	/**
	 * Set WP filesystem method to direct.
	 *
	 * @since 2.7.0
	 */
	public function replace_filesystem_method() {
		return 'direct';
	}

	/**
	 * Get timestamp or create one if it isn't set.
	 *
	 * @since 2.7.0
	 */
	public function get_timestamp() {
		et_core_nonce_verified_previously();

		if ( isset( $_POST['timestamp'] ) && ! empty( $_POST['timestamp'] ) ) {
			return sanitize_text_field( $_POST['timestamp'] );
		}

		return function_exists( 'hrtime' ) ? (string) hrtime( true ) : (string) microtime( true ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.hrtimeFound -- Intentional use of new PHP function
	}

	/**
	 * Get Global Colors array from provided global_colors_info.
	 *
	 * @since 4.10.8
	 *
	 * @param array $global_colors_info Array of global colors to process.
	 *
	 * @return array The list of the Global Colors for export.
	 */
	protected function _get_global_colors_data( $global_colors_info = array() ) {
		$global_color_ids = array_unique( array_keys( $global_colors_info ) );

		if ( empty( $global_color_ids ) ) {
			return array();
		}

		$all_global_colors = et_builder_get_all_global_colors();
		$used_colors       = array();

		foreach ( $global_color_ids as $color_id ) {
			if ( isset( $all_global_colors[ $color_id ] ) ) {
				$color_data = array(
					$color_id,
					$all_global_colors[ $color_id ],
				);

				$used_colors[] = $color_data;
			}
		}

		return $used_colors;
	}

	/**
	 * Get List of global colors used in shortcode.
	 *
	 * @since 4.10.8
	 *
	 * @param array $shortcode_object   The multidimensional array representing a page structure.
	 * @param array $used_global_colors List of global colors to merge with.
	 * @param array $presets            Object of presets.
	 *
	 * @return array - The list of the Global Colors.
	 */
	protected function _get_used_global_colors( $shortcode_object, $used_global_colors = array(), $presets = array() ) {
		foreach ( $shortcode_object as $module ) {
			if ( isset( $module['attrs']['global_colors_info'] ) ) {
				// Retrive global_colors_info from post meta, which saved as string[][].
				$gc_info_prepared   = str_replace(
					array( '&#91;', '&#93;' ),
					array( '[', ']' ),
					$module['attrs']['global_colors_info']
				);

				// Make sure we pass array to array_merge to avoid Fatal Error.
				$gc_info_array      = json_decode( $gc_info_prepared, true );
				$gc_info_array      = is_array( $gc_info_array ) ? $gc_info_array : [];
				$used_global_colors = array_merge( $used_global_colors, $gc_info_array );
			}

			if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
				$used_global_colors = array_merge( $used_global_colors, $this->_get_used_global_colors( $module['content'], $used_global_colors, $presets ) );
			}
		}

		if ( ! empty( $presets ) ) {
			foreach ( $presets as $module_type => $module_presets ) {
				foreach ( $module_presets->presets as $preset_id => $preset ) {
					if ( isset( $preset->settings->global_colors_info ) ) {
						$used_global_colors = array_merge( $used_global_colors, json_decode( $preset->settings->global_colors_info, true ) );
					}
				}
			}
		}

		return $used_global_colors;
	}

	/**
	 * Returns Global Presets used for a given shortcode only
	 *
	 * @since 3.26
	 *
	 * @param array $shortcode_object - The multidimensional array representing a page structure
	 * @param array $used_global_presets
	 *
	 * @return array - The list of the Global Presets
	 *
	 */
	protected function get_used_global_presets( $shortcode_object, $used_global_presets = array() ) {
		$global_presets_manager = ET_Builder_Global_Presets_Settings::instance();

		foreach ( $shortcode_object as $module ) {
			$module_type = $global_presets_manager->maybe_convert_module_type( $module['type'], $module['attrs'] );
			$preset_id   = $global_presets_manager->get_module_preset_id( $module_type, $module['attrs'] );
			$preset      = $global_presets_manager->get_module_preset( $module_type, $preset_id );

			if ( $preset_id !== 'default' && count( (array) $preset ) !== 0 && count( (array) $preset->settings ) !== 0 ) {
				if ( ! isset( $used_global_presets[ $module_type ] ) ) {
					$used_global_presets[ $module_type ] = (object) array(
						'presets' => (object) array(),
					);
				}

				if ( ! isset( $used_global_presets[ $module_type ]->presets->$preset_id ) ) {
					$used_global_presets[ $module_type ]->presets->$preset_id = (object) array(
						'name'     => $preset->name,
						'version'  => $preset->version,
						'settings' => $preset->settings,
					);
				}

				if ( ! isset( $used_global_presets[ $module_type ]->default ) ) {
					$used_global_presets[ $module_type ]->default = $global_presets_manager->get_module_default_preset_id( $module_type );
				}
			}

			if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
				$used_global_presets = array_merge( $used_global_presets, $this->get_used_global_presets( $module['content'], $used_global_presets ) );
			}
		}

		return $used_global_presets;
	}

	/**
	 * Returns Global Colors used for a given theme builder shortcode.
	 *
	 * @since 4.18.0
	 *
	 * @param array $shortcode_object - The multidimensional array representing a page structure.
	 *
	 * @return array The list of the Global Colors
	 */
	public function get_theme_builder_library_used_global_colors( $shortcode_object ) {
		return $this->_get_used_global_colors( $shortcode_object );
	}

	/**
	 * Returns Global Presets used for a given theme builder shortcode.
	 *
	 * @since 4.18.0
	 *
	 * @param array $shortcode_object - The multidimensional array representing a page structure.
	 *
	 * @return array The list of the Global Presets
	 */
	public function get_theme_builder_library_used_global_presets( $shortcode_object ) {
		return $this->get_used_global_presets( $shortcode_object );
	}

	/**
	 * Returns images used for a given theme builder shortcode.
	 *
	 * @since 4.18.0
	 *
	 * @param array $data - ID and Post content.
	 *
	 * @return array The list of the encoded images
	 */
	public function get_theme_builder_library_images( $data ) {
		$timestamp = $this->get_timestamp();
		$images    = $this->get_data_images( $data );

		return $this->maybe_paginate_images( $images, 'encode_images', $timestamp );
	}

	/**
	 * Returns thumbnails used for a given theme builder shortcode.
	 *
	 * @since 4.18.0
	 *
	 * @param array $data - ID and Post content.
	 *
	 * @return array The list of the thumbnails
	 */
	public function get_theme_builder_library_thumbnail_images( $data ) {
		return $this->_get_thumbnail_images( $data );
	}

	/**
	 * Enqueue assets.
	 *
	 * @since ?.? Script `et-core-portability` now loads in footer along with `et-core-admin`.
	 * @since 2.7.0
	 */
	public function assets() {
		$time = '<span>1</span>';

		wp_enqueue_style( 'et-core-portability', ET_CORE_URL . 'admin/css/portability.css', array(
			'et-core-admin',
		), ET_CORE_VERSION );

		wp_enqueue_script(
			'et-core-portability',
			ET_CORE_URL . 'admin/js/portability.js',
			array(
				'jquery',
				'jquery-ui-tabs',
				'jquery-form',
				'et-core-admin',
			),
			ET_CORE_VERSION,
			true
		);

		wp_localize_script( 'et-core-portability', 'etCorePortability', array(
			'nonces'        => array(
				'import'  => wp_create_nonce( 'et_core_portability_import' ),
				'export'  => wp_create_nonce( 'et_core_portability_export' ),
				'cancel'  => wp_create_nonce( 'et_core_portability_cancel' ),
				'presets' => wp_create_nonce( 'et_core_portability_import_default_presets' ),
			),
			'postMaxSize'   => $this->to_megabytes( @ini_get( 'post_max_size' ) ),
			'uploadMaxSize' => $this->to_megabytes( @ini_get( 'upload_max_filesize' ) ),
			'text'          => array(
				// phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain -- Following the standard.
				'browserSupport'    => esc_html__( 'The browser version you are currently using is outdated. Please update to the newest version.', ET_CORE_TEXTDOMAIN ),
				'memoryExhausted'   => esc_html__( 'You reached your server memory limit. Please try increasing your PHP memory limit.', ET_CORE_TEXTDOMAIN ),
				'maxSizeExceeded'   => esc_html__( 'This file cannot be imported. It may be caused by file_uploads being disabled in your php.ini. It may also be caused by post_max_size or/and upload_max_filesize being smaller than file selected. Please increase it or transfer more substantial data at the time.', ET_CORE_TEXTDOMAIN ),
				'invalideFile'      => esc_html__( 'Invalid File format. You should be uploading a JSON file.', ET_CORE_TEXTDOMAIN ),
				'importContextFail' => esc_html__( 'This file should not be imported in this context.', ET_CORE_TEXTDOMAIN ),
				'noItemsSelected'   => esc_html__( 'Please select at least one item to export or disable the "Only export selected items" option', ET_CORE_TEXTDOMAIN ),
				'noItemsToExport'   => esc_html__( 'There are no items to export.', ET_CORE_TEXTDOMAIN ),
				'importing'         => sprintf( esc_html__( 'Import estimated time remaining: %smin', ET_CORE_TEXTDOMAIN ), $time ),
				'exporting'         => sprintf( esc_html__( 'Export estimated time remaining: %smin', ET_CORE_TEXTDOMAIN ), $time ),
				'backuping'         => sprintf( esc_html__( 'Backup estimated time remaining: %smin', ET_CORE_TEXTDOMAIN ), $time ),
				// phpcs:enable
			),
		) );
	}

	/**
	 * Modal HTML.
	 *
	 * @since 2.7.0
	 */
	public function modal() {
		$export_url = add_query_arg( array(
			'et_core_portability' => true,
			'context'             => $this->instance->context,
			'name'                => $this->instance->name,
			'nonce'               => wp_create_nonce( 'et_core_portability_export' ),

		), admin_url() );

		$is_etdev_plugin_activated = is_plugin_active( 'etdev/etdev.php' );

		// phpcs:disable WordPress.WP.I18n.NonSingularStringLiteralDomain -- Existing codebase.
		?>
		<div class="et-core-modal-overlay et-core-form" data-et-core-portability="<?php echo esc_attr( $this->instance->context ); ?>">
			<div class="et-core-modal">
				<div class="et-core-modal-header">
					<h3 class="et-core-modal-title"><?php echo esc_html( $this->instance->title ); ?></h3><a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
				</div>
				<div data-et-core-tabs class="et-core-modal-tabs-enabled">
					<ul class="et-core-tabs">
						<li><a href="#et-core-portability-export"><?php esc_html_e( 'Export', ET_CORE_TEXTDOMAIN ); ?></a></li>
						<li><a href="#et-core-portability-import"><?php esc_html_e( 'Import', ET_CORE_TEXTDOMAIN ); ?></a></li>
					</ul>
					<div id="et-core-portability-export">
						<div class="et-core-modal-content">
							<?php printf( esc_html__( 'Exporting your %s will create a JSON file that can be imported into a different website.', ET_CORE_TEXTDOMAIN ), esc_html( $this->instance->name ) ); ?>
							<h3><?php esc_html_e( 'Export File Name', ET_CORE_TEXTDOMAIN ); ?></h3>
							<form class="et-core-portability-export-form">
								<input type="text" name="" value="<?php echo esc_attr( $this->instance->name ); ?>">
								<?php if ( 'post_type' === $this->instance->type ) : ?>
									<div class="et-core-clearfix"></div>
									<label><input type="checkbox" name="et-core-portability-posts" <?php echo $is_etdev_plugin_activated ? 'checked' : ''; ?> /><?php esc_html_e( 'Only export selected items', ET_CORE_TEXTDOMAIN ); ?></label>
								<?php endif; ?>
								<?php if ( $is_etdev_plugin_activated ) : ?>
									<div class="et-core-clearfix"></div>
									<label><input type="checkbox" name="et-core-portability-apply-presets" checked /><?php esc_html_e( 'Export Presets As Static Styles', ET_CORE_TEXTDOMAIN ); ?></label>
								<?php endif; ?>
							</form>
						</div>
						<div class="et-core-action-buttons-container">
							<a class="et-core-modal-action et-core-button-primary" href="#" data-et-core-portability-export="<?php echo esc_url( $export_url ); ?>"><?php esc_html_e( 'Download Export', ET_CORE_TEXTDOMAIN ); ?></a>
							<?php if ( 'et_builder_layouts' === $this->instance->context ) { ?>
								<a class="et-core-modal-action et-core-button-secondary" href="#" data-et-core-portability-export-to-cloud="1"><?php esc_html_e( 'Export To Divi Cloud', 'et-core' ); ?></a>
							<?php } ?>
						</div>
						<div class="et-core-action-buttons-container__during_action">
							<a class="et-core-modal-action et-core-button-danger" href="#" data-et-core-portability-cancel><?php esc_html_e( 'Cancel Export', ET_CORE_TEXTDOMAIN ); ?></a>
						</div>
					</div>
					<div id="et-core-portability-import">
						<div class="et-core-modal-content">
							<?php if ( 'post' === $this->instance->type ) : ?>
								<?php printf( esc_html__( 'Importing a previously-exported %s file will overwrite all content currently on this page.', ET_CORE_TEXTDOMAIN ), esc_html( $this->instance->name ) ); ?>
							<?php elseif ( 'post_type' === $this->instance->type ) : ?>
								<?php printf( esc_html__( 'Select a previously-exported Divi Builder Layouts file to begin importing items. Large collections of image-heavy exports may take several minutes to upload.', ET_CORE_TEXTDOMAIN ), esc_html( $this->instance->name ) ); ?>
							<?php else : ?>
								<?php printf( esc_html__( 'Importing a previously-exported %s file will overwrite all current data. Please proceed with caution!', ET_CORE_TEXTDOMAIN ), esc_html( $this->instance->name ) ); ?>
							<?php endif; ?>
							<h3><?php esc_html_e( 'Select File To Import', ET_CORE_TEXTDOMAIN ); ?></h3>
							<form class="et-core-portability-import-form">
								<span class="et-core-portability-import-placeholder"><?php esc_html_e( 'No File Selected', ET_CORE_TEXTDOMAIN ); ?></span>
								<button class="et-core-button"><?php esc_html_e( 'Choose File', ET_CORE_TEXTDOMAIN ); ?></button>
								<input type="file">
								<div class="et-core-clearfix"></div>
								<?php if ( 'post_type' !== $this->instance->type ) : ?>
									<label><input type="checkbox" name="et-core-portability-import-backup" /><?php esc_html_e( 'Download Backup Before Importing', ET_CORE_TEXTDOMAIN ); // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralDomain -- intentional use of ET_CORE_TEXTDOMAIN ?></label>
								<?php endif; ?>
								<?php if ( 'post_type' === $this->instance->type ) : ?>
									<label><input type="checkbox" name="et-core-portability-import-include-global-presets" /><?php esc_html_e( 'Import Presets', ET_CORE_TEXTDOMAIN ); ?></label>
								<?php endif; ?>
							</form>
						</div>
						<a class="et-core-modal-action et-core-portability-import" href="#"><?php printf( esc_html__( 'Import %s', ET_CORE_TEXTDOMAIN ), esc_html( $this->instance->name ) ); ?></a>
						<a class="et-core-modal-action et-core-button-danger" href="#" data-et-core-portability-cancel><?php esc_html_e( 'Cancel Import', ET_CORE_TEXTDOMAIN ); ?></a>
					</div>
				</div>
			</div>
		</div>
		<?php
		// phpcs:enable
	}
}

if ( ! function_exists( 'et_core_portability_register' ) ) :
/**
 * Register portability.
 *
 * This function should be called in an 'admin_init' action callback.
 *
 * @since 2.7.0
 *
 * @param string $context A unique ID used to register the portability arguments.
 *
 * @param array  $args {
 *      Array of arguments used to register the portability.
 *
 * 		@type string $name	  The name used in the various text string.
 * 		@type bool   $view	  Whether the assets and content should load or not.
 * 		      				  Example: `isset( $_GET['page'] ) && $_GET['page'] == 'example'`.
 * 		@type string $db	  The option_name from the wp_option table used to export and import data.
 * 		@type array  $include Optional. Array of all the options scritcly included. Options ids must be set
 *         					  as the array keys.
 *      @type array  $exclude Optional. Array of excluded options. Options ids must be set as the array keys.
 * }
 */
function et_core_portability_register( $context, $args ) {
	$defaults = array(
		'context' => $context,
		'title'   => esc_html__( 'Portability', ET_CORE_TEXTDOMAIN ), // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralDomain -- intentional use of ET_CORE_TEXTDOMAIN
		'name'    => false,
		'view'    => false,
		'type'    => false,
		'target'  => false,
		'include' => array(),
		'exclude' => array(),
	);

	$data = apply_filters( "et_core_portability_args_{$context}", (object) array_merge( $defaults, (array) $args ) );

	et_core_cache_set( $context, $data, 'et_core_portability' );

	// Stop here if not allowed.
	if ( function_exists( 'et_pb_is_allowed' ) && ! et_pb_is_allowed( array( 'portability', "{$data->context}_portability" ) ) ) {

		// Set view to false if not allowed.
		$data->view = false;
		et_core_cache_set( $context, $data, 'et_core_portability' );

		return;
	}

	if ( $data->view ) {
		et_core_portability_load( $context );
	}
}
endif;


if ( ! function_exists( 'et_core_portability_load' ) ) :
/**
 * Load Portability class.
 *
 * @since 2.7.0
 *
 * @param string $context A unique ID used to register the portability arguments.
 * @return ET_Core_Portability
 */
function et_core_portability_load( $context ) {
	return new ET_Core_Portability( $context );
}
endif;


if ( ! function_exists( 'et_core_portability_link' ) ) :
/**
 * HTML link to trigger the portability modal.
 *
 * @since 2.7.0
 *
 * @param string       $context    The context used to register the portability.
 * @param string|array $attributes Optional. Query string or array of attributes. Default empty.
 *
 * @return string
 */
function et_core_portability_link( $context, $attributes = array() ) {
	$instance = et_core_cache_get( $context, 'et_core_portability' );

	if ( ! $capability = et_core_portability_cap( $context ) ) {
		return '';
	}

	if ( ! current_user_can( $capability ) || ! ( isset( $instance->view ) && $instance->view ) ) {
		return '';
	}

	$defaults = array(
		'title' => esc_attr__( 'Import & Export', ET_CORE_TEXTDOMAIN ),
	);
	$attributes = array_merge( $defaults, $attributes );

	// Forced attributes.
	$attributes['href'] = '#';
	$context = esc_attr( $context );
	$attributes['data-et-core-modal'] = "[data-et-core-portability='{$context}']";

	$string = '';

	foreach ( $attributes as $attribute => $value ) {
		if ( null !== $value ){
			$string .= esc_attr( $attribute ) . '="' . esc_attr( $value ) . '" ';
		}
	}

	return sprintf(
		'<a %1$s><span>%2$s</span></a>',
		trim( $string ),
		esc_html( $attributes['title'] )
	);
}
endif;


if ( ! function_exists( 'et_core_portability_ajax_import' ) ) :
/**
 * Ajax portability Import.
 *
 * @since 2.7.0
 */
function et_core_portability_ajax_import() {
	if ( ! isset( $_POST['context'] ) ) {
		et_core_die();
	}

	$context = sanitize_text_field( $_POST['context'] );
	$post_id = isset( $_POST['post'] ) ? (int) $_POST['post'] : 0;
	$replace = isset( $_POST['replace'] ) ? '1' === $_POST['replace'] : false;

	if ( ! $capability = et_core_portability_cap( $context ) ) {
		et_core_die();
	}

	if ( ! et_core_security_check_passed( $capability, 'et_core_portability_import', 'nonce' ) ) {
		et_core_die();
	}

	$portability = et_core_portability_load( $context );

	if ( ! $result = $portability->import() ) {
		wp_send_json_error();
	} else if ( is_array( $result ) && isset( $result['message'] ) ) {
		wp_send_json_error( $result );
	} else if ( $result ) {
		if ( $replace && $post_id > 0 && current_user_can( 'edit_post', $post_id ) ) {
			wp_update_post( array(
				'ID' => $post_id,
				'post_content' => $result['postContent'],
			) );
		}

		wp_send_json_success( $result );
	}

	wp_send_json_error();
}
add_action( 'wp_ajax_et_core_portability_import', 'et_core_portability_ajax_import' );
endif;


if ( ! function_exists( 'et_core_portability_ajax_export' ) ) :
	/**
	 * Ajax portability Export.
	 *
	 * @since 2.7.0
	 */
	function et_core_portability_ajax_export() {
		if ( ! isset( $_POST['context'] ) ) {
				wp_send_json_error();
				return;
		}

		$context = sanitize_text_field( $_POST['context'] );

		// phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure, WordPress.CodeAnalysis.AssignmentInCondition.Found -- Existing codebase.
		if ( ! $capability = et_core_portability_cap( $context ) ) {
				wp_send_json_error();
				return;
		}

		if ( ! et_core_security_check_passed( $capability, 'et_core_portability_export', 'nonce' ) ) {
				wp_send_json_error();
				return;
		}

		$return = isset( $_POST['return'] ) && sanitize_text_field( $_POST['return'] );

		if ( $return ) {
			$data = et_core_portability_load( $context )->export( $return );

			wp_send_json_success( $data );
		} else {
			et_core_portability_load( $context )->export();
		}

		wp_send_json_error();
	}
	add_action( 'wp_ajax_et_core_portability_export', 'et_core_portability_ajax_export' );
endif;


if ( ! function_exists( 'et_core_portability_ajax_cancel' ) ) :
/**
 * Cancel portability action.
 *
 * @since 2.7.0
 */
function et_core_portability_ajax_cancel() {
	if ( ! isset( $_POST['context'] ) ) {
		et_core_die();
	}

	$context = sanitize_text_field( $_POST['context'] );

	if ( ! $capability = et_core_portability_cap( $context ) ) {
		et_core_die();
	}

	if ( ! et_core_security_check_passed( $capability, 'et_core_portability_cancel' ) ) {
		et_core_die();
	}

	et_core_portability_load( $context )->delete_temp_files( true );

	wp_send_json_error();
}
add_action( 'wp_ajax_et_core_portability_cancel', 'et_core_portability_ajax_cancel' );
endif;

if ( ! function_exists( 'et_core_upload_and_get_urls_from_presets_images' ) ) :
	/**
	 * Upload images and return the new URLs for presets.
	 *
	 * @since 4.26.1
	 * @param array $data Array of images to upload.
	 * 
	 * @return array
	 */
	function et_core_upload_and_get_urls_from_presets_images( $data ) {
		if ( ! current_user_can( 'manage_options' ) ) {
			return;
		}

		// Require the file that includes wp_generate_attachment_metadata().
		require_once( ABSPATH . 'wp-admin/includes/image.php' );

		$mime_types    = get_allowed_mime_types();
		$wp_upload_dir = wp_upload_dir();
		$uploaded_urls = [];

		foreach ( $data as $imageInfo ) {
			$image_data = base64_decode( $imageInfo['encoded'] );
			$temp_file  = tempnam( $wp_upload_dir['path'], 'preset_' );
			$filetype   = wp_check_filetype( basename( $temp_file ), null );

			if ( ! in_array( $filetype['type'], $mime_types, true ) ) {
				continue;
			}

			file_put_contents( $temp_file, $image_data );

			$attachment = [
				'guid'           => $wp_upload_dir['url'] . '/' . basename( $temp_file ), 
				'post_mime_type' => $filetype['type'],
				'post_title'     => preg_replace( '/\.[^.]+$/', '', basename( $temp_file ) ),
				'post_content'   => '',
				'post_status'    => 'inherit'
			];
		
			$attach_id   = wp_insert_attachment( $attachment, $temp_file );
			$attach_data = wp_generate_attachment_metadata( $attach_id, $temp_file );

			wp_update_attachment_metadata( $attach_id, $attach_data );
		
			$uploaded_urls[] = [
				'old_url' => $imageInfo['url'],
				'new_url' => wp_get_attachment_url( $attach_id ),
			];

			unlink( $temp_file );
		}
		
		return $uploaded_urls;
	}
endif;

if ( ! function_exists( 'et_core_replace_image_urls_in_presets' ) ) :
	/**
	 * Replace image URLs in presets JSON string.
	 */
	function et_core_replace_image_urls_in_presets( $presets, $uploaded_urls ) {
		foreach ( $uploaded_urls as $url ) {
			$presets = str_replace( $url['old_url'], $url['new_url'], $presets );
		}

		return $presets;
	}
endif;

if ( ! function_exists( 'et_core_portability_import_default_presets' ) ) :
	/**
	 * Set the default preset for a modules.
	 *
	 * @since 4.26.0
	 */
	function et_core_portability_import_default_presets() {
		if ( ! et_core_security_check_passed( 'manage_options', 'et_core_portability_import_default_presets', 'nonce' ) ) {
			et_core_die();
		}

		$presets       = isset( $_POST['presets'] ) ? sanitize_text_field( $_POST['presets'] ) : '';
		$preset_prefix = isset( $_POST['presetPrefix'] ) ? sanitize_text_field( $_POST['presetPrefix'] ) : '';
		$global_colors = isset( $_POST['globalColors'] ) ? sanitize_text_field( $_POST['globalColors'] ) : '';
		$images        = isset( $_POST['images'] ) ? sanitize_text_field( $_POST['images'] ) : '';
		$uploaded_urls = [];

		$portability = et_core_portability_load( 'et_builder' );

		if ( $global_colors ) {
			$global_colors = json_decode( stripslashes( $global_colors ), true );
			$portability->import_global_colors( $global_colors );
		}

		if ( $images ) {
			$images        = json_decode( stripslashes( $images ), true );
			$uploaded_urls = et_core_upload_and_get_urls_from_presets_images( $images );
		}

		if ( $presets ) {
			if ( ! empty( $uploaded_urls ) ) {
				$presets = et_core_replace_image_urls_in_presets( $presets, $uploaded_urls );
			}

			$presets = json_decode( stripslashes( $presets ), true );
			$portability->import_global_presets( $presets, false, true, $preset_prefix );
		}

		ET_Core_PageResource::remove_static_resources( 'all', 'all' );

		wp_send_json_success();
	}

	add_action( 'wp_ajax_et_core_portability_import_default_presets', 'et_core_portability_import_default_presets' );
endif;

if ( ! function_exists( 'et_core_portability_export' ) ) :
/**
 * Portability export.
 *
 * @since 2.7.0
 */
function et_core_portability_export() {
	if ( ! isset( $_GET['et_core_portability'], $_GET['timestamp'] ) ) {
		return;
	}

	if ( ! et_core_security_check_passed( 'edit_posts' ) ) {
		wp_die( esc_html__( 'The export process failed. Please refresh the page and try again.', ET_CORE_TEXTDOMAIN ) );
	}

	et_core_portability_load( sanitize_text_field( $_GET['timestamp'] ) )->download_export();
}
add_action( 'admin_init', 'et_core_portability_export', 20 );
endif;


if ( ! function_exists( 'et_core_portability_cap' ) ):
/**
 * Returns the required WordPress Capability for a Portability context.
 *
 * @since 3.0.91
 *
 * @param string $context The Portability context
 *
 * @return string
 */
function et_core_portability_cap( $context ) {
	$capability       = '';
	$options_contexts = array(
		'et_pb_roles',
		'epanel',
		'epanel_temp',
		'et_divi_mods',
		'et_extra_mods',
	);
	$post_contexts    = array(
		'et_builder',
		'et_theme_builder',
		'et_code_snippets',
		'et_builder_layouts',
	);

	if ( in_array( $context, $options_contexts, true ) ) {
		$capability = 'edit_theme_options';
	} else if ( in_array( $context, $post_contexts, true ) ) {
		$capability = 'edit_posts';
	}

	return $capability;
}
endif;
cache/Directory.php000064400000013203152336022500010261 0ustar00<?php

class ET_Core_Cache_Directory {

	/**
	 * @since 4.0.8
	 * @var self
	 */
	protected static $_instance;

	/**
	 * Whether or not we can write to the cache directory.
	 *
	 * @since 4.0.8
	 * @var bool
	 */
	public $can_write;

	/**
	 * Absolute path to cache directory
	 *
	 * @since 4.0.8
	 * @var string
	 */
	public $path = '';

	/**
	 * URL for {@see self::$path}
	 *
	 * @since 4.0.8
	 * @var string
	 */
	public $url = '';

	/**
	 * @since 4.0.8
	 * @var WP_Filesystem_Base
	 */
	public $wpfs;

	/**
	 * ET_Core_Cache_Directory constructor.
	 *
	 * @since 4.0.8
	 */
	public function __construct() {
		if ( self::$_instance ) {
			et_wrong( 'Use "ET_Core_Cache_Directory::instance()" instead of "new ET_Core_Cache_Directory".' );

			return;
		}

		self::$_instance = $this;

		$this->_initialize();
	}

	/**
	 * Determines the cache directory path and url based on where we can write files
	 * and whether or not the user has defined a custom path and url.
	 *
	 * @since 4.0.8
	 */
	protected function _initialize() {
		$this->_initialize_wpfs();

		if ( $this->_maybe_use_custom_path() ) {
			return;
		}

		$uploads_dir_info = (object) wp_get_upload_dir();
		$path             = et_()->path( WP_CONTENT_DIR, 'et-cache' );
		$url              = content_url( 'et-cache' );

		$can_write  = $this->wpfs->is_writable( $path ) && ! is_file( $path );
		$can_create = ! $can_write && $this->wpfs->is_writable( WP_CONTENT_DIR );

		if ( ! $can_write && ! $can_create && $this->wpfs->is_writable( $uploads_dir_info->basedir ) ) {
			// We can create our cache directory in the uploads directory
			$can_create = true;
			$path       = et_()->path( $uploads_dir_info->basedir, 'et-cache' );
			$url        = et_()->path( $uploads_dir_info->baseurl, 'et-cache' );
		}

		$this->can_write = $can_write || $can_create;
		$this->path      = et_()->normalize_path( $path );
		$this->url       = $url;

		$this->_maybe_adjust_path_for_multisite( $uploads_dir_info );

		/**
		 * Absolute path to directory where we can store cache files.
		 *
		 * @since 4.0.8
		 * @var string
		 */
		define( 'ET_CORE_CACHE_DIR', $this->path );

		/**
		 * URL to {@see ET_CORE_CACHE_DIR}.
		 *
		 * @since 4.0.8
		 * @var string
		 */
		define( 'ET_CORE_CACHE_DIR_URL', $this->url );

		$this->can_write && et_()->ensure_directory_exists( $this->path );
	}

	/**
	 * Ensures that the WP Filesystem API has been initialized.
	 *
	 * @since??
	 *
	 * @return WP_Filesystem_Base
	 */
	protected function _initialize_wpfs() {
		require_once ABSPATH . 'wp-admin/includes/file.php';

		/**
		 * Filters the WP_Filesystem args.
		 *
		 * @since 4.18.1
		 *
		 * @param  $wpfs_args  Arguments to use when initializing WP_Filesystem
		 *
		 * @return |array
		 */
		$wpfs_args = apply_filters( 'et_core_cache_wpfs_args', array() );

		// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- may fail due to the permissions denied error
		if ( defined( 'ET_CORE_CACHE_DIR' ) && @WP_Filesystem( $wpfs_args, ET_CORE_CACHE_DIR, true ) ) {
			// We can write to a user-specified directory
			return $this->wpfs = $GLOBALS['wp_filesystem'];
		}

		// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- may fail due to the permissions denied error
		if ( @WP_Filesystem( $wpfs_args, false, true ) ) {
			// We can write to WP_CONTENT_DIR
			return $this->wpfs = $GLOBALS['wp_filesystem'];
		}

		$uploads_dir = (object) wp_get_upload_dir();

		// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- may fail due to the permissions denied error
		if ( @WP_Filesystem( $wpfs_args, $uploads_dir->basedir, true ) ) {
			// We can write to the uploads directory
			return $this->wpfs = $GLOBALS['wp_filesystem'];
		}

		// We aren't able to write to the filesystem so let's just make sure $this->wpfs
		// is an instance of the filesystem base class so that calling it won't cause errors.
		require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';

		// Write notice to log when WP_DEBUG is enabled.
		$nl  = PHP_EOL;
		$msg = 'Unable to write to filesystem. Please ensure that PHP has write access to one of ';
		$msg .= "the following directories:{$nl}{$nl}\t- WP_CONTENT_DIR{$nl}\t- wp_upload_dir(){$nl}\t- ET_CORE_CACHE_DIR.";

		et_debug( $msg );

		return $this->wpfs = new WP_Filesystem_Base;
	}

	/**
	 * Adjusts the path for multisite if necessary.
	 *
	 * @since 4.0.8
	 *
	 * @param stdClass $uploads_dir_info (object) wp_get_upload_dir()
	 */
	protected function _maybe_adjust_path_for_multisite( $uploads_dir_info ) {
		if ( et_()->starts_with( $this->path, $uploads_dir_info->basedir ) || ! is_multisite() ) {
			return;
		}

		$site       = get_site();
		$network_id = $site->site_id;
		$site_id    = $site->blog_id;

		$this->path = et_()->path( $this->path, $network_id, $site_id );
		$this->url  = et_()->path( $this->url, $network_id, $site_id );
	}

	/**
	 * Whether or not the user has defined a custom path for the cache directory.
	 *
	 * @since 4.0.8
	 *
	 * @return bool
	 */
	protected function _maybe_use_custom_path() {
		if ( ! defined( 'ET_CORE_CACHE_DIR' ) ) {
			return false;
		}

		$this->path = ET_CORE_CACHE_DIR;

		if ( ! $this->can_write = $this->wpfs->is_writable( $this->path ) ) {
			et_wrong( 'ET_CORE_CACHE_DIR is defined but not writable.', true );
		}

		if ( defined( 'ET_CORE_CACHE_DIR_URL' ) ) {
			$this->url = ET_CORE_CACHE_DIR_URL;
		} else {
			et_wrong( 'When ET_CORE_CACHE_DIR is defined, ET_CORE_CACHE_DIR_URL must also be defined.', true );
		}

		return true;
	}

	/**
	 * Returns the class instance.
	 *
	 * @since 4.0.8
	 *
	 * @return ET_Core_Cache_Directory
	 */
	public static function instance() {
		if ( ! self::$_instance ) {
			self::$_instance = new self;
		}

		return self::$_instance;
	}
}
cache/File.php000064400000006153152336022500007202 0ustar00<?php
/**
 * Core class that implements an file cache.
 *
 * @since 3.27.3
 *
 * The Object Cache stores all of the cache data to file and makes the cache
 * contents available by using a file name as key, which is used to name and later retrieve
 * the cache contents.
 *
 * @package ET\Core\Cache_File
 */
class ET_Core_Cache_File {

	/**
	 * Cached data holder.
	 *
	 * @since 3.27.3
	 *
	 * @var array
	 */
	protected static $_cache = array();

	/**
	 * Loaded cache file data.
	 *
	 * @since 3.27.3
	 *
	 * @var array
	 */
	protected static $_cache_loaded = array();

	/**
	 * Cached data status.
	 *
	 * @since 3.27.3
	 *
	 * @var array
	 */
	protected static $_dirty = array();

	/**
	 * Sets the data contents into the cache.
	 *
	 * @since 3.27.3
	 *
	 * @param string $cache_name What is the file name that storing the cache data.
	 * @param mixed  $data       The cache data to be set.
	 *
	 * @return void
	 */
	public static function set( $cache_name, $data ) {
		if ( self::is_disabled() ) {
			return;
		}

		self::$_cache[ $cache_name ] = $data;
		self::$_dirty[ $cache_name ] = $cache_name;
	}

	/**
	 * Retrieves the cache contents, if it exists.
	 *
	 * @since 3.27.3
	 *
	 * @param string $cache_name What is the file name that storing the cache data.
	 *
	 * @return mixed
	 */
	public static function get( $cache_name ) {
		if ( self::is_disabled() ) {
			return array();
		}

		if ( ! isset( self::$_cache_loaded[ $cache_name ] ) ) {
			$file = self::get_cache_file_name( $cache_name );

			if ( et_()->WPFS()->is_readable( $file ) ) {
				self::$_cache[ $cache_name ] = unserialize( et_()->WPFS()->get_contents( $file ) );
			} else {
				self::$_cache[ $cache_name ] = array();
			}

			self::$_cache_loaded[ $cache_name ] = true;
		}

		return isset( self::$_cache[ $cache_name ] ) ? self::$_cache[ $cache_name ] : array();
	}

	/**
	 * Saves Cache.
	 *
	 * @since 3.27.3
	 *
	 * @return void
	 */
	public static function save_cache() {
		if ( self::is_disabled() || ! self::$_dirty || ! self::$_cache ) {
			return;
		}

		foreach ( self::$_dirty as $cache_name ) {
			if ( ! isset( self::$_cache[ $cache_name ] ) ) {
				continue;
			}

			$data = self::$_cache[ $cache_name ];
			$file = self::get_cache_file_name( $cache_name );

			if ( ! wp_is_writable( dirname( $file ) ) ) {
				continue;
			}

			et_()->WPFS()->put_contents( $file, serialize( $data ) );
		}
	}

	/**
	 * Get full path of cache file name.
	 *
	 * The file name will be suffixed with .data
	 *
	 * @since 3.27.3
	 *
	 * @param string $cache_name What is the file name that storing the cache data.
	 *
	 * @return string
	 */
	public static function get_cache_file_name( $cache_name ) {
		return sprintf( '%1$s/%2$s.data', ET_Core_PageResource::get_cache_directory(), $cache_name );
	}

	/**
	 * Check is file based caching is disabled.
	 *
	 * @since 4.0.8
	 *
	 * @return bool
	 */
	public static function is_disabled() {
		return defined( 'ET_DISABLE_FILE_BASED_CACHE' ) && ET_DISABLE_FILE_BASED_CACHE;
	}
}

// Hook the shutdown action once.
if ( ! has_action( 'shutdown', 'ET_Core_Cache_File::save_cache' ) ) {
	add_action( 'shutdown', 'ET_Core_Cache_File::save_cache' );
}
cache/init.php000064400000000351152336022500007260 0ustar00<?php

if ( ! function_exists( 'et_core_cache_init' ) ):
function et_core_cache_init() {}
endif;


if ( ! function_exists( 'et_core_cache_dir' ) ):
function et_core_cache_dir() {
	return ET_Core_Cache_Directory::instance();
}
endif;
lib/BluehostCache.php000064400000001721152336022500010533 0ustar00<?php

if ( ! class_exists( 'Endurance_Page_Cache' ) ) {
	return;
}

// https://github.com/bluehost/endurance-page-cache
class ET_Core_LIB_BluehostCache extends Endurance_Page_Cache {

	private static $_instance;

	public function __construct() {
		$this->purged       = array();
		$this->trigger      = null;
		$this->cache_level  = get_option( 'endurance_cache_level', 2 );
		$this->cache_dir    = WP_CONTENT_DIR . '/endurance-page-cache';
		$this->cache_exempt = array( 'wp-admin', '.', 'checkout', 'cart', 'wp-json', '%', '=', '@', '&', ':', ';', );
	}

	public static function get_instance() {
		if ( null === self::$_instance ) {
			self::$_instance = new self;
		}

		return self::$_instance;
	}

	public function clear( $post_id = '' ) {
		if ( '' !== $post_id && method_exists( $this, 'purge_single' ) ) {
			$this->purge_single( get_the_permalink( $post_id ) );
		} else if ( '' === $post_id && method_exists( $this, 'purge_all' ) ) {
			$this->purge_all();
		}
	}
}
lib/OAuth.php000064400000033165152336022500007051 0ustar00<?php
/**
 * ET Core OAuth Library
 *
 * Copyright © 2016-2017 Elegant Themes, Inc.
 *
 * Based on code from the TwitterOAuth Library:
 *   - Copyright © 2009-2016 Abraham Williams
 *   - Copyright © 2007-2009 Andy Smith
 *
 * @license
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
 * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */


class ET_Core_LIB_OAuthBase {
	/**
	 * Writes a message to the PHP error log.
	 *
	 * @since 1.1.0
	 *
	 * @param mixed $msg
	 */
	public static function write_log( $msg, $level = 'DEBUG', $_this = null ) {
		$name = ( null !== $_this ) ? get_class( $_this ) : 'ET_Core_LIB_OAuthBase';

		if ( ! is_string( $msg ) ) {
			$msg = print_r( $msg, true );
		}

		error_log( "{$name} [{$level}]: $msg" );
	}
}


class ET_Core_LIB_OAuthUtil {

	public static function build_http_query( $params, $return_json=false ) {
		if ( ! $params ) {
			return '';
		}

		if ( $return_json ) {
			// return json string without further processing if needed
			return json_encode( $params );
		}

		// Url encode both the keys and the values
		$keys   = ET_Core_LIB_OAuthUtil::urlencode_rfc3986( array_keys( $params ) );
		$values = ET_Core_LIB_OAuthUtil::urlencode_rfc3986( array_values( $params ) );
		$params = array_combine( $keys, $values );

		// Parameters are sorted by name, using lexicographical byte value ordering.
		// Ref: Spec: 9.1.1 (1)
		uksort( $params, 'strcmp' );
		$pairs = array();

		foreach ( $params as $parameter => $value ) {
			if ( is_array( $value ) ) {
					// When two or more parameters share the same name, they are sorted by their value
					// Ref: Spec: 9.1.1 (1)
					// June 12th, 2010 - changed to sort because of issue 164 by hidetaka
					sort( $value, SORT_STRING );

				foreach ( $value as $duplicate_value ) {
					$pairs[] = "{$parameter}={$duplicate_value}";
				}

			} else {
				$pairs[] = "{$parameter}={$value}";
			}
		}

		// For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
		// Each name-value pair is separated by an '&' character (ASCII code 38)
		return implode( '&', $pairs );
	}

	public static function parse_parameters( $input = '' ) {
		if ( '' === $input ) {
			return array();
		}

		$pairs             = explode( '&', $input );
		$parsed_parameters = array();

		foreach ( $pairs as $pair ) {
			$split     = explode( '=', $pair, 2 );
			$parameter = ET_Core_LIB_OAuthUtil::urldecode_rfc3986( $split[0] );
			$value     = isset( $split[1] ) ? ET_Core_LIB_OAuthUtil::urldecode_rfc3986( $split[1] ) : '';

			if ( isset( $parsed_parameters[ $parameter ] ) ) {
				// We have already received parameter(s) with this name, so add to the list
				// of parameters with this name
				if ( is_scalar( $parsed_parameters[ $parameter ] ) ) {
					// This is the first duplicate, so transform scalar (string) into an array
					// so we can add the duplicates
					$parsed_parameters[ $parameter ] = array( $parsed_parameters[ $parameter ] );
				}
				$parsed_parameters[ $parameter ][] = $value;
			} else {
				$parsed_parameters[ $parameter ] = $value;
			}
		}
		return $parsed_parameters;
	}

	public static function urldecode_rfc3986( $string ) {
		return rawurldecode( $string );
	}

	public static function urlencode_rfc3986( $input ) {
		$output = '';

		if ( is_array( $input ) ) {
			$output = array_map( array( 'ET_Core_LIB_OAuthUtil', 'urlencode_rfc3986' ), $input );

		} else if ( is_scalar( $input ) ) {
			$output = rawurlencode( utf8_encode( $input ) );
		}

		return $output;
	}
}

/**
 * A base class for implementing a Signature Method
 * See section 9 ("Signing Requests") in the spec
 */
abstract class ET_Core_LIB_OAuthSignatureMethod {
	/**
	 * Build the signature
	 * NOTE: The output of this function MUST NOT be urlencoded. The encoding is handled in
	 * {@link ET_Core_OAuth_Request} when the final request is serialized.
	 *
	 * @param ET_Core_LIB_OAuthRequest    $request
	 * @param ET_Core_LIB_OAuthConsumer   $consumer
	 * @param ET_Core_LIB_OAuthToken|null $token
	 *
	 * @return string
	 */
	abstract public function build_signature( $request, $consumer, $token = null );

	/**
	 * Verifies that a given signature is correct
	 *
	 * @param ET_Core_LIB_OAuthRequest  $request
	 * @param ET_Core_LIB_OAuthConsumer $consumer
	 * @param ET_Core_LIB_OAuthToken    $token
	 * @param string                    $signature
	 *
	 * @return bool
	 */
	public function check_signature( $request, $consumer, $token, $signature ) {
		$built = $this->build_signature( $request, $consumer, $token );

		// Check for zero length, although its unlikely here
		if ( empty( $built ) || empty( $signature ) ) {
			return false;
		}

		if ( strlen( $built ) !== strlen( $signature ) ) {
			return false;
		}

		// Avoid a timing leak with a (hopefully) time insensitive compare
		$result = 0;

		for ( $i = 0; $i < strlen( $signature ); $i ++ ) {
			$result |= ord( $built[ $i ] ) ^ ord( $signature[ $i ] );
		}

		return 0 === $result;
	}

	/**
	 * Returns the name of this Signature Method (ie HMAC-SHA1)
	 *
	 * @return string
	 */
	abstract public function get_name();
}


/**
 * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] where
 * the Signature Base String is the text and the key is the concatenated values of the Consumer Secret and
 * Token Secret (each encoded per Parameter Encoding first), separated by an '&' character (ASCII code 38)
 * even if empty. As per Chapter 9.2 of the HMAC-SHA1 spec.
 */
class ET_Core_LIB_OAuthHMACSHA1 extends ET_Core_LIB_OAuthSignatureMethod {
	/**
	 * @inheritDoc
	 */
	public function build_signature( $request, $consumer, $token = null ) {
		$base_string          = $request->get_signature_base_string();
		$token                = $token ? $token->secret : '';
		$request->base_string = $base_string;
		$key_parts            = array( $consumer->secret, $token );
		$key                  = implode( '&', $key_parts );

		return base64_encode( hash_hmac( 'sha1', $base_string, $key, true ) );
	}

	/**
	 * @inheritDoc
	 */
	public function get_name() {
		return 'HMAC-SHA1';
	}
}


class ET_Core_LIB_OAuthConsumer {
	public $callback_url;
	public $id;
	public $key;
	public $secret;

	public function __construct( $id, $secret, $callback_url = '' ) {
		$this->id           = $this->key = $id;
		$this->secret       = $secret;
		$this->callback_url = $callback_url;
	}

	function __toString() {
		$name = get_class( $this );
		$key  = 'ET_Core_LIB_OAuthConsumer' === $name ? 'key' : 'id';

		return "{$name}[{$key}={$this->key}, secret={$this->secret}]";
	}
}


class ET_Core_LIB_OAuthToken {
	public $key;
	public $secret;
	public $refresh_token;

	/**
	 * @param string $key    The OAuth Token
	 * @param string $secret The OAuth Token Secret
	 */
	public function __construct( $key, $secret ) {
		$this->key    = $key;
		$this->secret = $secret;
	}

	/**
	 * Generates the basic string serialization of a token that a server
	 * would respond to 'request_token' and 'access_token' calls with
	 *
	 * @return string
	 */
	public function __toString() {
		return sprintf( "oauth_token=%s&oauth_token_secret=%s",
			ET_Core_LIB_OAuthUtil::urlencode_rfc3986( $this->key ),
			ET_Core_LIB_OAuthUtil::urlencode_rfc3986( $this->secret )
		);
	}
}


class ET_Core_LIB_OAuthRequest extends ET_Core_LIB_OAuthBase {
	protected $parameters;
	protected $http_method;
	protected $http_url;
	public static $version = '1.0';
	public $base_string;

	/**
	 * ET_Core_OAuth_Request Constructor
	 *
	 * @param string     $http_method
	 * @param string     $http_url
	 * @param array|null $parameters
	 */
	public function __construct( $http_method, $http_url, $parameters = array() ) {
		$this->parameters  = $parameters;
		$this->http_method = $http_method;
		$this->http_url    = $http_url;
	}

	/**
	 * pretty much a helper function to set up the request
	 *
	 * @param ET_Core_LIB_OAuthConsumer $consumer
	 * @param ET_Core_LIB_OAuthToken    $token
	 * @param string                    $http_method
	 * @param string                    $http_url
	 * @param array                     $parameters
	 *
	 * @return ET_Core_LIB_OAuthRequest
	 */
	public static function from_consumer_and_token( $consumer, $token, $http_method, $http_url, $parameters = array() ) {
		$defaults = array(
			"oauth_version"      => ET_Core_LIB_OAuthRequest::$version,
			"oauth_nonce"        => ET_Core_LIB_OAuthRequest::generate_nonce(),
			"oauth_timestamp"    => time(),
			"oauth_consumer_key" => $consumer->key
		);

		if ( $token ) {
			$defaults['oauth_token'] = $token->key;
		}

		$parameters = wp_parse_args( $parameters, $defaults );

		return new ET_Core_LIB_OAuthRequest( $http_method, $http_url, $parameters );
	}

	/**
	 * Returns the HTTP Method in uppercase
	 *
	 * @return string
	 */
	public function get_normalized_http_method() {
		return strtoupper( $this->http_method );
	}

	/**
	 * parses the url and rebuilds it to be
	 * scheme://host/path
	 *
	 * @return string
	 */
	public function get_normalized_http_url() {
		$parts  = parse_url( $this->http_url );
		$scheme = $parts['scheme'];
		$host   = strtolower( $parts['host'] );
		$path   = $parts['path'];

		return "{$scheme}://{$host}{$path}";
	}

	/**
	 * @param $name
	 *
	 * @return string|null
	 */
	public function get_parameter( $name ) {
		return isset( $this->parameters[ $name ] ) ? $this->parameters[ $name ] : null;
	}

	/**
	 * @return array
	 */
	public function get_parameters() {
		return $this->parameters;
	}

	/**
	 * The request parameters, sorted and concatenated into a normalized string.
	 *
	 * @return string
	 */
	public function get_signable_parameters() {
		// Grab a copy of all parameters
		$params = $this->parameters;

		// Remove oauth_signature if present
		// Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
		if ( isset( $params['oauth_signature'] ) ) {
			unset( $params['oauth_signature'] );
		}

		return ET_Core_LIB_OAuthUtil::build_http_query( $params );
	}

	/**
	 * Returns the base string of this request
	 *
	 * The base string defined as the method, the url, and the parameters (normalized),
	 * each urlencoded and then concatenated with '&'.
	 *
	 * @return string
	 */
	public function get_signature_base_string() {
		$parts = array(
			$this->get_normalized_http_method(),
			$this->get_normalized_http_url(),
			$this->get_signable_parameters()
		);

		$parts = ET_Core_LIB_OAuthUtil::urlencode_rfc3986( $parts );

		return implode( '&', $parts );
	}

	/**
	 * @param $name
	 */
	public function remove_parameter( $name ) {
		unset( $this->parameters[ $name ] );
	}

	/**
	 * @param string $name
	 * @param string $value
	 */
	public function set_parameter( $name, $value ) {
		$this->parameters[ $name ] = $value;
	}

	/**
	 * Builds the data one would send in a POST request
	 * @param bool $need_json indicates the query data format ( http query string or json string )
	 *
	 * @return string
	 */
	public function to_post_data( $need_json = false ) {
		return ET_Core_LIB_OAuthUtil::build_http_query( $this->parameters, $need_json );
	}

	/**
	 * Builds a url usable for a GET request
	 *
	 * @return string
	 */
	public function to_url() {
		$postData = $this->to_post_data();
		$out      = $this->get_normalized_http_url();

		if ( $postData ) {
			$out .= '?' . $postData;
		}

		return $out;
	}

	/**
	 * Builds the HTTP Authorization Header
	 *
	 * @return string
	 */
	public function to_header() {
		$out = '';

		foreach ( $this->parameters as $parameter => $value ) {
			if ( 0 !== strpos( 'oauth', $parameter ) ) {
				continue;
			}

			if ( is_array( $value ) ) {
				self::write_log( 'Arrays not supported in headers!', 'ERROR' );
				continue;
			}

			$out .= ( '' === $out ) ? 'OAuth ' : ', ';
			$out .= ET_Core_LIB_OAuthUtil::urlencode_rfc3986( $parameter );
			$out .= '="' . ET_Core_LIB_OAuthUtil::urlencode_rfc3986( $value ) . '"';
		}

		return $out;
	}

	/**
	 * @return string
	 */
	public function __toString() {
		return $this->to_url();
	}

	/**
	 * @param ET_Core_LIB_OAuthSignatureMethod $signature_method
	 * @param ET_Core_LIB_OAuthConsumer        $consumer
	 * @param ET_Core_LIB_OAuthToken           $token
	 */
	public function sign_request( $signature_method, $consumer, $token = null ) {
		$this->set_parameter( 'oauth_signature_method', $signature_method->get_name() );
		$signature = $this->build_signature( $signature_method, $consumer, $token );
		$this->set_parameter( 'oauth_signature', $signature );
	}

	/**
	 * @param ET_Core_LIB_OAuthSignatureMethod $signatureMethod
	 * @param ET_Core_LIB_OAuthConsumer        $consumer
	 * @param ET_Core_LIB_OAuthToken           $token
	 *
	 * @return string
	 */
	public function build_signature( $signatureMethod, $consumer, $token = null ) {
		return $signatureMethod->build_signature( $this, $consumer, $token );
	}

	/**
	 * @return string
	 */
	public static function generate_nonce() {
		return md5( microtime() . mt_rand() );
	}
}
lib/WPHttp.php000064400000035442152336022500007217 0ustar00<?php

global $wp_version;

// Since WP 5.9, the 'wp-includes/class-http.php' file is deprecated in favor of the
// 'wp-includes/class-wp-http.php' file.
if ( version_compare( $wp_version, '5.9', '>=' ) ) {
	require_once ABSPATH . WPINC . '/class-wp-http.php';
} else {
	require_once ABSPATH . WPINC . '/class-http.php';
}

/**
 * Some 3rd-party APIs require data to be sent in the request body for
 * GET requests (eg. SendinBlue). This is not currently possible using the WP
 * HTTP API. I've submitted a patch to WP Core for this. Until its merged, we
 * have to extend the WP_HTTP class and override the method in question.
 *
 * @see https://core.trac.wordpress.org/ticket/39043
 *
 * @private
 */
class ET_Core_LIB_WPHttp extends WP_Http {
	/**
	 * Send an HTTP request to a URI.
	 *
	 * Please note: The only URI that are supported in the HTTP Transport implementation
	 * are the HTTP and HTTPS protocols.
	 *
	 * @access public
	 * @since 2.7.0
	 *
	 * @param string       $url  The request URL.
	 * @param string|array $args {
	 *     Optional. Array or string of HTTP request arguments.
	 *
	 *     @type string       $method              Request method. Accepts 'GET', 'POST', 'HEAD', or 'PUT'.
	 *                                             Some transports technically allow others, but should not be
	 *                                             assumed. Default 'GET'.
	 *     @type int          $timeout             How long the connection should stay open in seconds. Default 5.
	 *     @type int          $redirection         Number of allowed redirects. Not supported by all transports
	 *                                             Default 5.
	 *     @type string       $httpversion         Version of the HTTP protocol to use. Accepts '1.0' and '1.1'.
	 *                                             Default '1.0'.
	 *     @type string       $user-agent          User-agent value sent.
	 *                                             Default WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ).
	 *     @type bool         $reject_unsafe_urls  Whether to pass URLs through wp_http_validate_url().
	 *                                             Default false.
	 *     @type bool         $blocking            Whether the calling code requires the result of the request.
	 *                                             If set to false, the request will be sent to the remote server,
	 *                                             and processing returned to the calling code immediately, the caller
	 *                                             will know if the request succeeded or failed, but will not receive
	 *                                             any response from the remote server. Default true.
	 *     @type string|array $headers             Array or string of headers to send with the request.
	 *                                             Default empty array.
	 *     @type array        $cookies             List of cookies to send with the request. Default empty array.
	 *     @type string|array $body                Body to send with the request. Default null.
	 *     @type bool         $compress            Whether to compress the $body when sending the request.
	 *                                             Default false.
	 *     @type bool         $decompress          Whether to decompress a compressed response. If set to false and
	 *                                             compressed content is returned in the response anyway, it will
	 *                                             need to be separately decompressed. Default true.
	 *     @type bool         $sslverify           Whether to verify SSL for the request. Default true.
	 *     @type string       sslcertificates      Absolute path to an SSL certificate .crt file.
	 *                                             Default ABSPATH . WPINC . '/certificates/ca-bundle.crt'.
	 *     @type bool         $stream              Whether to stream to a file. If set to true and no filename was
	 *                                             given, the stream will be output to a new file in the WP temp dir
	 *                                             using a name generated from the basename of the URL. Default false.
	 *     @type string       $filename            Filename of the file to write to when streaming. $stream must be
	 *                                             set to true. Default null.
	 *     @type int          $limit_response_size Size in bytes to limit the response to. Default null.
	 *     @type bool|null    $data_format         How the `$data` should be sent ('query' or 'body'). Default null.
	 *                                             If null, data will be sent as 'query' for HEAD/GET and as
	 *                                             'body' for POST/PUT/OPTIONS/PATCH/DELETE.
	 *
	 * }
	 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
	 *                        A WP_Error instance upon error.
	 */
	public function request( $url, $args = array() ) {
		$defaults = array(
			'method'              => 'GET',
			/**
			 * Filters the timeout value for an HTTP request.
			 *
			 * @since 2.7.0
			 *
			 * @param int $timeout_value Time in seconds until a request times out.
			 *                           Default 5.
			 */
			'timeout'             => apply_filters( 'http_request_timeout', 5 ),
			/**
			 * Filters the number of redirects allowed during an HTTP request.
			 *
			 * @since 2.7.0
			 *
			 * @param int $redirect_count Number of redirects allowed. Default 5.
			 */
			'redirection'         => apply_filters( 'http_request_redirection_count', 5 ),
			/**
			 * Filters the version of the HTTP protocol used in a request.
			 *
			 * @since 2.7.0
			 *
			 * @param string $version Version of HTTP used. Accepts '1.0' and '1.1'.
			 *                        Default '1.0'.
			 */
			'httpversion'         => apply_filters( 'http_request_version', '1.0' ),
			/**
			 * Filters the user agent value sent with an HTTP request.
			 *
			 * @since 2.7.0
			 *
			 * @param string $user_agent WordPress user agent string.
			 */
			'user-agent'          => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ),
			/**
			 * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request.
			 *
			 * @since 3.6.0
			 *
			 * @param bool $pass_url Whether to pass URLs through wp_http_validate_url().
			 *                       Default false.
			 */
			'reject_unsafe_urls'  => apply_filters( 'http_request_reject_unsafe_urls', false ),
			'blocking'            => true,
			'headers'             => array(),
			'cookies'             => array(),
			'body'                => null,
			'compress'            => false,
			'decompress'          => true,
			'sslverify'           => true,
			'sslcertificates'     => ABSPATH . WPINC . '/certificates/ca-bundle.crt',
			'stream'              => false,
			'filename'            => null,
			'limit_response_size' => null,
			'data_format'         => null,
		);

		// Pre-parse for the HEAD checks.
		$args = wp_parse_args( $args );

		// By default, Head requests do not cause redirections.
		if ( isset( $args['method'] ) && 'HEAD' === $args['method'] ) {
			$defaults['redirection'] = 0;
		}

		$request_args = wp_parse_args( $args, $defaults );
		/**
		 * Filters the arguments used in an HTTP request.
		 *
		 * @since 2.7.0
		 *
		 * @param array  $request_args An array of HTTP request arguments.
		 * @param string $url          The request URL.
		 */
		$request_args = apply_filters( 'http_request_args', $request_args, $url );

		// The transports decrement this, store a copy of the original value for loop purposes.
		if ( ! isset( $request_args['_redirection'] ) ) {
			$request_args['_redirection'] = $request_args['redirection'];
		}

		/**
		 * Filters whether to preempt an HTTP request's return value.
		 *
		 * Returning a non-false value from the filter will short-circuit the HTTP request and return
		 * early with that value. A filter should return either:
		 *
		 *  - An array containing 'headers', 'body', 'response', 'cookies', and 'filename' elements
		 *  - A WP_Error instance
		 *  - boolean false (to avoid short-circuiting the response)
		 *
		 * Returning any other value may result in unexpected behaviour.
		 *
		 * @since 2.9.0
		 *
		 * @param false|array|WP_Error $preempt Whether to preempt an HTTP request's return value. Default false.
		 * @param array                $request_args       HTTP request arguments.
		 * @param string               $url     The request URL.
		 */
		$pre = apply_filters( 'pre_http_request', false, $request_args, $url );

		if ( false !== $pre ) {
			return $pre;
		}

		if ( function_exists( 'wp_kses_bad_protocol' ) ) {
			if ( $request_args['reject_unsafe_urls'] ) {
				$url = wp_http_validate_url( $url );
			}
			if ( $url ) {
				$url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) );
			}
		}

		$arrURL = @parse_url( $url );

		if ( empty( $url ) || empty( $arrURL['scheme'] ) ) {
			return new WP_Error( 'http_request_failed', esc_html__( 'A valid URL was not provided.' ) );
		}

		if ( $this->block_request( $url ) ) {
			return new WP_Error( 'http_request_failed', esc_html__( 'User has blocked requests through HTTP.' ) );
		}

		// If we are streaming to a file but no filename was given drop it in the WP temp dir
		// and pick its name using the basename of the $url
		if ( $request_args['stream'] ) {
			if ( empty( $request_args['filename'] ) ) {
				$request_args['filename'] = get_temp_dir() . basename( $url );
			}

			// Force some settings if we are streaming to a file and check for existence and perms of destination directory
			$request_args['blocking'] = true;
			if ( ! wp_is_writable( dirname( $request_args['filename'] ) ) ) {
				return new WP_Error( 'http_request_failed', esc_html__( 'Destination directory for file streaming does not exist or is not writable.' ) );
			}
		}

		if ( is_null( $request_args['headers'] ) ) {
			$request_args['headers'] = array();
		}

		// WP allows passing in headers as a string, weirdly.
		if ( ! is_array( $request_args['headers'] ) ) {
			$processedHeaders = WP_Http::processHeaders( $request_args['headers'] );
			$request_args['headers']     = $processedHeaders['headers'];
		}

		// Setup arguments
		$headers = $request_args['headers'];
		$data    = $request_args['body'];
		$type    = $request_args['method'];
		$options = array(
			'timeout'   => $request_args['timeout'],
			'useragent' => $request_args['user-agent'],
			'blocking'  => $request_args['blocking'],
			'hooks'     => new WP_HTTP_Requests_Hooks( $url, $request_args ),
		);

		// Ensure redirects follow browser behaviour.
		$options['hooks']->register( 'requests.before_redirect', array(
			get_class(),
			'browser_redirect_compatibility'
		) );

		if ( $request_args['stream'] ) {
			$options['filename'] = $request_args['filename'];
		}
		if ( empty( $request_args['redirection'] ) ) {
			$options['follow_redirects'] = false;
		} else {
			$options['redirects'] = $request_args['redirection'];
		}

		// Use byte limit, if we can
		if ( isset( $request_args['limit_response_size'] ) ) {
			$options['max_bytes'] = $request_args['limit_response_size'];
		}

		// If we've got cookies, use and convert them to Requests_Cookie.
		if ( ! empty( $request_args['cookies'] ) ) {
			$options['cookies'] = WP_Http::normalize_cookies( $request_args['cookies'] );
		}

		// SSL certificate handling
		if ( ! $request_args['sslverify'] ) {
			$options['verify']     = false;
			$options['verifyname'] = false;
		} else {
			$options['verify'] = $request_args['sslcertificates'];
		}

		if ( null !== $request_args['data_format'] ) {
			$options['data_format'] = $request_args['data_format'];

		} elseif ( 'HEAD' !== $type && 'GET' !== $type ) {
			// All non-GET/HEAD requests should put the arguments in the form body.
			$options['data_format'] = 'body';
		}

		/**
		 * Filters whether SSL should be verified for non-local requests.
		 *
		 * @since 2.8.0
		 *
		 * @param bool $ssl_verify Whether to verify the SSL connection. Default true.
		 */
		$options['verify'] = apply_filters( 'https_ssl_verify', $options['verify'] );

		// Check for proxies.
		$proxy = new WP_HTTP_Proxy();
		if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
			$options['proxy'] = new Requests_Proxy_HTTP( $proxy->host() . ':' . $proxy->port() );

			if ( $proxy->use_authentication() ) {
				$options['proxy']->use_authentication = true;
				$options['proxy']->user               = $proxy->username();
				$options['proxy']->pass               = $proxy->password();
			}
		}

		// Avoid issues where mbstring.func_overload is enabled
		mbstring_binary_safe_encoding();

		try {
			// Since WP 6.2, the 'Requests_Exception' class is deprecated in favor of the
			// 'WpOrg\Requests\Requests' class due to Requests library upgraded to 2.0.5.
			if ( class_exists( 'WpOrg\Requests\Requests' ) ) {
				$requests_response = WpOrg\Requests\Requests::request( $url, $headers, $data, $type, $options );
			} else {
				$requests_response = Requests::request( $url, $headers, $data, $type, $options );
			}

			// Convert the response into an array
			$http_response = new WP_HTTP_Requests_Response( $requests_response, $request_args['filename'] );
			$response      = $http_response->to_array();

			// Add the original object to the array.
			$response['http_response'] = $http_response;
		} catch ( Exception $e ) {
			// Since there is no change on the error details and the method to get the error
			// message, we can use `Exception` to cover both of `WpOrg\Requests\Exception` and
			// `Requests_Exception` classes.
			$response = new WP_Error( 'http_request_failed', $e->getMessage() );
		}

		reset_mbstring_encoding();

		/**
		 * Fires after an HTTP API response is received and before the response is returned.
		 *
		 * @since 2.8.0
		 *
		 * @param array|WP_Error $response HTTP response or WP_Error object.
		 * @param string         $context  Context under which the hook is fired.
		 * @param string         $class    HTTP transport used.
		 * @param array          $args     HTTP request arguments.
		 * @param string         $url      The request URL.
		 */
		do_action( 'http_api_debug', $response, 'response', 'Requests', $request_args, $url );
		if ( is_wp_error( $response ) ) {
			return $response;
		}

		if ( ! $request_args['blocking'] ) {
			return array(
				'headers'       => array(),
				'body'          => '',
				'response'      => array(
					'code'    => false,
					'message' => false,
				),
				'cookies'       => array(),
				'http_response' => null,
			);
		}

		/**
		 * Filters the HTTP API response immediately before the response is returned.
		 *
		 * @since 2.9.0
		 *
		 * @param array  $response HTTP response.
		 * @param array  $request_args        HTTP request arguments.
		 * @param string $url      The request URL.
		 */
		return apply_filters( 'http_response', $response, $request_args, $url );
	}
}
lib/SilentThemeUpgraderSkin.php000064400000001133152336022500012557 0ustar00<?php
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

if ( ! class_exists( 'ET_Core_LIB_SilentThemeUpgraderSkin' ) ):
	/**
	 * Theme Upgrader skin which does not output feedback.
	 *
	 * @since 3.10
	 *
	 * @private
	 */
	class ET_Core_LIB_SilentThemeUpgraderSkin extends WP_Upgrader_Skin {
		/**
		 * Override feedback method.
		 *
		 * @since 3.10
		 *
		 * @private
		 *
		 * @param string $string Feedback string.
		 * @param mixed  ...$args Optional text replacements.
		 */
		public function feedback( $string, ...$args ) {
			return; // Suppress all feedback.
		}
	}
endif;
mu-plugins/SupportCenterSafeModeDisableChildThemes.php000064400000004563152336022500017202 0ustar00<?php
/**
 * Plugin Name: Elegant Themes Support Center :: Safe Mode Child Theme Disabler
 * Plugin URI: http://www.elegantthemes.com
 * Description: When the ET Support Center's Safe Mode is activated, this Must-Use Plugin will temporarily disable any active child themes for that user.
 * Author: Elegant Themes
 * Author URI: http://www.elegantthemes.com
 * License: GPLv2 or later
 *
 * @package ET\Core\SupportCenter\SafeModeDisableChildThemes
 * @author Elegant Themes <http://www.elegantthemes.com>
 * @license GNU General Public License v2 <http://www.gnu.org/licenses/gpl-2.0.html>
 */

// Quick exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Disable Child Theme (if Safe Mode is active)
 *
 * The `is_child_theme()` function returns TRUE if a child theme is active. Parent theme info can be gathered from
 * the child theme's settings, so in the case of an active child theme we can capture the parent theme's info and
 * temporarily push the parent theme as active (similar to how WP lets the user preview a theme before activation).
 *
 * @since 3.20
 * @since 3.23 Moved from `ET_Core_SupportCenter::maybe_disable_child_theme()` for an improved Safe Mode experience.
 *
 * @param $current_theme
 *
 * @return false|string
 */
function et_safe_mode_maybe_disable_child_theme( $current_theme ) {
	// Verbose logging: only log if `wp-config.php` has defined `ET_DEBUG='support_center'`
	$DEBUG_ET_SUPPORT_CENTER = defined( 'ET_DEBUG' ) && 'support_center' === ET_DEBUG;

	if ( ! isset( $_COOKIE['et-support-center-safe-mode'] ) ) {
		if ( $DEBUG_ET_SUPPORT_CENTER ) {
			error_log( 'ET Support Center :: Safe Mode: No cookie found' );
		}

		return $current_theme;
	}

	$verify = get_option( 'et-support-center-safe-mode-verify' );

	if ( ! $verify ) {
		if ( $DEBUG_ET_SUPPORT_CENTER ) {
			error_log( 'ET Support Center :: Safe Mode: No option found to verify cookie' );
		}

		return $current_theme;
	}

	if ( $_COOKIE['et-support-center-safe-mode'] !== $verify ) {
		if ( $DEBUG_ET_SUPPORT_CENTER ) {
			error_log( 'ET Support Center :: Safe Mode: Cookie/Option mismatch' );
		}

		return $current_theme;
	}

	$template = get_option( 'template' );

	if ( $template !== $current_theme ) {
		return $template;
	}

	return $current_theme;
}

add_filter( 'template', 'et_safe_mode_maybe_disable_child_theme' );
add_filter( 'stylesheet', 'et_safe_mode_maybe_disable_child_theme' );
mu-plugins/SupportCenterSafeModeDisablePlugins.php000064400000004533152336022500016427 0ustar00<?php
/**
 * Plugin Name: Elegant Themes Support Center :: Safe Mode Plugin Disabler
 * Plugin URI: http://www.elegantthemes.com
 * Description: When the ET Support Center's Safe Mode is activated, this Must-Use Plugin will temporarily disable plugins for that user.
 * Author: Elegant Themes
 * Author URI: http://www.elegantthemes.com
 * License: GPLv2 or later
 *
 * @package ET\Core\SupportCenter\SafeModeDisablePlugins
 * @author Elegant Themes <http://www.elegantthemes.com>
 * @license GNU General Public License v2 <http://www.gnu.org/licenses/gpl-2.0.html>
 */

// Quick exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Disable Plugins (if Safe Mode is active)
 *
 * @since 3.20
 *
 * @param array $plugins WP's array of active plugins
 *
 * @return array
 */
function et_safe_mode_maybe_disable_plugins( $plugins = array() ) {
	// Verbose logging: only log if `wp-config.php` has defined `ET_DEBUG='support_center'`
	$DEBUG_ET_SUPPORT_CENTER = defined( 'ET_DEBUG' ) && 'support_center' === ET_DEBUG;

	if ( ! isset( $_COOKIE['et-support-center-safe-mode'] ) ) {
		if ( $DEBUG_ET_SUPPORT_CENTER ) {
			error_log( 'ET Support Center :: Safe Mode: No cookie found' );
		}

		return $plugins;
	}

	$verify = get_option( 'et-support-center-safe-mode-verify' );

	if ( ! $verify ) {
		if ( $DEBUG_ET_SUPPORT_CENTER ) {
			error_log( 'ET Support Center :: Safe Mode: No option found to verify cookie' );
		}

		return $plugins;
	}

	if ( $_COOKIE['et-support-center-safe-mode'] !== $verify ) {
		if ( $DEBUG_ET_SUPPORT_CENTER ) {
			error_log( 'ET Support Center :: Safe Mode: Cookie/Option mismatch' );
		}

		return $plugins;
	}

	/** @var array Collection of plugins that we will NOT disable when Safe Mode is activated. */
	$plugins_allowlist = (array) get_option( 'et_safe_mode_plugins_allowlist' );

	$clean_plugins = $plugins;

	foreach ( $clean_plugins as $key => &$plugin ) {
		// Check whether this plugin appears in our allowlist
		if ( ! in_array( $plugin, $plugins_allowlist ) ) {
			if ( $DEBUG_ET_SUPPORT_CENTER ) {
				error_log( 'ET Support Center :: Safe Mode: Unsetting plugin: ' . json_encode( $plugin ) );
			}
			unset( $clean_plugins[ $key ] );
		}
	}

	return $clean_plugins;
}

add_filter( 'option_active_plugins', 'et_safe_mode_maybe_disable_plugins' );
add_filter( 'option_active_sitewide_plugins', 'et_safe_mode_maybe_disable_plugins' );
README.md000064400000001646152336022500006030 0ustar00## Core Components
This directory contains all of Core's PHP Components. Components are organized into groups using a nested directory structure.
 
### What's Inside
|File|Name|Description|
|:--------|:----------|:----------|
|**api**|**ET_Core_API**|Communicate with 3rd-party APIs|
|**data**|**ET_Core_Data**|Work with data (consume, format, etc)|
|**lib**|**ET_Core_LIB**|3rd-Party Libraries|
|**post**|**ET_Core_Post**|Work with WP Objects|
|Cache.php|ET_Core_Cache|Simple object cache|
|HTTPInterface.php|ET_Core_HTTPInterface|Wrapper for WP's HTTP API|
|Logger.php|ET_Core_Logger|Write to the debug log.
|PageResource.php|ET_Core_PageResource|Cache inline styles & scripts as static files.|
|Portability.php|ET_Core_Portability|Portability import/export|
|Rollback.php|ET_Core_VersionRollback|Theme & plugin version rollback|
|Updates.php|ET_Core_Updates|Theme & plugin updates|

> ***Note:*** Component groups are in **bold**.
HTTPInterface.php000064400000026016152336022500007660 0ustar00<?php

/**
 * Simple object to hold HTTP request details.
 *
 * @since   1.1.0
 *
 * @package ET\Core\HTTP
 */
class ET_Core_HTTPRequest {

	/**
	 * @var array
	 */
	public $ARGS;

	/**
	 * @var bool
	 */
	public $BLOCKING = true;

	/**
	 * @var null|array
	 */
	public $BODY = null;

	/**
	 * @var bool
	 */
	public $COMPLETE = false;

	/**
	 * @var array
	 */
	public $COOKIES = array();

	/**
	 * @var array
	 */
	public $HEADERS = array();

	/**
	 * @var bool
	 */
	public $IS_AUTH = false;

	/**
	 * @var string
	 */
	public $METHOD = 'GET';

	/**
	 * @var string
	 */
	public $OWNER;

	/**
	 * @var string
	 */
	public $URL;

	/**
	 * @var string
	 */
	public $USER_AGENT;

	/**
	 * ET_Core_HTTP_Request constructor.
	 *
	 * @param string $url          The request URL.
	 * @param string $method       HTTP request method. Default is 'GET'.
	 * @param string $owner        The name of the owner of this request instance. Default is 'ET_Core'.
	 * @param bool   $is_auth      Whether or not this request is auth-related. Cache disabled if `true`. Default is `false`.
	 * @param array  $body         The request body. Default is `null`.
	 * @param bool   $is_json_body
	 */
	public function __construct( $url, $method = 'GET', $owner = 'ET_Core', $is_auth = false, $body = null, $is_json_body = false, $ssl_verify = true ) {
		$this->URL         = esc_url_raw( $url );
		$this->METHOD      = $method;
		$this->BODY        = $body;
		$this->IS_AUTH     = $is_auth;
		$this->OWNER       = $owner;
		$this->data_format = null;
		$this->JSON_BODY   = $is_json_body;
		$this->SSL_VERIFY  = $ssl_verify;

		$this->_set_user_agent();
		$this->prepare_args();
	}

	/**
	 * Only include necessary properties when printing this object using {@link var_dump}.
	 *
	 * @return array
	 */
	public function __debugInfo() {
		return array(
			'ARGS'         => $this->ARGS,
			'URL'          => $this->URL,
			'METHOD'       => $this->METHOD,
			'BODY'         => $this->BODY,
			'IS_AUTH'      => $this->IS_AUTH,
			'IS_JSON_BODY' => $this->JSON_BODY,
			'OWNER'        => $this->OWNER,
		);
	}

	/**
	 * Sets the user agent string.
	 */
	private function _set_user_agent() {
		global $wp_version;
		$owner   = $this->OWNER;
		$version =  'bloom' === $owner ? $GLOBALS['et_bloom']->plugin_version : ET_CORE_VERSION;

		if ( 'builder' === $owner ) {
			$owner = 'Divi Builder';
		}

		if ( '' === $owner ) {
			$this->OWNER = $owner = 'ET_Core';

		} else {
			$owner = ucfirst( $owner );
		}

		$this->USER_AGENT = "WordPress/{$wp_version}; {$owner}/{$version}; " . esc_url_raw( get_bloginfo( 'url' ) );
	}

	/**
	 * Prepares the request arguments (to be passed to wp_remote_*())
	 */
	public function prepare_args() {
		$this->ARGS = array(
			'blocking'   => $this->BLOCKING,
			'body'       => $this->BODY,
			'cookies'    => $this->COOKIES,
			'headers'    => $this->HEADERS,
			'method'     => $this->METHOD,
			'sslverify'  => $this->SSL_VERIFY,
			'user-agent' => $this->USER_AGENT,
			'timeout'    => 30,
		);
	}
}

/**
 * Simple object to hold HTTP response details.
 *
 * @since   1.1.0
 *
 * @package ET\Core\HTTP
 */
class ET_Core_HTTPResponse {

	/**
	 * @var array
	 */
	public $COOKIES;

	/**
	 * @var string|array
	 */
	public $DATA;

	/**
	 * @var bool
	 */
	public $ERROR = false;

	/**
	 * The error message if `self::$ERROR` is `true`.
	 *
	 * @var string
	 */
	public $ERROR_MESSAGE;

	/**
	 * @var array
	 */
	public $HEADERS;

	/**
	 * @var array|WP_Error
	 */
	public $RAW_RESPONSE;

	/**
	 * @var ET_Core_HTTPRequest
	 */
	public $REQUEST;

	/**
	 * The response's HTTP status code.
	 *
	 * @var int
	 */
	public $STATUS_CODE;

	/**
	 * @var string
	 */
	public $STATUS_MESSAGE;

	/**
	 * ET_Core_HTTP_Response constructor.
	 *
	 * @param ET_Core_HTTPRequest $request
	 * @param array|WP_Error      $response
	 */
	public function __construct( $request, $response ) {
		$this->REQUEST      = $request;
		$this->RAW_RESPONSE = $response;

		$this->_parse_response();
	}

	/**
	 * Parse response and save relevant details.
	 */
	private function _parse_response() {
		if ( is_wp_error( $this->RAW_RESPONSE ) ) {
			$this->ERROR          = true;
			$this->ERROR_MESSAGE  = $this->RAW_RESPONSE->get_error_message();
			$this->STATUS_CODE    = $this->RAW_RESPONSE->get_error_code();
			$this->STATUS_MESSAGE = $this->ERROR_MESSAGE;
			return;
		}

		$this->DATA           = $this->RAW_RESPONSE['body'];
		$this->HEADERS        = $this->RAW_RESPONSE['headers'];
		$this->COOKIES        = $this->RAW_RESPONSE['cookies'];
		$this->STATUS_CODE    = $this->RAW_RESPONSE['response']['code'];
		$this->STATUS_MESSAGE = $this->RAW_RESPONSE['response']['message'];

		if ( $this->STATUS_CODE >= 400 ) {
			$this->ERROR         = true;
			$this->ERROR_MESSAGE = $this->STATUS_MESSAGE;
		}
	}

	/**
	 * Only include necessary properties when printing this object using {@link var_dump}.
	 *
	 * @return array
	 */
	public function __debugInfo() {
		return array(
			'STATUS_CODE'    => $this->STATUS_CODE,
			'STATUS_MESSAGE' => $this->STATUS_MESSAGE,
			'ERROR'          => $this->ERROR,
			'ERROR_MESSAGE'  => $this->ERROR_MESSAGE,
			'DATA'           => $this->DATA,
		);
	}

	/**
	 * Only include necessary properties when serializing this object for
	 * storage in the WP Transient Cache.
	 *
	 * @return array
	 */
	public function __sleep() {
		return array( 'ERROR', 'ERROR_MESSAGE', 'STATUS_CODE', 'STATUS_MESSAGE', 'DATA' );
	}
}


/**
 * High level, generic, wrapper for making HTTP requests. It uses WordPress HTTP API under-the-hood.
 *
 * @since   1.1.0
 *
 * @package ET\Core\HTTP
 */
class ET_Core_HTTPInterface {
	/**
	 * How much time responses are cached (in seconds).
	 *
	 * @since 1.1.0
	 * @var   int
	 */
	protected $cache_timeout;

	/**
	 * @var ET_Core_HTTPRequest
	 */
	public $request;

	/**
	 * @var ET_Core_HTTPResponse
	 */
	public $response;

	/**
	 * Whether or not json responses are expected to be received. Default is `true`.
	 *
	 * @var bool
	 */
	public $expects_json;

	/**
	 * The name of the theme/plugin that created this class instance. Default: 'ET_Core'.
	 *
	 * @var string
	 */
	public $owner;

	/**
	 * ET_Core_API_HTTP_Interface constructor.
	 *
	 * @since 1.1.0
	 *
	 * @param string $owner           The name of the theme/plugin that created this class instance. Default: 'ET_Core'.
	 * @param array  $request_details Array of config values for the request. Optional.
	 * @param bool   $json            Whether or not json responses are expected to be received. Default is `true`.
	 */
	public function __construct( $owner = 'ET_Core', $request_details = array(), $json = true ) {
		$this->expects_json  = $json;
		$this->cache_timeout = 15 * MINUTE_IN_SECONDS;
		$this->owner         = $owner;

		if ( ! empty( $request_details ) ) {
			list( $url, $method, $is_auth, $body ) = $request_details;
			$this->prepare_request( $url, $method, $is_auth, $body );
		}
	}

	/**
	 * Only include necessary properties when printing this object using {@link var_dump}.
	 *
	 * @return array
	 */
	public function __debugInfo() {
		return array(
			'REQUEST'  => $this->request,
			'RESPONSE' => $this->response,
		);
	}

	/**
	 * Only include necessary properties when serializing this object for
	 * storage in the WP Transient Cache.
	 *
	 * @return array
	 */
	public function __sleep() {
		return array( 'request', 'response' );
	}

	/**
	 * Creates an identifier key for a request based on the URL and body content.
	 *
	 * @internal
	 * @since    1.1.0
	 *
	 * @param string          $url  The request URL.
	 * @param string|string[] $body The request body.
	 *
	 * @return string
	 */
	protected static function _get_cache_key_for_request( $url, $body ) {
		if ( is_array( $body ) ) {
			$url .= json_encode( $body );

		} else if ( ! empty( $body ) ) {
			$url .= $body;
		}

		return 'et-core-http-response-' . md5( $url );
	}

	/**
	 * Writes request/response info to the error log for failed requests.
	 *
	 * @internal
	 * @since    1.1.0
	 */
	protected function _log_failed_request() {
		$details    = print_r( $this, true );
		$class_name = get_class( $this );
		$msg_part   = "{$class_name} ERROR :: Remote request failed...\n\n";
		$msg        = "{$msg_part}Details: {$details}";

		$max_len = @ini_get( 'log_errors_max_len' );

		@ini_set( 'log_errors_max_len', 0 );

		ET_Core_Logger::error( $msg );

		if ( $max_len ) {
			@ini_set( 'log_errors_max_len', $max_len );
		}
	}

	/**
	 * Prepares request to send JSON data.
	 */
	protected function _setup_json_request() {
		$this->request->HEADERS['Accept'] = 'application/json';

		if ( $this->request->JSON_BODY ) {
			$this->request->HEADERS['Content-Type'] = 'application/json';

			$is_json = is_string( $this->request->BODY ) && in_array( $this->request->BODY[0], array( '[', '{' ) );

			if ( $is_json || null === $this->request->BODY ) {
				return;
			}

			$this->request->BODY = json_encode( $this->request->BODY );
		}
	}

	/**
	 * Performs a remote HTTP request. Responses are cached for {@see self::$cache_timeout} seconds using
	 * the {@link https://goo.gl/c0FSMH WP Transients API}.
	 *
	 * @since    1.1.0
	 */
	public function make_remote_request() {
		$response  = null;

		if ( $this->expects_json && ! isset( $this->request->HEADERS['Content-Type'] ) ) {
			$this->_setup_json_request();
		}

		// Make sure we include any changes made after request object was instantiated.
		$this->request->prepare_args();

		if ( 'POST' === $this->request->METHOD ) {
			$response = wp_remote_post( $this->request->URL, $this->request->ARGS );

		} else if ( 'GET' === $this->request->METHOD && null === $this->request->data_format ) {
			$response = wp_remote_get( $this->request->URL, $this->request->ARGS );

		} else if ( 'GET' === $this->request->METHOD && null !== $this->request->data_format ) {
			// WordPress sends data as query args for GET and HEAD requests and provides no way
			// to alter that behavior. Thus, we need to monkey patch it for now. See the mp'd class
			// for more details.
			require_once 'lib/WPHttp.php';
			$wp_http                            = new ET_Core_LIB_WPHttp();
			$this->request->ARGS['data_format'] = $this->request->data_format;
			$response                           = $wp_http->request( $this->request->URL, $this->request->ARGS );

		} else if ( 'PUT' === $this->request->METHOD ) {
			$this->request->ARGS['method'] = 'PUT';
			$response = wp_remote_request( $this->request->URL, $this->request->ARGS );
		}

		$this->response = $response = new ET_Core_HTTPResponse( $this->request, $response );

		if ( $response->ERROR || defined( 'ET_DEBUG' ) ) {
			$this->_log_failed_request();
		}

		if ( $this->expects_json ) {
			$response->DATA = json_decode( $response->DATA, true );
		}

		$this->request->COMPLETE = true;
	}

	/**
	 * Replaces the current request object with a new instance.
	 *
	 * @param string $url
	 * @param string $method
	 * @param bool   $is_auth
	 * @param mixed? $body
	 * @param bool   $json_body
	 * @param bool   $ssl_verify
	 */
	public function prepare_request( $url, $method = 'GET', $is_auth = false, $body = null, $json_body = false, $ssl_verify = true ) {
		$this->request = new ET_Core_HTTPRequest( $url, $method, $this->owner, $is_auth, $body, $json_body, $ssl_verify );
	}
}
CompatibilityWarning.php000064400000210763152336022500011423 0ustar00<?php
/**
 * ET_Core_CompatibilityWarning class file.
 *
 * @class   ET_Core_CompatibilityWarning
 * @package Core
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

if ( ! class_exists( 'ET_Core_CompatibilityWarning' ) ) :

	/**
	 * Plugin & theme compatibility warning system backported from WP 5.5.
	 *
	 * This system is only intended for users who use Divi theme with WP 5.4.2 below and Divi
	 * Builder plugin with WP 5.2 below. There are some areas where it overrides or modifies
	 * the themes & plugins management template to show warnings when the current WP and/or
	 * PHP versions doesn't work with the current and/or upcoming ET plugins/themes.
	 *
	 * A. Update Core
	 *    1. Plugins list section.
	 *    2. Themes list section.
	 *
	 * B. Manage Themes
	 *    On each of incompatible themes, shows warning and disables Activate & Live Preview
	 *    buttons when the theme is not activated yet.
	 *    1. Themes List (tmpl-theme).
	 *    2. Theme Details (tmpl-theme-single).
	 *
	 * C. Theme Customizer
	 *    On each of incompatible themes, shows warning and disables Live Preview button when
	 *    the theme is not activated yet. In addition, disable Publish button for the current
	 *    active theme.
	 *    1. Themes List (tmpl-theme).
	 *    2. Theme Details (tmpl-theme-single).
	 *    3. Publish Button for current active theme.
	 *
	 * D. Plugins List
	 *    1. Plugins List via `after_plugin_row_` action hook.
	 *    2. Plugin activation warning. ET plugins that want to use this warning should
	 *       register `maybe_deactivate_incompatible_plugin()` on their activation hook.
	 *
	 * @since 4.7.0
	 */
	class ET_Core_CompatibilityWarning {

		/**
		 * Class instance.
		 *
		 * @var ET_Core_CompatibilityWarning
		 */
		public static $instance_class;

		/**
		 * WP version where the official warning system is introduced.
		 *
		 * @var string
		 */
		public $supported_wp_version = array(
			'plugin' => '5.3.0',
			'theme'  => '5.5.0',
		);

		/**
		 * Class constructor.
		 */
		public function __construct() {
			global $wp_version;

			// Ensure the system is loaded on lower version of supported version.
			if ( version_compare( $wp_version, $this->supported_wp_version[ ET_CORE_TYPE ], '>=' ) ) {
				return;
			}

			add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );

			// A. Update Core - Overrides plugins and themes updates table body.
			add_action( 'admin_print_footer_scripts-update-core.php', array( $this, 'overrides_update_core_plugins_table_body' ) );
			add_action( 'admin_print_footer_scripts-update-core.php', array( $this, 'overrides_update_core_themes_table_body' ) );

			// B. Manage Themes - Overrides themes list & details templates.
			add_filter( 'wp_prepare_themes_for_js', array( $this, 'set_theme_additional_properties' ) );
			add_action( 'admin_print_footer_scripts-themes.php', array( $this, 'overrides_tmpl_theme' ) );

			// C. Theme Customizer - Overrides themes list & details templates.
			add_action( 'customize_controls_print_footer_scripts', array( $this, 'overrides_tmpl_customize_control_theme_content' ) );

			// D. Plugins - Overrides current plugin list. Default priority is 20.
			add_action( 'load-plugins.php', array( $this, 'overrides_plugins_table_rows' ), 21 );
		}

		/**
		 * Returns instance of the class.
		 *
		 * @since 4.7.0
		 *
		 * @return ET_Core_CompatibilityWarning
		 */
		public static function instance() {
			if ( ! isset( self::$instance_class ) ) {
				self::$instance_class = new self();
			}

			return self::$instance_class;
		}

		/**
		 * Set theme additional properties before it's rendered on Manage Themes page.
		 *
		 * @since 4.7.0
		 *
		 * @param array $prepared_themes List of available themes.
		 *
		 * @return array
		 */
		public function set_theme_additional_properties( $prepared_themes ) {
			// Bail early if the $prepared_themes is empty.
			if ( empty( $prepared_themes ) ) {
				return $prepared_themes;
			}

			// 1. Get available themes update.
			$theme_updates = array();

			if ( current_user_can( 'update_themes' ) ) {
				$updates_themes_transient = get_site_transient( 'update_themes' );

				if ( isset( $updates_themes_transient->response ) ) {
					$theme_updates = $updates_themes_transient->response;
				}
			}

			// 2. Assign compatibility properties.
			$themes = $prepared_themes;

			foreach ( $themes as $theme_slug => $theme_info ) {
				// Ensure style.css file exist.
				$theme_root = get_theme_root( $theme_slug );
				$theme_file = "{$theme_root}/{$theme_slug}/style.css";

				if ( ! file_exists( $theme_file ) ) {
					continue;
				}

				// Get WP & PHP compatibility info.
				$theme_headers = get_file_data(
					$theme_file,
					array(
						'RequiresWP'  => 'Requires at least',
						'RequiresPHP' => 'Requires PHP',
					),
					'theme'
				);

				$require_wp          = et_()->array_get( $theme_headers, 'RequiresWP', null );
				$require_php         = et_()->array_get( $theme_headers, 'RequiresPHP', null );
				$update_requires_wp  = et_()->array_get( $theme_updates, array( $theme_slug, 'requires' ), null );
				$update_requires_php = et_()->array_get( $theme_updates, array( $theme_slug, 'requires_php' ), null );

				$compatibility_properties = array(
					'compatibleWP'   => is_wp_version_compatible( $require_wp ),
					'compatiblePHP'  => is_php_version_compatible( $require_php ),
					'updateResponse' => array(
						'compatibleWP'  => is_wp_version_compatible( $update_requires_wp ),
						'compatiblePHP' => is_php_version_compatible( $update_requires_php ),
					),
				);

				$prepared_themes[ $theme_slug ] = array_merge( $prepared_themes[ $theme_slug ], $compatibility_properties );
			}

			return $prepared_themes;
		}

		/**
		 * Get plugins data for Update Core page.
		 *
		 * The data processing is backported from WP 5.5 with few modification.
		 *
		 * @see {list_plugin_updates()} of WP 5.5
		 *
		 * @since 4.7.0
		 *
		 * @return array
		 */
		public function get_update_core_plugins_data() {
			$plugin_updates   = get_plugin_updates();
			$plugin_processed = array();

			// Bail early if there is no plugin updates.
			if ( empty( $plugin_updates ) ) {
				return array();
			}

			foreach ( $plugin_updates as $plugin_file => $plugin_data ) {
				// reason: The properties come from WP plugin data.
				// phpcs:disable ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase
				$plugin_name    = $plugin_data->Name;
				$plugin_version = $plugin_data->Version;
				// phpcs:enable

				// a. Get current and update WP version.
				$wp_version     = get_bloginfo( 'version' );
				$cur_wp_version = preg_replace( '/-.*$/', '', $wp_version );

				$core_updates = get_core_updates();
				if ( ! isset( $core_updates[0]->response ) || 'latest' === $core_updates[0]->response || 'development' === $core_updates[0]->response || version_compare( $core_updates[0]->current, $cur_wp_version, '=' ) ) {
					$core_update_version = false;
				} else {
					$core_update_version = $core_updates[0]->current;
				}

				// b. Check PHP versions compatibility. WP doesn't check WP versions compatibility.
				$requires_php   = isset( $plugin_data->update->requires_php ) ? $plugin_data->update->requires_php : null;
				$compatible_php = is_php_version_compatible( $requires_php );

				// c. Icon.
				$icon            = '<span class="dashicons dashicons-admin-plugins"></span>';
				$preferred_icons = array( 'svg', '2x', '1x', 'default' );
				foreach ( $preferred_icons as $preferred_icon ) {
					if ( ! empty( $plugin_data->update->icons[ $preferred_icon ] ) ) {
						$icon = '<img src="' . esc_url( $plugin_data->update->icons[ $preferred_icon ] ) . '" alt="" />';
						break;
					}
				}

				// d. Process compatibility warning text.
				// Get plugin compat for running version of WordPress.
				if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $cur_wp_version, '>=' ) ) {
					/* translators: %s: WordPress version. */
					$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: 100%% (according to its author)' ), $cur_wp_version );
				} else {
					/* translators: %s: WordPress version. */
					$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: Unknown' ), $cur_wp_version );
				}

				// Get plugin compat for updated version of WordPress.
				if ( $core_update_version ) {
					if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $core_update_version, '>=' ) ) {
						/* translators: %s: WordPress version. */
						$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: 100%% (according to its author)' ), $core_update_version );
					} else {
						/* translators: %s: WordPress version. */
						$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: Unknown' ), $core_update_version );
					}
				}

				// Get plugin compat for updated version of PHP.
				if ( ! $compatible_php && current_user_can( 'update_php' ) ) {
					$compat .= '<br>' . __( 'This update doesn&#8217;t work with your version of PHP.' ) . '&nbsp;';
					$compat .= sprintf(
						/* translators: %s: URL to Update PHP page. */
						__( '<a href="%s">Learn more about updating PHP</a>.' ),
						esc_url( wp_get_update_php_url() )
					);

					$annotation = wp_get_update_php_annotation();

					if ( $annotation ) {
						$compat .= '</p><p><em>' . $annotation . '</em>';
					}
				}

				// Get the upgrade notice for the new plugin version.
				if ( isset( $plugin_data->update->upgrade_notice ) ) {
					$upgrade_notice = '<br />' . wp_strip_all_tags( $plugin_data->update->upgrade_notice );
				} else {
					$upgrade_notice = '';
				}

				$details_url = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '&section=changelog&TB_iframe=true&width=640&height=662' );
				$details     = sprintf(
					'<a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
					esc_url( $details_url ),
					/* translators: 1: Plugin name, 2: Version number. */
					esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $plugin_data->update->new_version ) ),
					/* translators: %s: Plugin version. */
					sprintf( __( 'View version %s details.' ), $plugin_data->update->new_version )
				);

				$checkbox_id = 'checkbox_' . md5( $plugin_name );

				// Plugin template properties. There is no compatible_wp property passed here.
				$plugin_processed[ $plugin_file ] = array(
					'plugin_file'    => esc_attr( $plugin_file ),
					'name'           => esc_attr( $plugin_name ),
					'checkbox_id'    => esc_attr( 'checkbox_' . md5( $plugin_name ) ),
					'icon'           => et_core_intentionally_unescaped( $icon, 'html' ),
					'version'        => esc_attr( $plugin_version ),
					'new_version'    => esc_attr( $plugin_data->update->new_version ),
					'compatible_php' => $compatible_php,
					'compat'         => et_core_intentionally_unescaped( $compat, 'html' ),
					'upgrade_notice' => et_core_intentionally_unescaped( $upgrade_notice, 'html' ),
					'details'        => et_core_intentionally_unescaped( $details, 'html' ),
				);
			}

			return $plugin_processed;
		}

		/**
		 * Get themes data for Update Core page.
		 *
		 * @since 4.7.0
		 *
		 * @return array
		 */
		public function get_update_core_themes_data() {
			$theme_updates   = get_theme_updates();
			$theme_processed = array();

			// Bail early if there is no theme updates.
			if ( empty( $theme_updates ) ) {
				return array();
			}

			foreach ( $theme_updates as $stylesheet => $theme ) {
				// a. Check compatibility.
				$requires_wp    = et_()->array_get( $theme->update, 'requires', null );
				$requires_php   = et_()->array_get( $theme->update, 'requires_php', null );
				$compatible_wp  = is_wp_version_compatible( $requires_wp );
				$compatible_php = is_php_version_compatible( $requires_php );

				// b. Process compatibility warning text.
				$compat = '';

				if ( ! $compatible_wp && ! $compatible_php ) {
					$compat .= '<br>' . __( 'This update doesn&#8217;t work with your versions of WordPress and PHP.' ) . '&nbsp;';
					if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
						$compat .= sprintf(
							/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
							__( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
							esc_url( self_admin_url( 'update-core.php' ) ),
							esc_url( wp_get_update_php_url() )
						);

						$annotation = wp_get_update_php_annotation();

						if ( $annotation ) {
							$compat .= '</p><p><em>' . $annotation . '</em>';
						}
					} elseif ( current_user_can( 'update_core' ) ) {
						$compat .= sprintf(
							/* translators: %s: URL to WordPress Updates screen. */
							__( '<a href="%s">Please update WordPress</a>.' ),
							esc_url( self_admin_url( 'update-core.php' ) )
						);
					} elseif ( current_user_can( 'update_php' ) ) {
						$compat .= sprintf(
							/* translators: %s: URL to Update PHP page. */
							__( '<a href="%s">Learn more about updating PHP</a>.' ),
							esc_url( wp_get_update_php_url() )
						);

						$annotation = wp_get_update_php_annotation();

						if ( $annotation ) {
							$compat .= '</p><p><em>' . $annotation . '</em>';
						}
					}
				} elseif ( ! $compatible_wp ) {
					$compat .= '<br>' . __( 'This update doesn&#8217;t work with your version of WordPress.' ) . '&nbsp;';
					if ( current_user_can( 'update_core' ) ) {
						$compat .= sprintf(
							/* translators: %s: URL to WordPress Updates screen. */
							__( '<a href="%s">Please update WordPress</a>.' ),
							esc_url( self_admin_url( 'update-core.php' ) )
						);
					}
				} elseif ( ! $compatible_php ) {
					$compat .= '<br>' . __( 'This update doesn&#8217;t work with your version of PHP.' ) . '&nbsp;';
					if ( current_user_can( 'update_php' ) ) {
						$compat .= sprintf(
							/* translators: %s: URL to Update PHP page. */
							__( '<a href="%s">Learn more about updating PHP</a>.' ),
							esc_url( wp_get_update_php_url() )
						);

						$annotation = wp_get_update_php_annotation();

						if ( $annotation ) {
							$compat .= '</p><p><em>' . $annotation . '</em>';
						}
					}
				}

				// Theme template properties.
				$theme_processed[ $stylesheet ] = array(
					'stylesheet'     => esc_attr( $stylesheet ),
					'name'           => esc_attr( $theme->display( 'Name' ) ),
					'checkbox_id'    => esc_attr( 'checkbox_' . md5( $theme->get( 'Name' ) ) ),
					'screenshot'     => esc_url( $theme->get_screenshot() ),
					'version'        => esc_attr( $theme->display( 'Version' ) ),
					'new_version'    => esc_attr( et_()->array_get( $theme->update, 'new_version', '' ) ),
					'compatible_wp'  => $compatible_wp,
					'compatible_php' => $compatible_php,
					'compat'         => et_core_esc_previously( $compat ),
				);
			}

			return $theme_processed;
		}

		/**
		 * Enqueue compatibility warning scripts and its local data.
		 *
		 * @since 4.7.0
		 */
		public function enqueue_scripts() {
			global $pagenow, $wp_customize;

			// Bail early if the current page is not one of the allowed pages.
			$allowed_pages = array(
				'update-core.php',
				'customize.php',
				'themes.php',
			);

			if ( ! in_array( $pagenow, $allowed_pages, true ) ) {
				return;
			}

			// Enqueue main scripts.
			wp_enqueue_script( 'et_compatibility_warning_script', ET_CORE_URL . 'admin/js/compatibility-warning.js', array( 'jquery' ), ET_CORE_VERSION, true );

			$compatibility_warning = array();

			if ( 'update-core.php' === $pagenow ) {
				$compatibility_warning['update_core_data'] = array(
					'plugins' => self::get_update_core_plugins_data(),
					'themes'  => self::get_update_core_themes_data(),
				);
			} elseif ( 'themes.php' === $pagenow ) {
				$compatibility_warning['manage_themes_data'] = true;
			} elseif ( 'customize.php' === $pagenow ) {
				// Ensure style.css file exist.
				$theme_root = $wp_customize->theme()->theme_root;
				$theme_slug = $wp_customize->theme()->stylesheet;
				$theme_file = "{$theme_root}/{$theme_slug}/style.css";

				// Get WP & PHP compatibility info.
				$theme_headers = array();

				if ( file_exists( $theme_file ) ) {
					$theme_headers = get_file_data(
						$theme_file,
						array(
							'RequiresWP'  => 'Requires at least',
							'RequiresPHP' => 'Requires PHP',
						),
						'theme'
					);
				}

				$requires_wp  = et_()->array_get( $theme_headers, 'RequiresWP', false );
				$requires_php = et_()->array_get( $theme_headers, 'RequiresPHP', false );

				// Theme Customizer - Used for disable publish button.
				$compatibility_warning['customizer_data'] = array(
					'compatible_wp'  => is_wp_version_compatible( $requires_wp ),
					'compatible_php' => is_php_version_compatible( $requires_php ),
					'disabled_text'  => esc_html_x( 'Cannot Activate', 'theme' ),
				);
			}

			wp_localize_script( 'et_compatibility_warning_script', 'et_compatibility_warning', $compatibility_warning );
		}

		/**
		 * Overrides table body of plugin updates section.
		 *
		 * The structure is backported from WP 5.5 without any modification.
		 *
		 * @see {list_plugin_updates()} of WP 5.5
		 *
		 * @since 4.7.0
		 */
		public function overrides_update_core_plugins_table_body() {
			// Bail early if there is no plugin updates.
			if ( empty( get_plugin_updates() ) ) {
				return;
			}
			?>
			<script type="text/html" id="tmpl-et-update-core-plugins-table-body">
				<# if (data.plugins) { #>
					<# _.each(data.plugins, function(plugin, slug) { #>
					<tr>
						<td class="check-column">
							<# if (plugin.compatible_php) { #>
								<input type="checkbox" name="checked[]" id="{{plugin.checkbox_id}}" value="{{plugin.plugin_file}}" />
								<label for="{{plugin.checkbox_id}}" class="screen-reader-text">
								<?php
									/* translators: %s: Plugin name. */
									printf( esc_html__( 'Select %s' ), '{{plugin.name}}' );
								?>
								</label>
							<# } #>
						</td>
						<td class="plugin-title"><p>
							{{{plugin.icon}}}
							<strong>{{plugin.name}}</strong>
							<?php
								printf(
									/* translators: 1: Plugin version, 2: New version. */
									esc_html__( 'You have version %1$s installed. Update to %2$s.' ),
									'{{plugin.version}}',
									'{{plugin.new_version}}'
								);

								echo ' {{{plugin.details}}}{{{plugin.compat}}}{{{plugin.upgrade_notice}}}';
							?>
						</p></td>
					</tr>
					<# }); #>
				<# } #>
			</script>
			<?php
		}

		/**
		 * Overrides table body of theme updates section.
		 *
		 * The structure is backported from WP 5.5 without any modification.
		 *
		 * @see {list_theme_updates()} of WP 5.5
		 *
		 * @since 4.7.0
		 */
		public function overrides_update_core_themes_table_body() {
			// Bail early if there is no theme updates.
			if ( empty( get_theme_updates() ) ) {
				return;
			}
			?>
			<script type="text/html" id="tmpl-et-update-core-themes-table-body">
				<# if (data.themes) { #>
					<# _.each(data.themes, function(theme, slug) { #>
					<tr>
						<td class="check-column">
							<# if (theme.compatible_wp && theme.compatible_php) { #>
								<input type="checkbox" name="checked[]" id="{{theme.checkbox_id}}" value="{{theme.styelsheet}}" />
								<label for="{{theme.checkbox_id}}" class="screen-reader-text">
								<?php
									/* translators: %s: Theme name. */
									printf( esc_html__( 'Select %s' ), '{{theme.name}}' );
								?>
								</label>
							<# } #>
						</td>
						<td class="plugin-title"><p>
							<img src="{{theme.screenshot}}" width="85" height="64" class="updates-table-screenshot" alt="" />
							<strong>{{theme.name}}</strong>
							<?php
								printf(
									/* translators: 1: Theme version, 2: New version. */
									esc_html__( 'You have version %1$s installed. Update to %2$s.' ),
									'{{theme.version}}',
									'{{theme.new_version}}'
								);

								echo ' {{{theme.compat}}}';
							?>
						</p></td>
					</tr>
					<# }); #>
				<# } #>
			</script>
			<?php
		}

		/**
		 * Overrides theme info & details display of Manage Themes.
		 *
		 * The structure is backported from WP 5.5 without any modification.
		 *
		 * @see {wp-admin/themes.php} of WP 5.5
		 *
		 * @since 4.7.0
		 */
		public function overrides_tmpl_theme() {
			?>
			<script id="tmpl-theme" type="text/template">
				<# if ( data.screenshot[0] ) { #>
					<div class="theme-screenshot">
						<img src="{{ data.screenshot[0] }}" alt="" />
					</div>
				<# } else { #>
					<div class="theme-screenshot blank"></div>
				<# } #>

				<# if ( data.hasUpdate ) { #>
					<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
						<div class="update-message notice inline notice-warning notice-alt"><p>
							<# if ( data.hasPackage ) { #>
								<?php echo et_core_intentionally_unescaped( __( 'New version available. <button class="button-link" type="button">Update now</button>' ), 'html' ); ?>
							<# } else { #>
								<?php esc_html_e( 'New version available.' ); ?>
							<# } #>
						</p></div>
					<# } else { #>
						<div class="update-message notice inline notice-error notice-alt"><p>
							<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
								<?php
								printf(
									/* translators: %s: Theme name. */
									et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' ),
									'{{{ data.name }}}'
								);
								if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
									printf(
										/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
										esc_url( self_admin_url( 'update-core.php' ) ),
										esc_url( wp_get_update_php_url() )
									);
									wp_update_php_annotation( '</p><p><em>', '</em>' );
								} elseif ( current_user_can( 'update_core' ) ) {
									printf(
										/* translators: %s: URL to WordPress Updates screen. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
										esc_url( self_admin_url( 'update-core.php' ) )
									);
								} elseif ( current_user_can( 'update_php' ) ) {
									printf(
										/* translators: %s: URL to Update PHP page. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
										esc_url( wp_get_update_php_url() )
									);
									wp_update_php_annotation( '</p><p><em>', '</em>' );
								}
								?>
							<# } else if ( ! data.updateResponse.compatibleWP ) { #>
								<?php
								printf(
									/* translators: %s: Theme name. */
									et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.' ), 'html' ),
									'{{{ data.name }}}'
								);
								if ( current_user_can( 'update_core' ) ) {
									printf(
										/* translators: %s: URL to WordPress Updates screen. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
										esc_url( self_admin_url( 'update-core.php' ) )
									);
								}
								?>
							<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
								<?php
								printf(
									/* translators: %s: Theme name. */
									et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.' ), 'html' ),
									'{{{ data.name }}}'
								);
								if ( current_user_can( 'update_php' ) ) {
									printf(
										/* translators: %s: URL to Update PHP page. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
										esc_url( wp_get_update_php_url() )
									);
									wp_update_php_annotation( '</p><p><em>', '</em>' );
								}
								?>
							<# } #>
						</p></div>
					<# } #>
				<# } #>

				<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
					<div class="notice notice-error notice-alt"><p>
						<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
							<?php
							echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' );
							if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
								printf(
									/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
									' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
									esc_url( self_admin_url( 'update-core.php' ) ),
									esc_url( wp_get_update_php_url() )
								);
								wp_update_php_annotation( '</p><p><em>', '</em>' );
							} elseif ( current_user_can( 'update_core' ) ) {
								printf(
									/* translators: %s: URL to WordPress Updates screen. */
									' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
									esc_url( self_admin_url( 'update-core.php' ) )
								);
							} elseif ( current_user_can( 'update_php' ) ) {
								printf(
									/* translators: %s: URL to Update PHP page. */
									' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
									esc_url( wp_get_update_php_url() )
								);
								wp_update_php_annotation( '</p><p><em>', '</em>' );
							}
							?>
						<# } else if ( ! data.compatibleWP ) { #>
							<?php
							echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of WordPress.' ), 'html' );
							if ( current_user_can( 'update_core' ) ) {
								printf(
									/* translators: %s: URL to WordPress Updates screen. */
									' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
									esc_url( self_admin_url( 'update-core.php' ) )
								);
							}
							?>
						<# } else if ( ! data.compatiblePHP ) { #>
							<?php
							echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of PHP.' ), 'html' );
							if ( current_user_can( 'update_php' ) ) {
								printf(
									/* translators: %s: URL to Update PHP page. */
									' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
									esc_url( wp_get_update_php_url() )
								);
								wp_update_php_annotation( '</p><p><em>', '</em>' );
							}
							?>
						<# } #>
					</p></div>
				<# } #>

				<span class="more-details" id="{{ data.id }}-action"><?php esc_html_e( 'Theme Details' ); ?></span>
				<div class="theme-author">
					<?php
					/* translators: %s: Theme author name. */
					printf( esc_html__( 'By %s' ), '{{{ data.author }}}' );
					?>
				</div>

				<div class="theme-id-container">
					<# if ( data.active ) { #>
						<h2 class="theme-name" id="{{ data.id }}-name">
							<span><?php echo esc_html_x( 'Active:', 'theme' ); ?></span> {{{ data.name }}}
						</h2>
					<# } else { #>
						<h2 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h2>
					<# } #>

					<div class="theme-actions">
						<# if ( data.active ) { #>
							<# if ( data.actions.customize ) { #>
								<a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php esc_html_e( 'Customize' ); ?></a>
							<# } #>
						<# } else { #>
							<# if ( data.compatibleWP && data.compatiblePHP ) { #>
								<?php
								/* translators: %s: Theme name. */
								$aria_label = sprintf( esc_html_x( 'Activate %s', 'theme' ), '{{ data.name }}' );
								?>
								<a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php esc_html_e( 'Activate' ); ?></a>
								<a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php esc_html_e( 'Live Preview' ); ?></a>
							<# } else { #>
								<?php
								/* translators: %s: Theme name. */
								$aria_label = sprintf( esc_html_x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' );
								?>
								<a class="button disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php echo esc_html_x( 'Cannot Activate', 'theme' ); ?></a>
								<a class="button button-primary hide-if-no-customize disabled"><?php esc_html_e( 'Live Preview' ); ?></a>
							<# } #>
						<# } #>
					</div>
				</div>
			</script>

			<script id="tmpl-theme-single" type="text/template">
				<div class="theme-backdrop"></div>
				<div class="theme-wrap wp-clearfix" role="document">
					<div class="theme-header">
						<button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php esc_html_e( 'Show previous theme' ); ?></span></button>
						<button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php esc_html_e( 'Show next theme' ); ?></span></button>
						<button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php esc_html_e( 'Close details dialog' ); ?></span></button>
					</div>
					<div class="theme-about wp-clearfix">
						<div class="theme-screenshots">
						<# if ( data.screenshot[0] ) { #>
							<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
						<# } else { #>
							<div class="screenshot blank"></div>
						<# } #>
						</div>

						<div class="theme-info">
							<# if ( data.active ) { #>
								<span class="current-label"><?php esc_html_e( 'Current Theme' ); ?></span>
							<# } #>
							<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
								<?php
								/* translators: %s: Theme version. */
								printf( esc_html__( 'Version: %s' ), '{{ data.version }}' );
								?>
							</span></h2>
							<p class="theme-author">
								<?php
								/* translators: %s: Theme author link. */
								printf( esc_html__( 'By %s' ), '{{{ data.authorAndUri }}}' );
								?>
							</p>

							<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
								<div class="notice notice-error notice-alt notice-large"><p>
									<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
										<?php
										echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' );
										if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
											printf(
												/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										} elseif ( current_user_can( 'update_core' ) ) {
											printf(
												/* translators: %s: URL to WordPress Updates screen. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) )
											);
										} elseif ( current_user_can( 'update_php' ) ) {
											printf(
												/* translators: %s: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										}
										?>
									<# } else if ( ! data.compatibleWP ) { #>
										<?php
										echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of WordPress.' ), 'html' );
										if ( current_user_can( 'update_core' ) ) {
											printf(
												/* translators: %s: URL to WordPress Updates screen. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) )
											);
										}
										?>
									<# } else if ( ! data.compatiblePHP ) { #>
										<?php
										echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of PHP.' ), 'html' );
										if ( current_user_can( 'update_php' ) ) {
											printf(
												/* translators: %s: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										}
										?>
									<# } #>
								</p></div>
							<# } #>

							<# if ( data.hasUpdate ) { #>
								<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
									<div class="notice notice-warning notice-alt notice-large">
										<h3 class="notice-title"><?php esc_html_e( 'Update Available' ); ?></h3>
										{{{ data.update }}}
									</div>
								<# } else { #>
									<div class="notice notice-error notice-alt notice-large">
										<h3 class="notice-title"><?php esc_html_e( 'Update Incompatible' ); ?></h3>
										<p>
											<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
												<?php
												printf(
													/* translators: %s: Theme name. */
													et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' ),
													'{{{ data.name }}}'
												);
												if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
													printf(
														/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
														esc_url( self_admin_url( 'update-core.php' ) ),
														esc_url( wp_get_update_php_url() )
													);
													wp_update_php_annotation( '</p><p><em>', '</em>' );
												} elseif ( current_user_can( 'update_core' ) ) {
													printf(
														/* translators: %s: URL to WordPress Updates screen. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
														esc_url( self_admin_url( 'update-core.php' ) )
													);
												} elseif ( current_user_can( 'update_php' ) ) {
													printf(
														/* translators: %s: URL to Update PHP page. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
														esc_url( wp_get_update_php_url() )
													);
													wp_update_php_annotation( '</p><p><em>', '</em>' );
												}
												?>
											<# } else if ( ! data.updateResponse.compatibleWP ) { #>
												<?php
												printf(
													/* translators: %s: Theme name. */
													et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.' ), 'html' ),
													'{{{ data.name }}}'
												);
												if ( current_user_can( 'update_core' ) ) {
													printf(
														/* translators: %s: URL to WordPress Updates screen. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
														esc_url( self_admin_url( 'update-core.php' ) )
													);
												}
												?>
											<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
												<?php
												printf(
													/* translators: %s: Theme name. */
													et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.' ), 'html' ),
													'{{{ data.name }}}'
												);
												if ( current_user_can( 'update_php' ) ) {
													printf(
														/* translators: %s: URL to Update PHP page. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
														esc_url( wp_get_update_php_url() )
													);
													wp_update_php_annotation( '</p><p><em>', '</em>' );
												}
												?>
											<# } #>
										</p>
									</div>
								<# } #>
							<# } #>

							<p class="theme-description">{{{ data.description }}}</p>

							<# if ( data.parent ) { #>
								<p class="parent-theme">
									<?php
									/* translators: %s: Theme name. */
									printf( esc_html__( 'This is a child theme of %s.' ), '<strong>{{{ data.parent }}}</strong>' );
									?>
								</p>
							<# } #>

							<# if ( data.tags ) { #>
								<p class="theme-tags"><span><?php esc_html_e( 'Tags:' ); ?></span> {{{ data.tags }}}</p>
							<# } #>
						</div>
					</div>

					<div class="theme-actions">
						<div class="active-theme">
							<a href="{{{ data.actions.customize }}}" class="button button-primary customize load-customize hide-if-no-customize"><?php esc_html_e( 'Customize' ); ?></a>
							<?php echo et_core_intentionally_unescaped( implode( ' ', $GLOBALS['current_theme_actions'] ), 'html' ); ?>
						</div>
						<div class="inactive-theme">
							<# if ( data.compatibleWP && data.compatiblePHP ) { #>
								<?php
								/* translators: %s: Theme name. */
								$aria_label = sprintf( esc_html_x( 'Activate %s', 'theme' ), '{{ data.name }}' );
								?>
								<# if ( data.actions.activate ) { #>
									<a href="{{{ data.actions.activate }}}" class="button activate" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php esc_html_e( 'Activate' ); ?></a>
								<# } #>
								<a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php esc_html_e( 'Live Preview' ); ?></a>
							<# } else { #>
								<?php
								/* translators: %s: Theme name. */
								$aria_label = sprintf( esc_html_x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' );
								?>
								<# if ( data.actions.activate ) { #>
									<a class="button disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php echo esc_html_x( 'Cannot Activate', 'theme' ); ?></a>
								<# } #>
								<a class="button button-primary hide-if-no-customize disabled"><?php esc_html_e( 'Live Preview' ); ?></a>
							<# } #>
						</div>

						<# if ( ! data.active && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" class="button delete-theme"><?php esc_html_e( 'Delete' ); ?></a>
						<# } #>
					</div>
				</div>
			</script>
			<?php
		}

		/**
		 * Overrides plugin warning display of Plugins list page.
		 *
		 * @see {wp_plugin_update_rows()} of WP 5.5
		 *
		 * @since 4.7.0
		 */
		public function overrides_plugins_table_rows() {
			if ( ! current_user_can( 'update_plugins' ) ) {
				return;
			}

			$update_plugins = get_site_transient( 'update_plugins' );

			if ( isset( $update_plugins->response ) && is_array( $update_plugins->response ) ) {
				foreach ( $update_plugins->response as $plugin_file => $plugin ) {
					$requires_php   = isset( $plugin->requires_php ) ? $plugin->requires_php : null;
					$compatible_php = is_php_version_compatible( $requires_php );

					// Bail early if the package empty or already compatible with current PHP version.
					if ( empty( $plugin->package ) || $compatible_php ) {
						continue;
					}

					// Need to remove default action before we can replace it with the new one.
					remove_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
					add_action( "after_plugin_row_$plugin_file", array( $this, 'plugin_update_row_compatibility_error' ), 10, 2 );
				}
			}
		}

		/**
		 * Display plugin update row with error compatibility.
		 *
		 * @see {wp_plugin_update_row()} of WP 5.5
		 *
		 * @since 4.7.0
		 *
		 * @param string $file        Plugin basename.
		 * @param array  $plugin_data Plugin information.
		 */
		public function plugin_update_row_compatibility_error( $file, $plugin_data ) {
			if ( ! is_network_admin() && is_multisite() ) {
				return;
			}

			$update_plugins = get_site_transient( 'update_plugins' );

			if ( ! isset( $update_plugins->response[ $file ] ) ) {
				return;
			}

			// a. Plugin response.
			$response = $update_plugins->response[ $file ];

			// b. Plugin name.
			$plugins_allowedtags = array(
				'a'       => array(
					'href'  => array(),
					'title' => array(),
				),
				'abbr'    => array( 'title' => array() ),
				'acronym' => array( 'title' => array() ),
				'code'    => array(),
				'em'      => array(),
				'strong'  => array(),
			);

			$plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags );

			// c. Details URL.
			$details_url = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800' );

			// d. Active class.
			if ( is_network_admin() ) {
				$active_class = is_plugin_active_for_network( $file ) ? ' active' : '';
			} else {
				$active_class = is_plugin_active( $file ) ? ' active' : '';
			}

			/**
			 * Column count.
			 *
			 * @var WP_Plugins_List_Table $wp_list_table
			 */
			$wp_list_table = _get_list_table(
				'WP_Plugins_List_Table',
				array(
					'screen' => get_current_screen(),
				)
			);

			// f. Error text.
			$update_php_notation = wp_get_update_php_annotation();

			$error_text = sprintf(
				/* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */
				__( 'There is a new version of %1$s available, but it doesn&#8217;t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>. %6$s' ),
				$plugin_name,
				esc_url( $details_url ),
				sprintf(
					'class="thickbox open-plugin-details-modal" aria-label="%s"',
					/* translators: 1: Plugin name, 2: Version number. */
					esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
				),
				esc_attr( $response->new_version ),
				esc_url( wp_get_update_php_url() ), // #5
				! empty( $update_php_notation ) ? sprintf( __( '<br><em>%s</em>' ), $update_php_notation ) : ''
			);

			printf(
				/* translators: 1: Active class, 2: Update slug, 3: Slug, 4: Plugin file, 5: Column count. */
				'<tr class="plugin-update-tr%1$s" id="%2$s" data-slug="%3$s" data-plugin="%4$s">
					<td colspan="%5$s" class="plugin-update colspanchange">
						<div class="update-message notice inline notice-error notice-alt">
							<p>%6$s</p>
						</div>
					</td>
				</tr>',
				esc_attr( $active_class ),
				esc_attr( $response->slug . '-update' ),
				esc_attr( $response->slug ),
				esc_attr( $file ),
				esc_attr( $wp_list_table->get_column_count() ), // #5
				et_core_intentionally_unescaped( $error_text, 'html' )
			);
		}

		/**
		 * Overrides theme info & details display of Theme Customizer.
		 *
		 * The structure is backported from WP 5.5 without any modification.
		 *
		 * @see {WP_Customize_Theme_Control::content_template()} of WP 5.5
		 *
		 * @since 4.7.0
		 */
		public function overrides_tmpl_customize_control_theme_content() {
			/* translators: %s: Theme name. */
			$details_label = sprintf( esc_html__( 'Details for theme: %s' ), '{{ data.theme.name }}' );
			/* translators: %s: Theme name. */
			$customize_label = sprintf( esc_html__( 'Customize theme: %s' ), '{{ data.theme.name }}' );
			/* translators: %s: Theme name. */
			$preview_label = sprintf( esc_html__( 'Live preview theme: %s' ), '{{ data.theme.name }}' );
			/* translators: %s: Theme name. */
			$install_label = sprintf( esc_html__( 'Install and preview theme: %s' ), '{{ data.theme.name }}' );
			?>
			<script id="tmpl-customize-control-theme-content" type="text/html">
				<# if ( data.theme.active ) { #>
					<div class="theme active" tabindex="0" aria-describedby="{{ data.section }}-{{ data.theme.id }}-action">
				<# } else { #>
					<div class="theme" tabindex="0" aria-describedby="{{ data.section }}-{{ data.theme.id }}-action">
				<# } #>

					<# if ( data.theme.screenshot && data.theme.screenshot[0] ) { #>
						<div class="theme-screenshot">
							<img data-src="{{ data.theme.screenshot[0] }}" alt="" />
						</div>
					<# } else { #>
						<div class="theme-screenshot blank"></div>
					<# } #>

					<span class="more-details theme-details" id="{{ data.section }}-{{ data.theme.id }}-action" aria-label="<?php echo esc_attr( $details_label ); ?>"><?php esc_html_e( 'Theme Details' ); ?></span>

					<div class="theme-author">
					<?php
						/* translators: Theme author name. */
						printf( esc_html_x( 'By %s', 'theme author' ), '{{ data.theme.author }}' );
					?>
					</div>

					<# if ( 'installed' === data.theme.type && data.theme.hasUpdate ) { #>
						<# if ( data.theme.updateResponse.compatibleWP && data.theme.updateResponse.compatiblePHP ) { #>
							<div class="update-message notice inline notice-warning notice-alt" data-slug="{{ data.theme.id }}">
								<p>
									<?php
									if ( is_multisite() ) {
										esc_html_e( 'New version available.' );
									} else {
										printf(
											/* translators: %s: "Update now" button. */
											esc_html__( 'New version available. %s' ),
											'<button class="button-link update-theme" type="button">' . esc_html__( 'Update now' ) . '</button>'
										);
									}
									?>
								</p>
							</div>
						<# } else { #>
							<div class="update-message notice inline notice-error notice-alt" data-slug="{{ data.theme.id }}">
								<p>
									<# if ( ! data.theme.updateResponse.compatibleWP && ! data.theme.updateResponse.compatiblePHP ) { #>
										<?php
										printf(
											/* translators: %s: Theme name. */
											et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' ),
											'{{{ data.theme.name }}}'
										);
										if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
											printf(
												/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										} elseif ( current_user_can( 'update_core' ) ) {
											printf(
												/* translators: %s: URL to WordPress Updates screen. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) )
											);
										} elseif ( current_user_can( 'update_php' ) ) {
											printf(
												/* translators: %s: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										}
										?>
									<# } else if ( ! data.theme.updateResponse.compatibleWP ) { #>
										<?php
										printf(
											/* translators: %s: Theme name. */
											et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.' ), 'html' ),
											'{{{ data.theme.name }}}'
										);
										if ( current_user_can( 'update_core' ) ) {
											printf(
												/* translators: %s: URL to WordPress Updates screen. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) )
											);
										}
										?>
									<# } else if ( ! data.theme.updateResponse.compatiblePHP ) { #>
										<?php
										printf(
											/* translators: %s: Theme name. */
											et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.' ), 'html' ),
											'{{{ data.theme.name }}}'
										);
										if ( current_user_can( 'update_php' ) ) {
											printf(
												/* translators: %s: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										}
										?>
									<# } #>
								</p>
							</div>
						<# } #>
					<# } #>

					<# if ( ! data.theme.compatibleWP || ! data.theme.compatiblePHP ) { #>
						<div class="notice notice-error notice-alt"><p>
							<# if ( ! data.theme.compatibleWP && ! data.theme.compatiblePHP ) { #>
								<?php
								echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' );
								if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
									printf(
										/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
										esc_url( self_admin_url( 'update-core.php' ) ),
										esc_url( wp_get_update_php_url() )
									);
									wp_update_php_annotation( '</p><p><em>', '</em>' );
								} elseif ( current_user_can( 'update_core' ) ) {
									printf(
										/* translators: %s: URL to WordPress Updates screen. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
										esc_url( self_admin_url( 'update-core.php' ) )
									);
								} elseif ( current_user_can( 'update_php' ) ) {
									printf(
										/* translators: %s: URL to Update PHP page. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
										esc_url( wp_get_update_php_url() )
									);
									wp_update_php_annotation( '</p><p><em>', '</em>' );
								}
								?>
							<# } else if ( ! data.theme.compatibleWP ) { #>
								<?php
								echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of WordPress.' ), 'html' );
								if ( current_user_can( 'update_core' ) ) {
									printf(
										/* translators: %s: URL to WordPress Updates screen. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
										esc_url( self_admin_url( 'update-core.php' ) )
									);
								}
								?>
							<# } else if ( ! data.theme.compatiblePHP ) { #>
								<?php
								echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of PHP.' ), 'html' );
								if ( current_user_can( 'update_php' ) ) {
									printf(
										/* translators: %s: URL to Update PHP page. */
										' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
										esc_url( wp_get_update_php_url() )
									);
									wp_update_php_annotation( '</p><p><em>', '</em>' );
								}
								?>
							<# } #>
						</p></div>
					<# } #>

					<# if ( data.theme.active ) { #>
						<div class="theme-id-container">
							<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">
								<span><?php echo esc_html_x( 'Previewing:', 'theme' ); ?></span> {{ data.theme.name }}
							</h3>
							<div class="theme-actions">
								<button type="button" class="button button-primary customize-theme" aria-label="<?php echo esc_attr( $customize_label ); ?>"><?php esc_html_e( 'Customize' ); ?></button>
							</div>
						</div>
						<div class="notice notice-success notice-alt"><p><?php echo esc_html_x( 'Installed', 'theme' ); ?></p></div>
					<# } else if ( 'installed' === data.theme.type ) { #>
						<div class="theme-id-container">
							<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
							<div class="theme-actions">
								<# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #>
									<button type="button" class="button button-primary preview-theme" aria-label="<?php echo esc_attr( $preview_label ); ?>" data-slug="{{ data.theme.id }}"><?php esc_html_e( 'Live Preview' ); ?></button>
								<# } else { #>
									<button type="button" class="button button-primary disabled" aria-label="<?php echo esc_attr( $preview_label ); ?>"><?php esc_html_e( 'Live Preview' ); ?></button>
								<# } #>
							</div>
						</div>
						<div class="notice notice-success notice-alt"><p><?php echo esc_html_x( 'Installed', 'theme' ); ?></p></div>
					<# } else { #>
						<div class="theme-id-container">
							<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
							<div class="theme-actions">
								<# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #>
									<button type="button" class="button button-primary theme-install preview" aria-label="<?php echo esc_attr( $install_label ); ?>" data-slug="{{ data.theme.id }}" data-name="{{ data.theme.name }}"><?php esc_html_e( 'Install &amp; Preview' ); ?></button>
								<# } else { #>
									<button type="button" class="button button-primary disabled" aria-label="<?php echo esc_attr( $install_label ); ?>" disabled><?php esc_html_e( 'Install &amp; Preview' ); ?></button>
								<# } #>
							</div>
						</div>
					<# } #>
				</div>
			</script>

			<script type="text/html" id="tmpl-customize-themes-details-view">
				<div class="theme-backdrop"></div>
				<div class="theme-wrap wp-clearfix" role="document">
					<div class="theme-header">
						<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php esc_html_e( 'Show previous theme' ); ?></span></button>
						<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php esc_html_e( 'Show next theme' ); ?></span></button>
						<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php esc_html_e( 'Close details dialog' ); ?></span></button>
					</div>
					<div class="theme-about wp-clearfix">
						<div class="theme-screenshots">
						<# if ( data.screenshot && data.screenshot[0] ) { #>
							<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
						<# } else { #>
							<div class="screenshot blank"></div>
						<# } #>
						</div>

						<div class="theme-info">
							<# if ( data.active ) { #>
								<span class="current-label"><?php esc_html_e( 'Current Theme' ); ?></span>
							<# } #>
							<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
								<?php
								/* translators: %s: Theme version. */
								printf( esc_html__( 'Version: %s' ), '{{ data.version }}' );
								?>
							</span></h2>
							<h3 class="theme-author">
								<?php
								/* translators: %s: Theme author link. */
								printf( esc_html__( 'By %s' ), '{{{ data.authorAndUri }}}' );
								?>
							</h3>

							<# if ( data.stars && 0 != data.num_ratings ) { #>
								<div class="theme-rating">
									{{{ data.stars }}}
									<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
										<?php
										printf(
											'%1$s <span class="screen-reader-text">%2$s</span>',
											/* translators: %s: Number of ratings. */
											sprintf( esc_html__( '(%s ratings)' ), '{{ data.num_ratings }}' ),
											/* translators: Accessibility text. */
											esc_html__( '(opens in a new tab)' )
										);
										?>
									</a>
								</div>
							<# } #>

							<# if ( data.hasUpdate ) { #>
								<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
									<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
										<h3 class="notice-title"><?php esc_html_e( 'Update Available' ); ?></h3>
										{{{ data.update }}}
									</div>
								<# } else { #>
									<div class="notice notice-error notice-alt notice-large" data-slug="{{ data.id }}">
										<h3 class="notice-title"><?php esc_html_e( 'Update Incompatible' ); ?></h3>
										<p>
											<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
												<?php
												printf(
													/* translators: %s: Theme name. */
													et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' ),
													'{{{ data.name }}}'
												);
												if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
													printf(
														/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
														esc_url( self_admin_url( 'update-core.php' ) ),
														esc_url( wp_get_update_php_url() )
													);
													wp_update_php_annotation( '</p><p><em>', '</em>' );
												} elseif ( current_user_can( 'update_core' ) ) {
													printf(
														/* translators: %s: URL to WordPress Updates screen. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
														esc_url( self_admin_url( 'update-core.php' ) )
													);
												} elseif ( current_user_can( 'update_php' ) ) {
													printf(
														/* translators: %s: URL to Update PHP page. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
														esc_url( wp_get_update_php_url() )
													);
													wp_update_php_annotation( '</p><p><em>', '</em>' );
												}
												?>
											<# } else if ( ! data.updateResponse.compatibleWP ) { #>
												<?php
												printf(
													/* translators: %s: Theme name. */
													et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.' ), 'html' ),
													'{{{ data.name }}}'
												);
												if ( current_user_can( 'update_core' ) ) {
													printf(
														/* translators: %s: URL to WordPress Updates screen. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
														esc_url( self_admin_url( 'update-core.php' ) )
													);
												}
												?>
											<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
												<?php
												printf(
													/* translators: %s: Theme name. */
													et_core_intentionally_unescaped( __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.' ), 'html' ),
													'{{{ data.name }}}'
												);
												if ( current_user_can( 'update_php' ) ) {
													printf(
														/* translators: %s: URL to Update PHP page. */
														' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
														esc_url( wp_get_update_php_url() )
													);
													wp_update_php_annotation( '</p><p><em>', '</em>' );
												}
												?>
											<# } #>
										</p>
									</div>
								<# } #>
							<# } #>

							<# if ( data.parent ) { #>
								<p class="parent-theme">
									<?php
									printf(
										/* translators: %s: Theme name. */
										esc_html__( 'This is a child theme of %s.' ),
										'<strong>{{{ data.parent }}}</strong>'
									);
									?>
								</p>
							<# } #>

							<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
								<div class="notice notice-error notice-alt notice-large"><p>
									<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
										<?php
										echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your versions of WordPress and PHP.' ), 'html' );
										if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
											printf(
												/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										} elseif ( current_user_can( 'update_core' ) ) {
											printf(
												/* translators: %s: URL to WordPress Updates screen. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) )
											);
										} elseif ( current_user_can( 'update_php' ) ) {
											printf(
												/* translators: %s: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										}
										?>
									<# } else if ( ! data.compatibleWP ) { #>
										<?php
										echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of WordPress.' ), 'html' );
										if ( current_user_can( 'update_core' ) ) {
											printf(
												/* translators: %s: URL to WordPress Updates screen. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Please update WordPress</a>.' ), 'html' ),
												esc_url( self_admin_url( 'update-core.php' ) )
											);
										}
										?>
									<# } else if ( ! data.compatiblePHP ) { #>
										<?php
										echo et_core_intentionally_unescaped( __( 'This theme doesn&#8217;t work with your version of PHP.' ), 'html' );
										if ( current_user_can( 'update_php' ) ) {
											printf(
												/* translators: %s: URL to Update PHP page. */
												' ' . et_core_intentionally_unescaped( __( '<a href="%s">Learn more about updating PHP</a>.' ), 'html' ),
												esc_url( wp_get_update_php_url() )
											);
											wp_update_php_annotation( '</p><p><em>', '</em>' );
										}
										?>
									<# } #>
								</p></div>
							<# } #>

							<p class="theme-description">{{{ data.description }}}</p>

							<# if ( data.tags ) { #>
								<p class="theme-tags"><span><?php esc_html_e( 'Tags:' ); ?></span> {{{ data.tags }}}</p>
							<# } #>
						</div>
					</div>

					<div class="theme-actions">
						<# if ( data.active ) { #>
							<button type="button" class="button button-primary customize-theme"><?php esc_html_e( 'Customize' ); ?></button>
						<# } else if ( 'installed' === data.type ) { #>
							<?php if ( current_user_can( 'delete_themes' ) ) { ?>
								<# if ( data.actions && data.actions['delete'] ) { #>
									<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php esc_html_e( 'Delete' ); ?></a>
								<# } #>
							<?php } ?>

							<# if ( data.compatibleWP && data.compatiblePHP ) { #>
								<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php esc_html_e( 'Live Preview' ); ?></button>
							<# } else { #>
								<button class="button button-primary disabled"><?php esc_html_e( 'Live Preview' ); ?></button>
							<# } #>
						<# } else { #>
							<# if ( data.compatibleWP && data.compatiblePHP ) { #>
								<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php esc_html_e( 'Install' ); ?></button>
								<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php esc_html_e( 'Install &amp; Preview' ); ?></button>
							<# } else { #>
								<button type="button" class="button disabled"><?php echo esc_html_x( 'Cannot Install', 'theme' ); ?></button>
								<button type="button" class="button button-primary disabled"><?php esc_html_e( 'Install &amp; Preview' ); ?></button>
							<# } #>
						<# } #>
					</div>
				</div>
			</script>
			<?php
		}

		/**
		 * Deactivate incompatible plugin once it's activated.
		 *
		 * The code is backported from WP 5.5 partially. However, not all the code is inlcuded
		 * here because:
		 * - We can't add `RequiresWP: Requires at least` & `RequiresPHP: Requires PHP` plugin
		 *   headers via `extra_plugin_headers` hook because the keys & values will be combined.
		 * - On WP 5.3, it requires readme.txt instead of main plugin file. We can simplify it
		 *   by directly access main plugin file.
		 *
		 * @see {validate_plugin_requirements()}
		 *
		 * @since 4.7.0
		 *
		 * @param string $plugin Main plugin file name.
		 */
		public static function maybe_deactivate_incompatible_plugin( $plugin ) {
			$plugin_file = WP_PLUGIN_DIR . '/' . $plugin;

			// Ensure the main plugin file exists.
			if ( ! file_exists( $plugin_file ) ) {
				return;
			}

			// Get WP & PHP compatibility info.
			$plugin_headers = get_file_data(
				$plugin_file,
				array(
					'Name'        => 'Plugin Name',
					'RequiresWP'  => 'Requires at least',
					'RequiresPHP' => 'Requires PHP',
				),
				'plugin'
			);

			$requirements = array(
				'requires'     => ! empty( $plugin_headers['RequiresWP'] ) ? $plugin_headers['RequiresWP'] : '',
				'requires_php' => ! empty( $plugin_headers['RequiresPHP'] ) ? $plugin_headers['RequiresPHP'] : '',
			);

			if ( ! function_exists( 'is_wp_version_compatible' ) || ! function_exists( 'is_php_version_compatible' ) ) {
				require_once plugin_dir_path( $plugin_file ) . 'core/wp_functions.php';
			}

			// Check version compatibility.
			$compatible_wp  = is_wp_version_compatible( $requirements['requires'] );
			$compatible_php = is_php_version_compatible( $requirements['requires_php'] );

			/* translators: %s: URL to Update PHP page. */
			$php_update_message = '</p><p>' . sprintf(
				__( '<a href="%s">Learn more about updating PHP</a>.' ),
				esc_url( wp_get_update_php_url() )
			);

			$annotation = wp_get_update_php_annotation();

			if ( $annotation ) {
				$php_update_message .= '</p><p><em>' . $annotation . '</em>';
			}

			// Decide whether current plugin is compatible and should be activated or not.
			$result = true;

			if ( ! $compatible_wp && ! $compatible_php ) {
				$result = new WP_Error(
					'plugin_wp_php_incompatible',
					'<p>' . sprintf(
						/* translators: 1: Current WordPress version, 2: Current PHP version, 3: Plugin name, 4: Required WordPress version, 5: Required PHP version. */
						_x( '<strong>Error:</strong> Current versions of WordPress (%1$s) and PHP (%2$s) do not meet minimum requirements for %3$s. The plugin requires WordPress %4$s and PHP %5$s.', 'plugin' ),
						get_bloginfo( 'version' ),
						phpversion(),
						$plugin_headers['Name'],
						$requirements['requires'],
						$requirements['requires_php']
					) . $php_update_message . '</p>'
				);
			} elseif ( ! $compatible_php ) {
				$result = new WP_Error(
					'plugin_php_incompatible',
					'<p>' . sprintf(
						/* translators: 1: Current PHP version, 2: Plugin name, 3: Required PHP version. */
						_x( '<strong>Error:</strong> Current PHP version (%1$s) does not meet minimum requirements for %2$s. The plugin requires PHP %3$s.', 'plugin' ),
						phpversion(),
						$plugin_headers['Name'],
						$requirements['requires_php']
					) . $php_update_message . '</p>'
				);
			} elseif ( ! $compatible_wp ) {
				$result = new WP_Error(
					'plugin_wp_incompatible',
					'<p>' . sprintf(
						/* translators: 1: Current WordPress version, 2: Plugin name, 3: Required WordPress version. */
						_x( '<strong>Error:</strong> Current WordPress version (%1$s) does not meet minimum requirements for %2$s. The plugin requires WordPress %3$s.', 'plugin' ),
						get_bloginfo( 'version' ),
						$plugin_headers['Name'],
						$requirements['requires']
					) . '</p>'
				);
			}

			if ( is_wp_error( $result ) ) {
				wp_die( $result ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Can't call et_core_intentionally_unescaped function because it's fired during plugin activation hook.
			}
		}
	}

endif;
Cache.php000064400000021343152336022500006261 0ustar00<?php
/**
 * Core Cache implements an object cache.
 *
 * The Object Cache stores all of the cache data to memory only for the duration of the request.
 *
 * @package Core\Cache
 */

/**
 * Core class that implements an object cache.
 *
 * The Object Cache is used to save on trips to the database. The
 * Object Cache stores all of the cache data to memory and makes the cache
 * contents available by using a key, which is used to name and later retrieve
 * the cache contents.
 *
 * @private
 *
 * @package ET\Core\Cache
 */
final class ET_Core_Cache {

	/**
	 * Cached data.
	 *
	 * @since 1.0.0
	 *
	 * @type array
	 */
	private static $cache = array();

	/**
	 * Adds data to the cache if it doesn't already exist.
	 *
	 * @since 1.0.0
	 *
	 * @param int|string $key    What to call the contents in the cache.
	 * @param mixed      $data   The contents to store in the cache.
	 * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
	 * @return bool False if cache key and group already exist, true on success
	 */
	public static function add( $key, $data, $group = 'default' ) {
		if ( empty( $group ) ) {
			$group = 'default';
		}

		if ( self::_exists( $key, $group ) ) {
			return false;
		}

		return self::set( $key, $data, $group );
	}

	/**
	 * Sets the data contents into the cache.
	 *
	 * The cache contents is grouped by the $group parameter followed by the
	 * $key. This allows for duplicate ids in unique groups.
	 *
	 * @since 1.0.0
	 *
	 * @param int|string $key    What to call the contents in the cache.
	 * @param mixed      $data   The contents to store in the cache.
	 * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
	 * @param int        $expire Not Used.
	 * @return true Always returns true.
	 */
	public static function set( $key, $data, $group = 'default' ) {
		if ( empty( $group ) ) {
			$group = 'default';
		}

		if ( is_object( $data ) ) {
			$data = clone $data;
		}

		self::$cache[ $group ][ $key ] = $data;

		return true;
	}

	/**
	 * Retrieves the cache contents, if it exists.
	 *
	 * The contents will be first attempted to be retrieved by searching by the
	 * key in the cache group. If the cache is hit (success) then the contents
	 * are returned.
	 *
	 * @since 1.0.0
	 *
	 * @param int|string $key   What the contents in the cache are called.
	 * @param string     $group Optional. Where the cache contents are grouped. Default 'default'.
	 * @return false|mixed False on failure to retrieve contents or the cache contents on success.
	 */
	public static function get( $key, $group = 'default' ) {
		if ( empty( $group ) ) {
			$group = 'default';
		}

		if ( self::_exists( $key, $group ) ) {
			if ( is_object( self::$cache[ $group ][ $key ] ) ) {
				return clone self::$cache[ $group ][ $key ];
			} else {
				return self::$cache[ $group ][ $key ];
			}
		}

		return false;
	}

	/**
	 * Retrieves the cache contents for entire group, if it exists.
	 *
	 * If the cache is hit (success) then the contents of the group
	 * are returned.
	 *
	 * @since 1.0.0
	 *
	 * @param string $group Where the cache contents are grouped.
	 * @return false|mixed False on failure to retrieve contents or the cache contents on success.
	 */
	public static function get_group( $group ) {
		if ( isset( self::$cache[ $group ] ) ) {
			return self::$cache[ $group ];
		}

		return false;
	}

	/**
	 * Check the cache contents, if given key and (optional) group exists.
	 *
	 * @since 1.0.0
	 *
	 * @param int|string $key   What the contents in the cache are called.
	 * @param string     $group Optional. Where the cache contents are grouped. Default 'default'.
	 * @return bool False on failure to retrieve contents or True on success.
	 */
	public static function has( $key, $group = 'default' ) {
		if ( empty( $group ) ) {
			$group = 'default';
		}
		return self::_exists( $key, $group );
	}

	/**
	 * Removes the contents of the cache key in the group.
	 *
	 * If the cache key does not exist in the group, then nothing will happen.
	 *
	 * @since 1.0.0
	 *
	 * @param int|string $key   What the contents in the cache are called.
	 * @param string     $group Optional. Where the cache contents are grouped. Default 'default'.
	 * @return bool False if the contents weren't deleted and true on success.
	 */
	public static function delete( $key, $group = 'default' ) {
		if ( empty( $group ) ) {
			$group = 'default';
		}

		if ( ! self::_exists( $key, $group ) ) {
			return false;
		}

		unset( self::$cache[ $group ][ $key ] );
		return true;
	}

	/**
	 * Clears the object cache of all data.
	 *
	 * @since 1.0.0
	 *
	 * @return true Always returns true.
	 */
	public static function flush() {
		self::$cache = array();

		return true;
	}

	/**
	 * Serves as a utility function to determine whether a key exists in the cache.
	 *
	 * @since 1.0.0
	 * @private
	 *
	 * @param int|string $key   Cache key to check for existence.
	 * @param string     $group Cache group for the key existence check.
	 * @return bool Whether the key exists in the cache for the given group.
	 */
	private static function _exists( $key, $group ) {
		return isset( self::$cache[ $group ] ) && isset( self::$cache[ $group ][ $key ] );
	}
}


if ( ! function_exists( 'et_core_cache_add' ) ) :
/**
 * Adds data to the cache if it doesn't already exist.
 *
 * @since 1.0.0
 *
 * @param int|string $key    What to call the contents in the cache.
 * @param mixed      $data   The contents to store in the cache.
 * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
 * @return bool False if cache key and group already exist, true on success
 */
function et_core_cache_add( $key, $data, $group = '' ) {
	return ET_Core_Cache::add( $key, $data, $group );
}
endif;

if ( ! function_exists( 'et_core_cache_set' ) ) :
/**
 * Sets the data contents into the cache.
 *
 * The cache contents is grouped by the $group parameter followed by the
 * $key. This allows for duplicate ids in unique groups.
 *
 * @since 1.0.0
 *
 * @param int|string $key    What to call the contents in the cache.
 * @param mixed      $data   The contents to store in the cache.
 * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
 * @param int        $expire Not Used.
 * @return true Always returns true.
 */
function et_core_cache_set( $key, $data, $group = '' ) {
	return ET_Core_Cache::set( $key, $data, $group );
}
endif;

if ( ! function_exists( 'et_core_cache_get' ) ) :
/**
 * Retrieves the cache contents, if it exists.
 *
 * The contents will be first attempted to be retrieved by searching by the
 * key in the cache group. If the cache is hit (success) then the contents
 * are returned.
 *
 * @since 1.0.0
 *
 * @param int|string $key    What the contents in the cache are called.
 * @param string     $group  Optional. Where the cache contents are grouped. Default 'default'.
 * @return false|mixed False on failure to retrieve contents or the cache contents on success.
 */
function et_core_cache_get( $key, $group = '' ) {
	return ET_Core_Cache::get( $key, $group );
}
endif;

if ( ! function_exists( 'et_core_cache_get_group' ) ) :
/**
 * Retrieves the cache contents for entire group, if it exists.
 *
 * If the cache is hit (success) then the contents of the group
 * are returned.
 *
 * @since 1.0.0
 *
 * @param string     $group Where the cache contents are grouped.
 * @return false|mixed False on failure to retrieve contents or the cache contents on success.
 */
function et_core_cache_get_group( $group ) {
	return ET_Core_Cache::get_group( $group );
}
endif;

if ( ! function_exists( 'et_core_cache_has' ) ) :
/**
 * Check the cache contents, if given key and (optional) group exists.
 *
 * @since 1.0.0
 *
 * @param int|string $key   What the contents in the cache are called.
 * @param string     $group Optional. Where the cache contents are grouped. Default 'default'.
 * @return bool False on failure to retrieve contents or True on success.
 */
function et_core_cache_has( $key, $group = '' ) {
	return ET_Core_Cache::has( $key, $group );
}
endif;

if ( ! function_exists( 'et_core_cache_delete' ) ) :
/**
 * Removes the contents of the cache key in the group.
 *
 * If the cache key does not exist in the group, then nothing will happen.
 *
 * @since 1.0.0
 *
 * @param int|string $key   What the contents in the cache are called.
 * @param string     $group Optional. Where the cache contents are grouped. Default 'default'.
 * @return bool False if the contents weren't deleted and true on success.
 */
function et_core_cache_delete( $key, $group = '' ) {
	return ET_Core_Cache::delete( $key, $group );
}
endif;

if ( ! function_exists( 'et_core_cache_flush' ) ) :
/**
 * Clears the object cache of all data.
 *
 * @since 1.0.0
 * @return true Always returns true.
 */
function et_core_cache_flush() {
	return ET_Core_Cache::flush();
}
endif;
data/init.php000064400000025000152336022500007124 0ustar00<?php

if ( ! function_exists( 'et_core_data_init' ) ):
function et_core_data_init() {}
endif;


if ( ! function_exists( 'et_' ) ):
function et_() {
	global $et_;

	if ( ! $et_ ) {
		$et_ = ET_Core_Data_Utils::instance();
	}

	return $et_;
}
endif;


if ( ! function_exists( 'et_html_attr' ) ):
/**
 * Generates a properly escaped attribute string.
 *
 * @param string $name         The attribute name.
 * @param string $value        The attribute value.
 * @param bool   $space_before Whether or not the result should start with a space. Default is `true`.
 *
 * @return string
 */
function et_html_attr( $name, $value, $space_before = true ) {
	$result = ' ' . esc_attr( $name ) . '="' . esc_attr( $value ) . '"';

	return $space_before ? $result : trim( $result );
}
endif;

if ( ! function_exists( 'et_html_attrs' ) ):
/**
 * Generate properly escaped attributes string
 *
 * @since 3.10
 *
 * @param array $attributes Array of attributes
 *
 * @return string
 */
function et_html_attrs( $attributes = array() ) {
	$output = '';

	foreach ( $attributes as $name => $value ) {
		$parsed_value = is_array( $value ) ? implode( ' ', $value ) : $value;

		$output .= et_html_attr( $name, $parsed_value );
	}

	return $output;
}
endif;


if ( ! function_exists( 'et_sanitized_previously' ) ):
/**
 * Semantical previously sanitized acknowledgement
 *
 * @deprecated {@see et_core_sanitized_previously()}
 *
 * @since 3.17.3 Deprecated
 *
 * @param mixed $value The value being passed-through
 *
 * @return mixed
 */
function et_sanitized_previously( $value ) {
	et_debug( "You're Doing It Wrong! Attempted to call " . __FUNCTION__ . "(), use et_core_sanitized_previously() instead." );
	return $value;
}
endif;

if ( ! function_exists( 'et_core_sanitized_previously' ) ):
/**
 * Semantical previously sanitized acknowledgement
 *
 * @since 3.17.3
 *
 * @param mixed $value The value being passed-through
 *
 * @return mixed
 */
function et_core_sanitized_previously( $value ) {
	return $value;
}
endif;

if ( ! function_exists( 'et_core_esc_image_url' ) ) :
	/**
	 * Escape image URL
	 *
	 * @since 4.27.1
	 *
	 * @param string $url Image URL.
	 *
	 * @return string
	 */
	function et_core_esc_image_url( $url ) {
		return esc_url( $url, array( 'http', 'https', 'data' ) );
	}
endif;

if ( ! function_exists( 'et_core_esc_attr' ) ):
/**
 * Escape attribute value
 *
 * @since 3.27.1?
 *
 * @param string $attr_key Element attribute key.
 * @param (string|array) $attr_value Element attribute value.
 *
 * @return (string|array|WP_Error)
 */
function et_core_esc_attr( $attr_key, $attr_value ) {
	$attr_key = strtolower( $attr_key );

	$allowed_attrs_default = array(
		// Filter style.
		// @see https://developer.wordpress.org/reference/functions/safecss_filter_attr/
		'style'       => 'safecss_filter_attr',

		// We just pick some of the HTML attributes considered safe to use.
		'data-*'      => 'esc_attr',
		'align'       => 'esc_attr',
		'alt'         => 'esc_attr',
		'autofocus'   => 'esc_attr',
		'autoplay'    => 'esc_attr',
		'class'       => 'esc_attr',
		'cols'        => 'esc_attr',
		'controls'    => 'esc_attr',
		'disabled'    => 'esc_attr',
		'height'      => 'esc_attr',
		'id'          => 'esc_attr',
		'max'         => 'esc_attr',
		'min'         => 'esc_attr',
		'multiple'    => 'esc_attr',
		'name'        => 'esc_attr',
		'placeholder' => 'esc_attr',
		'required'    => 'esc_attr',
		'rows'        => 'esc_attr',
		'size'        => 'esc_attr',
		'sizes'       => 'esc_attr',
		'srcset'      => 'esc_attr',
		'step'        => 'esc_attr',
		'tabindex'    => 'esc_attr',
		'target'      => 'esc_attr',
		'title'       => 'esc_attr',
		'type'        => 'esc_attr',
		'value'       => 'esc_attr',
		'width'       => 'esc_attr',

		// We just pick some of the HTML attributes containing a URL.
		// @see https://developer.wordpress.org/reference/functions/wp_kses_uri_attributes/
		'action'      => 'esc_url',
		'background'  => 'et_core_esc_image_url',
		'formaction'  => 'esc_url',
		'href'        => 'esc_url',
		'icon'        => 'et_core_esc_image_url',
		'poster'      => 'et_core_esc_image_url',
		'src'         => 'et_core_esc_image_url',
		'usemap'      => 'esc_url',
	);

	/**
	 * Filters allowed attributes
	 *
	 * @since 3.27.1?
	 *
	 * @param array  $allowed_attrs_default Key/value paired array, the key used as the attribute identifier, 
	 *                                      the value used as the callback to escape the value.
	 * @param string $attr_key              Element attribute key.
	 * @param (string|array) $attr_value    Element attribute value.
	 *
	 * @return array
	 */
	$allowed_attrs = apply_filters( 'et_core_esc_attr', $allowed_attrs_default, $attr_key, $attr_value );

	// Get attribute key callback.
	$callback = isset( $allowed_attrs[ $attr_key ] ) && 'data-*' !== $attr_key ? $allowed_attrs[ $attr_key ] : false;

	// Get data attribute key callback.
	if ( ! $callback && 'data-*' !== $attr_key && 0 === strpos( $attr_key, 'data-' ) && isset( $allowed_attrs['data-*'] ) ) {
		$callback = $allowed_attrs['data-*'];
	}

	if ( ! $callback || ! is_callable( $callback ) ) {
		return new WP_Error( 'invalid_attr_key', __( 'Invalid attribute key', 'et_builder' ) );
	}

	if ( is_array( $attr_value ) ) {
		return array_map( $callback, $attr_value );
	}

	// @phpcs:ignore Generic.PHP.ForbiddenFunctions.Found
	return call_user_func( $callback, $attr_value );
}
endif;

if ( ! function_exists( 'et_core_sanitize_element_tag' ) ):
/**
 * Sanitize element tag
 *
 * @since 3.27.1?
 *
 * @param string $tag Element tag.
 *
 * @return (string|WP_Error)
 */
function et_core_sanitize_element_tag( $tag ) {
	$tag      = strtolower( $tag );
	$headings = array(
		'h1',
		'h2',
		'h3',
		'h4',
		'h5',
		'h6',
	);

	// Bail early for heading tags.
	if ( in_array( $tag, $headings, true ) ) {
		return $tag;
	}

	$tag = preg_replace( '/[^a-z]/', '', $tag );

	$disallowed_tags = array(
		'applet',
		'body',
		'canvas',
		'command',
		'content',
		'element',
		'embed',
		'frame',
		'frameset',
		'head',
		'html',
		'iframe',
		'noembed',
		'noframes',
		'noscript',
		'object',
		'param',
		'script',
		'shadow',
		'slot',
		'style',
		'template',
		'title',
		'xml',
	);

	if ( empty( $tag ) || in_array( $tag, $disallowed_tags, true ) ) {
		return new WP_Error( 'invalid_element_tag', __( 'Invalid tag element', 'et_builder' ) );
	}

	return $tag;
}
endif;

/**
 * Pass thru semantical previously escaped acknowledgement
 *
 * @since 3.17.3
 *
 * @param string value being passed through
 * @return string
 */
if ( ! function_exists( 'et_core_esc_previously' ) ) :
function et_core_esc_previously( $passthru ) {
	return $passthru;
}
endif;

/**
 * Pass thru function used to pacfify phpcs sniff.
 * Used when the nonce is checked elsewhere.
 *
 * @since 3.17.3
 *
 * @return void
 */
if ( ! function_exists( 'et_core_nonce_verified_previously' ) ) :
function et_core_nonce_verified_previously() {
	// :)
}
endif;

/**
 * Pass thru semantical escaped by WordPress core acknowledgement
 *
 * @since 3.17.3
 *
 * @param string value being passed through
 * @return string
 */
if ( ! function_exists( 'et_core_esc_wp' ) ) :
function et_core_esc_wp( $passthru ) {
	return $passthru;
}
endif;

/**
 * Pass thru semantical intentionally unescaped acknowledgement
 *
 * @since 3.17.3
 *
 * @param string value being passed through
 * @param string excuse the value is allowed to be unescaped
 * @return string
 */
if ( ! function_exists( 'et_core_intentionally_unescaped' ) ) :
function et_core_intentionally_unescaped( $passthru, $excuse ) {
	// Add valid excuses as they arise
	$valid_excuses = array(
		'cap_based_sanitized',
		'fixed_string',
		'react_jsx',
		'html',
		'underscore_template',
	);

	if ( ! in_array( $excuse, $valid_excuses ) ) {
		_doing_it_wrong( __FUNCTION__, esc_html__( 'This is not a valid excuse to not escape the passed value.', 'et_core' ), esc_html( et_get_theme_version() ) );
	}

	return $passthru;
}
endif;

/**
 * Sanitize value depending on user capability
 *
 * @since 3.17.3
 *
 * @return string value being passed through
 */
if ( ! function_exists( 'et_core_sanitize_value_by_cap' ) ) :
function et_core_sanitize_value_by_cap( $passthru, $sanitize_function = 'et_sanitize_html_input_text', $cap = 'unfiltered_html' ) {
	if ( ! current_user_can( $cap ) ) {
		$passthru = $sanitize_function( $passthru );
	}

	return $passthru;
}
endif;

/**
 * Pass thru semantical intentionally unsanitized acknowledgement
 *
 * @since 3.17.3
 *
 * @param string value being passed through
 * @param string excuse the value is allowed to be unsanitized
 * @return string
 */
if ( ! function_exists( 'et_core_intentionally_unsanitized' ) ) :
function et_core_intentionally_unsanitized( $passthru, $excuse ) {
	// Add valid excuses as they arise
	$valid_excuses = array();

	if ( ! in_array( $excuse, $valid_excuses ) ) {
		_doing_it_wrong( __FUNCTION__, esc_html__( 'This is not a valid excuse to not sanitize the passed value.', 'et_core' ), esc_html( et_get_theme_version() ) );
	}

	return $passthru;
}
endif;

/**
 * Fixes unclosed HTML tags
 *
 * @since 3.18.4
 *
 * @param string $content source HTML
 *
 * @return string
 */
if ( ! function_exists( 'et_core_fix_unclosed_html_tags' ) ):
function et_core_fix_unclosed_html_tags( $content ) {
	// Exit if source has no HTML tags or we miss what we need to fix them anyway.
	if ( false === strpos( $content, '<' ) || ! class_exists( 'DOMDocument' ) ) {
		return $content;
	}

	$scripts = false;

	if ( false !== strpos( $content, '<script' ) ) {
		// Replace scripts with placeholders so we don't mess with HTML included in JS strings.
		$scripts = new ET_Core_Data_ScriptReplacer();
		$content = preg_replace_callback( '|<script.*?>[\s\S]+?</script>|', array( $scripts, 'replace' ), $content );
	}

	$doc = new DOMDocument();
	@$doc->loadHTML( sprintf(
		'<html><head>%s</head><body>%s</body></html>',
		// Use WP charset
		sprintf( '<meta http-equiv="content-type" content="text/html; charset=%s" />', get_bloginfo( 'charset' ) ),
		$content
	) );

	if ( preg_match( '|<body>([\s\S]+)</body>|', $doc->saveHTML(), $matches ) ) {
		// Extract the fixed content.
		$content = $matches[1];
	}

	if ( $scripts ) {
		// Replace placeholders with scripts.
		$content = strtr( $content, $scripts->map() );
	}

	return $content;
}
endif;


/**
 * Converts string to UTF-8 if mb_convert_encoding function exists
 *
 * @since 3.19.17
 *
 * @param string $string source string
 *
 * @return string
 */
if ( ! function_exists( 'et_core_maybe_convert_to_utf_8' ) ):
function et_core_maybe_convert_to_utf_8( $string ) {
	if ( function_exists( 'mb_convert_encoding' ) ) {
		return mb_convert_encoding( $string, 'UTF-8' );
	}

	return $string;
}
endif;
data/Utils.php000064400000072241152336022500007272 0ustar00<?php

/**
 * Utility class for manipulating various data formats. Includes methods for
 * transforming array data to another format based on key mapping, methods for
 * generating XML-RPC method call strings, methods for working with arrays, and more.
 *
 * @since   3.0.62
 *
 * @package ET\Core\Data
 */
class ET_Core_Data_Utils {

	private static $_instance;

	private $_pick;
	private $_pick_value = '_undefined_';
	private $_sort_by;

	/**
	 * Sort arguments being passed through to callbacks.
	 * See self::_user_sort()
	 *
	 * @var array
	 */
	protected $sort_arguments = array(
		'array'      => array(),
		'array_map'  => array(),
		'sort'       => '__return_false',
		'comparison' => '__return_false',
	);

	/**
	 * Generate an XML-RPC array.
	 *
	 * @param array $values
	 *
	 * @return string
	 */
	private function _create_xmlrpc_array( $values ) {
		$output = '';

		foreach ( $values as $value ) {
			$output .= $this->_create_xmlrpc_value( $value );
		}

		return "<array><data>{$output}</data></array>";
	}

	/**
	 * Generate an XML-RPC struct.
	 *
	 * @param array $members
	 *
	 * @return string
	 */
	private function _create_xmlrpc_struct( $members ) {
		$output = '';

		foreach ( $members as $name => $value ) {
			$output .= sprintf( '<member><name>%1$s</name>%2$s</member>', esc_html( $name ), $this->_create_xmlrpc_value( $value ) );
		}

		return "<struct>{$output}</struct>";
	}

	/**
	 * Generate an XML-RPC value.
	 *
	 * @param mixed $value
	 *
	 * @return string
	 */
	private function _create_xmlrpc_value( $value ) {
		$output = '';

		if ( is_string( $value ) ) {
			$value = esc_html( wp_strip_all_tags( $value ) );
			$output = "<string>{$value}</string>";
		} else if ( is_bool( $value ) ) {
			$value  = (int) $value;
			$output = "<boolean>{$value}</boolean>";
		} else if ( is_int( $value ) ) {
			$output = "<int>{$value}</int>";
		} else if ( is_array( $value ) && $this->is_assoc_array( $value ) ) {
			$output = $this->_create_xmlrpc_struct( $value );
		} else if ( is_array( $value ) ) {
			$output = $this->_create_xmlrpc_array( $value );
		}

		return "<value>{$output}</value>";
	}

	/**
	 * Convert a SimpleXMLElement to a native PHP data type.
	 *
	 * @param SimpleXMLElement $value
	 *
	 * @return mixed
	 */
	private function _parse_value( $value ) {
		switch ( true ) {
			case is_string( $value ):
				$result = $value;
				break;
			case count( $value->struct ) > 0:
				$result = new stdClass();

				foreach ( $value->struct->member as $member ) {
					$name          = (string) $member->name;
					$member_value  = $this->_parse_value( $member->value );
					$result->$name = $member_value;
				}

				break;
			case count( $value->array ) > 0:
				$result = array();

				foreach ( $value->array->data->value as $array_value ) {
					$result[] = $this->_parse_value( $array_value );
				}

				break;
			case count( $value->i4 ) > 0:
				$result = (int) $value->i4;
				break;
			case count( $value->int ) > 0:
				$result = (int) $value->int;
				break;
			case count( $value->boolean ) > 0:
				$result = (boolean) $value->boolean;
				break;
			case count( $value->double ) > 0:
				$result = (double) $value->double;
				break;
			default:
				$result = (string) $value;
		}

		return $result;
	}

	private function _remove_empty_directories( $path ) {
		if ( ! is_dir( $path ) ) {
			return false;
		}

		$empty              = true;
		$directory_contents = glob( untrailingslashit( $path ) . '/*' );

		foreach ( (array) $directory_contents as $item ) {
			if ( ! $this->_remove_empty_directories( $item ) ) {
				$empty = false;
			}
		}

		return $empty ? @rmdir( $path ) : false;
	}

	public function _array_pick_callback( $item ) {
		$pick  = $this->_pick;
		$value = $this->_pick_value;

		if ( is_array( $item ) && isset( $item[ $pick ] ) ) {
			return '_undefined_' !== $value ? $value === $item[ $pick ] : $item[ $pick ];
		} else if ( is_object( $item ) && isset( $item->$pick ) ) {
			return '_undefined_' !== $value ? $value === $item->$pick : $item->$pick;
		}

		return false;
	}

	public function _array_sort_by_callback( $a, $b ) {
		$sort_by = $this->_sort_by;

		if ( is_array( $a ) ) {
			return strcmp( $a[ $sort_by ], $b[ $sort_by ] );
		} else if ( is_object( $a ) ) {
			return strcmp( $a->$sort_by, $b->$sort_by );
		}

		return 0;
	}

	/**
	 * Returns `true` if all values in `$array` are not empty, `false` otherwise.
	 * If `$condition` is provided then values are checked against it instead of `empty()`.
	 *
	 * @param array $array
	 * @param bool  $condition Compare values to this instead of `empty()`. Optional.
	 *
	 * @return bool
	 */
	public function all( array $array, $condition = null ) {
		if ( null === $condition ) {
			foreach( $array as $key => $value ) {
				if ( empty( $value ) ) {
					return false;
				}
			}
		} else {
			foreach( $array as $key => $value ) {
				if ( $value !== $condition ) {
					return false;
				}
			}
		}

		return true;
	}

	/**
	 * Flattens a multi-dimensional array.
	 *
	 * @since 3.0.99
	 *
	 * @param array $array An array to flatten.
	 *
	 * @return array
	 */
	function array_flatten( array $array ) {
		$iterator = new RecursiveIteratorIterator( new RecursiveArrayIterator( $array ) );
		$use_keys = true;

		return iterator_to_array( $iterator, $use_keys );
	}

	/**
	 * Gets a value from a nested array using an address string.
	 *
	 * @param array  $array   An array which contains value located at `$address`.
	 * @param string|array $address The location of the value within `$array` (dot notation).
	 * @param mixed  $default Value to return if not found. Default is an empty string.
	 *
	 * @return mixed The value, if found, otherwise $default.
	 */
	public function array_get( $array, $address, $default = '' ) {
		$keys   = is_array( $address ) ? $address : explode( '.', $address );
		$value  = $array;

		foreach ( $keys as $key ) {
			if ( ! empty( $key ) && isset( $key[0] ) && '[' === $key[0] ) {
				$index = substr( $key, 1, -1 );

				if ( is_numeric( $index ) ) {
					$key = (int) $index;
				}
			}

			if ( ! isset( $value[ $key ] ) ) {
				return $default;
			}

			$value = $value[ $key ];
		}

		return $value;
	}

	/**
	 * Wrapper for {@see self::array_get()} that sanitizes the value before returning it.
	 *
	 * @since 4.0.7
	 *
	 * @param array  $array     An array which contains value located at `$address`.
	 * @param string $address   The location of the value within `$array` (dot notation).
	 * @param mixed  $default   Value to return if not found. Default is an empty string.
	 * @param string $sanitizer Sanitize function to use. Default is 'sanitize_text_field'.
	 *
	 * @return mixed The sanitized value if found, otherwise $default.
	 */
	public function array_get_sanitized( $array, $address, $default = '', $sanitizer = 'sanitize_text_field' ) {
		if ( $value = $this->array_get( $array, $address, $default ) ) {
			$value = $sanitizer( $value );
		}

		return $value;
	}

	/**
	 * Creates a new array containing only the items that have a key or property or only the items that
	 * have a key or property that is equal to a certain value.
	 *
	 * @param array        $array   The array to pick from.
	 * @param string|array $pick_by The key or property to look for or an array mapping the key or property
	 *                              to a value to look for.
	 *
	 * @return array
	 */
	public function array_pick( $array, $pick_by ) {
		if ( is_string( $pick_by ) || is_int( $pick_by ) ) {
			$this->_pick = $pick_by;
		} else if ( is_array( $pick_by ) && 1 === count( $pick_by ) ) {
			$this->_pick       = key( $pick_by );
			$this->_pick_value = array_pop( $pick_by );
		} else {
			return array();
		}

		return array_filter( $array, array( $this, '_array_pick_callback' ) );
	}

	/**
	 * Sets a value in a nested array using an address string (dot notation)
	 *
	 * @see http://stackoverflow.com/a/9628276/419887
	 *
	 * @param array        $array The array to modify
	 * @param string|array $path  The path in the array
	 * @param mixed        $value The value to set
	 */
	public function array_set( &$array, $path, $value ) {
		$path_parts = is_array( $path ) ? $path : explode( '.', $path );
		$current    = &$array;

		foreach ( $path_parts as $key ) {
			if ( ! is_array( $current ) ) {
				$current = array();
			}

			if ( '[' === $key[0] && is_numeric( substr( $key, 1, - 1 ) ) ) {
				$key = (int) $key;
			}

			$current = &$current[ $key ];
		}

		$current = $value;
	}

	public function array_sort_by( $array, $key_or_prop ) {
		if ( ! is_string( $key_or_prop ) && ! is_int( $key_or_prop ) ) {
			return $array;
		}

		$this->_sort_by = $key_or_prop;

		if ( $this->is_assoc_array( $array ) ) {
			uasort( $array, array( $this, '_array_sort_by_callback' ) );
		} else {
			usort( $array, array( $this, '_array_sort_by_callback' ) );
		}

		return $array;
	}

	/**
	 * Update a nested array value found at the provided path using {@see array_merge()}.
	 *
	 * @since 4.0.7
	 *
	 * @param array $array
	 * @param $path
	 * @param $value
	 */
	public function array_update( &$array, $path, $value ) {
		$current_value = $this->array_get( $array, $path, array() );

		$this->array_set( $array, $path, array_merge( $current_value, $value ) );
	}

	/**
	 * Whether or not a string ends with a substring.
	 *
	 * @since 4.5.3
	 *
	 * @param string $haystack The string to look in.
	 * @param string $needle   The string to look for.
	 *
	 * @return bool
	 */
	public function ends_with( $haystack, $needle ) {
		$length = strlen( $needle );

		if ( 0 === $length ) {
			return true;
		}

		return ( substr( $haystack, -$length ) === $needle );
	}

	public function ensure_directory_exists( $path ) {
		if ( file_exists( $path ) ) {
			return is_dir( $path );
		}

		// Try to create the directory
		$path = $this->normalize_path( $path );

		if ( ! $this->WPFS()->mkdir( $path ) ) {
			// Walk up the tree and create any missing parent directories
			$this->ensure_directory_exists( dirname( $path ) );
			$this->WPFS()->mkdir( $path );
		}

		return is_dir( $path );
	}

	public static function instance() {
		if ( ! self::$_instance ) {
			self::$_instance = new ET_Core_Data_Utils();
		}

		return self::$_instance;
	}

	/**
	 * Determine if an array has any `string` keys (thus would be considered an object in JSON)
	 *
	 * @param $array
	 *
	 * @return bool
	 */
	public function is_assoc_array( $array ) {
		return is_array( $array ) && count( array_filter( array_keys( $array ), 'is_string' ) ) > 0;
	}

	/**
	 * Determine if value is an XML-RPC error.
	 *
	 * @param SimpleXMLElement $value
	 *
	 * @return bool
	 */
	public function is_xmlrpc_error( $value ) {
		return is_object( $value ) && isset( $value->faultCode );
	}

	/**
	 * Replaces any Windows style directory separators in $path with Linux style separators.
	 * Windows actually supports both styles, even mixed together. However, its better not
	 * to mix them (especially when doing string comparisons on paths).
	 *
	 * @since 4.0.8     Use {@see wp_normalize_path()} if it exists. Remove all occurrences of '..' from paths.
	 * @since 3.0.52
	 *
	 * @param string $path
	 *
	 * @return string
	 */
	public function normalize_path( $path = '' ) {
		$path = (string) $path;
		$path = str_replace( '..', '', $path );

		if ( function_exists( 'wp_normalize_path' ) ) {
			return wp_normalize_path( $path );
		}

		return str_replace( '\\', '/', $path );
	}

	/**
	 * Generate post data for a XML-RPC method call
	 *
	 * @param string $method_name
	 * @param array  $params
	 *
	 * @return string
	 */
	public function prepare_xmlrpc_method_call( $method_name, $params = array() ) {
		$output = '';

		foreach ( $params as $param ) {
			$value = $this->_create_xmlrpc_value( $param );
			$output .= "<param>{$value}</param>";
		}

		$method_name = esc_html( $method_name );

		return
			"<?xml version='1.0' encoding='UTF-8'?>
			<methodCall>
				<methodName>{$method_name}</methodName>
				<params>
					{$output}
				</params>
			</methodCall>";
	}

	/**
	 * Disable XML entity loader.
	 *
	 * @since 4.7.5 Don't execute deprecated `libxml_disable_entity_loader()` on PHP 8.0.
	 *
	 * @param bool $disable
	 *
	 * @return void
	 */
	public function libxml_disable_entity_loader( $disable ) {
		// The `libxml_disable_entity_loader()` method is deprecated since PHP 8.0 because
		// PHP 8.0 and later uses libxml versions from 2.9.0, which disabled XXE by default.
		if ( PHP_VERSION_ID < 80000 && function_exists( 'libxml_disable_entity_loader' ) ) {
			libxml_disable_entity_loader( $disable );
		}
	}

	/**
	 * Securely use simplexml_load_string.
	 *
	 * @param string $data XML data string.
	 *
	 * @return SimpleXMLElement
	 */
	public function simplexml_load_string( $data ) {
		$this->libxml_disable_entity_loader( true );
		return simplexml_load_string( $data );
	}

	/**
	 * Creates a path string using the provided arguments.
	 *
	 * Examples:
	 *   - ```
	 *      et_()->path( '/this/is', 'a', 'path' );
	 *      // Returns '/this/is/a/path'
	 *     ```
	 *   - ```
	 *      et_()->path( ['/this/is', 'a', 'path', 'to', 'file.php'] );
	 *      // Returns '/this/is/a/path/to/file.php'
	 *     ```
	 *
	 * @since 4.0.6
	 *
	 * @param string|string[] ...$parts
	 *
	 * @return string
	 */
	public function path() {
		$parts = func_get_args();
		$path  = '';

		if ( 1 === count( $parts ) && is_array( reset( $parts ) ) ) {
			$parts = array_pop( $parts );
		}

		foreach ( $parts as $part ) {
			$path .= "{$part}/";
		}

		return substr( $path, 0, -1 );
	}

	/**
	 * Process an XML-RPC response string.
	 *
	 * @param $response
	 *
	 * @return mixed
	 */
	public function process_xmlrpc_response( $response, $skip_processing = false ) {
		$response = $this->simplexml_load_string( $response );
		$result   = array();

		if ( $skip_processing ) {
			return $response;
		}

		if ( count( $response->fault ) > 0 ) {
			// An error was returned
			return $this->_parse_value( $response->fault->value );
		}

		$single = count( $response->params->param ) === 1;

		foreach ( $response->params->param as $param ) {
			$value = $this->_parse_value( $param->value );

			if ( $single ) {
				return $value;
			} else {
				$result[] = $value;
			}
		}

		return $result;
	}

	/**
	 * Removes empty directories recursively starting at and (possibly) including `$path`. `$path` must be
	 * an absolute path located under {@see WP_CONTENT_DIR}. Current user must have 'manage_options'
	 * capability. If the path or permissions check fails, no directories will be removed.
	 *
	 * @param string $path Absolute path to parent directory.
	 */
	public function remove_empty_directories( $path ) {
		$path = realpath( $path );

		if ( empty( $path ) ) {
			// $path doesn't exist
			return;
		}

		$path        = $this->normalize_path( $path );
		$content_dir = $this->normalize_path( WP_CONTENT_DIR );

		if ( 0 !== strpos( $path, $content_dir ) || $content_dir === $path ) {
			return;
		}

		$capability = 0 === strpos( $path, "{$content_dir}/cache/et" ) ? 'edit_posts' : 'manage_options';

		if ( ! wp_doing_cron() && ! et_core_security_check_passed( $capability ) ) {
			return;
		}

		$this->_remove_empty_directories( $path );
	}

	/**
	 * Whether or not a value includes another value.
	 *
	 * @param mixed  $haystack The value to look in.
	 * @param string $needle   The value to look for.
	 *
	 * @return bool
	 */
	public function includes( $haystack, $needle ) {
		if ( is_string( $haystack ) ) {
			return false !== strpos( $haystack, $needle );
		}

		if ( is_object( $haystack ) ) {
			return property_exists( $haystack, $needle );
		}

		if ( is_array( $haystack ) ) {
			return in_array( $needle, $haystack );
		}

		return false;
	}

	public function sanitize_text_fields( $fields ) {
		if ( ! is_array( $fields ) ) {
			return sanitize_text_field( $fields );
		}

		$result = array();

		foreach ( $fields as $field_id => $field_value ) {
			$field_id = sanitize_text_field( $field_id );

			if ( is_array( $field_value ) ) {
				$field_value = $this->sanitize_text_fields( $field_value );
			} else {
				$field_value = sanitize_text_field( $field_value );
			}

			$result[ $field_id ] = $field_value;
		}

		return $result;
	}

	/**
	 * Recursively traverses an array and escapes the keys and values according to passed escaping function.
	 *
	 * @since 3.17.3
	 *
	 * @param array  $values            The array to be recursively escaped.
	 * @param string $escaping_function The escaping function to be used on keys and values. Default 'esc_html'. Optional.
	 *
	 * @return array
	 */

	public function esc_array( $values, $escaping_function = 'esc_html' ) {
		if ( ! is_array( $values ) ) {
			return $escaping_function( $values );
		}

		$result = array();

		foreach ( $values as $key => $value ) {
			$key = $escaping_function( $key );

			if ( is_array( $value ) ) {
				$value = $this->esc_array( $value, $escaping_function );
			} else {
				$value = $escaping_function( $value );
			}

			$result[ $key ] = $value;
		}

		return $result;
	}

	/**
	 * Transforms an array of data into a new array based on the provided transformation definition.
	 *
	 * @since 3.10     Renamed from `transform_data_to` to `array_transform`.
	 * @since 3.0.68
	 *
	 * @param array  $data         The data to transform.
	 * @param array  $data_map     Transformation definition. See examples below.
	 * @param string $direction    The direction in which to transform. Accepts '->', '<-'. Default '->'
	 * @param array  $exclude_keys Keys that should be excluded from the result. Optional.
	 *
	 * @return array
	 */
	public function array_transform( $data, $data_map, $direction = '->', $exclude_keys = array() ) {
		$result = array();

		if ( ! in_array( $direction, array( '->', '<-' ) ) ) {
			return $result;
		}

		foreach ( $data_map as $address_1 => $address_2 ) {
			$from_address = '->' === $direction ? $address_1 : $address_2;
			$to_address   = '->' === $direction ? $address_2 : $address_1;

			$array_value_required = $negate_bool_value = false;

			if ( 0 === strpos( $to_address, '@' ) || 0 === strpos( $from_address, '@' ) ) {
				$array_value_required = true;
				$to_address           = ltrim( $to_address, '@' );
				$from_address         = ltrim( $from_address, '@' );

			} else if ( 0 === strpos( $to_address, '!' ) || 0 === strpos( $from_address, '!' ) ) {
				$negate_bool_value = true;
				$to_address        = ltrim( $to_address, '!' );
				$from_address      = ltrim( $from_address, '!' );
			}

			if ( ! empty( $exclude_keys ) && array_key_exists( $to_address, $exclude_keys ) ) {
				continue;
			}

			$value = $this->array_get( $data, $from_address, null );

			if ( null === $value ) {
				// Unknown key, skip it.
				continue;
			}

			if ( $array_value_required && ! is_array( $value ) ) {
				$value = array( $value );

			} else if ( $negate_bool_value ) {
				$value = (bool) $value;
				$value = ! $value;
			}

			$this->array_set( $result, $to_address, $value );
		}

		return $result;
	}

	/**
	 * Converts xml data to array. Useful in cases where the xml doesn't adhere to XML-RPC spec.
	 *
	 * @param string|\SimpleXMLElement $xml_data
	 *
	 * @return array
	 */
	public function xml_to_array( $xml_data ) {
		if ( is_string( $xml_data ) ) {
			$xml_data = $this->simplexml_load_string( $xml_data );
		}

		$json = wp_json_encode( $xml_data );
		return json_decode( $json, true );
	}

	/**
	 * Make sure that in provided selector do not exist sub-selectors that targets inputs placeholders
	 *
	 * If they exist they should be split in an apart selector.
	 *
	 * @param string $selector
	 *
	 * @return array Return a list of selectors
	 */
	public function sanitize_css_placeholders( $selector ) {
		$selectors     = explode( ',', $selector );
		$selectors     = array_map( 'trim', $selectors );
		$selectors     = array_filter( $selectors );
		$main_selector = array();
		$exceptions    = array();
		$placeholders  = array(
			'::-webkit-input-placeholder',
			'::-moz-placeholder',
			':-ms-input-placeholder',
		);

		// No need to sanitize if is a single selector or even no selectors at all
		// Also if selectors do not contain placeholder meta-selector
		if ( count( $selectors ) < 2 || ! preg_match( '/' . implode( '|', $placeholders ) . '/', $selector ) ) {
			return array( $selector );
		}

		foreach ( $selectors as $_selector ) {
			foreach ( $placeholders as $placeholder ) {
				if ( strpos( $_selector, $placeholder ) !== false ) {
					$exceptions[] = $_selector;
					continue 2;
				}
			}

			$main_selector[] = $_selector;
		}

		return array_filter( array_merge( array( implode( ', ', $main_selector ) ), $exceptions ) );
	}

	/**
	 * Whether or not a string starts with a substring.
	 *
	 * @since 4.0
	 *
	 * @param string $string
	 * @param string $substring
	 *
	 * @return bool
	 */
	public function starts_with( $string, $substring ) {
		return 0 === strpos( $string, $substring );
	}

	/**
	 * Convert string to camel case format.
	 *
	 * @since 4.0
	 *
	 * @param string $string Original string data.
	 * @param array  $no_strip Additional regex pattern exclusion.
	 *
	 * @return string
	 */
	public function camel_case( $string, $no_strip = array() ) {
		$words = preg_split( '/[^a-zA-Z0-9' . implode( '', $no_strip ) . ']+/i', strtolower( $string ) );

		if ( count( $words ) === 1 ) {
			return $words[0];
		}

		$camel_cased = implode( '', array_map( 'ucwords', $words ) );

		$camel_cased[0] = strtolower( $camel_cased[0] );

		return $camel_cased;
	}

	/**
	 * Returns the WP Filesystem instance.
	 *
	 * @since 4.0.6
	 *
	 * @return WP_Filesystem_Base {@see ET_Core_PageResource::wpfs()}
	 */
	public function WPFS() {
		return et_core_cache_dir()->wpfs;
	}

	/**
	 * Equivalent of usort but preserves relative order of equally weighted values.
	 *
	 * @since 4.0.9
	 *
	 * @param array &$array
	 * @param callable $comparison_function
	 *
	 * @return array
	 */
	public function usort( &$array, $comparison_function ) {
		return $this->_user_sort( $array, 'usort', $comparison_function );
	}

	/**
	 * Equivalent of uasort but preserves relative order of equally weighted values.
	 *
	 * @since 4.0.9
	 *
	 * @param array &$array
	 * @param callable $comparison_function
	 *
	 * @return array
	 */
	public function uasort( &$array, $comparison_function ) {
		return $this->_user_sort( $array, 'uasort', $comparison_function );
	}

	/**
	 * Equivalent of uksort but preserves relative order of equally weighted values.
	 *
	 * @since 4.0.9
	 *
	 * @param array &$array
	 * @param callable $comparison_function
	 *
	 * @return array
	 */
	public function uksort( &$array, $comparison_function ) {
		return $this->_user_sort( $array, 'uksort', $comparison_function );
	}

	/**
	 * Returns a string with a valid CSS property value.
	 *
	 * With some locales (ex: ro_RO) the decimal point can be ',' (comma) and
	 * we need to convert that to a '.' (period) decimal point to ensure that
	 * the value is a valid CSS property value.
	 *
	 * @since 4.4.8
	 *
	 * @param float $float Original float value.
	 *
	 * @return string
	 */
	public function to_css_decimal( $float ) {
		return strtr( $float, ',', '.' );
	}

	/**
	 * Sort using a custom function accounting for the common undefined order
	 * pitfall due to a return value of 0.
	 *
	 * @since 4.0.9
	 *
	 * @param array &$array Array to sort
	 * @param callable $sort_function "usort", "uasort" or "uksort"
	 * @param callable $comparison_function Custom comparison function
	 *
	 * @return array
	 */
	protected function _user_sort( &$array, $sort_function, $comparison_function ) {
		$allowed_sort_functions = array( 'usort', 'uasort', 'uksort' );

		if ( ! $this->includes( $allowed_sort_functions, $sort_function ) ) {
			_doing_it_wrong( __FUNCTION__, esc_html__( 'Only custom sorting functions can be used.', 'et_core' ), esc_html( et_get_theme_version() ) );
		}

		// Use properties temporarily to pass values in order to preserve PHP 5.2 support.
		$this->sort_arguments['array']      = $array;
		$this->sort_arguments['sort']       = $sort_function;
		$this->sort_arguments['comparison'] = $comparison_function;
		$this->sort_arguments['array_map']  = 'uksort' === $sort_function
			? array_flip( array_keys( $array ) )
			: array_values( $array );

		$sort_function( $array, array( $this, '_user_sort_callback' ) );

		$this->sort_arguments['array']      = array();
		$this->sort_arguments['array_map']  = array();
		$this->sort_arguments['sort']       = '__return_false';
		$this->sort_arguments['comparison'] = '__return_false';

		return $array;
	}

	/**
	 * Sort callback only meant to acompany self::sort().
	 * Do not use outside of self::_user_sort().
	 *
	 * @since 4.0.9
	 *
	 * @param mixed $a
	 * @param mixed $b
	 *
	 * @return integer
	 */
	protected function _user_sort_callback( $a, $b ) {
		// @phpcs:ignore Generic.PHP.ForbiddenFunctions.Found
		$result = (int) call_user_func( $this->sort_arguments['comparison'], $a, $b );

		if ( 0 !== $result ) {
			return $result;
		}

		if ( 'uksort' === $this->sort_arguments['sort'] ) {
			// Intentional isset() use for performance reasons.
			$a_order = isset( $this->sort_arguments['array_map'][ $a ] ) ? $this->sort_arguments['array_map'][ $a ] : false;
			$b_order = isset( $this->sort_arguments['array_map'][ $b ] ) ? $this->sort_arguments['array_map'][ $b ] : false;
		} else {
			$a_order = array_search( $a, $this->sort_arguments['array_map'] );
			$b_order = array_search( $b, $this->sort_arguments['array_map'] );
		}

		if ( false === $a_order || false === $b_order ) {
			// This should not be possible so we fallback to the undefined
			// sorting behavior by returning 0.
			return 0;
		}

		return $a_order - $b_order;
	}

	/**
	 * Returns RFC 4211 compliant Universally Unique Identifier (UUID) version 4
	 * https://tools.ietf.org/html/rfc4122
	 *
	 * @since 4.5.0
	 *
	 * @param array $random_sequence The initial random sequence. Mostly used for test purposes.
	 *
	 * @return string
	 */
	public static function uuid_v4( $random_sequence = null ) {
		$buffer = array();

		for ( $i = 0; $i < 16; $i++) {
			$buffer[] = isset( $random_sequence[ $i ] ) ? $random_sequence[ $i ] : mt_rand(0, 0xff);
		}

		// The high field of the timestamp multiplexed with the version number
		$buffer[6] = ( $buffer[6] & 0x0f ) | 0x40;

		// The high field of the clock sequence multiplexed with the variant
		$buffer[8] = ( $buffer[8] & 0x3f ) | 0x80;

		return sprintf(
			'%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x',

			// Time low
			$buffer[0],
			$buffer[1],
			$buffer[2],
			$buffer[3],

			// Time mid
			$buffer[4],
			$buffer[5],

			// Time hi and version
			$buffer[6],
			$buffer[7],

			// Clock seq hi and reserved
			$buffer[8],

			// Clock seq low
			$buffer[9],

			// Node
			$buffer[10],
			$buffer[11],
			$buffer[12],
			$buffer[13],
			$buffer[14],
			$buffer[15]
		);
	}

	/**
	 * Append/Prepend to comma separated selectors.
	 *
	 * Example:
	 *
	 * @see UtilsTest::testAppendPrependCommaSeparatedSelectors()
	 *
	 * @param string $css_selector      Comma separated CSS selectors.
	 * @param string $value             Value to append/prepend.
	 * @param string $prefix_suffix     Values can be `prefix` or `suffix`.
	 * @param bool   $is_space_required Is space required? // phpcs:ignore Squiz.Commenting.FunctionComment.ParamCommentFullStop -- Respecting punctuation.
	 *
	 * @return string
	 */
	public function append_prepend_comma_separated_selectors(
		$css_selector,
		$value,
		$prefix_suffix,
		$is_space_required = true
	) {
		$css_selectors           = explode( ',', $css_selector );
		$css_selectors_processed = array();
		$is_prefix               = 'prefix' === $prefix_suffix;

		foreach ( $css_selectors as $selector ) {
			$selector = rtrim( ltrim( $selector ) );
			if ( $is_prefix && $is_space_required ) {
				$css_selectors_processed[] = sprintf( '%2$s %1$s', $selector, $value );
			} elseif ( $is_prefix && ! $is_space_required ) {
				$css_selectors_processed[] = sprintf( '%2$s%1$s', $selector, $value );
			} elseif ( ! $is_prefix && $is_space_required ) {
				$css_selectors_processed[] = sprintf( '%1$s %2$s', $selector, $value );
			} elseif ( ! $is_prefix && ! $is_space_required ) {
				$css_selectors_processed[] = sprintf( '%1$s%2$s', $selector, $value );
			}
		}

		return implode( ',', $css_selectors_processed );
	}

	/**
	 * Helper function to prepare attributes for SVG.
	 *
	 * @param array $props Props.
	 *
	 * @return string
	 */
	public function get_svg_attrs( $props ) {
		$result = '';
		$attrs  = array_merge(
			$props,
			array(
				'xmlns' => 'http://www.w3.org/2000/svg',
			)
		);

		foreach ( $attrs as $key => $value ) {
			$result .= " {$key}=\"{$value}\"";
		}

		return $result;
	}
}


function et_core_data_utils_minify_css( $string = '' ) {
	$comments = <<< EOS
(?sx)
	# don't change anything inside of quotes
	( "(?:[^"\\\]++|\\\.)*+" | '(?:[^'\\\]++|\\\.)*+' )
|
	# comments
	/\* (?> .*? \*/ )
EOS;

	$everything_else = <<< EOS
(?six)
	# don't change anything inside of quotes
	( "(?:[^"\\\]++|\\\.)*+" | '(?:[^'\\\]++|\\\.)*+' )
|
	# spaces before and after ; and }
	\s*+ ; \s*+ ( } ) \s*+
|
	# all spaces around meta chars/operators (excluding + and -)
	\s*+ ( [*$~^|]?+= | [{};,>~] | !important\b ) \s*+
|
	# all spaces around + and - (in selectors only!)
	\s*([+-])\s*(?=[^}]*{)
|
	# spaces right of ( [ :
	( [[(:] ) \s++
|
	# spaces left of ) ]
	\s++ ( [])] )
|
	# spaces left (and right) of : (but not in selectors)!
	\s+(:)(?![^\}]*\{)
|
	# spaces at beginning/end of string
	^ \s++ | \s++ \z
|
	# double spaces to single
	(\s)\s+
EOS;

	$search_patterns  = array( "%{$comments}%", "%{$everything_else}%" );
	$replace_patterns = array( '$1', '$1$2$3$4$5$6$7$8' );

	return preg_replace( $search_patterns, $replace_patterns, $string );
}
data/ScriptReplacer.php000064400000000613152336022500011106 0ustar00<?php

/**
 * Utility class for replacing scripts in a string.
 *
 * @since 3.18.5
 *
 * @package ET\Core\Data
 */
class ET_Core_Data_ScriptReplacer {

	private $_map = array();

	public function replace( $matches ) {
		$script            = $matches[0];
		$id                = md5( $script );
		$this->_map[ $id ] = $script;
		return $id;
	}

	public function map() {
		return $this->_map;
	}
}
PageResource.php000064400000103473152336022500007647 0ustar00<?php

/**
 * Manages a frontend inline CSS or JavaScript resource.
 *
 * If possible, the resource will be served as a static file for better performance. It can be
 * tied to a specific post or it can be 'global'. The resource can be output, static or inline,
 * to one of four locations on the page:
 *
 *   * `head-early`: right AFTER theme styles have been enqueued
 *   * `head`      : right BEFORE the theme and wp's inline custom css
 *   * `head-late` : right AFTER the theme and wp's inline custom css
 *   * `footer`    : in the footer
 *
 * The first time the class is instantiated, a static callback method will be registered for each
 * output location. Inside each callback, we'll iterate over any/all instances that are assigned
 * to the current output location and perform the following steps:
 *
 *   1. If a static file exists for the resource, go to the next step. Otherwise, try to create
 *      a static file for the resource if it has `data`. If it doesn't have `data`, assign it to
 *      the next output location and then move on to the next resource (continue).
 *   2. If a static file exists for the resource, enqueue it (via WP or manually) and then move on
 *      to the next resource (continue). If no static file exists, go to the next step.
 *   3. Output the resource inline.
 *
 * @since   2.0
 *
 * @package ET\Core
 */
class ET_Core_PageResource {
	/**
	 * Lock file.
	 *
	 * @var string[]
	 */
	protected static $_lock_file;

	/**
	 * Onload attribute for stylesheet output.
	 *
	 * @var string[]
	 */
	private static $_onload = '';

	/**
	 * Output locations.
	 *
	 * @var string[]
	 */
	protected static $_output_locations = array(
		'head-early',
		'head',
		'head-late',
		'footer',
	);

	/**
	 * Resource owners.
	 *
	 * @var string[]
	 */
	protected static $_owners = array(
		'divi',
		'builder',
		'epanel',
		'epanel_temp',
		'extra',
		'core',
		'bloom',
		'monarch',
		'custom',
		'all',
	);

	/**
	 * Resource scopes.
	 *
	 * @var string[]
	 */
	protected static $_scopes = array(
		'global',
		'post',
	);

	/**
	 * Temp DIRS.
	 *
	 * @var array
	 */
	protected static $_temp_dirs = array();

	/**
	 * Resource types.
	 *
	 * @var string[]
	 */
	protected static $_types = array(
		'style',
		'script',
	);

	/**
	 * Whether or not we have write access to the filesystem.
	 *
	 * @var bool
	 */
	protected static $_can_write;

	/**
	 * Request ID.
	 *
	 * @var int
	 */
	protected static $_request_id;

	/**
	 * Request time.
	 *
	 * @var string
	 */
	protected static $_request_time;

	/**
	 * All instances of this class.
	 *
	 * @var ET_Core_PageResource[] {
	 *
	 *     @type ET_Core_PageResource $slug
	 * }
	 */
	protected static $_resources;

	/**
	 * All instances of this class organized by output location and sorted by priority.
	 *
	 * @var array[] {
	 *
	 *     @type array[] $location {@see self::$_output_locations} {
	 *
	 *         @type ET_Core_PageResource[] $priority {
	 *
	 *             @type ET_Core_PageResource $slug
	 *         }
	 *     }
	 * }
	 */
	protected static $_resources_by_location;

	/**
	 * All instances of this class organized by scope.
	 *
	 * @var array[] {
	 *
	 *     @type ET_Core_PageResource[] $post|$global {
	 *
	 *         @type ET_Core_PageResource $slug
	 *     }
	 * }
	 */
	protected static $_resources_by_scope;

	/**
	 * @var string
	 */
	public static $WP_CONTENT_DIR;

	/**
	 * @var string
	 */
	public static $current_output_location;

	/**
	 * @var ET_Core_Data_Utils
	 */
	public static $data_utils;

	/**
	 * @var \WP_Filesystem_Base|null
	 */
	public static $wpfs;

	/**
	 * The absolute path to the directory where the static resource will be stored.
	 *
	 * @var string
	 */
	public $base_dir;

	/**
	 * The absolute path to the static resource on the server.
	 *
	 * @var string
	 */
	public $path;

	/**
	 * Temp DIR.
	 *
	 * @var array
	 */
	public $temp_dir;

	/**
	 * The absolute URL through which the static resource can be downloaded.
	 *
	 * @var string
	 */
	public $url;

	/**
	 * The data/contents for/of the static resource sorted by priority.
	 *
	 * @var array
	 */
	public $data;

	/**
	 * Whether or not this resource has been disabled.
	 *
	 * @var bool
	 */
	public $disabled;

	/**
	 * Whether or not the static resource file has been enqueued.
	 *
	 * @var bool
	 */
	public $enqueued;

	/**
	 * Whether or not this resource is forced inline.
	 *
	 * @var bool
	 */
	public $forced_inline;

	/**
	 * @var string
	 */
	public $filename;

	/**
	 * Whether or not the resource has already been output to the page inline.
	 *
	 * @var bool
	 */
	public $inlined;

	/**
	 * The owner of this instance.
	 *
	 * @var string
	 */
	public $owner;

	/**
	 * The id of the post to which this resource belongs.
	 *
	 * @var string
	 */
	public $post_id;

	/**
	 * The priority of this resource.
	 *
	 * @var int
	 */
	public $priority;

	/**
	 * A unique identifier for this resource.
	 *
	 * @var string
	 */
	public $slug;

	/**
	 * The resource type (style|script).
	 *
	 * @var string
	 */
	public $type;

	/**
	 * The output location during which this resource's static file should be generated.
	 *
	 * @var string
	 */
	public $write_file_location;

	/**
	 * The output location where this resource should be output.
	 *
	 * @var string
	 */
	public $location;

	/**
	 * ET_Core_PageResource constructor
	 *
	 * @param string     $owner    The owner of the instance (core|divi|builder|bloom|monarch|custom).
	 * @param string     $slug     A string that uniquely identifies the resource.
	 * @param string|int $post_id  The post id that the resource is associated with or `global`.
	 *                             If `null`, {@link get_the_ID()} will be used.
	 * @param string     $type     The resource type (style|script). Default: `style`.
	 * @param string     $location Where the resource should be output (head|footer). Default: `head`.
	 */
	public function __construct( $owner, $slug, $post_id = null, $priority = 10, $location = 'head-late', $type = 'style' ) {
		$this->owner    = self::_validate_property( 'owner', $owner );
		$this->post_id  = self::_validate_property( 'post_id', $post_id ? $post_id : et_core_page_resource_get_the_ID() );

		$this->type     = self::_validate_property( 'type', $type );
		$this->location = self::_validate_property( 'location', $location );

		$this->write_file_location = $this->location;

		$this->filename = sanitize_file_name( "et-{$this->owner}-{$slug}-{$post_id}" );
		$this->slug     = "{$this->filename}-cached-inline-{$this->type}s";

		$this->data     = array();
		$this->priority = $priority;

		self::startup();

		$this->_initialize_resource();
	}

	/**
	 * Activates the class
	 */
	public static function startup() {
		if ( null !== self::$_resources ) {
			// Class has already been initialized
			return;
		}

		$time = (string) microtime( true );
		$time = str_replace( '.', '', $time );
		$rand = (string) mt_rand();

		self::$_request_time = $time;
		self::$_request_id   = "{$time}-{$rand}";
		self::$_resources    = array();
		self::$data_utils    = new ET_Core_Data_Utils();

		foreach ( self::$_output_locations as $location ) {
			self::$_resources_by_location[ $location ] = array();
		}

		foreach ( self::$_scopes as $scope ) {
			self::$_resources_by_scope[ $scope ] = array();
		}
		// phpcs:enable

		self::$WP_CONTENT_DIR = self::$data_utils->normalize_path( WP_CONTENT_DIR );
		self::$_lock_file     = self::$_request_id . '~';

		self::_register_callbacks();
		self::_setup_wp_filesystem();

		self::$_can_write = et_core_cache_dir()->can_write;
	}

	/**
	 * Cleanup and save
	 */
	public static function shutdown() {
		if ( ! self::$_resources || ! self::$_can_write ) {
			return;
		}

		// Remove any leftover temporary directories that belong to this request
		foreach ( self::$_temp_dirs as $temp_directory ) {
			if ( file_exists( $temp_directory . '/' . self::$_lock_file ) ) {
				@self::$wpfs->delete( $temp_directory, true );
			}
		}

		// Reset $_resources property; Mostly useful for unit test big request which needs to make
		// each test*() method act like it is different page request
		self::$_resources = null;

		if ( et_()->WPFS()->exists( self::$WP_CONTENT_DIR . '/cache/et' ) ) {
			// Remove old cache directory
			et_()->WPFS()->rmdir( self::$WP_CONTENT_DIR . '/cache/et', true );
		}
	}

	protected static function _assign_output_location( $location, $resource ) {
		$priority_existed = isset( self::$_resources_by_location[ $location ][ $resource->priority ] );

		self::$_resources_by_location[ $location ][ $resource->priority ][ $resource->slug ] = $resource;

		if ( ! $priority_existed ) {
			// We've added a new priority to the list, so put them back in sorted order.
			ksort( self::$_resources_by_location[ $location ], SORT_NUMERIC );
		}
	}

	/**
	 * Enqueues static file for provided script resource.
	 *
	 * @param ET_Core_PageResource $resource page resources.
	 */
	protected static function _enqueue_script( $resource ) {
		// Bust PHP's stats cache for the resource file to ensure we get the latest timestamp.
		clearstatcache( true, $resource->path );

		$can_enqueue = 0 === did_action( 'wp_print_scripts' );
		$timestamp   = filemtime( $resource->path );

		if ( $can_enqueue ) {
			wp_enqueue_script( $resource->slug, set_url_scheme( $resource->url ), array(), $timestamp, true );
		} else {
			$timestamp = $timestamp ? $timestamp : ET_CORE_VERSION;

			printf(
				'<script id="%1$s" src="%2$s"></script>', // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
				esc_attr( $resource->slug ),
				esc_url( set_url_scheme( $resource->url . "?ver={$timestamp}" ) )
			);
		}

		$resource->enqueued = true;
	}

	/**
	 * Enqueues static file for provided style resource.
	 *
	 * @param ET_Core_PageResource $resource
	 */
	protected static function _enqueue_style( $resource ) {
		if ( 'footer' === self::$current_output_location ) {
			return;
		}

		// Bust PHP's stats cache for the resource file to ensure we get the latest timestamp.
		clearstatcache( true, $resource->path );

		$can_enqueue = 0 === did_action( 'wp_print_scripts' );
		// reason: We do this on purpose when a style can't be enqueued.
		// phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
		$template = '<link rel="stylesheet" id="%1$s" href="%2$s" />';
		// phpcs:enable
		$timestamp = filemtime( $resource->path );

		if ( $can_enqueue ) {
			wp_enqueue_style( $resource->slug, set_url_scheme( $resource->url ), array(), $timestamp );
		} else {
			// reason: this whole file needs to be converted.
			// phpcs:disable ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase
			$timestamp = $timestamp ?: ET_CORE_VERSION;
			$slug      = esc_attr( $resource->slug );
			$scheme    = esc_url( set_url_scheme( $resource->url . "?ver={$timestamp}" ) );
			$tag       = sprintf( $template, $slug, $scheme );
			$onload    = et_core_esc_previously( self::$_onload );
			// phpcs:enable

			$tag = apply_filters( 'et_core_page_resource_tag', $tag, $slug, $scheme, $onload );

			print( et_core_esc_previously( $tag ) );
		}

		$resource->enqueued = true;
	}

	/**
	 * Returns the next output location.
	 *
	 * @see self::$_output_locations
	 *
	 * @return string
	 */
	protected static function _get_next_output_location() {
		$current_index = array_search( self::$current_output_location, self::$_output_locations, true );

		if ( false === $current_index || ! is_int( $current_index ) ) {
			ET_Core_Logger::error( '$current_output_location is invalid!' );
		}

		$current_index += 1;

		return self::$_output_locations[ $current_index ];
	}

	/**
	 * Creates static resource files for an output location if needed.
	 *
	 * @param string $location {@link self::$_output_locations}.
	 */
	protected static function _maybe_create_static_resources( $location ) {
		self::$current_output_location = $location;

		// Disable for footer inside builder if page uses Theme Builder Editor to avoid conflict with critical CSS.
		if ( 'footer' === $location && et_core_is_fb_enabled() && et_fb_is_theme_builder_used_on_page() ) {
			return false;
		}

		$sorted_resources = self::get_resources_by_output_location( $location );

		foreach ( $sorted_resources as $priority => $resources ) {
			foreach ( $resources as $slug => $resource ) {
				if ( $resource->write_file_location !== $location ) {
					// This resource's static file needs to be generated later on.
					self::_assign_output_location( $resource->write_file_location, $resource );
					continue;
				}

				if ( ! self::$_can_write ) {
					// The reason we don't simply check this before looping through resources and
					// bail if it fails is because we need to perform the output location assignment
					// in the previous conditional regardless (otherwise builder styles will break).
					continue;
				}

				if ( $resource->forced_inline || $resource->has_file() ) {
					continue;
				}

				$data = $resource->get_data( 'file' );

				if ( empty( $data ) && 'footer' !== $location ) {
					// This resource doesn't have any data yet so we'll assign it to the next output location.
					$next_location = self::_get_next_output_location();

					$resource->set_output_location( $next_location );

					continue;
				}

				$force_write = apply_filters( 'et_core_page_resource_force_write', false, $resource );

				if ( ! $force_write && empty( $data ) ) {
					continue;
				}

				// Make sure directory exists.
				if ( ! self::$data_utils->ensure_directory_exists( $resource->base_dir ) ) {
					self::$_can_write = false;
					return;
				}

				$can_continue = true;

				// Try to create a temporary directory which we'll use as a pseudo file lock
				if ( @mkdir( $resource->temp_dir, 0755 ) ) { //phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- Just ignore this since it's an internal use.
					self::$_temp_dirs[] = $resource->temp_dir;

					// Make sure another request doesn't delete our temp directory.
					$lock_file = $resource->temp_dir . '/' . self::$_lock_file;
					self::$wpfs->put_contents( $lock_file, '' );

					// Create the static resource file
					if ( ! self::$wpfs->put_contents( $resource->path, $data, 0644 ) ) {
						// There's no point in continuing
						self::$_can_write = $can_continue = false;
					} else {
						// Remove the temporary directory
						self::$wpfs->delete( $resource->temp_dir, true );

						/**
						 * Fires when the static resource file is created.
						 *
						 * @since 4.10.8
						 *
						 * @param object $resource The resource object.
						 */
						do_action( 'et_core_static_file_created', $resource );
					}
				} elseif ( file_exists( $resource->temp_dir ) ) {
					// The static resource file is currently being created by another request
					continue;
				} else {
					// Failed for some other reason. There's no point in continuing
					self::$_can_write = $can_continue = false;
					return;
				}

				if ( ! $can_continue ) {
					return;
				}

				if ( ! defined( 'DONOTCACHEPAGE' ) ) {
					define( 'DONOTCACHEPAGE', true );
				}
			}
		}
	}

	/**
	 * Enqueues static files for an output location if available.
	 *
	 * @param string $location {@link self::$_output_locations}.
	 */
	protected static function _maybe_enqueue_static_resources( $location ) {
		$sorted_resources = self::get_resources_by_output_location( $location );

		foreach ( $sorted_resources as $priority => $resources ) {
			foreach ( $resources as $slug => $resource ) {
				if ( $resource->disabled ) {
					// Resource is disabled. Remove it from the queue.
					self::_unassign_output_location( $location, $resource );
					continue;
				}

				if ( $resource->forced_inline || ! $resource->url || ! $resource->has_file() ) {
					continue;
				}

				if ( 'style' === $resource->type ) {
					self::_enqueue_style( $resource );
				} elseif ( 'script' === $resource->type ) {
					self::_enqueue_script( $resource );
				}

				if ( $resource->enqueued ) {
					self::_unassign_output_location( $location, $resource );
				}
			}
		}
	}

	/**
	 * Outputs all non-enqueued resources for an output location inline.
	 *
	 * @param string $location {@link self::$_output_locations}.
	 */
	protected static function _maybe_output_inline_resources( $location ) {
		$sorted_resources = self::get_resources_by_output_location( $location );

		foreach ( $sorted_resources as $priority => $resources ) {
			foreach ( $resources as $slug => $resource ) {
				if ( $resource->disabled ) {
					// Resource is disabled. Remove it from the queue.
					self::_unassign_output_location( $location, $resource );
					continue;
				}

				$data = $resource->get_data( 'inline' );

				$same_write_file_location = $resource->write_file_location === $resource->location;

				if ( empty( $data ) && 'footer' !== $location && $same_write_file_location ) {
					// This resource doesn't have any data yet so we'll assign it to the next output location.
					$next_location = self::_get_next_output_location();
					$resource->set_output_location( $next_location );
					continue;
				} elseif ( empty( $data ) ) {
					continue;
				}

				printf(
					'<%1$s id="%2$s">%3$s</%1$s>',
					esc_html( $resource->type ),
					esc_attr( $resource->slug ),
					et_core_esc_previously( wp_strip_all_tags( $data ) )
				);

				if ( $same_write_file_location ) {
					// File wasn't created during this location's callback and it won't be created later
					$resource->inlined = true;
				}
			}
		}
	}

	/**
	 * Registers necessary callbacks.
	 */
	protected static function _register_callbacks() {
		$class = 'ET_Core_PageResource';

		// Output Location: head-early, right after theme styles have been enqueued.
		add_action( 'wp_enqueue_scripts', array( $class, 'head_early_output_cb' ), 11 );

		// Output Location: head, right BEFORE the theme and wp's custom css.
		add_action( 'wp_head', array( $class, 'head_output_cb' ), 99 );

		// Output Location: head-late, right AFTER the theme and wp's custom css.
		add_action( 'wp_head', array( $class, 'head_late_output_cb' ), 103 );

		// Output Location: footer.
		add_action( 'wp_footer', array( $class, 'footer_output_cb' ), 20 );

		// Always delete cached resources for a post upon saving.
		add_action( 'save_post', array( $class, 'save_post_cb' ), 10, 3 );

		// Always delete cached resources for theme customizer upon saving.
		add_action( 'customize_save_after', array( $class, 'customize_save_after_cb' ) );

		/*
		 * Always delete dynamic css when saving widgets.
		 * `widget_update_callback` fires on save for any of the present widgets,
		 * `delete_widget` fires on save for any deleted widget.
		 */
		add_filter( 'widget_update_callback', array( $class, 'widget_update_callback_cb' ) );
		add_filter( 'delete_widget', array( $class, 'widget_update_callback_cb' ) );
	}

	/**
	 * Initializes the WPFilesystem class.
	 */
	protected static function _setup_wp_filesystem() {
		// The wpfs instance will always exists at this point because the cache dir class initializes it beforehand
		self::$wpfs = $GLOBALS['wp_filesystem'];
	}

	/**
	 * Unassign a resource from an output location.
	 *
	 * @param string               $location {@link self::$_output_locations}.
	 * @param ET_Core_PageResource $resource
	 */
	protected static function _unassign_output_location( $location, $resource ) {
		unset( self::$_resources_by_location[ $location ][ $resource->priority ][ $resource->slug ] );
	}

	protected static function _validate_property( $property, $value ) {
		$valid_values = array(
			'location' => self::$_output_locations,
			'owner'    => self::$_owners,
			'type'     => self::$_types,
		);

		switch ( $property ) {
			case 'path':
				$value    = et_()->normalize_path( realpath( $value ) );
				$is_valid = et_()->starts_with( $value, et_core_cache_dir()->path );
				break;
			case 'url':
				$base_url = et_core_cache_dir()->url;
				$is_valid = et_()->starts_with( $value, set_url_scheme( $base_url, 'http' ) );
				$is_valid = $is_valid ? $is_valid : et_()->starts_with( $value, set_url_scheme( $base_url, 'https' ) );
				break;
			case 'post_id':
				$is_valid = 'global' === $value || 'all' === $value || is_numeric( $value );
				break;
			default:
				$is_valid = isset( $valid_values[ $property ] ) && in_array( $value, $valid_values[ $property ] );
				break;
		}

		return $is_valid ? $value : '';
	}

	/**
	 * Whether or not we are able to write to the filesystem.
	 *
	 * @return bool
	 */
	public static function can_write_to_filesystem() {
		return ET_Core_Cache_Directory::instance()->can_write;
	}

	/**
	 * Output Location: footer
	 * {@see 'wp_footer' (20) Allow third-party extensions some room to do what they do}
	 */
	public static function footer_output_cb() {
		self::_maybe_create_static_resources( 'footer' );
		self::_maybe_enqueue_static_resources( 'footer' );
		self::_maybe_output_inline_resources( 'footer' );
	}

	/**
	 * Returns the absolute path to our cache directory.
	 *
	 * @since 4.0.8     Removed `$path_type` param b/c cache directory might not be located under wp-content.
	 * @since 3.0.52
	 *
	 * @return string
	 */
	public static function get_cache_directory() {
		return et_core_cache_dir()->path;
	}

	/**
	 * Returns all current resources.
	 *
	 * @return array {@link self::$_resources}
	 */
	public static function get_resources() {
		return self::$_resources;
	}

	/**
	 * Returns the current resources for the provided output location, sorted by priority.
	 *
	 * @param string $location The desired output location {@see self::$_output_locations}.
	 *
	 * @return array[] {
	 *
	 *     @type ET_Core_PageResource[] $priority {
	 *
	 *         @type ET_Core_PageResource $slug Resource.
	 *         ...
	 *     }
	 *     ...
	 * }
	 */
	public static function get_resources_by_output_location( $location ) {
		return self::$_resources_by_location[ $location ];
	}

	/**
	 * Returns the current resources for the provided scope.
	 *
	 * @param string $scope The desired scope (post|global).
	 *
	 * @return ET_Core_PageResource[]
	 */
	public static function get_resources_by_scope( $scope ) {
		return self::$_resources_by_scope[ $scope ];
	}

	/**
	 * Output Location: head-early
	 * {@see 'wp_enqueue_scripts' (11) Should run right after the theme enqueues its styles.}
	 */
	public static function head_early_output_cb() {
		self::_maybe_create_static_resources( 'head-early' );
		self::_maybe_enqueue_static_resources( 'head-early' );
		self::_maybe_output_inline_resources( 'head-early' );
	}

	/**
	 * Output Location: head
	 * {@see 'wp_head' (99) Must run BEFORE the theme and WP's custom css callbacks.}
	 */
	public static function head_output_cb() {
		self::_maybe_create_static_resources( 'head' );
		self::_maybe_enqueue_static_resources( 'head' );
		self::_maybe_output_inline_resources( 'head' );
	}

	/**
	 * Output Location: head-late
	 * {@see 'wp_head' (103) Must run AFTER the theme and WP's custom css callbacks.}
	 */
	public static function head_late_output_cb() {
		self::_maybe_create_static_resources( 'head-late' );
		self::_maybe_enqueue_static_resources( 'head-late' );
		self::_maybe_output_inline_resources( 'head-late' );
	}

	/**
	 * {@see 'widget_update_callback'}
	 *
	 * @param array $instance Widget settings being saved.
	 */
	public static function widget_update_callback_cb( $instance ) {
		self::remove_static_resources( 'all', 'all', false, 'dynamic' );
		return $instance;
	}

	/**
	 * {@see 'customize_save_after'}
	 *
	 * @param WP_Customize_Manager $manager
	 */
	public static function customize_save_after_cb( $manager ) {
		self::remove_static_resources( 'all', 'all' );
	}

	/**
	 * {@see 'save_post'}
	 *
	 * @param int     $post_id
	 * @param WP_Post $post
	 * @param bool    $update
	 */
	public static function save_post_cb( $post_id, $post, $update ) {
		// In Dynamic CSS, we parse the layout content for generating styles and store it under the `object_id`, so clearing
		// only the layout assets won't update the page style if we made any changes to the layout/global modules etc.
		// Hence, we need to clear all static resources when we update a layout.
		// Also, we should only clear the cache if the layout being saved is a global module/row/section.
		if ( 'et_pb_layout' === $post->post_type ) {
			$taxonomies     = get_taxonomies( [ 'object_type' => [ 'et_pb_layout' ] ] );
			$tax_to_clear   = array( 'scope', 'layout_type' );
			$types_to_clear = array( 'module', 'row', 'section' );

			$scope_terms  = get_the_terms( $post_id, 'scope' );
			$layout_terms = get_the_terms( $post_id, 'layout_type' );

			if ( ! empty( $scope_terms ) && ! empty( $layout_terms ) ) {
				$scope_terms       = wp_list_pluck( $scope_terms, 'slug' );
				$layout_terms      = wp_list_pluck( $layout_terms, 'slug' );
				$is_global         = in_array( 'global', $scope_terms, true );
				$clearable_modules = array_intersect( $types_to_clear, $layout_terms );
				$remove_resource   = $is_global && ! empty( $clearable_modules );

				foreach ( $taxonomies as $taxonomy ) {
					if ( in_array( $taxonomy, $tax_to_clear, true ) && $remove_resource ) {
						$post_id = 'all';
						break;
					}
				}
			}
		}
		self::remove_static_resources( $post_id, 'all' );
	}

	/**
	 * Remove static resources for a post, or optionally all resources, if any exist.
	 *
	 * @param string $post_id id of post.
	 * @param string $owner owner of file.
	 * @param bool   $force remove all resources.
	 * @param string $slug file slug.
	 */
	public static function remove_static_resources( $post_id, $owner = 'core', $force = false, $slug = 'all' ) {
		if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
			return;
		}

		if ( ! wp_doing_cron() && ! et_core_security_check_passed( 'edit_posts' ) ) {
			return;
		}

		if ( ! self::can_write_to_filesystem() ) {
			return;
		}

		if ( ! self::$data_utils ) {
			self::startup();
		}

		self::do_remove_static_resources( $post_id, $owner, $force, $slug );
	}

	/**
	 * Remove static resources action.
	 *
	 * @param string $post_id id of post.
	 * @param string $owner owner of file.
	 * @param bool   $force remove all resources.
	 * @param string $slug file slug.
	 */
	public static function do_remove_static_resources( $post_id, $owner = 'core', $force = false, $slug = 'all' ) {
		$post_id = self::_validate_property( 'post_id', $post_id );
		$owner   = self::_validate_property( 'owner', $owner );
		$slug    = sanitize_key( $slug );

		if ( '' === $owner || '' === $post_id ) {
			return;
		}

		$_post_id = 'all' === $post_id ? '*' : $post_id;
		$_owner   = 'all' === $owner ? '*' : $owner;
		$_slug    = 'all' === $slug ? '*' : $slug;

		$cache_dir = self::get_cache_directory();

		$files = array_merge(
			// Remove any CSS files missing a parent folder.
			(array) glob( "{$cache_dir}/et-{$_owner}-*" ),
			// Remove CSS files for individual posts or all posts if $post_id set to 'all'.
			(array) glob( "{$cache_dir}/{$_post_id}/et-{$_owner}-{$_slug}*" ),
			// Remove CSS files that contain theme builder template CSS.
			// Multiple directories need to be searched through since * doesn't match / in the glob pattern.
			(array) glob( "{$cache_dir}/*/et-{$_owner}-{$_slug}-*tb-{$_post_id}*" ),
			(array) glob( "{$cache_dir}/*/*/et-{$_owner}-{$_slug}-*tb-{$_post_id}*" ),
			(array) glob( "{$cache_dir}/*/*/*/et-{$_owner}-{$_slug}-*tb-{$_post_id}*" ),
			(array) glob( "{$cache_dir}/*/et-{$_owner}-{$_slug}-*tb-for-{$_post_id}*" ),
			(array) glob( "{$cache_dir}/*/*/et-{$_owner}-{$_slug}-*tb-for-{$_post_id}*" ),
			(array) glob( "{$cache_dir}/*/*/*/et-{$_owner}-{$_slug}-*tb-for-{$_post_id}*" ),
			// Remove Dynamic CSS files for categories, tags, authors, archives, homepage post feed and search results.
			(array) glob( "{$cache_dir}/taxonomy/*/*/et-{$_owner}-dynamic*" ),
			(array) glob( "{$cache_dir}/author/*/et-{$_owner}-dynamic*" ),
			(array) glob( "{$cache_dir}/archive/et-{$_owner}-dynamic*" ),
			(array) glob( "{$cache_dir}/search/et-{$_owner}-dynamic*" ),
			(array) glob( "{$cache_dir}/notfound/et-{$_owner}-dynamic*" ),
			(array) glob( "{$cache_dir}/home/et-{$_owner}-dynamic*" ),
			// WP Templates and Template Parts.
			(array) glob( "{$cache_dir}/*/et-{$_owner}-{$_slug}-*wpe-{$_post_id}*" ),
			(array) glob( "{$cache_dir}/*/*/et-{$_owner}-{$_slug}-*wpe-{$_post_id}*" ),
			(array) glob( "{$cache_dir}/*/*/*/et-{$_owner}-{$_slug}-*wpe-{$_post_id}*" )
		);

		self::_remove_files_in_directory( $files, $cache_dir );

		// Remove empty directories.
		self::$data_utils->remove_empty_directories( $cache_dir );

		// Clear cache managed by 3rd-party cache plugins.
		$post_id = ! empty( $post_id ) && absint( $post_id ) > 0 ? $post_id : '';

		et_core_clear_wp_cache( $post_id );

		// Purge the module features cache.
		if ( class_exists( 'ET_Builder_Module_Features' ) ) {
			if ( ! empty( $post_id ) ) {
				ET_Builder_Module_Features::purge_cache( $post_id );
			} else {
				ET_Builder_Module_Features::purge_cache();
			}
		}

		// Purge the google fonts cache.
		if ( empty( $post_id ) && class_exists( 'ET_Builder_Google_Fonts_Feature' ) ) {
			ET_Builder_Google_Fonts_Feature::purge_cache();
		}

		// Purge the dynamic assets cache.
		if ( empty( $post_id ) && class_exists( 'ET_Builder_Dynamic_Assets_Feature' ) ) {
			ET_Builder_Dynamic_Assets_Feature::purge_cache();
		}

		$post_meta_caches = array(
			'et_enqueued_post_fonts',
			'_et_dynamic_cached_shortcodes',
			'_et_dynamic_cached_attributes',
			'_et_builder_module_features_cache',
		);

		// Clear post meta caches.
		foreach ( $post_meta_caches as $post_meta_cache ) {
			if ( ! empty( $post_id ) ) {
				delete_post_meta( $post_id, $post_meta_cache );
			} else {
				delete_post_meta_by_key( $post_meta_cache );
			}
		}

		// Set our DONOTCACHEPAGE file for the next request.
		self::$data_utils->ensure_directory_exists( $cache_dir );
		self::$wpfs->put_contents( $cache_dir . '/DONOTCACHEPAGE', '' );

		if ( $force ) {
			delete_option( 'et_core_page_resource_remove_all' );
		}

		/**
		 * Fires when the static resources are removed.
		 *
		 * @since 4.21.1
		 *
		 * @param mixed $post_id The post ID.
		 */
		do_action( 'et_core_static_resources_removed', $post_id );
	}

	/**
	 * Removes a list of files from the designated directory.
	 *
	 * @param array[] $files     List of patterns to match.
	 * @param string  $cache_dir Cache directory.
	 */
	protected static function _remove_files_in_directory( $files, $cache_dir ) {
		foreach ( $files as $file ) {
			$file = self::$data_utils->normalize_path( $file );

			if ( ! et_()->starts_with( $file, $cache_dir ) ) {
				// File is not located inside cache directory so skip it.
				continue;
			}

			if ( is_file( $file ) ) {
				self::$wpfs->delete( $file );
			}
		}
	}

	public static function wpfs() {
		if ( null !== self::$wpfs ) {
			return self::$wpfs;
		}

		self::startup();

		return self::$wpfs = et_core_cache_dir()->wpfs;
	}

	protected function _initialize_resource() {
		if ( ! self::can_write_to_filesystem() ) {
			$this->base_dir = $this->temp_dir = $this->path = $this->url = ''; //phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found -- Just ignore this since it's an internal use.

			$this->_register_resource();
			return;
		}

		$file_extension = 'style' === $this->type ? '.min.css' : '.min.js';
		$path           = self::get_cache_directory();
		$url            = et_core_cache_dir()->url;

		$file = et_()->path( $path, $this->post_id, $this->filename . $file_extension );

		if ( file_exists( $file ) ) {
			// Static resource file exists
			$this->path     = self::$data_utils->normalize_path( $file );
			$this->base_dir = dirname( $this->path );
			$this->url      = et_()->path( $url, $this->post_id, basename( $this->path ) );

		} else {
			// Static resource file doesn't exist
			$url  .= "/{$this->post_id}/{$this->filename}{$file_extension}";
			$path .= "/{$this->post_id}/{$this->filename}{$file_extension}";

			$this->base_dir = self::$data_utils->normalize_path( dirname( $path ) );
			$this->temp_dir = $this->base_dir . "/{$this->slug}~";
			$this->path     = $path;
			$this->url      = $url;
		}

		$this->_register_resource();
	}

	protected function _register_resource() {
		$this->enqueued = false;
		$this->inlined  = false;

		$scope = 'global' === $this->post_id ? 'global' : 'post';

		self::$_resources[ $this->slug ] = $this;

		self::$_resources_by_scope[ $scope ][ $this->slug ] = $this;

		self::_assign_output_location( $this->location, $this );
	}

	public function get_data( $context ) {
		$result = '';

		ksort( $this->data, SORT_NUMERIC );

		/**
		 * Filters the resource's data array.
		 *
		 * @since 3.0.52
		 *
		 * @param array[]              $data {
		 *
		 *     @type string[] $priority Resource data.
		 *     ...
		 * }
		 * @param string               $context  Where the data will be used. Accepts 'inline', 'file'.
		 * @param ET_Core_PageResource $resource The resource instance.
		 */
		$resource_data = apply_filters( 'et_core_page_resource_get_data', $this->data, $context, $this );

		foreach ( $resource_data as $priority => $data_part ) {
			foreach ( $data_part as $data ) {
				$result .= $data;
			}
		}

		return $result;
	}

	/**
	 * Whether or not a static resource exists on the filesystem for this instance.
	 *
	 * @return bool
	 */
	public function has_file() {
		if ( ! self::$wpfs || empty( $this->path ) || ! self::can_write_to_filesystem() ) {
			return false;
		}

		return self::$wpfs->exists( $this->path );
	}

	/**
	 * Set the resource's data.
	 *
	 * @param string $data
	 * @param int    $priority
	 */
	public function set_data( $data, $priority = 10 ) {
		if ( 'style' === $this->type ) {
			$data = et_core_data_utils_minify_css( $data );
			// Remove empty media queries
			//           @media   only..and  (feature:value)    { }
			$pattern = '/@media\s+([\w\s]+)?\([\w-]+:[\w\d-]+\)\{\s*\}/';
			$data    = preg_replace( $pattern, '', $data );
		}

		$this->data[ $priority ][] = trim( strip_tags( str_replace( '\n', '', $data ) ) );
	}

	public function set_output_location( $location ) {
		if ( ! self::_validate_property( 'location', $location ) ) {
			return;
		}

		$current_location = $this->location;

		self::_unassign_output_location( $current_location, $this );
		self::_assign_output_location( $location, $this );

		$this->location = $location;
	}

	public function unregister_resource() {
		$scope = 'global' === $this->post_id ? 'global' : 'post';

		unset( self::$_resources[ $this->slug ], self::$_resources_by_scope[ $scope ][ $this->slug ] );

		self::_unassign_output_location( $this->location, $this );
	}
}
SupportCenter.php000064400000363013152336022500010076 0ustar00<?php

// Quick exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Elegant Themes Support Center adds a new page to the WP Admin menu.
 *
 * System Status
 * Here we note system settings that could potentially cause problems. An extended view (displaying all settings we
 * check, not just those with problematic results) can be toggled, with an option to copy this report to the
 * clipboard so it can be pasted in a support ticket.
 *
 * Elegant Themes Support
 * If Remote Access is enabled in this section, Elegant Themes Support will be granted limited access to the user's site
 * (@see ET_Core_SupportCenter::support_user_maybe_create_user()). When this is activated, a second toggle appears
 * for the user that will allow them to enable "Full Admin Privileges" which has no restrictions (only certain ET
 * Support staff will be able to request that the user enables this). Full Admin Privileges can be disabled at any
 * time, but are automatically disabled whenever the Remote Access is disabled (manually or by timeout). Time
 * remaining until Remote Access is automatically deactivated is indicated alongside the toggle. A link for
 * initiating a chat https://www.elegantthemes.com/members-area/help/ is also available in this section.
 *
 * Divi Documentation & Help
 * This section contains common help videos, articles, and a link to full documentation. This is not meant to be a
 * full service documentation center; it's mainly a launch off point.
 *
 * Divi Safe Mode
 * A quick and easy way for users and support to quickly disable plugins and scripts to see if Divi is the cause of
 * an issue. This call to action disables active plugins, custom css, child themes, scripts in the Integrations tab,
 * static css, and combination/minification of CSS and JS. When enabling this, the user will be presented with a
 * list of plugins that will be affected (disabled). Sitewide (not including the Visual Builder), there will be a
 * floating indicator in the upper right or left corner of the website that will indicate that Safe Mode is enabled
 * and will contain a link that takes you to the Support Page to disabled it.
 *
 * Logs
 * If WP_DEBUG_LOG is enabled, WordPress related errors will be archived in a log file. We load the most recent entries
 * of this log file for convienient viewing here, with a link to download the full log, as well as an option to copy
 * the log to the clipboard so it can be pasted in a support ticket.
 *
 * @package ET\Core\SupportCenter
 * @author  Elegant Themes <http://www.elegantthemes.com>
 * @license GNU General Public License v2 <http://www.gnu.org/licenses/gpl-2.0.html>
 *
 * @since 3.24.1 Renamed from `ET_Support_Center` to `ET_Core_SupportCenter`.
 * @since 3.20
 */
class ET_Core_SupportCenter {
	/**
	 * Catch whether the ET_DEBUG flag is set.
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $DEBUG_ET_SUPPORT_CENTER = false;

	/**
	 * Identifier for the parent theme or plugin activating the Support Center.
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $parent = '';

	/**
	 * "Nice name" for the parent theme or plugin activating the Support Center.
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $parent_nicename = '';

	/**
	 * Whether the Support Center was activated through a `plugin` or a `theme`.
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $child_of = '';

	/**
	 * Identifier for the parent theme or plugin activating the Support Center.
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $local_path;

	/**
	 * Support User options
	 *
	 * @since 3.20
	 *
	 * @type array
	 */
	protected $support_user_options;

	/**
	 * Support User account name
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $support_user_account_name = 'elegant_themes_support';

	/**
	 * Support options name in the database
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $support_user_options_name = 'et_support_options';

	/**
	 * Name of the cron job we use to auto-delete the Support User account
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $support_user_cron_name = 'et_cron_delete_support_account';

	/**
	 * Expiration time to auto-delete the Support User account via cron
	 *
	 * @since 3.20
	 *
	 * @type string
	 */
	protected $support_user_expiration_time = '+4 days';

	/**
	 * Provide nicename equivalents for boolean values
	 *
	 * @since 3.23
	 *
	 * @type array
	 */
	protected $boolean_label = array( 'False', 'True' );

	/**
	 * Collection of plugins that we will NOT disable when Safe Mode is activated.
	 *
	 * @since 3.20
	 *
	 * @type array
	 */
	protected $safe_mode_plugins_allowlist = array(
		'etdev/etdev.php', // ET Development Workspace
		'bloom/bloom.php', // ET Bloom Plugin
		'monarch/monarch.php', // ET Monarch Plugin
		'divi-builder/divi-builder.php', // ET Divi Builder Plugin
		'divi-dash/divi-dash.php', // Divi Dash Plugin
		'ari-adminer/ari-adminer.php', // ARI Adminer
		'query-monitor/query-monitor.php', // Query Monitor
		'woocommerce/woocommerce.php', // WooCommerce
		'really-simple-ssl/rlrsssl-really-simple-ssl.php', // Really Simple SSL
	);

	/**
	 * Capabilities that should be granted to the Administrator role on activation.
	 *
	 * @since 3.28
	 *
	 * @type array
	 */
	protected $support_center_administrator_caps = array(
		'et_support_center',
		'et_support_center_system',
		'et_support_center_remote_access',
		'et_support_center_documentation',
		'et_support_center_safe_mode',
		'et_support_center_logs',
	);

	/**
	 * Collection of Cards that has button to dismiss the Card.
	 *
	 * @since 4.4.7
	 *
	 * @type array
	 */
	protected $card_with_dismiss_button = array(
		'et_hosting_card',
	);

	/**
	 * Core functionality of the class
	 *
	 * @since 4.4.7 Added WP AJAX action for dismissible button for a card
	 * @since 3.20
	 *
	 * @param string $parent Identifier for the parent theme or plugin activating the Support Center.
	 */
	public function __construct( $parent = '' ) {
		// Verbose logging: only log if `wp-config.php` has defined `ET_DEBUG='support_center'`
		$this->DEBUG_ET_SUPPORT_CENTER = defined( 'ET_DEBUG' ) && 'support_center' === ET_DEBUG;

		// Set the identifier for the parent theme or plugin activating the Support Center.
		$this->parent = $parent;

		// Get `et_support_options` settings & set $this->support_user_options
		$this->support_user_get_options();

		// Set the plugins allowlist for Safe Mode
		$this->set_safe_mode_plugins_allowlist();
	}

	/**
	 * WordPress action & filter setup
	 *
	 * @since 3.20
	 */
	public function init() {
		update_option( 'et_support_center_installed', 'true' );

		// Establish which theme or plugin has loaded the Support Center
		$this->set_parent_properties();

		// When initialized, deactivate conflicting plugins
		$this->deactivate_conflicting_plugins();

		add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts_styles' ) );
		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) );

		// SC scripts are only used in FE for the "Turn Off Divi Safe Mode" floating button.
		if ( et_core_is_safe_mode_active() ) {
			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) );
		}

		// Get Site ID with Elegant Themes API & token (needed in advance for Remote Access).
		add_action( 'admin_init', array( $this, 'maybe_set_site_id' ) );

		// Add extra User Role capabilities needed for Remote Access to work with 3rd party software
		add_filter( 'add_et_support_standard_capabilities', array( $this, 'support_user_extra_caps_standard' ), 10, 1 );

		// Make sure that our Support Account's role is set up.
		add_filter( 'add_et_builder_role_options', array( $this, 'support_user_add_role_options' ), 10, 1 );

		// On Multisite installs, grant `unfiltered_html` capabilities to the Support User
		add_filter( 'map_meta_cap', array( $this, 'support_user_map_meta_cap' ), 1, 3 );

		// Add CSS class name(s) to the Support Center page's body tag
		add_filter( 'admin_body_class', array( $this, 'add_admin_body_class_name' ) );

		// Add a link to the Support Center in the admin menu
		add_filter( 'admin_menu', array( $this, 'add_admin_menu_item' ) );

		// When Safe Mode is enabled, add floating frontend indicator
		add_action( 'admin_footer', array( $this, 'maybe_add_safe_mode_indicator' ) );
		add_action( 'wp_footer', array( $this, 'maybe_add_safe_mode_indicator' ) );

		// Add User capabilities to the Administrator Role
		add_action( 'admin_init', array( $this, 'support_center_capabilities_setup' ) );

		if ( 'plugin' === $this->child_of ) {
			// Delete our Support User settings on deactivation
			register_deactivation_hook( __FILE__, array( $this, 'support_user_delete_account' ) );
			register_deactivation_hook( __FILE__, array( $this, 'unlist_support_center' ) );
			register_deactivation_hook( __FILE__, array( $this, 'support_center_capabilities_teardown' ) );
		}
		if ( 'theme' === $this->child_of ) {
			// Delete our Support User settings on deactivation
			add_action( 'switch_theme', array( $this, 'maybe_deactivate_on_theme_switch' ) );
		}

		// Automatically delete our Support User when the time runs out
		add_action( $this->support_user_cron_name, array( $this, 'support_user_cron_maybe_delete_account' ) );
		add_action( 'init', array( $this, 'support_user_maybe_delete_expired_account' ) );
		add_action( 'admin_init', array( $this, 'support_user_maybe_delete_expired_account' ) );

		// Remove KSES filters for ET Support User
		add_action( 'admin_init', array( $this, 'support_user_kses_remove_filters' ) );

		// Update Support User settings via AJAX
		add_action( 'wp_ajax_et_support_user_update', array( $this, 'support_user_update_via_ajax' ) );

		// Toggle Safe Mode via AJAX
		add_action( 'wp_ajax_et_safe_mode_update', array( $this, 'safe_mode_update_via_ajax' ) );

		// Safe Mode: Block restricted actions when Safe Mode active
		add_action( 'admin_footer', array( $this, 'render_safe_mode_block_restricted' ) );

		// Safe Mode: Temporarily disable Custom CSS
		add_action( 'init', array( $this, 'maybe_disable_custom_css' ) );

		// Safe Mode: Remove "Additional CSS" from WP Head action hook
		if ( et_core_is_safe_mode_active() ) {
			remove_action( 'wp_head', 'wp_custom_css_cb', 101 );
		}

		// Support Center Card: Handle Dismiss Button
		add_action( 'wp_ajax_et_dismiss_support_center_card', array( $this, 'dismiss_support_center_card_via_ajax' ) );
	}

	/**
	 * Add User capabilities to the Administrator Role (if it exists) on first run
	 *
	 * @since 3.29.2 Added check to verify the Administrator Role exists before attempting to run `add_cap()`.
	 * @since 3.28
	 */
	public function support_center_capabilities_setup() {
		$support_capabilities = get_option( 'et_support_center_setup_done' );
		$administrator_role   = get_role( 'administrator' );

		if ( $administrator_role && ! $support_capabilities ) {
			foreach ( $this->support_center_administrator_caps as $cap ) {
				$administrator_role->add_cap( $cap );
			}
			update_option( 'et_support_center_setup_done', 'processed' );
		}
	}

	/**
	 * Remove User capabilities from the Administrator Role when product with Support Center is removed
	 *
	 * @since 3.29.2 Added check to verify the Administrator Role exists before attempting to run `remove_cap()`.
	 * @since 3.28
	 */
	public function support_center_capabilities_teardown() {
		$support_capabilities = get_option( 'et_support_center_setup_done' );
		$administrator_role   = get_role( 'administrator' );

		if ( $administrator_role && $support_capabilities ) {
			foreach ( $this->support_center_administrator_caps as $cap ) {
				$administrator_role->remove_cap( $cap );
			}
			delete_option( 'et_support_center_setup_done' );
		}
	}

	/**
	 * Set variables that change depending on whether a theme or a plugin activated the Support Center
	 *
	 * @since 3.20
	 */
	public function set_parent_properties() {
		$core_path = _et_core_normalize_path( trailingslashit( dirname( __FILE__ ) ) );
		$theme_dir = _et_core_normalize_path( trailingslashit( realpath( get_template_directory() ) ) );

		if ( 0 === strpos( $core_path, $theme_dir ) ) {
			$this->child_of   = 'theme';
			$this->local_path = trailingslashit( get_template_directory_uri() . '/core/' );
		} else {
			$this->child_of   = 'plugin';
			$this->local_path = plugins_url( '/', dirname( __FILE__ ) );
		}

		$this->parent_nicename = $this->get_parent_nicename( $this->parent );
	}

	/**
	 * Get the "Nice Name" for the parent theme/plugin
	 *
	 * @param $parent
	 *
	 * @return bool|string
	 */
	public function get_parent_nicename( $parent ) {
		switch ( $parent ) {
			case 'bloom_plugin':
				return 'Bloom';
				break;
			case 'monarch_plugin':
				return 'Monarch';
				break;
			case 'extra_theme':
				return 'Extra';
				break;
			case 'divi_theme':
				return 'Divi';
				break;
			case 'divi_builder_plugin':
				return 'Divi Builder';
				break;
			case 'divi_dash_plugin':
				return 'Divi Dash';
				break;
			default:
				return false;
		}
	}

	/**
	 * Prevent any possible conflicts with the Elegant Themes Support plugin
	 *
	 * @since 3.20
	 */
	public function deactivate_conflicting_plugins() {
		require_once( ABSPATH . 'wp-admin/includes/plugin.php' );

		// Load WP user management functions
		if ( is_multisite() ) {
			require_once( ABSPATH . 'wp-admin/includes/ms.php' );
		} else {
			require_once( ABSPATH . 'wp-admin/includes/user.php' );
		}

		// Verify that WP user management functions are available
		$can_delete_user = false;
		if ( is_multisite() && function_exists( 'wpmu_delete_user' ) ) {
			$can_delete_user = true;
		}
		if ( ! is_multisite() && function_exists( 'wp_delete_user' ) ) {
			$can_delete_user = true;
		}

		if ( $can_delete_user ) {
			deactivate_plugins( '/elegant-themes-support/elegant-themes-support.php' );
		} else {
			et_error( 'Support Center: Unable to deactivate the ET Support Plugin.' );
		}
	}

	/**
	 * @param string $capability
	 *
	 * @return bool
	 */
	protected function current_user_can( $capability = '' ) {
		if ( function_exists( 'et_is_builder_plugin_active' ) ) {
			return et_pb_is_allowed( $capability );
		}

		return current_user_can( $capability );
	}

	/**
	 * Add Safe Mode Autoloader Must-Use Plugin
	 *
	 * @since 3.20
	 */
	public function maybe_add_mu_autoloader() {
		$file_name = '/SupportCenterMUAutoloader.php';
		$file_path = dirname( __FILE__ );

		// Exit if the `mu-plugins` directory doesn't exist & we're unable to create it
		if ( ! wp_mkdir_p( WPMU_PLUGIN_DIR ) ) {
			et_error( 'Support Center Safe Mode: mu-plugin folder not found.' );

			return;
		}

		$pathname_to   = WPMU_PLUGIN_DIR . $file_name;
		$pathname_from = $file_path . $file_name;

		// Exit if we can't find the mu-plugins autoloader
		if ( ! file_exists( $pathname_from ) ) {
			et_error( 'Support Center Safe Mode: mu-plugin autoloader not found.' );

			return;
		}

		// Try to create a new subdirectory for our mu-plugins; if it fails, log an error message
		$pathname_plugins_from = dirname( __FILE__ ) . '/mu-plugins';
		$pathname_plugins_to   = WPMU_PLUGIN_DIR . '/et-safe-mode';
		if ( ! wp_mkdir_p( $pathname_plugins_to ) ) {
			et_error( 'Support Center Safe Mode: mu-plugins subfolder not found.' );

			return;
		}

		// Try to copy the mu-plugins; if any fail, log an error message
		if ( $mu_plugins = glob( dirname( __FILE__ ) . '/mu-plugins/*.php' ) ) {
			foreach ( $mu_plugins as $plugin ) {
				$new_file_path = str_replace( $pathname_plugins_from, $pathname_plugins_to, $plugin );

				// Skip if this particular mu-plugin hasn't changed
				if ( file_exists( $new_file_path ) && md5_file( $new_file_path ) === md5_file( $plugin ) ) {
					continue;
				}

				$copy_file = @copy( $plugin, $new_file_path );

				if ( ! $this->DEBUG_ET_SUPPORT_CENTER ) {
					continue;
				}

				if ( $copy_file ) {
					et_error( 'Support Center Safe Mode: mu-plugin [' . $plugin . '] installed.' );
				} else {
					et_error( 'Support Center Safe Mode: mu-plugin [' . $plugin . '] failed installation. ' );
				}
			}
		}

		// Finally, try to copy the autoloader file; if it fails, log an error message

		// Skip if the mu-plugins autoloader hasn't changed
		if ( file_exists( $pathname_to ) && md5_file( $pathname_to ) === md5_file( $pathname_from ) ) {
			return;
		}

		$copy_file = @copy( $pathname_from, $pathname_to );

		if ( $this->DEBUG_ET_SUPPORT_CENTER ) {
			if ( $copy_file ) {
				et_error( 'Support Center Safe Mode: mu-plugin installed.' );
			} else {
				et_error( 'Support Center Safe Mode: mu-plugin failed installation. ' );
			}
		}
	}

	public function maybe_remove_mu_autoloader() {
		@unlink( WPMU_PLUGIN_DIR . '/SupportCenterMUAutoloader.php' );
		@unlink( WPMU_PLUGIN_DIR . '/et-safe-mode/SupportCenterSafeModeDisablePlugins.php' );
		et_()->remove_empty_directories( WPMU_PLUGIN_DIR . '/et-safe-mode' );
	}

	/**
	 * Update the Site ID data via Elegant Themes API
	 *
	 * @since ?.?  Early exit if no Site ID, but also no API credentials to use for a request.
	 * @since 3.20
	 *
	 * @return void
	 */
	public function maybe_set_site_id() {
		// Early exit if the user doesn't have Support Center access.
		if ( ! $this->current_user_can( 'et_support_center' ) ) {
			return;
		}

		$site_id = get_option( 'et_support_site_id' );

		// If we already have a saved Site ID for support, then we don't need to request a new ID.
		if ( ! empty( $site_id ) ) {
			return;
		}

		// If there are no saved API credentials, then we can't use the API to request a Site ID for support.
		if ( ! $this->get_et_license() ) {
			return;
		}

		$site_id = '';

		$send_to_api = array(
			'action' => 'get_site_id',
		);

		$settings = array(
			'timeout' => 30,
			'body'    => $send_to_api,
		);

		$request = wp_remote_post( 'https://www.elegantthemes.com/api/token.php', $settings );

		if ( ! is_wp_error( $request ) && 200 == wp_remote_retrieve_response_code( $request ) ) {
			$response = unserialize( wp_remote_retrieve_body( $request ) );

			if ( ! empty( $response['site_id'] ) ) {
				$site_id = esc_attr( $response['site_id'] );
			}
		}

		update_option( 'et_support_site_id', $site_id );
	}

	/**
	 * Safe Mode temporarily deactivates all plugins *except* those in the allowlist option set here
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function set_safe_mode_plugins_allowlist() {
		update_option( 'et_safe_mode_plugins_allowlist', $this->safe_mode_plugins_allowlist );
	}

	/**
	 * Add Support Center menu item (but only if it's enabled for current user)
	 *
	 * When initialized we were given an identifier for the plugin or theme doing the initializing. We're going to use
	 * that identifier here to insert the Support Center menu item in the correct location within the WP Admin Menu.
	 *
	 * @since 3.28 Expanded sub-menu links with support for additional ET products.
	 * @since 3.20
	 */
	public function add_admin_menu_item() {
		// Early exit if the user doesn't have Support Center access
		if ( ! $this->current_user_can( 'et_support_center' ) ) {
			return;
		}

		$menu_title       = esc_html__( 'Support Center', 'et-core' );
		$menu_slug        = null;
		$parent_menu_slug = null;

		// By default, only user with `manage_options` capability which is "administrator"
		// can see Support Center menu and access the page.
		$capability = 'manage_options';

		// Define parent and child menu slugs
		switch ( $this->parent ) {
			case 'bloom_plugin':
				$menu_slug        = 'et_support_center_bloom';
				$parent_menu_slug = 'et_bloom_options';
				break;
			case 'monarch_plugin':
				$menu_title       = esc_html__( 'Monarch Support Center', 'et-core' );
				$menu_slug        = 'et_support_center_monarch';
				$parent_menu_slug = 'tools.php';
				break;
			case 'extra_theme':
				$menu_slug        = 'et_support_center_extra';
				$parent_menu_slug = 'et_extra_options';
				break;
			case 'divi_theme':
			case 'divi_builder_plugin':
				// In the Roles Editor, other user roles may have access to the Support Center.
				// But, most likely they don't have `manage_options` capability. So, if current
				// user can't `manage_options`, we will set the submenu capability into the
				// `edit_theme_options`, so other roles with `edit_theme_options` capability
				// can access the Support Center.
				if ( ! current_user_can( 'manage_options' ) ) {
					$capability = 'edit_theme_options';
				}

				// However, that's not enough. We still need to check whether current user with
				// `manage_options` or `edit_theme_options` is allowed to access Support Center.
				if ( ! et_pb_is_allowed( 'support_center' ) ) {
					return;
				}

				$menu_slug        = 'et_support_center_divi';
				$parent_menu_slug = 'et_divi_options';
		}

		// If there's no menu slug, then this product doesn't have Support Center enabled
		if ( ! $menu_slug ) {
			return;
		}

		// Build the link
		add_submenu_page(
			$parent_menu_slug,
			$menu_title,
			$menu_title,
			$capability,
			$menu_slug,
			array( $this, 'add_support_center' )
		);
	}

	/**
	 * Add class name to Support Center page
	 *
	 * @since 3.20
	 *
	 * @param string $admin_classes Current class names for the body tag.
	 *
	 * @return string
	 */
	public function add_admin_body_class_name( $admin_classes = '' ) {
		$classes   = explode( ' ', $admin_classes );
		$classes[] = 'et-admin-page';

		if ( et_core_is_safe_mode_active() ) {
			$classes[] = 'et-safe-mode-active';
		}

		return implode( ' ', $classes );
	}

	/**
	 * Support Center admin page JS
	 *
	 * @since 3.20
	 *
	 * @param $hook string Unique identifier for WP admin page.
	 *
	 * @return void
	 */
	public function admin_enqueue_scripts_styles( $hook ) {
		et_core_register_admin_assets();

		wp_enqueue_style( 'et-core-admin' );
		wp_enqueue_script( 'et-core-admin' );

		// Load only on `_et_support_center` pages.
		if ( strpos( $hook, '_et_support_center' ) ) {
			// Core Admin CSS
			wp_enqueue_style( 'et-core',
				$this->local_path . 'admin/css/core.css',
				array(),
				ET_CORE_VERSION
			);

			// ePanel CSS
			wp_enqueue_style( 'et-wp-admin',
				$this->local_path . 'admin/css/wp-admin.css',
				array(),
				ET_CORE_VERSION
			);

			// Support Center CSS
			wp_enqueue_style( 'et-support-center',
				$this->local_path . 'admin/css/support-center.css',
				array(),
				ET_CORE_VERSION
			);

			// Support Center uses ePanel controls, so include the necessary scripts
			if ( function_exists( 'et_core_enqueue_js_admin' ) ) {
				et_core_enqueue_js_admin();
			}
		}
	}

	/**
	 * Support Center frontend CSS/JS
	 *
	 * @since 3.20
	 *
	 * @param $hook string Unique identifier for WP admin page.
	 *
	 * @return void
	 */
	public function enqueue_scripts_styles( $hook ) {
		// We only need to add this for authenticated users on the frontend
		if ( ! is_user_logged_in() ) {
			return;
		}

		// Support Center JS
		wp_enqueue_script( 'et-support-center',
			$this->local_path . 'admin/js/support-center.js',
			array( 'jquery', 'underscore' ),
			ET_CORE_VERSION,
			true
		);

		$support_center_nonce = wp_create_nonce( 'support_center' );

		$etSupportCenterSettings = array(
			'ajaxLoaderImg'    => esc_url( $this->local_path . 'admin/images/ajax-loader.gif' ),
			'ajaxURL'          => admin_url( 'admin-ajax.php' ),
			'siteURL'          => get_site_url(),
			'supportCenterURL' => get_admin_url( null, 'admin.php?page=et_support_center#et_card_safe_mode' ),
			'nonce'            => $support_center_nonce,
		);

		wp_localize_script( 'et-support-center', 'etSupportCenter', $etSupportCenterSettings );
	}

	/**
	 * Divi Support Center :: Card
	 *
	 * Take an array of attributes and build a WP Card block for display on the Divi Support Center page.
	 *
	 * @since 4.4.7 Added optional dismissible button
	 * @since 3.20
	 *
	 * @param array $attrs
	 *
	 * @return string
	 */
	protected function add_support_center_card( $attrs = array( 'title' => '', 'content' => '' ) ) {

		$card_classes = array(
			'card',
		);

		if ( array_key_exists( 'additional_classes', $attrs ) ) {
			$card_classes = array_merge( $card_classes, $attrs['additional_classes'] );
		}

		$dismiss_button = '';

		if ( array_key_exists( 'dismiss_button', $attrs ) ) {
			// Update card class to indicate the presence of the dismiss button
			$card_classes = array_merge( $card_classes, array( 'has-dismiss-button' ) );

			// Prepare Class for the Dismiss button
			$dismiss_button_classes = array( 'et-dismiss-button' );

			if ( array_key_exists( 'additional_classes', $attrs['dismiss_button'] ) ) {
				$dismiss_button_classes = array_merge( $dismiss_button_classes, $attrs['dismiss_button']['additional_classes'] );
			}

			// Whether to display tooltip for the dismiss button
			$dismiss_button_has_tooltip = array_key_exists( 'tooltip', $attrs['dismiss_button'] );

			// HTML Template for the dismiss button
			$dismiss_button = PHP_EOL . "\t" . sprintf(
					'<button class="%2$s" data-key="%3$s" data-product="%4$s" %5$s type="button" ><span class="et-dismiss-button-label">%1$s</span></button>',
					esc_html__( 'Dismiss', 'et-core' ),
					esc_attr( implode( ' ', $dismiss_button_classes ) ),
					esc_attr( $attrs['dismiss_button']['card_key'] ),
					esc_attr( $this->parent ),
					$dismiss_button_has_tooltip ? 'data-tippy-content="' . esc_attr( $attrs['dismiss_button']['tooltip'] ) . '"' : ''
				);
		}

		$card = PHP_EOL . '<div class="' . esc_attr( implode( ' ', $card_classes ) ) . '">' .
				PHP_EOL . "\t" . '<h2>' . esc_html( $attrs['title'] ) . '</h2>' .
				PHP_EOL . "\t" . '<div class="main">' . et_core_intentionally_unescaped( $attrs['content'], 'html' ) . '</div>' .
				et_core_esc_previously( $dismiss_button ) .
				PHP_EOL . '</div>';

		return $card;
	}

	/**
	 * Divi Support Center :: Dismiss a Card via Ajax
	 *
	 * @since 4.4.7
	 */
	public function dismiss_support_center_card_via_ajax() {
		// Verify nonce.
		et_core_security_check( 'manage_options', 'support_center', 'nonce' );

		// If the user is an ET Support User, kill the request.
		if ( $this->is_support_user() ) {
			wp_die();
		}

		$response = array();

		// Check the ET product that dismissing the card
		$et_product = sanitize_key( $_POST['product'] );

		// Confirm that this is a allowlisted product
		$allowlisted_product = $this->is_allowlisted_product( $et_product );

		if ( ! $allowlisted_product ) {
			// Send a failure code and exit the function
			header( "HTTP/1.0 403 Forbidden" );
			print 'Bad or malformed ET product name.';
			wp_die();
		}

		// Check the Card key against Cards that has a dismiss button
		$card_key = sanitize_key( $_POST['card_key'] );

		if ( ! in_array( $card_key, $this->card_with_dismiss_button, true ) ) {
			// Send a failure code and exit the function
			header( "HTTP/1.0 403 Forbidden" );
			print 'Card does not exists.';
			wp_die();
		}

		// Update option(s)
		update_option( "{$card_key}_dismissed", true );

		// For Divi Hosting Card, update the status via ET API
		if ( $card_key === 'et_hosting_card' ) {
			$settings    = $this->get_et_api_request_settings( 'disable_hosting_card' );
			$et_username = et_()->array_get( $settings, 'body.username', '' );
			$et_api_key  = et_()->array_get( $settings, 'body.api_key', '' );

			// Exit if ET Username and/or ET API Key is not found
			if ( $et_username === '' || $et_api_key === '' ) {
				return;
			}

			et_maybe_update_hosting_card_status();
		}

		$response['message'] = sprintf(
			esc_html__( 'Card (%1$s) has been dismissed successfully.', 'et-core' ),
			$card_key
		);

		// `echo` data to return
		if ( isset( $response ) ) {
			wp_send_json_success( $response );
		}

		// `die` when we're done
		wp_die();
	}

	/**
	 * Prepare the "Divi Documentation & Help" video player block
	 *
	 * @since 3.28 Added support for Bloom, Monarch, and Divi Builer plugins.
	 * @since 3.20
	 *
	 * @param bool $formatted Return either a formatted HTML block (true) or an array (false)
	 *
	 * @return array|string
	 */
	protected function get_documentation_video_player( $formatted = true ) {

		/**
		 * Define the videos list
		 */
		switch ( $this->parent ) {
			case 'extra_theme':
				$documentation_videos = array(
					array(
						'name'       => esc_attr__( 'A Basic Overview Of Extra', 'et-core' ),
						'youtube_id' => 'JDSg9eq4LIc',
					),
					array(
						'name'       => esc_attr__( 'Using Premade Layout Packs', 'et-core' ),
						'youtube_id' => '9eqXcrLcnoc',
					),
					array(
						'name'       => esc_attr__( 'Creating Category Layouts', 'et-core' ),
						'youtube_id' => '30SVxnjdnxcE',
					),
				);
				break;
			case 'divi_theme':
			case 'divi_builder_plugin':
				$documentation_videos = array(
					array(
						'name'       => esc_attr__( 'Getting Started With The Divi Builder', 'et-core' ),
						'youtube_id' => 'T-Oe01_J62c',
					),
					array(
						'name'       => esc_attr__( 'Using Premade Layout Packs', 'et-core' ),
						'youtube_id' => '9eqXcrLcnoc',
					),
					array(
						'name'       => esc_attr__( 'The Divi Library', 'et-core' ),
						'youtube_id' => 'boNZZ0MYU0E',
					),
				);
				break;
			case 'bloom_plugin':
				$documentation_videos = array(
					array(
						'name'       => esc_attr__( 'A Basic Overview Of The Bloom Plugin', 'et-core' ),
						'youtube_id' => 'E4nfXFjuRRI',
					),
					array(
						'name'       => esc_attr__( 'How To Update The Bloom Plugin', 'et-core' ),
						'youtube_id' => '-IIdkRLskuA',
					),
					array(
						'name'       => esc_attr__( 'How To Add Mailing List Accounts', 'et-core' ),
						'youtube_id' => 'nEdWkHIgQwY',
					),
				);
				break;
			case 'monarch_plugin':
				$documentation_videos = array(
					array(
						'name'       => esc_attr__( 'A Complete Overviw Of Monarch', 'et-core' ),
						'youtube_id' => 'RlMUEVkbMrs',
					),
					array(
						'name'       => esc_attr__( 'Adding Social Networks', 'et-core' ),
						'youtube_id' => 'ZabKCiKQJLM',
					),
					array(
						'name'       => esc_attr__( 'Configuring Social Follower APIs', 'et-core' ),
						'youtube_id' => 'vmE8uFhbzos',
					),
				);
				break;
			default:
				$documentation_videos = array();
		}

		// If we just want the array (not a formatted HTML block), return that now
		if ( false === $formatted ) {
			return $documentation_videos;
		}

		$videos_list_html = '';
		$playlist         = array();

		foreach ( $documentation_videos as $key => $video ) {
			$extra = '';
			if ( 0 === $key ) {
				$extra = ' class="active"';
			}
			$videos_list_html .= sprintf( '<li %1$s data-ytid="%2$s">%3$s%4$s</li>',
				$extra,
				esc_attr( $video['youtube_id'] ),
				'<span class="dashicons dashicons-arrow-right"></span>',
				et_core_intentionally_unescaped( $video['name'], 'fixed_string' )
			);
			$playlist[]       = et_core_intentionally_unescaped( $video['youtube_id'], 'fixed_string' );
		}

		$html = sprintf( '<div class="et_docs_videos">'
						 . '<div class="wrapper"><div id="et_documentation_player" data-playlist="%1$s"></div></div>'
						 . '<ul class="et_documentation_videos_list">%2$s</ul>'
						 . '</div>',
			esc_attr( implode( ',', $playlist ) ),
			$videos_list_html
		);

		return $html;
	}

	/**
	 * Prepare the "Divi Documentation & Help" articles list
	 *
	 * @since 3.28 Added support for Bloom, Monarch, and Divi Builer plugins.
	 * @since 3.20
	 *
	 * @param bool $formatted Return either a formatted HTML block (true) or an array (false)
	 *
	 * @return array|string
	 */
	protected function get_documentation_articles_list( $formatted = true ) {

		$articles_list_html = '';


		switch ( $this->parent ) {
			case 'extra_theme':
				$articles = array(
					array(
						'title' => esc_attr__( 'Getting Started With Extra', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/extra/overview-extra/',
					),
					array(
						'title' => esc_attr__( 'Setting Up The Extra Theme Options', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/extra/theme-options-extra/',
					),
					array(
						'title' => esc_attr__( 'The Extra Category Builder', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/extra/category-builder/',
					),
					array(
						'title' => esc_attr__( 'Getting Started With The Divi Builder', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/visual-builder/',
					),
					array(
						'title' => esc_attr__( 'How To Update The Extra Theme', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/update-divi/',
					),
					array(
						'title' => esc_attr__( 'An Overview Of All Divi Modules', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/modules/',
					),
					array(
						'title' => esc_attr__( 'Getting Started With Layout Packs', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/premade-layouts/',
					),
					array(
						'title' => esc_attr__( 'Customizing Your Header And Navigation', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/extra/theme-customizer/',
					),
				);
				break;
			case 'divi_theme':
				$articles = array(
					array(
						'title' => esc_attr__( 'Getting Started With The Divi Builder', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/visual-builder/',
					),
					array(
						'title' => esc_attr__( 'How To Update The Divi Theme', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/update-divi/',
					),
					array(
						'title' => esc_attr__( 'An Overview Of All Divi Modules', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/modules/',
					),
					array(
						'title' => esc_attr__( 'Using The Divi Library', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/divi-library/',
					),
					array(
						'title' => esc_attr__( 'Setting Up The Divi Theme Options', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/theme-options/',
					),
					array(
						'title' => esc_attr__( 'Getting Started With Layout Packs', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/premade-layouts/',
					),
					array(
						'title' => esc_attr__( 'Customizing Your Header And Navigation', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/customizer-header/',
					),
					array(
						'title' => esc_attr__( 'Divi For Developers', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/developers/',
					),
				);
				break;
			case 'divi_builder_plugin':
				$articles = array(
					array(
						'title' => esc_attr__( 'Getting Started With The Divi Builder', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/visual-builder/',
					),
					array(
						'title' => esc_attr__( 'How To Update The Divi Builder', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi-builder/update-divi-builder/',
					),
					array(
						'title' => esc_attr__( 'An Overview Of All Divi Modules', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/modules/',
					),
					array(
						'title' => esc_attr__( 'Using The Divi Library', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/divi-library/',
					),
					array(
						'title' => esc_attr__( 'Selling Products With Divi And WooCommerce', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/ecommerce-divi/',
					),
					array(
						'title' => esc_attr__( 'Getting Started With Layout Packs', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/premade-layouts/',
					),
					array(
						'title' => esc_attr__( 'Importing And Exporting Divi Layouts', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/divi/library-import/',
					),
					array(
						'title' => esc_attr__( 'Divi For Developers', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/developers/',
					),
				);
				break;
			case 'bloom_plugin':
				$articles = array(
					array(
						'title' => esc_attr__( 'A Basic Overview Of The Bloom Plugin', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/overview/',
					),
					array(
						'title' => esc_attr__( 'How To Update Your Bloom Plugin', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/update/',
					),
					array(
						'title' => esc_attr__( 'Adding Email Accounts In Bloom', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/accounts/',
					),
					array(
						'title' => esc_attr__( 'Customizing Your Opt-in Designs', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/design/',
					),
					array(
						'title' => esc_attr__( 'The Different Bloom Opt-in Types', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/optin-types/',
					),
					array(
						'title' => esc_attr__( 'Using The Bloom Display Settings', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/display/',
					),
					array(
						'title' => esc_attr__( 'How To Use Triggers In Bloom', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/triggers/',
					),
					array(
						'title' => esc_attr__( 'Adding Custom Fields To Bloom Opt-in Forms', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/bloom/optin/adding-custom-fields-to-bloom-optin-forms/',
					),
				);
				break;
			case 'monarch_plugin':
				$articles = array(
					array(
						'title' => esc_attr__( 'A Complete Overview Of The Monarch Plugin', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/overview-monarch/',
					),
					array(
						'title' => esc_attr__( 'How To Update Your Monarch WordPress Plugin', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/update-monarch/',
					),
					array(
						'title' => esc_attr__( 'Adding and Managing Social Networks', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/networks/',
					),
					array(
						'title' => esc_attr__( 'Configuring Social Network APIs', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/api/',
					),
					array(
						'title' => esc_attr__( 'Customizing The Monarch Design', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/design-monarch/',
					),
					array(
						'title' => esc_attr__( 'Viewing Your Social Stats', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/stats/',
					),
					array(
						'title' => esc_attr__( 'Using The Floating Sidebar', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/sidebar/',
					),
					array(
						'title' => esc_attr__( 'Using Popup & Flyin Triggers', 'et-core' ),
						'url'   => 'https://www.elegantthemes.com/documentation/monarch/triggers-monarch/',
					),
				);
				break;
			default:
				$articles = array();
		}

		// If we just want the array (not a formatted HTML block), return that now
		if ( false === $formatted ) {
			return $articles;
		}

		foreach ( $articles as $key => $article ) {
			$articles_list_html .= sprintf(
				'<li class="et-support-center-article"><a href="%1$s" target="_blank">%2$s</a></li>',
				esc_url( $article['url'] ),
				et_core_intentionally_unescaped( $article['title'], 'fixed_string' )
			);
		}

		$html = sprintf(
			'<div class="et_docs_articles"><ul class="et_documentation_articles_list">%1$s</ul></div>',
			$articles_list_html
		);

		return $html;
	}

	/**
	 * Look for Elegant Themes Support Account
	 *
	 * @since 3.20
	 *
	 * @return WP_User|false WP_User object on success, false on failure.
	 */
	public function get_et_support_user() {
		return get_user_by( 'slug', $this->support_user_account_name );
	}

	/**
	 * Look for saved Elegant Themes Username & API Key
	 *
	 * @since 3.20
	 *
	 * @return array|false license credentials on success, false on failure.
	 */
	public function get_et_license() {

		/** @var array License credentials [username|api_key] */
		if ( ! $et_license = get_site_option( 'et_automatic_updates_options' ) ) {
			$et_license = get_option( 'et_automatic_updates_options', array() );
		}

		if ( ! et_()->array_get( $et_license, 'username' ) ) {
			return false;
		}

		if ( ! et_()->array_get( $et_license, 'api_key' ) ) {
			return false;
		}

		return $et_license;
	}

	/**
	 * Try to load the WP debug log. If found, return the last [$lines_to_return] lines of the file and the filesize.
	 *
	 * @since 3.20
	 *
	 * @param int $lines_to_return Number of lines to read and return from the end of the wp_debug.log file.
	 *
	 * @return array
	 */
	protected function get_wp_debug_log( $lines_to_return = 10 ) {
		$log = array(
			'entries' => '',
			'size'    => 0,
		);

		// Early exit: internal PHP function `file_get_contents()` appears to be on lockdown
		if ( ! function_exists( 'file_get_contents' ) ) {
			$log['error'] = esc_attr__( 'Divi Support Center :: WordPress debug log cannot be read.', 'et-core' );

			if ( defined( 'ET_DEBUG' ) ) {
				et_error( $log['error'] );
			}

			return $log;
		}

		// Early exit: WP_DEBUG_LOG isn't defined in wp-config.php (or it's defined, but it's empty)
		if ( ! defined( 'WP_DEBUG_LOG' ) || ! WP_DEBUG_LOG ) {
			$log['error'] = esc_attr__( 'Divi Support Center :: WordPress debug.log is not configured.', 'et-core' );

			if ( defined( 'ET_DEBUG' ) ) {
				et_error( $log['error'] );
			}

			return $log;
		}

		/**
		 * WordPress 5.1 introduces the option to define a custom path for the WP_DEBUG_LOG file.
		 *
		 * @see wp_debug_mode()
		 *
		 * @since 3.20
		 */
		if ( in_array( strtolower( (string) WP_DEBUG_LOG ), array( 'true', '1' ), true ) ) {
			$wp_debug_log_path = realpath( WP_CONTENT_DIR . '/debug.log' );
		} else if ( is_string( WP_DEBUG_LOG ) ) {
			$wp_debug_log_path = realpath( WP_DEBUG_LOG );
		}

		// Early exit: `debug.log` doesn't exist or otherwise can't be read
		if ( ! isset( $wp_debug_log_path ) || ! file_exists( $wp_debug_log_path ) || ! is_readable( $wp_debug_log_path ) ) {
			$log['error'] = esc_attr__( 'Divi Support Center :: WordPress debug log cannot be found.', 'et-core' );

			if ( defined( 'ET_DEBUG' ) ) {
				et_error( $log['error'] );
			}

			return $log;
		}

		/**
		 * At this point, we know:
		 * (1) `$wp_debug_log_path` is set,
		 * (2) it points to a valid location, and
		 * (3) what it points to is readable.
		 *
		 * Before we continue, we'll ensure `$wp_debug_log_path` does not point to a directory.
		 */

		// Early exit: debug log definition points to a directory, not a file.
		if ( is_dir( $wp_debug_log_path ) ) {
			$log['error'] = esc_attr__(
				'Divi Support Center :: WordPress debug log setting points to a directory, but should point to a file.',
				'et-core'
			);

			if ( defined( 'ET_DEBUG' ) ) {
				et_error( $log['error'] );
			}

			return $log;
		}

		// Load the debug.log file
		$file = new SplFileObject( $wp_debug_log_path );

		// Get the filesize of debug.log
		$log['size'] = $this->get_size_in_shorthand( 0 + $file->getSize() );

		// If $lines_to_return is a positive integer, fetch the last [$lines_to_return] lines of the log file
		$lines_to_return = (int) $lines_to_return;
		if ( $lines_to_return > 0 ) {
			$file->seek( PHP_INT_MAX );
			$total_lines = $file->key();
			// If the file is smaller than the number of lines requested, return the entire file.
			$reader         = new LimitIterator( $file, max( 0, $total_lines - $lines_to_return ) );
			$log['entries'] = '';
			foreach ( $reader as $line ) {
				$log['entries'] .= $line;
			}
		}
		// Unload the SplFileObject
		$file = null;

		return $log;
	}

	/**
	 * When a predefined system setting is passed to this function, it will return the observed value.
	 *
	 * @since 3.20
	 *
	 * @param bool $formatted Whether to return a formatted report or just the data array
	 * @param string $format Return the report as either a `div` or `plain` text (if $formatted = true)
	 *
	 * @return array|string
	 */
	protected function system_diagnostics_generate_report( $formatted = true, $format = 'plain' ) {
		/** @var array Collection of system settings to run diagnostic checks on. */
		global $wp_version;

		global $shortname;

		$divi_builder_plugin_active = et_is_builder_plugin_active();

		if ( $divi_builder_plugin_active ) {
			$options = get_option( 'et_pb_builder_options', array() );
		}

		if ( 'divi' === $shortname ) {
			$performance_options_url = get_admin_url() . 'admin.php?page=et_divi_options#general-2';
			$builder_options_url     = get_admin_url() . 'admin.php?page=et_divi_options#builder-2';
		} elseif ( 'extra' === $shortname ) {
			$performance_options_url = get_admin_url() . 'admin.php?page=et_extra_options#general-2';
			$builder_options_url     = get_admin_url() . 'admin.php?page=et_extra_options#builder-2';
		} else {
			$performance_options_url = get_admin_url() . 'admin.php?page=et_divi_options#tab_et_dashboard_tab_content_performance_main';
			$builder_options_url     = get_admin_url() . 'admin.php?page=et_divi_options#tab_et_dashboard_tab_content_advanced_main';
		}

		$system_diagnostics_settings = array(
			array(
				'name'           => esc_attr__( 'Writable wp-content Directory', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'minimum'        => null,
				'recommended'    => true,
				'actual'         => wp_is_writable( WP_CONTENT_DIR ),
				'help_text'      => et_core_intentionally_unescaped( __( 'We recommend that the wp-content directory on your server be writable by WordPress in order to ensure the full functionality of Divi Builder themes and plugins.', 'et-core' ), 'html' ),
				'learn_more'     => 'https://wordpress.org/support/article/changing-file-permissions/',
			),
			array(
				'name'           => esc_attr__( 'Writable et-cache Directory', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'minimum'        => null,
				'recommended'    => true,
				'actual'         => wp_is_writable( WP_CONTENT_DIR . '/et-cache' ),
				'help_text'      => et_core_intentionally_unescaped( __( 'We recommend that the et-cache directory on your server be writable by WordPress in order to ensure the full functionality of Divi Builder themes and plugins.', 'et-core' ), 'html' ),
				'learn_more'     => 'https://wordpress.org/support/article/changing-file-permissions/',
			),
			array(
				'name'           => esc_attr__( 'PHP: Version', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'version',
				'pass_minus_one' => false,
				'pass_zero'      => false,
				'minimum'        => null,
				'recommended'    => '7.4 or higher',
				'actual'         => (float) phpversion(),
				'help_text'      => et_core_intentionally_unescaped( __( 'We recommend using the latest stable version of PHP. This will not only ensure compatibility with Divi, but it will also greatly speed up your website leading to less memory and CPU related issues.', 'et-core' ), 'html' ),
				'learn_more'     => 'http://php.net/releases/',
			),
			array(
				'name'           => esc_attr__( 'WordPress Version', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'version',
				'pass_minus_one' => false,
				'pass_zero'      => false,
				'minimum'        => null,
				'recommended'    => '5.3 or higher',
				'actual'         => $wp_version,
				'help_text'      => et_core_intentionally_unescaped( __( 'We recommend using the latest stable version of WordPress. This will not only ensure compatibility with Divi, but it will also greatly speed up your website leading to less memory and CPU related issues.', 'et-core' ), 'html' ),
				'learn_more'     => 'https://wordpress.org/download/releases/',
			),
			array(
				'name'           => esc_attr__( 'PHP: memory_limit', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'size',
				'pass_minus_one' => true,
				'pass_zero'      => false,
				'minimum'        => null,
				'recommended'    => '128M',
				'actual'         => ini_get( 'memory_limit' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'By default, memory limits set by your host or by WordPress may be too low. This will lead to applications crashing as PHP reaches the artificial limit. You can adjust your memory limit within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance. You may also need to define a memory limited in <a href="%2$s" target=_blank">wp-config.php</a>.', 'et-core' ), 'http://php.net/manual/en/ini.core.php#ini.memory-limit', 'https://codex.wordpress.org/Editing_wp-config.php' ) ),
				'learn_more'     => 'http://php.net/manual/en/ini.core.php#ini.memory-limit',
			),
			array(
				'name'           => esc_attr__( 'PHP: post_max_size', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'size',
				'pass_minus_one' => false,
				'pass_zero'      => true,
				'minimum'        => null,
				'recommended'    => '64M',
				'actual'         => ini_get( 'post_max_size' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'Post Max Size limits how large a page or file can be on your website. If your page is larger than the limit set in PHP, it will fail to load. Post sizes can become quite large when using the Divi Builder, so it is important to increase this limit. It also affects file size upload/download, which can prevent large layouts from being imported into the builder. You can adjust your max post size within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et_core' ), 'http://php.net/manual/en/ini.core.php#ini.post-max-size' ) ),
				'learn_more'     => 'http://php.net/manual/en/ini.core.php#ini.post-max-size',
			),
			array(
				'name'           => esc_attr__( 'PHP: max_execution_time', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'seconds',
				'pass_minus_one' => false,
				'pass_zero'      => true,
				'minimum'        => null,
				'recommended'    => '120',
				'actual'         => ini_get( 'max_execution_time' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'Max Execution Time affects how long a page is allowed to load before it times out. If the limit is too low, you may not be able to import large layouts and files into the builder. You can adjust your max execution time within your <a href="%1$s">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/info.configuration.php#ini.max-execution-time' ) ),
				'learn_more'     => 'http://php.net/manual/en/info.configuration.php#ini.max-execution-time',
			),
			array(
				'name'           => esc_attr__( 'PHP: upload_max_filesize', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'size',
				'pass_minus_one' => false,
				'pass_zero'      => true,
				'minimum'        => null,
				'recommended'    => '64M',
				'actual'         => ini_get( 'upload_max_filesize' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'Upload Max File Size determines that maximum file size that you are allowed to upload to your server. If the limit is too low, you may not be able to import large collections of layouts into the Divi Library. You can adjust your max file size within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/ini.core.php#ini.upload-max-filesize' ) ),
				'learn_more'     => 'http://php.net/manual/en/ini.core.php#ini.upload-max-filesize',
			),
			array(
				'name'           => esc_attr__( 'PHP: max_input_time', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'seconds',
				'pass_minus_one' => true,
				'pass_zero'      => true,
				'minimum'        => null,
				'recommended'    => '60',
				'actual'         => ini_get( 'max_input_time' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This sets the maximum time in seconds a script is allowed to parse input data. If the limit is too low, the Divi Builder may time out before it is allowed to load. You can adjust your max input time within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/info.configuration.php#ini.max-input-time' ) ),
				'learn_more'     => 'http://php.net/manual/en/info.configuration.php#ini.max-input-time',
			),
			array(
				'name'           => esc_attr__( 'PHP: max_input_vars', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'size',
				'pass_minus_one' => false,
				'pass_zero'      => false,
				'minimum'        => null,
				'recommended'    => '1000',
				'actual'         => ini_get( 'max_input_vars' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This setting affects how many input variables may be accepted. If the limit is too low, it may prevent the Divi Builder from loading. You can adjust your max input variables within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/info.configuration.php#ini.max-input-vars' ) ),
				'learn_more'     => 'http://php.net/manual/en/info.configuration.php#ini.max-input-vars',
			),
			array(
				'name'           => esc_attr__( 'PHP: display_errors', 'et-core' ),
				'environment'    => 'server',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'pass_exact'     => null,
				'minimum'        => null,
				'recommended'    => '0',
				'actual'         => ! ini_get( 'display_errors' ) ? '0' : ini_get( 'display_errors' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This setting determines whether or not errors should be printed as part of the page output. This is a feature to support your site\'s development and should never be used on production sites. You can edit this setting within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors' ) ),
				'learn_more'     => 'http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors',
			),
			array(
				'name'           => esc_attr__( 'Dynamic CSS', 'et-core' ),
				'environment'    => 'performance',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'pass_exact'     => null,
				'minimum'        => null,
				'recommended'    => 'on',
				'actual'         => $divi_builder_plugin_active ? ( isset( $options['performance_main_dynamic_css'] ) ? $options['performance_main_dynamic_css'] : 'on' ) : et_get_option( $shortname . '_dynamic_css', 'on' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This is a very important performance setting that should be turned on. Dynamic CSS greatly reduces your website\'s CSS size, speeds up page load times and improves Google PageSpeed scores. You can turn this setting on in the <a href="%1$s" target="_blank">Theme Options</a>.', 'et-core' ), $performance_options_url ) ),
				'learn_more'     => $performance_options_url,
			),
			array(
				'name'           => esc_attr__( 'Dynamic Framework', 'et-core' ),
				'environment'    => 'performance',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'pass_exact'     => null,
				'minimum'        => null,
				'recommended'    => 'on',
				'actual'         => $divi_builder_plugin_active ? ( isset( $options['performance_main_dynamic_module_framework'] ) ? $options['performance_main_dynamic_module_framework'] : 'on' ) : et_get_option( $shortname . '_dynamic_module_framework', 'on' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This is a very important performance setting that should be turned on. The Dynamic Framework removes bloat from the back-end. This greatly reduces CPU and Memory usage and improves website speed. You can turn this setting on in the <a href="%1$s" target="_blank">Theme Options</a>.', 'et-core' ), $performance_options_url ) ),
				'learn_more'     => $performance_options_url,
			),
			array(
				'name'           => esc_attr__( 'Dynamic JavaScript', 'et-core' ),
				'environment'    => 'performance',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'pass_exact'     => null,
				'minimum'        => null,
				'recommended'    => 'on',
				'actual'         => $divi_builder_plugin_active ? ( isset( $options['performance_main_dynamic_css'] ) ? $options['performance_main_dynamic_css'] : 'on' ) : et_get_option( $shortname . '_dynamic_js_libraries', 'on' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This is a very important performance setting that should be turned on. Dynamic JavaScript removes unused scripts and improves website speed by loading JavaScript files only when they are needed. You can turn this setting on in the <a href="%1$s" target="_blank">Theme Options</a>.', 'et-core' ), $performance_options_url ) ),
				'learn_more'     => $performance_options_url,
			),
			array(
				'name'           => esc_attr__( 'Critical CSS', 'et-core' ),
				'environment'    => 'performance',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'pass_exact'     => null,
				'minimum'        => null,
				'recommended'    => 'on',
				'actual'         => $divi_builder_plugin_active ? ( isset( $options['performance_main_critical_css'] ) ? $options['performance_main_dynamic_css'] : 'on' ) : et_get_option( $shortname . '_critical_css', 'on' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This is a very important performance setting that should be turned on. Critical CSS greatly improves website loading speeds by deferring "below the fold" styles and removing render blocking requests for critical styles. You can turn this setting on in the <a href="%1$s" target="_blank">Theme Options</a>.', 'et-core' ), $performance_options_url ) ),
				'learn_more'     => $performance_options_url,
			),
			array(
				'name'           => esc_attr__( 'Static CSS', 'et-core' ),
				'environment'    => 'performance',
				'type'           => 'truthy_falsy',
				'pass_minus_one' => null,
				'pass_zero'      => null,
				'pass_exact'     => null,
				'minimum'        => null,
				'recommended'    => 'on',
				'actual'         => et_get_option( 'et_pb_static_css_file', 'on' ),
				'help_text'      => et_get_safe_localization( sprintf( __( 'This is a very important performance setting that should be turned on, even if you are using a caching plugin. Static CSS caches the builder CSS for each page so that it doesn\'t need to be processed on every page load. Even if you are using a caching plugin, this setting should still be turned on so that dynamic pages benefit. You can turn this setting on in the <a href="%1$s" target="_blank">Theme Options</a>.', 'et-core' ), $builder_options_url ) ),
				'learn_more'     => $builder_options_url,
			),
		);

		/** @var string Formatted report. */
		$report = '';

		// pass/fail Should be one of pass|minimal|fail|unknown. Defaults to 'unknown'.
		foreach ( $system_diagnostics_settings as $i => $scan ) {
			/**
			 * 'pass_fail': four-step process to set its value:
			 * - begin with `unknown` state;
			 * - if recommended value exists, change to `fail`;
			 * - if minimum value exists, compare against it & change to `minimal` if it passes;
			 * - compare against recommended value & change to `pass` if it passes.
			 */
			$system_diagnostics_settings[ $i ]['pass_fail'] = 'unknown';
			if ( ! is_null( $scan['recommended'] ) ) {
				$system_diagnostics_settings[ $i ]['pass_fail'] = 'fail';
			}

			if ( ! is_null( $scan['minimum'] ) && $this->value_is_at_least( $scan['minimum'], $scan['actual'], $scan['type'] ) ) {
				$system_diagnostics_settings[ $i ]['pass_fail'] = 'minimal';
			}

			if ( empty( $scan['pass_exact'] ) && ! is_null( $scan['recommended'] ) && $this->value_is_at_least( $scan['recommended'], $scan['actual'], $scan['type'] ) ) {
				$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
			}

			if ( $scan['pass_minus_one'] && -1 === (int) $scan['actual'] ) {
				$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
			}

			if ( $scan['pass_zero'] && 0 === (int) $scan['actual'] ) {
				$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
			}

			if ( ! empty( $scan['pass_exact'] ) && $scan['recommended'] === $scan['actual'] ) {
				$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
			}

			/**
			 * Build messaging for minimum required values
			 */
			$message_minimum = '';
			if ( ! is_null( $scan['minimum'] ) && 'fail' === $system_diagnostics_settings[ $i ]['pass_fail'] ) {
				$message_minimum = sprintf(
					esc_html__( 'This fails to meet our minimum required value of %1$s. ', 'et-core' ),
					esc_html( is_bool( $scan['minimum'] ) ? $this->boolean_label[ $scan['minimum'] ] : $scan['minimum'] )
				);
			}
			if ( ! is_null( $scan['minimum'] ) && 'minimal' === $system_diagnostics_settings[ $i ]['pass_fail'] ) {
				$message_minimum = sprintf(
					esc_html__( 'This meets our minimum required value of %1$s. ', 'et-core' ),
					esc_html( is_bool( $scan['minimum'] ) ? $this->boolean_label[ $scan['minimum'] ] : $scan['minimum'] )
				);
			}

			/**
			 * Build description messaging for results & recommendation
			 */
			$learn_more_link = '';
			if ( ! is_null( $scan['learn_more'] ) ) {
				$learn_more_link = sprintf( ' <a href="%1$s" target="_blank">%2$s</a>',
					esc_url( $scan['learn_more'] ),
					esc_html__( 'server' === $scan['environment'] ? 'Learn More.' : 'Enable Option.', 'et-core' )
				);
			}

			switch ( $system_diagnostics_settings[ $i ]['pass_fail'] ) {
				case 'pass':
					$system_diagnostics_settings[ $i ]['description'] = sprintf(
						'- %1$s %2$s',
						sprintf(
							esc_html__( 'performance' === $scan['environment'] ? 'Perfect! We recommend enabling this option.' : 'Congratulations! This meets or exceeds our recommendation of %1$s.', 'et-core' ),
							esc_html( is_bool( $scan['recommended'] ) ? $this->boolean_label[ $scan['recommended'] ] : $scan['recommended'] )
						),
						et_core_intentionally_unescaped( $learn_more_link, 'html' )
					);
					break;
				case 'minimal':
				case 'fail':
					$system_diagnostics_settings[ $i ]['description'] = sprintf(
						'- %1$s%2$s %3$s',
						esc_html( $message_minimum ),
						sprintf(
							esc_html__( 'performance' === $scan['environment'] ? 'Enable for optimal performance.' : 'We recommend %1$s for the best experience.', 'et-core' ),
							esc_html( is_bool( $scan['recommended'] ) ? $this->boolean_label[ $scan['recommended'] ] : $scan['recommended'] )
						),
						et_core_intentionally_unescaped( $learn_more_link, 'html' )
					);
					break;
				case 'unknown':
				default:
					$system_diagnostics_settings[ $i ]['description'] = sprintf(
						esc_html__( '- We are unable to determine your setting. %1$s', 'et-core' ),
						et_core_intentionally_unescaped( $learn_more_link, 'html' )
					);
			}
		}

		// If we just want the array (not a formatted HTML block), return that now
		if ( false === $formatted ) {
			return $system_diagnostics_settings;
		}

		foreach ( $system_diagnostics_settings as $item ) {
			// Add reported setting to plaintext report:
			if ( 'plain' === $format ) {
				switch ( $item['pass_fail'] ) {
					case 'pass':
						$status = '  ';
						break;
					case 'minimal':
						$status = '~ ';
						break;
					case 'fail':
						$status = "! ";
						break;
					case 'unknown':
					default:
						$status = '? ';
				}

				$report .= $status . $item['name'] . PHP_EOL
						   . '  ' . $item['actual'] . PHP_EOL . PHP_EOL;
			}

			// Add reported setting to table:
			if ( 'div' === $format ) {
				$help_text = '';
				if ( ! is_null( $item['help_text'] ) ) {
					$help_text = $item['help_text'];
				}

				$report .= sprintf( '<div class="et-epanel-box et_system_status_row et_system_status_%1$s">
				<div class="et-box-title setting">
				    <h3>%2$s</h3>
				    <div class="et-box-descr"><p>%3$s</p></div>
				</div>
				<div class="et-box-content results">
				    <span class="actual">%4$s</span>
				    <span class="description">%5$s</span>
				</div>
				<span class="et-box-description"></span>
				</div>',
					esc_attr( $item['pass_fail'] ),
					esc_html( $item['name'] ),
					et_core_intentionally_unescaped( $help_text, 'html' ),
					esc_html( is_bool( $item['actual'] ) ? $this->boolean_label[ $item['actual'] ] : $item['actual'] ),
					et_core_intentionally_unescaped( $item['description'], 'html' )
				);
			}

		}

		// Prepend title and timestamp
		if ( 'plain' === $format ) {
			$report = '## ' . esc_html__( 'System Status', 'et-core' ) . ' ##' . PHP_EOL
					  . ':: ' . date( 'Y-m-d @ H:i:s e' ) . PHP_EOL . PHP_EOL
					  . $report;
		}
		if ( 'div' === $format ) {
			$report = sprintf( '<div class="%3$s-report">%1$s</div><p class="%3$s-congratulations">%2$s</p>',
				$report,
				esc_html__( 'Congratulations, all system checks have passed. Your hosting configuration is compatible with Divi.', 'et-core' ),
				'et-system-status'
			);
		}

		return $report;
	}

	/**
	 * Convert size string with "shorthand byte" notation to raw byte value for comparisons.
	 *
	 * @since 3.20
	 *
	 * @param string $size
	 *
	 * @return int size in bytes
	 */
	protected function get_size_in_bytes( $size = '' ) {
		// Capture the denomination and convert to uppercase, then do math to it
		switch ( strtoupper( substr( $size, -1 ) ) ) {
			// Terabytes
			case 'T':
				return (int) $size * 1099511627776;
			// Gigabytes
			case 'G':
				return (int) $size * 1073741824;
			// Megabytes
			case 'M':
				return (int) $size * 1048576;
			// Kilobytes
			case 'K':
				return (int) $size * 1024;
			default:
				return (int) $size;
		}
	}

	/**
	 * Convert size string with "shorthand byte" notation to raw byte value for comparisons.
	 *
	 * @since 3.20
	 *
	 * @param int $bytes
	 * @param int $precision
	 *
	 * @return string size in "shorthand byte" notation
	 */
	protected function get_size_in_shorthand( $bytes = 0, $precision = 2 ) {
		$units = array( ' bytes', 'KB', 'MB', 'GB', 'TB' );
		$i     = 0;

		while ( $bytes > 1024 ) {
			$bytes /= 1024;
			$i++;
		}

		return round( $bytes, $precision ) . $units[ $i ];
	}

	/**
	 * Size comparisons between two values using a variety of calculation methods.
	 *
	 * @since 3.20.2
	 *
	 * @param string|int|float $a Our value to compare against
	 * @param string|int|float $b Server value being compared
	 * @param string $type Comparison type
	 *
	 * @return bool Whether the second value is equal to or greater than the first
	 */
	protected function value_is_at_least( $a, $b, $type = 'size' ) {
		switch ( $type ) {
			case 'truthy_falsy':
				return $this->value_is_falsy( $a ) === $this->value_is_falsy( $b );
			case 'version':
				return (float) $a <= (float) $b;
			case 'seconds':
				return (int) $a <= (int) $b;
			case 'size':
			default:
				return $this->get_size_in_bytes( $a ) <= $this->get_size_in_bytes( $b );
		}
	}

	/**
	 * Check value against a collection of "falsy" values
	 *
	 * @since 3.23
	 *
	 * @param string|int|float $a Value to compare against
	 *
	 * @return bool Whether the second value is equal to or greater than the first
	 */
	protected function value_is_falsy( $a ) {
		// Accept falsy strings regardless of case (e.g. 'off', 'Off', 'OFF', 'oFf')
		if ( is_string( $a ) ) {
			$a = strtolower( $a );
		}

		return in_array( $a, array( false, 'false', 0, '0', 'off' ), true );
	}

	/**
	 * SUPPORT CENTER :: REMOTE ACCESS
	 */

	/**
	 * Add Support Center options to the Role Editor screen
	 *
	 * @see ET_Core_SupportCenter::current_user_can()
	 *
	 * @since 3.20
	 *
	 * @param $all_role_options
	 *
	 * @return array
	 */
	public function support_user_add_role_options( $all_role_options ) {
		// get all the roles that can edit theme options.
		$applicability_roles = et_core_get_roles_by_capabilities( [ 'edit_theme_options' ] );

		$all_role_options['support_center'] = array(
			'section_title' => esc_attr__( 'Support Center', 'et-core' ),
			'applicability' => $applicability_roles,
			'options'       => array(
				'et_support_center'               => array(
					'name' => esc_attr__( 'Divi Support Center Page', 'et-core' ),
				),
				'et_support_center_system'        => array(
					'name' => esc_attr__( 'System Status', 'et-core' ),
				),
				'et_support_center_remote_access' => array(
					'name' => esc_attr__( 'Remote Access', 'et-core' ),
				),
				'et_support_center_documentation' => array(
					'name' => esc_attr__( 'Divi Documentation &amp; Help', 'et-core' ),
				),
				'et_support_center_safe_mode'     => array(
					'name' => esc_attr__( 'Safe Mode', 'et-core' ),
				),
				'et_support_center_logs'          => array(
					'name' => esc_attr__( 'Logs', 'et-core' ),
				),
			),
		);

		return $all_role_options;
	}

	/**
	 * Add third party capabilities to Remote Access roles
	 *
	 * @return array Capabilities to add to the Remote Access user roles.
	 */
	public function support_user_extra_caps_standard( $extra_capabilities = array() ) {
		// The Events Calendar (if active on the site)
		if ( class_exists( 'Tribe__Events__Main' ) ) {
			$the_events_calendar = array(
				// Events
				'edit_tribe_event'                  => 1,
				'read_tribe_event'                  => 1,
				'delete_tribe_event'                => 1,
				'delete_tribe_events'               => 1,
				'edit_tribe_events'                 => 1,
				'edit_others_tribe_events'          => 1,
				'delete_others_tribe_events'        => 1,
				'publish_tribe_events'              => 1,
				'edit_published_tribe_events'       => 1,
				'delete_published_tribe_events'     => 1,
				'delete_private_tribe_events'       => 1,
				'edit_private_tribe_events'         => 1,
				'read_private_tribe_events'         => 1,
				// Venues
				'edit_tribe_venue'                  => 1,
				'read_tribe_venue'                  => 1,
				'delete_tribe_venue'                => 1,
				'delete_tribe_venues'               => 1,
				'edit_tribe_venues'                 => 1,
				'edit_others_tribe_venues'          => 1,
				'delete_others_tribe_venues'        => 1,
				'publish_tribe_venues'              => 1,
				'edit_published_tribe_venues'       => 1,
				'delete_published_tribe_venues'     => 1,
				'delete_private_tribe_venues'       => 1,
				'edit_private_tribe_venues'         => 1,
				'read_private_tribe_venues'         => 1,
				// Organizers
				'edit_tribe_organizer'              => 1,
				'read_tribe_organizer'              => 1,
				'delete_tribe_organizer'            => 1,
				'delete_tribe_organizers'           => 1,
				'edit_tribe_organizers'             => 1,
				'edit_others_tribe_organizers'      => 1,
				'delete_others_tribe_organizers'    => 1,
				'publish_tribe_organizers'          => 1,
				'edit_published_tribe_organizers'   => 1,
				'delete_published_tribe_organizers' => 1,
				'delete_private_tribe_organizers'   => 1,
				'edit_private_tribe_organizers'     => 1,
				'read_private_tribe_organizers'     => 1,
			);

			$extra_capabilities = array_merge( $extra_capabilities, $the_events_calendar );
		}

		return $extra_capabilities;
	}

	/**
	 * Add third party capabilities to the *Elevated* Remote Access role only
	 *
	 * @return array Capabilities to add to the Elevated Remote Access user role.
	 */
	public function support_user_extra_caps_elevated() {
		$extra_capabilities = array();

		return $extra_capabilities;
	}

	/**
	 * Create the Divi Support user (if it doesn't already exist)
	 *
	 * @since 3.20
	 *
	 * @return void|WP_Error
	 */
	public function support_user_maybe_create_user() {
		if ( username_exists( $this->support_user_account_name ) ) {
			return;
		}

		// Define user role that will be used to control ET Support User permissions.
		$this->support_user_create_role();

		$token = $this->support_user_generate_token();

		$password = $this->support_user_generate_password( $token );

		if ( is_wp_error( $password ) ) {
			return $password;
		}

		$user_id = wp_insert_user( array(
			'user_login'   => $this->support_user_account_name,
			'user_pass'    => $password,
			'first_name'   => 'Elegant Themes',
			'last_name'    => 'Support',
			'display_name' => 'Elegant Themes Support',
			'role'         => 'et_support',
			'locale'       => 'en_US',
		) );

		if ( is_wp_error( $user_id ) ) {
			return $user_id;
		}

		$account_settings = array(
			'date_created' => time(),
			'token'        => $token,
		);

		update_option( $this->support_user_options_name, $account_settings );

		// update options variable
		$this->support_user_get_options();

		$this->support_user_init_cron_delete_account();
	}

	/**
	 * Define Standard role for the Divi Support user
	 *
	 * @since ?? Removed definition for the Divi Support 'elevated' role
	 * @since 3.22 Added filters to extend the list of capabilities for the ET Support User
	 * @since 3.20
	 */
	public function support_user_create_role() {
		// Make sure old version of this role does not exist.
		$this->support_user_remove_role();

		// Divi Support :: Standard
		$standard_capabilities = array(
			'assign_product_terms'               => true,
			'delete_pages'                       => true,
			'delete_posts'                       => true,
			'delete_private_pages'               => true,
			'delete_private_posts'               => true,
			'delete_private_products'            => true,
			'delete_product'                     => true,
			'delete_product_terms'               => true,
			'delete_products'                    => true,
			'delete_published_pages'             => true,
			'delete_published_posts'             => true,
			'delete_published_products'          => true,
			'edit_dashboard'                     => true,
			'edit_files'                         => true,
			'edit_others_pages'                  => true,
			'edit_others_posts'                  => true,
			'edit_others_products'               => true,
			'edit_pages'                         => true,
			'edit_posts'                         => true,
			'edit_private_pages'                 => true,
			'edit_private_posts'                 => true,
			'edit_private_products'              => true,
			'edit_product'                       => true,
			'edit_product_terms'                 => true,
			'edit_products'                      => true,
			'edit_published_pages'               => true,
			'edit_published_posts'               => true,
			'edit_published_products'            => true,
			'edit_theme_options'                 => true,
			'list_users'                         => true,
			'manage_categories'                  => true,
			'manage_links'                       => true,
			'manage_options'                     => true,
			'manage_product_terms'               => true,
			'moderate_comments'                  => true,
			'publish_pages'                      => true,
			'publish_posts'                      => true,
			'publish_products'                   => true,
			'read'                               => true,
			'read_private_pages'                 => true,
			'read_private_posts'                 => true,
			'read_private_products'              => true,
			'read_product'                       => true,
			'unfiltered_html'                    => true,
			'upload_files'                       => true,
			// Divi
			'ab_testing'                         => true,
			'add_library'                        => true,
			'disable_module'                     => true,
			'divi_builder_control'               => true,
			'divi_ai'                            => true,
			'divi_library'                       => true,
			'edit_borders'                       => true,
			'edit_buttons'                       => true,
			'edit_colors'                        => true,
			'edit_configuration'                 => true,
			'edit_content'                       => true,
			'edit_global_library'                => true,
			'edit_layout'                        => true,
			'export'                             => true,
			'lock_module'                        => true,
			'page_options'                       => true,
			'portability'                        => true,
			'read_dynamic_content_custom_fields' => true,
			'save_library'                       => true,
			'use_visual_builder'                 => true,
			'theme_builder'                      => true,
			// WooCommerce Capabilities
			'manage_woocommerce'                 => true,
		);

		// Filters to allow other code to extend the list of capabilities
		$additional_standard = apply_filters( 'add_et_support_standard_capabilities', array() );

		// Apply filter capabilities to our definitions
		$standard_capabilities = array_merge( $additional_standard, $standard_capabilities );

		// Create the standard ET Support role
		add_role( 'et_support', 'ET Support', $standard_capabilities );
		$et_support_role = get_role( 'et_support' );
		foreach ( $standard_capabilities as $cap ) {
			$et_support_role->add_cap( $cap );
		}
	}

	/**
	 * Remove our Standard Support role
	 *
	 * @since ?? No longer attempt to remove the defunct Divi Support 'elevated' role
	 * @since 3.20
	 */
	public function support_user_remove_role() {
		// Divi Support :: Standard
		remove_role( 'et_support' );
	}

	/**
	 * Set the ET Support User's role
	 *
	 * @since ?? Removed the 'et_support_elevated' role; using 'administrator' instead
	 * @since 3.20
	 *
	 * @param string $role
	 */
	public function support_user_set_role( $role = '' ) {
		// Get the Divi Support User object
		$support_user = new WP_User( $this->support_user_account_name );

		// Set the new Role
		switch ( $role ) {
			case 'et_support':
				$support_user->set_role( 'et_support' );
				break;
			case 'administrator':
				$support_user->set_role( 'administrator' );
				break;
			case '':
			default:
				$support_user->set_role( '' );
		}
	}

	/**
	 * Ensure the `unfiltered_html` capability is added to the ET Support roles in Multisite
	 *
	 * @since 3.22
	 *
	 * @param array $caps An array of capabilities.
	 * @param string $cap The capability being requested.
	 * @param int $user_id The current user's ID.
	 *
	 * @return array Modified array of user capabilities.
	 */
	function support_user_map_meta_cap( $caps, $cap, $user_id ) {

		if ( ! $this->is_support_user( $user_id ) ) {
			return $caps;
		}

		// This user is in an ET Support user role, so add the capability
		if ( 'unfiltered_html' === $cap ) {
			$caps = array( 'unfiltered_html' );
		}

		return $caps;
	}

	/**
	 * Remove KSES filters on ET Support User's content
	 *
	 * @since 3.22
	 */
	function support_user_kses_remove_filters() {
		if ( $this->is_support_user() ) {
			kses_remove_filters();
		}
	}

	/**
	 * Clear "Delete Account" cron hook
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function support_user_clear_delete_cron() {
		wp_clear_scheduled_hook( $this->support_user_cron_name );
	}

	/**
	 * Delete the support account if it's expired or the expiration date is not set
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function support_user_cron_maybe_delete_account() {
		if ( ! username_exists( $this->support_user_account_name ) ) {
			return;
		}

		if ( isset( $this->support_user_options['date_created'] ) ) {
			$this->support_user_maybe_delete_expired_account();
		} else {
			// if the expiration date isn't set, delete the account anyway
			$this->support_user_delete_account();
		}
	}

	/**
	 * Schedule account removal check
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function support_user_init_cron_delete_account() {
		$this->support_user_clear_delete_cron();

		wp_schedule_event( time(), 'hourly', $this->support_user_cron_name );
	}

	/**
	 * Get plugin options
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function support_user_get_options() {
		$this->support_user_options = get_option( $this->support_user_options_name );
	}

	/**
	 * Generate random token
	 *
	 * @since 3.20
	 *
	 * @param integer $length Token Length
	 * @param bool $include_symbols Whether to include special characters (or just stick to alphanumeric)
	 *
	 * @return string  $token           Generated token
	 */
	public function support_user_generate_token( $length = 17, $include_symbols = true ) {
		$alphanum = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
		$symbols  = '!@$^*()-=+';
		$token    = substr( str_shuffle( $include_symbols ? $alphanum . $symbols : $alphanum ), 0, $length );

		return $token;
	}

	/**
	 * Generate password from token
	 *
	 * @since 3.20
	 *
	 * @param string $token Token
	 *
	 * @return string|WP_Error Generated password if successful, WP Error object otherwise
	 */
	public function support_user_generate_password( $token ) {
		global $wp_version;

		$salt = '';

		/** @see ET_Core_SupportCenter::maybe_set_site_id() */
		$site_id = get_option( 'et_support_site_id' );

		if ( empty( $site_id ) ) {
			return false;
		}

		// Site ID must be a string
		if ( ! is_string( $site_id ) ) {
			return false;
		}

		$et_license = $this->get_et_license();

		if ( ! $et_license ) {
			return false;
		}

		$send_to_api = array(
			'action'    => 'get_salt',
			'site_id'   => esc_attr( $site_id ),
			'username'  => esc_attr( $et_license['username'] ),
			'api_key'   => esc_attr( $et_license['api_key'] ),
			'site_url'  => esc_url( home_url( '/' ) ),
			'login_url' => 'https://www.elegantthemes.com/members-area/admin/token/'
						   . '?url=' . urlencode( wp_login_url() )
						   . '&token=' . urlencode( $token . '|' . $site_id ),
		);

		$support_user_options = array(
			'timeout'    => 30,
			'body'       => $send_to_api,
			'user-agent' => 'WordPress/' . $wp_version . '; Support Center/' . ET_CORE_VERSION . '; ' . home_url( '/' ),
		);

		$request = wp_remote_post(
			'https://www.elegantthemes.com/api/token.php',
			$support_user_options
		);

		// Early exit if we don't get a good HTTP response from the API server
		if ( 200 !== intval( wp_remote_retrieve_response_code( $request ) ) ) {
			return new WP_Error(
				'et_remote_access',
				esc_html__(
					'Elegant Themes API Error: HTTP error in API response',
					'et-core'
				)
			);
		}

		// Early exit and pass along WP_Error report if the server response is an error
		if ( is_wp_error( $request ) ) {
			return new WP_Error(
				'et_remote_access',
				esc_html__(
					'Elegant Themes API Error: WordPress Error in API response',
					'et-core'
				)
			);
		}

		// Otherwise the response is good - let's load it and continue
		$response = unserialize( wp_remote_retrieve_body( $request ) );

		// If the API returns an error, we will return and log the accompanying message
		$response_is_error          = array_key_exists( 'error', $response );
		$response_has_error_message = array_key_exists( 'message', $response );

		if ( $response_is_error && $response_has_error_message ) {
			return new WP_Error(
				'et_remote_access',
				esc_html__(
					'Elegant Themes API Error: ' . $response['message'],
					'et-core'
				)
			);
		}

		// If we get an "Incorrect Token" response, delete the generated Site ID from database
		$response_is_token_error = array_key_exists( 'incorrect_token', $response );

		if ( $response_is_token_error && ! empty( $response['incorrect_token'] ) ) {
			delete_option( 'et_support_site_id' );

			return new WP_Error(
				'et_remote_access',
				esc_html__(
					'Elegant Themes API Error: Incorrect Token. Please, try again.',
					'et-core'
				)
			);
		}

		// If we get a normal-looking response, but it doesn't contain the salt we need
		if ( empty( $response['salt'] ) ) {
			return new WP_Error(
				'et_remote_access',
				esc_html__(
					'Elegant Themes API Error: The API response was missing required data.',
					'et-core'
				)
			);
		}

		// We have the salt; let's clean it and make sure we can use it
		$salt = sanitize_text_field( $response['salt'] );

		if ( empty( $salt ) ) {
			return new WP_Error(
				'et_remote_access',
				esc_html__(
					'Elegant Themes API Error: The API responded, but the response was empty.',
					'et-core'
				)
			);
		}

		// Generate the password using the token we were initially passed & the salt from the API
		$password = hash( 'sha256', $token . $salt );

		return $password;
	}

	/**
	 * Delete the account if it's expired
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function support_user_maybe_delete_expired_account() {
		if ( empty( $this->support_user_options['date_created'] ) ) {
			return;
		}

		$expiration_date_unix = strtotime( $this->support_user_expiration_time, $this->support_user_options['date_created'] );

		// Delete the user account if the expiration date is in the past
		if ( time() >= $expiration_date_unix ) {
			$this->support_user_delete_account();
		}

		return;
	}

	/**
	 * Delete support account and the plugin options ( token, expiration date )
	 *
	 * @since 3.20
	 *
	 * @return string | WP_Error  Confirmation message on success, WP_Error on failure
	 */
	public function support_user_delete_account() {
		if ( defined( 'DOING_CRON' ) ) {
			require_once( ABSPATH . 'wp-admin/includes/user.php' );
		}

		if ( ! username_exists( $this->support_user_account_name ) ) {
			return new WP_Error( 'get_user_data', esc_html__( 'Support account doesn\'t exist.', 'et-core' ) );
		}

		$support_account_data = get_user_by( 'login', $this->support_user_account_name );

		if ( $support_account_data ) {
			$support_account_id = $support_account_data->ID;

			if (
				( is_multisite() && ! wpmu_delete_user( $support_account_id ) )
				|| ( ! is_multisite() && ! wp_delete_user( $support_account_id ) )
			) {
				return new WP_Error( 'delete_user', esc_html__( 'Support account hasn\'t been removed. Try to regenerate token again.', 'et-core' ) );
			}

			delete_option( $this->support_user_options_name );
		} else {
			return new WP_Error( 'get_user_data', esc_html__( 'Cannot get the support account data. Try to regenerate token again.', 'et-core' ) );
		}

		$this->support_user_remove_role();

		$this->support_user_remove_site_id();

		$this->support_user_clear_delete_cron();

		// update options variable
		$this->support_user_get_options();

		new WP_Error( 'get_user_data', esc_html__( 'Token has been deleted successfully.', 'et-core' ) );

		return esc_html__( 'Token has been deleted successfully. ', 'et-core' );
	}

	/**
	 * Maybe delete support account and the plugin options when switching themes
	 *
	 * If a theme change is one of:
	 * - [Divi/Extra] > [Divi/Extra] child theme
	 * - [Divi/Extra] child theme > [Divi/Extra] child theme
	 * - [Divi/Extra] child theme > [Divi/Extra]
	 * ...then we won't change the state of the Remote Access toggle.
	 *
	 * @since 3.23
	 *
	 * @return string | WP_Error  Confirmation message on success, WP_Error on failure
	 */
	public function maybe_deactivate_on_theme_switch() {
		// Don't do anything if the user isn't logged in
		if ( ! is_user_logged_in() ) {
			return;
		}

		// Don't do anything if the parent theme's name matches the parent of this Support Center instance
		if ( get_option( 'template' ) === $this->parent_nicename ) {
			return;
		}

		// Leaving Divi/Extra environment; deactivate Support Center
		$this->support_user_delete_account();
		$this->unlist_support_center();
		$this->support_center_capabilities_teardown();
	}

	/**
	 * Is this user the ET Support User?
	 *
	 * @since 3.22
	 *
	 * @param int|null $user_id Pass a User ID to check. We'll get the current user's ID otherwise.
	 *
	 * @return bool Returns whether this user is the ET Support User.
	 */
	function is_support_user( $user_id = null ) {
		$user_id = $user_id ? (int) $user_id : get_current_user_id();

		if ( ! $user_id ) {
			return false;
		}

		$user = get_userdata( $user_id );

		if ( ! is_object( $user ) || ! property_exists( $user, 'roles' ) ) {
			return false;
		}

		$is_et_support_username = $this->support_user_account_name === $user->user_login;

		// First, check the username, if it's not a match, then this is not the ET Support User.
		if ( ! $is_et_support_username ) {
			return false;
		}

		// Gather this user's associated role(s).
		$user_roles             = (array) $user->roles;
		$is_et_support          = in_array( 'et_support', $user_roles, true );
		$is_et_support_elevated = in_array( 'administrator', $user_roles, true ) && $is_et_support_username;

		// Determine whether this user is the ET Support User.
		if ( $is_et_support || $is_et_support_elevated ) {
			return true;
		}

		return false;
	}

	/**
	 * Delete support account and the plugin options ( token, expiration date )
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function unlist_support_center() {
		delete_option( 'et_support_center_installed' );
	}

	/**
	 *
	 */
	public function support_user_remove_site_id() {
		$site_id = get_option( 'et_support_site_id' );

		if ( empty( $site_id ) ) {
			return;
		}

		// Site ID must be a string
		if ( ! is_string( $site_id ) ) {
			return;
		}

		$et_license = $this->get_et_license();

		if ( ! $et_license ) {
			return;
		}

		$send_to_api = array(
			'action'   => 'remove_site_id',
			'site_id'  => esc_attr( $site_id ),
			'username' => esc_attr( $et_license['username'] ),
			'api_key'  => esc_attr( $et_license['api_key'] ),
			'site_url' => esc_url( home_url( '/' ) ),
		);

		$settings = array(
			'timeout' => 30,
			'body'    => $send_to_api,
		);

		$request = wp_remote_post( 'https://www.elegantthemes.com/api/token.php', $settings );
	}

	function support_user_update_via_ajax() {
		// Verify nonce.
		et_core_security_check( 'manage_options', 'support_center', 'nonce' );

		// If the user is an ET Support User, kill the request.
		if ( $this->is_support_user() ) {
			wp_die();
		}

		// Get POST data
		$support_update = sanitize_text_field( $_POST['support_update'] );

		$response = array();

		// Update option(s)
		if ( 'activate' === $support_update ) {
			$maybe_create_user = $this->support_user_maybe_create_user();
			// Only activate if we have a User ID and Password
			if ( ! is_wp_error( $maybe_create_user ) ) {
				$this->support_user_set_role( 'et_support' );
				$account_settings   = get_option( $this->support_user_options_name );
				$site_id            = get_option( 'et_support_site_id' );
				$response['expiry'] = strtotime(
					date(
						'Y-m-d H:i:s ',
						$this->support_user_options['date_created']
					) . $this->support_user_expiration_time
				);
				$response['token']  = '';
				if ( ! empty( $site_id ) && is_string( $site_id ) ) {
					$account_setting_token = isset( $account_settings['token'] ) ? $account_settings['token'] : '';
					$response['token']     = $account_setting_token . '|' . $site_id;
				}
				$response['message'] = esc_html__(
					'ET Support User role has been activated.',
					'et-core'
				);
			} else {
				et_error( $maybe_create_user->get_error_message() );
				$response['error'] = $maybe_create_user->get_error_message();
			}
		}
		if ( 'elevate' === $support_update ) {
			$this->support_user_set_role( 'administrator' );

			$response['message'] = esc_html__(
				'ET Support User role has been elevated.',
				'et-core'
			);
		}
		if ( 'deactivate' === $support_update ) {
			$this->support_user_set_role( '' );
			$this->support_user_delete_account();
			$this->support_user_clear_delete_cron();
			$response['message'] = esc_html__(
				'ET Support User role has been deactivated.',
				'et-core'
			);
		}

		// `echo` data to return
		if ( isset( $response ) ) {
			echo json_encode( $response );
		}

		// `die` when we're done
		wp_die();
	}

	/**
	 * SUPPORT CENTER :: SAFE MODE
	 */

	/**
	 * ET Product Allowlist
	 *
	 * @since 3.28
	 *
	 * @param string $product Potential ET product name that we want to confirm is on the list.
	 *
	 * @return string|false   If the product is on our list, we return the "nice name" we have for it. Otherwise, we return FALSE.
	 */
	protected function is_allowlisted_product( $product = '' ) {
		switch ( $product ) {
			case 'divi_builder_plugin':
			case 'divi_theme':
			case 'extra_theme':
			case 'monarch_plugin':
			case 'bloom_plugin':
			case 'divi_dash_plugin':
				return $this->get_parent_nicename( $product );
				break;
			default:
				return false;
		}
	}

	/**
	 * Safe Mode: Set session cookie to temporarily disable Plugins
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	function safe_mode_update_via_ajax() {
		et_core_security_check( 'manage_options', 'support_center', 'nonce' );

		$response = array();

		// Get POST data
		$support_update = sanitize_text_field( $_POST['support_update'] );

		// Update option(s)
		if ( 'activate' === $support_update ) {
			// Check the ET product that is activating Safe Mode
			$safe_mode_activator = sanitize_key( $_POST['product'] );

			// Confirm that this is a allowlisted product
			$allowlisted_product = $this->is_allowlisted_product( $safe_mode_activator );

			if ( ! $allowlisted_product ) {
				// Send a failure code and exit the function
				header( "HTTP/1.0 403 Forbidden" );
				print 'Bad or malformed ET product name.';
				wp_die();
			}

			$this->toggle_safe_mode( true, $safe_mode_activator );
			$response['message'] = esc_html__( 'ET Safe Mode has been activated.', 'et-core' );
		}
		if ( 'deactivate' === $support_update ) {
			$this->toggle_safe_mode( false );
			$response['message'] = esc_html__( 'ET Safe Mode has been deactivated.', 'et-core' );
		}

		$this->set_safe_mode_cookie();

		// `echo` data to return
		if ( isset( $response ) ) {
			echo json_encode( $response );
		}

		// `die` when we're done
		wp_die();
	}

	/**
	 * Toggle Safe Mode
	 *
	 * @since 3.20
	 *
	 * @param bool $activate TRUE if enabling Safe Mode, FALSE if disabling Safe mode.
	 * @param string $product Name of ET product that is activating Safe Mode (@see ET_Core_SupportCenter::get_parent_nicename()).
	 */
	public function toggle_safe_mode( $activate = true, $product = '' ) {
		$activate            = (bool) $activate;
		$user_id             = get_current_user_id();
		$allowlisted_product = $this->is_allowlisted_product( $product );

		// Only proceed with an activation request if it comes from a allowlisted product
		if ( $activate && ! $allowlisted_product ) {
			return;
		}

		update_user_meta( $user_id, '_et_support_center_safe_mode', $activate ? 'on' : 'off' );
		update_user_meta( $user_id, '_et_support_center_safe_mode_product', $activate ? sanitize_text_field( $allowlisted_product ) : '' );

		$activate ? $this->maybe_add_mu_autoloader() : $this->maybe_remove_mu_autoloader();

		/**
		 * Fires when safe mode is toggled on or off.
		 *
		 * @since 3.25.4
		 *
		 * @param bool $state True if toggled on, false if toggled off.
		 */
		do_action( 'et_support_center_toggle_safe_mode', $activate );
	}

	/**
	 * Set Safe Mode Cookie
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	function set_safe_mode_cookie() {
		if ( et_core_is_safe_mode_active() ) {
			// This random string ensures old cookies aren't used to view the site in Safe Mode
			$passport = md5( rand() );

			update_option( 'et-support-center-safe-mode-verify', $passport );
			setcookie( 'et-support-center-safe-mode', $passport, time() + DAY_IN_SECONDS, SITECOOKIEPATH, false, is_ssl() );
		} else {
			// Force-expire the cookie
			setcookie( 'et-support-center-safe-mode', '', 1, SITECOOKIEPATH, false, is_ssl() );
		}
	}

	/**
	 * Render modal that intercepts plugin activation/deactivation
	 *
	 * @since 3.20
	 *
	 * @return void
	 */
	public function render_safe_mode_block_restricted() {
		if ( ! et_core_is_safe_mode_active() ) {
			return;
		}

		// Get the name of the ET product that activated Safe Mode
		$safe_mode_activator = get_user_meta( get_current_user_id(), '_et_support_center_safe_mode_product', true );
		$verified_activator  = $this->is_allowlisted_product( $safe_mode_activator );

		?>
		<script type="text/template" id="et-ajax-safe-mode-template">
			<div class="et-core-modal-overlay et-core-form et-core-safe-mode-block-modal">
				<div class="et-core-modal">
					<div class="et-core-modal-header">
						<h3 class="et-core-modal-title">
							<?php print esc_html__( 'Safe Mode', 'et-core' ); ?>
						</h3>
						<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
					</div>
					<div id="et-core-safe-mode-block-modal-content">
						<div class="et-core-modal-content">
							<p><?php print esc_html__(
									'Safe Mode is enabled and the current action cannot be performed.',
									'et-core'
								); ?></p>
						</div>
						<a class="et-core-modal-action"
								href="<?php echo admin_url( null, 'admin.php?page=et_support_center#et_card_safe_mode' ); ?>">
							<?php print esc_html__( sprintf( 'Turn Off %1$s Safe Mode', $verified_activator ), 'et-core' ); ?>
						</a>
					</div>
				</div>
			</div>
		</script>
		<?php

	}

	/**
	 * Disable Custom CSS (if Safe Mode is active)
	 *
	 * @since 3.20
	 */
	function maybe_disable_custom_css() {
		// Don't do anything if the user isn't logged in
		if ( ! is_user_logged_in() ) {
			return;
		}

		if ( et_core_is_safe_mode_active() ) {
			// Remove "Additional CSS" from WP Head action hook
			remove_action( 'wp_head', 'wp_custom_css_cb', 101 );
		}
	}

	/**
	 * Add Safe Mode Indicator (if Safe Mode is active)
	 *
	 * @since 3.20
	 */
	function maybe_add_safe_mode_indicator() {
		// Don't do anything if the user isn't logged in
		if ( ! is_user_logged_in() ) {
			return;
		}

		// Don't display when Visual Builder is active
		if ( et_core_is_fb_enabled() ) {
			return;
		}

		if ( et_core_is_safe_mode_active() ) {
			// Get the name of the ET product that activated Safe Mode
			$safe_mode_activator = get_user_meta( get_current_user_id(), '_et_support_center_safe_mode_product', true );
			$verified_activator  = $this->is_allowlisted_product( $safe_mode_activator );

			print sprintf( '<a class="%1$s" href="%2$s">%3$s</a>',
				'et-safe-mode-indicator',
				esc_url( get_admin_url( null, 'admin.php?page=et_support_center#et_card_safe_mode' ) ),
				esc_html__( sprintf( 'Turn Off %1$s Safe Mode', $verified_activator ), 'et-core' )
			);

			print sprintf( '<div id="%1$s"><img src="%2$s" alt="%3$s" id="%3$s"/></div>',
				'et-ajax-saving',
				esc_url( $this->local_path . 'admin/images/ajax-loader.gif' ),
				'loading'
			);
		}
	}

	/**
	 * Prints the admin page for Support Center
	 *
	 * @since 3.20
	 */
	public function add_support_center() {
		$is_current_user_et_support = 0;

		if ( $this->is_support_user() ) {
			$is_current_user_et_support = 1;
		}

		// Conditionally Display Divi Hosting Card
		$this->maybe_display_divi_hosting_card();
		?>
		<div id="et_support_center" class="wrap et-divi-admin-page--wrapper" data-et-zone="wp-admin" data-et-page="wp-admin-support-center">
			<h1><?php esc_html_e( sprintf( '%1$s Help &amp; Support Center', $this->parent_nicename ), 'et-core' );
				?></h1>

			<div id="epanel">
				<div id="epanel-content">

					<?php

					/**
					 * Run code before any of the Support Center cards have been output
					 *
					 * @since 3.20
					 */
					do_action( 'et_support_center_above_cards' );

					// Build Card :: System Status
					if ( $this->current_user_can( 'et_support_center_system' ) ) {
						$card_title   = esc_html__( 'System Status', 'et-core' );
						$card_content = sprintf( '<div class="et-system-status summary">%1$s</div>'
												 . '<textarea id="et_system_status_plain">%2$s</textarea>'
												 . '<div class="et_card_cta">%3$s %4$s %5$s</div>',
							et_core_intentionally_unescaped( $this->system_diagnostics_generate_report( true, 'div' ), 'html' ),
							et_core_intentionally_unescaped( $this->system_diagnostics_generate_report( true, 'plain' ), 'html' ),
							sprintf( '<a class="full_report_show">%1$s</a>', esc_html__( 'Show Full Report', 'et-core' ) ),
							sprintf( '<a class="full_report_hide">%1$s</a>', esc_html__( 'Hide Full Report', 'et-core' ) ),
							sprintf( '<a class="full_report_copy">%1$s</a>', esc_html__( 'Copy Full Report', 'et-core' ) )
						);

						print $this->add_support_center_card( array(
							'title'              => $card_title,
							'content'            => $card_content,
							'additional_classes' => array(
								'et_system_status',
								'summary',
							),
						) );
					}

					/**
					 * Run code after the 1st Support Center card has been output
					 *
					 * @since 3.20
					 */
					do_action( 'et_support_center_below_position_1' );

					// Build Card :: Remote Access
					if ( $this->current_user_can( 'et_support_center_remote_access' ) && ( 0 === $is_current_user_et_support ) ) {

						$card_title   = esc_html__( 'Elegant Themes Support', 'et-core' );
						$card_content = __( '<p>Enabling <strong>Remote Access</strong> will give the Elegant Themes support team limited access to your WordPress Dashboard. If requested, you can also enable full admin privileges. Remote Access should only be turned on if requested by the Elegant Themes support team. Remote Access is automatically disabled after 4 days.</p>', 'et-core' );

						$support_account = $this->get_et_support_user();

						$is_et_support_user_active = 0;

						$has_et_license = $this->get_et_license();

						if ( ! $has_et_license ) {

							$card_content .= sprintf(
								'<div class="et-support-user"><h4>%1$s</h4><p>%2$s</p></div>',
								esc_html__( 'Remote Access', 'et-core' ),
								__( 'Remote Access cannot be enabled because you do not have a valid API Key or your Elegant Themes subscription has expired. You can find your API Key by <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">logging in</a> to your Elegant Themes account. It should then be added to your <a href="https://www.elegantthemes.com/documentation/divi/update-divi/" target=_blank">Options Panel</a>.', 'et-core' )
							);

						} else {

							if ( is_object( $support_account ) && property_exists( $support_account, 'roles' ) ) {
								if ( in_array( 'et_support', $support_account->roles, true ) ) {
									$is_et_support_user_active = 1;
								}

								if ( in_array( 'administrator', $support_account->roles, true ) ) {
									$is_et_support_user_active = 2;
								}
							}

							$support_user_active_state = ( intval( $is_et_support_user_active ) > 0 ) ? ' et_pb_on_state' : ' et_pb_off_state';

							$expiry = '';
							if ( ! empty( $this->support_user_options['date_created'] ) ) {
								// Calculate the 'Created Date' plus the 'Time To Expire'
								$date_created = date( 'Y-m-d H:i:s ', $this->support_user_options['date_created'] );
								$expiry       = strtotime( $date_created . $this->support_user_expiration_time );
							}

							// Toggle Support User activation
							$card_content .= sprintf( '<div class="et-support-user"><h4>%1$s</h4>'
													  . '<div class="et_support_user_toggle">'
													  . '<div class="%7$s_wrapper"><div class="%7$s %2$s">'
													  . '<span class="%8$s et_pb_on_value">%3$s</span>'
													  . '<span class="et_pb_button_slider"></span>'
													  . '<span class="%8$s et_pb_off_value">%4$s</span>'
													  . '</div></div>'
													  . '<span class="et-support-user-expiry" data-expiry="%5$s">%6$s'
													  . '<span class="support-user-time-to-expiry"></span>'
													  . '</span>'
													  . '<span class="et-remote-access-error"></span>'
													  . '</div>'
													  . '</div>',
								esc_html__( 'Remote Access', 'et-core' ),
								esc_attr( $support_user_active_state ),
								esc_html__( 'Enabled', 'et-core' ),
								esc_html__( 'Disabled', 'et-core' ),
								esc_attr( $expiry ),
								esc_html__( 'Remote Access will be automatically disabled in: ', 'et-core' ),
								'et_pb_yes_no_button',
								'et_pb_value_text'
							);

							// Toggle Support User role elevation (only visible if Support User is active)
							$extra_css                   = ( intval( $is_et_support_user_active ) > 0 ) ? 'style="display:block;"' : '';
							$support_user_elevated_state = ( intval( $is_et_support_user_active ) > 1 ) ? ' et_pb_on_state' : ' et_pb_off_state';

							$card_content .= sprintf( '<div class="et-support-user-elevated" %5$s><h4>%1$s</h4>'
													  . '<div class="et_support_user_elevated_toggle">'
													  . '<div class="%6$s_wrapper"><div class="%6$s %2$s">'
													  . '<span class="%7$s et_pb_on_value">%3$s</span>'
													  . '<span class="et_pb_button_slider"></span>'
													  . '<span class="%7$s et_pb_off_value">%4$s</span>'
													  . '</div></div>'
													  . '</div>'
													  . '</div>',
								esc_html__( 'Activate Full Admin Privileges', 'et-core' ),
								esc_attr( $support_user_elevated_state ),
								esc_html__( 'Enabled', 'et-core' ),
								esc_html__( 'Disabled', 'et-core' ),
								et_core_intentionally_unescaped( $extra_css, 'html' ),
								'et_pb_yes_no_button',
								'et_pb_value_text'
							);
						}

						// Add a "Copy Support Token" CTA if Remote Access is active
						$site_id           = get_option( 'et_support_site_id' );
						$support_token_cta = '';
						if ( intval( $is_et_support_user_active ) > 0 && ! empty( $site_id ) && is_string( $site_id ) ) {
							$account_settings      = get_option( $this->support_user_options_name );
							$account_setting_token = isset( $account_settings['token'] ) ? $account_settings['token'] : '';
							$support_token_cta     = '<a class="copy_support_token" data-token="'
												. esc_attr( $account_setting_token . '|' . $site_id )
												. '">'
												. esc_html__( 'Copy Support Token', 'et-core' )
												. '</a>';
						}

						$vip_support_content = '<div class="et_vip_support">'
							. '<div class="et_vip_support__left">'
								. '<a target="_blank" href="https://www.elegantthemes.com/vip/?utm_source=Divi+VIP&utm_medium=Support+Center&utm_campaign=Native">'
									. '<img src="' . esc_url( ET_CORE_URL ) . 'admin/images/blurb-vip.jpg" alt="Divi VIP Support" />'
								. '</a>'
							. '</div>'
							. '<div class="et_vip_support__right">'
								. '<h2>' . esc_html__( 'Get More With Divi VIP', 'et-core' ) . '</h2>'
								. '<h2>' . esc_html__( 'The Best Support, Even Faster.', 'et-core' ) . '</h2>'
								. '<p>'
									. esc_html__( 'We want to provide exactly the level of support any of our customers need to be successful. With Divi VIP, you get faster support (Under 30 minutes response times around the clock). Keep your clients happy by letting us solve their problems faster.', 'et-core' )
								. '</p>'
								. '<a target="_blank" href="https://www.elegantthemes.com/vip/?utm_source=Divi+VIP&utm_medium=Support+Center&utm_campaign=Native">'
									. esc_html__( 'Get Divi VIP Today!', 'et-core' )
								. '</a>'
							. '</div>'
						. '</div>';

						$card_content .= '<div class="et_card_cta">'
										. '<a target="_blank" href="https://www.elegantthemes.com/members-area/help/">'
										. esc_html__( 'Chat With Support', 'et-core' )
										. '</a>'
										. $support_token_cta
										. $vip_support_content
										. '</div>';

						print $this->add_support_center_card( array(
							'title'              => $card_title,
							'content'            => $card_content,
							'additional_classes' => array(
								'et_remote_access',
								'et-epanel-box',
							),
						) );
					}

					/**
					 * Run code after the 2nd Support Center card has been output
					 *
					 * @since 3.20
					 */
					do_action( 'et_support_center_below_position_2' );

					// Build Card :: Divi Documentation & Help
					if ( $this->current_user_can( 'et_support_center_documentation' ) ) {
						switch ( $this->parent ) {
							case 'extra_theme':
								$documentation_url = 'https://www.elegantthemes.com/documentation/extra/';
								break;
							case 'divi_theme':
								$documentation_url = 'https://www.elegantthemes.com/documentation/divi/';
								break;
							case 'divi_builder_plugin':
								$documentation_url = 'https://www.elegantthemes.com/documentation/divi-builder/';
								break;
							case 'monarch_plugin':
								$documentation_url = 'https://www.elegantthemes.com/documentation/monarch/';
								break;
							case 'bloom_plugin':
								$documentation_url = 'https://www.elegantthemes.com/documentation/bloom/';
								break;
							default:
								$documentation_url = 'https://www.elegantthemes.com/documentation/';
						}

						$card_title   = esc_html__(
							sprintf( '%1$s Documentation &amp; Help', $this->parent_nicename ),
							'et-core'
						);
						$card_content = $this->get_documentation_video_player();
						$card_content .= $this->get_documentation_articles_list();
						$card_content .= '<div class="et_card_cta">'
										 . '<a href="' . $documentation_url . '" class="launch_documentation" target="_blank">'
										 . esc_html__(
											 sprintf( 'View Full %1$s Documentation', $this->parent_nicename ),
											 'et-core'
										 )
										 . '</a>'
										 . '</div>';

						print $this->add_support_center_card( array(
							'title'              => $card_title,
							'content'            => $card_content,
							'additional_classes' => array(
								'et_documentation_help',
								'et-epanel-box',
							),
						) );
					}

					/**
					 * Run code after the 3rd Support Center card has been output
					 *
					 * @since 3.20
					 */
					do_action( 'et_support_center_below_position_3' );

					// Build Card :: Safe Mode
					if ( $this->current_user_can( 'et_support_center_safe_mode' ) ) {

						$card_title       = esc_html__( 'Safe Mode', 'et-core' );
						$card_content     = __( '<p>Enabling <strong>Safe Mode</strong> will temporarily disable features and plugins that may be causing problems with your Elegant Themes product. This includes all Plugins, Child Themes, and Custom Code added to your integration areas. These items are only disabled for your current user session so your visitors will not be disrupted. Enabling Safe Mode makes it easy to figure out what is causing problems on your website by identifying or eliminating third party plugins and code as potential causes.</p>', 'et-core' );
						$error_message    = '';
						$safe_mode_active = ( et_core_is_safe_mode_active() ) ? ' et_pb_on_state' : ' et_pb_off_state';
						$plugins_list     = array();
						$plugins_output   = '';

						$has_mu_plugins_dir        = wp_mkdir_p( WPMU_PLUGIN_DIR ) && wp_is_writable( WPMU_PLUGIN_DIR );
						$can_create_mu_plugins_dir = wp_is_writable( WP_CONTENT_DIR ) && ! wp_mkdir_p( WPMU_PLUGIN_DIR );

						if ( $has_mu_plugins_dir || $can_create_mu_plugins_dir ) {
							// Gather list of plugins that will be temporarily deactivated in Safe Mode
							$all_plugins    = get_plugins();
							$active_plugins = get_option( 'active_plugins' );

							foreach ( $active_plugins as $plugin ) {
								// Verify this 'active' plugin actually exists in the plugins directory
								if ( ! in_array( $plugin, array_keys( $all_plugins ) ) ) {
									continue;
								}

								// If it's not in our allowlist, add it to the list of plugins we'll disable
								if ( ! in_array( $plugin, $this->safe_mode_plugins_allowlist ) ) {
									$plugins_list[] = '<li>' . esc_html( $all_plugins[ $plugin ]['Name'] ) . '</li>';
								}
							}

						} else {
							$error_message = et_get_safe_localization( sprintf( __( '<p class="et-safe-mode-error">Plugins cannot be disabled because your <code>wp-content</code> directory has inconsistent file permissions. <a href="%1$s" target="_blank">Click here</a> for more information.</p>', 'et-core' ), 'https://wordpress.org/support/article/changing-file-permissions/' ) );
						}

						if ( count( $plugins_list ) > 0 ) {
							$plugins_output = sprintf( '<p>%1$s</p><ul>%2$s</ul>',
								esc_html__( 'The following plugins will be temporarily disabled for you only:', 'et-core' ),
								et_core_intentionally_unescaped( implode( ' ', $plugins_list ), 'html' )
							);
						}

						// Toggle Safe Mode activation
						$card_content .= sprintf( '<div id="et_card_safe_mode" class="et-safe-mode" data-et-product="%8$s">'
												  . '<div class="et_safe_mode_toggle">'
												  . '<div class="%5$s_wrapper"><div class="%5$s %1$s">'
												  . '<span class="%6$s et_pb_on_value">%2$s</span>'
												  . '<span class="et_pb_button_slider"></span>'
												  . '<span class="%6$s et_pb_off_value">%3$s</span>'
												  . '</div></div>'
												  . '%4$s'
												  . '%7$s'
												  . '</div>'
												  . '</div>',
							esc_attr( $safe_mode_active ),
							esc_html__( 'Enabled', 'et-core' ),
							esc_html__( 'Disabled', 'et-core' ),
							$plugins_output,
							'et_pb_yes_no_button',
							'et_pb_value_text',
							$error_message,
							esc_attr( $this->parent )
						);

						print $this->add_support_center_card( array(
							'title'              => $card_title,
							'content'            => $card_content,
							'additional_classes' => array(
								'et_safe_mode',
								'et-epanel-box',
							),
						) );
					}

					/**
					 * Run code after the 4th Support Center card has been output
					 *
					 * @since 3.20
					 */
					do_action( 'et_support_center_below_position_4' );

					// Build Card :: Logs
					if ( $this->current_user_can( 'et_support_center_logs' ) ) {
						$debug_log_lines = apply_filters( 'et_debug_log_lines', 200 );
						$wp_debug_log    = $this->get_wp_debug_log( $debug_log_lines );
						$card_title      = esc_html__( 'Logs', 'et-core' );

						$card_content = '<p>If you have <a href="https://codex.wordpress.org/Debugging_in_WordPress" target=_blank" >WP_DEBUG_LOG</a> enabled, WordPress related errors will be archived in a log file. For your convenience, we have aggregated the contents of this log file so that you and the Elegant Themes support team can view it easily. The file cannot be edited here.</p>';

						if ( isset( $wp_debug_log['error'] ) ) {
							$card_content .= '<div class="et_system_status_log_preview">'
											 . '<textarea>' . $wp_debug_log['error'] . '</textarea>'
											 . '</div>';
						} else {
							$card_content .= '<div class="et_system_status_log_preview">'
											 . '<textarea id="et_logs_display">' . $wp_debug_log['entries'] . '</textarea>'
											 . '<textarea id="et_logs_recent">' . $wp_debug_log['entries'] . '</textarea>'
											 . '</div>'
											 . '<div class="et_card_cta">'
											 . '<a href="' . content_url( 'debug.log' ) . '" class="download_debug_log" download>'
											 . esc_html__( 'Download Full Debug Log', 'et-core' )
											 . ' (' . $wp_debug_log['size'] . ')'
											 . '</a>'
											 . '<a class="copy_debug_log">'
											 . esc_html__( 'Copy Recent Log Entries', 'et-core' )
											 . '</a>'
											 . '</div>';
						}

						print $this->add_support_center_card( array(
							'title'              => $card_title,
							'content'            => $card_content,
							'additional_classes' => array(
								'et_system_logs',
								'et-epanel-box',
							),
						) );
					}

					/**
					 * Run code after all of the Support Center cards have been output
					 *
					 * @since 3.20
					 */
					do_action( 'et_support_center_below_cards' );

					?>
				</div>
			</div>
		</div>
		<div id="et-ajax-saving">
			<img src="<?php echo esc_url( $this->local_path . 'admin/images/ajax-loader.gif' ); ?>" alt="loading" id="loading" />
		</div>
		<?php

	}

	/**
	 * SUPPORT CENTER :: DIVI HOSTING CARD
	 */

	/**
	 * Conditionally display Divi Hosting Card in the Support Center
	 *
	 * @since 4.4.7
	 */
	public function maybe_display_divi_hosting_card() {
		// Sanity Check: Exit early if the user does not have permission
		if ( ! $this->current_user_can( 'et_support_center_system' ) ) {
			return;
		}

		// Exit if Admin dismissed the Divi Hosting Card
		if ( get_option( 'et_hosting_card_dismissed', false ) ) {
			return;
		}

		// Show the Divi Hosting Card
		add_action( 'et_support_center_below_position_1', array( $this, 'print_divi_hosting_card' ) );
	}

	/**
	 * Prepare Settings for ET API request
	 * Returns false when ET username/api_key is not found, and ET subscription is not active
	 *
	 * @since 4.4.7
	 * @param string $action
	 *
	 * @return bool|array
	 */
	protected function get_et_api_request_settings( $action ) {
		$et_account  = et_core_get_et_account();
		$et_username = et_()->array_get( $et_account, 'et_username', '' );
		$et_api_key  = et_()->array_get( $et_account, 'et_api_key', '' );

		// Only when ET Username and ET API Key is found
		if ( '' !== $et_username && '' !== $et_api_key ) {
			global $wp_version;

			// Prepare settings for API request
			return array(
				'timeout'    => 30,
				'body'       => array(
					'action'   => $action,
					'username' => $et_username,
					'api_key'  => $et_api_key,
				),
				'user-agent' => 'WordPress/' . $wp_version . '; Support Center/' . ET_CORE_VERSION . '; ' . home_url( '/' ),
			);
		}

		return false;
	}

	/**
	 * Check ET API whether ET User has disabled Divi Hosting Card
	 *
	 * @since 4.4.7
	 *
	 * @return bool
	 */
	protected function maybe_api_has_hosting_card_disabled() {
	    // Get API settings
		$api_settings = $this->get_et_api_request_settings( 'check_hosting_card_status' );

		// Check API only when ET Username, ET API Key is found and Account is active
		if ( is_array( $api_settings ) ) {
			$request               = wp_remote_post( 'https://www.elegantthemes.com/api/api.php', $api_settings );
			$request_response_code = wp_remote_retrieve_response_code( $request );

			// Do not show the Hosting Card when API Request, or, API Response has any error
			if ( is_wp_error( $request ) || 200 !== $request_response_code ) {
				return true;
			}

			$response_body = wp_remote_retrieve_body( $request );
			$response      = (array) json_decode( $response_body );

			// Check whether the User has disabled the card
			if ( et_()->array_get( $response, 'success' ) && et_()->array_get( $response, 'status' ) === 'disabled' ) {
				// Mark it dismissed, so it won't be displayed anymore on this website
				update_option( 'et_hosting_card_dismissed', true );

				// Do not show the Hosting Card
				return true;
			}
		}

		// Show the Hosting Card
		return false;
	}

	/**
	 * Return Data for Divi Hosting Card
	 *
	 * @since 4.4.7
	 *
	 * @return array
	 */
	protected function get_divi_hosting_features() {

		return array(
			'title'           => esc_html__( 'Get Recommended Divi Hosting', 'et-core' ),
			'summary'         => esc_html__( 'Upgrade your hosting to the most reliable, Divi-compatible hosting. Enjoy perfectly configured hosting environments pre-installed with the tools you need to be successful with Divi.', 'et-core' ),
			'url'             => 'https://www.elegantthemes.com/hosting/',
			'learn_more'      => esc_html__( 'Learn About Divi Hosting', 'et-core' ),
			'dismiss_tooltip' => esc_html__( 'Remove This Recommendation On All Of Your Websites And Your Client\'s Websites Forever', 'et-core' ),
			'features'        => array(
				'server'   => array(
					'title'   => esc_html__( 'Divi-Optimized Servers', 'et-core' ),
					'tooltip' => esc_html__( "We worked with our parters to make sure that their hosting solutions meet all of Divi's requirements out of the box. No hosting headaches on Divi Hosting.", 'et-core' ),
				),
				'speed'    => array(
					'title'   => esc_html__( 'Blazing Fast Speed', 'et-core' ),
					'tooltip' => esc_html__( 'Divi Hosting is powered by fast networks, modern hosting infrastructures and the latest server software. Plus you will enjoy automatic caching and a free CDN.', 'et-core' ),
				),
				'security' => array(
					'title'   => esc_html__( 'A Focus On Security', 'et-core' ),
					'tooltip' => esc_html__( 'All of our hosting partners are dedicated to security. That means up-to-date server software and secure hosting practices.', 'et-core' ),
				),
				'backups'  => array(
					'title'   => esc_html__( 'Automatic Backups', 'et-core' ),
					'tooltip' => esc_html__( 'Every website needs backups! Each of our hosting partners provide automatic daily backups. If disaster strikes, these hosting companies have your back.', 'et-core' ),
				),
				'migrate'  => array(
					'title'   => esc_html__( 'Easy Site Migration', 'et-core' ),
					'tooltip' => esc_html__( "Already have a Divi website hosted somewhere else? All of our hosting partners provide migration tools or professional assisted migration. It's easy to switch to Divi Hosting!", 'et-core' ),
				),
				'staging'  => array(
					'title'   => esc_html__( 'Easy Staging Sites', 'et-core' ),
					'tooltip' => esc_html__( 'Automatic staging sites make it easy to develop new designs for your clients without disrupting visitors. Finish your work and push it live all at once.', 'et-core' ),
				),
			),
		);
	}

	/**
	 * Build and display Divi Hosting Card
	 *
	 * @since 4.4.7
	 */
	public function print_divi_hosting_card() {
		// Gather System status data
		$report = $this->system_diagnostics_generate_report( false );
		$result = array();

		// Prepare the report data to check against when to show the Divi Hosting Card
		foreach ( $report as $status ) {
			$result[] = et_()->array_get( $status, 'pass_fail' );
		}

		// Exit if any system status item is not in a warning state (red dot indicator)
		if ( ! in_array( 'fail', array_values( $result ), true ) ) {
			return;
		}

		// Exit if ET User has disabled the Divi Hosting card
		if ( $this->maybe_api_has_hosting_card_disabled() ) {
			return;
		}

		// JS dependency for Tooltips
		wp_enqueue_script( 'popper', $this->local_path . 'admin/js/popper.min.js', array( 'jquery' ), ET_CORE_VERSION );
		wp_enqueue_script( 'tippy', $this->local_path . 'admin/js/tippy.min.js', array( 'jquery', 'popper' ), ET_CORE_VERSION );

		$card     = $this->get_divi_hosting_features();
		$features = '';

		// HTML Template for Features of the Divi Hosting Card
		foreach ( $card['features'] as $name => $feature ) {
			$features .= sprintf(
				'<div class="et_hosting_card--feature" data-tippy-content="%1$s">%2$s <h4>%3$s</h4></div>',
				esc_html( $feature['tooltip'] ),
				sprintf(
					'<object type="image/svg+xml" className="fitvidsignore" data="%1$s" width="32" height="32"></object>',
					esc_url( "{$this->local_path}admin/images/svg/{$name}.svg" )
				),
				esc_html( $feature['title'] )
			);
		}

		// HTML Template for the Divi Hosting Card
		$card_content = sprintf(
			'<p class="et_card_summary">%1$s</p>
			<div class="et_card_content et_hosting_card--features">%2$s</div>
			<div class="et_card_cta et_hosting_card--cta">%3$s</div>',
			esc_html( $card['summary'] ),
			et_core_esc_previously( $features ),
			sprintf(
				'<a class="et_hosting_card--link" target="_blank" href="%1$s" title="%2$s">%3$s</a>',
				esc_url( $card['url'] ),
				esc_attr( $card['learn_more'] ),
				esc_html( $card['learn_more'] )
			)
		);

		// Display the Divi Hosting Card
		print $this->add_support_center_card( array(
			'title'              => $card['title'],
			'content'            => $card_content,
			'additional_classes' => array(
				'et_hosting_card',
			),
			'dismiss_button'     => array(
				'card_key'           => 'et_hosting_card',
				'tooltip'            => $card['dismiss_tooltip'],
				'additional_classes' => array(
					'et_hosting_card--dismiss',
				),
			),
		) );
	}
}
post/Taxonomy.php000064400000003357152336022500010066 0ustar00<?php


abstract class ET_Core_Post_Taxonomy extends ET_Core_Post_Object {

	/**
	 * The `$args` array used when registering this taxonomy.
	 *
	 * @since 3.0.99
	 * @var   array
	 */
	protected $_args;

	/**
	 * The WP Taxonomy object for this instance.
	 *
	 * @since 3.0.99
	 * @var   WP_Taxonomy
	 */
	protected $_wp_object;

	/**
	 * Taxonomy key.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	public $name;

	/**
	 * The post types to which this taxonomy applies.
	 *
	 * @since 3.0.99
	 * @var   array
	 */
	public $post_types;

	/**
	 * This taxonomy's terms.
	 *
	 * @var WP_Term[]
	 */
	public $terms;

	/**
	 * @inheritDoc
	 */
	public $wp_type = 'taxonomy';

	/**
	 * ET_Core_Post_Taxonomy constructor.
	 */
	public function __construct() {
		parent::__construct();

		$name = $this->name;

		/**
		 * Filters the supported post types for a custom taxonomy. The dynamic portion of the
		 * filter name, $name, refers to the name of the custom taxonomy.
		 *
		 * @since 3.0.99
		 *
		 * @param array
		 */
		$this->post_types = apply_filters( "et_core_taxonomy_{$name}_post_types", $this->post_types );
	}

	/**
	 * Get the terms for this taxonomy.
	 *
	 * @return array|int|WP_Error|WP_Term[]
	 */
	public function get() {
		if ( is_null( $this->terms ) ) {
			$this->terms = get_terms( $this->name, array( 'hide_empty' => false ) );
		}

		return $this->terms;
	}

	/**
	 * Get a derived class instance.
	 *
	 * @since 3.0.99
	 *
	 * @param string $type See {@see self::$wp_type} for accepted values. Default is 'taxonomy'.
	 * @param string $name The name/slug of the derived object. Default is an empty string.
	 *
	 * @return self|null
	 */
	public static function instance( $type = 'taxonomy', $name = '' ) {
		return parent::instance( $type, $name );
	}
}
post/Query.php000064400000016554152336022500007360 0ustar00<?php

class ET_Core_Post_Query {

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	/**
	 * Whether or not to negate the next query arg that is set. Default 'false'.
	 *
	 * @since 3.0.99
	 * @var   bool
	 */
	protected $_negate = false;

	/**
	 * The query result.
	 *
	 * @since 3.0.99
	 * @var   WP_Post|WP_Post[]
	 */
	protected $_query_result;

	/**
	 * The args that will be passed to {@see WP_Query} the next time {@see self::run()} is called.
	 *
	 * @since 3.0.99
	 * @var   array
	 */
	protected $_wp_query_args;

	/**
	 * The name of the primary category-style taxonomy for this post type.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	public $category_tax;

	/**
	 * The post type (slug) for this instance.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	public $post_type;

	/**
	 * The name of the primary tag-style taxonomy for this post type.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	public $tag_tax;

	/**
	 * ET_Core_Post_Query constructor.
	 *
	 * @since 3.0.99
	 *
	 * @param string $post_type    See {@see self::$post_type}
	 * @param string $category_tax See {@see self::$category_tax}
	 * @param string $tag_tax      See {@see self::$tag_tax}
	 */
	public function __construct( $post_type = '', $category_tax = '', $tag_tax = '' ) {
		$this->post_type    = $this->post_type ? $this->post_type : $post_type;
		$this->category_tax = $this->category_tax ? $this->category_tax : $category_tax;
		$this->tag_tax      = $this->tag_tax ? $this->tag_tax : $tag_tax;

		$this->_wp_query_args = array(
			'post_type'      => $this->post_type,
			'posts_per_page' => -1,
		);

		if ( ! self::$_ ) {
			self::$_ = ET_Core_Data_Utils::instance();
		}
	}

	/**
	 * Adds a meta query to the WP Query args for this instance.
	 *
	 * @since 3.0.99
	 *
	 * @param string $key    The meta key.
	 * @param string $value  The meta value.
	 * @param bool   $negate Whether or not to negate this meta query.
	 */
	protected function _add_meta_query( $key, $value, $negate ) {
		if ( ! isset( $this->_wp_query_args['meta_query'] ) ) {
			$this->_wp_query_args['meta_query'] = array();
		}

		if ( is_null( $value ) ) {
			$compare = $negate ? 'NOT EXISTS' : 'EXISTS';
		} else if ( is_array( $value ) ) {
			$compare = $negate ? 'NOT IN' : 'IN';
		} else {
			$compare = $negate ? '!=' : '=';
		}

		$query = array(
			'key'     => $key,
			'compare' => $compare,
		);

		if ( ! is_null( $value ) ) {
			$query['value'] = $value;
		}

		if ( '!=' === $compare ) {
			$query = array(
				'relation' => 'OR',
				array(
					'key'     => $key,
					'compare' => 'NOT EXISTS',
				),
				$query,
			);
		}

		$this->_wp_query_args['meta_query'][] = $query;
	}

	/**
	 * Adds a tax query to the WP Query args for this instance.
	 *
	 * @since 3.0.99
	 *
	 * @param string $taxonomy The taxonomy name.
	 * @param array  $terms    Taxonomy terms.
	 * @param bool   $negate   Whether or not to negate this tax query.
	 */
	protected function _add_tax_query( $taxonomy, $terms, $negate ) {
		if ( ! isset( $this->_wp_query_args['tax_query'] ) ) {
			$this->_wp_query_args['tax_query'] = array();
		}

		$operator = $negate ? 'NOT IN' : 'IN';
		$field    = is_int( $terms[0] ) ? 'term_id' : 'name';

		$query = array(
			'taxonomy' => $taxonomy,
			'field'    => $field,
			'terms'    => $terms,
			'operator' => $operator,
		);

		if ( $negate ) {
			$query = array(
				'relation' => 'OR',
				array(
					'taxonomy' => $taxonomy,
					'operator' => 'NOT EXISTS',
				),
				$query,
			);
		}

		$this->_wp_query_args['tax_query'][] = $query;
	}

	/**
	 * Resets {@see self::$_negate} to default then returns the previous value.
	 *
	 * @return bool
	 */
	protected function _reset_negate() {
		$negate = $this->_negate;

		$this->_negate = false;

		return $negate;
	}

	/**
	 * Adds a tax query to this instance's WP Query args for it's category taxonomy.
	 *
	 * @since 3.0.99
	 *
	 * @param mixed ...$categories Variable number of category arguments where each arg can be
	 *                             a single category name or ID or an array of names or IDs.
	 *
	 * @return $this
	 */
	public function in_category() {
		$negate = $this->_reset_negate();

		if ( ! $this->category_tax ) {
			et_error( 'A category taxonomy has not been set for this query!' );

			return $this;
		}

		$args = func_get_args();
		$args = self::$_->array_flatten( $args );

		if ( ! $args ) {
			return $this;
		}

		$this->_add_tax_query( $this->category_tax, $args, $negate );

		return $this;
	}

	/**
	 * Negates the next query arg that is set.
	 *
	 * @since 3.0.99
	 *
	 * @return $this
	 */
	public function not() {
		$this->_negate = true;

		return $this;
	}

	/**
	 * Performs a new WP Query using the instance's current query params and then returns the
	 * results. Typically, this method is the last method call in a set of chained calls to other
	 * methods on this class during which various query params are set.
	 *
	 * Examples:
	 *
	 *     $cpt_query
	 *         ->in_category( 'some_cat' )
	 *         ->with_tag( 'some_tag' )
	 *         ->run();
	 *
	 *     $cpt_query
	 *         ->with_tag( 'some_tag' )
	 *         ->not()->in_category( 'some_cat' )
	 *         ->run();
	 *
	 * @since 3.0.99
	 *
	 * @param array $args Optional. Additional arguments for {@see WP_Query}.
	 *
	 * @return WP_Post|WP_Post[] $posts
	 */
	public function run( $args = array() ) {
		if ( ! is_null( $this->_query_result ) ) {
			return $this->_query_result;
		}

		$name = $this->post_type;

		if ( $args ) {
			$this->_wp_query_args = array_merge_recursive( $this->_wp_query_args, $args );
		}

		/**
		 * Filters the WP Query args for a custom post type query. The dynamic portion of
		 * the filter name, $name, refers to the name of the custom post type.
		 *
		 * @since 3.0.99
		 *
		 * @param array $args {@see WP_Query::__construct()}
		 */
		$this->_wp_query_args = apply_filters( "et_core_cpt_{$name}_query_args", $this->_wp_query_args );

		$query = new WP_Query( $this->_wp_query_args );

		$this->_query_result = $query->posts;

		if ( 1 === count( $this->_query_result ) ) {
			$this->_query_result = array_pop( $this->_query_result );
		}

		return $this->_query_result;
	}

	/**
	 * Adds a meta query to this instance's WP Query args.
	 *
	 * @since 3.0.99
	 *
	 * @param string $key   The meta key.
	 * @param mixed  $value Optional. The meta value to compare. When `$value` is not provided,
	 *                      the comparison will be 'EXISTS' or 'NOT EXISTS' (when negated).
	 *                      When `$value` is an array, comparison will be 'IN' or 'NOT IN'.
	 *                      When `$value` is not an array, comparison will be '=' or '!='.
	 *
	 * @return $this
	 */
	public function with_meta( $key, $value = null ) {
		$this->_add_meta_query( $key, $value, $this->_reset_negate() );

		return $this;
	}

	/**
	 * Adds a tax query to this instance's WP Query args for it's primary tag-like taxonomy.
	 *
	 * @since 3.0.99
	 *
	 * @param mixed ...$tags Variable number of tag arguments where each arg can be
	 *                       a single tag name or ID, or an array of tag names or IDs.
	 *
	 * @return $this
	 */
	public function with_tag() {
		$negate = $this->_reset_negate();

		if ( ! $this->tag_tax ) {
			et_error( 'A tag taxonomy has not been set for this query!' );

			return $this;
		}

		$args = func_get_args();
		$args = self::$_->array_flatten( $args );

		if ( ! $args ) {
			return $this;
		}

		$this->_add_tax_query( $this->tag_tax, $args, $negate );

		return $this;
	}
}
post/Type.php000064400000001637152336022500007170 0ustar00<?php


abstract class ET_Core_Post_Type extends ET_Core_Post_Object {

	/**
	 * The `$args` array used when registering this post type.
	 *
	 * @since 3.0.99
	 * @var   array
	 */
	protected $_args;

	/**
	 * The name of the primary category-style taxonomy for this post type.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	protected $_category_tax = '';

	/**
	 * The name of the primary tag-style taxonomy for this post type.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	protected $_tag_tax = '';

	/**
	 * The WP Post Type object for this instance.
	 *
	 * @since 3.0.99
	 * @var   WP_Post_Type
	 */
	protected $_wp_object;

	/**
	 * Post type key.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	public $name;

	/**
	 * @inheritDoc
	 */
	public $wp_type = 'cpt';

	/**
	 * @return ET_Core_Post_Query
	 */
	public function query() {
		return new ET_Core_Post_Query( $this->name, $this->_category_tax, $this->_tag_tax );
	}
}
post/Object.php000064400000012126152336022500007450 0ustar00<?php


abstract class ET_Core_Post_Object {

	/**
	 * @var ET_Core_Data_Utils
	 */
	protected static $_;

	/**
	 * Current instances of this class organized by type.
	 *
	 * @since 3.0.99
	 * @var   array[] {
	 *
	 *     @type ET_Core_Post_Object[] $type {
	 *
	 *         @type ET_Core_Post_Object $name Instance.
	 *         ...
	 *     }
	 *     ...
	 * }
	 */
	private static $_instances = array();

	/**
	 * The `$args` array used when registering this post object.
	 *
	 * @since 3.0.99
	 * @var   array
	 */
	protected $_args;

	/**
	 * The owner of this instance. Default 'core'. Accepts 'divi', 'builder', 'epanel', 'bloom', 'monarch'.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	protected $_owner = 'core';

	/**
	 * Whether or not the object has been registered.
	 *
	 * @since 3.0.99
	 * @var   bool
	 */
	protected $_registered = false;

	/**
	 * The WP object for this instance.
	 *
	 * @since 3.0.99
	 * @var   WP_Post_Type|WP_Taxonomy
	 */
	protected $_wp_object;

	/**
	 * Post object key.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	public $name;

	/**
	 * Post object type. Accepts 'cpt', 'taxonomy'.
	 *
	 * @since 3.0.99
	 * @var   string
	 */
	public $wp_type;

	/**
	 * ET_Core_Post_Base constructor.
	 */
	public function __construct() {
		$this->_args           = $this->_get_args();
		$this->_args['labels'] = $this->_get_labels();

		$this->_apply_filters();
		$this->_sanity_check();

		if ( empty( self::$_instances ) ) {
			self::$_instances['cpt']      = array();
			self::$_instances['taxonomy'] = array();

			add_action( 'init', 'ET_Core_Post_Object::register_all' );
		}

		self::$_instances[ $this->wp_type ][ $this->name ] = $this;
	}

	/**
	 * Applies filters to the instance's filterable properties.
	 */
	protected function _apply_filters() {
		$name = $this->name;

		if ( 'cpt' === $this->wp_type ) {
			/**
			 * Filters the `$args` for a custom post type. The dynamic portion of the
			 * filter, `$name`, refers to the name/key of the post type being registered.
			 *
			 * @since 3.0.99
			 *
			 * @param array $args {@see register_post_type()}
			 */
			$this->_args = apply_filters( "et_core_cpt_{$name}_args", $this->_args );

		} else if ( 'taxonomy' === $this->wp_type ) {
			/**
			 * Filters the `$args` for a custom post taxonomy. The dynamic portion of the
			 * filter, `$name`, refers to the name/key of the taxonomy being registered.
			 *
			 * @since 3.0.99
			 *
			 * @param array $args {@see register_taxonomy()}
			 */
			$this->_args = apply_filters( "et_core_taxonomy_{$name}_args", $this->_args );
		}
	}

	/**
	 * This method is called right before registering the object. It is intended to be
	 * overridden by child classes as needed.
	 */
	protected function _before_register() {}

	/**
	 * Returns the args for the instance.
	 * See {@see register_post_type()} or {@see register_taxonomy()}.
	 *
	 * @return array $args
	 */
	abstract protected function _get_args();

	/**
	 * Returns labels for the instance.
	 * See {@see register_post_type()} or {@see register_taxonomy()}.
	 *
	 * @return array $labels
	 */
	abstract protected function _get_labels();

	/**
	 * Checks for required properties and existing instances.
	 */
	protected function _sanity_check() {
		if ( ! $this->_args || ! $this->name || ! $this->wp_type ) {
			et_error( 'Missing required properties!' );
			wp_die();
		} else if ( isset( self::$_instances[ $this->wp_type ][ $this->name ] ) ) {
			et_error( 'Multiple instances are not allowed!' );
			wp_die();
		}
	}

	/**
	 * Get a derived class instance.
	 *
	 * @since 3.0.99
	 *
	 * @param string $type See {@see self::$wp_type} for accepted values. Default is 'cpt'.
	 * @param string $name The name/slug of the derived object. Default is an empty string.
	 *
	 * @return self|null
	 */
	public static function instance( $type = 'cpt', $name = '' ) {
		if ( ! self::$_ ) {
			self::$_ = ET_Core_Data_Utils::instance();
		}

		return self::$_->array_get( self::$_instances, "{$type}.{$name}", null );
	}

	/**
	 * Calls either {@see register_post_type} or {@see register_taxonomy} for each instance.
	 *
	 * @since 3.0.99
	 *
	 * @param string $owner Optional. Only register objects owned by a part of the codebase.
	 *                      See {@see self::_owner} for accepted values.
	 */
	public static function register_all( $owner = null ) {
		if ( empty( self::$_instances ) ) {
			return;
		}

		global $wp_taxonomies;

		foreach ( self::$_instances['taxonomy'] as $name => $instance ) {
			$can_register = is_null( $owner ) || $owner === $instance->_owner;

			if ( $instance->_registered || ! $can_register ) {
				continue;
			}

			$instance->_before_register();

			register_taxonomy( $name, $instance->post_types, $instance->_args );

			$instance->_wp_object  = $wp_taxonomies[ $name ];
			$instance->_registered = true;
		}

		foreach ( self::$_instances['cpt'] as $name => $instance ) {
			$can_register = is_null( $owner ) || $owner === $instance->_owner;

			if ( $instance->_registered || ! $can_register ) {
				continue;
			}

			$instance->_before_register();

			$instance->_wp_object  = register_post_type( $name, $instance->_args );
			$instance->_registered = true;
		}
	}
}
VersionRollback.php000064400000044237152336022500010364 0ustar00<?php
// phpcs:disable Generic.WhiteSpace.ScopeIndent -- our preference is to not indent the whole inner function in this scenario.
if ( ! class_exists( 'ET_Core_VersionRollback' ) ) :
/**
 * Handles version rollback.
 *
 * @since 3.10
 *
 * @private
 *
 * @package ET\Core\VersionRollback
 */
class ET_Core_VersionRollback {
	/**
	 * Product name.
	 *
	 * @var string
	 */
	protected $product_name = '';

	/**
	 * Product shortname.
	 *
	 * @var string
	 */
	protected $product_shortname = '';

	/**
	 * Current product version.
	 *
	 * @var string
	 */
	protected $product_version = '';

	/**
	 * Is rollback service enabled.
	 *
	 * @var bool
	 */
	protected $enabled = false;

	/**
	 * API Username.
	 *
	 * @var string
	 */
	protected $api_username = '';

	/**
	 * API Key.
	 *
	 * @var string
	 */
	protected $api_key = '';

	/**
	 * ET_Core_VersionRollback constructor.
	 *
	 * @since 3.10
	 *
	 * @param string $product_name Product name.
	 * @param string $product_shortname Product shortname.
	 * @param string $product_version Product version.
	 */
	public function __construct( $product_name, $product_shortname, $product_version ) {
		$this->product_name = sanitize_text_field( $product_name );
		$this->product_shortname = sanitize_text_field( $product_shortname );
		$this->product_version = sanitize_text_field( $product_version );

		if ( ! $options = get_site_option( 'et_automatic_updates_options' ) ) {
			$options = get_option( 'et_automatic_updates_options' );
		}

		$this->api_username = isset( $options['username'] ) ? sanitize_text_field( $options['username'] ) : '';
		$this->api_key = isset( $options['api_key'] ) ? sanitize_text_field( $options['api_key'] ) : '';
	}

		/**
		 * Enqueue assets.
		 *
		 * @since ?.? Script `et-core-version-rollback` now loads in footer.
		 * @since 3.10
		 */
		public function assets() {
			wp_enqueue_style(
				'et-core-version-rollback',
				ET_CORE_URL . 'admin/css/version-rollback.css',
				array(
					'et-core-admin',
				),
				ET_CORE_VERSION
			);

			wp_enqueue_script(
				'et-core-version-rollback',
				ET_CORE_URL . 'admin/js/version-rollback.js',
				array(
					'jquery',
					'jquery-ui-tabs',
					'jquery-form',
					'et-core-admin',
				),
				ET_CORE_VERSION,
				true
			);

			wp_localize_script(
				'et-core-version-rollback',
				'etCoreVersionRollbackI18n',
				array(
					'unknownError' => esc_html__( 'An unknown error has occurred. Please try again later.', 'et-core' ),
				)
			);
		}

	/**
	 * Get previous installed version, if any.
	 *
	 * @since 3.10
	 *
	 * @return string
	 */
	protected function _get_previous_installed_version() {
		return et_get_option( "{$this->product_shortname}_previous_installed_version", '' );
	}

	/**
	 * Set previous installed version.
	 *
	 * @since 3.10
	 *
	 * @param string $version
	 *
	 * @return void
	 */
	protected function _set_previous_installed_version( $version ) {
		et_update_option( "{$this->product_shortname}_previous_installed_version", sanitize_text_field( $version ) );
	}

	/**
	 * Get latest installed version, if any.
	 *
	 * @since 3.10
	 *
	 * @return string
	 */
	protected function _get_latest_installed_version() {
		return et_get_option( "{$this->product_shortname}_latest_installed_version", '' );
	}

	/**
	 * Set latest installed version.
	 *
	 * @since 3.10
	 *
	 * @param string $version
	 *
	 * @return void
	 */
	protected function _set_latest_installed_version( $version ) {
		et_update_option( "{$this->product_shortname}_latest_installed_version", sanitize_text_field( $version ) );
	}

	/**
	 * Check if the product has already been rolled back.
	 *
	 * @since 3.10
	 *
	 * @return bool
	 */
	protected function _is_rolled_back() {
		return version_compare( $this->_get_latest_installed_version(), $this->_get_previous_installed_version(), '<=' );
	}

	/**
	 * Get unique ajax action.
	 *
	 * @since 3.10
	 *
	 * @return string
	 */
	protected function _get_ajax_action() {
		return 'et_core_version_rollback';
	}

	/**
	 * Enable update rollback.
	 *
	 * @since 3.10
	 *
	 * @return void
	 */
	public function enable() {
		if ( $this->enabled ) {
			return;
		}

		$this->enabled = true;

		add_action( 'admin_enqueue_scripts', array( $this, 'assets' ) );
		add_action( 'wp_ajax_' . $this->_get_ajax_action(), array( $this, 'ajax_rollback' ) );
		// Update version number when theme is manually replaced.
		add_action( 'admin_init', array( $this, 'store_previous_version_number' ) );
		// Update version number when theme is activated.
		add_action( 'after_switch_theme', array( $this, 'store_previous_version_number' ) );
		// Update version number when theme is updated.
		add_action( 'upgrader_process_complete', array( $this, 'store_previous_version_number' ), 10, 0 );
	}

	/**
	 * Handle REST API requests to rollback.
	 *
	 * @since 3.10
	 *
	 * @return void
	 */
	public function ajax_rollback() {
		if ( ! isset( $_GET['nonce'] ) || ! wp_verify_nonce( $_GET['nonce'], $this->_get_ajax_action() ) ) {
			wp_send_json_error( array(
				'errorCode' => 'et_unknown',
				'error'     => esc_html__( 'Security check failed. Please refresh and try again.', 'et-core' ),
			), 400 );
		}

		if ( ! current_user_can( 'install_themes' ) ) {
			wp_send_json_error( array(
				'errorCode' => 'et_unknown',
				'error'     => esc_html__( 'You don\'t have sufficient permissions to access this page.', 'et-core' ),
			), 400 );
		}

		if ( $this->_is_rolled_back() ) {
			$error = '
				<p>
					' . et_get_safe_localization( sprintf(
						__( 'You\'re currently rolled back to <strong>Version %1$s</strong> from <strong>Version %2$s</strong>.', 'et-core' ),
						esc_html( $this->_get_latest_installed_version() ),
						esc_html( $this->_get_previous_installed_version() )
					) ) . '
				</p>
				<p>
					' . et_get_safe_localization( sprintf(
						__( 'Update to the latest version to unlock the full power of %1$s. <a href="%2$s" target="_blank">Learn more here</a>.', 'et-core' ),
						esc_html( $this->product_name ),
						esc_url( $this->_get_update_documentation_url() )
					) ) . '
				</p>
			';

			wp_send_json_error( array(
				'errorCode' => 'et_unknown',
				'error'     => $error,
			), 400 );
		}

		$success = $this->rollback();

		if ( is_wp_error( $success ) ) {
			$error = $success->get_error_message();
			if ( $success->get_error_code() === 'et_version_rollback_blocklisted' ) {
				$error = '
					<p>
						' . et_get_safe_localization( sprintf(
							__( 'For privacy and security reasons, you cannot rollback to <strong>Version %1$s</strong>.', 'et-core' ),
							esc_html( $this->_get_previous_installed_version() )
						) ) . '
					</p>
					<p>
						<a href="' . esc_url( $this->_get_update_documentation_url() ) . '" target="_blank">
							' . esc_html__( 'Learn more here.', 'et-core' ) . '
						</a>
					</p>
				';
			}

			wp_send_json_error( array(
				'errorIsUnrecoverable' => in_array( $success->get_error_code(), array( 'et_version_rollback_not_available', 'et_version_rollback_blocklisted' ) ),
				'errorCode'            => $success->get_error_code(),
				'error'                => $error,
			), 400 );
		}

		wp_send_json_success();
	}

	/**
	 * Execute a version rollback.
	 *
	 * @since 3.10
	 *
	 * @return bool|WP_Error
	 */
	public function rollback() {
		// Load versions before rollback so they are not affected.
		$previous_version = $this->_get_previous_installed_version();
		$latest_version = $this->_get_latest_installed_version();

		$api = new ET_Core_API_ElegantThemes( $this->api_username, $this->api_key );
		$available = $api->is_product_available( $this->product_name, $previous_version );

		if ( is_wp_error( $available ) ) {
			$major_minor = implode( '.', array_slice( explode( '.', $previous_version ), 0, 2 ) );

			if ( $major_minor . '.0' === $previous_version ) {
					// Skip the trailing 0 in the version number and retry.
					$previous_version = $major_minor;
					$available        = $api->is_product_available( $this->product_name, $previous_version );
			}

			if ( is_wp_error( $available ) ) {
				return $available;
			}
		}

		$download_url = $api->get_download_url( $this->product_name, $previous_version );

		// Buffer and discard output as upgrader classes still output content even if the upgrader skin is silent.
		$buffer_started = ob_start();
		$result = $this->_install_theme( $download_url );
		if ( $buffer_started ) {
			ob_end_clean();
		}

		if ( is_wp_error( $result ) ) {
			return $result;
		}

		if ( true !== $result ) {
			return new WP_Error( 'et_unknown', esc_html__( 'An unknown error has occurred. Please try again later.', 'et-core' ) );
		}

		/**
		 * Fires after successful product version rollback.
		 *
		 * @since 3.26
		 *
		 * @param string $product_short_name    - The short name of the product rolling back.
		 * @param string $rollback_from_version - The product version rolling back from.
		 * @param string $rollback_to_version   - The product version rolling back to.
		 */
		do_action( 'et_after_version_rollback', $this->product_shortname, $latest_version, $previous_version );

		// Swap version numbers after a successful rollback.
		$this->_set_previous_installed_version( $latest_version );
		$this->_set_latest_installed_version( $previous_version );
	}

	/**
	 * Install a theme overwriting it if it already exists.
	 * Copied from Theme_Upgrader::install() due to lack of control over the clear_desination argument.
	 *
	 * @see Theme_Upgrader::install() @ WordPress 4.9.4
	 *
	 * @since 3.10
	 *
	 * @param string $package
	 *
	 * @return bool|WP_Error
	 */
	protected function _install_theme( $package ) {
		require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
		$upgrader = new Theme_Upgrader( new ET_Core_LIB_SilentThemeUpgraderSkin() );

		$defaults = array(
			'clear_update_cache' => true,
		);
		$parsed_args = wp_parse_args( array(), $defaults );

		$upgrader->init();
		$upgrader->install_strings();

		add_filter('upgrader_source_selection', array( $upgrader, 'check_package' ) );
		add_filter('upgrader_post_install', array( $upgrader, 'check_parent_theme_filter' ), 10, 3 );
		if ( $parsed_args['clear_update_cache'] ) {
			// Clear cache so wp_update_themes() knows about the new theme.
			add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
		}

		$upgrader->run( array(
			'package'           => $package,
			'destination'       => get_theme_root(),
			'clear_destination' => true, // Overwrite theme.
			'clear_working'     => true,
			'hook_extra'        => array(
				'type'              => 'theme',
				'action'            => 'install',
			),
		) );

		remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
		remove_filter( 'upgrader_source_selection', array( $upgrader, 'check_package' ) );
		remove_filter( 'upgrader_post_install', array( $upgrader, 'check_parent_theme_filter' ) );

		if ( ! $upgrader->result || is_wp_error( $upgrader->result ) ) {
			return $upgrader->result;
		}

		// Refresh the Theme Update information.
		wp_clean_themes_cache( $parsed_args['clear_update_cache'] );

		return true;
	}

	/**
	 * Get update documentation url for the product.
	 *
	 * @since 3.10
	 *
	 * @return string
	 */
	protected function _get_update_documentation_url() {
		return "https://www.elegantthemes.com/documentation/{$this->product_shortname}/update-{$this->product_shortname}/";
	}

	/**
	 * Return ePanel option.
	 *
	 * @since 3.10
	 *
	 * @return array
	 */
	public function get_epanel_option() {
		return array(
			'name'            => esc_html__( 'Version Rollback', 'et-core' ),
			'id'              => 'et_version_rollback',
			'type'            => 'callback_function',
			'function_name'   => array( $this, 'render_epanel_option' ),
			'desc'            => et_get_safe_localization( __( 'If you recently updated to a new version and are experiencing problems, you can easily roll back to the previously-installed version. We always recommend using the latest version and testing updates on a staging site. However, if you run into problems after updating you always have the option to roll back.', 'et-core' ) ),
		);
	}

	/**
	 * Render ePanel option.
	 *
	 * @since 3.10
	 *
	 * @return void
	 */
	public function render_epanel_option() {
		$previous = $this->_get_previous_installed_version();
		$modal_renderer = array( $this, 'render_epanel_no_previous_version_modal' );

		if ( ! empty( $previous ) ) {
			$modal_renderer = array( $this, 'render_epanel_confirm_rollback_modal' );

			if ( $this->_is_rolled_back() ) {
				$modal_renderer = array( $this, 'render_epanel_already_rolled_back_modal' );
			}
		}

		add_action( 'admin_footer', $modal_renderer );
		?>
		<button type="button" class="et-button et-button--simple" data-et-core-modal=".et-core-version-rollback-modal">
			<?php esc_html_e( 'Rollback to the previous version', 'et-core' ); ?>
		</button>
		<?php
	}

	/**
	 * Render ePanel warning modal when no previous supported version has been used.
	 *
	 * @since 3.10
	 *
	 * @return void
	 */
	public function render_epanel_no_previous_version_modal() {
		?>
		<div class="et-core-modal-overlay et-core-form et-core-version-rollback-modal et-core-modal-actionless">
			<div class="et-core-modal">
				<div class="et-core-modal-header">
					<h3 class="et-core-modal-title">
						<?php esc_html_e( 'Version Rollback', 'et-core' ); ?>
					</h3>
					<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
				</div>
				<div id="et-core-version-rollback-modal-content">
					<div class="et-core-modal-content">
						<p>
							<?php
							printf(
								esc_html__( 'The previously used version of %1$s does not support version rollback.', 'et-core' ),
								esc_html( $this->product_name )
							);
							?>
						</p>
					</div>
				</div>
			</div>
		</div>
		<?php
	}

	/**
	 * Render ePanel confirmation modal for rollback.
	 *
	 * @since 3.10
	 *
	 * @return void
	 */
	public function render_epanel_confirm_rollback_modal() {
		$action = $this->_get_ajax_action();
		$url = add_query_arg( array(
			'action'  => $action,
			'nonce'   => wp_create_nonce( $action ),
		), admin_url( 'admin-ajax.php' ) );
		?>
		<div class="et-core-modal-overlay et-core-form et-core-version-rollback-modal">
			<div class="et-core-modal">
				<div class="et-core-modal-header">
					<h3 class="et-core-modal-title">
						<?php esc_html_e( 'Version Rollback', 'et-core' ); ?>
					</h3>
					<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
				</div>
				<div id="et-core-version-rollback-modal-content">
					<div class="et-core-modal-content">
						<p>
							<?php
							echo et_get_safe_localization( sprintf(
								__( 'You\'ll be rolled back to <strong>Version %1$s</strong> from the current <strong>Version %2$s</strong>.', 'et-core' ),
								esc_html( $this->_get_previous_installed_version() ),
								esc_html( $this->_get_latest_installed_version() )
							) );
							?>
						</p>
						<p>
							<?php
							echo et_get_safe_localization( sprintf(
								__( 'Rolling back will reinstall the previous version of %1$s. You will be able to update to the latest version at any time. <a href="%2$s" target="_blank">Learn more here</a>.', 'et-core' ),
								esc_html( $this->product_name ),
								esc_url( $this->_get_update_documentation_url() )
							) );
							?>
						</p>
						<p>
							<strong>
								<?php esc_html_e( 'Make sure you have a full site backup before proceeding.', 'et-core' ); ?>
							</strong>
						</p>
					</div>
					<a class="et-core-modal-action et-core-version-rollback-confirm" href="<?php echo esc_url( $url ); ?>">
						<?php esc_html_e( 'Rollback to the previous version', 'et-core' ); ?>
					</a>
				</div>
			</div>
		</div>
		<?php
	}

	/**
	 * Render ePanel warning modal when a rollback has already been done.
	 *
	 * @since 3.10
	 *
	 * @return void
	 */
	public function render_epanel_already_rolled_back_modal() {
		?>
		<div class="et-core-modal-overlay et-core-form et-core-version-rollback-modal">
			<div class="et-core-modal">
				<div class="et-core-modal-header">
					<h3 class="et-core-modal-title">
						<?php esc_html_e( 'Version Rollback', 'et-core' ); ?>
					</h3>
					<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
				</div>
				<div id="et-core-version-rollback-modal-content">
					<div class="et-core-modal-content">
						<p>
							<?php
							echo et_get_safe_localization( sprintf(
								__( 'You\'re currently rolled back to <strong>Version %1$s</strong> from <strong>Version %2$s</strong>.', 'et-core' ),
								esc_html( $this->_get_latest_installed_version() ),
								esc_html( $this->_get_previous_installed_version() )
							) );
							?>
						</p>
						<p>
							<?php
							echo et_get_safe_localization( sprintf(
								__( 'Update to the latest version to unlock the full power of %1$s. <a href="%2$s" target="_blank">Learn more here</a>.', 'et-core' ),
								esc_html( $this->product_name ),
								esc_url( $this->_get_update_documentation_url() )
							) );
							?>
						</p>
					</div>
					<a class="et-core-modal-action" href="<?php echo esc_url( admin_url( 'update-core.php' ) ); ?>">
						<?php esc_html_e( 'Update to the Latest Version', 'et-core' ); ?>
					</a>
				</div>
			</div>
		</div>
		<?php
	}

	/**
	 * Store latest and previous installed version.
	 *
	 * @since 3.10
	 *
	 * @return void;
	 */
	public function store_previous_version_number() {
		$previous_installed_version = $this->_get_previous_installed_version();
		$latest_installed_version = $this->_get_latest_installed_version();

		// Get the theme version since the files may have changed but
		// we are still executing old code from memory.
		$theme_version = et_get_theme_version();

		if ( $latest_installed_version === $theme_version ) {
			return;
		}

		if ( empty( $latest_installed_version ) ) {
			$latest_installed_version = $theme_version;
		}

		if ( version_compare( $theme_version, $latest_installed_version, '!=') ) {
			$previous_installed_version = $latest_installed_version;
			$latest_installed_version = $theme_version;
		}

		/**
		 * Fires after new version number is updated.
		 *
		 * @since 4.10.0
		 */
		do_action( 'et_store_before_new_version_update' );

		$this->_set_previous_installed_version( $previous_installed_version );
		$this->_set_latest_installed_version( $latest_installed_version );

		/**
		 * Fires after new version number is updated.
		 *
		 * @since 4.10.0
		 */
		do_action( 'et_store_after_new_version_update' );
	}

}
endif;
jquery/jquery.min.map000064400000477420152336434510010707 0ustar00{"version":3,"sources":["jquery-4.0.0.js"],"names":["global","factory","module","exports","window","noGlobal","document","Error","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","toType","obj","isWindow","isArrayLike","length","type","document$1","preservedScriptAttributes","src","nonce","noModule","DOMEval","code","node","doc","i","script","createElement","text","head","appendChild","parentNode","removeChild","version","rhtmlSuffix","jQuery","selector","context","fn","init","nodeName","elem","name","toLowerCase","prototype","jquery","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","extend","options","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","nodeType","textContent","documentElement","nodeValue","makeArray","results","inArray","isXMLDoc","namespace","namespaceURI","docElem","ownerDocument","test","contains","a","b","bup","compareDocumentPosition","second","invert","matches","callbackExpect","callbackInverse","arg","value","guid","Symbol","iterator","split","_i","pop","whitespace","isIE","documentMode","rbuggyQSA","RegExp","rtrimCSS","identifier","rleadingCombinator","rdescend","rsibling","documentElement$1","msMatchesSelector","createCache","keys","cache","key","expr","cacheLength","shift","testContext","getElementsByTagName","attributes","pseudos","filterMatchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","rpseudo","runescape","funescape","escape","nonHex","high","String","fromCharCode","unescapeSelector","sel","selectorError","rcomma","tokenCache","tokenize","parseOnly","matched","match","tokens","soFar","groups","preFilters","cached","preFilter","exec","toSelector","access","chainable","emptyGet","raw","bulk","_key","rnothtmlwhite","attr","removeAttr","hooks","nType","getAttribute","prop","attrHooks","set","setAttribute","attrNames","removeAttribute","val","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","escapeSelector","sort","splice","sortOrder","hasDuplicate","compare","uniqueSort","duplicates","outermostContext","documentIsHTML","dirruns","done","classCache","compilerCache","nonnativeSelectorCache","rwhitespace","ridentifier","matchExpr","needsContext","rinputs","rheader","rquickExpr$1","unloadHandler","setDocument","inDisabledFieldset","addCombinator","disabled","dir","next","find","seed","m","nid","newSelector","newContext","getElementById","getElementsByClassName","join","querySelectorAll","qsaError","select","markFunction","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","subWindow","defaultView","top","addEventListener","elements","matchesSelector","e","createPseudo","id","tag","className","relative","excess","unquoted","filter","attrId","nodeNameSelector","expectedNodeName","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","outerCache","nodeIndex","start","parent","useCache","diff","firstChild","lastChild","childNodes","pseudo","setFilters","not","input","matcher","compile","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","nextSibling","header","button","_matchIndexes","lt","gt","nth","radio","checkbox","file","password","image","createInputPseudo","submit","reset","createButtonPseudo","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","bySet","byElement","superMatcher","setMatchers","elementMatchers","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","setMatcher","postFilter","postFinder","postSelector","temp","matcherOut","preMap","postMap","preexisting","multipleContexts","contexts","matcherIn","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","until","truncate","is","siblings","n","rneedsContext","rsingleTag","isObviousHtml","winnow","qualifier","self","rootjQuery","rquickExpr","ready","parseHTML","rparentsprev","guaranteedUnique","children","contents","prev","sibling","cur","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","targets","l","closest","selectors","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","Callbacks","object","_","flag","firing","memory","fired","locked","list","queue","firingIndex","fire","once","stopOnFalse","args","unique","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","handler","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","rejectWith","getErrorHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","asyncError","console","warn","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","create","defineProperty","configurable","data","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","attrs","dequeue","startLength","_queueHooks","unshift","stop","setter","clearQueue","tmp","count","defer","pnum","source","rcssNum","cssExpand","isHiddenWithinTree","el","style","display","css","ralphaStart","rautoPx","isAutoPx","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","initialInUnit","rmsPrefix","cssCamelCase","defaultDisplayMap","showHide","show","values","getDefaultDisplay","body","hide","toggle","isAttached","getRootNode","composed","rtagName","wrapMap","thead","col","tr","td","getAll","tbody","tfoot","colgroup","caption","th","rscriptType","setGlobalEval","refElements","rhtml","buildFragment","scripts","selection","ignored","wrap","attached","fragment","createDocumentFragment","nodes","innerHTML","htmlPrefilter","createTextNode","disableScript","restoreScript","domManip","collection","hasScripts","iNoClone","html","_evalUrl","crossOrigin","rcheckableType","rtypenamespace","returnTrue","returnFalse","on","types","one","origFn","event","off","leverageNative","isSetup","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","isImmediatePropagationStopped","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","Event","enumerable","originalEvent","writable","load","noBubble","click","_default","beforeunload","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","Date","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","focusMappedHandler","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","manipulationTarget","cloneCopyEvent","dest","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","cloneNode","inPage","defaultValue","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","rcustomProp","getStyles","getComputedStyle","curCSS","computed","isCustomProp","getPropertyValue","cssPrefixes","emptyStyle","finalPropName","vendorPropName","capName","reliableTrDimensionsVal","reliableColDimensionsVal","table","computeTableStyleTests","trStyle","cssText","span","offsetWidth","round","parseFloat","width","height","borderTopWidth","borderBottomWidth","offsetHeight","reliableTrDimensions","reliableColDimensions","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","marginDelta","ceil","getWidthOrHeight","boxSizingNeeded","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","origName","setProperty","isFinite","swap","old","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","linear","p","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","createFxNow","genFx","includeWidth","opacity","createTween","animation","Animation","tweeners","properties","stopped","prefilters","tick","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","hidden","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","schedule","requestAnimationFrame","slow","fast","delay","time","timeout","clearTimeout","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","parseInt","addClass","classNames","curValue","finalValue","removeClass","toggleClass","stateVal","hasClass","valueIsFunction","valHooks","option","optionSet","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","param","traditional","s","valueOrFunction","encodeURIComponent","buildParams","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","rlocalProtocol","protocol","processData","async","contentType","accepts","json","responseFields","converters","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ajaxHandleResponses","ct","finalDataType","firstDataType","ajaxConvert","conv2","current","conv","dataFilter","throws","getJSON","getScript","scriptAttrs","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","canUseScriptTag","open","username","xhrFields","onload","onerror","onabort","ontimeout","responseType","responseText","binary","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","origOptions","FormData","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","left","using","rect","win","getBoundingClientRect","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollLeft","scrollTop","scrollTo","Height","Width","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","filters","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAUA,AAAE,SAAUA,CAAM,CAAEC,CAAO,EAE1B,YAEK,AAAkB,CAAA,UAAlB,OAAOC,QAAuB,AAA0B,UAA1B,OAAOA,OAAOC,OAAO,CAIvDD,OAAOC,OAAO,CAAGF,EAASD,EAAQ,CAAA,GAElCC,EAASD,EAIX,EAAK,AAAkB,aAAlB,OAAOI,OAAyBA,OAAS,IAAI,CAAE,SAAUA,CAAM,CAAEC,CAAQ,EAE9E,aAEA,GAAK,CAACD,EAAOE,QAAQ,CACpB,MAAM,AAAIC,MAAO,4CAGlB,IAAIC,EAAM,EAAE,CAERC,EAAWC,OAAOC,cAAc,CAEhCC,EAAQJ,EAAII,KAAK,CAIjBC,EAAOL,EAAIK,IAAI,CAAG,SAAUC,CAAK,EACpC,OAAON,EAAIK,IAAI,CAACE,IAAI,CAAED,EACvB,EAAI,SAAUA,CAAK,EAClB,OAAON,EAAIQ,MAAM,CAACC,KAAK,CAAE,EAAE,CAAEH,EAC9B,EAEII,EAAOV,EAAIU,IAAI,CAEfC,EAAUX,EAAIW,OAAO,CAGrBC,EAAa,CAAC,EAEdC,EAAWD,EAAWC,QAAQ,CAE9BC,EAASF,EAAWG,cAAc,CAElCC,EAAaF,E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AAE,WACrB,OAAOhiC,CACR,GAGD,IAGCkiC,GAAUllC,EAAOgD,MAAM,CAGvBmiC,GAAKnlC,EAAOolC,CAAC,CAqBd,OAnBApiC,EAAOqiC,UAAU,CAAG,SAAU9/B,CAAI,EASjC,OARKvF,EAAOolC,CAAC,GAAKpiC,GACjBhD,CAAAA,EAAOolC,CAAC,CAAGD,EAAC,EAGR5/B,GAAQvF,EAAOgD,MAAM,GAAKA,GAC9BhD,CAAAA,EAAOgD,MAAM,CAAGkiC,EAAM,EAGhBliC,CACR,EAKK,AAAoB,KAAA,IAAb/C,GACXD,CAAAA,EAAOgD,MAAM,CAAGhD,EAAOolC,CAAC,CAAGpiC,CAAK,EAG1BA,CAEP","file":"jquery-4.0.0.min.js"}jquery/package.json000064400000001422152336434510010356 0ustar00{
    "name": "jquery",
    "description": "JavaScript library for DOM operations",
    "version": "4.0.0",
    "homepage": "http://jquery.com",
    "author": {
        "name": "jQuery Foundation and other contributors",
        "url": "https://github.com/jquery/jquery/blob/master/AUTHORS.txt"
    },
    "repository": {
        "type": "git",
        "url": "https://github.com/jquery/jquery.git"
    },
    "keywords": [
        "jquery",
        "javascript",
        "browser",
        "library"
    ],
    "bugs": {
        "url": "https://github.com/jquery/jquery/issues"
    },
    "licenses": [
        {
            "type": "MIT",
            "url": "https://github.com/jquery/jquery/blob/master/LICENSE.txt"
        }
    ],
    "spm": {
        "main": "jquery.js"
    }
}

jquery/jquery.js000064400000763737152336434510007775 0ustar00/*!
 * jQuery JavaScript Library v4.0.0
 * https://jquery.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.com/license/
 *
 * Date: 2026-01-18T00:20Z
 */
( function( global, factory ) {

	"use strict";

	if ( typeof module === "object" && typeof module.exports === "object" ) {

		// For CommonJS and CommonJS-like environments where a proper `window`
		// is present, execute the factory and get jQuery.
		module.exports = factory( global, true );
	} else {
		factory( global );
	}

// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

"use strict";

if ( !window.document ) {
	throw new Error( "jQuery requires a window with a document" );
}

var arr = [];

var getProto = Object.getPrototypeOf;

var slice = arr.slice;

// Support: IE 11+
// IE doesn't have Array#flat; provide a fallback.
var flat = arr.flat ? function( array ) {
	return arr.flat.call( array );
} : function( array ) {
	return arr.concat.apply( [], array );
};

var push = arr.push;

var indexOf = arr.indexOf;

// [[Class]] -> type pairs
var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var fnToString = hasOwn.toString;

var ObjectFunctionString = fnToString.call( Object );

// All support tests are defined in their respective modules.
var support = {};

function toType( obj ) {
	if ( obj == null ) {
		return obj + "";
	}

	return typeof obj === "object" ?
		class2type[ toString.call( obj ) ] || "object" :
		typeof obj;
}

function isWindow( obj ) {
	return obj != null && obj === obj.window;
}

function isArrayLike( obj ) {

	var length = !!obj && obj.length,
		type = toType( obj );

	if ( typeof obj === "function" || isWindow( obj ) ) {
		return false;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}

var document$1 = window.document;

var preservedScriptAttributes = {
	type: true,
	src: true,
	nonce: true,
	noModule: true
};

function DOMEval( code, node, doc ) {
	doc = doc || document$1;

	var i,
		script = doc.createElement( "script" );

	script.text = code;
	for ( i in preservedScriptAttributes ) {
		if ( node && node[ i ] ) {
			script[ i ] = node[ i ];
		}
	}

	if ( doc.head.appendChild( script ).parentNode ) {
		script.parentNode.removeChild( script );
	}
}

var version = "4.0.0",

	rhtmlSuffix = /HTML$/i,

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {

		// The jQuery object is actually just the init constructor 'enhanced'
		// Need init if jQuery is called (just allow error to be thrown if not included)
		return new jQuery.fn.init( selector, context );
	};

jQuery.fn = jQuery.prototype = {

	// The current version of jQuery being used
	jquery: version,

	constructor: jQuery,

	// The default length of a jQuery object is 0
	length: 0,

	toArray: function() {
		return slice.call( this );
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {

		// Return all the elements in a clean array
		if ( num == null ) {
			return slice.call( this );
		}

		// Return just the one element from the set
		return num < 0 ? this[ num + this.length ] : this[ num ];
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	each: function( callback ) {
		return jQuery.each( this, callback );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map( this, function( elem, i ) {
			return callback.call( elem, i, elem );
		} ) );
	},

	slice: function() {
		return this.pushStack( slice.apply( this, arguments ) );
	},

	first: function() {
		return this.eq( 0 );
	},

	last: function() {
		return this.eq( -1 );
	},

	even: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return ( i + 1 ) % 2;
		} ) );
	},

	odd: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return i % 2;
		} ) );
	},

	eq: function( i ) {
		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
	},

	end: function() {
		return this.prevObject || this.constructor();
	}
};

jQuery.extend = jQuery.fn.extend = function() {
	var options, name, src, copy, copyIsArray, clone,
		target = arguments[ 0 ] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;

		// Skip the boolean and the target
		target = arguments[ i ] || {};
		i++;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && typeof target !== "function" ) {
		target = {};
	}

	// Extend jQuery itself if only one argument is passed
	if ( i === length ) {
		target = this;
		i--;
	}

	for ( ; i < length; i++ ) {

		// Only deal with non-null/undefined values
		if ( ( options = arguments[ i ] ) != null ) {

			// Extend the base object
			for ( name in options ) {
				copy = options[ name ];

				// Prevent Object.prototype pollution
				// Prevent never-ending loop
				if ( name === "__proto__" || target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
					( copyIsArray = Array.isArray( copy ) ) ) ) {
					src = target[ name ];

					// Ensure proper type for the source value
					if ( copyIsArray && !Array.isArray( src ) ) {
						clone = [];
					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
						clone = {};
					} else {
						clone = src;
					}
					copyIsArray = false;

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

jQuery.extend( {

	// Unique for each copy of jQuery on the page
	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

	// Assume jQuery is ready without the ready module
	isReady: true,

	error: function( msg ) {
		throw new Error( msg );
	},

	noop: function() {},

	isPlainObject: function( obj ) {
		var proto, Ctor;

		// Detect obvious negatives
		// Use toString instead of jQuery.type to catch host objects
		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
			return false;
		}

		proto = getProto( obj );

		// Objects with no prototype (e.g., `Object.create( null )`) are plain
		if ( !proto ) {
			return true;
		}

		// Objects with prototype are plain iff they were constructed by a global Object function
		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
	},

	isEmptyObject: function( obj ) {
		var name;

		for ( name in obj ) {
			return false;
		}
		return true;
	},

	// Evaluates a script in a provided context; falls back to the global one
	// if not specified.
	globalEval: function( code, options, doc ) {
		DOMEval( code, { nonce: options && options.nonce }, doc );
	},

	each: function( obj, callback ) {
		var length, i = 0;

		if ( isArrayLike( obj ) ) {
			length = obj.length;
			for ( ; i < length; i++ ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		} else {
			for ( i in obj ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		}

		return obj;
	},


	// Retrieve the text value of an array of DOM nodes
	text: function( elem ) {
		var node,
			ret = "",
			i = 0,
			nodeType = elem.nodeType;

		if ( !nodeType ) {

			// If no nodeType, this is expected to be an array
			while ( ( node = elem[ i++ ] ) ) {

				// Do not traverse comment nodes
				ret += jQuery.text( node );
			}
		}
		if ( nodeType === 1 || nodeType === 11 ) {
			return elem.textContent;
		}
		if ( nodeType === 9 ) {
			return elem.documentElement.textContent;
		}
		if ( nodeType === 3 || nodeType === 4 ) {
			return elem.nodeValue;
		}

		// Do not include comment or processing instruction nodes

		return ret;
	},


	// results is for internal usage only
	makeArray: function( arr, results ) {
		var ret = results || [];

		if ( arr != null ) {
			if ( isArrayLike( Object( arr ) ) ) {
				jQuery.merge( ret,
					typeof arr === "string" ?
						[ arr ] : arr
				);
			} else {
				push.call( ret, arr );
			}
		}

		return ret;
	},

	inArray: function( elem, arr, i ) {
		return arr == null ? -1 : indexOf.call( arr, elem, i );
	},

	isXMLDoc: function( elem ) {
		var namespace = elem && elem.namespaceURI,
			docElem = elem && ( elem.ownerDocument || elem ).documentElement;

		// Assume HTML when documentElement doesn't yet exist, such as inside
		// document fragments.
		return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
	},

	// Note: an element does not contain itself
	contains: function( a, b ) {
		var bup = b && b.parentNode;

		return a === bup || !!( bup && bup.nodeType === 1 && (

			// Support: IE 9 - 11+
			// IE doesn't have `contains` on SVG.
			a.contains ?
				a.contains( bup ) :
				a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
		) );
	},

	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		for ( ; j < len; j++ ) {
			first[ i++ ] = second[ j ];
		}

		first.length = i;

		return first;
	},

	grep: function( elems, callback, invert ) {
		var callbackInverse,
			matches = [],
			i = 0,
			length = elems.length,
			callbackExpect = !invert;

		// Go through the array, only saving the items
		// that pass the validator function
		for ( ; i < length; i++ ) {
			callbackInverse = !callback( elems[ i ], i );
			if ( callbackInverse !== callbackExpect ) {
				matches.push( elems[ i ] );
			}
		}

		return matches;
	},

	// arg is for internal usage only
	map: function( elems, callback, arg ) {
		var length, value,
			i = 0,
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArrayLike( elems ) ) {
			length = elems.length;
			for ( ; i < length; i++ ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}

		// Go through every key on the object,
		} else {
			for ( i in elems ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}
		}

		// Flatten any nested arrays
		return flat( ret );
	},

	// A global GUID counter for objects
	guid: 1,

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
} );

if ( typeof Symbol === "function" ) {
	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
	function( _i, name ) {
		class2type[ "[object " + name + "]" ] = name.toLowerCase();
	} );

function nodeName( elem, name ) {
	return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
}

var pop = arr.pop;

// https://www.w3.org/TR/css3-selectors/#whitespace
var whitespace = "[\\x20\\t\\r\\n\\f]";

var isIE = document$1.documentMode;

var rbuggyQSA = isIE && new RegExp(

	// Support: IE 9 - 11+
	// IE's :disabled selector does not pick up the children of disabled fieldsets
	":enabled|:disabled|" +

	// Support: IE 11+
	// IE 11 doesn't find elements on a `[name='']` query in some cases.
	// Adding a temporary attribute to the document before the selection works
	// around the issue.
	"\\[" + whitespace + "*name" + whitespace + "*=" +
	whitespace + "*(?:''|\"\")"

);

var rtrimCSS = new RegExp(
	"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
	"g"
);

// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
var identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
	"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+";

var rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" +
	whitespace + ")" + whitespace + "*" );

var rdescend = new RegExp( whitespace + "|>" );

var rsibling = /[+~]/;

var documentElement$1 = document$1.documentElement;

// Support: IE 9 - 11+
// IE requires a prefix.
var matches = documentElement$1.matches || documentElement$1.msMatchesSelector;

/**
 * Create key-value caches of limited size
 * @returns {function(string, object)} Returns the Object data after storing it on itself with
 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 *	deleting the oldest entry
 */
function createCache() {
	var keys = [];

	function cache( key, value ) {

		// Use (key + " ") to avoid collision with native prototype properties
		// (see https://github.com/jquery/sizzle/issues/157)
		if ( keys.push( key + " " ) > jQuery.expr.cacheLength ) {

			// Only keep the most recent entries
			delete cache[ keys.shift() ];
		}
		return ( cache[ key + " " ] = value );
	}
	return cache;
}

/**
 * Checks a node for validity as a jQuery selector context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}

// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
var attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +

	// Operator (capture 2)
	"*([*^$|!~]?=)" + whitespace +

	// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
	"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
	whitespace + "*\\]";

var pseudos = ":(" + identifier + ")(?:\\((" +

	// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
	// 1. quoted (capture 3; capture 4 or capture 5)
	"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +

	// 2. simple (capture 6)
	"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +

	// 3. anything else (capture 2)
	".*" +
	")\\)|)";

var filterMatchExpr = {
	ID: new RegExp( "^#(" + identifier + ")" ),
	CLASS: new RegExp( "^\\.(" + identifier + ")" ),
	TAG: new RegExp( "^(" + identifier + "|[*])" ),
	ATTR: new RegExp( "^" + attributes ),
	PSEUDO: new RegExp( "^" + pseudos ),
	CHILD: new RegExp(
		"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
		whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
		whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" )
};

var rpseudo = new RegExp( pseudos );

// CSS escapes
// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters

var runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
	"?|\\\\([^\\r\\n\\f])", "g" ),
	funescape = function( escape, nonHex ) {
		var high = "0x" + escape.slice( 1 ) - 0x10000;

		if ( nonHex ) {

			// Strip the backslash prefix from a non-hex escape sequence
			return nonHex;
		}

		// Replace a hexadecimal escape sequence with the encoded Unicode code point
		// Support: IE <=11+
		// For values outside the Basic Multilingual Plane (BMP), manually construct a
		// surrogate pair
		return high < 0 ?
			String.fromCharCode( high + 0x10000 ) :
			String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
	};

function unescapeSelector( sel ) {
	return sel.replace( runescape, funescape );
}

function selectorError( msg ) {
	jQuery.error( "Syntax error, unrecognized expression: " + msg );
}

var rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" );

var tokenCache = createCache();

function tokenize( selector, parseOnly ) {
	var matched, match, tokens, type,
		soFar, groups, preFilters,
		cached = tokenCache[ selector + " " ];

	if ( cached ) {
		return parseOnly ? 0 : cached.slice( 0 );
	}

	soFar = selector;
	groups = [];
	preFilters = jQuery.expr.preFilter;

	while ( soFar ) {

		// Comma and first run
		if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
			if ( match ) {

				// Don't consume trailing commas as valid
				soFar = soFar.slice( match[ 0 ].length ) || soFar;
			}
			groups.push( ( tokens = [] ) );
		}

		matched = false;

		// Combinators
		if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
			matched = match.shift();
			tokens.push( {
				value: matched,

				// Cast descendant combinators to space
				type: match[ 0 ].replace( rtrimCSS, " " )
			} );
			soFar = soFar.slice( matched.length );
		}

		// Filters
		for ( type in filterMatchExpr ) {
			if ( ( match = jQuery.expr.match[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
				( match = preFilters[ type ]( match ) ) ) ) {
				matched = match.shift();
				tokens.push( {
					value: matched,
					type: type,
					matches: match
				} );
				soFar = soFar.slice( matched.length );
			}
		}

		if ( !matched ) {
			break;
		}
	}

	// Return the length of the invalid excess
	// if we're just parsing
	// Otherwise, throw an error or return tokens
	if ( parseOnly ) {
		return soFar.length;
	}

	return soFar ?
		selectorError( selector ) :

		// Cache the tokens
		tokenCache( selector, groups ).slice( 0 );
}

var preFilter = {
	ATTR: function( match ) {
		match[ 1 ] = unescapeSelector( match[ 1 ] );

		// Move the given value to match[3] whether quoted or unquoted
		match[ 3 ] = unescapeSelector( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" );

		if ( match[ 2 ] === "~=" ) {
			match[ 3 ] = " " + match[ 3 ] + " ";
		}

		return match.slice( 0, 4 );
	},

	CHILD: function( match ) {

		/* matches from filterMatchExpr["CHILD"]
			1 type (only|nth|...)
			2 what (child|of-type)
			3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
			4 xn-component of xn+y argument ([+-]?\d*n|)
			5 sign of xn-component
			6 x of xn-component
			7 sign of y-component
			8 y of y-component
		*/
		match[ 1 ] = match[ 1 ].toLowerCase();

		if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {

			// nth-* requires argument
			if ( !match[ 3 ] ) {
				selectorError( match[ 0 ] );
			}

			// numeric x and y parameters for jQuery.expr.filter.CHILD
			// remember that false/true cast respectively to 0/1
			match[ 4 ] = +( match[ 4 ] ?
				match[ 5 ] + ( match[ 6 ] || 1 ) :
				2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
			);
			match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );

		// other types prohibit arguments
		} else if ( match[ 3 ] ) {
			selectorError( match[ 0 ] );
		}

		return match;
	},

	PSEUDO: function( match ) {
		var excess,
			unquoted = !match[ 6 ] && match[ 2 ];

		if ( filterMatchExpr.CHILD.test( match[ 0 ] ) ) {
			return null;
		}

		// Accept quoted arguments as-is
		if ( match[ 3 ] ) {
			match[ 2 ] = match[ 4 ] || match[ 5 ] || "";

		// Strip excess characters from unquoted arguments
		} else if ( unquoted && rpseudo.test( unquoted ) &&

			// Get excess from tokenize (recursively)
			( excess = tokenize( unquoted, true ) ) &&

			// advance to the next closing parenthesis
			( excess = unquoted.indexOf( ")", unquoted.length - excess ) -
				unquoted.length ) ) {

			// excess is a negative index
			match[ 0 ] = match[ 0 ].slice( 0, excess );
			match[ 2 ] = unquoted.slice( 0, excess );
		}

		// Return only captures needed by the pseudo filter method (type and argument)
		return match.slice( 0, 3 );
	}
};

function toSelector( tokens ) {
	var i = 0,
		len = tokens.length,
		selector = "";
	for ( ; i < len; i++ ) {
		selector += tokens[ i ].value;
	}
	return selector;
}

// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
function access( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		len = elems.length,
		bulk = key == null;

	// Sets many values
	if ( toType( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			access( elems, fn, i, key[ i ], true, emptyGet, raw );
		}

	// Sets one value
	} else if ( value !== undefined ) {
		chainable = true;

		if ( typeof value !== "function" ) {
			raw = true;
		}

		if ( bulk ) {

			// Bulk operations run against the entire set
			if ( raw ) {
				fn.call( elems, value );
				fn = null;

			// ...except when executing function values
			} else {
				bulk = fn;
				fn = function( elem, _key, value ) {
					return bulk.call( jQuery( elem ), value );
				};
			}
		}

		if ( fn ) {
			for ( ; i < len; i++ ) {
				fn(
					elems[ i ], key, raw ?
						value :
						value.call( elems[ i ], i, fn( elems[ i ], key ) )
				);
			}
		}
	}

	if ( chainable ) {
		return elems;
	}

	// Gets
	if ( bulk ) {
		return fn.call( elems );
	}

	return len ? fn( elems[ 0 ], key ) : emptyGet;
}

// Only count HTML whitespace
// Other whitespace should count in values
// https://infra.spec.whatwg.org/#ascii-whitespace
var rnothtmlwhite = /[^\x20\t\r\n\f]+/g;

jQuery.fn.extend( {
	attr: function( name, value ) {
		return access( this, jQuery.attr, name, value, arguments.length > 1 );
	},

	removeAttr: function( name ) {
		return this.each( function() {
			jQuery.removeAttr( this, name );
		} );
	}
} );

jQuery.extend( {
	attr: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set attributes on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === "undefined" ) {
			return jQuery.prop( elem, name, value );
		}

		// Attribute hooks are determined by the lowercase version
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			hooks = jQuery.attrHooks[ name.toLowerCase() ];
		}

		if ( value !== undefined ) {
			if ( value === null ||

				// For compat with previous handling of boolean attributes,
				// remove when `false` passed. For ARIA attributes -
				// many of which recognize a `"false"` value - continue to
				// set the `"false"` value as jQuery <4 did.
				( value === false && name.toLowerCase().indexOf( "aria-" ) !== 0 ) ) {

				jQuery.removeAttr( elem, name );
				return;
			}

			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			elem.setAttribute( name, value );
			return value;
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		ret = elem.getAttribute( name );

		// Non-existent attributes return null, we normalize to undefined
		return ret == null ? undefined : ret;
	},

	attrHooks: {},

	removeAttr: function( elem, value ) {
		var name,
			i = 0,

			// Attribute names can contain non-HTML whitespace characters
			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
			attrNames = value && value.match( rnothtmlwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( ( name = attrNames[ i++ ] ) ) {
				elem.removeAttribute( name );
			}
		}
	}
} );

// Support: IE <=11+
// An input loses its value after becoming a radio
if ( isIE ) {
	jQuery.attrHooks.type = {
		set: function( elem, value ) {
			if ( value === "radio" && nodeName( elem, "input" ) ) {
				var val = elem.value;
				elem.setAttribute( "type", value );
				if ( val ) {
					elem.value = val;
				}
				return value;
			}
		}
	};
}

// CSS string/identifier serialization
// https://drafts.csswg.org/cssom/#common-serializing-idioms
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;

function fcssescape( ch, asCodePoint ) {
	if ( asCodePoint ) {

		// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
		if ( ch === "\0" ) {
			return "\uFFFD";
		}

		// Control characters and (dependent upon position) numbers get escaped as code points
		return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
	}

	// Other potentially-special ASCII characters get backslash-escaped
	return "\\" + ch;
}

jQuery.escapeSelector = function( sel ) {
	return ( sel + "" ).replace( rcssescape, fcssescape );
};

var sort = arr.sort;

var splice = arr.splice;

var hasDuplicate;

// Document order sorting
function sortOrder( a, b ) {

	// Flag for duplicate removal
	if ( a === b ) {
		hasDuplicate = true;
		return 0;
	}

	// Sort on method existence if only one input has compareDocumentPosition
	var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
	if ( compare ) {
		return compare;
	}

	// Calculate position if both inputs belong to the same document
	// Support: IE 11+
	// IE sometimes throws a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
		a.compareDocumentPosition( b ) :

		// Otherwise we know they are disconnected
		1;

	// Disconnected nodes
	if ( compare & 1 ) {

		// Choose the first element that is related to the document
		// Support: IE 11+
		// IE sometimes throws a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		if ( a == document$1 || a.ownerDocument == document$1 &&
			jQuery.contains( document$1, a ) ) {
			return -1;
		}

		// Support: IE 11+
		// IE sometimes throws a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		if ( b == document$1 || b.ownerDocument == document$1 &&
			jQuery.contains( document$1, b ) ) {
			return 1;
		}

		// Maintain original order
		return 0;
	}

	return compare & 4 ? -1 : 1;
}

/**
 * Document sorting and removing duplicates
 * @param {ArrayLike} results
 */
jQuery.uniqueSort = function( results ) {
	var elem,
		duplicates = [],
		j = 0,
		i = 0;

	hasDuplicate = false;

	sort.call( results, sortOrder );

	if ( hasDuplicate ) {
		while ( ( elem = results[ i++ ] ) ) {
			if ( elem === results[ i ] ) {
				j = duplicates.push( i );
			}
		}
		while ( j-- ) {
			splice.call( results, duplicates[ j ], 1 );
		}
	}

	return results;
};

jQuery.fn.uniqueSort = function() {
	return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
};

var i,
	outermostContext,

	// Local document vars
	document,
	documentElement,
	documentIsHTML,

	// Instance-specific data
	dirruns = 0,
	done = 0,
	classCache = createCache(),
	compilerCache = createCache(),
	nonnativeSelectorCache = createCache(),

	// Regular expressions

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),

	ridentifier = new RegExp( "^" + identifier + "$" ),

	matchExpr = jQuery.extend( {

		// For use in libraries implementing .is()
		// We use this for POS matching in `select`
		needsContext: new RegExp( "^" + whitespace +
			"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
			"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
	}, filterMatchExpr ),

	rinputs = /^(?:input|select|textarea|button)$/i,
	rheader = /^h\d$/i,

	// Easily-parseable/retrievable ID or TAG or CLASS selectors
	rquickExpr$1 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

	// Used for iframes; see `setDocument`.
	// Support: IE 9 - 11+
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE.
	unloadHandler = function() {
		setDocument();
	},

	inDisabledFieldset = addCombinator(
		function( elem ) {
			return elem.disabled === true && nodeName( elem, "fieldset" );
		},
		{ dir: "parentNode", next: "legend" }
	);

function find( selector, context, results, seed ) {
	var m, i, elem, nid, match, groups, newSelector,
		newContext = context && context.ownerDocument,

		// nodeType defaults to 9, since context defaults to document
		nodeType = context ? context.nodeType : 9;

	results = results || [];

	// Return early from calls with invalid selector or context
	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	// Try to shortcut find operations (as opposed to filters) in HTML documents
	if ( !seed ) {
		setDocument( context );
		context = context || document;

		if ( documentIsHTML ) {

			// If the selector is sufficiently simple, try using a "get*By*" DOM method
			// (excepting DocumentFragment context, where the methods don't exist)
			if ( nodeType !== 11 && ( match = rquickExpr$1.exec( selector ) ) ) {

				// ID selector
				if ( ( m = match[ 1 ] ) ) {

					// Document context
					if ( nodeType === 9 ) {
						if ( ( elem = context.getElementById( m ) ) ) {
							push.call( results, elem );
						}
						return results;

					// Element context
					} else {
						if ( newContext && ( elem = newContext.getElementById( m ) ) &&
							jQuery.contains( context, elem ) ) {

							push.call( results, elem );
							return results;
						}
					}

				// Type selector
				} else if ( match[ 2 ] ) {
					push.apply( results, context.getElementsByTagName( selector ) );
					return results;

				// Class selector
				} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
					push.apply( results, context.getElementsByClassName( m ) );
					return results;
				}
			}

			// Take advantage of querySelectorAll
			if ( !nonnativeSelectorCache[ selector + " " ] &&
				( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {

				newSelector = selector;
				newContext = context;

				// qSA considers elements outside a scoping root when evaluating child or
				// descendant combinators, which is not what we want.
				// In such cases, we work around the behavior by prefixing every selector in the
				// list with an ID selector referencing the scope context.
				// The technique has to be used as well when a leading combinator is used
				// as such selectors are not recognized by querySelectorAll.
				// Thanks to Andrew Dupont for this technique.
				if ( nodeType === 1 &&
					( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {

					// Expand context for sibling selectors
					newContext = rsibling.test( selector ) &&
						testContext( context.parentNode ) ||
						context;

					// Outside of IE, if we're not changing the context we can
					// use :scope instead of an ID.
					// Support: IE 11+
					// IE sometimes throws a "Permission denied" error when strict-comparing
					// two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( newContext != context || isIE ) {

						// Capture the context ID, setting it first if necessary
						if ( ( nid = context.getAttribute( "id" ) ) ) {
							nid = jQuery.escapeSelector( nid );
						} else {
							context.setAttribute( "id", ( nid = jQuery.expando ) );
						}
					}

					// Prefix every selector in the list
					groups = tokenize( selector );
					i = groups.length;
					while ( i-- ) {
						groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
							toSelector( groups[ i ] );
					}
					newSelector = groups.join( "," );
				}

				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch ( qsaError ) {
					nonnativeSelectorCache( selector, true );
				} finally {
					if ( nid === jQuery.expando ) {
						context.removeAttribute( "id" );
					}
				}
			}
		}
	}

	// All others
	return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
}

/**
 * Mark a function for special use by jQuery selector module
 * @param {Function} fn The function to mark
 */
function markFunction( fn ) {
	fn[ jQuery.expando ] = true;
	return fn;
}

/**
 * Returns a function to use in pseudos for input types
 * @param {String} type
 */
function createInputPseudo( type ) {
	return function( elem ) {
		return nodeName( elem, "input" ) && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for buttons
 * @param {String} type
 */
function createButtonPseudo( type ) {
	return function( elem ) {
		return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
			elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for :enabled/:disabled
 * @param {Boolean} disabled true for :disabled; false for :enabled
 */
function createDisabledPseudo( disabled ) {

	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
	return function( elem ) {

		// Only certain elements can match :enabled or :disabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
		if ( "form" in elem ) {

			// Check for inherited disabledness on relevant non-disabled elements:
			// * listed form-associated elements in a disabled fieldset
			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
			// * option elements in a disabled optgroup
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
			// All such elements have a "form" property.
			if ( elem.parentNode && elem.disabled === false ) {

				// Option elements defer to a parent optgroup if present
				if ( "label" in elem ) {
					if ( "label" in elem.parentNode ) {
						return elem.parentNode.disabled === disabled;
					} else {
						return elem.disabled === disabled;
					}
				}

				// Support: IE 6 - 11+
				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
				return elem.isDisabled === disabled ||

					// Where there is no isDisabled, check manually
					elem.isDisabled !== !disabled &&
						inDisabledFieldset( elem ) === disabled;
			}

			return elem.disabled === disabled;

		// Try to winnow out elements that can't be disabled before trusting the disabled property.
		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
		// even exist on them, let alone have a boolean value.
		} else if ( "label" in elem ) {
			return elem.disabled === disabled;
		}

		// Remaining elements are neither :enabled nor :disabled
		return false;
	};
}

/**
 * Returns a function to use in pseudos for positionals
 * @param {Function} fn
 */
function createPositionalPseudo( fn ) {
	return markFunction( function( argument ) {
		argument = +argument;
		return markFunction( function( seed, matches ) {
			var j,
				matchIndexes = fn( [], seed.length, argument ),
				i = matchIndexes.length;

			// Match elements found at the specified indexes
			while ( i-- ) {
				if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
					seed[ j ] = !( matches[ j ] = seed[ j ] );
				}
			}
		} );
	} );
}

/**
 * Sets document-related variables once based on the current document
 * @param {Element|Object} [node] An element or document object to use to set the document
 */
function setDocument( node ) {
	var subWindow,
		doc = node ? node.ownerDocument || node : document$1;

	// Return early if doc is invalid or already selected
	// Support: IE 11+
	// IE sometimes throws a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( doc == document || doc.nodeType !== 9 ) {
		return;
	}

	// Update global variables
	document = doc;
	documentElement = document.documentElement;
	documentIsHTML = !jQuery.isXMLDoc( document );

	// Support: IE 9 - 11+
	// Accessing iframe documents after unload throws "permission denied" errors (see trac-13936)
	// Support: IE 11+
	// IE sometimes throws a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( isIE && document$1 != document &&
		( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
		subWindow.addEventListener( "unload", unloadHandler );
	}
}

find.matches = function( expr, elements ) {
	return find( expr, null, null, elements );
};

find.matchesSelector = function( elem, expr ) {
	setDocument( elem );

	if ( documentIsHTML &&
		!nonnativeSelectorCache[ expr + " " ] &&
		( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {

		try {
			return matches.call( elem, expr );
		} catch ( e ) {
			nonnativeSelectorCache( expr, true );
		}
	}

	return find( expr, document, null, [ elem ] ).length > 0;
};

jQuery.expr = {

	// Can be adjusted by the user
	cacheLength: 50,

	createPseudo: markFunction,

	match: matchExpr,

	find: {
		ID: function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var elem = context.getElementById( id );
				return elem ? [ elem ] : [];
			}
		},

		TAG: function( tag, context ) {
			if ( typeof context.getElementsByTagName !== "undefined" ) {
				return context.getElementsByTagName( tag );

				// DocumentFragment nodes don't have gEBTN
			} else {
				return context.querySelectorAll( tag );
			}
		},

		CLASS: function( className, context ) {
			if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
				return context.getElementsByClassName( className );
			}
		}
	},

	relative: {
		">": { dir: "parentNode", first: true },
		" ": { dir: "parentNode" },
		"+": { dir: "previousSibling", first: true },
		"~": { dir: "previousSibling" }
	},

	preFilter: preFilter,

	filter: {
		ID: function( id ) {
			var attrId = unescapeSelector( id );
			return function( elem ) {
				return elem.getAttribute( "id" ) === attrId;
			};
		},

		TAG: function( nodeNameSelector ) {
			var expectedNodeName = unescapeSelector( nodeNameSelector ).toLowerCase();
			return nodeNameSelector === "*" ?

				function() {
					return true;
				} :

				function( elem ) {
					return nodeName( elem, expectedNodeName );
				};
		},

		CLASS: function( className ) {
			var pattern = classCache[ className + " " ];

			return pattern ||
				( pattern = new RegExp( "(^|" + whitespace + ")" + className +
					"(" + whitespace + "|$)" ) ) &&
				classCache( className, function( elem ) {
					return pattern.test(
						typeof elem.className === "string" && elem.className ||
							typeof elem.getAttribute !== "undefined" &&
								elem.getAttribute( "class" ) ||
							""
					);
				} );
		},

		ATTR: function( name, operator, check ) {
			return function( elem ) {
				var result = jQuery.attr( elem, name );

				if ( result == null ) {
					return operator === "!=";
				}
				if ( !operator ) {
					return true;
				}

				result += "";

				if ( operator === "=" ) {
					return result === check;
				}
				if ( operator === "!=" ) {
					return result !== check;
				}
				if ( operator === "^=" ) {
					return check && result.indexOf( check ) === 0;
				}
				if ( operator === "*=" ) {
					return check && result.indexOf( check ) > -1;
				}
				if ( operator === "$=" ) {
					return check && result.slice( -check.length ) === check;
				}
				if ( operator === "~=" ) {
					return ( " " + result.replace( rwhitespace, " " ) + " " )
						.indexOf( check ) > -1;
				}
				if ( operator === "|=" ) {
					return result === check || result.slice( 0, check.length + 1 ) === check + "-";
				}

				return false;
			};
		},

		CHILD: function( type, what, _argument, first, last ) {
			var simple = type.slice( 0, 3 ) !== "nth",
				forward = type.slice( -4 ) !== "last",
				ofType = what === "of-type";

			return first === 1 && last === 0 ?

				// Shortcut for :nth-*(n)
				function( elem ) {
					return !!elem.parentNode;
				} :

				function( elem, _context, xml ) {
					var cache, outerCache, node, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType,
						diff = false;

					if ( parent ) {

						// :(first|last|only)-(child|of-type)
						if ( simple ) {
							while ( dir ) {
								node = elem;
								while ( ( node = node[ dir ] ) ) {
									if ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) {

										return false;
									}
								}

								// Reverse direction for :only-* (if we haven't yet done so)
								start = dir = type === "only" && !start && "nextSibling";
							}
							return true;
						}

						start = [ forward ? parent.firstChild : parent.lastChild ];

						// non-xml :nth-child(...) stores cache data on `parent`
						if ( forward && useCache ) {

							// Seek `elem` from a previously-cached index
							outerCache = parent[ jQuery.expando ] ||
								( parent[ jQuery.expando ] = {} );
							cache = outerCache[ type ] || [];
							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
							diff = nodeIndex && cache[ 2 ];
							node = nodeIndex && parent.childNodes[ nodeIndex ];

							while ( ( node = ++nodeIndex && node && node[ dir ] ||

								// Fallback to seeking `elem` from the start
								( diff = nodeIndex = 0 ) || start.pop() ) ) {

								// When found, cache indexes on `parent` and break
								if ( node.nodeType === 1 && ++diff && node === elem ) {
									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						} else {

							// Use previously-cached element index if available
							if ( useCache ) {
								outerCache = elem[ jQuery.expando ] ||
									( elem[ jQuery.expando ] = {} );
								cache = outerCache[ type ] || [];
								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
								diff = nodeIndex;
							}

							// xml :nth-child(...)
							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
							if ( diff === false ) {

								// Use the same loop as above to seek `elem` from the start
								while ( ( node = ++nodeIndex && node && node[ dir ] ||
									( diff = nodeIndex = 0 ) || start.pop() ) ) {

									if ( ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) &&
										++diff ) {

										// Cache the index of each encountered element
										if ( useCache ) {
											outerCache = node[ jQuery.expando ] ||
												( node[ jQuery.expando ] = {} );
											outerCache[ type ] = [ dirruns, diff ];
										}

										if ( node === elem ) {
											break;
										}
									}
								}
							}
						}

						// Incorporate the offset, then check against cycle size
						diff -= last;
						return diff === first || ( diff % first === 0 && diff / first >= 0 );
					}
				};
		},

		PSEUDO: function( pseudo, argument ) {

			// pseudo-class names are case-insensitive
			// https://www.w3.org/TR/selectors/#pseudo-classes
			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
			// Remember that setFilters inherits from pseudos
			var fn = jQuery.expr.pseudos[ pseudo ] ||
				jQuery.expr.setFilters[ pseudo.toLowerCase() ] ||
				selectorError( "unsupported pseudo: " + pseudo );

			// The user may use createPseudo to indicate that
			// arguments are needed to create the filter function
			// just as jQuery does
			if ( fn[ jQuery.expando ] ) {
				return fn( argument );
			}

			return fn;
		}
	},

	pseudos: {

		// Potentially complex pseudos
		not: markFunction( function( selector ) {

			// Trim the selector passed to compile
			// to avoid treating leading and trailing
			// spaces as combinators
			var input = [],
				results = [],
				matcher = compile( selector.replace( rtrimCSS, "$1" ) );

			return matcher[ jQuery.expando ] ?
				markFunction( function( seed, matches, _context, xml ) {
					var elem,
						unmatched = matcher( seed, null, xml, [] ),
						i = seed.length;

					// Match elements unmatched by `matcher`
					while ( i-- ) {
						if ( ( elem = unmatched[ i ] ) ) {
							seed[ i ] = !( matches[ i ] = elem );
						}
					}
				} ) :
				function( elem, _context, xml ) {
					input[ 0 ] = elem;
					matcher( input, null, xml, results );

					// Don't keep the element
					// (see https://github.com/jquery/sizzle/issues/299)
					input[ 0 ] = null;
					return !results.pop();
				};
		} ),

		has: markFunction( function( selector ) {
			return function( elem ) {
				return find( selector, elem ).length > 0;
			};
		} ),

		contains: markFunction( function( text ) {
			text = unescapeSelector( text );
			return function( elem ) {
				return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
			};
		} ),

		// "Whether an element is represented by a :lang() selector
		// is based solely on the element's language value
		// being equal to the identifier C,
		// or beginning with the identifier C immediately followed by "-".
		// The matching of C against the element's language value is performed case-insensitively.
		// The identifier C does not have to be a valid language name."
		// https://www.w3.org/TR/selectors/#lang-pseudo
		lang: markFunction( function( lang ) {

			// lang value must be a valid identifier
			if ( !ridentifier.test( lang || "" ) ) {
				selectorError( "unsupported lang: " + lang );
			}
			lang = unescapeSelector( lang ).toLowerCase();
			return function( elem ) {
				var elemLang;
				do {
					if ( ( elemLang = documentIsHTML ?
						elem.lang :
						elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {

						elemLang = elemLang.toLowerCase();
						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
					}
				} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
				return false;
			};
		} ),

		// Miscellaneous
		target: function( elem ) {
			var hash = window.location && window.location.hash;
			return hash && hash.slice( 1 ) === elem.id;
		},

		root: function( elem ) {
			return elem === documentElement;
		},

		focus: function( elem ) {
			return elem === document.activeElement &&
				document.hasFocus() &&
				!!( elem.type || elem.href || ~elem.tabIndex );
		},

		// Boolean properties
		enabled: createDisabledPseudo( false ),
		disabled: createDisabledPseudo( true ),

		checked: function( elem ) {

			// In CSS3, :checked should return both checked and selected elements
			// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			return ( nodeName( elem, "input" ) && !!elem.checked ) ||
				( nodeName( elem, "option" ) && !!elem.selected );
		},

		selected: function( elem ) {

			// Support: IE <=11+
			// Accessing the selectedIndex property
			// forces the browser to treat the default option as
			// selected when in an optgroup.
			if ( isIE && elem.parentNode ) {
				// eslint-disable-next-line no-unused-expressions
				elem.parentNode.selectedIndex;
			}

			return elem.selected === true;
		},

		// Contents
		empty: function( elem ) {

			// https://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;
				}
			}
			return true;
		},

		parent: function( elem ) {
			return !jQuery.expr.pseudos.empty( elem );
		},

		// Element/input types
		header: function( elem ) {
			return rheader.test( elem.nodeName );
		},

		input: function( elem ) {
			return rinputs.test( elem.nodeName );
		},

		button: function( elem ) {
			return nodeName( elem, "input" ) && elem.type === "button" ||
				nodeName( elem, "button" );
		},

		text: function( elem ) {
			return nodeName( elem, "input" ) && elem.type === "text";
		},

		// Position-in-collection
		first: createPositionalPseudo( function() {
			return [ 0 ];
		} ),

		last: createPositionalPseudo( function( _matchIndexes, length ) {
			return [ length - 1 ];
		} ),

		eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
			return [ argument < 0 ? argument + length : argument ];
		} ),

		even: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 0;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		odd: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 1;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i;

			if ( argument < 0 ) {
				i = argument + length;
			} else if ( argument > length ) {
				i = length;
			} else {
				i = argument;
			}

			for ( ; --i >= 0; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; ++i < length; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} )
	}
};

jQuery.expr.pseudos.nth = jQuery.expr.pseudos.eq;

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
	jQuery.expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
	jQuery.expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = jQuery.expr.pseudos;
jQuery.expr.setFilters = new setFilters();

function addCombinator( matcher, combinator, base ) {
	var dir = combinator.dir,
		skip = combinator.next,
		key = skip || dir,
		checkNonElements = base && key === "parentNode",
		doneName = done++;

	return combinator.first ?

		// Check against closest ancestor/preceding element
		function( elem, context, xml ) {
			while ( ( elem = elem[ dir ] ) ) {
				if ( elem.nodeType === 1 || checkNonElements ) {
					return matcher( elem, context, xml );
				}
			}
			return false;
		} :

		// Check against all ancestor/preceding elements
		function( elem, context, xml ) {
			var oldCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
			if ( xml ) {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ jQuery.expando ] || ( elem[ jQuery.expando ] = {} );

						if ( skip && nodeName( elem, skip ) ) {
							elem = elem[ dir ] || elem;
						} else if ( ( oldCache = outerCache[ key ] ) &&
							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {

							// Assign to newCache so results back-propagate to previous elements
							return ( newCache[ 2 ] = oldCache[ 2 ] );
						} else {

							// Reuse newcache so results back-propagate to previous elements
							outerCache[ key ] = newCache;

							// A match means we're done; a fail means we have to keep checking
							if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
								return true;
							}
						}
					}
				}
			}
			return false;
		};
}

function elementMatcher( matchers ) {
	return matchers.length > 1 ?
		function( elem, context, xml ) {
			var i = matchers.length;
			while ( i-- ) {
				if ( !matchers[ i ]( elem, context, xml ) ) {
					return false;
				}
			}
			return true;
		} :
		matchers[ 0 ];
}

function multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		find( selector, contexts[ i ], results );
	}
	return results;
}

function condense( unmatched, map, filter, context, xml ) {
	var elem,
		newUnmatched = [],
		i = 0,
		len = unmatched.length,
		mapped = map != null;

	for ( ; i < len; i++ ) {
		if ( ( elem = unmatched[ i ] ) ) {
			if ( !filter || filter( elem, context, xml ) ) {
				newUnmatched.push( elem );
				if ( mapped ) {
					map.push( i );
				}
			}
		}
	}

	return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
	if ( postFilter && !postFilter[ jQuery.expando ] ) {
		postFilter = setMatcher( postFilter );
	}
	if ( postFinder && !postFinder[ jQuery.expando ] ) {
		postFinder = setMatcher( postFinder, postSelector );
	}
	return markFunction( function( seed, results, context, xml ) {
		var temp, i, elem, matcherOut,
			preMap = [],
			postMap = [],
			preexisting = results.length,

			// Get initial elements from seed or context
			elems = seed ||
				multipleContexts( selector || "*",
					context.nodeType ? [ context ] : context, [] ),

			// Prefilter to get matcher input, preserving a map for seed-results synchronization
			matcherIn = preFilter && ( seed || !selector ) ?
				condense( elems, preMap, preFilter, context, xml ) :
				elems;

		if ( matcher ) {

			// If we have a postFinder, or filtered seed, or non-seed postFilter
			// or preexisting results,
			matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?

				// ...intermediate processing is necessary
				[] :

				// ...otherwise use results directly
				results;

			// Find primary matches
			matcher( matcherIn, matcherOut, context, xml );
		} else {
			matcherOut = matcherIn;
		}

		// Apply postFilter
		if ( postFilter ) {
			temp = condense( matcherOut, postMap );
			postFilter( temp, [], context, xml );

			// Un-match failing elements by moving them back to matcherIn
			i = temp.length;
			while ( i-- ) {
				if ( ( elem = temp[ i ] ) ) {
					matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
				}
			}
		}

		if ( seed ) {
			if ( postFinder || preFilter ) {
				if ( postFinder ) {

					// Get the final matcherOut by condensing this intermediate into postFinder contexts
					temp = [];
					i = matcherOut.length;
					while ( i-- ) {
						if ( ( elem = matcherOut[ i ] ) ) {

							// Restore matcherIn since elem is not yet a final match
							temp.push( ( matcherIn[ i ] = elem ) );
						}
					}
					postFinder( null, ( matcherOut = [] ), temp, xml );
				}

				// Move matched elements from seed to results to keep them synchronized
				i = matcherOut.length;
				while ( i-- ) {
					if ( ( elem = matcherOut[ i ] ) &&
						( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {

						seed[ temp ] = !( results[ temp ] = elem );
					}
				}
			}

		// Add elements to results, through postFinder if defined
		} else {
			matcherOut = condense(
				matcherOut === results ?
					matcherOut.splice( preexisting, matcherOut.length ) :
					matcherOut
			);
			if ( postFinder ) {
				postFinder( null, results, matcherOut, xml );
			} else {
				push.apply( results, matcherOut );
			}
		}
	} );
}

function matcherFromTokens( tokens ) {
	var checkContext, matcher, j,
		len = tokens.length,
		leadingRelative = jQuery.expr.relative[ tokens[ 0 ].type ],
		implicitRelative = leadingRelative || jQuery.expr.relative[ " " ],
		i = leadingRelative ? 1 : 0,

		// The foundational matcher ensures that elements are reachable from top-level context(s)
		matchContext = addCombinator( function( elem ) {
			return elem === checkContext;
		}, implicitRelative, true ),
		matchAnyContext = addCombinator( function( elem ) {
			return indexOf.call( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {

			// Support: IE 11+
			// IE sometimes throws a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
				( checkContext = context ).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );

			// Avoid hanging onto element
			// (see https://github.com/jquery/sizzle/issues/299)
			checkContext = null;
			return ret;
		} ];

	for ( ; i < len; i++ ) {
		if ( ( matcher = jQuery.expr.relative[ tokens[ i ].type ] ) ) {
			matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
		} else {
			matcher = jQuery.expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );

			// Return special upon seeing a positional matcher
			if ( matcher[ jQuery.expando ] ) {

				// Find the next relative operator (if any) for proper handling
				j = ++i;
				for ( ; j < len; j++ ) {
					if ( jQuery.expr.relative[ tokens[ j ].type ] ) {
						break;
					}
				}
				return setMatcher(
					i > 1 && elementMatcher( matchers ),
					i > 1 && toSelector(

						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
						tokens.slice( 0, i - 1 )
							.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
					).replace( rtrimCSS, "$1" ),
					matcher,
					i < j && matcherFromTokens( tokens.slice( i, j ) ),
					j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
					j < len && toSelector( tokens )
				);
			}
			matchers.push( matcher );
		}
	}

	return elementMatcher( matchers );
}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
	var bySet = setMatchers.length > 0,
		byElement = elementMatchers.length > 0,
		superMatcher = function( seed, context, xml, results, outermost ) {
			var elem, j, matcher,
				matchedCount = 0,
				i = "0",
				unmatched = seed && [],
				setMatched = [],
				contextBackup = outermostContext,

				// We must always have either seed elements or outermost context
				elems = seed || byElement && jQuery.expr.find.TAG( "*", outermost ),

				// Use integer dirruns iff this is the outermost matcher
				dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 );

			if ( outermost ) {

				// Support: IE 11+
				// IE sometimes throws a "Permission denied" error when strict-comparing
				// two documents; shallow comparisons work.
				// eslint-disable-next-line eqeqeq
				outermostContext = context == document || context || outermost;
			}

			// Add elements passing elementMatchers directly to results
			for ( ; ( elem = elems[ i ] ) != null; i++ ) {
				if ( byElement && elem ) {
					j = 0;

					// Support: IE 11+
					// IE sometimes throws a "Permission denied" error when strict-comparing
					// two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( !context && elem.ownerDocument != document ) {
						setDocument( elem );
						xml = !documentIsHTML;
					}
					while ( ( matcher = elementMatchers[ j++ ] ) ) {
						if ( matcher( elem, context || document, xml ) ) {
							push.call( results, elem );
							break;
						}
					}
					if ( outermost ) {
						dirruns = dirrunsUnique;
					}
				}

				// Track unmatched elements for set filters
				if ( bySet ) {

					// They will have gone through all possible matchers
					if ( ( elem = !matcher && elem ) ) {
						matchedCount--;
					}

					// Lengthen the array for every element, matched or not
					if ( seed ) {
						unmatched.push( elem );
					}
				}
			}

			// `i` is now the count of elements visited above, and adding it to `matchedCount`
			// makes the latter nonnegative.
			matchedCount += i;

			// Apply set filters to unmatched elements
			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
			// no element matchers and no seed.
			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
			// numerically zero.
			if ( bySet && i !== matchedCount ) {
				j = 0;
				while ( ( matcher = setMatchers[ j++ ] ) ) {
					matcher( unmatched, setMatched, context, xml );
				}

				if ( seed ) {

					// Reintegrate element matches to eliminate the need for sorting
					if ( matchedCount > 0 ) {
						while ( i-- ) {
							if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
								setMatched[ i ] = pop.call( results );
							}
						}
					}

					// Discard index placeholder values to get only actual matches
					setMatched = condense( setMatched );
				}

				// Add matches to results
				push.apply( results, setMatched );

				// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					jQuery.uniqueSort( results );
				}
			}

			// Override manipulation of globals by nested matchers
			if ( outermost ) {
				dirruns = dirrunsUnique;
				outermostContext = contextBackup;
			}

			return unmatched;
		};

	return bySet ?
		markFunction( superMatcher ) :
		superMatcher;
}

function compile( selector, match /* Internal Use Only */ ) {
	var i,
		setMatchers = [],
		elementMatchers = [],
		cached = compilerCache[ selector + " " ];

	if ( !cached ) {

		// Generate a function of recursive functions that can be used to check each element
		if ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[ i ] );
			if ( cached[ jQuery.expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache( selector,
			matcherFromGroupMatchers( elementMatchers, setMatchers ) );

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
}

/**
 * A low-level selection function that works with jQuery's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with jQuery selector compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
function select( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( ( selector = compiled.selector || selector ) );

	results = results || [];

	// Try to minimize operations if there is only one selector in the list and no seed
	// (the latter of which guarantees us context)
	if ( match.length === 1 ) {

		// Reduce context if the leading compound selector is an ID
		tokens = match[ 0 ] = match[ 0 ].slice( 0 );
		if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
				context.nodeType === 9 && documentIsHTML &&
				jQuery.expr.relative[ tokens[ 1 ].type ] ) {

			context = ( jQuery.expr.find.ID(
				unescapeSelector( token.matches[ 0 ] ),
				context
			) || [] )[ 0 ];
			if ( !context ) {
				return results;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			selector = selector.slice( tokens.shift().value.length );
		}

		// Fetch a seed set for right-to-left matching
		i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
		while ( i-- ) {
			token = tokens[ i ];

			// Abort if we hit a combinator
			if ( jQuery.expr.relative[ ( type = token.type ) ] ) {
				break;
			}
			if ( ( find = jQuery.expr.find[ type ] ) ) {

				// Search, expanding context for leading sibling combinators
				if ( ( seed = find(
					unescapeSelector( token.matches[ 0 ] ),
					rsibling.test( tokens[ 0 ].type ) &&
						testContext( context.parentNode ) || context
				) ) ) {

					// If seed is empty or no tokens remain, we can return early
					tokens.splice( i, 1 );
					selector = seed.length && toSelector( tokens );
					if ( !selector ) {
						push.apply( results, seed );
						return results;
					}

					break;
				}
			}
		}
	}

	// Compile and execute a filtering function if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
	);
	return results;
}

// Initialize against the default document
setDocument();

jQuery.find = find;

// These have always been private, but they used to be documented as part of
// Sizzle so let's maintain them for now for backwards compatibility purposes.
find.compile = compile;
find.select = select;
find.setDocument = setDocument;
find.tokenize = tokenize;

function dir( elem, dir, until ) {
	var matched = [],
		truncate = until !== undefined;

	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
		if ( elem.nodeType === 1 ) {
			if ( truncate && jQuery( elem ).is( until ) ) {
				break;
			}
			matched.push( elem );
		}
	}
	return matched;
}

function siblings( n, elem ) {
	var matched = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType === 1 && n !== elem ) {
			matched.push( n );
		}
	}

	return matched;
}

var rneedsContext = jQuery.expr.match.needsContext;

// rsingleTag matches a string consisting of a single HTML element with no attributes
// and captures the element's name
var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;

function isObviousHtml( input ) {
	return input[ 0 ] === "<" &&
		input[ input.length - 1 ] === ">" &&
		input.length >= 3;
}

// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
	if ( typeof qualifier === "function" ) {
		return jQuery.grep( elements, function( elem, i ) {
			return !!qualifier.call( elem, i, elem ) !== not;
		} );
	}

	// Single element
	if ( qualifier.nodeType ) {
		return jQuery.grep( elements, function( elem ) {
			return ( elem === qualifier ) !== not;
		} );
	}

	// Arraylike of elements (jQuery, arguments, Array)
	if ( typeof qualifier !== "string" ) {
		return jQuery.grep( elements, function( elem ) {
			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
		} );
	}

	// Filtered directly for both simple and complex selectors
	return jQuery.filter( qualifier, elements, not );
}

jQuery.filter = function( expr, elems, not ) {
	var elem = elems[ 0 ];

	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	if ( elems.length === 1 && elem.nodeType === 1 ) {
		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
	}

	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
		return elem.nodeType === 1;
	} ) );
};

jQuery.fn.extend( {
	find: function( selector ) {
		var i, ret,
			len = this.length,
			self = this;

		if ( typeof selector !== "string" ) {
			return this.pushStack( jQuery( selector ).filter( function() {
				for ( i = 0; i < len; i++ ) {
					if ( jQuery.contains( self[ i ], this ) ) {
						return true;
					}
				}
			} ) );
		}

		ret = this.pushStack( [] );

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
	},
	filter: function( selector ) {
		return this.pushStack( winnow( this, selector || [], false ) );
	},
	not: function( selector ) {
		return this.pushStack( winnow( this, selector || [], true ) );
	},
	is: function( selector ) {
		return !!winnow(
			this,

			// If this is a positional/relative selector, check membership in the returned set
			// so $("p:first").is("p:last") won't return true for a doc with two "p".
			typeof selector === "string" && rneedsContext.test( selector ) ?
				jQuery( selector ) :
				selector || [],
			false
		).length;
	}
} );

// Initialize a jQuery object

// A central reference to the root jQuery(document)
var rootjQuery,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
	// Strict HTML recognition (trac-11290: must start with <)
	// Shortcut simple #id case for speed
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

	init = jQuery.fn.init = function( selector, context ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// HANDLE: $(DOMElement)
		if ( selector.nodeType ) {
			this[ 0 ] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( typeof selector === "function" ) {
			return rootjQuery.ready !== undefined ?
				rootjQuery.ready( selector ) :

				// Execute immediately if ready is not present
				selector( jQuery );

		} else {

			// Handle obvious HTML strings
			match = selector + "";
			if ( isObviousHtml( match ) ) {

				// Assume that strings that start and end with <> are HTML and skip
				// the regex check. This also handles browser-supported HTML wrappers
				// like TrustedHTML.
				match = [ null, selector, null ];

			// Handle HTML strings or selectors
			} else if ( typeof selector === "string" ) {
				match = rquickExpr.exec( selector );
			} else {
				return jQuery.makeArray( selector, this );
			}

			// Match html or make sure no context is specified for #id
			// Note: match[1] may be a string or a TrustedHTML wrapper
			if ( match && ( match[ 1 ] || !context ) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[ 1 ] ) {
					context = context instanceof jQuery ? context[ 0 ] : context;

					// Option to run scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					jQuery.merge( this, jQuery.parseHTML(
						match[ 1 ],
						context && context.nodeType ? context.ownerDocument || context : document$1,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
						for ( match in context ) {

							// Properties of context are called as methods if possible
							if ( typeof this[ match ] === "function" ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document$1.getElementById( match[ 2 ] );

					if ( elem ) {

						// Inject the element directly into the jQuery object
						this[ 0 ] = elem;
						this.length = 1;
					}
					return this;
				}

			// HANDLE: $(expr) & $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || rootjQuery ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}
		}

	};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference
rootjQuery = jQuery( document$1 );

var rparentsprev = /^(?:parents|prev(?:Until|All))/,

	// Methods guaranteed to produce a unique set when starting from a unique set
	guaranteedUnique = {
		children: true,
		contents: true,
		next: true,
		prev: true
	};

jQuery.fn.extend( {
	has: function( target ) {
		var targets = jQuery( target, this ),
			l = targets.length;

		return this.filter( function() {
			var i = 0;
			for ( ; i < l; i++ ) {
				if ( jQuery.contains( this, targets[ i ] ) ) {
					return true;
				}
			}
		} );
	},

	closest: function( selectors, context ) {
		var cur,
			i = 0,
			l = this.length,
			matched = [],
			targets = typeof selectors !== "string" && jQuery( selectors );

		// Positional selectors never match, since there's no _selection_ context
		if ( !rneedsContext.test( selectors ) ) {
			for ( ; i < l; i++ ) {
				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {

					// Always skip document fragments
					if ( cur.nodeType < 11 && ( targets ?
						targets.index( cur ) > -1 :

						// Don't pass non-elements to jQuery#find
						cur.nodeType === 1 &&
							jQuery.find.matchesSelector( cur, selectors ) ) ) {

						matched.push( cur );
						break;
					}
				}
			}
		}

		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
	},

	// Determine the position of an element within the set
	index: function( elem ) {

		// No argument, return index in parent
		if ( !elem ) {
			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
		}

		// Index in selector
		if ( typeof elem === "string" ) {
			return indexOf.call( jQuery( elem ), this[ 0 ] );
		}

		// Locate the position of the desired element
		return indexOf.call( this,

			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[ 0 ] : elem
		);
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.uniqueSort(
				jQuery.merge( this.get(), jQuery( selector, context ) )
			)
		);
	},

	addBack: function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter( selector )
		);
	}
} );

function sibling( cur, dir ) {
	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
	return cur;
}

jQuery.each( {
	parent: function( elem ) {
		var parent = elem.parentNode;
		return parent && parent.nodeType !== 11 ? parent : null;
	},
	parents: function( elem ) {
		return dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, _i, until ) {
		return dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, _i, until ) {
		return dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, _i, until ) {
		return dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return siblings( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return siblings( elem.firstChild );
	},
	contents: function( elem ) {
		if ( elem.contentDocument != null &&

			// Support: IE 11+
			// <object> elements with no `data` attribute has an object
			// `contentDocument` with a `null` prototype.
			getProto( elem.contentDocument ) ) {

			return elem.contentDocument;
		}

		// Support: IE 9 - 11+
		// Treat the template element as a regular one in browsers that
		// don't support it.
		if ( nodeName( elem, "template" ) ) {
			elem = elem.content || elem;
		}

		return jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var matched = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			matched = jQuery.filter( selector, matched );
		}

		if ( this.length > 1 ) {

			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				jQuery.uniqueSort( matched );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				matched.reverse();
			}
		}

		return this.pushStack( matched );
	};
} );

// Convert String-formatted options into Object-formatted ones
function createOptions( options ) {
	var object = {};
	jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
		object[ flag ] = true;
	} );
	return object;
}

/*
 * Create a callback list using the following parameters:
 *
 *	options: an optional list of space-separated options that will change how
 *			the callback list behaves or a more traditional option object
 *
 * By default a callback list will act like an event callback list and can be
 * "fired" multiple times.
 *
 * Possible options:
 *
 *	once:			will ensure the callback list can only be fired once (like a Deferred)
 *
 *	memory:			will keep track of previous values and will call any callback added
 *					after the list has been fired right away with the latest "memorized"
 *					values (like a Deferred)
 *
 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
 *
 *	stopOnFalse:	interrupt callings when a callback returns false
 *
 */
jQuery.Callbacks = function( options ) {

	// Convert options from String-formatted to Object-formatted if needed
	// (we check in cache first)
	options = typeof options === "string" ?
		createOptions( options ) :
		jQuery.extend( {}, options );

	var // Flag to know if list is currently firing
		firing,

		// Last fire value for non-forgettable lists
		memory,

		// Flag to know if list was already fired
		fired,

		// Flag to prevent firing
		locked,

		// Actual callback list
		list = [],

		// Queue of execution data for repeatable lists
		queue = [],

		// Index of currently firing callback (modified by add/remove as needed)
		firingIndex = -1,

		// Fire callbacks
		fire = function() {

			// Enforce single-firing
			locked = locked || options.once;

			// Execute callbacks for all pending executions,
			// respecting firingIndex overrides and runtime changes
			fired = firing = true;
			for ( ; queue.length; firingIndex = -1 ) {
				memory = queue.shift();
				while ( ++firingIndex < list.length ) {

					// Run callback and check for early termination
					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
						options.stopOnFalse ) {

						// Jump to end and forget the data so .add doesn't re-fire
						firingIndex = list.length;
						memory = false;
					}
				}
			}

			// Forget the data if we're done with it
			if ( !options.memory ) {
				memory = false;
			}

			firing = false;

			// Clean up if we're done firing for good
			if ( locked ) {

				// Keep an empty list if we have data for future add calls
				if ( memory ) {
					list = [];

				// Otherwise, this object is spent
				} else {
					list = "";
				}
			}
		},

		// Actual Callbacks object
		self = {

			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {

					// If we have memory from a past run, we should fire after adding
					if ( memory && !firing ) {
						firingIndex = list.length - 1;
						queue.push( memory );
					}

					( function add( args ) {
						jQuery.each( args, function( _, arg ) {
							if ( typeof arg === "function" ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && toType( arg ) !== "string" ) {

								// Inspect recursively
								add( arg );
							}
						} );
					} )( arguments );

					if ( memory && !firing ) {
						fire();
					}
				}
				return this;
			},

			// Remove a callback from the list
			remove: function() {
				jQuery.each( arguments, function( _, arg ) {
					var index;
					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
						list.splice( index, 1 );

						// Handle firing indexes
						if ( index <= firingIndex ) {
							firingIndex--;
						}
					}
				} );
				return this;
			},

			// Check if a given callback is in the list.
			// If no argument is given, return whether or not list has callbacks attached.
			has: function( fn ) {
				return fn ?
					jQuery.inArray( fn, list ) > -1 :
					list.length > 0;
			},

			// Remove all callbacks from the list
			empty: function() {
				if ( list ) {
					list = [];
				}
				return this;
			},

			// Disable .fire and .add
			// Abort any current/pending executions
			// Clear all callbacks and values
			disable: function() {
				locked = queue = [];
				list = memory = "";
				return this;
			},
			disabled: function() {
				return !list;
			},

			// Disable .fire
			// Also disable .add unless we have memory (since it would have no effect)
			// Abort any pending executions
			lock: function() {
				locked = queue = [];
				if ( !memory && !firing ) {
					list = memory = "";
				}
				return this;
			},
			locked: function() {
				return !!locked;
			},

			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( !locked ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					queue.push( args );
					if ( !firing ) {
						fire();
					}
				}
				return this;
			},

			// Call all the callbacks with the given arguments
			fire: function() {
				self.fireWith( this, arguments );
				return this;
			},

			// To know if the callbacks have already been called at least once
			fired: function() {
				return !!fired;
			}
		};

	return self;
};

function Identity( v ) {
	return v;
}
function Thrower( ex ) {
	throw ex;
}

function adoptValue( value, resolve, reject, noValue ) {
	var method;

	try {

		// Check for promise aspect first to privilege synchronous behavior
		if ( value && typeof( method = value.promise ) === "function" ) {
			method.call( value ).done( resolve ).fail( reject );

		// Other thenables
		} else if ( value && typeof( method = value.then ) === "function" ) {
			method.call( value, resolve, reject );

		// Other non-thenables
		} else {

			// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
			// * false: [ value ].slice( 0 ) => resolve( value )
			// * true: [ value ].slice( 1 ) => resolve()
			resolve.apply( undefined, [ value ].slice( noValue ) );
		}

	// For Promises/A+, convert exceptions into rejections
	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
	// Deferred#then to conditionally suppress rejection.
	} catch ( value ) {
		reject( value );
	}
}

jQuery.extend( {

	Deferred: function( func ) {
		var tuples = [

				// action, add listener, callbacks,
				// ... .then handlers, argument index, [final state]
				[ "notify", "progress", jQuery.Callbacks( "memory" ),
					jQuery.Callbacks( "memory" ), 2 ],
				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
			],
			state = "pending",
			promise = {
				state: function() {
					return state;
				},
				always: function() {
					deferred.done( arguments ).fail( arguments );
					return this;
				},
				catch: function( fn ) {
					return promise.then( null, fn );
				},

				// Keep pipe for back-compat
				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
					var fns = arguments;

					return jQuery.Deferred( function( newDefer ) {
						jQuery.each( tuples, function( _i, tuple ) {

							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
							var fn = typeof fns[ tuple[ 4 ] ] === "function" &&
								fns[ tuple[ 4 ] ];

							// deferred.progress(function() { bind to newDefer or newDefer.notify })
							// deferred.done(function() { bind to newDefer or newDefer.resolve })
							// deferred.fail(function() { bind to newDefer or newDefer.reject })
							deferred[ tuple[ 1 ] ]( function() {
								var returned = fn && fn.apply( this, arguments );
								if ( returned && typeof returned.promise === "function" ) {
									returned.promise()
										.progress( newDefer.notify )
										.done( newDefer.resolve )
										.fail( newDefer.reject );
								} else {
									newDefer[ tuple[ 0 ] + "With" ](
										this,
										fn ? [ returned ] : arguments
									);
								}
							} );
						} );
						fns = null;
					} ).promise();
				},
				then: function( onFulfilled, onRejected, onProgress ) {
					var maxDepth = 0;
					function resolve( depth, deferred, handler, special ) {
						return function() {
							var that = this,
								args = arguments,
								mightThrow = function() {
									var returned, then;

									// Support: Promises/A+ section 2.3.3.3.3
									// https://promisesaplus.com/#point-59
									// Ignore double-resolution attempts
									if ( depth < maxDepth ) {
										return;
									}

									returned = handler.apply( that, args );

									// Support: Promises/A+ section 2.3.1
									// https://promisesaplus.com/#point-48
									if ( returned === deferred.promise() ) {
										throw new TypeError( "Thenable self-resolution" );
									}

									// Support: Promises/A+ sections 2.3.3.1, 3.5
									// https://promisesaplus.com/#point-54
									// https://promisesaplus.com/#point-75
									// Retrieve `then` only once
									then = returned &&

										// Support: Promises/A+ section 2.3.4
										// https://promisesaplus.com/#point-64
										// Only check objects and functions for thenability
										( typeof returned === "object" ||
											typeof returned === "function" ) &&
										returned.then;

									// Handle a returned thenable
									if ( typeof then === "function" ) {

										// Special processors (notify) just wait for resolution
										if ( special ) {
											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special )
											);

										// Normal processors (resolve) also hook into progress
										} else {

											// ...and disregard older resolution values
											maxDepth++;

											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special ),
												resolve( maxDepth, deferred, Identity,
													deferred.notifyWith )
											);
										}

									// Handle all other returned values
									} else {

										// Only substitute handlers pass on context
										// and multiple values (non-spec behavior)
										if ( handler !== Identity ) {
											that = undefined;
											args = [ returned ];
										}

										// Process the value(s)
										// Default process is resolve
										( special || deferred.resolveWith )( that, args );
									}
								},

								// Only normal processors (resolve) catch and reject exceptions
								process = special ?
									mightThrow :
									function() {
										try {
											mightThrow();
										} catch ( e ) {

											if ( jQuery.Deferred.exceptionHook ) {
												jQuery.Deferred.exceptionHook( e,
													process.error );
											}

											// Support: Promises/A+ section 2.3.3.3.4.1
											// https://promisesaplus.com/#point-61
											// Ignore post-resolution exceptions
											if ( depth + 1 >= maxDepth ) {

												// Only substitute handlers pass on context
												// and multiple values (non-spec behavior)
												if ( handler !== Thrower ) {
													that = undefined;
													args = [ e ];
												}

												deferred.rejectWith( that, args );
											}
										}
									};

							// Support: Promises/A+ section 2.3.3.3.1
							// https://promisesaplus.com/#point-57
							// Re-resolve promises immediately to dodge false rejection from
							// subsequent errors
							if ( depth ) {
								process();
							} else {

								// Call an optional hook to record the error, in case of exception
								// since it's otherwise lost when execution goes async
								if ( jQuery.Deferred.getErrorHook ) {
									process.error = jQuery.Deferred.getErrorHook();
								}
								window.setTimeout( process );
							}
						};
					}

					return jQuery.Deferred( function( newDefer ) {

						// progress_handlers.add( ... )
						tuples[ 0 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								typeof onProgress === "function" ?
									onProgress :
									Identity,
								newDefer.notifyWith
							)
						);

						// fulfilled_handlers.add( ... )
						tuples[ 1 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								typeof onFulfilled === "function" ?
									onFulfilled :
									Identity
							)
						);

						// rejected_handlers.add( ... )
						tuples[ 2 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								typeof onRejected === "function" ?
									onRejected :
									Thrower
							)
						);
					} ).promise();
				},

				// Get a promise for this deferred
				// If obj is provided, the promise aspect is added to the object
				promise: function( obj ) {
					return obj != null ? jQuery.extend( obj, promise ) : promise;
				}
			},
			deferred = {};

		// Add list-specific methods
		jQuery.each( tuples, function( i, tuple ) {
			var list = tuple[ 2 ],
				stateString = tuple[ 5 ];

			// promise.progress = list.add
			// promise.done = list.add
			// promise.fail = list.add
			promise[ tuple[ 1 ] ] = list.add;

			// Handle state
			if ( stateString ) {
				list.add(
					function() {

						// state = "resolved" (i.e., fulfilled)
						// state = "rejected"
						state = stateString;
					},

					// rejected_callbacks.disable
					// fulfilled_callbacks.disable
					tuples[ 3 - i ][ 2 ].disable,

					// rejected_handlers.disable
					// fulfilled_handlers.disable
					tuples[ 3 - i ][ 3 ].disable,

					// progress_callbacks.lock
					tuples[ 0 ][ 2 ].lock,

					// progress_handlers.lock
					tuples[ 0 ][ 3 ].lock
				);
			}

			// progress_handlers.fire
			// fulfilled_handlers.fire
			// rejected_handlers.fire
			list.add( tuple[ 3 ].fire );

			// deferred.notify = function() { deferred.notifyWith(...) }
			// deferred.resolve = function() { deferred.resolveWith(...) }
			// deferred.reject = function() { deferred.rejectWith(...) }
			deferred[ tuple[ 0 ] ] = function() {
				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
				return this;
			};

			// deferred.notifyWith = list.fireWith
			// deferred.resolveWith = list.fireWith
			// deferred.rejectWith = list.fireWith
			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
		} );

		// Make the deferred a promise
		promise.promise( deferred );

		// Call given func if any
		if ( func ) {
			func.call( deferred, deferred );
		}

		// All done!
		return deferred;
	},

	// Deferred helper
	when: function( singleValue ) {
		var

			// count of uncompleted subordinates
			remaining = arguments.length,

			// count of unprocessed arguments
			i = remaining,

			// subordinate fulfillment data
			resolveContexts = Array( i ),
			resolveValues = slice.call( arguments ),

			// the primary Deferred
			primary = jQuery.Deferred(),

			// subordinate callback factory
			updateFunc = function( i ) {
				return function( value ) {
					resolveContexts[ i ] = this;
					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
					if ( !( --remaining ) ) {
						primary.resolveWith( resolveContexts, resolveValues );
					}
				};
			};

		// Single- and empty arguments are adopted like Promise.resolve
		if ( remaining <= 1 ) {
			adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
				!remaining );

			// Use .then() to unwrap secondary thenables (cf. gh-3000)
			if ( primary.state() === "pending" ||
				typeof( resolveValues[ i ] && resolveValues[ i ].then ) === "function" ) {

				return primary.then();
			}
		}

		// Multiple arguments are aggregated like Promise.all array elements
		while ( i-- ) {
			adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
		}

		return primary.promise();
	}
} );

// These usually indicate a programmer mistake during development,
// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;

// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
// captured before the async barrier to get the original error cause
// which may otherwise be hidden.
jQuery.Deferred.exceptionHook = function( error, asyncError ) {

	if ( error && rerrorNames.test( error.name ) ) {
		window.console.warn(
			"jQuery.Deferred exception",
			error,
			asyncError
		);
	}
};

jQuery.readyException = function( error ) {
	window.setTimeout( function() {
		throw error;
	} );
};

// The deferred used on DOM ready
var readyList = jQuery.Deferred();

jQuery.fn.ready = function( fn ) {

	readyList
		.then( fn )

		// Wrap jQuery.readyException in a function so that the lookup
		// happens at the time of error handling instead of callback
		// registration.
		.catch( function( error ) {
			jQuery.readyException( error );
		} );

	return this;
};

jQuery.extend( {

	// Is the DOM ready to be used? Set to true once it occurs.
	isReady: false,

	// A counter to track how many items to wait for before
	// the ready event fires. See trac-6781
	readyWait: 1,

	// Handle when the DOM is ready
	ready: function( wait ) {

		// Abort if there are pending holds or we're already ready
		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
			return;
		}

		// Remember that the DOM is ready
		jQuery.isReady = true;

		// If a normal DOM Ready event fired, decrement, and wait if need be
		if ( wait !== true && --jQuery.readyWait > 0 ) {
			return;
		}

		// If there are functions bound, to execute
		readyList.resolveWith( document$1, [ jQuery ] );
	}
} );

jQuery.ready.then = readyList.then;

// The ready event handler and self cleanup method
function completed() {
	document$1.removeEventListener( "DOMContentLoaded", completed );
	window.removeEventListener( "load", completed );
	jQuery.ready();
}

// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
if ( document$1.readyState !== "loading" ) {

	// Handle it asynchronously to allow scripts the opportunity to delay ready
	window.setTimeout( jQuery.ready );

} else {

	// Use the handy event callback
	document$1.addEventListener( "DOMContentLoaded", completed );

	// A fallback to window.onload, that will always work
	window.addEventListener( "load", completed );
}

// Matches dashed string for camelizing
var rdashAlpha = /-([a-z])/g;

// Used by camelCase as callback to replace()
function fcamelCase( _all, letter ) {
	return letter.toUpperCase();
}

// Convert dashed to camelCase
function camelCase( string ) {
	return string.replace( rdashAlpha, fcamelCase );
}

/**
 * Determines whether an object can have data
 */
function acceptData( owner ) {

	// Accepts only:
	//  - Node
	//    - Node.ELEMENT_NODE
	//    - Node.DOCUMENT_NODE
	//  - Object
	//    - Any
	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
}

function Data() {
	this.expando = jQuery.expando + Data.uid++;
}

Data.uid = 1;

Data.prototype = {

	cache: function( owner ) {

		// Check if the owner object already has a cache
		var value = owner[ this.expando ];

		// If not, create one
		if ( !value ) {
			value = Object.create( null );

			// We can accept data for non-element nodes in modern browsers,
			// but we should not, see trac-8335.
			// Always return an empty object.
			if ( acceptData( owner ) ) {

				// If it is a node unlikely to be stringify-ed or looped over
				// use plain assignment
				if ( owner.nodeType ) {
					owner[ this.expando ] = value;

				// Otherwise secure it in a non-enumerable property
				// configurable must be true to allow the property to be
				// deleted when data is removed
				} else {
					Object.defineProperty( owner, this.expando, {
						value: value,
						configurable: true
					} );
				}
			}
		}

		return value;
	},
	set: function( owner, data, value ) {
		var prop,
			cache = this.cache( owner );

		// Handle: [ owner, key, value ] args
		// Always use camelCase key (gh-2257)
		if ( typeof data === "string" ) {
			cache[ camelCase( data ) ] = value;

		// Handle: [ owner, { properties } ] args
		} else {

			// Copy the properties one-by-one to the cache object
			for ( prop in data ) {
				cache[ camelCase( prop ) ] = data[ prop ];
			}
		}
		return value;
	},
	get: function( owner, key ) {
		return key === undefined ?
			this.cache( owner ) :

			// Always use camelCase key (gh-2257)
			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
	},
	access: function( owner, key, value ) {

		// In cases where either:
		//
		//   1. No key was specified
		//   2. A string key was specified, but no value provided
		//
		// Take the "read" path and allow the get method to determine
		// which value to return, respectively either:
		//
		//   1. The entire cache object
		//   2. The data stored at the key
		//
		if ( key === undefined ||
				( ( key && typeof key === "string" ) && value === undefined ) ) {

			return this.get( owner, key );
		}

		// When the key is not a string, or both a key and value
		// are specified, set or extend (existing objects) with either:
		//
		//   1. An object of properties
		//   2. A key and value
		//
		this.set( owner, key, value );

		// Since the "set" path can have two possible entry points
		// return the expected data based on which path was taken[*]
		return value !== undefined ? value : key;
	},
	remove: function( owner, key ) {
		var i,
			cache = owner[ this.expando ];

		if ( cache === undefined ) {
			return;
		}

		if ( key !== undefined ) {

			// Support array or space separated string of keys
			if ( Array.isArray( key ) ) {

				// If key is an array of keys...
				// We always set camelCase keys, so remove that.
				key = key.map( camelCase );
			} else {
				key = camelCase( key );

				// If a key with the spaces exists, use it.
				// Otherwise, create an array by matching non-whitespace
				key = key in cache ?
					[ key ] :
					( key.match( rnothtmlwhite ) || [] );
			}

			i = key.length;

			while ( i-- ) {
				delete cache[ key[ i ] ];
			}
		}

		// Remove the expando if there's no more data
		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {

			// Support: Chrome <=35 - 45+
			// Webkit & Blink performance suffers when deleting properties
			// from DOM nodes, so set to undefined instead
			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
			if ( owner.nodeType ) {
				owner[ this.expando ] = undefined;
			} else {
				delete owner[ this.expando ];
			}
		}
	},
	hasData: function( owner ) {
		var cache = owner[ this.expando ];
		return cache !== undefined && !jQuery.isEmptyObject( cache );
	}
};

var dataPriv = new Data();

var dataUser = new Data();

//	Implementation Summary
//
//	1. Enforce API surface and semantic compatibility with 1.9.x branch
//	2. Improve the module's maintainability by reducing the storage
//		paths to a single mechanism.
//	3. Use the same single mechanism to support "private" and "user" data.
//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
//	5. Avoid exposing implementation details on user objects (eg. expando properties)
//	6. Provide a clear path for implementation upgrade to WeakMap in 2014

var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /[A-Z]/g;

function getData( data ) {
	if ( data === "true" ) {
		return true;
	}

	if ( data === "false" ) {
		return false;
	}

	if ( data === "null" ) {
		return null;
	}

	// Only convert to a number if it doesn't change the string
	if ( data === +data + "" ) {
		return +data;
	}

	if ( rbrace.test( data ) ) {
		return JSON.parse( data );
	}

	return data;
}

function dataAttr( elem, key, data ) {
	var name;

	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {
		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
		data = elem.getAttribute( name );

		if ( typeof data === "string" ) {
			try {
				data = getData( data );
			} catch ( e ) {}

			// Make sure we set the data so it isn't changed later
			dataUser.set( elem, key, data );
		} else {
			data = undefined;
		}
	}
	return data;
}

jQuery.extend( {
	hasData: function( elem ) {
		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
	},

	data: function( elem, name, data ) {
		return dataUser.access( elem, name, data );
	},

	removeData: function( elem, name ) {
		dataUser.remove( elem, name );
	},

	// TODO: Now that all calls to _data and _removeData have been replaced
	// with direct calls to dataPriv methods, these can be deprecated.
	_data: function( elem, name, data ) {
		return dataPriv.access( elem, name, data );
	},

	_removeData: function( elem, name ) {
		dataPriv.remove( elem, name );
	}
} );

jQuery.fn.extend( {
	data: function( key, value ) {
		var i, name, data,
			elem = this[ 0 ],
			attrs = elem && elem.attributes;

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = dataUser.get( elem );

				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE 11+
						// The attrs elements can be null (trac-14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = camelCase( name.slice( 5 ) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					dataPriv.set( elem, "hasDataAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each( function() {
				dataUser.set( this, key );
			} );
		}

		return access( this, function( value ) {
			var data;

			// The calling jQuery object (element matches) is not empty
			// (and therefore has an element appears at this[ 0 ]) and the
			// `value` parameter was not undefined. An empty jQuery object
			// will result in `undefined` for elem = this[ 0 ] which will
			// throw an exception if an attempt to read a data cache is made.
			if ( elem && value === undefined ) {

				// Attempt to get data from the cache
				// The key will always be camelCased in Data
				data = dataUser.get( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to "discover" the data in
				// HTML5 custom data-* attrs
				data = dataAttr( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// We tried really hard, but the data doesn't exist.
				return;
			}

			// Set the data...
			this.each( function() {

				// We always store the camelCased key
				dataUser.set( this, key, value );
			} );
		}, null, value, arguments.length > 1, null, true );
	},

	removeData: function( key ) {
		return this.each( function() {
			dataUser.remove( this, key );
		} );
	}
} );

jQuery.extend( {
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = dataPriv.get( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || Array.isArray( data ) ) {
					queue = dataPriv.set( elem, type, jQuery.makeArray( data ) );
				} else {
					queue.push( data );
				}
			}
			return queue || [];
		}
	},

	dequeue: function( elem, type ) {
		type = type || "fx";

		var queue = jQuery.queue( elem, type ),
			startLength = queue.length,
			fn = queue.shift(),
			hooks = jQuery._queueHooks( elem, type ),
			next = function() {
				jQuery.dequeue( elem, type );
			};

		// If the fx queue is dequeued, always remove the progress sentinel
		if ( fn === "inprogress" ) {
			fn = queue.shift();
			startLength--;
		}

		if ( fn ) {

			// Add a progress sentinel to prevent the fx queue from being
			// automatically dequeued
			if ( type === "fx" ) {
				queue.unshift( "inprogress" );
			}

			// Clear up the last queue stop function
			delete hooks.stop;
			fn.call( elem, next, hooks );
		}

		if ( !startLength && hooks ) {
			hooks.empty.fire();
		}
	},

	// Not public - generate a queueHooks object, or return the current one
	_queueHooks: function( elem, type ) {
		var key = type + "queueHooks";
		return dataPriv.get( elem, key ) || dataPriv.set( elem, key, {
			empty: jQuery.Callbacks( "once memory" ).add( function() {
				dataPriv.remove( elem, [ type + "queue", key ] );
			} )
		} );
	}
} );

jQuery.fn.extend( {
	queue: function( type, data ) {
		var setter = 2;

		if ( typeof type !== "string" ) {
			data = type;
			type = "fx";
			setter--;
		}

		if ( arguments.length < setter ) {
			return jQuery.queue( this[ 0 ], type );
		}

		return data === undefined ?
			this :
			this.each( function() {
				var queue = jQuery.queue( this, type, data );

				// Ensure a hooks for this queue
				jQuery._queueHooks( this, type );

				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
					jQuery.dequeue( this, type );
				}
			} );
	},
	dequeue: function( type ) {
		return this.each( function() {
			jQuery.dequeue( this, type );
		} );
	},
	clearQueue: function( type ) {
		return this.queue( type || "fx", [] );
	},

	// Get a promise resolved when queues of a certain type
	// are emptied (fx is the type by default)
	promise: function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
} );

var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;

var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );

var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

// isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or
// through the CSS cascade), which is useful in deciding whether or not to make it visible.
// It differs from the :hidden selector (jQuery.expr.pseudos.hidden) in two important ways:
// * A hidden ancestor does not force an element to be classified as hidden.
// * Being disconnected from the document does not force an element to be classified as hidden.
// These differences improve the behavior of .toggle() et al. when applied to elements that are
// detached or contained within hidden ancestors (gh-2404, gh-2863).
function isHiddenWithinTree( elem, el ) {

	// isHiddenWithinTree might be called from jQuery#filter function;
	// in that case, element will be second argument
	elem = el || elem;

	// Inline style trumps all
	return elem.style.display === "none" ||
		elem.style.display === "" &&
		jQuery.css( elem, "display" ) === "none";
}

var ralphaStart = /^[a-z]/,

	// The regex visualized:
	//
	//                         /----------\
	//                        |            |    /-------\
	//                        |  / Top  \  |   |         |
	//         /--- Border ---+-| Right  |-+---+- Width -+---\
	//        |                 | Bottom |                    |
	//        |                  \ Left /                     |
	//        |                                               |
	//        |                              /----------\     |
	//        |          /-------------\    |            |    |- END
	//        |         |               |   |  / Top  \  |    |
	//        |         |  / Margin  \  |   | | Right  | |    |
	//        |---------+-|           |-+---+-| Bottom |-+----|
	//        |            \ Padding /         \ Left /       |
	// BEGIN -|                                               |
	//        |                /---------\                    |
	//        |               |           |                   |
	//        |               |  / Min \  |    / Width  \     |
	//         \--------------+-|       |-+---|          |---/
	//                           \ Max /       \ Height /
	rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;

function isAutoPx( prop ) {

	// The first test is used to ensure that:
	// 1. The prop starts with a lowercase letter (as we uppercase it for the second regex).
	// 2. The prop is not empty.
	return ralphaStart.test( prop ) &&
		rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) );
}

function adjustCSS( elem, prop, valueParts, tween ) {
	var adjusted, scale,
		maxIterations = 20,
		currentValue = tween ?
			function() {
				return tween.cur();
			} :
			function() {
				return jQuery.css( elem, prop, "" );
			},
		initial = currentValue(),
		unit = valueParts && valueParts[ 3 ] || ( isAutoPx( prop ) ? "px" : "" ),

		// Starting value computation is required for potential unit mismatches
		initialInUnit = elem.nodeType &&
			( !isAutoPx( prop ) || unit !== "px" && +initial ) &&
			rcssNum.exec( jQuery.css( elem, prop ) );

	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

		// Support: Firefox <=54 - 66+
		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
		initial = initial / 2;

		// Trust units reported by jQuery.css
		unit = unit || initialInUnit[ 3 ];

		// Iteratively approximate from a nonzero starting point
		initialInUnit = +initial || 1;

		while ( maxIterations-- ) {

			// Evaluate and update our best guess (doubling guesses that zero out).
			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
			jQuery.style( elem, prop, initialInUnit + unit );
			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
				maxIterations = 0;
			}
			initialInUnit = initialInUnit / scale;

		}

		initialInUnit = initialInUnit * 2;
		jQuery.style( elem, prop, initialInUnit + unit );

		// Make sure we update the tween properties later on
		valueParts = valueParts || [];
	}

	if ( valueParts ) {
		initialInUnit = +initialInUnit || +initial || 0;

		// Apply relative offset (+=/-=) if specified
		adjusted = valueParts[ 1 ] ?
			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
			+valueParts[ 2 ];
		if ( tween ) {
			tween.unit = unit;
			tween.start = initialInUnit;
			tween.end = adjusted;
		}
	}
	return adjusted;
}

// Matches dashed string for camelizing
var rmsPrefix = /^-ms-/;

// Convert dashed to camelCase, handle vendor prefixes.
// Used by the css & effects modules.
// Support: IE <=9 - 11+
// Microsoft forgot to hump their vendor prefix (trac-9572)
function cssCamelCase( string ) {
	return camelCase( string.replace( rmsPrefix, "ms-" ) );
}

var defaultDisplayMap = {};

function getDefaultDisplay( elem ) {
	var temp,
		doc = elem.ownerDocument,
		nodeName = elem.nodeName,
		display = defaultDisplayMap[ nodeName ];

	if ( display ) {
		return display;
	}

	temp = doc.body.appendChild( doc.createElement( nodeName ) );
	display = jQuery.css( temp, "display" );

	temp.parentNode.removeChild( temp );

	if ( display === "none" ) {
		display = "block";
	}
	defaultDisplayMap[ nodeName ] = display;

	return display;
}

function showHide( elements, show ) {
	var display, elem,
		values = [],
		index = 0,
		length = elements.length;

	// Determine new display value for elements that need to change
	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		display = elem.style.display;
		if ( show ) {

			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
			// check is required in this first loop unless we have a nonempty display value (either
			// inline or about-to-be-restored)
			if ( display === "none" ) {
				values[ index ] = dataPriv.get( elem, "display" ) || null;
				if ( !values[ index ] ) {
					elem.style.display = "";
				}
			}
			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
				values[ index ] = getDefaultDisplay( elem );
			}
		} else {
			if ( display !== "none" ) {
				values[ index ] = "none";

				// Remember what we're overwriting
				dataPriv.set( elem, "display", display );
			}
		}
	}

	// Set the display of the elements in a second loop to avoid constant reflow
	for ( index = 0; index < length; index++ ) {
		if ( values[ index ] != null ) {
			elements[ index ].style.display = values[ index ];
		}
	}

	return elements;
}

jQuery.fn.extend( {
	show: function() {
		return showHide( this, true );
	},
	hide: function() {
		return showHide( this );
	},
	toggle: function( state ) {
		if ( typeof state === "boolean" ) {
			return state ? this.show() : this.hide();
		}

		return this.each( function() {
			if ( isHiddenWithinTree( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		} );
	}
} );

var isAttached = function( elem ) {
		return jQuery.contains( elem.ownerDocument, elem ) ||
			elem.getRootNode( composed ) === elem.ownerDocument;
	},
	composed = { composed: true };

// Support: IE 9 - 11+
// Check attachment across shadow DOM boundaries when possible (gh-3504).
// Provide a fallback for browsers without Shadow DOM v1 support.
if ( !documentElement$1.getRootNode ) {
	isAttached = function( elem ) {
		return jQuery.contains( elem.ownerDocument, elem );
	};
}

// rtagName captures the name from the first start tag in a string of HTML
// https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state
// https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state
var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;

var wrapMap = {

	// Table parts need to be wrapped with `<table>` or they're
	// stripped to their contents when put in a div.
	// XHTML parsers do not magically insert elements in the
	// same way that tag soup parsers do, so we cannot shorten
	// this by omitting <tbody> or other required elements.
	thead: [ "table" ],
	col: [ "colgroup", "table" ],
	tr: [ "tbody", "table" ],
	td: [ "tr", "tbody", "table" ]
};

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

function getAll( context, tag ) {

	// Support: IE <=9 - 11+
	// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
	var ret;

	if ( typeof context.getElementsByTagName !== "undefined" ) {

		// Use slice to snapshot the live collection from gEBTN
		ret = arr.slice.call( context.getElementsByTagName( tag || "*" ) );

	} else if ( typeof context.querySelectorAll !== "undefined" ) {
		ret = context.querySelectorAll( tag || "*" );

	} else {
		ret = [];
	}

	if ( tag === undefined || tag && nodeName( context, tag ) ) {
		return jQuery.merge( [ context ], ret );
	}

	return ret;
}

var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;

// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		dataPriv.set(
			elems[ i ],
			"globalEval",
			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
		);
	}
}

var rhtml = /<|&#?\w+;/;

function buildFragment( elems, context, scripts, selection, ignored ) {
	var elem, tmp, tag, wrap, attached, j,
		fragment = context.createDocumentFragment(),
		nodes = [],
		i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		elem = elems[ i ];

		if ( elem || elem === 0 ) {

			// Add nodes directly
			if ( toType( elem ) === "object" && ( elem.nodeType || isArrayLike( elem ) ) ) {
				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );

			// Convert non-html into a text node
			} else if ( !rhtml.test( elem ) ) {
				nodes.push( context.createTextNode( elem ) );

			// Convert html into DOM nodes
			} else {
				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );

				// Deserialize a standard representation
				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
				wrap = wrapMap[ tag ] || arr;

				// Create wrappers & descend into them.
				j = wrap.length;
				while ( --j > -1 ) {
					tmp = tmp.appendChild( context.createElement( wrap[ j ] ) );
				}

				tmp.innerHTML = jQuery.htmlPrefilter( elem );

				jQuery.merge( nodes, tmp.childNodes );

				// Remember the top-level container
				tmp = fragment.firstChild;

				// Ensure the created nodes are orphaned (trac-12392)
				tmp.textContent = "";
			}
		}
	}

	// Remove wrapper from fragment
	fragment.textContent = "";

	i = 0;
	while ( ( elem = nodes[ i++ ] ) ) {

		// Skip elements already in the context collection (trac-4087)
		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
			if ( ignored ) {
				ignored.push( elem );
			}
			continue;
		}

		attached = isAttached( elem );

		// Append to fragment
		tmp = getAll( fragment.appendChild( elem ), "script" );

		// Preserve script evaluation history
		if ( attached ) {
			setGlobalEval( tmp );
		}

		// Capture executables
		if ( scripts ) {
			j = 0;
			while ( ( elem = tmp[ j++ ] ) ) {
				if ( rscriptType.test( elem.type || "" ) ) {
					scripts.push( elem );
				}
			}
		}
	}

	return fragment;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
	return elem;
}
function restoreScript( elem ) {
	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
		elem.type = elem.type.slice( 5 );
	} else {
		elem.removeAttribute( "type" );
	}

	return elem;
}

function domManip( collection, args, callback, ignored ) {

	// Flatten any nested arrays
	args = flat( args );

	var fragment, first, scripts, hasScripts, node, doc,
		i = 0,
		l = collection.length,
		iNoClone = l - 1,
		value = args[ 0 ],
		valueIsFunction = typeof value === "function";

	if ( valueIsFunction ) {
		return collection.each( function( index ) {
			var self = collection.eq( index );
			args[ 0 ] = value.call( this, index, self.html() );
			domManip( self, args, callback, ignored );
		} );
	}

	if ( l ) {
		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
		first = fragment.firstChild;

		if ( fragment.childNodes.length === 1 ) {
			fragment = first;
		}

		// Require either new content or an interest in ignored elements to invoke the callback
		if ( first || ignored ) {
			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
			hasScripts = scripts.length;

			// Use the original fragment for the last item
			// instead of the first because it can end up
			// being emptied incorrectly in certain situations (trac-8070).
			for ( ; i < l; i++ ) {
				node = fragment;

				if ( i !== iNoClone ) {
					node = jQuery.clone( node, true, true );

					// Keep references to cloned scripts for later restoration
					if ( hasScripts ) {
						jQuery.merge( scripts, getAll( node, "script" ) );
					}
				}

				callback.call( collection[ i ], node, i );
			}

			if ( hasScripts ) {
				doc = scripts[ scripts.length - 1 ].ownerDocument;

				// Re-enable scripts
				jQuery.map( scripts, restoreScript );

				// Evaluate executable scripts on first document insertion
				for ( i = 0; i < hasScripts; i++ ) {
					node = scripts[ i ];
					if ( rscriptType.test( node.type || "" ) &&
						!dataPriv.get( node, "globalEval" ) &&
						jQuery.contains( doc, node ) ) {

						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {

							// Optional AJAX dependency, but won't run scripts if not present
							if ( jQuery._evalUrl && !node.noModule ) {
								jQuery._evalUrl( node.src, {
									nonce: node.nonce,
									crossOrigin: node.crossOrigin
								}, doc );
							}
						} else {
							DOMEval( node.textContent, node, doc );
						}
					}
				}
			}
		}
	}

	return collection;
}

var rcheckableType = /^(?:checkbox|radio)$/i;

var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

function on( elem, types, selector, data, fn, one ) {
	var origFn, type;

	// Types can be a map of types/handlers
	if ( typeof types === "object" ) {

		// ( types-Object, selector, data )
		if ( typeof selector !== "string" ) {

			// ( types-Object, data )
			data = data || selector;
			selector = undefined;
		}
		for ( type in types ) {
			on( elem, type, selector, data, types[ type ], one );
		}
		return elem;
	}

	if ( data == null && fn == null ) {

		// ( types, fn )
		fn = selector;
		data = selector = undefined;
	} else if ( fn == null ) {
		if ( typeof selector === "string" ) {

			// ( types, selector, fn )
			fn = data;
			data = undefined;
		} else {

			// ( types, data, fn )
			fn = data;
			data = selector;
			selector = undefined;
		}
	}
	if ( fn === false ) {
		fn = returnFalse;
	} else if ( !fn ) {
		return elem;
	}

	if ( one === 1 ) {
		origFn = fn;
		fn = function( event ) {

			// Can use an empty set, since event contains the info
			jQuery().off( event );
			return origFn.apply( this, arguments );
		};

		// Use same guid so caller can remove using origFn
		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
	}
	return elem.each( function() {
		jQuery.event.add( this, types, fn, data, selector );
	} );
}

/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
jQuery.event = {

	add: function( elem, types, handler, data, selector ) {

		var handleObjIn, eventHandle, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.get( elem );

		// Only attach events to objects that accept data
		if ( !acceptData( elem ) ) {
			return;
		}

		// Caller can pass in an object of custom data in lieu of the handler
		if ( handler.handler ) {
			handleObjIn = handler;
			handler = handleObjIn.handler;
			selector = handleObjIn.selector;
		}

		// Ensure that invalid selectors throw exceptions at attach time
		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
		if ( selector ) {
			jQuery.find.matchesSelector( documentElement$1, selector );
		}

		// Make sure that the handler has a unique ID, used to find/remove it later
		if ( !handler.guid ) {
			handler.guid = jQuery.guid++;
		}

		// Init the element's event structure and main handler, if this is the first
		if ( !( events = elemData.events ) ) {
			events = elemData.events = Object.create( null );
		}
		if ( !( eventHandle = elemData.handle ) ) {
			eventHandle = elemData.handle = function( e ) {

				// Discard the second event of a jQuery.event.trigger() and
				// when an event is called after a page has unloaded
				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
			};
		}

		// Handle multiple events separated by a space
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// There *must* be a type, no attaching namespace-only handlers
			if ( !type ) {
				continue;
			}

			// If event changes its type, use the special event handlers for the changed type
			special = jQuery.event.special[ type ] || {};

			// If selector defined, determine special event api type, otherwise given type
			type = ( selector ? special.delegateType : special.bindType ) || type;

			// Update special based on newly reset type
			special = jQuery.event.special[ type ] || {};

			// handleObj is passed to all event handlers
			handleObj = jQuery.extend( {
				type: type,
				origType: origType,
				data: data,
				handler: handler,
				guid: handler.guid,
				selector: selector,
				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
				namespace: namespaces.join( "." )
			}, handleObjIn );

			// Init the event handler queue if we're the first
			if ( !( handlers = events[ type ] ) ) {
				handlers = events[ type ] = [];
				handlers.delegateCount = 0;

				// Only use addEventListener if the special events handler returns false
				if ( !special.setup ||
					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {

					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle );
					}
				}
			}

			if ( special.add ) {
				special.add.call( elem, handleObj );

				if ( !handleObj.handler.guid ) {
					handleObj.handler.guid = handler.guid;
				}
			}

			// Add to the element's handler list, delegates in front
			if ( selector ) {
				handlers.splice( handlers.delegateCount++, 0, handleObj );
			} else {
				handlers.push( handleObj );
			}
		}

	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {

		var j, origCount, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );

		if ( !elemData || !( events = elemData.events ) ) {
			return;
		}

		// Once for each type.namespace in types; type may be omitted
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// Unbind all events (on this namespace, if provided) for the element
			if ( !type ) {
				for ( type in events ) {
					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
				}
				continue;
			}

			special = jQuery.event.special[ type ] || {};
			type = ( selector ? special.delegateType : special.bindType ) || type;
			handlers = events[ type ] || [];
			tmp = tmp[ 2 ] &&
				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );

			// Remove matching events
			origCount = j = handlers.length;
			while ( j-- ) {
				handleObj = handlers[ j ];

				if ( ( mappedTypes || origType === handleObj.origType ) &&
					( !handler || handler.guid === handleObj.guid ) &&
					( !tmp || tmp.test( handleObj.namespace ) ) &&
					( !selector || selector === handleObj.selector ||
						selector === "**" && handleObj.selector ) ) {
					handlers.splice( j, 1 );

					if ( handleObj.selector ) {
						handlers.delegateCount--;
					}
					if ( special.remove ) {
						special.remove.call( elem, handleObj );
					}
				}
			}

			// Remove generic event handler if we removed something and no more handlers exist
			// (avoids potential for endless recursion during removal of special event handlers)
			if ( origCount && !handlers.length ) {
				if ( !special.teardown ||
					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {

					jQuery.removeEvent( elem, type, elemData.handle );
				}

				delete events[ type ];
			}
		}

		// Remove data and the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			dataPriv.remove( elem, "handle events" );
		}
	},

	dispatch: function( nativeEvent ) {

		var i, j, ret, matched, handleObj, handlerQueue,
			args = new Array( arguments.length ),

			// Make a writable jQuery.Event from the native event object
			event = jQuery.event.fix( nativeEvent ),

			handlers = (
				dataPriv.get( this, "events" ) || Object.create( null )
			)[ event.type ] || [],
			special = jQuery.event.special[ event.type ] || {};

		// Use the fix-ed jQuery.Event rather than the (read-only) native event
		args[ 0 ] = event;

		for ( i = 1; i < arguments.length; i++ ) {
			args[ i ] = arguments[ i ];
		}

		event.delegateTarget = this;

		// Call the preDispatch hook for the mapped type, and let it bail if desired
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
			return;
		}

		// Determine handlers
		handlerQueue = jQuery.event.handlers.call( this, event, handlers );

		// Run delegates first; they may want to stop propagation beneath us
		i = 0;
		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
			event.currentTarget = matched.elem;

			j = 0;
			while ( ( handleObj = matched.handlers[ j++ ] ) &&
				!event.isImmediatePropagationStopped() ) {

				// If the event is namespaced, then each handler is only invoked if it is
				// specially universal or its namespaces are a superset of the event's.
				if ( !event.rnamespace || handleObj.namespace === false ||
					event.rnamespace.test( handleObj.namespace ) ) {

					event.handleObj = handleObj;
					event.data = handleObj.data;

					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
						handleObj.handler ).apply( matched.elem, args );

					if ( ret !== undefined ) {
						if ( ( event.result = ret ) === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}
				}
			}
		}

		// Call the postDispatch hook for the mapped type
		if ( special.postDispatch ) {
			special.postDispatch.call( this, event );
		}

		return event.result;
	},

	handlers: function( event, handlers ) {
		var i, handleObj, sel, matchedHandlers, matchedSelectors,
			handlerQueue = [],
			delegateCount = handlers.delegateCount,
			cur = event.target;

		// Find delegate handlers
		if ( delegateCount &&

			// Support: Firefox <=42 - 66+
			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
			// Support: IE 11+
			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
			!( event.type === "click" && event.button >= 1 ) ) {

			for ( ; cur !== this; cur = cur.parentNode || this ) {

				// Don't check non-elements (trac-13208)
				// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
					matchedHandlers = [];
					matchedSelectors = {};
					for ( i = 0; i < delegateCount; i++ ) {
						handleObj = handlers[ i ];

						// Don't conflict with Object.prototype properties (trac-13203)
						sel = handleObj.selector + " ";

						if ( matchedSelectors[ sel ] === undefined ) {
							matchedSelectors[ sel ] = handleObj.needsContext ?
								jQuery( sel, this ).index( cur ) > -1 :
								jQuery.find( sel, this, null, [ cur ] ).length;
						}
						if ( matchedSelectors[ sel ] ) {
							matchedHandlers.push( handleObj );
						}
					}
					if ( matchedHandlers.length ) {
						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
					}
				}
			}
		}

		// Add the remaining (directly-bound) handlers
		cur = this;
		if ( delegateCount < handlers.length ) {
			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
		}

		return handlerQueue;
	},

	addProp: function( name, hook ) {
		Object.defineProperty( jQuery.Event.prototype, name, {
			enumerable: true,
			configurable: true,

			get: typeof hook === "function" ?
				function() {
					if ( this.originalEvent ) {
						return hook( this.originalEvent );
					}
				} :
				function() {
					if ( this.originalEvent ) {
						return this.originalEvent[ name ];
					}
				},

			set: function( value ) {
				Object.defineProperty( this, name, {
					enumerable: true,
					configurable: true,
					writable: true,
					value: value
				} );
			}
		} );
	},

	fix: function( originalEvent ) {
		return originalEvent[ jQuery.expando ] ?
			originalEvent :
			new jQuery.Event( originalEvent );
	},

	special: jQuery.extend( Object.create( null ), {
		load: {

			// Prevent triggered image.load events from bubbling to window.load
			noBubble: true
		},
		click: {

			// Utilize native event to ensure correct state for checkable inputs
			setup: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Claim the first handler
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					// dataPriv.set( el, "click", ... )
					leverageNative( el, "click", true );
				}

				// Return false to allow normal processing in the caller
				return false;
			},
			trigger: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Force setup before triggering a click
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					leverageNative( el, "click" );
				}

				// Return non-false to allow normal event-path propagation
				return true;
			},

			// For cross-browser consistency, suppress native .click() on links
			// Also prevent it if we're currently inside a leveraged native-event stack
			_default: function( event ) {
				var target = event.target;
				return rcheckableType.test( target.type ) &&
					target.click && nodeName( target, "input" ) &&
					dataPriv.get( target, "click" ) ||
					nodeName( target, "a" );
			}
		},

		beforeunload: {
			postDispatch: function( event ) {
				if ( event.result !== undefined ) {

					// Setting `event.originalEvent.returnValue` in modern
					// browsers does the same as just calling `preventDefault()`,
					// the browsers ignore the value anyway.
					// Incidentally, IE 11 is the only browser from our supported
					// ones which respects the value returned from a `beforeunload`
					// handler attached by `addEventListener`; other browsers do
					// so only for inline handlers, so not setting the value
					// directly shouldn't reduce any functionality.
					event.preventDefault();
				}
			}
		}
	} )
};

// Ensure the presence of an event listener that handles manually-triggered
// synthetic events by interrupting progress until reinvoked in response to
// *native* events that it fires directly, ensuring that state changes have
// already occurred before other listeners are invoked.
function leverageNative( el, type, isSetup ) {

	// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
	if ( !isSetup ) {
		if ( dataPriv.get( el, type ) === undefined ) {
			jQuery.event.add( el, type, returnTrue );
		}
		return;
	}

	// Register the controller as a special universal handler for all event namespaces
	dataPriv.set( el, type, false );
	jQuery.event.add( el, type, {
		namespace: false,
		handler: function( event ) {
			var result,
				saved = dataPriv.get( this, type );

			// This controller function is invoked under multiple circumstances,
			// differentiated by the stored value in `saved`:
			// 1. For an outer synthetic `.trigger()`ed event (detected by
			//    `event.isTrigger & 1` and non-array `saved`), it records arguments
			//    as an array and fires an [inner] native event to prompt state
			//    changes that should be observed by registered listeners (such as
			//    checkbox toggling and focus updating), then clears the stored value.
			// 2. For an [inner] native event (detected by `saved` being
			//    an array), it triggers an inner synthetic event, records the
			//    result, and preempts propagation to further jQuery listeners.
			// 3. For an inner synthetic event (detected by `event.isTrigger & 1` and
			//    array `saved`), it prevents double-propagation of surrogate events
			//    but otherwise allows everything to proceed (particularly including
			//    further listeners).
			// Possible `saved` data shapes: `[...], `{ value }`, `false`.
			if ( ( event.isTrigger & 1 ) && this[ type ] ) {

				// Interrupt processing of the outer synthetic .trigger()ed event
				if ( !saved.length ) {

					// Store arguments for use when handling the inner native event
					// There will always be at least one argument (an event object),
					// so this array will not be confused with a leftover capture object.
					saved = slice.call( arguments );
					dataPriv.set( this, type, saved );

					// Trigger the native event and capture its result
					this[ type ]();
					result = dataPriv.get( this, type );
					dataPriv.set( this, type, false );

					if ( saved !== result ) {

						// Cancel the outer synthetic event
						event.stopImmediatePropagation();
						event.preventDefault();

						// Support: Chrome 86+
						// In Chrome, if an element having a focusout handler is
						// blurred by clicking outside of it, it invokes the handler
						// synchronously. If that handler calls `.remove()` on
						// the element, the data is cleared, leaving `result`
						// undefined. We need to guard against this.
						return result && result.value;
					}

				// If this is an inner synthetic event for an event with a bubbling
				// surrogate (focus or blur), assume that the surrogate already
				// propagated from triggering the native event and prevent that
				// from happening again here.
				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
					event.stopPropagation();
				}

			// If this is a native event triggered above, everything is now in order.
			// Fire an inner synthetic event with the original arguments.
			} else if ( saved.length ) {

				// ...and capture the result
				dataPriv.set( this, type, {
					value: jQuery.event.trigger(
						saved[ 0 ],
						saved.slice( 1 ),
						this
					)
				} );

				// Abort handling of the native event by all jQuery handlers while allowing
				// native handlers on the same element to run. On target, this is achieved
				// by stopping immediate propagation just on the jQuery event. However,
				// the native event is re-wrapped by a jQuery one on each level of the
				// propagation so the only way to stop it for jQuery is to stop it for
				// everyone via native `stopPropagation()`. This is not a problem for
				// focus/blur which don't bubble, but it does also stop click on checkboxes
				// and radios. We accept this limitation.
				event.stopPropagation();
				event.isImmediatePropagationStopped = returnTrue;
			}
		}
	} );
}

jQuery.removeEvent = function( elem, type, handle ) {

	// This "if" is needed for plain objects
	if ( elem.removeEventListener ) {
		elem.removeEventListener( type, handle );
	}
};

jQuery.Event = function( src, props ) {

	// Allow instantiation without the 'new' keyword
	if ( !( this instanceof jQuery.Event ) ) {
		return new jQuery.Event( src, props );
	}

	// Event object
	if ( src && src.type ) {
		this.originalEvent = src;
		this.type = src.type;

		// Events bubbling up the document may have been marked as prevented
		// by a handler lower down the tree; reflect the correct value.
		this.isDefaultPrevented = src.defaultPrevented ?
			returnTrue :
			returnFalse;

		// Create target properties
		this.target = src.target;
		this.currentTarget = src.currentTarget;
		this.relatedTarget = src.relatedTarget;

	// Event type
	} else {
		this.type = src;
	}

	// Put explicitly provided properties onto the event object
	if ( props ) {
		jQuery.extend( this, props );
	}

	// Create a timestamp if incoming event doesn't have one
	this.timeStamp = src && src.timeStamp || Date.now();

	// Mark it as fixed
	this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	constructor: jQuery.Event,
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,
	isSimulated: false,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;

		if ( e && !this.isSimulated ) {
			e.preventDefault();
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopPropagation();
		}
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
	altKey: true,
	bubbles: true,
	cancelable: true,
	changedTouches: true,
	ctrlKey: true,
	detail: true,
	eventPhase: true,
	metaKey: true,
	pageX: true,
	pageY: true,
	shiftKey: true,
	view: true,
	"char": true,
	code: true,
	charCode: true,
	key: true,
	keyCode: true,
	button: true,
	buttons: true,
	clientX: true,
	clientY: true,
	offsetX: true,
	offsetY: true,
	pointerId: true,
	pointerType: true,
	screenX: true,
	screenY: true,
	targetTouches: true,
	toElement: true,
	touches: true,
	which: true
}, jQuery.event.addProp );

jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {

	// Support: IE 11+
	// Attach a single focusin/focusout handler on the document while someone wants focus/blur.
	// This is because the former are synchronous in IE while the latter are async. In other
	// browsers, all those handlers are invoked synchronously.
	function focusMappedHandler( nativeEvent ) {

		// `eventHandle` would already wrap the event, but we need to change the `type` here.
		var event = jQuery.event.fix( nativeEvent );
		event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
		event.isSimulated = true;

		// focus/blur don't bubble while focusin/focusout do; simulate the former by only
		// invoking the handler at the lower level.
		if ( event.target === event.currentTarget ) {

			// The setup part calls `leverageNative`, which, in turn, calls
			// `jQuery.event.add`, so event handle will already have been set
			// by this point.
			dataPriv.get( this, "handle" )( event );
		}
	}

	jQuery.event.special[ type ] = {

		// Utilize native event if possible so blur/focus sequence is correct
		setup: function() {

			// Claim the first handler
			// dataPriv.set( this, "focus", ... )
			// dataPriv.set( this, "blur", ... )
			leverageNative( this, type, true );

			if ( isIE ) {
				this.addEventListener( delegateType, focusMappedHandler );
			} else {

				// Return false to allow normal processing in the caller
				return false;
			}
		},
		trigger: function() {

			// Force setup before trigger
			leverageNative( this, type );

			// Return non-false to allow normal event-path propagation
			return true;
		},

		teardown: function() {
			if ( isIE ) {
				this.removeEventListener( delegateType, focusMappedHandler );
			} else {

				// Return false to indicate standard teardown should be applied
				return false;
			}
		},

		// Suppress native focus or blur if we're currently inside
		// a leveraged native-event stack
		_default: function( event ) {
			return dataPriv.get( event.target, type );
		},

		delegateType: delegateType
	};
} );

// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
jQuery.each( {
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, function( orig, fix ) {
	jQuery.event.special[ orig ] = {
		delegateType: fix,
		bindType: fix,

		handle: function( event ) {
			var ret,
				target = this,
				related = event.relatedTarget,
				handleObj = event.handleObj;

			// For mouseenter/leave call the handler if related is outside the target.
			// NB: No relatedTarget if the mouse left/entered the browser window
			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
				event.type = handleObj.origType;
				ret = handleObj.handler.apply( this, arguments );
				event.type = fix;
			}
			return ret;
		}
	};
} );

jQuery.fn.extend( {

	on: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn );
	},
	one: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn, 1 );
	},
	off: function( types, selector, fn ) {
		var handleObj, type;
		if ( types && types.preventDefault && types.handleObj ) {

			// ( event )  dispatched jQuery.Event
			handleObj = types.handleObj;
			jQuery( types.delegateTarget ).off(
				handleObj.namespace ?
					handleObj.origType + "." + handleObj.namespace :
					handleObj.origType,
				handleObj.selector,
				handleObj.handler
			);
			return this;
		}
		if ( typeof types === "object" ) {

			// ( types-object [, selector] )
			for ( type in types ) {
				this.off( type, selector, types[ type ] );
			}
			return this;
		}
		if ( selector === false || typeof selector === "function" ) {

			// ( types [, fn] )
			fn = selector;
			selector = undefined;
		}
		if ( fn === false ) {
			fn = returnFalse;
		}
		return this.each( function() {
			jQuery.event.remove( this, types, fn, selector );
		} );
	}
} );

var

	// Support: IE <=10 - 11+
	// In IE using regex groups here causes severe slowdowns.
	rnoInnerhtml = /<script|<style|<link/i;

// Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) {
	if ( nodeName( elem, "table" ) &&
		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {

		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
	}

	return elem;
}

function cloneCopyEvent( src, dest ) {
	var type, i, l,
		events = dataPriv.get( src, "events" );

	if ( dest.nodeType !== 1 ) {
		return;
	}

	// 1. Copy private data: events, handlers, etc.
	if ( events ) {
		dataPriv.remove( dest, "handle events" );
		for ( type in events ) {
			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
				jQuery.event.add( dest, type, events[ type ][ i ] );
			}
		}
	}

	// 2. Copy user data
	if ( dataUser.hasData( src ) ) {
		dataUser.set( dest, jQuery.extend( {}, dataUser.get( src ) ) );
	}
}

function remove( elem, selector, keepData ) {
	var node,
		nodes = selector ? jQuery.filter( selector, elem ) : elem,
		i = 0;

	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
		if ( !keepData && node.nodeType === 1 ) {
			jQuery.cleanData( getAll( node ) );
		}

		if ( node.parentNode ) {
			if ( keepData && isAttached( node ) ) {
				setGlobalEval( getAll( node, "script" ) );
			}
			node.parentNode.removeChild( node );
		}
	}

	return elem;
}

jQuery.extend( {
	htmlPrefilter: function( html ) {
		return html;
	},

	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var i, l, srcElements, destElements,
			clone = elem.cloneNode( true ),
			inPage = isAttached( elem );

		// Fix IE cloning issues
		if ( isIE && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
				!jQuery.isXMLDoc( elem ) ) {

			// We eschew jQuery#find here for performance reasons:
			// https://jsperf.com/getall-vs-sizzle/2
			destElements = getAll( clone );
			srcElements = getAll( elem );

			for ( i = 0, l = srcElements.length; i < l; i++ ) {

				// Support: IE <=11+
				// IE fails to set the defaultValue to the correct value when
				// cloning textareas.
				if ( nodeName( destElements[ i ], "textarea" ) ) {
					destElements[ i ].defaultValue = srcElements[ i ].defaultValue;
				}
			}
		}

		// Copy the events from the original to the clone
		if ( dataAndEvents ) {
			if ( deepDataAndEvents ) {
				srcElements = srcElements || getAll( elem );
				destElements = destElements || getAll( clone );

				for ( i = 0, l = srcElements.length; i < l; i++ ) {
					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		// Return the cloned set
		return clone;
	},

	cleanData: function( elems ) {
		var data, elem, type,
			special = jQuery.event.special,
			i = 0;

		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
			if ( acceptData( elem ) ) {
				if ( ( data = elem[ dataPriv.expando ] ) ) {
					if ( data.events ) {
						for ( type in data.events ) {
							if ( special[ type ] ) {
								jQuery.event.remove( elem, type );

							// This is a shortcut to avoid jQuery.event.remove's overhead
							} else {
								jQuery.removeEvent( elem, type, data.handle );
							}
						}
					}

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataPriv.expando ] = undefined;
				}
				if ( elem[ dataUser.expando ] ) {

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataUser.expando ] = undefined;
				}
			}
		}
	}
} );

jQuery.fn.extend( {
	detach: function( selector ) {
		return remove( this, selector, true );
	},

	remove: function( selector ) {
		return remove( this, selector );
	},

	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().each( function() {
					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
						this.textContent = value;
					}
				} );
		}, null, value, arguments.length );
	},

	append: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		} );
	},

	prepend: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.insertBefore( elem, target.firstChild );
			}
		} );
	},

	before: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		} );
	},

	after: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		} );
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; ( elem = this[ i ] ) != null; i++ ) {
			if ( elem.nodeType === 1 ) {

				// Prevent memory leaks
				jQuery.cleanData( getAll( elem, false ) );

				// Remove any remaining nodes
				elem.textContent = "";
			}
		}

		return this;
	},

	clone: function( dataAndEvents, deepDataAndEvents ) {
		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

		return this.map( function() {
			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
		} );
	},

	html: function( value ) {
		return access( this, function( value ) {
			var elem = this[ 0 ] || {},
				i = 0,
				l = this.length;

			if ( value === undefined && elem.nodeType === 1 ) {
				return elem.innerHTML;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

				value = jQuery.htmlPrefilter( value );

				try {
					for ( ; i < l; i++ ) {
						elem = this[ i ] || {};

						// Remove element nodes and prevent memory leaks
						if ( elem.nodeType === 1 ) {
							jQuery.cleanData( getAll( elem, false ) );
							elem.innerHTML = value;
						}
					}

					elem = 0;

				// If using innerHTML throws an exception, use the fallback method
				} catch ( e ) {}
			}

			if ( elem ) {
				this.empty().append( value );
			}
		}, null, value, arguments.length );
	},

	replaceWith: function() {
		var ignored = [];

		// Make the changes, replacing each non-ignored context element with the new content
		return domManip( this, arguments, function( elem ) {
			var parent = this.parentNode;

			if ( jQuery.inArray( this, ignored ) < 0 ) {
				jQuery.cleanData( getAll( this ) );
				if ( parent ) {
					parent.replaceChild( elem, this );
				}
			}

		// Force callback invocation
		}, ignored );
	}
} );

jQuery.each( {
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1,
			i = 0;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone( true );
			jQuery( insert[ i ] )[ original ]( elems );
			push.apply( ret, elems );
		}

		return this.pushStack( ret );
	};
} );

var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var rcustomProp = /^--/;

function getStyles( elem ) {

	// Support: IE <=11+ (trac-14150)
	// In IE popup's `window` is the opener window which makes `window.getComputedStyle( elem )`
	// break. Using `elem.ownerDocument.defaultView` avoids the issue.
	var view = elem.ownerDocument.defaultView;

	// `document.implementation.createHTMLDocument( "" )` has a `null` `defaultView`
	// property; check `defaultView` truthiness to fallback to window in such a case.
	if ( !view ) {
		view = window;
	}

	return view.getComputedStyle( elem );
}

// A method for quickly swapping in/out CSS properties to get correct calculations.
function swap( elem, options, callback ) {
	var ret, name,
		old = {};

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.call( elem );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
}

function curCSS( elem, name, computed ) {
	var ret,
		isCustomProp = rcustomProp.test( name );

	computed = computed || getStyles( elem );

	// getPropertyValue is needed for `.css('--customProperty')` (gh-3144)
	if ( computed ) {

		// A fallback to direct property access is needed as `computed`, being
		// the output of `getComputedStyle`, contains camelCased keys and
		// `getPropertyValue` requires kebab-case ones.
		//
		// Support: IE <=9 - 11+
		// IE only supports `"float"` in `getPropertyValue`; in computed styles
		// it's only available as `"cssFloat"`. We no longer modify properties
		// sent to `.css()` apart from camelCasing, so we need to check both.
		// Normally, this would create difference in behavior: if
		// `getPropertyValue` returns an empty string, the value returned
		// by `.css()` would be `undefined`. This is usually the case for
		// disconnected elements. However, in IE even disconnected elements
		// with no styles return `"none"` for `getPropertyValue( "float" )`
		ret = computed.getPropertyValue( name ) || computed[ name ];

		if ( isCustomProp && ret ) {

			// Support: Firefox 105 - 135+
			// Spec requires trimming whitespace for custom properties (gh-4926).
			// Firefox only trims leading whitespace.
			//
			// Fall back to `undefined` if empty string returned.
			// This collapses a missing definition with property defined
			// and set to an empty string but there's no standard API
			// allowing us to differentiate them without a performance penalty
			// and returning `undefined` aligns with older jQuery.
			//
			// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
			// as whitespace while CSS does not, but this is not a problem
			// because CSS preprocessing replaces them with U+000A LINE FEED
			// (which *is* CSS whitespace)
			// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
			ret = ret.replace( rtrimCSS, "$1" ) || undefined;
		}

		if ( ret === "" && !isAttached( elem ) ) {
			ret = jQuery.style( elem, name );
		}
	}

	return ret !== undefined ?

		// Support: IE <=9 - 11+
		// IE returns zIndex value as an integer.
		ret + "" :
		ret;
}

var cssPrefixes = [ "Webkit", "Moz", "ms" ],
	emptyStyle = document$1.createElement( "div" ).style;

// Return a vendor-prefixed property or undefined
function vendorPropName( name ) {

	// Check for vendor prefixed names
	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}

// Return a potentially-mapped vendor prefixed property
function finalPropName( name ) {
	if ( name in emptyStyle ) {
		return name;
	}
	return vendorPropName( name ) || name;
}

var reliableTrDimensionsVal, reliableColDimensionsVal,
	table = document$1.createElement( "table" );

// Executing table tests requires only one layout, so they're executed
// at the same time to save the second computation.
function computeTableStyleTests() {
	if (

		// This is a singleton, we need to execute it only once
		!table ||

		// Finish early in limited (non-browser) environments
		!table.style
	) {
		return;
	}

	var trStyle,
		col = document$1.createElement( "col" ),
		tr = document$1.createElement( "tr" ),
		td = document$1.createElement( "td" );

	table.style.cssText = "position:absolute;left:-11111px;" +
		"border-collapse:separate;border-spacing:0";
	tr.style.cssText = "box-sizing:content-box;border:1px solid;height:1px";
	td.style.cssText = "height:9px;width:9px;padding:0";

	col.span = 2;

	documentElement$1
		.appendChild( table )
		.appendChild( col )
		.parentNode
		.appendChild( tr )
		.appendChild( td )
		.parentNode
		.appendChild( td.cloneNode( true ) );

	// Don't run until window is visible
	if ( table.offsetWidth === 0 ) {
		documentElement$1.removeChild( table );
		return;
	}

	trStyle = window.getComputedStyle( tr );

	// Support: Firefox 135+
	// Firefox always reports computed width as if `span` was 1.
	// Support: Safari 18.3+
	// In Safari, computed width for columns is always 0.
	// In both these browsers, using `offsetWidth` solves the issue.
	// Support: IE 11+
	// In IE, `<col>` computed width is `"auto"` unless `width` is set
	// explicitly via CSS so measurements there remain incorrect. Because of
	// the lack of a proper workaround, we accept this limitation, treating
	// IE as passing the test.
	reliableColDimensionsVal = isIE || Math.round( parseFloat(
		window.getComputedStyle( col ).width )
	) === 18;

	// Support: IE 10 - 11+
	// IE misreports `getComputedStyle` of table rows with width/height
	// set in CSS while `offset*` properties report correct values.
	// Support: Firefox 70 - 135+
	// Only Firefox includes border widths
	// in computed dimensions for table rows. (gh-4529)
	reliableTrDimensionsVal = Math.round( parseFloat( trStyle.height ) +
		parseFloat( trStyle.borderTopWidth ) +
		parseFloat( trStyle.borderBottomWidth ) ) === tr.offsetHeight;

	documentElement$1.removeChild( table );

	// Nullify the table so it wouldn't be stored in the memory;
	// it will also be a sign that checks were already performed.
	table = null;
}

jQuery.extend( support, {
	reliableTrDimensions: function() {
		computeTableStyleTests();
		return reliableTrDimensionsVal;
	},

	reliableColDimensions: function() {
		computeTableStyleTests();
		return reliableColDimensionsVal;
	}
} );

var cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	};

function setPositiveNumber( _elem, value, subtract ) {

	// Any relative (+/-) values have already been
	// normalized at this point
	var matches = rcssNum.exec( value );
	return matches ?

		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
		value;
}

function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
	var i = dimension === "width" ? 1 : 0,
		extra = 0,
		delta = 0,
		marginDelta = 0;

	// Adjustment may not be necessary
	if ( box === ( isBorderBox ? "border" : "content" ) ) {
		return 0;
	}

	for ( ; i < 4; i += 2 ) {

		// Both box models exclude margin
		// Count margin delta separately to only add it after scroll gutter adjustment.
		// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
		if ( box === "margin" ) {
			marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
		}

		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
		if ( !isBorderBox ) {

			// Add padding
			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );

			// For "border" or "margin", add border
			if ( box !== "padding" ) {
				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );

			// But still keep track of it otherwise
			} else {
				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}

		// If we get here with a border-box (content + padding + border), we're seeking "content" or
		// "padding" or "margin"
		} else {

			// For "content", subtract padding
			if ( box === "content" ) {
				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
			}

			// For "content" or "padding", subtract border
			if ( box !== "margin" ) {
				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		}
	}

	// Account for positive content-box scroll gutter when requested by providing computedVal
	if ( !isBorderBox && computedVal >= 0 ) {

		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
		// Assuming integer scroll gutter, subtract the rest and round down
		delta += Math.max( 0, Math.ceil(
			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
			computedVal -
			delta -
			extra -
			0.5

		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
		// Use an explicit zero to avoid NaN (gh-3964)
		) ) || 0;
	}

	return delta + marginDelta;
}

function getWidthOrHeight( elem, dimension, extra ) {

	// Start with computed style
	var styles = getStyles( elem ),

		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
		// Fake content-box until we know it's needed to know the true value.
		boxSizingNeeded = isIE || extra,
		isBorderBox = boxSizingNeeded &&
			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
		valueIsBorderBox = isBorderBox,

		val = curCSS( elem, dimension, styles ),
		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );

	// Return a confounding non-pixel value or feign ignorance, as appropriate.
	if ( rnumnonpx.test( val ) ) {
		if ( !extra ) {
			return val;
		}
		val = "auto";
	}


	if (
		(

			// Fall back to offsetWidth/offsetHeight when value is "auto"
			// This happens for inline elements with no explicit setting (gh-3571)
			val === "auto" ||

			// Support: IE 9 - 11+
			// Use offsetWidth/offsetHeight for when box sizing is unreliable.
			// In those cases, the computed value can be trusted to be border-box.
			( isIE && isBorderBox ) ||

			( !support.reliableColDimensions() && nodeName( elem, "col" ) ) ||

			( !support.reliableTrDimensions() && nodeName( elem, "tr" ) )
		) &&

		// Make sure the element is visible & connected
		elem.getClientRects().length ) {

		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
		// retrieved value as a content box dimension.
		valueIsBorderBox = offsetProp in elem;
		if ( valueIsBorderBox ) {
			val = elem[ offsetProp ];
		}
	}

	// Normalize "" and auto
	val = parseFloat( val ) || 0;

	// Adjust for the element's box model
	return ( val +
		boxModelAdjustment(
			elem,
			dimension,
			extra || ( isBorderBox ? "border" : "content" ),
			valueIsBorderBox,
			styles,

			// Provide the current computed size to request scroll gutter calculation (gh-3589)
			val
		)
	) + "px";
}

jQuery.extend( {

	// Add in style property hooks for overriding the default
	// behavior of getting and setting a style property
	cssHooks: {},

	// Get and set the style property on a DOM Node
	style: function( elem, name, value, extra ) {

		// Don't set styles on text and comment nodes
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
			return;
		}

		// Make sure that we're working with the right name
		var ret, type, hooks,
			origName = cssCamelCase( name ),
			isCustomProp = rcustomProp.test( name ),
			style = elem.style;

		// Make sure that we're working with the right name. We don't
		// want to query the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Gets hook for the prefixed version, then unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// Convert "+=" or "-=" to relative numbers (trac-7345)
			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
				value = adjustCSS( elem, name, ret );

				// Fixes bug trac-9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set (trac-7116)
			if ( value == null || value !== value ) {
				return;
			}

			// If the value is a number, add `px` for certain CSS properties
			if ( type === "number" ) {
				value += ret && ret[ 3 ] || ( isAutoPx( origName ) ? "px" : "" );
			}

			// Support: IE <=9 - 11+
			// background-* props of a cloned element affect the source element (trac-8908)
			if ( isIE && value === "" && name.indexOf( "background" ) === 0 ) {
				style[ name ] = "inherit";
			}

			// If a hook was provided, use that value, otherwise just set the specified value
			if ( !hooks || !( "set" in hooks ) ||
				( value = hooks.set( elem, value, extra ) ) !== undefined ) {

				if ( isCustomProp ) {
					style.setProperty( name, value );
				} else {
					style[ name ] = value;
				}
			}

		} else {

			// If a hook was provided get the non-computed value from there
			if ( hooks && "get" in hooks &&
				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {

				return ret;
			}

			// Otherwise just get the value from the style object
			return style[ name ];
		}
	},

	css: function( elem, name, extra, styles ) {
		var val, num, hooks,
			origName = cssCamelCase( name ),
			isCustomProp = rcustomProp.test( name );

		// Make sure that we're working with the right name. We don't
		// want to modify the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Try prefixed name followed by the unprefixed name
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// If a hook was provided get the computed value from there
		if ( hooks && "get" in hooks ) {
			val = hooks.get( elem, true, extra );
		}

		// Otherwise, if a way to get the computed value exists, use that
		if ( val === undefined ) {
			val = curCSS( elem, name, styles );
		}

		// Convert "normal" to computed value
		if ( val === "normal" && name in cssNormalTransform ) {
			val = cssNormalTransform[ name ];
		}

		// Make numeric if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || isFinite( num ) ? num || 0 : val;
		}

		return val;
	}
} );

jQuery.each( [ "height", "width" ], function( _i, dimension ) {
	jQuery.cssHooks[ dimension ] = {
		get: function( elem, computed, extra ) {
			if ( computed ) {

				// Elements with `display: none` can have dimension info if
				// we invisibly show them.
				return jQuery.css( elem, "display" ) === "none" ?
					swap( elem, cssShow, function() {
						return getWidthOrHeight( elem, dimension, extra );
					} ) :
					getWidthOrHeight( elem, dimension, extra );
			}
		},

		set: function( elem, value, extra ) {
			var matches,
				styles = getStyles( elem ),

				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
				isBorderBox = extra &&
					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
				subtract = extra ?
					boxModelAdjustment(
						elem,
						dimension,
						extra,
						isBorderBox,
						styles
					) :
					0;

			// Convert to pixels if value adjustment is needed
			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
				( matches[ 3 ] || "px" ) !== "px" ) {

				elem.style[ dimension ] = value;
				value = jQuery.css( elem, dimension );
			}

			return setPositiveNumber( elem, value, subtract );
		}
	};
} );

// These hooks are used by animate to expand properties
jQuery.each( {
	margin: "",
	padding: "",
	border: "Width"
}, function( prefix, suffix ) {
	jQuery.cssHooks[ prefix + suffix ] = {
		expand: function( value ) {
			var i = 0,
				expanded = {},

				// Assumes a single number if not a string
				parts = typeof value === "string" ? value.split( " " ) : [ value ];

			for ( ; i < 4; i++ ) {
				expanded[ prefix + cssExpand[ i ] + suffix ] =
					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
			}

			return expanded;
		}
	};

	if ( prefix !== "margin" ) {
		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
	}
} );

jQuery.fn.extend( {
	css: function( name, value ) {
		return access( this, function( elem, name, value ) {
			var styles, len,
				map = {},
				i = 0;

			if ( Array.isArray( name ) ) {
				styles = getStyles( elem );
				len = name.length;

				for ( ; i < len; i++ ) {
					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
				}

				return map;
			}

			return value !== undefined ?
				jQuery.style( elem, name, value ) :
				jQuery.css( elem, name );
		}, name, value, arguments.length > 1 );
	}
} );

function Tween( elem, options, prop, end, easing ) {
	return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;

Tween.prototype = {
	constructor: Tween,
	init: function( elem, options, prop, end, easing, unit ) {
		this.elem = elem;
		this.prop = prop;
		this.easing = easing || jQuery.easing._default;
		this.options = options;
		this.start = this.now = this.cur();
		this.end = end;
		this.unit = unit || ( isAutoPx( prop ) ? "px" : "" );
	},
	cur: function() {
		var hooks = Tween.propHooks[ this.prop ];

		return hooks && hooks.get ?
			hooks.get( this ) :
			Tween.propHooks._default.get( this );
	},
	run: function( percent ) {
		var eased,
			hooks = Tween.propHooks[ this.prop ];

		if ( this.options.duration ) {
			this.pos = eased = jQuery.easing[ this.easing ](
				percent, this.options.duration * percent, 0, 1, this.options.duration
			);
		} else {
			this.pos = eased = percent;
		}
		this.now = ( this.end - this.start ) * eased + this.start;

		if ( this.options.step ) {
			this.options.step.call( this.elem, this.now, this );
		}

		if ( hooks && hooks.set ) {
			hooks.set( this );
		} else {
			Tween.propHooks._default.set( this );
		}
		return this;
	}
};

Tween.prototype.init.prototype = Tween.prototype;

Tween.propHooks = {
	_default: {
		get: function( tween ) {
			var result;

			// Use a property on the element directly when it is not a DOM element,
			// or when there is no matching style property that exists.
			if ( tween.elem.nodeType !== 1 ||
				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
				return tween.elem[ tween.prop ];
			}

			// Passing an empty string as a 3rd parameter to .css will automatically
			// attempt a parseFloat and fallback to a string if the parse fails.
			// Simple values such as "10px" are parsed to Float;
			// complex values such as "rotate(1rad)" are returned as-is.
			result = jQuery.css( tween.elem, tween.prop, "" );

			// Empty strings, null, undefined and "auto" are converted to 0.
			return !result || result === "auto" ? 0 : result;
		},
		set: function( tween ) {

			// Use step hook for back compat.
			// Use cssHook if its there.
			// Use .style if available and use plain properties where available.
			if ( jQuery.fx.step[ tween.prop ] ) {
				jQuery.fx.step[ tween.prop ]( tween );
			} else if ( tween.elem.nodeType === 1 && (
				jQuery.cssHooks[ tween.prop ] ||
					tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
			} else {
				tween.elem[ tween.prop ] = tween.now;
			}
		}
	}
};

jQuery.easing = {
	linear: function( p ) {
		return p;
	},
	swing: function( p ) {
		return 0.5 - Math.cos( p * Math.PI ) / 2;
	},
	_default: "swing"
};

jQuery.fx = Tween.prototype.init;

// Back compat <1.8 extension point
jQuery.fx.step = {};

var
	fxNow, inProgress,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rrun = /queueHooks$/;

function schedule() {
	if ( inProgress ) {
		if ( document$1.hidden === false && window.requestAnimationFrame ) {
			window.requestAnimationFrame( schedule );
		} else {
			window.setTimeout( schedule, 13 );
		}

		jQuery.fx.tick();
	}
}

// Animations created synchronously will run synchronously
function createFxNow() {
	window.setTimeout( function() {
		fxNow = undefined;
	} );
	return ( fxNow = Date.now() );
}

// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
	var which,
		i = 0,
		attrs = { height: type };

	// If we include width, step value is 1 to do all cssExpand values,
	// otherwise step value is 2 to skip over Left and Right
	includeWidth = includeWidth ? 1 : 0;
	for ( ; i < 4; i += 2 - includeWidth ) {
		which = cssExpand[ i ];
		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
	}

	if ( includeWidth ) {
		attrs.opacity = attrs.width = type;
	}

	return attrs;
}

function createTween( value, prop, animation ) {
	var tween,
		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
		index = 0,
		length = collection.length;
	for ( ; index < length; index++ ) {
		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {

			// We're done with this property
			return tween;
		}
	}
}

function defaultPrefilter( elem, props, opts ) {
	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
		isBox = "width" in props || "height" in props,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHiddenWithinTree( elem ),
		dataShow = dataPriv.get( elem, "fxshow" );

	// Queue-skipping animations hijack the fx hooks
	if ( !opts.queue ) {
		hooks = jQuery._queueHooks( elem, "fx" );
		if ( hooks.unqueued == null ) {
			hooks.unqueued = 0;
			oldfire = hooks.empty.fire;
			hooks.empty.fire = function() {
				if ( !hooks.unqueued ) {
					oldfire();
				}
			};
		}
		hooks.unqueued++;

		anim.always( function() {

			// Ensure the complete handler is called before this completes
			anim.always( function() {
				hooks.unqueued--;
				if ( !jQuery.queue( elem, "fx" ).length ) {
					hooks.empty.fire();
				}
			} );
		} );
	}

	// Detect show/hide animations
	for ( prop in props ) {
		value = props[ prop ];
		if ( rfxtypes.test( value ) ) {
			delete props[ prop ];
			toggle = toggle || value === "toggle";
			if ( value === ( hidden ? "hide" : "show" ) ) {

				// Pretend to be hidden if this is a "show" and
				// there is still data from a stopped show/hide
				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
					hidden = true;

				// Ignore all other no-op show/hide data
				} else {
					continue;
				}
			}
			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
		}
	}

	// Bail out if this is a no-op like .hide().hide()
	propTween = !jQuery.isEmptyObject( props );
	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
		return;
	}

	// Restrict "overflow" and "display" styles during box animations
	if ( isBox && elem.nodeType === 1 ) {

		// Support: IE <=9 - 11+
		// Record all 3 overflow attributes because IE does not infer the shorthand
		// from identically-valued overflowX and overflowY.
		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

		// Identify a display type, preferring old show/hide data over the CSS cascade
		restoreDisplay = dataShow && dataShow.display;
		if ( restoreDisplay == null ) {
			restoreDisplay = dataPriv.get( elem, "display" );
		}
		display = jQuery.css( elem, "display" );
		if ( display === "none" ) {
			if ( restoreDisplay ) {
				display = restoreDisplay;
			} else {

				// Get nonempty value(s) by temporarily forcing visibility
				showHide( [ elem ], true );
				restoreDisplay = elem.style.display || restoreDisplay;
				display = jQuery.css( elem, "display" );
				showHide( [ elem ] );
			}
		}

		// Animate inline elements as inline-block
		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
			if ( jQuery.css( elem, "float" ) === "none" ) {

				// Restore the original display value at the end of pure show/hide animations
				if ( !propTween ) {
					anim.done( function() {
						style.display = restoreDisplay;
					} );
					if ( restoreDisplay == null ) {
						display = style.display;
						restoreDisplay = display === "none" ? "" : display;
					}
				}
				style.display = "inline-block";
			}
		}
	}

	if ( opts.overflow ) {
		style.overflow = "hidden";
		anim.always( function() {
			style.overflow = opts.overflow[ 0 ];
			style.overflowX = opts.overflow[ 1 ];
			style.overflowY = opts.overflow[ 2 ];
		} );
	}

	// Implement show/hide animations
	propTween = false;
	for ( prop in orig ) {

		// General show/hide setup for this element animation
		if ( !propTween ) {
			if ( dataShow ) {
				if ( "hidden" in dataShow ) {
					hidden = dataShow.hidden;
				}
			} else {
				dataShow = dataPriv.set( elem, "fxshow", { display: restoreDisplay } );
			}

			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
			if ( toggle ) {
				dataShow.hidden = !hidden;
			}

			// Show elements before animating them
			if ( hidden ) {
				showHide( [ elem ], true );
			}

			// eslint-disable-next-line no-loop-func
			anim.done( function() {

				// The final step of a "hide" animation is actually hiding the element
				if ( !hidden ) {
					showHide( [ elem ] );
				}
				dataPriv.remove( elem, "fxshow" );
				for ( prop in orig ) {
					jQuery.style( elem, prop, orig[ prop ] );
				}
			} );
		}

		// Per-property setup
		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
		if ( !( prop in dataShow ) ) {
			dataShow[ prop ] = propTween.start;
			if ( hidden ) {
				propTween.end = propTween.start;
				propTween.start = 0;
			}
		}
	}
}

function propFilter( props, specialEasing ) {
	var index, name, easing, value, hooks;

	// camelCase, specialEasing and expand cssHook pass
	for ( index in props ) {
		name = cssCamelCase( index );
		easing = specialEasing[ name ];
		value = props[ index ];
		if ( Array.isArray( value ) ) {
			easing = value[ 1 ];
			value = props[ index ] = value[ 0 ];
		}

		if ( index !== name ) {
			props[ name ] = value;
			delete props[ index ];
		}

		hooks = jQuery.cssHooks[ name ];
		if ( hooks && "expand" in hooks ) {
			value = hooks.expand( value );
			delete props[ name ];

			// Not quite $.extend, this won't overwrite existing keys.
			// Reusing 'index' because we have the correct "name"
			for ( index in value ) {
				if ( !( index in props ) ) {
					props[ index ] = value[ index ];
					specialEasing[ index ] = easing;
				}
			}
		} else {
			specialEasing[ name ] = easing;
		}
	}
}

function Animation( elem, properties, options ) {
	var result,
		stopped,
		index = 0,
		length = Animation.prefilters.length,
		deferred = jQuery.Deferred().always( function() {

			// Don't match elem in the :animated selector
			delete tick.elem;
		} ),
		tick = function() {
			if ( stopped ) {
				return false;
			}
			var currentTime = fxNow || createFxNow(),
				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),

				percent = 1 - ( remaining / animation.duration || 0 ),
				index = 0,
				length = animation.tweens.length;

			for ( ; index < length; index++ ) {
				animation.tweens[ index ].run( percent );
			}

			deferred.notifyWith( elem, [ animation, percent, remaining ] );

			// If there's more to do, yield
			if ( percent < 1 && length ) {
				return remaining;
			}

			// If this was an empty animation, synthesize a final progress notification
			if ( !length ) {
				deferred.notifyWith( elem, [ animation, 1, 0 ] );
			}

			// Resolve the animation and report its conclusion
			deferred.resolveWith( elem, [ animation ] );
			return false;
		},
		animation = deferred.promise( {
			elem: elem,
			props: jQuery.extend( {}, properties ),
			opts: jQuery.extend( true, {
				specialEasing: {},
				easing: jQuery.easing._default
			}, options ),
			originalProperties: properties,
			originalOptions: options,
			startTime: fxNow || createFxNow(),
			duration: options.duration,
			tweens: [],
			createTween: function( prop, end ) {
				var tween = jQuery.Tween( elem, animation.opts, prop, end,
					animation.opts.specialEasing[ prop ] || animation.opts.easing );
				animation.tweens.push( tween );
				return tween;
			},
			stop: function( gotoEnd ) {
				var index = 0,

					// If we are going to the end, we want to run all the tweens
					// otherwise we skip this part
					length = gotoEnd ? animation.tweens.length : 0;
				if ( stopped ) {
					return this;
				}
				stopped = true;
				for ( ; index < length; index++ ) {
					animation.tweens[ index ].run( 1 );
				}

				// Resolve when we played the last frame; otherwise, reject
				if ( gotoEnd ) {
					deferred.notifyWith( elem, [ animation, 1, 0 ] );
					deferred.resolveWith( elem, [ animation, gotoEnd ] );
				} else {
					deferred.rejectWith( elem, [ animation, gotoEnd ] );
				}
				return this;
			}
		} ),
		props = animation.props;

	propFilter( props, animation.opts.specialEasing );

	for ( ; index < length; index++ ) {
		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
		if ( result ) {
			if ( typeof result.stop === "function" ) {
				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
					result.stop.bind( result );
			}
			return result;
		}
	}

	jQuery.map( props, createTween, animation );

	if ( typeof animation.opts.start === "function" ) {
		animation.opts.start.call( elem, animation );
	}

	// Attach callbacks from options
	animation
		.progress( animation.opts.progress )
		.done( animation.opts.done, animation.opts.complete )
		.fail( animation.opts.fail )
		.always( animation.opts.always );

	jQuery.fx.timer(
		jQuery.extend( tick, {
			elem: elem,
			anim: animation,
			queue: animation.opts.queue
		} )
	);

	return animation;
}

jQuery.Animation = jQuery.extend( Animation, {

	tweeners: {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value );
			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
			return tween;
		} ]
	},

	tweener: function( props, callback ) {
		if ( typeof props === "function" ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.match( rnothtmlwhite );
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length; index++ ) {
			prop = props[ index ];
			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
			Animation.tweeners[ prop ].unshift( callback );
		}
	},

	prefilters: [ defaultPrefilter ],

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			Animation.prefilters.unshift( callback );
		} else {
			Animation.prefilters.push( callback );
		}
	}
} );

jQuery.speed = function( speed, easing, fn ) {
	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
		complete: fn || easing ||
			typeof speed === "function" && speed,
		duration: speed,
		easing: fn && easing || easing && typeof easing !== "function" && easing
	};

	// Go to the end state if fx are off
	if ( jQuery.fx.off ) {
		opt.duration = 0;

	} else {
		if ( typeof opt.duration !== "number" ) {
			if ( opt.duration in jQuery.fx.speeds ) {
				opt.duration = jQuery.fx.speeds[ opt.duration ];

			} else {
				opt.duration = jQuery.fx.speeds._default;
			}
		}
	}

	// Normalize opt.queue - true/undefined/null -> "fx"
	if ( opt.queue == null || opt.queue === true ) {
		opt.queue = "fx";
	}

	// Queueing
	opt.old = opt.complete;

	opt.complete = function() {
		if ( typeof opt.old === "function" ) {
			opt.old.call( this );
		}

		if ( opt.queue ) {
			jQuery.dequeue( this, opt.queue );
		}
	};

	return opt;
};

jQuery.fn.extend( {
	fadeTo: function( speed, to, easing, callback ) {

		// Show any hidden elements after setting opacity to 0
		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()

			// Animate to the value specified
			.end().animate( { opacity: to }, speed, easing, callback );
	},
	animate: function( prop, speed, easing, callback ) {
		var empty = jQuery.isEmptyObject( prop ),
			optall = jQuery.speed( speed, easing, callback ),
			doAnimation = function() {

				// Operate on a copy of prop so per-property easing won't be lost
				var anim = Animation( this, jQuery.extend( {}, prop ), optall );

				// Empty animations, or finishing resolves immediately
				if ( empty || dataPriv.get( this, "finish" ) ) {
					anim.stop( true );
				}
			};

		doAnimation.finish = doAnimation;

		return empty || optall.queue === false ?
			this.each( doAnimation ) :
			this.queue( optall.queue, doAnimation );
	},
	stop: function( type, clearQueue, gotoEnd ) {
		var stopQueue = function( hooks ) {
			var stop = hooks.stop;
			delete hooks.stop;
			stop( gotoEnd );
		};

		if ( typeof type !== "string" ) {
			gotoEnd = clearQueue;
			clearQueue = type;
			type = undefined;
		}
		if ( clearQueue ) {
			this.queue( type || "fx", [] );
		}

		return this.each( function() {
			var dequeue = true,
				index = type != null && type + "queueHooks",
				timers = jQuery.timers,
				data = dataPriv.get( this );

			if ( index ) {
				if ( data[ index ] && data[ index ].stop ) {
					stopQueue( data[ index ] );
				}
			} else {
				for ( index in data ) {
					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
						stopQueue( data[ index ] );
					}
				}
			}

			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this &&
					( type == null || timers[ index ].queue === type ) ) {

					timers[ index ].anim.stop( gotoEnd );
					dequeue = false;
					timers.splice( index, 1 );
				}
			}

			// Start the next in the queue if the last step wasn't forced.
			// Timers currently will call their complete callbacks, which
			// will dequeue but only if they were gotoEnd.
			if ( dequeue || !gotoEnd ) {
				jQuery.dequeue( this, type );
			}
		} );
	},
	finish: function( type ) {
		if ( type !== false ) {
			type = type || "fx";
		}
		return this.each( function() {
			var index,
				data = dataPriv.get( this ),
				queue = data[ type + "queue" ],
				hooks = data[ type + "queueHooks" ],
				timers = jQuery.timers,
				length = queue ? queue.length : 0;

			// Enable finishing flag on private data
			data.finish = true;

			// Empty the queue first
			jQuery.queue( this, type, [] );

			if ( hooks && hooks.stop ) {
				hooks.stop.call( this, true );
			}

			// Look for any active animations, and finish them
			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
					timers[ index ].anim.stop( true );
					timers.splice( index, 1 );
				}
			}

			// Look for any animations in the old queue and finish them
			for ( index = 0; index < length; index++ ) {
				if ( queue[ index ] && queue[ index ].finish ) {
					queue[ index ].finish.call( this );
				}
			}

			// Turn off finishing flag
			delete data.finish;
		} );
	}
} );

jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
	var cssFn = jQuery.fn[ name ];
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return speed == null || typeof speed === "boolean" ?
			cssFn.apply( this, arguments ) :
			this.animate( genFx( name, true ), speed, easing, callback );
	};
} );

// Generate shortcuts for custom animations
jQuery.each( {
	slideDown: genFx( "show" ),
	slideUp: genFx( "hide" ),
	slideToggle: genFx( "toggle" ),
	fadeIn: { opacity: "show" },
	fadeOut: { opacity: "hide" },
	fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return this.animate( props, speed, easing, callback );
	};
} );

jQuery.timers = [];
jQuery.fx.tick = function() {
	var timer,
		i = 0,
		timers = jQuery.timers;

	fxNow = Date.now();

	for ( ; i < timers.length; i++ ) {
		timer = timers[ i ];

		// Run the timer and safely remove it when done (allowing for external removal)
		if ( !timer() && timers[ i ] === timer ) {
			timers.splice( i--, 1 );
		}
	}

	if ( !timers.length ) {
		jQuery.fx.stop();
	}
	fxNow = undefined;
};

jQuery.fx.timer = function( timer ) {
	jQuery.timers.push( timer );
	jQuery.fx.start();
};

jQuery.fx.start = function() {
	if ( inProgress ) {
		return;
	}

	inProgress = true;
	schedule();
};

jQuery.fx.stop = function() {
	inProgress = null;
};

jQuery.fx.speeds = {
	slow: 600,
	fast: 200,

	// Default speed
	_default: 400
};

// Based off of the plugin by Clint Helfers, with permission.
jQuery.fn.delay = function( time, type ) {
	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
	type = type || "fx";

	return this.queue( type, function( next, hooks ) {
		var timeout = window.setTimeout( next, time );
		hooks.stop = function() {
			window.clearTimeout( timeout );
		};
	} );
};

var rfocusable = /^(?:input|select|textarea|button)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		return this.each( function() {
			delete this[ jQuery.propFix[ name ] || name ];
		} );
	}
} );

jQuery.extend( {
	prop: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set properties on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {

			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			return ( elem[ name ] = value );
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		return elem[ name ];
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {

				// Support: IE <=9 - 11+
				// elem.tabIndex doesn't always return the
				// correct value when it hasn't been explicitly set
				// Use proper attribute retrieval (trac-12072)
				var tabindex = elem.getAttribute( "tabindex" );

				if ( tabindex ) {
					return parseInt( tabindex, 10 );
				}

				if (
					rfocusable.test( elem.nodeName ) ||

					// href-less anchor's `tabIndex` property value is `0` and
					// the `tabindex` attribute value: `null`. We want `-1`.
					rclickable.test( elem.nodeName ) && elem.href
				) {
					return 0;
				}

				return -1;
			}
		}
	},

	propFix: {
		"for": "htmlFor",
		"class": "className"
	}
} );

// Support: IE <=11+
// Accessing the selectedIndex property forces the browser to respect
// setting selected on the option. The getter ensures a default option
// is selected when in an optgroup. ESLint rule "no-unused-expressions"
// is disabled for this code since it considers such accessions noop.
if ( isIE ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {

			var parent = elem.parentNode;
			if ( parent && parent.parentNode ) {
				// eslint-disable-next-line no-unused-expressions
				parent.parentNode.selectedIndex;
			}
			return null;
		},
		set: function( elem ) {


			var parent = elem.parentNode;
			if ( parent ) {
				// eslint-disable-next-line no-unused-expressions
				parent.selectedIndex;

				if ( parent.parentNode ) {
					// eslint-disable-next-line no-unused-expressions
					parent.parentNode.selectedIndex;
				}
			}
		}
	};
}

jQuery.each( [
	"tabIndex",
	"readOnly",
	"maxLength",
	"cellSpacing",
	"cellPadding",
	"rowSpan",
	"colSpan",
	"useMap",
	"frameBorder",
	"contentEditable"
], function() {
	jQuery.propFix[ this.toLowerCase() ] = this;
} );

// Strip and collapse whitespace according to HTML spec
// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
function stripAndCollapse( value ) {
	var tokens = value.match( rnothtmlwhite ) || [];
	return tokens.join( " " );
}

function getClass( elem ) {
	return elem.getAttribute && elem.getAttribute( "class" ) || "";
}

function classesToArray( value ) {
	if ( Array.isArray( value ) ) {
		return value;
	}
	if ( typeof value === "string" ) {
		return value.match( rnothtmlwhite ) || [];
	}
	return [];
}

jQuery.fn.extend( {
	addClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( typeof value === "function" ) {
			return this.each( function( j ) {
				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];
						if ( cur.indexOf( " " + className + " " ) < 0 ) {
							cur += className + " ";
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	removeClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( typeof value === "function" ) {
			return this.each( function( j ) {
				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( !arguments.length ) {
			return this.attr( "class", "" );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );

				// This expression is here for better compressibility (see addClass)
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];

						// Remove *all* instances
						while ( cur.indexOf( " " + className + " " ) > -1 ) {
							cur = cur.replace( " " + className + " ", " " );
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	toggleClass: function( value, stateVal ) {
		var classNames, className, i, self;

		if ( typeof value === "function" ) {
			return this.each( function( i ) {
				jQuery( this ).toggleClass(
					value.call( this, i, getClass( this ), stateVal ),
					stateVal
				);
			} );
		}

		if ( typeof stateVal === "boolean" ) {
			return stateVal ? this.addClass( value ) : this.removeClass( value );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {

				// Toggle individual class names
				self = jQuery( this );

				for ( i = 0; i < classNames.length; i++ ) {
					className = classNames[ i ];

					// Check each className given, space separated list
					if ( self.hasClass( className ) ) {
						self.removeClass( className );
					} else {
						self.addClass( className );
					}
				}
			} );
		}

		return this;
	},

	hasClass: function( selector ) {
		var className, elem,
			i = 0;

		className = " " + selector + " ";
		while ( ( elem = this[ i++ ] ) ) {
			if ( elem.nodeType === 1 &&
				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
				return true;
			}
		}

		return false;
	}
} );

jQuery.fn.extend( {
	val: function( value ) {
		var hooks, ret, valueIsFunction,
			elem = this[ 0 ];

		if ( !arguments.length ) {
			if ( elem ) {
				hooks = jQuery.valHooks[ elem.type ] ||
					jQuery.valHooks[ elem.nodeName.toLowerCase() ];

				if ( hooks &&
					"get" in hooks &&
					( ret = hooks.get( elem, "value" ) ) !== undefined
				) {
					return ret;
				}

				ret = elem.value;

				// Handle cases where value is null/undef or number
				return ret == null ? "" : ret;
			}

			return;
		}

		valueIsFunction = typeof value === "function";

		return this.each( function( i ) {
			var val;

			if ( this.nodeType !== 1 ) {
				return;
			}

			if ( valueIsFunction ) {
				val = value.call( this, i, jQuery( this ).val() );
			} else {
				val = value;
			}

			// Treat null/undefined as ""; convert numbers to string
			if ( val == null ) {
				val = "";

			} else if ( typeof val === "number" ) {
				val += "";

			} else if ( Array.isArray( val ) ) {
				val = jQuery.map( val, function( value ) {
					return value == null ? "" : value + "";
				} );
			}

			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];

			// If set returns undefined, fall back to normal setting
			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
				this.value = val;
			}
		} );
	}
} );

jQuery.extend( {
	valHooks: {
		select: {
			get: function( elem ) {
				var value, option, i,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one",
					values = one ? null : [],
					max = one ? index + 1 : options.length;

				if ( index < 0 ) {
					i = max;

				} else {
					i = one ? index : 0;
				}

				// Loop through all the selected options
				for ( ; i < max; i++ ) {
					option = options[ i ];

					if ( option.selected &&

							// Don't return options that are disabled or in a disabled optgroup
							!option.disabled &&
							( !option.parentNode.disabled ||
								!nodeName( option.parentNode, "optgroup" ) ) ) {

						// Get the specific value for the option
						value = jQuery( option ).val();

						// We don't need an array for one selects
						if ( one ) {
							return value;
						}

						// Multi-Selects return an array
						values.push( value );
					}
				}

				return values;
			},

			set: function( elem, value ) {
				var optionSet, option,
					options = elem.options,
					values = jQuery.makeArray( value ),
					i = options.length;

				while ( i-- ) {
					option = options[ i ];

					if ( ( option.selected =
						jQuery.inArray( jQuery( option ).val(), values ) > -1
					) ) {
						optionSet = true;
					}
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}
				return values;
			}
		}
	}
} );

if ( isIE ) {
	jQuery.valHooks.option = {
		get: function( elem ) {

			var val = elem.getAttribute( "value" );
			return val != null ?
				val :

				// Support: IE <=10 - 11+
				// option.text throws exceptions (trac-14686, trac-14858)
				// Strip and collapse whitespace
				// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
				stripAndCollapse( jQuery.text( elem ) );
		}
	};
}

// Radios and checkboxes getter/setter
jQuery.each( [ "radio", "checkbox" ], function() {
	jQuery.valHooks[ this ] = {
		set: function( elem, value ) {
			if ( Array.isArray( value ) ) {
				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
			}
		}
	};
} );

var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	stopPropagationCallback = function( e ) {
		e.stopPropagation();
	};

jQuery.extend( jQuery.event, {

	trigger: function( event, data, elem, onlyHandlers ) {

		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
			eventPath = [ elem || document$1 ],
			type = hasOwn.call( event, "type" ) ? event.type : event,
			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];

		cur = lastElement = tmp = elem = elem || document$1;

		// Don't do events on text and comment nodes
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
			return;
		}

		// focus/blur morphs to focusin/out; ensure we're not firing them right now
		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
			return;
		}

		if ( type.indexOf( "." ) > -1 ) {

			// Namespaced trigger; create a regexp to match event type in handle()
			namespaces = type.split( "." );
			type = namespaces.shift();
			namespaces.sort();
		}
		ontype = type.indexOf( ":" ) < 0 && "on" + type;

		// Caller can pass in a jQuery.Event object, Object, or just an event type string
		event = event[ jQuery.expando ] ?
			event :
			new jQuery.Event( type, typeof event === "object" && event );

		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
		event.isTrigger = onlyHandlers ? 2 : 3;
		event.namespace = namespaces.join( "." );
		event.rnamespace = event.namespace ?
			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
			null;

		// Clean up the event in case it is being reused
		event.result = undefined;
		if ( !event.target ) {
			event.target = elem;
		}

		// Clone any incoming data and prepend the event, creating the handler arg list
		data = data == null ?
			[ event ] :
			jQuery.makeArray( data, [ event ] );

		// Allow special events to draw outside the lines
		special = jQuery.event.special[ type ] || {};
		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
			return;
		}

		// Determine event propagation path in advance, per W3C events spec (trac-9951)
		// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {

			bubbleType = special.delegateType || type;
			if ( !rfocusMorph.test( bubbleType + type ) ) {
				cur = cur.parentNode;
			}
			for ( ; cur; cur = cur.parentNode ) {
				eventPath.push( cur );
				tmp = cur;
			}

			// Only add window if we got to document (e.g., not plain obj or detached DOM)
			if ( tmp === ( elem.ownerDocument || document$1 ) ) {
				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
			}
		}

		// Fire handlers on the event path
		i = 0;
		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
			lastElement = cur;
			event.type = i > 1 ?
				bubbleType :
				special.bindType || type;

			// jQuery handler
			handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
				dataPriv.get( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && acceptData( cur ) ) {
				event.result = handle.apply( cur, data );
				if ( event.result === false ) {
					event.preventDefault();
				}
			}
		}
		event.type = type;

		// If nobody prevented the default action, do it now
		if ( !onlyHandlers && !event.isDefaultPrevented() ) {

			if ( ( !special._default ||
				special._default.apply( eventPath.pop(), data ) === false ) &&
				acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name as the event.
				// Don't do default actions on window, that's where global variables be (trac-6170)
				if ( ontype && typeof elem[ type ] === "function" && !isWindow( elem ) ) {

					// Don't re-trigger an onFOO event when we call its FOO() method
					tmp = elem[ ontype ];

					if ( tmp ) {
						elem[ ontype ] = null;
					}

					// Prevent re-triggering of the same event, since we already bubbled it above
					jQuery.event.triggered = type;

					if ( event.isPropagationStopped() ) {
						lastElement.addEventListener( type, stopPropagationCallback );
					}

					elem[ type ]();

					if ( event.isPropagationStopped() ) {
						lastElement.removeEventListener( type, stopPropagationCallback );
					}

					jQuery.event.triggered = undefined;

					if ( tmp ) {
						elem[ ontype ] = tmp;
					}
				}
			}
		}

		return event.result;
	},

	// Piggyback on a donor event to simulate a different one
	// Used only for `focus(in | out)` events
	simulate: function( type, elem, event ) {
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true
			}
		);

		jQuery.event.trigger( e, null, elem );
	}

} );

jQuery.fn.extend( {

	trigger: function( type, data ) {
		return this.each( function() {
			jQuery.event.trigger( type, data, this );
		} );
	},
	triggerHandler: function( type, data ) {
		var elem = this[ 0 ];
		if ( elem ) {
			return jQuery.event.trigger( type, data, elem, true );
		}
	}
} );

var location = window.location;

var nonce = { guid: Date.now() };

var rquery = /\?/;

// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml, parserErrorElem;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE 9 - 11+
	// IE throws on parseFromString with invalid input.
	try {
		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
	} catch ( e ) {}

	parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
	if ( !xml || parserErrorElem ) {
		jQuery.error( "Invalid XML: " + (
			parserErrorElem ?
				jQuery.map( parserErrorElem.childNodes, function( el ) {
					return el.textContent;
				} ).join( "\n" ) :
				data
		) );
	}
	return xml;
};

var
	rbracket = /\[\]$/,
	rCRLF = /\r?\n/g,
	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
	rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {
	var name;

	if ( Array.isArray( obj ) ) {

		// Serialize array item.
		jQuery.each( obj, function( i, v ) {
			if ( traditional || rbracket.test( prefix ) ) {

				// Treat each array item as a scalar.
				add( prefix, v );

			} else {

				// Item is non-scalar (array or object), encode its numeric index.
				buildParams(
					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
					v,
					traditional,
					add
				);
			}
		} );

	} else if ( !traditional && toType( obj ) === "object" ) {

		// Serialize object item.
		for ( name in obj ) {
			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
		}

	} else {

		// Serialize scalar item.
		add( prefix, obj );
	}
}

// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
	var prefix,
		s = [],
		add = function( key, valueOrFunction ) {

			// If value is a function, invoke it and use its return value
			var value = typeof valueOrFunction === "function" ?
				valueOrFunction() :
				valueOrFunction;

			s[ s.length ] = encodeURIComponent( key ) + "=" +
				encodeURIComponent( value == null ? "" : value );
		};

	if ( a == null ) {
		return "";
	}

	// If an array was passed in, assume that it is an array of form elements.
	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {

		// Serialize the form elements
		jQuery.each( a, function() {
			add( this.name, this.value );
		} );

	} else {

		// If traditional, encode the "old" way (the way 1.3.2 or older
		// did it), otherwise encode params recursively.
		for ( prefix in a ) {
			buildParams( prefix, a[ prefix ], traditional, add );
		}
	}

	// Return the resulting serialization
	return s.join( "&" );
};

jQuery.fn.extend( {
	serialize: function() {
		return jQuery.param( this.serializeArray() );
	},
	serializeArray: function() {
		return this.map( function() {

			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		} ).filter( function() {
			var type = this.type;

			// Use .is( ":disabled" ) so that fieldset[disabled] works
			return this.name && !jQuery( this ).is( ":disabled" ) &&
				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
				( this.checked || !rcheckableType.test( type ) );
		} ).map( function( _i, elem ) {
			var val = jQuery( this ).val();

			if ( val == null ) {
				return null;
			}

			if ( Array.isArray( val ) ) {
				return jQuery.map( val, function( val ) {
					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
				} );
			}

			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		} ).get();
	}
} );

var
	r20 = /%20/g,
	rhash = /#.*$/,
	rantiCache = /([?&])_=[^&]*/,
	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,

	// trac-7653, trac-8125, trac-8152: local protocol detection
	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
	rnoContent = /^(?:GET|HEAD)$/,
	rprotocol = /^\/\//,

	/* Prefilters
	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
	 * 2) These are called:
	 *    - BEFORE asking for a transport
	 *    - AFTER param serialization (s.data is a string if s.processData is true)
	 * 3) key is the dataType
	 * 4) the catchall symbol "*" can be used
	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
	 */
	prefilters = {},

	/* Transports bindings
	 * 1) key is the dataType
	 * 2) the catchall symbol "*" can be used
	 * 3) selection will start with transport dataType and THEN go to "*" if needed
	 */
	transports = {},

	// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
	allTypes = "*/".concat( "*" ),

	// Anchor tag for parsing the document origin
	originAnchor = document$1.createElement( "a" );

originAnchor.href = location.href;

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {

	// dataTypeExpression is optional and defaults to "*"
	return function( dataTypeExpression, func ) {

		if ( typeof dataTypeExpression !== "string" ) {
			func = dataTypeExpression;
			dataTypeExpression = "*";
		}

		var dataType,
			i = 0,
			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];

		if ( typeof func === "function" ) {

			// For each dataType in the dataTypeExpression
			while ( ( dataType = dataTypes[ i++ ] ) ) {

				// Prepend if requested
				if ( dataType[ 0 ] === "+" ) {
					dataType = dataType.slice( 1 ) || "*";
					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );

				// Otherwise append
				} else {
					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
				}
			}
		}
	};
}

// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {

	var inspected = {},
		seekingTransport = ( structure === transports );

	function inspect( dataType ) {
		var selected;
		inspected[ dataType ] = true;
		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
			if ( typeof dataTypeOrTransport === "string" &&
				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {

				options.dataTypes.unshift( dataTypeOrTransport );
				inspect( dataTypeOrTransport );
				return false;
			} else if ( seekingTransport ) {
				return !( selected = dataTypeOrTransport );
			}
		} );
		return selected;
	}

	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}

// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes trac-9887
function ajaxExtend( target, src ) {
	var key, deep,
		flatOptions = jQuery.ajaxSettings.flatOptions || {};

	for ( key in src ) {
		if ( src[ key ] !== undefined ) {
			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
		}
	}
	if ( deep ) {
		jQuery.extend( true, target, deep );
	}

	return target;
}

/* Handles responses to an ajax request:
 * - finds the right dataType (mediates between content-type and expected dataType)
 * - returns the corresponding response
 */
function ajaxHandleResponses( s, jqXHR, responses ) {

	var ct, type, finalDataType, firstDataType,
		contents = s.contents,
		dataTypes = s.dataTypes;

	// Remove auto dataType and get content-type in the process
	while ( dataTypes[ 0 ] === "*" ) {
		dataTypes.shift();
		if ( ct === undefined ) {
			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
		}
	}

	// Check if we're dealing with a known content-type
	if ( ct ) {
		for ( type in contents ) {
			if ( contents[ type ] && contents[ type ].test( ct ) ) {
				dataTypes.unshift( type );
				break;
			}
		}
	}

	// Check to see if we have a response for the expected dataType
	if ( dataTypes[ 0 ] in responses ) {
		finalDataType = dataTypes[ 0 ];
	} else {

		// Try convertible dataTypes
		for ( type in responses ) {
			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
				finalDataType = type;
				break;
			}
			if ( !firstDataType ) {
				firstDataType = type;
			}
		}

		// Or just use first one
		finalDataType = finalDataType || firstDataType;
	}

	// If we found a dataType
	// We add the dataType to the list if needed
	// and return the corresponding response
	if ( finalDataType ) {
		if ( finalDataType !== dataTypes[ 0 ] ) {
			dataTypes.unshift( finalDataType );
		}
		return responses[ finalDataType ];
	}
}

/* Chain conversions given the request and the original response
 * Also sets the responseXXX fields on the jqXHR instance
 */
function ajaxConvert( s, response, jqXHR, isSuccess ) {
	var conv2, current, conv, tmp, prev,
		converters = {},

		// Work with a copy of dataTypes in case we need to modify it for conversion
		dataTypes = s.dataTypes.slice();

	// Create converters map with lowercased keys
	if ( dataTypes[ 1 ] ) {
		for ( conv in s.converters ) {
			converters[ conv.toLowerCase() ] = s.converters[ conv ];
		}
	}

	current = dataTypes.shift();

	// Convert to each sequential dataType
	while ( current ) {

		if ( s.responseFields[ current ] ) {
			jqXHR[ s.responseFields[ current ] ] = response;
		}

		// Apply the dataFilter if provided
		if ( !prev && isSuccess && s.dataFilter ) {
			response = s.dataFilter( response, s.dataType );
		}

		prev = current;
		current = dataTypes.shift();

		if ( current ) {

			// There's only work to do if current dataType is non-auto
			if ( current === "*" ) {

				current = prev;

			// Convert response if prev dataType is non-auto and differs from current
			} else if ( prev !== "*" && prev !== current ) {

				// Seek a direct converter
				conv = converters[ prev + " " + current ] || converters[ "* " + current ];

				// If none found, seek a pair
				if ( !conv ) {
					for ( conv2 in converters ) {

						// If conv2 outputs current
						tmp = conv2.split( " " );
						if ( tmp[ 1 ] === current ) {

							// If prev can be converted to accepted input
							conv = converters[ prev + " " + tmp[ 0 ] ] ||
								converters[ "* " + tmp[ 0 ] ];
							if ( conv ) {

								// Condense equivalence converters
								if ( conv === true ) {
									conv = converters[ conv2 ];

								// Otherwise, insert the intermediate dataType
								} else if ( converters[ conv2 ] !== true ) {
									current = tmp[ 0 ];
									dataTypes.unshift( tmp[ 1 ] );
								}
								break;
							}
						}
					}
				}

				// Apply converter (if not an equivalence)
				if ( conv !== true ) {

					// Unless errors are allowed to bubble, catch and return them
					if ( conv && s.throws ) {
						response = conv( response );
					} else {
						try {
							response = conv( response );
						} catch ( e ) {
							return {
								state: "parsererror",
								error: conv ? e : "No conversion from " + prev + " to " + current
							};
						}
					}
				}
			}
		}
	}

	return { state: "success", data: response };
}

jQuery.extend( {

	// Counter for holding the number of active queries
	active: 0,

	// Last-Modified header cache for next request
	lastModified: {},
	etag: {},

	ajaxSettings: {
		url: location.href,
		type: "GET",
		isLocal: rlocalProtocol.test( location.protocol ),
		global: true,
		processData: true,
		async: true,
		contentType: "application/x-www-form-urlencoded; charset=UTF-8",

		/*
		timeout: 0,
		data: null,
		dataType: null,
		username: null,
		password: null,
		cache: null,
		throws: false,
		traditional: false,
		headers: {},
		*/

		accepts: {
			"*": allTypes,
			text: "text/plain",
			html: "text/html",
			xml: "application/xml, text/xml",
			json: "application/json, text/javascript"
		},

		contents: {
			xml: /\bxml\b/,
			html: /\bhtml/,
			json: /\bjson\b/
		},

		responseFields: {
			xml: "responseXML",
			text: "responseText",
			json: "responseJSON"
		},

		// Data converters
		// Keys separate source (or catchall "*") and destination types with a single space
		converters: {

			// Convert anything to text
			"* text": String,

			// Text to html (true = no transformation)
			"text html": true,

			// Evaluate text as a json expression
			"text json": JSON.parse,

			// Parse text as xml
			"text xml": jQuery.parseXML
		},

		// For options that shouldn't be deep extended:
		// you can add your own custom options here if
		// and when you create one that shouldn't be
		// deep extended (see ajaxExtend)
		flatOptions: {
			url: true,
			context: true
		}
	},

	// Creates a full fledged settings object into target
	// with both ajaxSettings and settings fields.
	// If target is omitted, writes into ajaxSettings.
	ajaxSetup: function( target, settings ) {
		return settings ?

			// Building a settings object
			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :

			// Extending ajaxSettings
			ajaxExtend( jQuery.ajaxSettings, target );
	},

	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
	ajaxTransport: addToPrefiltersOrTransports( transports ),

	// Main method
	ajax: function( url, options ) {

		// If url is an object, simulate pre-1.5 signature
		if ( typeof url === "object" ) {
			options = url;
			url = undefined;
		}

		// Force options to be an object
		options = options || {};

		var transport,

			// URL without anti-cache param
			cacheURL,

			// Response headers
			responseHeadersString,
			responseHeaders,

			// timeout handle
			timeoutTimer,

			// Url cleanup var
			urlAnchor,

			// Request state (becomes false upon send and true upon completion)
			completed,

			// To know if global events are to be dispatched
			fireGlobals,

			// Loop variable
			i,

			// uncached part of the url
			uncached,

			// Create the final options object
			s = jQuery.ajaxSetup( {}, options ),

			// Callbacks context
			callbackContext = s.context || s,

			// Context for global events is callbackContext if it is a DOM node or jQuery collection
			globalEventContext = s.context &&
				( callbackContext.nodeType || callbackContext.jquery ) ?
				jQuery( callbackContext ) :
				jQuery.event,

			// Deferreds
			deferred = jQuery.Deferred(),
			completeDeferred = jQuery.Callbacks( "once memory" ),

			// Status-dependent callbacks
			statusCode = s.statusCode || {},

			// Headers (they are sent all at once)
			requestHeaders = {},
			requestHeadersNames = {},

			// Default abort message
			strAbort = "canceled",

			// Fake xhr
			jqXHR = {
				readyState: 0,

				// Builds headers hashtable if needed
				getResponseHeader: function( key ) {
					var match;
					if ( completed ) {
						if ( !responseHeaders ) {
							responseHeaders = {};
							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {

								// Support: IE 11+
								// `getResponseHeader( key )` in IE doesn't combine all header
								// values for the provided key into a single result with values
								// joined by commas as other browsers do. Instead, it returns
								// them on separate lines.
								responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
									( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
										.concat( match[ 2 ] );
							}
						}
						match = responseHeaders[ key.toLowerCase() + " " ];
					}
					return match == null ? null : match.join( ", " );
				},

				// Raw string
				getAllResponseHeaders: function() {
					return completed ? responseHeadersString : null;
				},

				// Caches the header
				setRequestHeader: function( name, value ) {
					if ( completed == null ) {
						name = requestHeadersNames[ name.toLowerCase() ] =
							requestHeadersNames[ name.toLowerCase() ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				},

				// Overrides response content-type header
				overrideMimeType: function( type ) {
					if ( completed == null ) {
						s.mimeType = type;
					}
					return this;
				},

				// Status-dependent callbacks
				statusCode: function( map ) {
					var code;
					if ( map ) {
						if ( completed ) {

							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						} else {

							// Lazy-add the new callbacks in a way that preserves old ones
							for ( code in map ) {
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						}
					}
					return this;
				},

				// Cancel the request
				abort: function( statusText ) {
					var finalText = statusText || strAbort;
					if ( transport ) {
						transport.abort( finalText );
					}
					done( 0, finalText );
					return this;
				}
			};

		// Attach deferreds
		deferred.promise( jqXHR );

		// Add protocol if not provided (prefilters might expect it)
		// Handle falsy url in the settings object (trac-10093: consistency with old signature)
		// We also use the url parameter if available
		s.url = ( ( url || s.url || location.href ) + "" )
			.replace( rprotocol, location.protocol + "//" );

		// Alias method option to type as per ticket trac-12004
		s.type = options.method || options.type || s.method || s.type;

		// Extract dataTypes list
		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];

		// A cross-domain request is in order when the origin doesn't match the current origin.
		if ( s.crossDomain == null ) {
			urlAnchor = document$1.createElement( "a" );

			// Support: IE <=8 - 11+
			// IE throws exception on accessing the href property if url is malformed,
			// e.g. http://example.com:80x/
			try {
				urlAnchor.href = s.url;

				// Support: IE <=8 - 11+
				// Anchor's host property isn't correctly set when s.url is relative
				urlAnchor.href = urlAnchor.href;
				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
					urlAnchor.protocol + "//" + urlAnchor.host;
			} catch ( e ) {

				// If there is an error parsing the URL, assume it is crossDomain,
				// it can be rejected by the transport if it is invalid
				s.crossDomain = true;
			}
		}

		// Apply prefilters
		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );

		// Convert data if not already a string
		if ( s.data && s.processData && typeof s.data !== "string" ) {
			s.data = jQuery.param( s.data, s.traditional );
		}

		// If request was aborted inside a prefilter, stop there
		if ( completed ) {
			return jqXHR;
		}

		// We can fire global events as of now if asked to
		// Don't fire events if jQuery.event is undefined in an ESM-usage scenario (trac-15118)
		fireGlobals = jQuery.event && s.global;

		// Watch for a new set of requests
		if ( fireGlobals && jQuery.active++ === 0 ) {
			jQuery.event.trigger( "ajaxStart" );
		}

		// Uppercase the type
		s.type = s.type.toUpperCase();

		// Determine if request has content
		s.hasContent = !rnoContent.test( s.type );

		// Save the URL in case we're toying with the If-Modified-Since
		// and/or If-None-Match header later on
		// Remove hash to simplify url manipulation
		cacheURL = s.url.replace( rhash, "" );

		// More options handling for requests with no content
		if ( !s.hasContent ) {

			// Remember the hash so we can put it back
			uncached = s.url.slice( cacheURL.length );

			// If data is available and should be processed, append data to url
			if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;

				// trac-9682: remove data so that it's not used in an eventual retry
				delete s.data;
			}

			// Add or update anti-cache param if needed
			if ( s.cache === false ) {
				cacheURL = cacheURL.replace( rantiCache, "$1" );
				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" +
					( nonce.guid++ ) + uncached;
			}

			// Put hash and anti-cache on the URL that will be requested (gh-1732)
			s.url = cacheURL + uncached;

		// Change '%20' to '+' if this is encoded form body content (gh-2658)
		} else if ( s.data && s.processData &&
			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
			s.data = s.data.replace( r20, "+" );
		}

		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
		if ( s.ifModified ) {
			if ( jQuery.lastModified[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
			}
			if ( jQuery.etag[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
			}
		}

		// Set the correct header, if data is being sent
		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
			jqXHR.setRequestHeader( "Content-Type", s.contentType );
		}

		// Set the Accepts header for the server, depending on the dataType
		jqXHR.setRequestHeader(
			"Accept",
			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
				s.accepts[ s.dataTypes[ 0 ] ] +
					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
				s.accepts[ "*" ]
		);

		// Check for headers option
		for ( i in s.headers ) {
			jqXHR.setRequestHeader( i, s.headers[ i ] );
		}

		// Allow custom headers/mimetypes and early abort
		if ( s.beforeSend &&
			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {

			// Abort if not done already and return
			return jqXHR.abort();
		}

		// Aborting is no longer a cancellation
		strAbort = "abort";

		// Install callbacks on deferreds
		completeDeferred.add( s.complete );
		jqXHR.done( s.success );
		jqXHR.fail( s.error );

		// Get transport
		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );

		// If no transport, we auto-abort
		if ( !transport ) {
			done( -1, "No Transport" );
		} else {
			jqXHR.readyState = 1;

			// Send global event
			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
			}

			// If request was aborted inside ajaxSend, stop there
			if ( completed ) {
				return jqXHR;
			}

			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = window.setTimeout( function() {
					jqXHR.abort( "timeout" );
				}, s.timeout );
			}

			try {
				completed = false;
				transport.send( requestHeaders, done );
			} catch ( e ) {

				// Rethrow post-completion exceptions
				if ( completed ) {
					throw e;
				}

				// Propagate others as results
				done( -1, e );
			}
		}

		// Callback for when everything is done
		function done( status, nativeStatusText, responses, headers ) {
			var isSuccess, success, error, response, modified,
				statusText = nativeStatusText;

			// Ignore repeat invocations
			if ( completed ) {
				return;
			}

			completed = true;

			// Clear timeout if it exists
			if ( timeoutTimer ) {
				window.clearTimeout( timeoutTimer );
			}

			// Dereference transport for early garbage collection
			// (no matter how long the jqXHR object will be used)
			transport = undefined;

			// Cache response headers
			responseHeadersString = headers || "";

			// Set readyState
			jqXHR.readyState = status > 0 ? 4 : 0;

			// Determine if successful
			isSuccess = status >= 200 && status < 300 || status === 304;

			// Get response data
			if ( responses ) {
				response = ajaxHandleResponses( s, jqXHR, responses );
			}

			// Use a noop converter for missing script but not if jsonp
			if ( !isSuccess &&
				jQuery.inArray( "script", s.dataTypes ) > -1 &&
				jQuery.inArray( "json", s.dataTypes ) < 0 ) {
				s.converters[ "text script" ] = function() {};
			}

			// Convert no matter what (that way responseXXX fields are always set)
			response = ajaxConvert( s, response, jqXHR, isSuccess );

			// If successful, handle type chaining
			if ( isSuccess ) {

				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
				if ( s.ifModified ) {
					modified = jqXHR.getResponseHeader( "Last-Modified" );
					if ( modified ) {
						jQuery.lastModified[ cacheURL ] = modified;
					}
					modified = jqXHR.getResponseHeader( "etag" );
					if ( modified ) {
						jQuery.etag[ cacheURL ] = modified;
					}
				}

				// if no content
				if ( status === 204 || s.type === "HEAD" ) {
					statusText = "nocontent";

				// if not modified
				} else if ( status === 304 ) {
					statusText = "notmodified";

				// If we have data, let's convert it
				} else {
					statusText = response.state;
					success = response.data;
					error = response.error;
					isSuccess = !error;
				}
			} else {

				// Extract error from statusText and normalize for non-aborts
				error = statusText;
				if ( status || !statusText ) {
					statusText = "error";
					if ( status < 0 ) {
						status = 0;
					}
				}
			}

			// Set data for the fake xhr object
			jqXHR.status = status;
			jqXHR.statusText = ( nativeStatusText || statusText ) + "";

			// Success/Error
			if ( isSuccess ) {
				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
			} else {
				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
			}

			// Status-dependent callbacks
			jqXHR.statusCode( statusCode );
			statusCode = undefined;

			if ( fireGlobals ) {
				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
					[ jqXHR, s, isSuccess ? success : error ] );
			}

			// Complete
			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );

			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );

				// Handle the global AJAX counter
				if ( !( --jQuery.active ) ) {
					jQuery.event.trigger( "ajaxStop" );
				}
			}
		}

		return jqXHR;
	},

	getJSON: function( url, data, callback ) {
		return jQuery.get( url, data, callback, "json" );
	},

	getScript: function( url, callback ) {
		return jQuery.get( url, undefined, callback, "script" );
	}
} );

jQuery.each( [ "get", "post" ], function( _i, method ) {
	jQuery[ method ] = function( url, data, callback, type ) {

		// Shift arguments if data argument was omitted.
		// Handle the null callback placeholder.
		if ( typeof data === "function" || data === null ) {
			type = type || callback;
			callback = data;
			data = undefined;
		}

		// The url can be an options object (which then must have .url)
		return jQuery.ajax( jQuery.extend( {
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		}, jQuery.isPlainObject( url ) && url ) );
	};
} );

jQuery.ajaxPrefilter( function( s ) {
	var i;
	for ( i in s.headers ) {
		if ( i.toLowerCase() === "content-type" ) {
			s.contentType = s.headers[ i ] || "";
		}
	}
} );

jQuery._evalUrl = function( url, options, doc ) {
	return jQuery.ajax( {
		url: url,

		// Make this explicit, since user can override this through ajaxSetup (trac-11264)
		type: "GET",
		dataType: "script",
		cache: true,
		async: false,
		global: false,
		scriptAttrs: options.crossOrigin ? { "crossOrigin": options.crossOrigin } : undefined,

		// Only evaluate the response if it is successful (gh-4126)
		// dataFilter is not invoked for failure responses, so using it instead
		// of the default converter is kludgy but it works.
		converters: {
			"text script": function() {}
		},
		dataFilter: function( response ) {
			jQuery.globalEval( response, options, doc );
		}
	} );
};

jQuery.fn.extend( {
	wrapAll: function( html ) {
		var wrap;

		if ( this[ 0 ] ) {
			if ( typeof html === "function" ) {
				html = html.call( this[ 0 ] );
			}

			// The elements to wrap the target around
			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );

			if ( this[ 0 ].parentNode ) {
				wrap.insertBefore( this[ 0 ] );
			}

			wrap.map( function() {
				var elem = this;

				while ( elem.firstElementChild ) {
					elem = elem.firstElementChild;
				}

				return elem;
			} ).append( this );
		}

		return this;
	},

	wrapInner: function( html ) {
		if ( typeof html === "function" ) {
			return this.each( function( i ) {
				jQuery( this ).wrapInner( html.call( this, i ) );
			} );
		}

		return this.each( function() {
			var self = jQuery( this ),
				contents = self.contents();

			if ( contents.length ) {
				contents.wrapAll( html );

			} else {
				self.append( html );
			}
		} );
	},

	wrap: function( html ) {
		var htmlIsFunction = typeof html === "function";

		return this.each( function( i ) {
			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
		} );
	},

	unwrap: function( selector ) {
		this.parent( selector ).not( "body" ).each( function() {
			jQuery( this ).replaceWith( this.childNodes );
		} );
		return this;
	}
} );

jQuery.expr.pseudos.hidden = function( elem ) {
	return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};

jQuery.ajaxSettings.xhr = function() {
	return new window.XMLHttpRequest();
};

var xhrSuccessStatus = {

	// File protocol always yields status code 0, assume 200
	0: 200
};

jQuery.ajaxTransport( function( options ) {
	var callback;

	return {
		send: function( headers, complete ) {
			var i,
				xhr = options.xhr();

			xhr.open(
				options.type,
				options.url,
				options.async,
				options.username,
				options.password
			);

			// Apply custom fields if provided
			if ( options.xhrFields ) {
				for ( i in options.xhrFields ) {
					xhr[ i ] = options.xhrFields[ i ];
				}
			}

			// Override mime type if needed
			if ( options.mimeType && xhr.overrideMimeType ) {
				xhr.overrideMimeType( options.mimeType );
			}

			// X-Requested-With header
			// For cross-domain requests, seeing as conditions for a preflight are
			// akin to a jigsaw puzzle, we simply never set it to be sure.
			// (it can always be set on a per-request basis or even using ajaxSetup)
			// For same-domain requests, won't change header if already provided.
			if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
				headers[ "X-Requested-With" ] = "XMLHttpRequest";
			}

			// Set headers
			for ( i in headers ) {
				xhr.setRequestHeader( i, headers[ i ] );
			}

			// Callback
			callback = function( type ) {
				return function() {
					if ( callback ) {
						callback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = null;

						if ( type === "abort" ) {
							xhr.abort();
						} else if ( type === "error" ) {
							complete(

								// File: protocol always yields status 0; see trac-8605, trac-14207
								xhr.status,
								xhr.statusText
							);
						} else {
							complete(
								xhrSuccessStatus[ xhr.status ] || xhr.status,
								xhr.statusText,

								// For XHR2 non-text, let the caller handle it (gh-2498)
								( xhr.responseType || "text" ) === "text" ?
									{ text: xhr.responseText } :
									{ binary: xhr.response },
								xhr.getAllResponseHeaders()
							);
						}
					}
				};
			};

			// Listen to events
			xhr.onload = callback();
			xhr.onabort = xhr.onerror = xhr.ontimeout = callback( "error" );

			// Create the abort callback
			callback = callback( "abort" );

			try {

				// Do send the request (this may raise an exception)
				xhr.send( options.hasContent && options.data || null );
			} catch ( e ) {

				// trac-14683: Only rethrow if this hasn't been notified as an error yet
				if ( callback ) {
					throw e;
				}
			}
		},

		abort: function() {
			if ( callback ) {
				callback();
			}
		}
	};
} );

function canUseScriptTag( s ) {

	// A script tag can only be used for async, cross domain or forced-by-attrs requests.
	// Requests with headers cannot use a script tag. However, when both `scriptAttrs` &
	// `headers` options are specified, both are impossible to satisfy together; we
	// prefer `scriptAttrs` then.
	// Sync requests remain handled differently to preserve strict script ordering.
	return s.scriptAttrs || (
		!s.headers &&
		(
			s.crossDomain ||

			// When dealing with JSONP (`s.dataTypes` include "json" then)
			// don't use a script tag so that error responses still may have
			// `responseJSON` set. Continue using a script tag for JSONP requests that:
			//   * are cross-domain as AJAX requests won't work without a CORS setup
			//   * have `scriptAttrs` set as that's a script-only functionality
			// Note that this means JSONP requests violate strict CSP script-src settings.
			// A proper solution is to migrate from using JSONP to a CORS setup.
			( s.async && jQuery.inArray( "json", s.dataTypes ) < 0 )
		)
	);
}

// Install script dataType. Don't specify `contents.script` so that an explicit
// `dataType: "script"` is required (see gh-2432, gh-4822)
jQuery.ajaxSetup( {
	accepts: {
		script: "text/javascript, application/javascript, " +
			"application/ecmascript, application/x-ecmascript"
	},
	converters: {
		"text script": function( text ) {
			jQuery.globalEval( text );
			return text;
		}
	}
} );

// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {
	if ( s.cache === undefined ) {
		s.cache = false;
	}

	// These types of requests are handled via a script tag
	// so force their methods to GET.
	if ( canUseScriptTag( s ) ) {
		s.type = "GET";
	}
} );

// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {
	if ( canUseScriptTag( s ) ) {
		var script, callback;
		return {
			send: function( _, complete ) {
				script = jQuery( "<script>" )
					.attr( s.scriptAttrs || {} )
					.prop( { charset: s.scriptCharset, src: s.url } )
					.on( "load error", callback = function( evt ) {
						script.remove();
						callback = null;
						if ( evt ) {
							complete( evt.type === "error" ? 404 : 200, evt.type );
						}
					} );

				// Use native DOM manipulation to avoid our domManip AJAX trickery
				document$1.head.appendChild( script[ 0 ] );
			},
			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );

var oldCallbacks = [],
	rjsonp = /(=)\?(?=&|$)|\?\?/;

// Default jsonp settings
jQuery.ajaxSetup( {
	jsonp: "callback",
	jsonpCallback: function() {
		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
		this[ callback ] = true;
		return callback;
	}
} );

// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "jsonp", function( s, originalSettings, jqXHR ) {

	var callbackName, overwritten, responseContainer,
		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
			"url" :
			typeof s.data === "string" &&
				( s.contentType || "" )
					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
				rjsonp.test( s.data ) && "data"
		);

	// Get callback name, remembering preexisting value associated with it
	callbackName = s.jsonpCallback = typeof s.jsonpCallback === "function" ?
		s.jsonpCallback() :
		s.jsonpCallback;

	// Insert callback into url or form data
	if ( jsonProp ) {
		s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
	} else if ( s.jsonp !== false ) {
		s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
	}

	// Use data converter to retrieve json after script execution
	s.converters[ "script json" ] = function() {
		if ( !responseContainer ) {
			jQuery.error( callbackName + " was not called" );
		}
		return responseContainer[ 0 ];
	};

	// Force json dataType
	s.dataTypes[ 0 ] = "json";

	// Install callback
	overwritten = window[ callbackName ];
	window[ callbackName ] = function() {
		responseContainer = arguments;
	};

	// Clean-up function (fires after converters)
	jqXHR.always( function() {

		// If previous value didn't exist - remove it
		if ( overwritten === undefined ) {
			jQuery( window ).removeProp( callbackName );

		// Otherwise restore preexisting value
		} else {
			window[ callbackName ] = overwritten;
		}

		// Save back as free
		if ( s[ callbackName ] ) {

			// Make sure that re-using the options doesn't screw things around
			s.jsonpCallback = originalSettings.jsonpCallback;

			// Save the callback name for future use
			oldCallbacks.push( callbackName );
		}

		// Call if it was a function and we have a response
		if ( responseContainer && typeof overwritten === "function" ) {
			overwritten( responseContainer[ 0 ] );
		}

		responseContainer = overwritten = undefined;
	} );

	// Delegate to script
	return "script";
} );

jQuery.ajaxPrefilter( function( s, origOptions ) {

	// Binary data needs to be passed to XHR as-is without stringification.
	if ( typeof s.data !== "string" && !jQuery.isPlainObject( s.data ) &&
			!Array.isArray( s.data ) &&

			// Don't disable data processing if explicitly set by the user.
			!( "processData" in origOptions ) ) {
		s.processData = false;
	}

	// `Content-Type` for requests with `FormData` bodies needs to be set
	// by the browser as it needs to append the `boundary` it generated.
	if ( s.data instanceof window.FormData ) {
		s.contentType = false;
	}
} );

// Argument "data" should be string of html or a TrustedHTML wrapper of obvious HTML
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
	if ( typeof data !== "string" && !isObviousHtml( data + "" ) ) {
		return [];
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}

	var parsed, scripts;

	if ( !context ) {

		// Stop scripts or inline event handlers from being executed immediately
		// by using DOMParser
		context = ( new window.DOMParser() )
			.parseFromString( "", "text/html" );
	}

	parsed = rsingleTag.exec( data );
	scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[ 1 ] ) ];
	}

	parsed = buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};

/**
 * Load a url into a page
 */
jQuery.fn.load = function( url, params, callback ) {
	var selector, type, response,
		self = this,
		off = url.indexOf( " " );

	if ( off > -1 ) {
		selector = stripAndCollapse( url.slice( off ) );
		url = url.slice( 0, off );
	}

	// If it's a function
	if ( typeof params === "function" ) {

		// We assume that it's the callback
		callback = params;
		params = undefined;

	// Otherwise, build a param string
	} else if ( params && typeof params === "object" ) {
		type = "POST";
	}

	// If we have elements to modify, make the request
	if ( self.length > 0 ) {
		jQuery.ajax( {
			url: url,

			// If "type" variable is undefined, then "GET" method will be used.
			// Make value of this field explicit since
			// user can override it through ajaxSetup method
			type: type || "GET",
			dataType: "html",
			data: params
		} ).done( function( responseText ) {

			// Save response for use in complete callback
			response = arguments;

			self.html( selector ?

				// If a selector was specified, locate the right elements in a dummy div
				// Exclude scripts to avoid IE 'Permission Denied' errors
				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :

				// Otherwise use the full result
				responseText );

		// If the request succeeds, this function gets "data", "status", "jqXHR"
		// but they are ignored because response was set above.
		// If it fails, this function gets "jqXHR", "status", "error"
		} ).always( callback && function( jqXHR, status ) {
			self.each( function() {
				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
			} );
		} );
	}

	return this;
};

jQuery.expr.pseudos.animated = function( elem ) {
	return jQuery.grep( jQuery.timers, function( fn ) {
		return elem === fn.elem;
	} ).length;
};

jQuery.offset = {
	setOffset: function( elem, options, i ) {
		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
			position = jQuery.css( elem, "position" ),
			curElem = jQuery( elem ),
			props = {};

		// Set position first, in-case top/left are set even on static elem
		if ( position === "static" ) {
			elem.style.position = "relative";
		}

		curOffset = curElem.offset();
		curCSSTop = jQuery.css( elem, "top" );
		curCSSLeft = jQuery.css( elem, "left" );
		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;

		// Need to be able to calculate position if either
		// top or left is auto and position is either absolute or fixed
		if ( calculatePosition ) {
			curPosition = curElem.position();
			curTop = curPosition.top;
			curLeft = curPosition.left;

		} else {
			curTop = parseFloat( curCSSTop ) || 0;
			curLeft = parseFloat( curCSSLeft ) || 0;
		}

		if ( typeof options === "function" ) {

			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
		}

		if ( options.top != null ) {
			props.top = ( options.top - curOffset.top ) + curTop;
		}
		if ( options.left != null ) {
			props.left = ( options.left - curOffset.left ) + curLeft;
		}

		if ( "using" in options ) {
			options.using.call( elem, props );

		} else {
			curElem.css( props );
		}
	}
};

jQuery.fn.extend( {

	// offset() relates an element's border box to the document origin
	offset: function( options ) {

		// Preserve chaining for setter
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each( function( i ) {
					jQuery.offset.setOffset( this, options, i );
				} );
		}

		var rect, win,
			elem = this[ 0 ];

		if ( !elem ) {
			return;
		}

		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
		// Support: IE <=11+
		// Running getBoundingClientRect on a
		// disconnected node in IE throws an error
		if ( !elem.getClientRects().length ) {
			return { top: 0, left: 0 };
		}

		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
		rect = elem.getBoundingClientRect();
		win = elem.ownerDocument.defaultView;
		return {
			top: rect.top + win.pageYOffset,
			left: rect.left + win.pageXOffset
		};
	},

	// position() relates an element's margin box to its offset parent's padding box
	// This corresponds to the behavior of CSS absolute positioning
	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset, doc,
			elem = this[ 0 ],
			parentOffset = { top: 0, left: 0 };

		// position:fixed elements are offset from the viewport, which itself always has zero offset
		if ( jQuery.css( elem, "position" ) === "fixed" ) {

			// Assume position:fixed implies availability of getBoundingClientRect
			offset = elem.getBoundingClientRect();

		} else {
			offset = this.offset();

			// Account for the *real* offset parent, which can be the document or its root element
			// when a statically positioned element is identified
			doc = elem.ownerDocument;
			offsetParent = elem.offsetParent || doc.documentElement;
			while ( offsetParent &&
				offsetParent !== doc.documentElement &&
				jQuery.css( offsetParent, "position" ) === "static" ) {

				offsetParent = offsetParent.offsetParent || doc.documentElement;
			}
			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 &&
				jQuery.css( offsetParent, "position" ) !== "static" ) {

				// Incorporate borders into its offset, since they are outside its content origin
				parentOffset = jQuery( offsetParent ).offset();
				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
			}
		}

		// Subtract parent offsets and element margins
		return {
			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
		};
	},

	// This method will return documentElement in the following cases:
	// 1) For the element inside the iframe without offsetParent, this method will return
	//    documentElement of the parent window
	// 2) For the hidden or detached element
	// 3) For body or html element, i.e. in case of the html node - it will return itself
	//
	// but those exceptions were never presented as a real life use-cases
	// and might be considered as more preferable results.
	//
	// This logic, however, is not guaranteed and can change at any point in the future
	offsetParent: function() {
		return this.map( function() {
			var offsetParent = this.offsetParent;

			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
				offsetParent = offsetParent.offsetParent;
			}

			return offsetParent || documentElement$1;
		} );
	}
} );

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = "pageYOffset" === prop;

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {

			// Coalesce documents and windows
			var win;
			if ( isWindow( elem ) ) {
				win = elem;
			} else if ( elem.nodeType === 9 ) {
				win = elem.defaultView;
			}

			if ( val === undefined ) {
				return win ? win[ prop ] : elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : win.pageXOffset,
					top ? val : win.pageYOffset
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length );
	};
} );

// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
	jQuery.each( {
		padding: "inner" + name,
		content: type,
		"": "outer" + name
	}, function( defaultExtra, funcName ) {

		// Margin is only for outerHeight, outerWidth
		jQuery.fn[ funcName ] = function( margin, value ) {
			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );

			return access( this, function( elem, type, value ) {
				var doc;

				if ( isWindow( elem ) ) {

					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
					return funcName.indexOf( "outer" ) === 0 ?
						elem[ "inner" + name ] :
						elem.document.documentElement[ "client" + name ];
				}

				// Get document width or height
				if ( elem.nodeType === 9 ) {
					doc = elem.documentElement;

					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
					// whichever is greatest
					return Math.max(
						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
						elem.body[ "offset" + name ], doc[ "offset" + name ],
						doc[ "client" + name ]
					);
				}

				return value === undefined ?

					// Get width or height on the element, requesting but not forcing parseFloat
					jQuery.css( elem, type, extra ) :

					// Set width or height on the element
					jQuery.style( elem, type, value, extra );
			}, type, chainable ? margin : undefined, chainable );
		};
	} );
} );

jQuery.each( [
	"ajaxStart",
	"ajaxStop",
	"ajaxComplete",
	"ajaxError",
	"ajaxSuccess",
	"ajaxSend"
], function( _i, type ) {
	jQuery.fn[ type ] = function( fn ) {
		return this.on( type, fn );
	};
} );

jQuery.fn.extend( {

	bind: function( types, data, fn ) {
		return this.on( types, null, data, fn );
	},
	unbind: function( types, fn ) {
		return this.off( types, null, fn );
	},

	delegate: function( selector, types, data, fn ) {
		return this.on( types, selector, data, fn );
	},
	undelegate: function( selector, types, fn ) {

		// ( namespace ) or ( selector, types [, fn] )
		return arguments.length === 1 ?
			this.off( selector, "**" ) :
			this.off( types, selector || "**", fn );
	},

	hover: function( fnOver, fnOut ) {
		return this
			.on( "mouseenter", fnOver )
			.on( "mouseleave", fnOut || fnOver );
	}
} );

jQuery.each(
	( "blur focus focusin focusout resize scroll click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
	function( _i, name ) {

		// Handle event binding
		jQuery.fn[ name ] = function( data, fn ) {
			return arguments.length > 0 ?
				this.on( name, null, data, fn ) :
				this.trigger( name );
		};
	}
);

// Bind a function to a context, optionally partially applying any
// arguments.
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
// However, it is not slated for removal any time soon
jQuery.proxy = function( fn, context ) {
	var tmp, args, proxy;

	if ( typeof context === "string" ) {
		tmp = fn[ context ];
		context = fn;
		fn = tmp;
	}

	// Quick check to determine if target is callable, in the spec
	// this throws a TypeError, but we will just return undefined.
	if ( typeof fn !== "function" ) {
		return undefined;
	}

	// Simulated bind
	args = slice.call( arguments, 2 );
	proxy = function() {
		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
	};

	// Set the guid of unique handler to the same of original handler, so it can be removed
	proxy.guid = fn.guid = fn.guid || jQuery.guid++;

	return proxy;
};

jQuery.holdReady = function( hold ) {
	if ( hold ) {
		jQuery.readyWait++;
	} else {
		jQuery.ready( true );
	}
};

jQuery.expr[ ":" ] = jQuery.expr.filters = jQuery.expr.pseudos;

// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

if ( typeof define === "function" && define.amd ) {
	define( "jquery", [], function() {
		return jQuery;
	} );
}

var

	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,

	// Map over the $ in case of overwrite
	_$ = window.$;

jQuery.noConflict = function( deep ) {
	if ( window.$ === jQuery ) {
		window.$ = _$;
	}

	if ( deep && window.jQuery === jQuery ) {
		window.jQuery = _jQuery;
	}

	return jQuery;
};

// Expose jQuery and $ identifiers, even in AMD
// (trac-7102#comment:10, gh-557)
// and CommonJS for browser emulators (trac-13566)
if ( typeof noGlobal === "undefined" ) {
	window.jQuery = window.$ = jQuery;
}

return jQuery;

} );
jquery/component.json000064400000000662152336434510010772 0ustar00{
    "name": "jquery",
    "repo": "components/jquery",
    "version": "4.0.0",
    "description": "jQuery component",
    "license": "MIT",
    "keywords": [
        "jquery",
        "component"
    ],
    "main": "jquery.js",
    "scripts": [
        "jquery.js",
        "jquery.min.js",
        "jquery.slim.js",
        "jquery.slim.min.js"
    ],
    "files": [
        "jquery.min.map",
        "jquery.slim.min.map"
    ]
}
jquery/README.md000064400000000632152336434510007351 0ustar00jQuery Component
================

Shim [repository](https://github.com/components/jquery) for the [jQuery](http://jquery.com).

Package Managers
----------------

* [Bower](http://bower.io/): `jquery`
* [Component](https://github.com/component/component): `components/jquery`
* [Composer](http://packagist.org/packages/components/jquery): `components/jquery`
* [spm](http://spmjs.io/package/jquery): `jquery`
jquery/jquery.slim.min.map000064400000342760152336434510011650 0ustar00{"version":3,"sources":["jquery-4.0.0.slim.js"],"names":["global","factory","module","exports","window","noGlobal","document","Error","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","toType","obj","isWindow","isArrayLike","length","type","document$1","preservedScriptAttributes","src","nonce","noModule","DOMEval","code","node","doc","i","script","createElement","text","head","appendChild","parentNode","removeChild","version","rhtmlSuffix","jQuery","selector","context","fn","init","nodeName","elem","name","toLowerCase","prototype","jquery","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","extend","options","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","nodeType","textContent","documentElement","nodeValue","makeArray","results","inArray","isXMLDoc","namespace","namespaceURI","docElem","ownerDocument","test","contains","a","b","bup","compareDocumentPosition","second","invert","matches","callbackExpect","callbackInverse","arg","value","guid","Symbol","iterator","split","_i","pop","whitespace","isIE","documentMode","rbuggyQSA","RegExp","rtrimCSS","identifier","rleadingCombinator","rdescend","rsibling","documentElement$1","msMatchesSelector","createCache","keys","cache","key","expr","cacheLength","shift","testContext","getElementsByTagName","attributes","pseudos","filterMatchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","rpseudo","runescape","funescape","escape","nonHex","high","String","fromCharCode","unescapeSelector","sel","selectorError","rcomma","tokenCache","tokenize","parseOnly","matched","match","tokens","soFar","groups","preFilters","cached","preFilter","exec","toSelector","access","chainable","emptyGet","raw","bulk","_key","rnothtmlwhite","attr","removeAttr","hooks","nType","getAttribute","prop","attrHooks","set","setAttribute","attrNames","removeAttribute","val","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","escapeSelector","sort","splice","sortOrder","hasDuplicate","compare","uniqueSort","duplicates","outermostContext","documentIsHTML","dirruns","done","classCache","compilerCache","nonnativeSelectorCache","rwhitespace","ridentifier","matchExpr","needsContext","rinputs","rheader","rquickExpr$1","unloadHandler","setDocument","inDisabledFieldset","addCombinator","disabled","dir","next","find","seed","m","nid","newSelector","newContext","getElementById","getElementsByClassName","join","querySelectorAll","qsaError","select","markFunction","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","subWindow","defaultView","top","addEventListener","elements","matchesSelector","e","createPseudo","id","tag","className","relative","excess","unquoted","filter","attrId","nodeNameSelector","expectedNodeName","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","outerCache","nodeIndex","start","parent","useCache","diff","firstChild","lastChild","childNodes","pseudo","setFilters","not","input","matcher","compile","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","nextSibling","header","button","_matchIndexes","lt","gt","nth","radio","checkbox","file","password","image","createInputPseudo","submit","reset","createButtonPseudo","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","bySet","byElement","superMatcher","setMatchers","elementMatchers","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","setMatcher","postFilter","postFinder","postSelector","temp","matcherOut","preMap","postMap","preexisting","multipleContexts","contexts","matcherIn","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","until","truncate","is","siblings","n","rneedsContext","rsingleTag","isObviousHtml","winnow","qualifier","self","rootjQuery","rquickExpr","ready","parseHTML","rparentsprev","guaranteedUnique","children","contents","prev","sibling","cur","targets","l","closest","selectors","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","create","defineProperty","configurable","data","remove","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","attrs","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","propHooks","tabindex","parseInt","addClass","classNames","curValue","finalValue","removeClass","toggleClass","stateVal","hasClass","valueIsFunction","valHooks","option","one","values","max","optionSet","rcheckableType","rtypenamespace","returnTrue","returnFalse","on","types","origFn","event","off","leverageNative","el","isSetup","handler","saved","isTrigger","special","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","isImmediatePropagationStopped","handleObjIn","eventHandle","tmp","events","t","handleObj","handlers","namespaces","origType","elemData","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","args","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","Event","enumerable","originalEvent","writable","load","noBubble","click","_default","beforeunload","removeEventListener","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","Date","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","focusMappedHandler","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","isAttached","getRootNode","composed","rtagName","wrapMap","thead","col","tr","td","getAll","tbody","tfoot","colgroup","caption","th","rscriptType","setGlobalEval","refElements","rhtml","buildFragment","scripts","selection","ignored","wrap","attached","fragment","createDocumentFragment","nodes","innerHTML","htmlPrefilter","createTextNode","disableScript","restoreScript","domManip","collection","hasScripts","iNoClone","html","_evalUrl","crossOrigin","rnoInnerhtml","manipulationTarget","cloneCopyEvent","dest","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","cloneNode","inPage","defaultValue","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","pnum","source","rcssNum","rnumnonpx","rcustomProp","cssExpand","ralphaStart","rautoPx","isAutoPx","rmsPrefix","cssCamelCase","getStyles","getComputedStyle","curCSS","computed","isCustomProp","getPropertyValue","style","cssPrefixes","emptyStyle","finalPropName","vendorPropName","capName","reliableTrDimensionsVal","reliableColDimensionsVal","table","computeTableStyleTests","trStyle","cssText","span","offsetWidth","round","parseFloat","width","height","borderTopWidth","borderBottomWidth","offsetHeight","reliableTrDimensions","reliableColDimensions","cssShow","position","visibility","display","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","marginDelta","css","ceil","getWidthOrHeight","boxSizingNeeded","valueIsBorderBox","offsetProp","getClientRects","isHiddenWithinTree","cssHooks","origName","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","initialInUnit","setProperty","isFinite","swap","old","margin","padding","border","prefix","suffix","expand","expanded","parts","hidden","visible","defaultDisplayMap","showHide","show","getDefaultDisplay","body","hide","toggle","state","rbracket","rCRLF","rsubmitterTypes","rsubmittable","param","traditional","s","valueOrFunction","encodeURIComponent","buildParams","v","serialize","serializeArray","parseXML","parserErrorElem","DOMParser","parseFromString","keepScripts","parsed","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","left","using","rect","win","getBoundingClientRect","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollLeft","scrollTop","method","scrollTo","Height","Width","defaultExtra","funcName","bind","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","readyWait","filters","define","amd","_jQuery","_$","$","noConflict","readyCallbacks","whenReady","executeReady","setTimeout","completed","wait","then","readyState"],"mappings":";CAUA,AAAE,SAAUA,CAAM,CAAEC,CAAO,EAE1B,YAEK,AAAkB,CAAA,UAAlB,OAAOC,QAAuB,AAA0B,UAA1B,OAAOA,OAAOC,OAAO,CAIvDD,OAAOC,OAAO,CAAGF,EAASD,EAAQ,CAAA,GAElCC,EAASD,EAIX,EAAK,AAAkB,aAAlB,OAAOI,OAAyBA,OAAS,IAAI,CAAE,SAAUA,CAAM,CAAEC,CAAQ,EAE9E,aAEA,GAAK,CAACD,EAAOE,QAAQ,CACpB,MAAM,AAAIC,MAAO,4CAGlB,IAAIC,EAAM,EAAE,CAERC,EAAWC,OAAOC,cAAc,CAEhCC,EAAQJ,EAAII,KAAK,CAIjBC,EAAOL,EAAIK,IAAI,CAAG,SAAUC,CAAK,EACpC,OAAON,EAAIK,IAAI,CAACE,IAAI,CAAED,EACvB,EAAI,SAAUA,CAAK,EAClB,OAAON,EAAIQ,MAAM,CAACC,KAAK,CAAE,EAAE,CAAEH,EAC9B,EAEII,EAAOV,EAAIU,IAAI,CAEfC,EAAUX,EAAIW,OAAO,CAGrBC,EAAa,CAAC,EAEdC,EAAWD,EAAWC,QAAQ,CAE9BC,EAASF,EAAWG,cAAc,CAElCC,EAAaF,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AT8tB,GAAiB,EAAE9wB,EAAOiwB,SAAS,CAAG,GAe3CS,AAXAA,CAAAA,GAAY,SAAUvwB,CAAE,EACvBswB,GAAe3yB,IAAI,CAAEqC,GAErB,MAAQswB,GAAe9xB,MAAM,CAEvB,AAAc,YAAd,MADLwB,CAAAA,EAAKswB,GAAehqB,KAAK,EAAC,GAEzBkqB,GAAcxwB,EAGjB,CAAA,IAGD,CACD,GAGAH,EAAOyV,KAAK,CAACsb,IAAI,CAAG/wB,EAAOG,EAAE,CAACsV,KAAK,CAa9B5W,AAA0B,YAA1BA,EAAWmyB,UAAU,CAGzBh0B,EAAO4zB,UAAU,CAAE5wB,EAAOyV,KAAK,GAK/B5W,EAAW2O,gBAAgB,CAAE,mBAAoBqjB,IAGjD7zB,EAAOwQ,gBAAgB,CAAE,OAAQqjB,KAG3B7wB,CAEP","file":"jquery-4.0.0.slim.min.js"}jquery/jquery.slim.js000064400000544357152336434510010733 0ustar00/*!
 * jQuery JavaScript Library v4.0.0+slim
 * https://jquery.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.com/license/
 *
 * Date: 2026-01-18T00:20Z
 */
( function( global, factory ) {

	"use strict";

	if ( typeof module === "object" && typeof module.exports === "object" ) {

		// For CommonJS and CommonJS-like environments where a proper `window`
		// is present, execute the factory and get jQuery.
		module.exports = factory( global, true );
	} else {
		factory( global );
	}

// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

"use strict";

if ( !window.document ) {
	throw new Error( "jQuery requires a window with a document" );
}

var arr = [];

var getProto = Object.getPrototypeOf;

var slice = arr.slice;

// Support: IE 11+
// IE doesn't have Array#flat; provide a fallback.
var flat = arr.flat ? function( array ) {
	return arr.flat.call( array );
} : function( array ) {
	return arr.concat.apply( [], array );
};

var push = arr.push;

var indexOf = arr.indexOf;

// [[Class]] -> type pairs
var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var fnToString = hasOwn.toString;

var ObjectFunctionString = fnToString.call( Object );

// All support tests are defined in their respective modules.
var support = {};

function toType( obj ) {
	if ( obj == null ) {
		return obj + "";
	}

	return typeof obj === "object" ?
		class2type[ toString.call( obj ) ] || "object" :
		typeof obj;
}

function isWindow( obj ) {
	return obj != null && obj === obj.window;
}

function isArrayLike( obj ) {

	var length = !!obj && obj.length,
		type = toType( obj );

	if ( typeof obj === "function" || isWindow( obj ) ) {
		return false;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}

var document$1 = window.document;

var preservedScriptAttributes = {
	type: true,
	src: true,
	nonce: true,
	noModule: true
};

function DOMEval( code, node, doc ) {
	doc = doc || document$1;

	var i,
		script = doc.createElement( "script" );

	script.text = code;
	for ( i in preservedScriptAttributes ) {
		if ( node && node[ i ] ) {
			script[ i ] = node[ i ];
		}
	}

	if ( doc.head.appendChild( script ).parentNode ) {
		script.parentNode.removeChild( script );
	}
}

var version = "4.0.0+slim",

	rhtmlSuffix = /HTML$/i,

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {

		// The jQuery object is actually just the init constructor 'enhanced'
		// Need init if jQuery is called (just allow error to be thrown if not included)
		return new jQuery.fn.init( selector, context );
	};

jQuery.fn = jQuery.prototype = {

	// The current version of jQuery being used
	jquery: version,

	constructor: jQuery,

	// The default length of a jQuery object is 0
	length: 0,

	toArray: function() {
		return slice.call( this );
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {

		// Return all the elements in a clean array
		if ( num == null ) {
			return slice.call( this );
		}

		// Return just the one element from the set
		return num < 0 ? this[ num + this.length ] : this[ num ];
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	each: function( callback ) {
		return jQuery.each( this, callback );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map( this, function( elem, i ) {
			return callback.call( elem, i, elem );
		} ) );
	},

	slice: function() {
		return this.pushStack( slice.apply( this, arguments ) );
	},

	first: function() {
		return this.eq( 0 );
	},

	last: function() {
		return this.eq( -1 );
	},

	even: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return ( i + 1 ) % 2;
		} ) );
	},

	odd: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return i % 2;
		} ) );
	},

	eq: function( i ) {
		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
	},

	end: function() {
		return this.prevObject || this.constructor();
	}
};

jQuery.extend = jQuery.fn.extend = function() {
	var options, name, src, copy, copyIsArray, clone,
		target = arguments[ 0 ] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;

		// Skip the boolean and the target
		target = arguments[ i ] || {};
		i++;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && typeof target !== "function" ) {
		target = {};
	}

	// Extend jQuery itself if only one argument is passed
	if ( i === length ) {
		target = this;
		i--;
	}

	for ( ; i < length; i++ ) {

		// Only deal with non-null/undefined values
		if ( ( options = arguments[ i ] ) != null ) {

			// Extend the base object
			for ( name in options ) {
				copy = options[ name ];

				// Prevent Object.prototype pollution
				// Prevent never-ending loop
				if ( name === "__proto__" || target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
					( copyIsArray = Array.isArray( copy ) ) ) ) {
					src = target[ name ];

					// Ensure proper type for the source value
					if ( copyIsArray && !Array.isArray( src ) ) {
						clone = [];
					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
						clone = {};
					} else {
						clone = src;
					}
					copyIsArray = false;

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

jQuery.extend( {

	// Unique for each copy of jQuery on the page
	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

	// Assume jQuery is ready without the ready module
	isReady: true,

	error: function( msg ) {
		throw new Error( msg );
	},

	noop: function() {},

	isPlainObject: function( obj ) {
		var proto, Ctor;

		// Detect obvious negatives
		// Use toString instead of jQuery.type to catch host objects
		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
			return false;
		}

		proto = getProto( obj );

		// Objects with no prototype (e.g., `Object.create( null )`) are plain
		if ( !proto ) {
			return true;
		}

		// Objects with prototype are plain iff they were constructed by a global Object function
		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
	},

	isEmptyObject: function( obj ) {
		var name;

		for ( name in obj ) {
			return false;
		}
		return true;
	},

	// Evaluates a script in a provided context; falls back to the global one
	// if not specified.
	globalEval: function( code, options, doc ) {
		DOMEval( code, { nonce: options && options.nonce }, doc );
	},

	each: function( obj, callback ) {
		var length, i = 0;

		if ( isArrayLike( obj ) ) {
			length = obj.length;
			for ( ; i < length; i++ ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		} else {
			for ( i in obj ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		}

		return obj;
	},


	// Retrieve the text value of an array of DOM nodes
	text: function( elem ) {
		var node,
			ret = "",
			i = 0,
			nodeType = elem.nodeType;

		if ( !nodeType ) {

			// If no nodeType, this is expected to be an array
			while ( ( node = elem[ i++ ] ) ) {

				// Do not traverse comment nodes
				ret += jQuery.text( node );
			}
		}
		if ( nodeType === 1 || nodeType === 11 ) {
			return elem.textContent;
		}
		if ( nodeType === 9 ) {
			return elem.documentElement.textContent;
		}
		if ( nodeType === 3 || nodeType === 4 ) {
			return elem.nodeValue;
		}

		// Do not include comment or processing instruction nodes

		return ret;
	},


	// results is for internal usage only
	makeArray: function( arr, results ) {
		var ret = results || [];

		if ( arr != null ) {
			if ( isArrayLike( Object( arr ) ) ) {
				jQuery.merge( ret,
					typeof arr === "string" ?
						[ arr ] : arr
				);
			} else {
				push.call( ret, arr );
			}
		}

		return ret;
	},

	inArray: function( elem, arr, i ) {
		return arr == null ? -1 : indexOf.call( arr, elem, i );
	},

	isXMLDoc: function( elem ) {
		var namespace = elem && elem.namespaceURI,
			docElem = elem && ( elem.ownerDocument || elem ).documentElement;

		// Assume HTML when documentElement doesn't yet exist, such as inside
		// document fragments.
		return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
	},

	// Note: an element does not contain itself
	contains: function( a, b ) {
		var bup = b && b.parentNode;

		return a === bup || !!( bup && bup.nodeType === 1 && (

			// Support: IE 9 - 11+
			// IE doesn't have `contains` on SVG.
			a.contains ?
				a.contains( bup ) :
				a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
		) );
	},

	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		for ( ; j < len; j++ ) {
			first[ i++ ] = second[ j ];
		}

		first.length = i;

		return first;
	},

	grep: function( elems, callback, invert ) {
		var callbackInverse,
			matches = [],
			i = 0,
			length = elems.length,
			callbackExpect = !invert;

		// Go through the array, only saving the items
		// that pass the validator function
		for ( ; i < length; i++ ) {
			callbackInverse = !callback( elems[ i ], i );
			if ( callbackInverse !== callbackExpect ) {
				matches.push( elems[ i ] );
			}
		}

		return matches;
	},

	// arg is for internal usage only
	map: function( elems, callback, arg ) {
		var length, value,
			i = 0,
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArrayLike( elems ) ) {
			length = elems.length;
			for ( ; i < length; i++ ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}

		// Go through every key on the object,
		} else {
			for ( i in elems ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}
		}

		// Flatten any nested arrays
		return flat( ret );
	},

	// A global GUID counter for objects
	guid: 1,

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
} );

if ( typeof Symbol === "function" ) {
	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
	function( _i, name ) {
		class2type[ "[object " + name + "]" ] = name.toLowerCase();
	} );

function nodeName( elem, name ) {
	return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
}

var pop = arr.pop;

// https://www.w3.org/TR/css3-selectors/#whitespace
var whitespace = "[\\x20\\t\\r\\n\\f]";

var isIE = document$1.documentMode;

var rbuggyQSA = isIE && new RegExp(

	// Support: IE 9 - 11+
	// IE's :disabled selector does not pick up the children of disabled fieldsets
	":enabled|:disabled|" +

	// Support: IE 11+
	// IE 11 doesn't find elements on a `[name='']` query in some cases.
	// Adding a temporary attribute to the document before the selection works
	// around the issue.
	"\\[" + whitespace + "*name" + whitespace + "*=" +
	whitespace + "*(?:''|\"\")"

);

var rtrimCSS = new RegExp(
	"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
	"g"
);

// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
var identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
	"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+";

var rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" +
	whitespace + ")" + whitespace + "*" );

var rdescend = new RegExp( whitespace + "|>" );

var rsibling = /[+~]/;

var documentElement$1 = document$1.documentElement;

// Support: IE 9 - 11+
// IE requires a prefix.
var matches = documentElement$1.matches || documentElement$1.msMatchesSelector;

/**
 * Create key-value caches of limited size
 * @returns {function(string, object)} Returns the Object data after storing it on itself with
 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 *	deleting the oldest entry
 */
function createCache() {
	var keys = [];

	function cache( key, value ) {

		// Use (key + " ") to avoid collision with native prototype properties
		// (see https://github.com/jquery/sizzle/issues/157)
		if ( keys.push( key + " " ) > jQuery.expr.cacheLength ) {

			// Only keep the most recent entries
			delete cache[ keys.shift() ];
		}
		return ( cache[ key + " " ] = value );
	}
	return cache;
}

/**
 * Checks a node for validity as a jQuery selector context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}

// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
var attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +

	// Operator (capture 2)
	"*([*^$|!~]?=)" + whitespace +

	// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
	"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
	whitespace + "*\\]";

var pseudos = ":(" + identifier + ")(?:\\((" +

	// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
	// 1. quoted (capture 3; capture 4 or capture 5)
	"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +

	// 2. simple (capture 6)
	"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +

	// 3. anything else (capture 2)
	".*" +
	")\\)|)";

var filterMatchExpr = {
	ID: new RegExp( "^#(" + identifier + ")" ),
	CLASS: new RegExp( "^\\.(" + identifier + ")" ),
	TAG: new RegExp( "^(" + identifier + "|[*])" ),
	ATTR: new RegExp( "^" + attributes ),
	PSEUDO: new RegExp( "^" + pseudos ),
	CHILD: new RegExp(
		"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
		whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
		whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" )
};

var rpseudo = new RegExp( pseudos );

// CSS escapes
// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters

var runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
	"?|\\\\([^\\r\\n\\f])", "g" ),
	funescape = function( escape, nonHex ) {
		var high = "0x" + escape.slice( 1 ) - 0x10000;

		if ( nonHex ) {

			// Strip the backslash prefix from a non-hex escape sequence
			return nonHex;
		}

		// Replace a hexadecimal escape sequence with the encoded Unicode code point
		// Support: IE <=11+
		// For values outside the Basic Multilingual Plane (BMP), manually construct a
		// surrogate pair
		return high < 0 ?
			String.fromCharCode( high + 0x10000 ) :
			String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
	};

function unescapeSelector( sel ) {
	return sel.replace( runescape, funescape );
}

function selectorError( msg ) {
	jQuery.error( "Syntax error, unrecognized expression: " + msg );
}

var rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" );

var tokenCache = createCache();

function tokenize( selector, parseOnly ) {
	var matched, match, tokens, type,
		soFar, groups, preFilters,
		cached = tokenCache[ selector + " " ];

	if ( cached ) {
		return parseOnly ? 0 : cached.slice( 0 );
	}

	soFar = selector;
	groups = [];
	preFilters = jQuery.expr.preFilter;

	while ( soFar ) {

		// Comma and first run
		if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
			if ( match ) {

				// Don't consume trailing commas as valid
				soFar = soFar.slice( match[ 0 ].length ) || soFar;
			}
			groups.push( ( tokens = [] ) );
		}

		matched = false;

		// Combinators
		if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
			matched = match.shift();
			tokens.push( {
				value: matched,

				// Cast descendant combinators to space
				type: match[ 0 ].replace( rtrimCSS, " " )
			} );
			soFar = soFar.slice( matched.length );
		}

		// Filters
		for ( type in filterMatchExpr ) {
			if ( ( match = jQuery.expr.match[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
				( match = preFilters[ type ]( match ) ) ) ) {
				matched = match.shift();
				tokens.push( {
					value: matched,
					type: type,
					matches: match
				} );
				soFar = soFar.slice( matched.length );
			}
		}

		if ( !matched ) {
			break;
		}
	}

	// Return the length of the invalid excess
	// if we're just parsing
	// Otherwise, throw an error or return tokens
	if ( parseOnly ) {
		return soFar.length;
	}

	return soFar ?
		selectorError( selector ) :

		// Cache the tokens
		tokenCache( selector, groups ).slice( 0 );
}

var preFilter = {
	ATTR: function( match ) {
		match[ 1 ] = unescapeSelector( match[ 1 ] );

		// Move the given value to match[3] whether quoted or unquoted
		match[ 3 ] = unescapeSelector( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" );

		if ( match[ 2 ] === "~=" ) {
			match[ 3 ] = " " + match[ 3 ] + " ";
		}

		return match.slice( 0, 4 );
	},

	CHILD: function( match ) {

		/* matches from filterMatchExpr["CHILD"]
			1 type (only|nth|...)
			2 what (child|of-type)
			3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
			4 xn-component of xn+y argument ([+-]?\d*n|)
			5 sign of xn-component
			6 x of xn-component
			7 sign of y-component
			8 y of y-component
		*/
		match[ 1 ] = match[ 1 ].toLowerCase();

		if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {

			// nth-* requires argument
			if ( !match[ 3 ] ) {
				selectorError( match[ 0 ] );
			}

			// numeric x and y parameters for jQuery.expr.filter.CHILD
			// remember that false/true cast respectively to 0/1
			match[ 4 ] = +( match[ 4 ] ?
				match[ 5 ] + ( match[ 6 ] || 1 ) :
				2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
			);
			match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );

		// other types prohibit arguments
		} else if ( match[ 3 ] ) {
			selectorError( match[ 0 ] );
		}

		return match;
	},

	PSEUDO: function( match ) {
		var excess,
			unquoted = !match[ 6 ] && match[ 2 ];

		if ( filterMatchExpr.CHILD.test( match[ 0 ] ) ) {
			return null;
		}

		// Accept quoted arguments as-is
		if ( match[ 3 ] ) {
			match[ 2 ] = match[ 4 ] || match[ 5 ] || "";

		// Strip excess characters from unquoted arguments
		} else if ( unquoted && rpseudo.test( unquoted ) &&

			// Get excess from tokenize (recursively)
			( excess = tokenize( unquoted, true ) ) &&

			// advance to the next closing parenthesis
			( excess = unquoted.indexOf( ")", unquoted.length - excess ) -
				unquoted.length ) ) {

			// excess is a negative index
			match[ 0 ] = match[ 0 ].slice( 0, excess );
			match[ 2 ] = unquoted.slice( 0, excess );
		}

		// Return only captures needed by the pseudo filter method (type and argument)
		return match.slice( 0, 3 );
	}
};

function toSelector( tokens ) {
	var i = 0,
		len = tokens.length,
		selector = "";
	for ( ; i < len; i++ ) {
		selector += tokens[ i ].value;
	}
	return selector;
}

// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
function access( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		len = elems.length,
		bulk = key == null;

	// Sets many values
	if ( toType( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			access( elems, fn, i, key[ i ], true, emptyGet, raw );
		}

	// Sets one value
	} else if ( value !== undefined ) {
		chainable = true;

		if ( typeof value !== "function" ) {
			raw = true;
		}

		if ( bulk ) {

			// Bulk operations run against the entire set
			if ( raw ) {
				fn.call( elems, value );
				fn = null;

			// ...except when executing function values
			} else {
				bulk = fn;
				fn = function( elem, _key, value ) {
					return bulk.call( jQuery( elem ), value );
				};
			}
		}

		if ( fn ) {
			for ( ; i < len; i++ ) {
				fn(
					elems[ i ], key, raw ?
						value :
						value.call( elems[ i ], i, fn( elems[ i ], key ) )
				);
			}
		}
	}

	if ( chainable ) {
		return elems;
	}

	// Gets
	if ( bulk ) {
		return fn.call( elems );
	}

	return len ? fn( elems[ 0 ], key ) : emptyGet;
}

// Only count HTML whitespace
// Other whitespace should count in values
// https://infra.spec.whatwg.org/#ascii-whitespace
var rnothtmlwhite = /[^\x20\t\r\n\f]+/g;

jQuery.fn.extend( {
	attr: function( name, value ) {
		return access( this, jQuery.attr, name, value, arguments.length > 1 );
	},

	removeAttr: function( name ) {
		return this.each( function() {
			jQuery.removeAttr( this, name );
		} );
	}
} );

jQuery.extend( {
	attr: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set attributes on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === "undefined" ) {
			return jQuery.prop( elem, name, value );
		}

		// Attribute hooks are determined by the lowercase version
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			hooks = jQuery.attrHooks[ name.toLowerCase() ];
		}

		if ( value !== undefined ) {
			if ( value === null ||

				// For compat with previous handling of boolean attributes,
				// remove when `false` passed. For ARIA attributes -
				// many of which recognize a `"false"` value - continue to
				// set the `"false"` value as jQuery <4 did.
				( value === false && name.toLowerCase().indexOf( "aria-" ) !== 0 ) ) {

				jQuery.removeAttr( elem, name );
				return;
			}

			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			elem.setAttribute( name, value );
			return value;
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		ret = elem.getAttribute( name );

		// Non-existent attributes return null, we normalize to undefined
		return ret == null ? undefined : ret;
	},

	attrHooks: {},

	removeAttr: function( elem, value ) {
		var name,
			i = 0,

			// Attribute names can contain non-HTML whitespace characters
			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
			attrNames = value && value.match( rnothtmlwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( ( name = attrNames[ i++ ] ) ) {
				elem.removeAttribute( name );
			}
		}
	}
} );

// Support: IE <=11+
// An input loses its value after becoming a radio
if ( isIE ) {
	jQuery.attrHooks.type = {
		set: function( elem, value ) {
			if ( value === "radio" && nodeName( elem, "input" ) ) {
				var val = elem.value;
				elem.setAttribute( "type", value );
				if ( val ) {
					elem.value = val;
				}
				return value;
			}
		}
	};
}

// CSS string/identifier serialization
// https://drafts.csswg.org/cssom/#common-serializing-idioms
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;

function fcssescape( ch, asCodePoint ) {
	if ( asCodePoint ) {

		// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
		if ( ch === "\0" ) {
			return "\uFFFD";
		}

		// Control characters and (dependent upon position) numbers get escaped as code points
		return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
	}

	// Other potentially-special ASCII characters get backslash-escaped
	return "\\" + ch;
}

jQuery.escapeSelector = function( sel ) {
	return ( sel + "" ).replace( rcssescape, fcssescape );
};

var sort = arr.sort;

var splice = arr.splice;

var hasDuplicate;

// Document order sorting
function sortOrder( a, b ) {

	// Flag for duplicate removal
	if ( a === b ) {
		hasDuplicate = true;
		return 0;
	}

	// Sort on method existence if only one input has compareDocumentPosition
	var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
	if ( compare ) {
		return compare;
	}

	// Calculate position if both inputs belong to the same document
	// Support: IE 11+
	// IE sometimes throws a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
		a.compareDocumentPosition( b ) :

		// Otherwise we know they are disconnected
		1;

	// Disconnected nodes
	if ( compare & 1 ) {

		// Choose the first element that is related to the document
		// Support: IE 11+
		// IE sometimes throws a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		if ( a == document$1 || a.ownerDocument == document$1 &&
			jQuery.contains( document$1, a ) ) {
			return -1;
		}

		// Support: IE 11+
		// IE sometimes throws a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		if ( b == document$1 || b.ownerDocument == document$1 &&
			jQuery.contains( document$1, b ) ) {
			return 1;
		}

		// Maintain original order
		return 0;
	}

	return compare & 4 ? -1 : 1;
}

/**
 * Document sorting and removing duplicates
 * @param {ArrayLike} results
 */
jQuery.uniqueSort = function( results ) {
	var elem,
		duplicates = [],
		j = 0,
		i = 0;

	hasDuplicate = false;

	sort.call( results, sortOrder );

	if ( hasDuplicate ) {
		while ( ( elem = results[ i++ ] ) ) {
			if ( elem === results[ i ] ) {
				j = duplicates.push( i );
			}
		}
		while ( j-- ) {
			splice.call( results, duplicates[ j ], 1 );
		}
	}

	return results;
};

jQuery.fn.uniqueSort = function() {
	return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
};

var i,
	outermostContext,

	// Local document vars
	document,
	documentElement,
	documentIsHTML,

	// Instance-specific data
	dirruns = 0,
	done = 0,
	classCache = createCache(),
	compilerCache = createCache(),
	nonnativeSelectorCache = createCache(),

	// Regular expressions

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),

	ridentifier = new RegExp( "^" + identifier + "$" ),

	matchExpr = jQuery.extend( {

		// For use in libraries implementing .is()
		// We use this for POS matching in `select`
		needsContext: new RegExp( "^" + whitespace +
			"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
			"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
	}, filterMatchExpr ),

	rinputs = /^(?:input|select|textarea|button)$/i,
	rheader = /^h\d$/i,

	// Easily-parseable/retrievable ID or TAG or CLASS selectors
	rquickExpr$1 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

	// Used for iframes; see `setDocument`.
	// Support: IE 9 - 11+
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE.
	unloadHandler = function() {
		setDocument();
	},

	inDisabledFieldset = addCombinator(
		function( elem ) {
			return elem.disabled === true && nodeName( elem, "fieldset" );
		},
		{ dir: "parentNode", next: "legend" }
	);

function find( selector, context, results, seed ) {
	var m, i, elem, nid, match, groups, newSelector,
		newContext = context && context.ownerDocument,

		// nodeType defaults to 9, since context defaults to document
		nodeType = context ? context.nodeType : 9;

	results = results || [];

	// Return early from calls with invalid selector or context
	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	// Try to shortcut find operations (as opposed to filters) in HTML documents
	if ( !seed ) {
		setDocument( context );
		context = context || document;

		if ( documentIsHTML ) {

			// If the selector is sufficiently simple, try using a "get*By*" DOM method
			// (excepting DocumentFragment context, where the methods don't exist)
			if ( nodeType !== 11 && ( match = rquickExpr$1.exec( selector ) ) ) {

				// ID selector
				if ( ( m = match[ 1 ] ) ) {

					// Document context
					if ( nodeType === 9 ) {
						if ( ( elem = context.getElementById( m ) ) ) {
							push.call( results, elem );
						}
						return results;

					// Element context
					} else {
						if ( newContext && ( elem = newContext.getElementById( m ) ) &&
							jQuery.contains( context, elem ) ) {

							push.call( results, elem );
							return results;
						}
					}

				// Type selector
				} else if ( match[ 2 ] ) {
					push.apply( results, context.getElementsByTagName( selector ) );
					return results;

				// Class selector
				} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
					push.apply( results, context.getElementsByClassName( m ) );
					return results;
				}
			}

			// Take advantage of querySelectorAll
			if ( !nonnativeSelectorCache[ selector + " " ] &&
				( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {

				newSelector = selector;
				newContext = context;

				// qSA considers elements outside a scoping root when evaluating child or
				// descendant combinators, which is not what we want.
				// In such cases, we work around the behavior by prefixing every selector in the
				// list with an ID selector referencing the scope context.
				// The technique has to be used as well when a leading combinator is used
				// as such selectors are not recognized by querySelectorAll.
				// Thanks to Andrew Dupont for this technique.
				if ( nodeType === 1 &&
					( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {

					// Expand context for sibling selectors
					newContext = rsibling.test( selector ) &&
						testContext( context.parentNode ) ||
						context;

					// Outside of IE, if we're not changing the context we can
					// use :scope instead of an ID.
					// Support: IE 11+
					// IE sometimes throws a "Permission denied" error when strict-comparing
					// two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( newContext != context || isIE ) {

						// Capture the context ID, setting it first if necessary
						if ( ( nid = context.getAttribute( "id" ) ) ) {
							nid = jQuery.escapeSelector( nid );
						} else {
							context.setAttribute( "id", ( nid = jQuery.expando ) );
						}
					}

					// Prefix every selector in the list
					groups = tokenize( selector );
					i = groups.length;
					while ( i-- ) {
						groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
							toSelector( groups[ i ] );
					}
					newSelector = groups.join( "," );
				}

				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch ( qsaError ) {
					nonnativeSelectorCache( selector, true );
				} finally {
					if ( nid === jQuery.expando ) {
						context.removeAttribute( "id" );
					}
				}
			}
		}
	}

	// All others
	return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
}

/**
 * Mark a function for special use by jQuery selector module
 * @param {Function} fn The function to mark
 */
function markFunction( fn ) {
	fn[ jQuery.expando ] = true;
	return fn;
}

/**
 * Returns a function to use in pseudos for input types
 * @param {String} type
 */
function createInputPseudo( type ) {
	return function( elem ) {
		return nodeName( elem, "input" ) && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for buttons
 * @param {String} type
 */
function createButtonPseudo( type ) {
	return function( elem ) {
		return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
			elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for :enabled/:disabled
 * @param {Boolean} disabled true for :disabled; false for :enabled
 */
function createDisabledPseudo( disabled ) {

	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
	return function( elem ) {

		// Only certain elements can match :enabled or :disabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
		if ( "form" in elem ) {

			// Check for inherited disabledness on relevant non-disabled elements:
			// * listed form-associated elements in a disabled fieldset
			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
			// * option elements in a disabled optgroup
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
			// All such elements have a "form" property.
			if ( elem.parentNode && elem.disabled === false ) {

				// Option elements defer to a parent optgroup if present
				if ( "label" in elem ) {
					if ( "label" in elem.parentNode ) {
						return elem.parentNode.disabled === disabled;
					} else {
						return elem.disabled === disabled;
					}
				}

				// Support: IE 6 - 11+
				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
				return elem.isDisabled === disabled ||

					// Where there is no isDisabled, check manually
					elem.isDisabled !== !disabled &&
						inDisabledFieldset( elem ) === disabled;
			}

			return elem.disabled === disabled;

		// Try to winnow out elements that can't be disabled before trusting the disabled property.
		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
		// even exist on them, let alone have a boolean value.
		} else if ( "label" in elem ) {
			return elem.disabled === disabled;
		}

		// Remaining elements are neither :enabled nor :disabled
		return false;
	};
}

/**
 * Returns a function to use in pseudos for positionals
 * @param {Function} fn
 */
function createPositionalPseudo( fn ) {
	return markFunction( function( argument ) {
		argument = +argument;
		return markFunction( function( seed, matches ) {
			var j,
				matchIndexes = fn( [], seed.length, argument ),
				i = matchIndexes.length;

			// Match elements found at the specified indexes
			while ( i-- ) {
				if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
					seed[ j ] = !( matches[ j ] = seed[ j ] );
				}
			}
		} );
	} );
}

/**
 * Sets document-related variables once based on the current document
 * @param {Element|Object} [node] An element or document object to use to set the document
 */
function setDocument( node ) {
	var subWindow,
		doc = node ? node.ownerDocument || node : document$1;

	// Return early if doc is invalid or already selected
	// Support: IE 11+
	// IE sometimes throws a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( doc == document || doc.nodeType !== 9 ) {
		return;
	}

	// Update global variables
	document = doc;
	documentElement = document.documentElement;
	documentIsHTML = !jQuery.isXMLDoc( document );

	// Support: IE 9 - 11+
	// Accessing iframe documents after unload throws "permission denied" errors (see trac-13936)
	// Support: IE 11+
	// IE sometimes throws a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( isIE && document$1 != document &&
		( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
		subWindow.addEventListener( "unload", unloadHandler );
	}
}

find.matches = function( expr, elements ) {
	return find( expr, null, null, elements );
};

find.matchesSelector = function( elem, expr ) {
	setDocument( elem );

	if ( documentIsHTML &&
		!nonnativeSelectorCache[ expr + " " ] &&
		( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {

		try {
			return matches.call( elem, expr );
		} catch ( e ) {
			nonnativeSelectorCache( expr, true );
		}
	}

	return find( expr, document, null, [ elem ] ).length > 0;
};

jQuery.expr = {

	// Can be adjusted by the user
	cacheLength: 50,

	createPseudo: markFunction,

	match: matchExpr,

	find: {
		ID: function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var elem = context.getElementById( id );
				return elem ? [ elem ] : [];
			}
		},

		TAG: function( tag, context ) {
			if ( typeof context.getElementsByTagName !== "undefined" ) {
				return context.getElementsByTagName( tag );

				// DocumentFragment nodes don't have gEBTN
			} else {
				return context.querySelectorAll( tag );
			}
		},

		CLASS: function( className, context ) {
			if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
				return context.getElementsByClassName( className );
			}
		}
	},

	relative: {
		">": { dir: "parentNode", first: true },
		" ": { dir: "parentNode" },
		"+": { dir: "previousSibling", first: true },
		"~": { dir: "previousSibling" }
	},

	preFilter: preFilter,

	filter: {
		ID: function( id ) {
			var attrId = unescapeSelector( id );
			return function( elem ) {
				return elem.getAttribute( "id" ) === attrId;
			};
		},

		TAG: function( nodeNameSelector ) {
			var expectedNodeName = unescapeSelector( nodeNameSelector ).toLowerCase();
			return nodeNameSelector === "*" ?

				function() {
					return true;
				} :

				function( elem ) {
					return nodeName( elem, expectedNodeName );
				};
		},

		CLASS: function( className ) {
			var pattern = classCache[ className + " " ];

			return pattern ||
				( pattern = new RegExp( "(^|" + whitespace + ")" + className +
					"(" + whitespace + "|$)" ) ) &&
				classCache( className, function( elem ) {
					return pattern.test(
						typeof elem.className === "string" && elem.className ||
							typeof elem.getAttribute !== "undefined" &&
								elem.getAttribute( "class" ) ||
							""
					);
				} );
		},

		ATTR: function( name, operator, check ) {
			return function( elem ) {
				var result = jQuery.attr( elem, name );

				if ( result == null ) {
					return operator === "!=";
				}
				if ( !operator ) {
					return true;
				}

				result += "";

				if ( operator === "=" ) {
					return result === check;
				}
				if ( operator === "!=" ) {
					return result !== check;
				}
				if ( operator === "^=" ) {
					return check && result.indexOf( check ) === 0;
				}
				if ( operator === "*=" ) {
					return check && result.indexOf( check ) > -1;
				}
				if ( operator === "$=" ) {
					return check && result.slice( -check.length ) === check;
				}
				if ( operator === "~=" ) {
					return ( " " + result.replace( rwhitespace, " " ) + " " )
						.indexOf( check ) > -1;
				}
				if ( operator === "|=" ) {
					return result === check || result.slice( 0, check.length + 1 ) === check + "-";
				}

				return false;
			};
		},

		CHILD: function( type, what, _argument, first, last ) {
			var simple = type.slice( 0, 3 ) !== "nth",
				forward = type.slice( -4 ) !== "last",
				ofType = what === "of-type";

			return first === 1 && last === 0 ?

				// Shortcut for :nth-*(n)
				function( elem ) {
					return !!elem.parentNode;
				} :

				function( elem, _context, xml ) {
					var cache, outerCache, node, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType,
						diff = false;

					if ( parent ) {

						// :(first|last|only)-(child|of-type)
						if ( simple ) {
							while ( dir ) {
								node = elem;
								while ( ( node = node[ dir ] ) ) {
									if ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) {

										return false;
									}
								}

								// Reverse direction for :only-* (if we haven't yet done so)
								start = dir = type === "only" && !start && "nextSibling";
							}
							return true;
						}

						start = [ forward ? parent.firstChild : parent.lastChild ];

						// non-xml :nth-child(...) stores cache data on `parent`
						if ( forward && useCache ) {

							// Seek `elem` from a previously-cached index
							outerCache = parent[ jQuery.expando ] ||
								( parent[ jQuery.expando ] = {} );
							cache = outerCache[ type ] || [];
							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
							diff = nodeIndex && cache[ 2 ];
							node = nodeIndex && parent.childNodes[ nodeIndex ];

							while ( ( node = ++nodeIndex && node && node[ dir ] ||

								// Fallback to seeking `elem` from the start
								( diff = nodeIndex = 0 ) || start.pop() ) ) {

								// When found, cache indexes on `parent` and break
								if ( node.nodeType === 1 && ++diff && node === elem ) {
									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						} else {

							// Use previously-cached element index if available
							if ( useCache ) {
								outerCache = elem[ jQuery.expando ] ||
									( elem[ jQuery.expando ] = {} );
								cache = outerCache[ type ] || [];
								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
								diff = nodeIndex;
							}

							// xml :nth-child(...)
							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
							if ( diff === false ) {

								// Use the same loop as above to seek `elem` from the start
								while ( ( node = ++nodeIndex && node && node[ dir ] ||
									( diff = nodeIndex = 0 ) || start.pop() ) ) {

									if ( ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) &&
										++diff ) {

										// Cache the index of each encountered element
										if ( useCache ) {
											outerCache = node[ jQuery.expando ] ||
												( node[ jQuery.expando ] = {} );
											outerCache[ type ] = [ dirruns, diff ];
										}

										if ( node === elem ) {
											break;
										}
									}
								}
							}
						}

						// Incorporate the offset, then check against cycle size
						diff -= last;
						return diff === first || ( diff % first === 0 && diff / first >= 0 );
					}
				};
		},

		PSEUDO: function( pseudo, argument ) {

			// pseudo-class names are case-insensitive
			// https://www.w3.org/TR/selectors/#pseudo-classes
			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
			// Remember that setFilters inherits from pseudos
			var fn = jQuery.expr.pseudos[ pseudo ] ||
				jQuery.expr.setFilters[ pseudo.toLowerCase() ] ||
				selectorError( "unsupported pseudo: " + pseudo );

			// The user may use createPseudo to indicate that
			// arguments are needed to create the filter function
			// just as jQuery does
			if ( fn[ jQuery.expando ] ) {
				return fn( argument );
			}

			return fn;
		}
	},

	pseudos: {

		// Potentially complex pseudos
		not: markFunction( function( selector ) {

			// Trim the selector passed to compile
			// to avoid treating leading and trailing
			// spaces as combinators
			var input = [],
				results = [],
				matcher = compile( selector.replace( rtrimCSS, "$1" ) );

			return matcher[ jQuery.expando ] ?
				markFunction( function( seed, matches, _context, xml ) {
					var elem,
						unmatched = matcher( seed, null, xml, [] ),
						i = seed.length;

					// Match elements unmatched by `matcher`
					while ( i-- ) {
						if ( ( elem = unmatched[ i ] ) ) {
							seed[ i ] = !( matches[ i ] = elem );
						}
					}
				} ) :
				function( elem, _context, xml ) {
					input[ 0 ] = elem;
					matcher( input, null, xml, results );

					// Don't keep the element
					// (see https://github.com/jquery/sizzle/issues/299)
					input[ 0 ] = null;
					return !results.pop();
				};
		} ),

		has: markFunction( function( selector ) {
			return function( elem ) {
				return find( selector, elem ).length > 0;
			};
		} ),

		contains: markFunction( function( text ) {
			text = unescapeSelector( text );
			return function( elem ) {
				return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
			};
		} ),

		// "Whether an element is represented by a :lang() selector
		// is based solely on the element's language value
		// being equal to the identifier C,
		// or beginning with the identifier C immediately followed by "-".
		// The matching of C against the element's language value is performed case-insensitively.
		// The identifier C does not have to be a valid language name."
		// https://www.w3.org/TR/selectors/#lang-pseudo
		lang: markFunction( function( lang ) {

			// lang value must be a valid identifier
			if ( !ridentifier.test( lang || "" ) ) {
				selectorError( "unsupported lang: " + lang );
			}
			lang = unescapeSelector( lang ).toLowerCase();
			return function( elem ) {
				var elemLang;
				do {
					if ( ( elemLang = documentIsHTML ?
						elem.lang :
						elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {

						elemLang = elemLang.toLowerCase();
						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
					}
				} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
				return false;
			};
		} ),

		// Miscellaneous
		target: function( elem ) {
			var hash = window.location && window.location.hash;
			return hash && hash.slice( 1 ) === elem.id;
		},

		root: function( elem ) {
			return elem === documentElement;
		},

		focus: function( elem ) {
			return elem === document.activeElement &&
				document.hasFocus() &&
				!!( elem.type || elem.href || ~elem.tabIndex );
		},

		// Boolean properties
		enabled: createDisabledPseudo( false ),
		disabled: createDisabledPseudo( true ),

		checked: function( elem ) {

			// In CSS3, :checked should return both checked and selected elements
			// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			return ( nodeName( elem, "input" ) && !!elem.checked ) ||
				( nodeName( elem, "option" ) && !!elem.selected );
		},

		selected: function( elem ) {

			// Support: IE <=11+
			// Accessing the selectedIndex property
			// forces the browser to treat the default option as
			// selected when in an optgroup.
			if ( isIE && elem.parentNode ) {
				// eslint-disable-next-line no-unused-expressions
				elem.parentNode.selectedIndex;
			}

			return elem.selected === true;
		},

		// Contents
		empty: function( elem ) {

			// https://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;
				}
			}
			return true;
		},

		parent: function( elem ) {
			return !jQuery.expr.pseudos.empty( elem );
		},

		// Element/input types
		header: function( elem ) {
			return rheader.test( elem.nodeName );
		},

		input: function( elem ) {
			return rinputs.test( elem.nodeName );
		},

		button: function( elem ) {
			return nodeName( elem, "input" ) && elem.type === "button" ||
				nodeName( elem, "button" );
		},

		text: function( elem ) {
			return nodeName( elem, "input" ) && elem.type === "text";
		},

		// Position-in-collection
		first: createPositionalPseudo( function() {
			return [ 0 ];
		} ),

		last: createPositionalPseudo( function( _matchIndexes, length ) {
			return [ length - 1 ];
		} ),

		eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
			return [ argument < 0 ? argument + length : argument ];
		} ),

		even: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 0;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		odd: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 1;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i;

			if ( argument < 0 ) {
				i = argument + length;
			} else if ( argument > length ) {
				i = length;
			} else {
				i = argument;
			}

			for ( ; --i >= 0; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; ++i < length; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} )
	}
};

jQuery.expr.pseudos.nth = jQuery.expr.pseudos.eq;

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
	jQuery.expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
	jQuery.expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = jQuery.expr.pseudos;
jQuery.expr.setFilters = new setFilters();

function addCombinator( matcher, combinator, base ) {
	var dir = combinator.dir,
		skip = combinator.next,
		key = skip || dir,
		checkNonElements = base && key === "parentNode",
		doneName = done++;

	return combinator.first ?

		// Check against closest ancestor/preceding element
		function( elem, context, xml ) {
			while ( ( elem = elem[ dir ] ) ) {
				if ( elem.nodeType === 1 || checkNonElements ) {
					return matcher( elem, context, xml );
				}
			}
			return false;
		} :

		// Check against all ancestor/preceding elements
		function( elem, context, xml ) {
			var oldCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
			if ( xml ) {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ jQuery.expando ] || ( elem[ jQuery.expando ] = {} );

						if ( skip && nodeName( elem, skip ) ) {
							elem = elem[ dir ] || elem;
						} else if ( ( oldCache = outerCache[ key ] ) &&
							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {

							// Assign to newCache so results back-propagate to previous elements
							return ( newCache[ 2 ] = oldCache[ 2 ] );
						} else {

							// Reuse newcache so results back-propagate to previous elements
							outerCache[ key ] = newCache;

							// A match means we're done; a fail means we have to keep checking
							if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
								return true;
							}
						}
					}
				}
			}
			return false;
		};
}

function elementMatcher( matchers ) {
	return matchers.length > 1 ?
		function( elem, context, xml ) {
			var i = matchers.length;
			while ( i-- ) {
				if ( !matchers[ i ]( elem, context, xml ) ) {
					return false;
				}
			}
			return true;
		} :
		matchers[ 0 ];
}

function multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		find( selector, contexts[ i ], results );
	}
	return results;
}

function condense( unmatched, map, filter, context, xml ) {
	var elem,
		newUnmatched = [],
		i = 0,
		len = unmatched.length,
		mapped = map != null;

	for ( ; i < len; i++ ) {
		if ( ( elem = unmatched[ i ] ) ) {
			if ( !filter || filter( elem, context, xml ) ) {
				newUnmatched.push( elem );
				if ( mapped ) {
					map.push( i );
				}
			}
		}
	}

	return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
	if ( postFilter && !postFilter[ jQuery.expando ] ) {
		postFilter = setMatcher( postFilter );
	}
	if ( postFinder && !postFinder[ jQuery.expando ] ) {
		postFinder = setMatcher( postFinder, postSelector );
	}
	return markFunction( function( seed, results, context, xml ) {
		var temp, i, elem, matcherOut,
			preMap = [],
			postMap = [],
			preexisting = results.length,

			// Get initial elements from seed or context
			elems = seed ||
				multipleContexts( selector || "*",
					context.nodeType ? [ context ] : context, [] ),

			// Prefilter to get matcher input, preserving a map for seed-results synchronization
			matcherIn = preFilter && ( seed || !selector ) ?
				condense( elems, preMap, preFilter, context, xml ) :
				elems;

		if ( matcher ) {

			// If we have a postFinder, or filtered seed, or non-seed postFilter
			// or preexisting results,
			matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?

				// ...intermediate processing is necessary
				[] :

				// ...otherwise use results directly
				results;

			// Find primary matches
			matcher( matcherIn, matcherOut, context, xml );
		} else {
			matcherOut = matcherIn;
		}

		// Apply postFilter
		if ( postFilter ) {
			temp = condense( matcherOut, postMap );
			postFilter( temp, [], context, xml );

			// Un-match failing elements by moving them back to matcherIn
			i = temp.length;
			while ( i-- ) {
				if ( ( elem = temp[ i ] ) ) {
					matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
				}
			}
		}

		if ( seed ) {
			if ( postFinder || preFilter ) {
				if ( postFinder ) {

					// Get the final matcherOut by condensing this intermediate into postFinder contexts
					temp = [];
					i = matcherOut.length;
					while ( i-- ) {
						if ( ( elem = matcherOut[ i ] ) ) {

							// Restore matcherIn since elem is not yet a final match
							temp.push( ( matcherIn[ i ] = elem ) );
						}
					}
					postFinder( null, ( matcherOut = [] ), temp, xml );
				}

				// Move matched elements from seed to results to keep them synchronized
				i = matcherOut.length;
				while ( i-- ) {
					if ( ( elem = matcherOut[ i ] ) &&
						( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {

						seed[ temp ] = !( results[ temp ] = elem );
					}
				}
			}

		// Add elements to results, through postFinder if defined
		} else {
			matcherOut = condense(
				matcherOut === results ?
					matcherOut.splice( preexisting, matcherOut.length ) :
					matcherOut
			);
			if ( postFinder ) {
				postFinder( null, results, matcherOut, xml );
			} else {
				push.apply( results, matcherOut );
			}
		}
	} );
}

function matcherFromTokens( tokens ) {
	var checkContext, matcher, j,
		len = tokens.length,
		leadingRelative = jQuery.expr.relative[ tokens[ 0 ].type ],
		implicitRelative = leadingRelative || jQuery.expr.relative[ " " ],
		i = leadingRelative ? 1 : 0,

		// The foundational matcher ensures that elements are reachable from top-level context(s)
		matchContext = addCombinator( function( elem ) {
			return elem === checkContext;
		}, implicitRelative, true ),
		matchAnyContext = addCombinator( function( elem ) {
			return indexOf.call( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {

			// Support: IE 11+
			// IE sometimes throws a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
				( checkContext = context ).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );

			// Avoid hanging onto element
			// (see https://github.com/jquery/sizzle/issues/299)
			checkContext = null;
			return ret;
		} ];

	for ( ; i < len; i++ ) {
		if ( ( matcher = jQuery.expr.relative[ tokens[ i ].type ] ) ) {
			matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
		} else {
			matcher = jQuery.expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );

			// Return special upon seeing a positional matcher
			if ( matcher[ jQuery.expando ] ) {

				// Find the next relative operator (if any) for proper handling
				j = ++i;
				for ( ; j < len; j++ ) {
					if ( jQuery.expr.relative[ tokens[ j ].type ] ) {
						break;
					}
				}
				return setMatcher(
					i > 1 && elementMatcher( matchers ),
					i > 1 && toSelector(

						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
						tokens.slice( 0, i - 1 )
							.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
					).replace( rtrimCSS, "$1" ),
					matcher,
					i < j && matcherFromTokens( tokens.slice( i, j ) ),
					j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
					j < len && toSelector( tokens )
				);
			}
			matchers.push( matcher );
		}
	}

	return elementMatcher( matchers );
}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
	var bySet = setMatchers.length > 0,
		byElement = elementMatchers.length > 0,
		superMatcher = function( seed, context, xml, results, outermost ) {
			var elem, j, matcher,
				matchedCount = 0,
				i = "0",
				unmatched = seed && [],
				setMatched = [],
				contextBackup = outermostContext,

				// We must always have either seed elements or outermost context
				elems = seed || byElement && jQuery.expr.find.TAG( "*", outermost ),

				// Use integer dirruns iff this is the outermost matcher
				dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 );

			if ( outermost ) {

				// Support: IE 11+
				// IE sometimes throws a "Permission denied" error when strict-comparing
				// two documents; shallow comparisons work.
				// eslint-disable-next-line eqeqeq
				outermostContext = context == document || context || outermost;
			}

			// Add elements passing elementMatchers directly to results
			for ( ; ( elem = elems[ i ] ) != null; i++ ) {
				if ( byElement && elem ) {
					j = 0;

					// Support: IE 11+
					// IE sometimes throws a "Permission denied" error when strict-comparing
					// two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( !context && elem.ownerDocument != document ) {
						setDocument( elem );
						xml = !documentIsHTML;
					}
					while ( ( matcher = elementMatchers[ j++ ] ) ) {
						if ( matcher( elem, context || document, xml ) ) {
							push.call( results, elem );
							break;
						}
					}
					if ( outermost ) {
						dirruns = dirrunsUnique;
					}
				}

				// Track unmatched elements for set filters
				if ( bySet ) {

					// They will have gone through all possible matchers
					if ( ( elem = !matcher && elem ) ) {
						matchedCount--;
					}

					// Lengthen the array for every element, matched or not
					if ( seed ) {
						unmatched.push( elem );
					}
				}
			}

			// `i` is now the count of elements visited above, and adding it to `matchedCount`
			// makes the latter nonnegative.
			matchedCount += i;

			// Apply set filters to unmatched elements
			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
			// no element matchers and no seed.
			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
			// numerically zero.
			if ( bySet && i !== matchedCount ) {
				j = 0;
				while ( ( matcher = setMatchers[ j++ ] ) ) {
					matcher( unmatched, setMatched, context, xml );
				}

				if ( seed ) {

					// Reintegrate element matches to eliminate the need for sorting
					if ( matchedCount > 0 ) {
						while ( i-- ) {
							if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
								setMatched[ i ] = pop.call( results );
							}
						}
					}

					// Discard index placeholder values to get only actual matches
					setMatched = condense( setMatched );
				}

				// Add matches to results
				push.apply( results, setMatched );

				// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					jQuery.uniqueSort( results );
				}
			}

			// Override manipulation of globals by nested matchers
			if ( outermost ) {
				dirruns = dirrunsUnique;
				outermostContext = contextBackup;
			}

			return unmatched;
		};

	return bySet ?
		markFunction( superMatcher ) :
		superMatcher;
}

function compile( selector, match /* Internal Use Only */ ) {
	var i,
		setMatchers = [],
		elementMatchers = [],
		cached = compilerCache[ selector + " " ];

	if ( !cached ) {

		// Generate a function of recursive functions that can be used to check each element
		if ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[ i ] );
			if ( cached[ jQuery.expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache( selector,
			matcherFromGroupMatchers( elementMatchers, setMatchers ) );

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
}

/**
 * A low-level selection function that works with jQuery's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with jQuery selector compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
function select( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( ( selector = compiled.selector || selector ) );

	results = results || [];

	// Try to minimize operations if there is only one selector in the list and no seed
	// (the latter of which guarantees us context)
	if ( match.length === 1 ) {

		// Reduce context if the leading compound selector is an ID
		tokens = match[ 0 ] = match[ 0 ].slice( 0 );
		if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
				context.nodeType === 9 && documentIsHTML &&
				jQuery.expr.relative[ tokens[ 1 ].type ] ) {

			context = ( jQuery.expr.find.ID(
				unescapeSelector( token.matches[ 0 ] ),
				context
			) || [] )[ 0 ];
			if ( !context ) {
				return results;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			selector = selector.slice( tokens.shift().value.length );
		}

		// Fetch a seed set for right-to-left matching
		i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
		while ( i-- ) {
			token = tokens[ i ];

			// Abort if we hit a combinator
			if ( jQuery.expr.relative[ ( type = token.type ) ] ) {
				break;
			}
			if ( ( find = jQuery.expr.find[ type ] ) ) {

				// Search, expanding context for leading sibling combinators
				if ( ( seed = find(
					unescapeSelector( token.matches[ 0 ] ),
					rsibling.test( tokens[ 0 ].type ) &&
						testContext( context.parentNode ) || context
				) ) ) {

					// If seed is empty or no tokens remain, we can return early
					tokens.splice( i, 1 );
					selector = seed.length && toSelector( tokens );
					if ( !selector ) {
						push.apply( results, seed );
						return results;
					}

					break;
				}
			}
		}
	}

	// Compile and execute a filtering function if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
	);
	return results;
}

// Initialize against the default document
setDocument();

jQuery.find = find;

// These have always been private, but they used to be documented as part of
// Sizzle so let's maintain them for now for backwards compatibility purposes.
find.compile = compile;
find.select = select;
find.setDocument = setDocument;
find.tokenize = tokenize;

function dir( elem, dir, until ) {
	var matched = [],
		truncate = until !== undefined;

	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
		if ( elem.nodeType === 1 ) {
			if ( truncate && jQuery( elem ).is( until ) ) {
				break;
			}
			matched.push( elem );
		}
	}
	return matched;
}

function siblings( n, elem ) {
	var matched = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType === 1 && n !== elem ) {
			matched.push( n );
		}
	}

	return matched;
}

var rneedsContext = jQuery.expr.match.needsContext;

// rsingleTag matches a string consisting of a single HTML element with no attributes
// and captures the element's name
var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;

function isObviousHtml( input ) {
	return input[ 0 ] === "<" &&
		input[ input.length - 1 ] === ">" &&
		input.length >= 3;
}

// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
	if ( typeof qualifier === "function" ) {
		return jQuery.grep( elements, function( elem, i ) {
			return !!qualifier.call( elem, i, elem ) !== not;
		} );
	}

	// Single element
	if ( qualifier.nodeType ) {
		return jQuery.grep( elements, function( elem ) {
			return ( elem === qualifier ) !== not;
		} );
	}

	// Arraylike of elements (jQuery, arguments, Array)
	if ( typeof qualifier !== "string" ) {
		return jQuery.grep( elements, function( elem ) {
			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
		} );
	}

	// Filtered directly for both simple and complex selectors
	return jQuery.filter( qualifier, elements, not );
}

jQuery.filter = function( expr, elems, not ) {
	var elem = elems[ 0 ];

	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	if ( elems.length === 1 && elem.nodeType === 1 ) {
		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
	}

	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
		return elem.nodeType === 1;
	} ) );
};

jQuery.fn.extend( {
	find: function( selector ) {
		var i, ret,
			len = this.length,
			self = this;

		if ( typeof selector !== "string" ) {
			return this.pushStack( jQuery( selector ).filter( function() {
				for ( i = 0; i < len; i++ ) {
					if ( jQuery.contains( self[ i ], this ) ) {
						return true;
					}
				}
			} ) );
		}

		ret = this.pushStack( [] );

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
	},
	filter: function( selector ) {
		return this.pushStack( winnow( this, selector || [], false ) );
	},
	not: function( selector ) {
		return this.pushStack( winnow( this, selector || [], true ) );
	},
	is: function( selector ) {
		return !!winnow(
			this,

			// If this is a positional/relative selector, check membership in the returned set
			// so $("p:first").is("p:last") won't return true for a doc with two "p".
			typeof selector === "string" && rneedsContext.test( selector ) ?
				jQuery( selector ) :
				selector || [],
			false
		).length;
	}
} );

// Initialize a jQuery object

// A central reference to the root jQuery(document)
var rootjQuery,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
	// Strict HTML recognition (trac-11290: must start with <)
	// Shortcut simple #id case for speed
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

	init = jQuery.fn.init = function( selector, context ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// HANDLE: $(DOMElement)
		if ( selector.nodeType ) {
			this[ 0 ] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( typeof selector === "function" ) {
			return rootjQuery.ready !== undefined ?
				rootjQuery.ready( selector ) :

				// Execute immediately if ready is not present
				selector( jQuery );

		} else {

			// Handle obvious HTML strings
			match = selector + "";
			if ( isObviousHtml( match ) ) {

				// Assume that strings that start and end with <> are HTML and skip
				// the regex check. This also handles browser-supported HTML wrappers
				// like TrustedHTML.
				match = [ null, selector, null ];

			// Handle HTML strings or selectors
			} else if ( typeof selector === "string" ) {
				match = rquickExpr.exec( selector );
			} else {
				return jQuery.makeArray( selector, this );
			}

			// Match html or make sure no context is specified for #id
			// Note: match[1] may be a string or a TrustedHTML wrapper
			if ( match && ( match[ 1 ] || !context ) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[ 1 ] ) {
					context = context instanceof jQuery ? context[ 0 ] : context;

					// Option to run scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					jQuery.merge( this, jQuery.parseHTML(
						match[ 1 ],
						context && context.nodeType ? context.ownerDocument || context : document$1,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
						for ( match in context ) {

							// Properties of context are called as methods if possible
							if ( typeof this[ match ] === "function" ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document$1.getElementById( match[ 2 ] );

					if ( elem ) {

						// Inject the element directly into the jQuery object
						this[ 0 ] = elem;
						this.length = 1;
					}
					return this;
				}

			// HANDLE: $(expr) & $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || rootjQuery ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}
		}

	};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference
rootjQuery = jQuery( document$1 );

var rparentsprev = /^(?:parents|prev(?:Until|All))/,

	// Methods guaranteed to produce a unique set when starting from a unique set
	guaranteedUnique = {
		children: true,
		contents: true,
		next: true,
		prev: true
	};

jQuery.fn.extend( {
	has: function( target ) {
		var targets = jQuery( target, this ),
			l = targets.length;

		return this.filter( function() {
			var i = 0;
			for ( ; i < l; i++ ) {
				if ( jQuery.contains( this, targets[ i ] ) ) {
					return true;
				}
			}
		} );
	},

	closest: function( selectors, context ) {
		var cur,
			i = 0,
			l = this.length,
			matched = [],
			targets = typeof selectors !== "string" && jQuery( selectors );

		// Positional selectors never match, since there's no _selection_ context
		if ( !rneedsContext.test( selectors ) ) {
			for ( ; i < l; i++ ) {
				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {

					// Always skip document fragments
					if ( cur.nodeType < 11 && ( targets ?
						targets.index( cur ) > -1 :

						// Don't pass non-elements to jQuery#find
						cur.nodeType === 1 &&
							jQuery.find.matchesSelector( cur, selectors ) ) ) {

						matched.push( cur );
						break;
					}
				}
			}
		}

		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
	},

	// Determine the position of an element within the set
	index: function( elem ) {

		// No argument, return index in parent
		if ( !elem ) {
			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
		}

		// Index in selector
		if ( typeof elem === "string" ) {
			return indexOf.call( jQuery( elem ), this[ 0 ] );
		}

		// Locate the position of the desired element
		return indexOf.call( this,

			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[ 0 ] : elem
		);
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.uniqueSort(
				jQuery.merge( this.get(), jQuery( selector, context ) )
			)
		);
	},

	addBack: function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter( selector )
		);
	}
} );

function sibling( cur, dir ) {
	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
	return cur;
}

jQuery.each( {
	parent: function( elem ) {
		var parent = elem.parentNode;
		return parent && parent.nodeType !== 11 ? parent : null;
	},
	parents: function( elem ) {
		return dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, _i, until ) {
		return dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, _i, until ) {
		return dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, _i, until ) {
		return dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return siblings( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return siblings( elem.firstChild );
	},
	contents: function( elem ) {
		if ( elem.contentDocument != null &&

			// Support: IE 11+
			// <object> elements with no `data` attribute has an object
			// `contentDocument` with a `null` prototype.
			getProto( elem.contentDocument ) ) {

			return elem.contentDocument;
		}

		// Support: IE 9 - 11+
		// Treat the template element as a regular one in browsers that
		// don't support it.
		if ( nodeName( elem, "template" ) ) {
			elem = elem.content || elem;
		}

		return jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var matched = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			matched = jQuery.filter( selector, matched );
		}

		if ( this.length > 1 ) {

			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				jQuery.uniqueSort( matched );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				matched.reverse();
			}
		}

		return this.pushStack( matched );
	};
} );

// Matches dashed string for camelizing
var rdashAlpha = /-([a-z])/g;

// Used by camelCase as callback to replace()
function fcamelCase( _all, letter ) {
	return letter.toUpperCase();
}

// Convert dashed to camelCase
function camelCase( string ) {
	return string.replace( rdashAlpha, fcamelCase );
}

/**
 * Determines whether an object can have data
 */
function acceptData( owner ) {

	// Accepts only:
	//  - Node
	//    - Node.ELEMENT_NODE
	//    - Node.DOCUMENT_NODE
	//  - Object
	//    - Any
	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
}

function Data() {
	this.expando = jQuery.expando + Data.uid++;
}

Data.uid = 1;

Data.prototype = {

	cache: function( owner ) {

		// Check if the owner object already has a cache
		var value = owner[ this.expando ];

		// If not, create one
		if ( !value ) {
			value = Object.create( null );

			// We can accept data for non-element nodes in modern browsers,
			// but we should not, see trac-8335.
			// Always return an empty object.
			if ( acceptData( owner ) ) {

				// If it is a node unlikely to be stringify-ed or looped over
				// use plain assignment
				if ( owner.nodeType ) {
					owner[ this.expando ] = value;

				// Otherwise secure it in a non-enumerable property
				// configurable must be true to allow the property to be
				// deleted when data is removed
				} else {
					Object.defineProperty( owner, this.expando, {
						value: value,
						configurable: true
					} );
				}
			}
		}

		return value;
	},
	set: function( owner, data, value ) {
		var prop,
			cache = this.cache( owner );

		// Handle: [ owner, key, value ] args
		// Always use camelCase key (gh-2257)
		if ( typeof data === "string" ) {
			cache[ camelCase( data ) ] = value;

		// Handle: [ owner, { properties } ] args
		} else {

			// Copy the properties one-by-one to the cache object
			for ( prop in data ) {
				cache[ camelCase( prop ) ] = data[ prop ];
			}
		}
		return value;
	},
	get: function( owner, key ) {
		return key === undefined ?
			this.cache( owner ) :

			// Always use camelCase key (gh-2257)
			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
	},
	access: function( owner, key, value ) {

		// In cases where either:
		//
		//   1. No key was specified
		//   2. A string key was specified, but no value provided
		//
		// Take the "read" path and allow the get method to determine
		// which value to return, respectively either:
		//
		//   1. The entire cache object
		//   2. The data stored at the key
		//
		if ( key === undefined ||
				( ( key && typeof key === "string" ) && value === undefined ) ) {

			return this.get( owner, key );
		}

		// When the key is not a string, or both a key and value
		// are specified, set or extend (existing objects) with either:
		//
		//   1. An object of properties
		//   2. A key and value
		//
		this.set( owner, key, value );

		// Since the "set" path can have two possible entry points
		// return the expected data based on which path was taken[*]
		return value !== undefined ? value : key;
	},
	remove: function( owner, key ) {
		var i,
			cache = owner[ this.expando ];

		if ( cache === undefined ) {
			return;
		}

		if ( key !== undefined ) {

			// Support array or space separated string of keys
			if ( Array.isArray( key ) ) {

				// If key is an array of keys...
				// We always set camelCase keys, so remove that.
				key = key.map( camelCase );
			} else {
				key = camelCase( key );

				// If a key with the spaces exists, use it.
				// Otherwise, create an array by matching non-whitespace
				key = key in cache ?
					[ key ] :
					( key.match( rnothtmlwhite ) || [] );
			}

			i = key.length;

			while ( i-- ) {
				delete cache[ key[ i ] ];
			}
		}

		// Remove the expando if there's no more data
		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {

			// Support: Chrome <=35 - 45+
			// Webkit & Blink performance suffers when deleting properties
			// from DOM nodes, so set to undefined instead
			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
			if ( owner.nodeType ) {
				owner[ this.expando ] = undefined;
			} else {
				delete owner[ this.expando ];
			}
		}
	},
	hasData: function( owner ) {
		var cache = owner[ this.expando ];
		return cache !== undefined && !jQuery.isEmptyObject( cache );
	}
};

var dataPriv = new Data();

var dataUser = new Data();

//	Implementation Summary
//
//	1. Enforce API surface and semantic compatibility with 1.9.x branch
//	2. Improve the module's maintainability by reducing the storage
//		paths to a single mechanism.
//	3. Use the same single mechanism to support "private" and "user" data.
//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
//	5. Avoid exposing implementation details on user objects (eg. expando properties)
//	6. Provide a clear path for implementation upgrade to WeakMap in 2014

var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /[A-Z]/g;

function getData( data ) {
	if ( data === "true" ) {
		return true;
	}

	if ( data === "false" ) {
		return false;
	}

	if ( data === "null" ) {
		return null;
	}

	// Only convert to a number if it doesn't change the string
	if ( data === +data + "" ) {
		return +data;
	}

	if ( rbrace.test( data ) ) {
		return JSON.parse( data );
	}

	return data;
}

function dataAttr( elem, key, data ) {
	var name;

	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {
		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
		data = elem.getAttribute( name );

		if ( typeof data === "string" ) {
			try {
				data = getData( data );
			} catch ( e ) {}

			// Make sure we set the data so it isn't changed later
			dataUser.set( elem, key, data );
		} else {
			data = undefined;
		}
	}
	return data;
}

jQuery.extend( {
	hasData: function( elem ) {
		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
	},

	data: function( elem, name, data ) {
		return dataUser.access( elem, name, data );
	},

	removeData: function( elem, name ) {
		dataUser.remove( elem, name );
	},

	// TODO: Now that all calls to _data and _removeData have been replaced
	// with direct calls to dataPriv methods, these can be deprecated.
	_data: function( elem, name, data ) {
		return dataPriv.access( elem, name, data );
	},

	_removeData: function( elem, name ) {
		dataPriv.remove( elem, name );
	}
} );

jQuery.fn.extend( {
	data: function( key, value ) {
		var i, name, data,
			elem = this[ 0 ],
			attrs = elem && elem.attributes;

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = dataUser.get( elem );

				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE 11+
						// The attrs elements can be null (trac-14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = camelCase( name.slice( 5 ) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					dataPriv.set( elem, "hasDataAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each( function() {
				dataUser.set( this, key );
			} );
		}

		return access( this, function( value ) {
			var data;

			// The calling jQuery object (element matches) is not empty
			// (and therefore has an element appears at this[ 0 ]) and the
			// `value` parameter was not undefined. An empty jQuery object
			// will result in `undefined` for elem = this[ 0 ] which will
			// throw an exception if an attempt to read a data cache is made.
			if ( elem && value === undefined ) {

				// Attempt to get data from the cache
				// The key will always be camelCased in Data
				data = dataUser.get( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to "discover" the data in
				// HTML5 custom data-* attrs
				data = dataAttr( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// We tried really hard, but the data doesn't exist.
				return;
			}

			// Set the data...
			this.each( function() {

				// We always store the camelCased key
				dataUser.set( this, key, value );
			} );
		}, null, value, arguments.length > 1, null, true );
	},

	removeData: function( key ) {
		return this.each( function() {
			dataUser.remove( this, key );
		} );
	}
} );

var rfocusable = /^(?:input|select|textarea|button)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		return this.each( function() {
			delete this[ jQuery.propFix[ name ] || name ];
		} );
	}
} );

jQuery.extend( {
	prop: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set properties on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {

			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			return ( elem[ name ] = value );
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		return elem[ name ];
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {

				// Support: IE <=9 - 11+
				// elem.tabIndex doesn't always return the
				// correct value when it hasn't been explicitly set
				// Use proper attribute retrieval (trac-12072)
				var tabindex = elem.getAttribute( "tabindex" );

				if ( tabindex ) {
					return parseInt( tabindex, 10 );
				}

				if (
					rfocusable.test( elem.nodeName ) ||

					// href-less anchor's `tabIndex` property value is `0` and
					// the `tabindex` attribute value: `null`. We want `-1`.
					rclickable.test( elem.nodeName ) && elem.href
				) {
					return 0;
				}

				return -1;
			}
		}
	},

	propFix: {
		"for": "htmlFor",
		"class": "className"
	}
} );

// Support: IE <=11+
// Accessing the selectedIndex property forces the browser to respect
// setting selected on the option. The getter ensures a default option
// is selected when in an optgroup. ESLint rule "no-unused-expressions"
// is disabled for this code since it considers such accessions noop.
if ( isIE ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {

			var parent = elem.parentNode;
			if ( parent && parent.parentNode ) {
				// eslint-disable-next-line no-unused-expressions
				parent.parentNode.selectedIndex;
			}
			return null;
		},
		set: function( elem ) {


			var parent = elem.parentNode;
			if ( parent ) {
				// eslint-disable-next-line no-unused-expressions
				parent.selectedIndex;

				if ( parent.parentNode ) {
					// eslint-disable-next-line no-unused-expressions
					parent.parentNode.selectedIndex;
				}
			}
		}
	};
}

jQuery.each( [
	"tabIndex",
	"readOnly",
	"maxLength",
	"cellSpacing",
	"cellPadding",
	"rowSpan",
	"colSpan",
	"useMap",
	"frameBorder",
	"contentEditable"
], function() {
	jQuery.propFix[ this.toLowerCase() ] = this;
} );

// Strip and collapse whitespace according to HTML spec
// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
function stripAndCollapse( value ) {
	var tokens = value.match( rnothtmlwhite ) || [];
	return tokens.join( " " );
}

function getClass( elem ) {
	return elem.getAttribute && elem.getAttribute( "class" ) || "";
}

function classesToArray( value ) {
	if ( Array.isArray( value ) ) {
		return value;
	}
	if ( typeof value === "string" ) {
		return value.match( rnothtmlwhite ) || [];
	}
	return [];
}

jQuery.fn.extend( {
	addClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( typeof value === "function" ) {
			return this.each( function( j ) {
				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];
						if ( cur.indexOf( " " + className + " " ) < 0 ) {
							cur += className + " ";
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	removeClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( typeof value === "function" ) {
			return this.each( function( j ) {
				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( !arguments.length ) {
			return this.attr( "class", "" );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );

				// This expression is here for better compressibility (see addClass)
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];

						// Remove *all* instances
						while ( cur.indexOf( " " + className + " " ) > -1 ) {
							cur = cur.replace( " " + className + " ", " " );
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	toggleClass: function( value, stateVal ) {
		var classNames, className, i, self;

		if ( typeof value === "function" ) {
			return this.each( function( i ) {
				jQuery( this ).toggleClass(
					value.call( this, i, getClass( this ), stateVal ),
					stateVal
				);
			} );
		}

		if ( typeof stateVal === "boolean" ) {
			return stateVal ? this.addClass( value ) : this.removeClass( value );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {

				// Toggle individual class names
				self = jQuery( this );

				for ( i = 0; i < classNames.length; i++ ) {
					className = classNames[ i ];

					// Check each className given, space separated list
					if ( self.hasClass( className ) ) {
						self.removeClass( className );
					} else {
						self.addClass( className );
					}
				}
			} );
		}

		return this;
	},

	hasClass: function( selector ) {
		var className, elem,
			i = 0;

		className = " " + selector + " ";
		while ( ( elem = this[ i++ ] ) ) {
			if ( elem.nodeType === 1 &&
				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
				return true;
			}
		}

		return false;
	}
} );

jQuery.fn.extend( {
	val: function( value ) {
		var hooks, ret, valueIsFunction,
			elem = this[ 0 ];

		if ( !arguments.length ) {
			if ( elem ) {
				hooks = jQuery.valHooks[ elem.type ] ||
					jQuery.valHooks[ elem.nodeName.toLowerCase() ];

				if ( hooks &&
					"get" in hooks &&
					( ret = hooks.get( elem, "value" ) ) !== undefined
				) {
					return ret;
				}

				ret = elem.value;

				// Handle cases where value is null/undef or number
				return ret == null ? "" : ret;
			}

			return;
		}

		valueIsFunction = typeof value === "function";

		return this.each( function( i ) {
			var val;

			if ( this.nodeType !== 1 ) {
				return;
			}

			if ( valueIsFunction ) {
				val = value.call( this, i, jQuery( this ).val() );
			} else {
				val = value;
			}

			// Treat null/undefined as ""; convert numbers to string
			if ( val == null ) {
				val = "";

			} else if ( typeof val === "number" ) {
				val += "";

			} else if ( Array.isArray( val ) ) {
				val = jQuery.map( val, function( value ) {
					return value == null ? "" : value + "";
				} );
			}

			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];

			// If set returns undefined, fall back to normal setting
			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
				this.value = val;
			}
		} );
	}
} );

jQuery.extend( {
	valHooks: {
		select: {
			get: function( elem ) {
				var value, option, i,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one",
					values = one ? null : [],
					max = one ? index + 1 : options.length;

				if ( index < 0 ) {
					i = max;

				} else {
					i = one ? index : 0;
				}

				// Loop through all the selected options
				for ( ; i < max; i++ ) {
					option = options[ i ];

					if ( option.selected &&

							// Don't return options that are disabled or in a disabled optgroup
							!option.disabled &&
							( !option.parentNode.disabled ||
								!nodeName( option.parentNode, "optgroup" ) ) ) {

						// Get the specific value for the option
						value = jQuery( option ).val();

						// We don't need an array for one selects
						if ( one ) {
							return value;
						}

						// Multi-Selects return an array
						values.push( value );
					}
				}

				return values;
			},

			set: function( elem, value ) {
				var optionSet, option,
					options = elem.options,
					values = jQuery.makeArray( value ),
					i = options.length;

				while ( i-- ) {
					option = options[ i ];

					if ( ( option.selected =
						jQuery.inArray( jQuery( option ).val(), values ) > -1
					) ) {
						optionSet = true;
					}
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}
				return values;
			}
		}
	}
} );

if ( isIE ) {
	jQuery.valHooks.option = {
		get: function( elem ) {

			var val = elem.getAttribute( "value" );
			return val != null ?
				val :

				// Support: IE <=10 - 11+
				// option.text throws exceptions (trac-14686, trac-14858)
				// Strip and collapse whitespace
				// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
				stripAndCollapse( jQuery.text( elem ) );
		}
	};
}

// Radios and checkboxes getter/setter
jQuery.each( [ "radio", "checkbox" ], function() {
	jQuery.valHooks[ this ] = {
		set: function( elem, value ) {
			if ( Array.isArray( value ) ) {
				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
			}
		}
	};
} );

var rcheckableType = /^(?:checkbox|radio)$/i;

var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

function on( elem, types, selector, data, fn, one ) {
	var origFn, type;

	// Types can be a map of types/handlers
	if ( typeof types === "object" ) {

		// ( types-Object, selector, data )
		if ( typeof selector !== "string" ) {

			// ( types-Object, data )
			data = data || selector;
			selector = undefined;
		}
		for ( type in types ) {
			on( elem, type, selector, data, types[ type ], one );
		}
		return elem;
	}

	if ( data == null && fn == null ) {

		// ( types, fn )
		fn = selector;
		data = selector = undefined;
	} else if ( fn == null ) {
		if ( typeof selector === "string" ) {

			// ( types, selector, fn )
			fn = data;
			data = undefined;
		} else {

			// ( types, data, fn )
			fn = data;
			data = selector;
			selector = undefined;
		}
	}
	if ( fn === false ) {
		fn = returnFalse;
	} else if ( !fn ) {
		return elem;
	}

	if ( one === 1 ) {
		origFn = fn;
		fn = function( event ) {

			// Can use an empty set, since event contains the info
			jQuery().off( event );
			return origFn.apply( this, arguments );
		};

		// Use same guid so caller can remove using origFn
		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
	}
	return elem.each( function() {
		jQuery.event.add( this, types, fn, data, selector );
	} );
}

/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
jQuery.event = {

	add: function( elem, types, handler, data, selector ) {

		var handleObjIn, eventHandle, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.get( elem );

		// Only attach events to objects that accept data
		if ( !acceptData( elem ) ) {
			return;
		}

		// Caller can pass in an object of custom data in lieu of the handler
		if ( handler.handler ) {
			handleObjIn = handler;
			handler = handleObjIn.handler;
			selector = handleObjIn.selector;
		}

		// Ensure that invalid selectors throw exceptions at attach time
		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
		if ( selector ) {
			jQuery.find.matchesSelector( documentElement$1, selector );
		}

		// Make sure that the handler has a unique ID, used to find/remove it later
		if ( !handler.guid ) {
			handler.guid = jQuery.guid++;
		}

		// Init the element's event structure and main handler, if this is the first
		if ( !( events = elemData.events ) ) {
			events = elemData.events = Object.create( null );
		}
		if ( !( eventHandle = elemData.handle ) ) {
			eventHandle = elemData.handle = function( e ) {

				// Discard the second event of a jQuery.event.trigger() and
				// when an event is called after a page has unloaded
				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
			};
		}

		// Handle multiple events separated by a space
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// There *must* be a type, no attaching namespace-only handlers
			if ( !type ) {
				continue;
			}

			// If event changes its type, use the special event handlers for the changed type
			special = jQuery.event.special[ type ] || {};

			// If selector defined, determine special event api type, otherwise given type
			type = ( selector ? special.delegateType : special.bindType ) || type;

			// Update special based on newly reset type
			special = jQuery.event.special[ type ] || {};

			// handleObj is passed to all event handlers
			handleObj = jQuery.extend( {
				type: type,
				origType: origType,
				data: data,
				handler: handler,
				guid: handler.guid,
				selector: selector,
				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
				namespace: namespaces.join( "." )
			}, handleObjIn );

			// Init the event handler queue if we're the first
			if ( !( handlers = events[ type ] ) ) {
				handlers = events[ type ] = [];
				handlers.delegateCount = 0;

				// Only use addEventListener if the special events handler returns false
				if ( !special.setup ||
					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {

					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle );
					}
				}
			}

			if ( special.add ) {
				special.add.call( elem, handleObj );

				if ( !handleObj.handler.guid ) {
					handleObj.handler.guid = handler.guid;
				}
			}

			// Add to the element's handler list, delegates in front
			if ( selector ) {
				handlers.splice( handlers.delegateCount++, 0, handleObj );
			} else {
				handlers.push( handleObj );
			}
		}

	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {

		var j, origCount, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );

		if ( !elemData || !( events = elemData.events ) ) {
			return;
		}

		// Once for each type.namespace in types; type may be omitted
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// Unbind all events (on this namespace, if provided) for the element
			if ( !type ) {
				for ( type in events ) {
					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
				}
				continue;
			}

			special = jQuery.event.special[ type ] || {};
			type = ( selector ? special.delegateType : special.bindType ) || type;
			handlers = events[ type ] || [];
			tmp = tmp[ 2 ] &&
				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );

			// Remove matching events
			origCount = j = handlers.length;
			while ( j-- ) {
				handleObj = handlers[ j ];

				if ( ( mappedTypes || origType === handleObj.origType ) &&
					( !handler || handler.guid === handleObj.guid ) &&
					( !tmp || tmp.test( handleObj.namespace ) ) &&
					( !selector || selector === handleObj.selector ||
						selector === "**" && handleObj.selector ) ) {
					handlers.splice( j, 1 );

					if ( handleObj.selector ) {
						handlers.delegateCount--;
					}
					if ( special.remove ) {
						special.remove.call( elem, handleObj );
					}
				}
			}

			// Remove generic event handler if we removed something and no more handlers exist
			// (avoids potential for endless recursion during removal of special event handlers)
			if ( origCount && !handlers.length ) {
				if ( !special.teardown ||
					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {

					jQuery.removeEvent( elem, type, elemData.handle );
				}

				delete events[ type ];
			}
		}

		// Remove data and the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			dataPriv.remove( elem, "handle events" );
		}
	},

	dispatch: function( nativeEvent ) {

		var i, j, ret, matched, handleObj, handlerQueue,
			args = new Array( arguments.length ),

			// Make a writable jQuery.Event from the native event object
			event = jQuery.event.fix( nativeEvent ),

			handlers = (
				dataPriv.get( this, "events" ) || Object.create( null )
			)[ event.type ] || [],
			special = jQuery.event.special[ event.type ] || {};

		// Use the fix-ed jQuery.Event rather than the (read-only) native event
		args[ 0 ] = event;

		for ( i = 1; i < arguments.length; i++ ) {
			args[ i ] = arguments[ i ];
		}

		event.delegateTarget = this;

		// Call the preDispatch hook for the mapped type, and let it bail if desired
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
			return;
		}

		// Determine handlers
		handlerQueue = jQuery.event.handlers.call( this, event, handlers );

		// Run delegates first; they may want to stop propagation beneath us
		i = 0;
		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
			event.currentTarget = matched.elem;

			j = 0;
			while ( ( handleObj = matched.handlers[ j++ ] ) &&
				!event.isImmediatePropagationStopped() ) {

				// If the event is namespaced, then each handler is only invoked if it is
				// specially universal or its namespaces are a superset of the event's.
				if ( !event.rnamespace || handleObj.namespace === false ||
					event.rnamespace.test( handleObj.namespace ) ) {

					event.handleObj = handleObj;
					event.data = handleObj.data;

					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
						handleObj.handler ).apply( matched.elem, args );

					if ( ret !== undefined ) {
						if ( ( event.result = ret ) === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}
				}
			}
		}

		// Call the postDispatch hook for the mapped type
		if ( special.postDispatch ) {
			special.postDispatch.call( this, event );
		}

		return event.result;
	},

	handlers: function( event, handlers ) {
		var i, handleObj, sel, matchedHandlers, matchedSelectors,
			handlerQueue = [],
			delegateCount = handlers.delegateCount,
			cur = event.target;

		// Find delegate handlers
		if ( delegateCount &&

			// Support: Firefox <=42 - 66+
			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
			// Support: IE 11+
			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
			!( event.type === "click" && event.button >= 1 ) ) {

			for ( ; cur !== this; cur = cur.parentNode || this ) {

				// Don't check non-elements (trac-13208)
				// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
					matchedHandlers = [];
					matchedSelectors = {};
					for ( i = 0; i < delegateCount; i++ ) {
						handleObj = handlers[ i ];

						// Don't conflict with Object.prototype properties (trac-13203)
						sel = handleObj.selector + " ";

						if ( matchedSelectors[ sel ] === undefined ) {
							matchedSelectors[ sel ] = handleObj.needsContext ?
								jQuery( sel, this ).index( cur ) > -1 :
								jQuery.find( sel, this, null, [ cur ] ).length;
						}
						if ( matchedSelectors[ sel ] ) {
							matchedHandlers.push( handleObj );
						}
					}
					if ( matchedHandlers.length ) {
						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
					}
				}
			}
		}

		// Add the remaining (directly-bound) handlers
		cur = this;
		if ( delegateCount < handlers.length ) {
			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
		}

		return handlerQueue;
	},

	addProp: function( name, hook ) {
		Object.defineProperty( jQuery.Event.prototype, name, {
			enumerable: true,
			configurable: true,

			get: typeof hook === "function" ?
				function() {
					if ( this.originalEvent ) {
						return hook( this.originalEvent );
					}
				} :
				function() {
					if ( this.originalEvent ) {
						return this.originalEvent[ name ];
					}
				},

			set: function( value ) {
				Object.defineProperty( this, name, {
					enumerable: true,
					configurable: true,
					writable: true,
					value: value
				} );
			}
		} );
	},

	fix: function( originalEvent ) {
		return originalEvent[ jQuery.expando ] ?
			originalEvent :
			new jQuery.Event( originalEvent );
	},

	special: jQuery.extend( Object.create( null ), {
		load: {

			// Prevent triggered image.load events from bubbling to window.load
			noBubble: true
		},
		click: {

			// Utilize native event to ensure correct state for checkable inputs
			setup: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Claim the first handler
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					// dataPriv.set( el, "click", ... )
					leverageNative( el, "click", true );
				}

				// Return false to allow normal processing in the caller
				return false;
			},
			trigger: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Force setup before triggering a click
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					leverageNative( el, "click" );
				}

				// Return non-false to allow normal event-path propagation
				return true;
			},

			// For cross-browser consistency, suppress native .click() on links
			// Also prevent it if we're currently inside a leveraged native-event stack
			_default: function( event ) {
				var target = event.target;
				return rcheckableType.test( target.type ) &&
					target.click && nodeName( target, "input" ) &&
					dataPriv.get( target, "click" ) ||
					nodeName( target, "a" );
			}
		},

		beforeunload: {
			postDispatch: function( event ) {
				if ( event.result !== undefined ) {

					// Setting `event.originalEvent.returnValue` in modern
					// browsers does the same as just calling `preventDefault()`,
					// the browsers ignore the value anyway.
					// Incidentally, IE 11 is the only browser from our supported
					// ones which respects the value returned from a `beforeunload`
					// handler attached by `addEventListener`; other browsers do
					// so only for inline handlers, so not setting the value
					// directly shouldn't reduce any functionality.
					event.preventDefault();
				}
			}
		}
	} )
};

// Ensure the presence of an event listener that handles manually-triggered
// synthetic events by interrupting progress until reinvoked in response to
// *native* events that it fires directly, ensuring that state changes have
// already occurred before other listeners are invoked.
function leverageNative( el, type, isSetup ) {

	// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
	if ( !isSetup ) {
		if ( dataPriv.get( el, type ) === undefined ) {
			jQuery.event.add( el, type, returnTrue );
		}
		return;
	}

	// Register the controller as a special universal handler for all event namespaces
	dataPriv.set( el, type, false );
	jQuery.event.add( el, type, {
		namespace: false,
		handler: function( event ) {
			var result,
				saved = dataPriv.get( this, type );

			// This controller function is invoked under multiple circumstances,
			// differentiated by the stored value in `saved`:
			// 1. For an outer synthetic `.trigger()`ed event (detected by
			//    `event.isTrigger & 1` and non-array `saved`), it records arguments
			//    as an array and fires an [inner] native event to prompt state
			//    changes that should be observed by registered listeners (such as
			//    checkbox toggling and focus updating), then clears the stored value.
			// 2. For an [inner] native event (detected by `saved` being
			//    an array), it triggers an inner synthetic event, records the
			//    result, and preempts propagation to further jQuery listeners.
			// 3. For an inner synthetic event (detected by `event.isTrigger & 1` and
			//    array `saved`), it prevents double-propagation of surrogate events
			//    but otherwise allows everything to proceed (particularly including
			//    further listeners).
			// Possible `saved` data shapes: `[...], `{ value }`, `false`.
			if ( ( event.isTrigger & 1 ) && this[ type ] ) {

				// Interrupt processing of the outer synthetic .trigger()ed event
				if ( !saved.length ) {

					// Store arguments for use when handling the inner native event
					// There will always be at least one argument (an event object),
					// so this array will not be confused with a leftover capture object.
					saved = slice.call( arguments );
					dataPriv.set( this, type, saved );

					// Trigger the native event and capture its result
					this[ type ]();
					result = dataPriv.get( this, type );
					dataPriv.set( this, type, false );

					if ( saved !== result ) {

						// Cancel the outer synthetic event
						event.stopImmediatePropagation();
						event.preventDefault();

						// Support: Chrome 86+
						// In Chrome, if an element having a focusout handler is
						// blurred by clicking outside of it, it invokes the handler
						// synchronously. If that handler calls `.remove()` on
						// the element, the data is cleared, leaving `result`
						// undefined. We need to guard against this.
						return result && result.value;
					}

				// If this is an inner synthetic event for an event with a bubbling
				// surrogate (focus or blur), assume that the surrogate already
				// propagated from triggering the native event and prevent that
				// from happening again here.
				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
					event.stopPropagation();
				}

			// If this is a native event triggered above, everything is now in order.
			// Fire an inner synthetic event with the original arguments.
			} else if ( saved.length ) {

				// ...and capture the result
				dataPriv.set( this, type, {
					value: jQuery.event.trigger(
						saved[ 0 ],
						saved.slice( 1 ),
						this
					)
				} );

				// Abort handling of the native event by all jQuery handlers while allowing
				// native handlers on the same element to run. On target, this is achieved
				// by stopping immediate propagation just on the jQuery event. However,
				// the native event is re-wrapped by a jQuery one on each level of the
				// propagation so the only way to stop it for jQuery is to stop it for
				// everyone via native `stopPropagation()`. This is not a problem for
				// focus/blur which don't bubble, but it does also stop click on checkboxes
				// and radios. We accept this limitation.
				event.stopPropagation();
				event.isImmediatePropagationStopped = returnTrue;
			}
		}
	} );
}

jQuery.removeEvent = function( elem, type, handle ) {

	// This "if" is needed for plain objects
	if ( elem.removeEventListener ) {
		elem.removeEventListener( type, handle );
	}
};

jQuery.Event = function( src, props ) {

	// Allow instantiation without the 'new' keyword
	if ( !( this instanceof jQuery.Event ) ) {
		return new jQuery.Event( src, props );
	}

	// Event object
	if ( src && src.type ) {
		this.originalEvent = src;
		this.type = src.type;

		// Events bubbling up the document may have been marked as prevented
		// by a handler lower down the tree; reflect the correct value.
		this.isDefaultPrevented = src.defaultPrevented ?
			returnTrue :
			returnFalse;

		// Create target properties
		this.target = src.target;
		this.currentTarget = src.currentTarget;
		this.relatedTarget = src.relatedTarget;

	// Event type
	} else {
		this.type = src;
	}

	// Put explicitly provided properties onto the event object
	if ( props ) {
		jQuery.extend( this, props );
	}

	// Create a timestamp if incoming event doesn't have one
	this.timeStamp = src && src.timeStamp || Date.now();

	// Mark it as fixed
	this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	constructor: jQuery.Event,
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,
	isSimulated: false,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;

		if ( e && !this.isSimulated ) {
			e.preventDefault();
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopPropagation();
		}
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
	altKey: true,
	bubbles: true,
	cancelable: true,
	changedTouches: true,
	ctrlKey: true,
	detail: true,
	eventPhase: true,
	metaKey: true,
	pageX: true,
	pageY: true,
	shiftKey: true,
	view: true,
	"char": true,
	code: true,
	charCode: true,
	key: true,
	keyCode: true,
	button: true,
	buttons: true,
	clientX: true,
	clientY: true,
	offsetX: true,
	offsetY: true,
	pointerId: true,
	pointerType: true,
	screenX: true,
	screenY: true,
	targetTouches: true,
	toElement: true,
	touches: true,
	which: true
}, jQuery.event.addProp );

jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {

	// Support: IE 11+
	// Attach a single focusin/focusout handler on the document while someone wants focus/blur.
	// This is because the former are synchronous in IE while the latter are async. In other
	// browsers, all those handlers are invoked synchronously.
	function focusMappedHandler( nativeEvent ) {

		// `eventHandle` would already wrap the event, but we need to change the `type` here.
		var event = jQuery.event.fix( nativeEvent );
		event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
		event.isSimulated = true;

		// focus/blur don't bubble while focusin/focusout do; simulate the former by only
		// invoking the handler at the lower level.
		if ( event.target === event.currentTarget ) {

			// The setup part calls `leverageNative`, which, in turn, calls
			// `jQuery.event.add`, so event handle will already have been set
			// by this point.
			dataPriv.get( this, "handle" )( event );
		}
	}

	jQuery.event.special[ type ] = {

		// Utilize native event if possible so blur/focus sequence is correct
		setup: function() {

			// Claim the first handler
			// dataPriv.set( this, "focus", ... )
			// dataPriv.set( this, "blur", ... )
			leverageNative( this, type, true );

			if ( isIE ) {
				this.addEventListener( delegateType, focusMappedHandler );
			} else {

				// Return false to allow normal processing in the caller
				return false;
			}
		},
		trigger: function() {

			// Force setup before trigger
			leverageNative( this, type );

			// Return non-false to allow normal event-path propagation
			return true;
		},

		teardown: function() {
			if ( isIE ) {
				this.removeEventListener( delegateType, focusMappedHandler );
			} else {

				// Return false to indicate standard teardown should be applied
				return false;
			}
		},

		// Suppress native focus or blur if we're currently inside
		// a leveraged native-event stack
		_default: function( event ) {
			return dataPriv.get( event.target, type );
		},

		delegateType: delegateType
	};
} );

// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
jQuery.each( {
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, function( orig, fix ) {
	jQuery.event.special[ orig ] = {
		delegateType: fix,
		bindType: fix,

		handle: function( event ) {
			var ret,
				target = this,
				related = event.relatedTarget,
				handleObj = event.handleObj;

			// For mouseenter/leave call the handler if related is outside the target.
			// NB: No relatedTarget if the mouse left/entered the browser window
			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
				event.type = handleObj.origType;
				ret = handleObj.handler.apply( this, arguments );
				event.type = fix;
			}
			return ret;
		}
	};
} );

jQuery.fn.extend( {

	on: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn );
	},
	one: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn, 1 );
	},
	off: function( types, selector, fn ) {
		var handleObj, type;
		if ( types && types.preventDefault && types.handleObj ) {

			// ( event )  dispatched jQuery.Event
			handleObj = types.handleObj;
			jQuery( types.delegateTarget ).off(
				handleObj.namespace ?
					handleObj.origType + "." + handleObj.namespace :
					handleObj.origType,
				handleObj.selector,
				handleObj.handler
			);
			return this;
		}
		if ( typeof types === "object" ) {

			// ( types-object [, selector] )
			for ( type in types ) {
				this.off( type, selector, types[ type ] );
			}
			return this;
		}
		if ( selector === false || typeof selector === "function" ) {

			// ( types [, fn] )
			fn = selector;
			selector = undefined;
		}
		if ( fn === false ) {
			fn = returnFalse;
		}
		return this.each( function() {
			jQuery.event.remove( this, types, fn, selector );
		} );
	}
} );

var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	stopPropagationCallback = function( e ) {
		e.stopPropagation();
	};

jQuery.extend( jQuery.event, {

	trigger: function( event, data, elem, onlyHandlers ) {

		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
			eventPath = [ elem || document$1 ],
			type = hasOwn.call( event, "type" ) ? event.type : event,
			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];

		cur = lastElement = tmp = elem = elem || document$1;

		// Don't do events on text and comment nodes
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
			return;
		}

		// focus/blur morphs to focusin/out; ensure we're not firing them right now
		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
			return;
		}

		if ( type.indexOf( "." ) > -1 ) {

			// Namespaced trigger; create a regexp to match event type in handle()
			namespaces = type.split( "." );
			type = namespaces.shift();
			namespaces.sort();
		}
		ontype = type.indexOf( ":" ) < 0 && "on" + type;

		// Caller can pass in a jQuery.Event object, Object, or just an event type string
		event = event[ jQuery.expando ] ?
			event :
			new jQuery.Event( type, typeof event === "object" && event );

		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
		event.isTrigger = onlyHandlers ? 2 : 3;
		event.namespace = namespaces.join( "." );
		event.rnamespace = event.namespace ?
			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
			null;

		// Clean up the event in case it is being reused
		event.result = undefined;
		if ( !event.target ) {
			event.target = elem;
		}

		// Clone any incoming data and prepend the event, creating the handler arg list
		data = data == null ?
			[ event ] :
			jQuery.makeArray( data, [ event ] );

		// Allow special events to draw outside the lines
		special = jQuery.event.special[ type ] || {};
		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
			return;
		}

		// Determine event propagation path in advance, per W3C events spec (trac-9951)
		// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {

			bubbleType = special.delegateType || type;
			if ( !rfocusMorph.test( bubbleType + type ) ) {
				cur = cur.parentNode;
			}
			for ( ; cur; cur = cur.parentNode ) {
				eventPath.push( cur );
				tmp = cur;
			}

			// Only add window if we got to document (e.g., not plain obj or detached DOM)
			if ( tmp === ( elem.ownerDocument || document$1 ) ) {
				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
			}
		}

		// Fire handlers on the event path
		i = 0;
		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
			lastElement = cur;
			event.type = i > 1 ?
				bubbleType :
				special.bindType || type;

			// jQuery handler
			handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
				dataPriv.get( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && acceptData( cur ) ) {
				event.result = handle.apply( cur, data );
				if ( event.result === false ) {
					event.preventDefault();
				}
			}
		}
		event.type = type;

		// If nobody prevented the default action, do it now
		if ( !onlyHandlers && !event.isDefaultPrevented() ) {

			if ( ( !special._default ||
				special._default.apply( eventPath.pop(), data ) === false ) &&
				acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name as the event.
				// Don't do default actions on window, that's where global variables be (trac-6170)
				if ( ontype && typeof elem[ type ] === "function" && !isWindow( elem ) ) {

					// Don't re-trigger an onFOO event when we call its FOO() method
					tmp = elem[ ontype ];

					if ( tmp ) {
						elem[ ontype ] = null;
					}

					// Prevent re-triggering of the same event, since we already bubbled it above
					jQuery.event.triggered = type;

					if ( event.isPropagationStopped() ) {
						lastElement.addEventListener( type, stopPropagationCallback );
					}

					elem[ type ]();

					if ( event.isPropagationStopped() ) {
						lastElement.removeEventListener( type, stopPropagationCallback );
					}

					jQuery.event.triggered = undefined;

					if ( tmp ) {
						elem[ ontype ] = tmp;
					}
				}
			}
		}

		return event.result;
	},

	// Piggyback on a donor event to simulate a different one
	// Used only for `focus(in | out)` events
	simulate: function( type, elem, event ) {
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true
			}
		);

		jQuery.event.trigger( e, null, elem );
	}

} );

jQuery.fn.extend( {

	trigger: function( type, data ) {
		return this.each( function() {
			jQuery.event.trigger( type, data, this );
		} );
	},
	triggerHandler: function( type, data ) {
		var elem = this[ 0 ];
		if ( elem ) {
			return jQuery.event.trigger( type, data, elem, true );
		}
	}
} );

var isAttached = function( elem ) {
		return jQuery.contains( elem.ownerDocument, elem ) ||
			elem.getRootNode( composed ) === elem.ownerDocument;
	},
	composed = { composed: true };

// Support: IE 9 - 11+
// Check attachment across shadow DOM boundaries when possible (gh-3504).
// Provide a fallback for browsers without Shadow DOM v1 support.
if ( !documentElement$1.getRootNode ) {
	isAttached = function( elem ) {
		return jQuery.contains( elem.ownerDocument, elem );
	};
}

// rtagName captures the name from the first start tag in a string of HTML
// https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state
// https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state
var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;

var wrapMap = {

	// Table parts need to be wrapped with `<table>` or they're
	// stripped to their contents when put in a div.
	// XHTML parsers do not magically insert elements in the
	// same way that tag soup parsers do, so we cannot shorten
	// this by omitting <tbody> or other required elements.
	thead: [ "table" ],
	col: [ "colgroup", "table" ],
	tr: [ "tbody", "table" ],
	td: [ "tr", "tbody", "table" ]
};

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

function getAll( context, tag ) {

	// Support: IE <=9 - 11+
	// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
	var ret;

	if ( typeof context.getElementsByTagName !== "undefined" ) {

		// Use slice to snapshot the live collection from gEBTN
		ret = arr.slice.call( context.getElementsByTagName( tag || "*" ) );

	} else if ( typeof context.querySelectorAll !== "undefined" ) {
		ret = context.querySelectorAll( tag || "*" );

	} else {
		ret = [];
	}

	if ( tag === undefined || tag && nodeName( context, tag ) ) {
		return jQuery.merge( [ context ], ret );
	}

	return ret;
}

var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;

// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		dataPriv.set(
			elems[ i ],
			"globalEval",
			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
		);
	}
}

var rhtml = /<|&#?\w+;/;

function buildFragment( elems, context, scripts, selection, ignored ) {
	var elem, tmp, tag, wrap, attached, j,
		fragment = context.createDocumentFragment(),
		nodes = [],
		i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		elem = elems[ i ];

		if ( elem || elem === 0 ) {

			// Add nodes directly
			if ( toType( elem ) === "object" && ( elem.nodeType || isArrayLike( elem ) ) ) {
				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );

			// Convert non-html into a text node
			} else if ( !rhtml.test( elem ) ) {
				nodes.push( context.createTextNode( elem ) );

			// Convert html into DOM nodes
			} else {
				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );

				// Deserialize a standard representation
				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
				wrap = wrapMap[ tag ] || arr;

				// Create wrappers & descend into them.
				j = wrap.length;
				while ( --j > -1 ) {
					tmp = tmp.appendChild( context.createElement( wrap[ j ] ) );
				}

				tmp.innerHTML = jQuery.htmlPrefilter( elem );

				jQuery.merge( nodes, tmp.childNodes );

				// Remember the top-level container
				tmp = fragment.firstChild;

				// Ensure the created nodes are orphaned (trac-12392)
				tmp.textContent = "";
			}
		}
	}

	// Remove wrapper from fragment
	fragment.textContent = "";

	i = 0;
	while ( ( elem = nodes[ i++ ] ) ) {

		// Skip elements already in the context collection (trac-4087)
		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
			if ( ignored ) {
				ignored.push( elem );
			}
			continue;
		}

		attached = isAttached( elem );

		// Append to fragment
		tmp = getAll( fragment.appendChild( elem ), "script" );

		// Preserve script evaluation history
		if ( attached ) {
			setGlobalEval( tmp );
		}

		// Capture executables
		if ( scripts ) {
			j = 0;
			while ( ( elem = tmp[ j++ ] ) ) {
				if ( rscriptType.test( elem.type || "" ) ) {
					scripts.push( elem );
				}
			}
		}
	}

	return fragment;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
	return elem;
}
function restoreScript( elem ) {
	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
		elem.type = elem.type.slice( 5 );
	} else {
		elem.removeAttribute( "type" );
	}

	return elem;
}

function domManip( collection, args, callback, ignored ) {

	// Flatten any nested arrays
	args = flat( args );

	var fragment, first, scripts, hasScripts, node, doc,
		i = 0,
		l = collection.length,
		iNoClone = l - 1,
		value = args[ 0 ],
		valueIsFunction = typeof value === "function";

	if ( valueIsFunction ) {
		return collection.each( function( index ) {
			var self = collection.eq( index );
			args[ 0 ] = value.call( this, index, self.html() );
			domManip( self, args, callback, ignored );
		} );
	}

	if ( l ) {
		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
		first = fragment.firstChild;

		if ( fragment.childNodes.length === 1 ) {
			fragment = first;
		}

		// Require either new content or an interest in ignored elements to invoke the callback
		if ( first || ignored ) {
			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
			hasScripts = scripts.length;

			// Use the original fragment for the last item
			// instead of the first because it can end up
			// being emptied incorrectly in certain situations (trac-8070).
			for ( ; i < l; i++ ) {
				node = fragment;

				if ( i !== iNoClone ) {
					node = jQuery.clone( node, true, true );

					// Keep references to cloned scripts for later restoration
					if ( hasScripts ) {
						jQuery.merge( scripts, getAll( node, "script" ) );
					}
				}

				callback.call( collection[ i ], node, i );
			}

			if ( hasScripts ) {
				doc = scripts[ scripts.length - 1 ].ownerDocument;

				// Re-enable scripts
				jQuery.map( scripts, restoreScript );

				// Evaluate executable scripts on first document insertion
				for ( i = 0; i < hasScripts; i++ ) {
					node = scripts[ i ];
					if ( rscriptType.test( node.type || "" ) &&
						!dataPriv.get( node, "globalEval" ) &&
						jQuery.contains( doc, node ) ) {

						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {

							// Optional AJAX dependency, but won't run scripts if not present
							if ( jQuery._evalUrl && !node.noModule ) {
								jQuery._evalUrl( node.src, {
									nonce: node.nonce,
									crossOrigin: node.crossOrigin
								}, doc );
							}
						} else {
							DOMEval( node.textContent, node, doc );
						}
					}
				}
			}
		}
	}

	return collection;
}

var

	// Support: IE <=10 - 11+
	// In IE using regex groups here causes severe slowdowns.
	rnoInnerhtml = /<script|<style|<link/i;

// Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) {
	if ( nodeName( elem, "table" ) &&
		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {

		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
	}

	return elem;
}

function cloneCopyEvent( src, dest ) {
	var type, i, l,
		events = dataPriv.get( src, "events" );

	if ( dest.nodeType !== 1 ) {
		return;
	}

	// 1. Copy private data: events, handlers, etc.
	if ( events ) {
		dataPriv.remove( dest, "handle events" );
		for ( type in events ) {
			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
				jQuery.event.add( dest, type, events[ type ][ i ] );
			}
		}
	}

	// 2. Copy user data
	if ( dataUser.hasData( src ) ) {
		dataUser.set( dest, jQuery.extend( {}, dataUser.get( src ) ) );
	}
}

function remove( elem, selector, keepData ) {
	var node,
		nodes = selector ? jQuery.filter( selector, elem ) : elem,
		i = 0;

	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
		if ( !keepData && node.nodeType === 1 ) {
			jQuery.cleanData( getAll( node ) );
		}

		if ( node.parentNode ) {
			if ( keepData && isAttached( node ) ) {
				setGlobalEval( getAll( node, "script" ) );
			}
			node.parentNode.removeChild( node );
		}
	}

	return elem;
}

jQuery.extend( {
	htmlPrefilter: function( html ) {
		return html;
	},

	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var i, l, srcElements, destElements,
			clone = elem.cloneNode( true ),
			inPage = isAttached( elem );

		// Fix IE cloning issues
		if ( isIE && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
				!jQuery.isXMLDoc( elem ) ) {

			// We eschew jQuery#find here for performance reasons:
			// https://jsperf.com/getall-vs-sizzle/2
			destElements = getAll( clone );
			srcElements = getAll( elem );

			for ( i = 0, l = srcElements.length; i < l; i++ ) {

				// Support: IE <=11+
				// IE fails to set the defaultValue to the correct value when
				// cloning textareas.
				if ( nodeName( destElements[ i ], "textarea" ) ) {
					destElements[ i ].defaultValue = srcElements[ i ].defaultValue;
				}
			}
		}

		// Copy the events from the original to the clone
		if ( dataAndEvents ) {
			if ( deepDataAndEvents ) {
				srcElements = srcElements || getAll( elem );
				destElements = destElements || getAll( clone );

				for ( i = 0, l = srcElements.length; i < l; i++ ) {
					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		// Return the cloned set
		return clone;
	},

	cleanData: function( elems ) {
		var data, elem, type,
			special = jQuery.event.special,
			i = 0;

		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
			if ( acceptData( elem ) ) {
				if ( ( data = elem[ dataPriv.expando ] ) ) {
					if ( data.events ) {
						for ( type in data.events ) {
							if ( special[ type ] ) {
								jQuery.event.remove( elem, type );

							// This is a shortcut to avoid jQuery.event.remove's overhead
							} else {
								jQuery.removeEvent( elem, type, data.handle );
							}
						}
					}

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataPriv.expando ] = undefined;
				}
				if ( elem[ dataUser.expando ] ) {

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataUser.expando ] = undefined;
				}
			}
		}
	}
} );

jQuery.fn.extend( {
	detach: function( selector ) {
		return remove( this, selector, true );
	},

	remove: function( selector ) {
		return remove( this, selector );
	},

	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().each( function() {
					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
						this.textContent = value;
					}
				} );
		}, null, value, arguments.length );
	},

	append: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		} );
	},

	prepend: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.insertBefore( elem, target.firstChild );
			}
		} );
	},

	before: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		} );
	},

	after: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		} );
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; ( elem = this[ i ] ) != null; i++ ) {
			if ( elem.nodeType === 1 ) {

				// Prevent memory leaks
				jQuery.cleanData( getAll( elem, false ) );

				// Remove any remaining nodes
				elem.textContent = "";
			}
		}

		return this;
	},

	clone: function( dataAndEvents, deepDataAndEvents ) {
		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

		return this.map( function() {
			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
		} );
	},

	html: function( value ) {
		return access( this, function( value ) {
			var elem = this[ 0 ] || {},
				i = 0,
				l = this.length;

			if ( value === undefined && elem.nodeType === 1 ) {
				return elem.innerHTML;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

				value = jQuery.htmlPrefilter( value );

				try {
					for ( ; i < l; i++ ) {
						elem = this[ i ] || {};

						// Remove element nodes and prevent memory leaks
						if ( elem.nodeType === 1 ) {
							jQuery.cleanData( getAll( elem, false ) );
							elem.innerHTML = value;
						}
					}

					elem = 0;

				// If using innerHTML throws an exception, use the fallback method
				} catch ( e ) {}
			}

			if ( elem ) {
				this.empty().append( value );
			}
		}, null, value, arguments.length );
	},

	replaceWith: function() {
		var ignored = [];

		// Make the changes, replacing each non-ignored context element with the new content
		return domManip( this, arguments, function( elem ) {
			var parent = this.parentNode;

			if ( jQuery.inArray( this, ignored ) < 0 ) {
				jQuery.cleanData( getAll( this ) );
				if ( parent ) {
					parent.replaceChild( elem, this );
				}
			}

		// Force callback invocation
		}, ignored );
	}
} );

jQuery.each( {
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1,
			i = 0;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone( true );
			jQuery( insert[ i ] )[ original ]( elems );
			push.apply( ret, elems );
		}

		return this.pushStack( ret );
	};
} );

jQuery.fn.extend( {
	wrapAll: function( html ) {
		var wrap;

		if ( this[ 0 ] ) {
			if ( typeof html === "function" ) {
				html = html.call( this[ 0 ] );
			}

			// The elements to wrap the target around
			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );

			if ( this[ 0 ].parentNode ) {
				wrap.insertBefore( this[ 0 ] );
			}

			wrap.map( function() {
				var elem = this;

				while ( elem.firstElementChild ) {
					elem = elem.firstElementChild;
				}

				return elem;
			} ).append( this );
		}

		return this;
	},

	wrapInner: function( html ) {
		if ( typeof html === "function" ) {
			return this.each( function( i ) {
				jQuery( this ).wrapInner( html.call( this, i ) );
			} );
		}

		return this.each( function() {
			var self = jQuery( this ),
				contents = self.contents();

			if ( contents.length ) {
				contents.wrapAll( html );

			} else {
				self.append( html );
			}
		} );
	},

	wrap: function( html ) {
		var htmlIsFunction = typeof html === "function";

		return this.each( function( i ) {
			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
		} );
	},

	unwrap: function( selector ) {
		this.parent( selector ).not( "body" ).each( function() {
			jQuery( this ).replaceWith( this.childNodes );
		} );
		return this;
	}
} );

var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;

var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );

var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var rcustomProp = /^--/;

var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var ralphaStart = /^[a-z]/,

	// The regex visualized:
	//
	//                         /----------\
	//                        |            |    /-------\
	//                        |  / Top  \  |   |         |
	//         /--- Border ---+-| Right  |-+---+- Width -+---\
	//        |                 | Bottom |                    |
	//        |                  \ Left /                     |
	//        |                                               |
	//        |                              /----------\     |
	//        |          /-------------\    |            |    |- END
	//        |         |               |   |  / Top  \  |    |
	//        |         |  / Margin  \  |   | | Right  | |    |
	//        |---------+-|           |-+---+-| Bottom |-+----|
	//        |            \ Padding /         \ Left /       |
	// BEGIN -|                                               |
	//        |                /---------\                    |
	//        |               |           |                   |
	//        |               |  / Min \  |    / Width  \     |
	//         \--------------+-|       |-+---|          |---/
	//                           \ Max /       \ Height /
	rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;

function isAutoPx( prop ) {

	// The first test is used to ensure that:
	// 1. The prop starts with a lowercase letter (as we uppercase it for the second regex).
	// 2. The prop is not empty.
	return ralphaStart.test( prop ) &&
		rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) );
}

// Matches dashed string for camelizing
var rmsPrefix = /^-ms-/;

// Convert dashed to camelCase, handle vendor prefixes.
// Used by the css & effects modules.
// Support: IE <=9 - 11+
// Microsoft forgot to hump their vendor prefix (trac-9572)
function cssCamelCase( string ) {
	return camelCase( string.replace( rmsPrefix, "ms-" ) );
}

function getStyles( elem ) {

	// Support: IE <=11+ (trac-14150)
	// In IE popup's `window` is the opener window which makes `window.getComputedStyle( elem )`
	// break. Using `elem.ownerDocument.defaultView` avoids the issue.
	var view = elem.ownerDocument.defaultView;

	// `document.implementation.createHTMLDocument( "" )` has a `null` `defaultView`
	// property; check `defaultView` truthiness to fallback to window in such a case.
	if ( !view ) {
		view = window;
	}

	return view.getComputedStyle( elem );
}

// A method for quickly swapping in/out CSS properties to get correct calculations.
function swap( elem, options, callback ) {
	var ret, name,
		old = {};

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.call( elem );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
}

function curCSS( elem, name, computed ) {
	var ret,
		isCustomProp = rcustomProp.test( name );

	computed = computed || getStyles( elem );

	// getPropertyValue is needed for `.css('--customProperty')` (gh-3144)
	if ( computed ) {

		// A fallback to direct property access is needed as `computed`, being
		// the output of `getComputedStyle`, contains camelCased keys and
		// `getPropertyValue` requires kebab-case ones.
		//
		// Support: IE <=9 - 11+
		// IE only supports `"float"` in `getPropertyValue`; in computed styles
		// it's only available as `"cssFloat"`. We no longer modify properties
		// sent to `.css()` apart from camelCasing, so we need to check both.
		// Normally, this would create difference in behavior: if
		// `getPropertyValue` returns an empty string, the value returned
		// by `.css()` would be `undefined`. This is usually the case for
		// disconnected elements. However, in IE even disconnected elements
		// with no styles return `"none"` for `getPropertyValue( "float" )`
		ret = computed.getPropertyValue( name ) || computed[ name ];

		if ( isCustomProp && ret ) {

			// Support: Firefox 105 - 135+
			// Spec requires trimming whitespace for custom properties (gh-4926).
			// Firefox only trims leading whitespace.
			//
			// Fall back to `undefined` if empty string returned.
			// This collapses a missing definition with property defined
			// and set to an empty string but there's no standard API
			// allowing us to differentiate them without a performance penalty
			// and returning `undefined` aligns with older jQuery.
			//
			// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
			// as whitespace while CSS does not, but this is not a problem
			// because CSS preprocessing replaces them with U+000A LINE FEED
			// (which *is* CSS whitespace)
			// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
			ret = ret.replace( rtrimCSS, "$1" ) || undefined;
		}

		if ( ret === "" && !isAttached( elem ) ) {
			ret = jQuery.style( elem, name );
		}
	}

	return ret !== undefined ?

		// Support: IE <=9 - 11+
		// IE returns zIndex value as an integer.
		ret + "" :
		ret;
}

function adjustCSS( elem, prop, valueParts, tween ) {
	var adjusted, scale,
		maxIterations = 20,
		currentValue = function() {
				return jQuery.css( elem, prop, "" );
			},
		initial = currentValue(),
		unit = valueParts && valueParts[ 3 ] || ( isAutoPx( prop ) ? "px" : "" ),

		// Starting value computation is required for potential unit mismatches
		initialInUnit = elem.nodeType &&
			( !isAutoPx( prop ) || unit !== "px" && +initial ) &&
			rcssNum.exec( jQuery.css( elem, prop ) );

	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

		// Support: Firefox <=54 - 66+
		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
		initial = initial / 2;

		// Trust units reported by jQuery.css
		unit = unit || initialInUnit[ 3 ];

		// Iteratively approximate from a nonzero starting point
		initialInUnit = +initial || 1;

		while ( maxIterations-- ) {

			// Evaluate and update our best guess (doubling guesses that zero out).
			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
			jQuery.style( elem, prop, initialInUnit + unit );
			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
				maxIterations = 0;
			}
			initialInUnit = initialInUnit / scale;

		}

		initialInUnit = initialInUnit * 2;
		jQuery.style( elem, prop, initialInUnit + unit );

		// Make sure we update the tween properties later on
		valueParts = valueParts || [];
	}

	if ( valueParts ) {
		initialInUnit = +initialInUnit || +initial || 0;

		// Apply relative offset (+=/-=) if specified
		adjusted = valueParts[ 1 ] ?
			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
			+valueParts[ 2 ];
	}
	return adjusted;
}

var cssPrefixes = [ "Webkit", "Moz", "ms" ],
	emptyStyle = document$1.createElement( "div" ).style;

// Return a vendor-prefixed property or undefined
function vendorPropName( name ) {

	// Check for vendor prefixed names
	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}

// Return a potentially-mapped vendor prefixed property
function finalPropName( name ) {
	if ( name in emptyStyle ) {
		return name;
	}
	return vendorPropName( name ) || name;
}

var reliableTrDimensionsVal, reliableColDimensionsVal,
	table = document$1.createElement( "table" );

// Executing table tests requires only one layout, so they're executed
// at the same time to save the second computation.
function computeTableStyleTests() {
	if (

		// This is a singleton, we need to execute it only once
		!table ||

		// Finish early in limited (non-browser) environments
		!table.style
	) {
		return;
	}

	var trStyle,
		col = document$1.createElement( "col" ),
		tr = document$1.createElement( "tr" ),
		td = document$1.createElement( "td" );

	table.style.cssText = "position:absolute;left:-11111px;" +
		"border-collapse:separate;border-spacing:0";
	tr.style.cssText = "box-sizing:content-box;border:1px solid;height:1px";
	td.style.cssText = "height:9px;width:9px;padding:0";

	col.span = 2;

	documentElement$1
		.appendChild( table )
		.appendChild( col )
		.parentNode
		.appendChild( tr )
		.appendChild( td )
		.parentNode
		.appendChild( td.cloneNode( true ) );

	// Don't run until window is visible
	if ( table.offsetWidth === 0 ) {
		documentElement$1.removeChild( table );
		return;
	}

	trStyle = window.getComputedStyle( tr );

	// Support: Firefox 135+
	// Firefox always reports computed width as if `span` was 1.
	// Support: Safari 18.3+
	// In Safari, computed width for columns is always 0.
	// In both these browsers, using `offsetWidth` solves the issue.
	// Support: IE 11+
	// In IE, `<col>` computed width is `"auto"` unless `width` is set
	// explicitly via CSS so measurements there remain incorrect. Because of
	// the lack of a proper workaround, we accept this limitation, treating
	// IE as passing the test.
	reliableColDimensionsVal = isIE || Math.round( parseFloat(
		window.getComputedStyle( col ).width )
	) === 18;

	// Support: IE 10 - 11+
	// IE misreports `getComputedStyle` of table rows with width/height
	// set in CSS while `offset*` properties report correct values.
	// Support: Firefox 70 - 135+
	// Only Firefox includes border widths
	// in computed dimensions for table rows. (gh-4529)
	reliableTrDimensionsVal = Math.round( parseFloat( trStyle.height ) +
		parseFloat( trStyle.borderTopWidth ) +
		parseFloat( trStyle.borderBottomWidth ) ) === tr.offsetHeight;

	documentElement$1.removeChild( table );

	// Nullify the table so it wouldn't be stored in the memory;
	// it will also be a sign that checks were already performed.
	table = null;
}

jQuery.extend( support, {
	reliableTrDimensions: function() {
		computeTableStyleTests();
		return reliableTrDimensionsVal;
	},

	reliableColDimensions: function() {
		computeTableStyleTests();
		return reliableColDimensionsVal;
	}
} );

var cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	};

function setPositiveNumber( _elem, value, subtract ) {

	// Any relative (+/-) values have already been
	// normalized at this point
	var matches = rcssNum.exec( value );
	return matches ?

		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
		value;
}

function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
	var i = dimension === "width" ? 1 : 0,
		extra = 0,
		delta = 0,
		marginDelta = 0;

	// Adjustment may not be necessary
	if ( box === ( isBorderBox ? "border" : "content" ) ) {
		return 0;
	}

	for ( ; i < 4; i += 2 ) {

		// Both box models exclude margin
		// Count margin delta separately to only add it after scroll gutter adjustment.
		// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
		if ( box === "margin" ) {
			marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
		}

		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
		if ( !isBorderBox ) {

			// Add padding
			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );

			// For "border" or "margin", add border
			if ( box !== "padding" ) {
				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );

			// But still keep track of it otherwise
			} else {
				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}

		// If we get here with a border-box (content + padding + border), we're seeking "content" or
		// "padding" or "margin"
		} else {

			// For "content", subtract padding
			if ( box === "content" ) {
				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
			}

			// For "content" or "padding", subtract border
			if ( box !== "margin" ) {
				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		}
	}

	// Account for positive content-box scroll gutter when requested by providing computedVal
	if ( !isBorderBox && computedVal >= 0 ) {

		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
		// Assuming integer scroll gutter, subtract the rest and round down
		delta += Math.max( 0, Math.ceil(
			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
			computedVal -
			delta -
			extra -
			0.5

		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
		// Use an explicit zero to avoid NaN (gh-3964)
		) ) || 0;
	}

	return delta + marginDelta;
}

function getWidthOrHeight( elem, dimension, extra ) {

	// Start with computed style
	var styles = getStyles( elem ),

		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
		// Fake content-box until we know it's needed to know the true value.
		boxSizingNeeded = isIE || extra,
		isBorderBox = boxSizingNeeded &&
			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
		valueIsBorderBox = isBorderBox,

		val = curCSS( elem, dimension, styles ),
		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );

	// Return a confounding non-pixel value or feign ignorance, as appropriate.
	if ( rnumnonpx.test( val ) ) {
		if ( !extra ) {
			return val;
		}
		val = "auto";
	}


	if (
		(

			// Fall back to offsetWidth/offsetHeight when value is "auto"
			// This happens for inline elements with no explicit setting (gh-3571)
			val === "auto" ||

			// Support: IE 9 - 11+
			// Use offsetWidth/offsetHeight for when box sizing is unreliable.
			// In those cases, the computed value can be trusted to be border-box.
			( isIE && isBorderBox ) ||

			( !support.reliableColDimensions() && nodeName( elem, "col" ) ) ||

			( !support.reliableTrDimensions() && nodeName( elem, "tr" ) )
		) &&

		// Make sure the element is visible & connected
		elem.getClientRects().length ) {

		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
		// retrieved value as a content box dimension.
		valueIsBorderBox = offsetProp in elem;
		if ( valueIsBorderBox ) {
			val = elem[ offsetProp ];
		}
	}

	// Normalize "" and auto
	val = parseFloat( val ) || 0;

	// Adjust for the element's box model
	return ( val +
		boxModelAdjustment(
			elem,
			dimension,
			extra || ( isBorderBox ? "border" : "content" ),
			valueIsBorderBox,
			styles,

			// Provide the current computed size to request scroll gutter calculation (gh-3589)
			val
		)
	) + "px";
}

jQuery.extend( {

	// Add in style property hooks for overriding the default
	// behavior of getting and setting a style property
	cssHooks: {},

	// Get and set the style property on a DOM Node
	style: function( elem, name, value, extra ) {

		// Don't set styles on text and comment nodes
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
			return;
		}

		// Make sure that we're working with the right name
		var ret, type, hooks,
			origName = cssCamelCase( name ),
			isCustomProp = rcustomProp.test( name ),
			style = elem.style;

		// Make sure that we're working with the right name. We don't
		// want to query the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Gets hook for the prefixed version, then unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// Convert "+=" or "-=" to relative numbers (trac-7345)
			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
				value = adjustCSS( elem, name, ret );

				// Fixes bug trac-9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set (trac-7116)
			if ( value == null || value !== value ) {
				return;
			}

			// If the value is a number, add `px` for certain CSS properties
			if ( type === "number" ) {
				value += ret && ret[ 3 ] || ( isAutoPx( origName ) ? "px" : "" );
			}

			// Support: IE <=9 - 11+
			// background-* props of a cloned element affect the source element (trac-8908)
			if ( isIE && value === "" && name.indexOf( "background" ) === 0 ) {
				style[ name ] = "inherit";
			}

			// If a hook was provided, use that value, otherwise just set the specified value
			if ( !hooks || !( "set" in hooks ) ||
				( value = hooks.set( elem, value, extra ) ) !== undefined ) {

				if ( isCustomProp ) {
					style.setProperty( name, value );
				} else {
					style[ name ] = value;
				}
			}

		} else {

			// If a hook was provided get the non-computed value from there
			if ( hooks && "get" in hooks &&
				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {

				return ret;
			}

			// Otherwise just get the value from the style object
			return style[ name ];
		}
	},

	css: function( elem, name, extra, styles ) {
		var val, num, hooks,
			origName = cssCamelCase( name ),
			isCustomProp = rcustomProp.test( name );

		// Make sure that we're working with the right name. We don't
		// want to modify the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Try prefixed name followed by the unprefixed name
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// If a hook was provided get the computed value from there
		if ( hooks && "get" in hooks ) {
			val = hooks.get( elem, true, extra );
		}

		// Otherwise, if a way to get the computed value exists, use that
		if ( val === undefined ) {
			val = curCSS( elem, name, styles );
		}

		// Convert "normal" to computed value
		if ( val === "normal" && name in cssNormalTransform ) {
			val = cssNormalTransform[ name ];
		}

		// Make numeric if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || isFinite( num ) ? num || 0 : val;
		}

		return val;
	}
} );

jQuery.each( [ "height", "width" ], function( _i, dimension ) {
	jQuery.cssHooks[ dimension ] = {
		get: function( elem, computed, extra ) {
			if ( computed ) {

				// Elements with `display: none` can have dimension info if
				// we invisibly show them.
				return jQuery.css( elem, "display" ) === "none" ?
					swap( elem, cssShow, function() {
						return getWidthOrHeight( elem, dimension, extra );
					} ) :
					getWidthOrHeight( elem, dimension, extra );
			}
		},

		set: function( elem, value, extra ) {
			var matches,
				styles = getStyles( elem ),

				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
				isBorderBox = extra &&
					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
				subtract = extra ?
					boxModelAdjustment(
						elem,
						dimension,
						extra,
						isBorderBox,
						styles
					) :
					0;

			// Convert to pixels if value adjustment is needed
			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
				( matches[ 3 ] || "px" ) !== "px" ) {

				elem.style[ dimension ] = value;
				value = jQuery.css( elem, dimension );
			}

			return setPositiveNumber( elem, value, subtract );
		}
	};
} );

// These hooks are used by animate to expand properties
jQuery.each( {
	margin: "",
	padding: "",
	border: "Width"
}, function( prefix, suffix ) {
	jQuery.cssHooks[ prefix + suffix ] = {
		expand: function( value ) {
			var i = 0,
				expanded = {},

				// Assumes a single number if not a string
				parts = typeof value === "string" ? value.split( " " ) : [ value ];

			for ( ; i < 4; i++ ) {
				expanded[ prefix + cssExpand[ i ] + suffix ] =
					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
			}

			return expanded;
		}
	};

	if ( prefix !== "margin" ) {
		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
	}
} );

jQuery.fn.extend( {
	css: function( name, value ) {
		return access( this, function( elem, name, value ) {
			var styles, len,
				map = {},
				i = 0;

			if ( Array.isArray( name ) ) {
				styles = getStyles( elem );
				len = name.length;

				for ( ; i < len; i++ ) {
					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
				}

				return map;
			}

			return value !== undefined ?
				jQuery.style( elem, name, value ) :
				jQuery.css( elem, name );
		}, name, value, arguments.length > 1 );
	}
} );

jQuery.expr.pseudos.hidden = function( elem ) {
	return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};

// isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or
// through the CSS cascade), which is useful in deciding whether or not to make it visible.
// It differs from the :hidden selector (jQuery.expr.pseudos.hidden) in two important ways:
// * A hidden ancestor does not force an element to be classified as hidden.
// * Being disconnected from the document does not force an element to be classified as hidden.
// These differences improve the behavior of .toggle() et al. when applied to elements that are
// detached or contained within hidden ancestors (gh-2404, gh-2863).
function isHiddenWithinTree( elem, el ) {

	// isHiddenWithinTree might be called from jQuery#filter function;
	// in that case, element will be second argument
	elem = elem;

	// Inline style trumps all
	return elem.style.display === "none" ||
		elem.style.display === "" &&
		jQuery.css( elem, "display" ) === "none";
}

var defaultDisplayMap = {};

function getDefaultDisplay( elem ) {
	var temp,
		doc = elem.ownerDocument,
		nodeName = elem.nodeName,
		display = defaultDisplayMap[ nodeName ];

	if ( display ) {
		return display;
	}

	temp = doc.body.appendChild( doc.createElement( nodeName ) );
	display = jQuery.css( temp, "display" );

	temp.parentNode.removeChild( temp );

	if ( display === "none" ) {
		display = "block";
	}
	defaultDisplayMap[ nodeName ] = display;

	return display;
}

function showHide( elements, show ) {
	var display, elem,
		values = [],
		index = 0,
		length = elements.length;

	// Determine new display value for elements that need to change
	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		display = elem.style.display;
		if ( show ) {

			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
			// check is required in this first loop unless we have a nonempty display value (either
			// inline or about-to-be-restored)
			if ( display === "none" ) {
				values[ index ] = dataPriv.get( elem, "display" ) || null;
				if ( !values[ index ] ) {
					elem.style.display = "";
				}
			}
			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
				values[ index ] = getDefaultDisplay( elem );
			}
		} else {
			if ( display !== "none" ) {
				values[ index ] = "none";

				// Remember what we're overwriting
				dataPriv.set( elem, "display", display );
			}
		}
	}

	// Set the display of the elements in a second loop to avoid constant reflow
	for ( index = 0; index < length; index++ ) {
		if ( values[ index ] != null ) {
			elements[ index ].style.display = values[ index ];
		}
	}

	return elements;
}

jQuery.fn.extend( {
	show: function() {
		return showHide( this, true );
	},
	hide: function() {
		return showHide( this );
	},
	toggle: function( state ) {
		if ( typeof state === "boolean" ) {
			return state ? this.show() : this.hide();
		}

		return this.each( function() {
			if ( isHiddenWithinTree( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		} );
	}
} );

var
	rbracket = /\[\]$/,
	rCRLF = /\r?\n/g,
	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
	rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {
	var name;

	if ( Array.isArray( obj ) ) {

		// Serialize array item.
		jQuery.each( obj, function( i, v ) {
			if ( traditional || rbracket.test( prefix ) ) {

				// Treat each array item as a scalar.
				add( prefix, v );

			} else {

				// Item is non-scalar (array or object), encode its numeric index.
				buildParams(
					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
					v,
					traditional,
					add
				);
			}
		} );

	} else if ( !traditional && toType( obj ) === "object" ) {

		// Serialize object item.
		for ( name in obj ) {
			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
		}

	} else {

		// Serialize scalar item.
		add( prefix, obj );
	}
}

// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
	var prefix,
		s = [],
		add = function( key, valueOrFunction ) {

			// If value is a function, invoke it and use its return value
			var value = typeof valueOrFunction === "function" ?
				valueOrFunction() :
				valueOrFunction;

			s[ s.length ] = encodeURIComponent( key ) + "=" +
				encodeURIComponent( value == null ? "" : value );
		};

	if ( a == null ) {
		return "";
	}

	// If an array was passed in, assume that it is an array of form elements.
	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {

		// Serialize the form elements
		jQuery.each( a, function() {
			add( this.name, this.value );
		} );

	} else {

		// If traditional, encode the "old" way (the way 1.3.2 or older
		// did it), otherwise encode params recursively.
		for ( prefix in a ) {
			buildParams( prefix, a[ prefix ], traditional, add );
		}
	}

	// Return the resulting serialization
	return s.join( "&" );
};

jQuery.fn.extend( {
	serialize: function() {
		return jQuery.param( this.serializeArray() );
	},
	serializeArray: function() {
		return this.map( function() {

			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		} ).filter( function() {
			var type = this.type;

			// Use .is( ":disabled" ) so that fieldset[disabled] works
			return this.name && !jQuery( this ).is( ":disabled" ) &&
				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
				( this.checked || !rcheckableType.test( type ) );
		} ).map( function( _i, elem ) {
			var val = jQuery( this ).val();

			if ( val == null ) {
				return null;
			}

			if ( Array.isArray( val ) ) {
				return jQuery.map( val, function( val ) {
					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
				} );
			}

			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		} ).get();
	}
} );

// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml, parserErrorElem;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE 9 - 11+
	// IE throws on parseFromString with invalid input.
	try {
		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
	} catch ( e ) {}

	parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
	if ( !xml || parserErrorElem ) {
		jQuery.error( "Invalid XML: " + (
			parserErrorElem ?
				jQuery.map( parserErrorElem.childNodes, function( el ) {
					return el.textContent;
				} ).join( "\n" ) :
				data
		) );
	}
	return xml;
};

// Argument "data" should be string of html or a TrustedHTML wrapper of obvious HTML
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
	if ( typeof data !== "string" && !isObviousHtml( data + "" ) ) {
		return [];
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}

	var parsed, scripts;

	if ( !context ) {

		// Stop scripts or inline event handlers from being executed immediately
		// by using DOMParser
		context = ( new window.DOMParser() )
			.parseFromString( "", "text/html" );
	}

	parsed = rsingleTag.exec( data );
	scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[ 1 ] ) ];
	}

	parsed = buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};

jQuery.offset = {
	setOffset: function( elem, options, i ) {
		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
			position = jQuery.css( elem, "position" ),
			curElem = jQuery( elem ),
			props = {};

		// Set position first, in-case top/left are set even on static elem
		if ( position === "static" ) {
			elem.style.position = "relative";
		}

		curOffset = curElem.offset();
		curCSSTop = jQuery.css( elem, "top" );
		curCSSLeft = jQuery.css( elem, "left" );
		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;

		// Need to be able to calculate position if either
		// top or left is auto and position is either absolute or fixed
		if ( calculatePosition ) {
			curPosition = curElem.position();
			curTop = curPosition.top;
			curLeft = curPosition.left;

		} else {
			curTop = parseFloat( curCSSTop ) || 0;
			curLeft = parseFloat( curCSSLeft ) || 0;
		}

		if ( typeof options === "function" ) {

			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
		}

		if ( options.top != null ) {
			props.top = ( options.top - curOffset.top ) + curTop;
		}
		if ( options.left != null ) {
			props.left = ( options.left - curOffset.left ) + curLeft;
		}

		if ( "using" in options ) {
			options.using.call( elem, props );

		} else {
			curElem.css( props );
		}
	}
};

jQuery.fn.extend( {

	// offset() relates an element's border box to the document origin
	offset: function( options ) {

		// Preserve chaining for setter
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each( function( i ) {
					jQuery.offset.setOffset( this, options, i );
				} );
		}

		var rect, win,
			elem = this[ 0 ];

		if ( !elem ) {
			return;
		}

		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
		// Support: IE <=11+
		// Running getBoundingClientRect on a
		// disconnected node in IE throws an error
		if ( !elem.getClientRects().length ) {
			return { top: 0, left: 0 };
		}

		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
		rect = elem.getBoundingClientRect();
		win = elem.ownerDocument.defaultView;
		return {
			top: rect.top + win.pageYOffset,
			left: rect.left + win.pageXOffset
		};
	},

	// position() relates an element's margin box to its offset parent's padding box
	// This corresponds to the behavior of CSS absolute positioning
	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset, doc,
			elem = this[ 0 ],
			parentOffset = { top: 0, left: 0 };

		// position:fixed elements are offset from the viewport, which itself always has zero offset
		if ( jQuery.css( elem, "position" ) === "fixed" ) {

			// Assume position:fixed implies availability of getBoundingClientRect
			offset = elem.getBoundingClientRect();

		} else {
			offset = this.offset();

			// Account for the *real* offset parent, which can be the document or its root element
			// when a statically positioned element is identified
			doc = elem.ownerDocument;
			offsetParent = elem.offsetParent || doc.documentElement;
			while ( offsetParent &&
				offsetParent !== doc.documentElement &&
				jQuery.css( offsetParent, "position" ) === "static" ) {

				offsetParent = offsetParent.offsetParent || doc.documentElement;
			}
			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 &&
				jQuery.css( offsetParent, "position" ) !== "static" ) {

				// Incorporate borders into its offset, since they are outside its content origin
				parentOffset = jQuery( offsetParent ).offset();
				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
			}
		}

		// Subtract parent offsets and element margins
		return {
			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
		};
	},

	// This method will return documentElement in the following cases:
	// 1) For the element inside the iframe without offsetParent, this method will return
	//    documentElement of the parent window
	// 2) For the hidden or detached element
	// 3) For body or html element, i.e. in case of the html node - it will return itself
	//
	// but those exceptions were never presented as a real life use-cases
	// and might be considered as more preferable results.
	//
	// This logic, however, is not guaranteed and can change at any point in the future
	offsetParent: function() {
		return this.map( function() {
			var offsetParent = this.offsetParent;

			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
				offsetParent = offsetParent.offsetParent;
			}

			return offsetParent || documentElement$1;
		} );
	}
} );

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = "pageYOffset" === prop;

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {

			// Coalesce documents and windows
			var win;
			if ( isWindow( elem ) ) {
				win = elem;
			} else if ( elem.nodeType === 9 ) {
				win = elem.defaultView;
			}

			if ( val === undefined ) {
				return win ? win[ prop ] : elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : win.pageXOffset,
					top ? val : win.pageYOffset
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length );
	};
} );

// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
	jQuery.each( {
		padding: "inner" + name,
		content: type,
		"": "outer" + name
	}, function( defaultExtra, funcName ) {

		// Margin is only for outerHeight, outerWidth
		jQuery.fn[ funcName ] = function( margin, value ) {
			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );

			return access( this, function( elem, type, value ) {
				var doc;

				if ( isWindow( elem ) ) {

					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
					return funcName.indexOf( "outer" ) === 0 ?
						elem[ "inner" + name ] :
						elem.document.documentElement[ "client" + name ];
				}

				// Get document width or height
				if ( elem.nodeType === 9 ) {
					doc = elem.documentElement;

					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
					// whichever is greatest
					return Math.max(
						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
						elem.body[ "offset" + name ], doc[ "offset" + name ],
						doc[ "client" + name ]
					);
				}

				return value === undefined ?

					// Get width or height on the element, requesting but not forcing parseFloat
					jQuery.css( elem, type, extra ) :

					// Set width or height on the element
					jQuery.style( elem, type, value, extra );
			}, type, chainable ? margin : undefined, chainable );
		};
	} );
} );

jQuery.fn.extend( {

	bind: function( types, data, fn ) {
		return this.on( types, null, data, fn );
	},
	unbind: function( types, fn ) {
		return this.off( types, null, fn );
	},

	delegate: function( selector, types, data, fn ) {
		return this.on( types, selector, data, fn );
	},
	undelegate: function( selector, types, fn ) {

		// ( namespace ) or ( selector, types [, fn] )
		return arguments.length === 1 ?
			this.off( selector, "**" ) :
			this.off( types, selector || "**", fn );
	},

	hover: function( fnOver, fnOut ) {
		return this
			.on( "mouseenter", fnOver )
			.on( "mouseleave", fnOut || fnOver );
	}
} );

jQuery.each(
	( "blur focus focusin focusout resize scroll click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
	function( _i, name ) {

		// Handle event binding
		jQuery.fn[ name ] = function( data, fn ) {
			return arguments.length > 0 ?
				this.on( name, null, data, fn ) :
				this.trigger( name );
		};
	}
);

// Bind a function to a context, optionally partially applying any
// arguments.
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
// However, it is not slated for removal any time soon
jQuery.proxy = function( fn, context ) {
	var tmp, args, proxy;

	if ( typeof context === "string" ) {
		tmp = fn[ context ];
		context = fn;
		fn = tmp;
	}

	// Quick check to determine if target is callable, in the spec
	// this throws a TypeError, but we will just return undefined.
	if ( typeof fn !== "function" ) {
		return undefined;
	}

	// Simulated bind
	args = slice.call( arguments, 2 );
	proxy = function() {
		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
	};

	// Set the guid of unique handler to the same of original handler, so it can be removed
	proxy.guid = fn.guid = fn.guid || jQuery.guid++;

	return proxy;
};

jQuery.holdReady = function( hold ) {
	if ( hold ) {
		jQuery.readyWait++;
	} else {
		jQuery.ready( true );
	}
};

jQuery.expr[ ":" ] = jQuery.expr.filters = jQuery.expr.pseudos;

// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

if ( typeof define === "function" && define.amd ) {
	define( "jquery", [], function() {
		return jQuery;
	} );
}

var

	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,

	// Map over the $ in case of overwrite
	_$ = window.$;

jQuery.noConflict = function( deep ) {
	if ( window.$ === jQuery ) {
		window.$ = _$;
	}

	if ( deep && window.jQuery === jQuery ) {
		window.jQuery = _jQuery;
	}

	return jQuery;
};

// Expose jQuery and $ identifiers, even in AMD
// (trac-7102#comment:10, gh-557)
// and CommonJS for browser emulators (trac-13566)
if ( typeof noGlobal === "undefined" ) {
	window.jQuery = window.$ = jQuery;
}

var readyCallbacks = [],
	whenReady = function( fn ) {
		readyCallbacks.push( fn );
	},
	executeReady = function( fn ) {

		// Prevent errors from freezing future callback execution (gh-1823)
		// Not backwards-compatible as this does not execute sync
		window.setTimeout( function() {
			fn.call( document$1, jQuery );
		} );
	};

jQuery.fn.ready = function( fn ) {
	whenReady( fn );
	return this;
};

jQuery.extend( {

	// Is the DOM ready to be used? Set to true once it occurs.
	isReady: false,

	// A counter to track how many items to wait for before
	// the ready event fires. See trac-6781
	readyWait: 1,

	ready: function( wait ) {

		// Abort if there are pending holds or we're already ready
		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
			return;
		}

		// Remember that the DOM is ready
		jQuery.isReady = true;

		// If a normal DOM Ready event fired, decrement, and wait if need be
		if ( wait !== true && --jQuery.readyWait > 0 ) {
			return;
		}

		whenReady = function( fn ) {
			readyCallbacks.push( fn );

			while ( readyCallbacks.length ) {
				fn = readyCallbacks.shift();
				if ( typeof fn === "function" ) {
					executeReady( fn );
				}
			}
		};

		whenReady();
	}
} );

// Make jQuery.ready Promise consumable (gh-1778)
jQuery.ready.then = jQuery.fn.ready;

/**
 * The ready event handler and self cleanup method
 */
function completed() {
	document$1.removeEventListener( "DOMContentLoaded", completed );
	window.removeEventListener( "load", completed );
	jQuery.ready();
}

// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
if ( document$1.readyState !== "loading" ) {

	// Handle it asynchronously to allow scripts the opportunity to delay ready
	window.setTimeout( jQuery.ready );

} else {

	// Use the handy event callback
	document$1.addEventListener( "DOMContentLoaded", completed );

	// A fallback to window.onload, that will always work
	window.addEventListener( "load", completed );
}

return jQuery;

} );
jquery/composer.json000064400000001700152336434510010611 0ustar00{
    "name": "components/jquery",
    "description": "jQuery JavaScript Library",
    "type": "component",
    "homepage": "http://jquery.com",
    "license": "MIT",
    "support": {
        "irc": "irc://irc.freenode.org/jquery",
        "issues": "https://github.com/jquery/jquery/issues",
        "forum": "http://forum.jquery.com",
        "wiki": "http://docs.jquery.com/",
        "source": "https://github.com/jquery/jquery"
    },
    "authors": [
        {
            "name": "JS Foundation and other contributors",
            "url": "https://github.com/jquery/jquery/blob/master/AUTHORS.txt"
        }
    ],
    "extra": {
        "component": {
            "scripts": [
                "jquery.js"
            ],
            "files": [
                "jquery.min.js",
                "jquery.min.map",
                "jquery.slim.js",
                "jquery.slim.min.js",
                "jquery.slim.min.map"
            ]
        }
    }
}
jquery/jquery.slim.min.js000064400000155340152336434510011503 0ustar00/*! jQuery v4.0.0+slim | (c) OpenJS Foundation and other contributors | jquery.com/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,!0):t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";if(!e.document)throw Error("jQuery requires a window with a document");var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,f=c.toString,p=f.call(Object),d={};function h(e){return null==e?e+"":"object"==typeof e?u[l.call(e)]||"object":typeof e}function g(e){return null!=e&&e===e.window}function v(e){var t=!!e&&e.length,n=h(e);return!("function"==typeof e||g(e))&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var y=e.document,m={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,i=(n=n||y).createElement("script");for(r in i.text=e,m)t&&t[r]&&(i[r]=t[r]);n.head.appendChild(i).parentNode&&i.parentNode.removeChild(i)}var b="4.0.0+slim",w=/HTML$/i,T=function(e,t){return new T.fn.init(e,t)};function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}T.fn=T.prototype={jquery:b,constructor:T,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(T.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()}},T.extend=T.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"!=typeof a&&"function"!=typeof a&&(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(T.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||T.isPlainObject(n)?n:{},i=!1,a[t]=T.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},T.extend({expando:"jQuery"+(b+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!!e&&"[object Object]"===l.call(e)&&(!(t=r(e))||"function"==typeof(n=c.call(t,"constructor")&&t.constructor)&&f.call(n)===p)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(v(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=T.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(v(Object(e))?T.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!w.test(t||n&&n.nodeName||"HTML")},contains:function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&1===n.nodeType&&(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(v(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return o(s)},guid:1,support:d}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=n[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){u["[object "+t+"]"]=t.toLowerCase()});var E=n.pop,S="[\\x20\\t\\r\\n\\f]",D=y.documentMode,A=D&&RegExp(":enabled|:disabled|\\["+S+"*name"+S+"*="+S+"*(?:''|\"\")"),N=RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g"),k="(?:\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",O=RegExp("^"+S+"*([>+~]|"+S+")"+S+"*"),j=RegExp(S+"|>"),L=/[+~]/,P=y.documentElement,R=P.matches||P.msMatchesSelector;function I(){var e=[];function t(n,r){return e.push(n+" ")>T.expr.cacheLength&&delete t[e.shift()],t[n+" "]=r}return t}function H(e){return e&&void 0!==e.getElementsByTagName&&e}var $="\\["+S+"*("+k+")(?:"+S+"*([*^$|!~]?=)"+S+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+k+"))|)"+S+"*\\]",M=":("+k+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",B={ID:RegExp("^#("+k+")"),CLASS:RegExp("^\\.("+k+")"),TAG:RegExp("^("+k+"|[*])"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+M),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i")},F=new RegExp(M),q=RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),W=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))};function U(e){return e.replace(q,W)}function z(e){T.error("Syntax error, unrecognized expression: "+e)}var X=RegExp("^"+S+"*,"+S+"*"),_=I();function V(e,t){var n,r,i,o,a,s,u,l=_[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=T.expr.preFilter;while(a){for(o in(!n||(r=X.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=O.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(N," ")}),a=a.slice(n.length)),B)(r=T.expr.match[o].exec(a))&&(!u[o]||(r=u[o](r)))&&(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?z(e):_(e,s).slice(0)}function Y(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Q(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===h(n))for(s in i=!0,n)Q(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,"function"!=typeof r&&(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(T(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o}var G=/[^\x20\t\r\n\f]+/g;T.fn.extend({attr:function(e,t){return Q(this,T.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(i=T.attrHooks[t.toLowerCase()]),void 0!==n)?null===n||!1===n&&0!==t.toLowerCase().indexOf("aria-")?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=e.getAttribute(t))?void 0:r},attrHooks:{},removeAttr:function(e,t){var n,r=0,i=t&&t.match(G);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),D&&(T.attrHooks.type={set:function(e,t){if("radio"===t&&C(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}});var K=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function J(e,t){return t?"\0"===e?"\uFFFD":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}T.escapeSelector=function(e){return(e+"").replace(K,J)};var Z=n.sort,ee=n.splice;function et(e,t){if(e===t)return en=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)?e==y||e.ownerDocument==y&&T.contains(y,e)?-1:t==y||t.ownerDocument==y&&T.contains(y,t)?1:0:4&n?-1:1}T.uniqueSort=function(e){var t,n=[],r=0,i=0;if(en=!1,Z.call(e,et),en){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)ee.call(e,n[r],1)}return e},T.fn.uniqueSort=function(){return this.pushStack(T.uniqueSort(i.apply(this)))};var en,er,ei,eo,ea,es,eu=0,el=0,ec=I(),ef=I(),ep=I(),ed=RegExp(S+"+","g"),eh=RegExp("^"+k+"$"),eg=T.extend({needsContext:RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},B),ev=/^(?:input|select|textarea|button)$/i,ey=/^h\d$/i,em=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ex=function(){eS()},eb=eA(function(e){return!0===e.disabled&&C(e,"fieldset")},{dir:"parentNode",next:"legend"});function ew(e,t,n,r){var i,o,s,u,l,c,f,p=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!r&&(eS(t),t=t||eo,es)){if(11!==d&&(l=em.exec(e))){if(i=l[1]){if(9===d)return(s=t.getElementById(i))&&a.call(n,s),n;else if(p&&(s=p.getElementById(i))&&T.contains(t,s))return a.call(n,s),n}else if(l[2])return a.apply(n,t.getElementsByTagName(e)),n;else if((i=l[3])&&t.getElementsByClassName)return a.apply(n,t.getElementsByClassName(i)),n}if(!ep[e+" "]&&(!A||!A.test(e))){if(f=e,p=t,1===d&&(j.test(e)||O.test(e))){((p=L.test(e)&&H(t.parentNode)||t)!=t||D)&&((u=t.getAttribute("id"))?u=T.escapeSelector(u):t.setAttribute("id",u=T.expando)),o=(c=V(e)).length;while(o--)c[o]=(u?"#"+u:":scope")+" "+Y(c[o]);f=c.join(",")}try{return a.apply(n,p.querySelectorAll(f)),n}catch(t){ep(e,!0)}finally{u===T.expando&&t.removeAttribute("id")}}}return ej(e.replace(N,"$1"),t,n,r)}function eT(e){return e[T.expando]=!0,e}function eC(e){return function(t){if("form"in t){if(t.parentNode&&!1===t.disabled){if("label"in t)if("label"in t.parentNode)return t.parentNode.disabled===e;else return t.disabled===e;return t.isDisabled===e||!e!==t.isDisabled&&eb(t)===e}return t.disabled===e}return"label"in t&&t.disabled===e}}function eE(e){return eT(function(t){return t*=1,eT(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function eS(e){var t,n=e?e.ownerDocument||e:y;n!=eo&&9===n.nodeType&&(ea=(eo=n).documentElement,es=!T.isXMLDoc(eo),D&&y!=eo&&(t=eo.defaultView)&&t.top!==t&&t.addEventListener("unload",ex))}for(er in ew.matches=function(e,t){return ew(e,null,null,t)},ew.matchesSelector=function(e,t){if(eS(e),es&&!ep[t+" "]&&(!A||!A.test(t)))try{return R.call(e,t)}catch(e){ep(t,!0)}return ew(t,eo,null,[e]).length>0},T.expr={cacheLength:50,createPseudo:eT,match:eg,find:{ID:function(e,t){if(void 0!==t.getElementById&&es){var n=t.getElementById(e);return n?[n]:[]}},TAG:function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},CLASS:function(e,t){if(void 0!==t.getElementsByClassName&&es)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=U(e[1]),e[3]=U(e[3]||e[4]||e[5]||""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||z(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&z(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return B.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&F.test(n)&&(t=V(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{ID:function(e){var t=U(e);return function(e){return e.getAttribute("id")===t}},TAG:function(e){var t=U(e).toLowerCase();return"*"===e?function(){return!0}:function(e){return C(e,t)}},CLASS:function(e){var t=ec[e+" "];return t||(t=RegExp("(^|"+S+")"+e+"("+S+"|$)"))&&ec(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=T.attr(r,e);return null==i?"!="===t:!t||((i+="","="===t)?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(ed," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,m=!1;if(g){if(o){while(h){f=t;while(f=f[h])if(s?C(f,v):1===f.nodeType)return!1;d=h="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&y){m=(p=(l=(c=g[T.expando]||(g[T.expando]={}))[e]||[])[0]===eu&&l[1])&&l[2],f=p&&g.childNodes[p];while(f=++p&&f&&f[h]||(m=p=0)||d.pop())if(1===f.nodeType&&++m&&f===t){c[e]=[eu,p,m];break}}else if(y&&(m=p=(l=(c=t[T.expando]||(t[T.expando]={}))[e]||[])[0]===eu&&l[1]),!1===m){while(f=++p&&f&&f[h]||(m=p=0)||d.pop())if((s?C(f,v):1===f.nodeType)&&++m&&(y&&((c=f[T.expando]||(f[T.expando]={}))[e]=[eu,m]),f===t))break}return(m-=i)===r||m%r==0&&m/r>=0}}},PSEUDO:function(e,t){var n=T.expr.pseudos[e]||T.expr.setFilters[e.toLowerCase()]||z("unsupported pseudo: "+e);return n[T.expando]?n(t):n}},pseudos:{not:eT(function(e){var t=[],n=[],r=eO(e.replace(N,"$1"));return r[T.expando]?eT(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:eT(function(e){return function(t){return ew(e,t).length>0}}),contains:eT(function(e){return e=U(e),function(t){return(t.textContent||T.text(t)).indexOf(e)>-1}}),lang:eT(function(e){return eh.test(e||"")||z("unsupported lang: "+e),e=U(e).toLowerCase(),function(t){var n;do if(n=es?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===ea},focus:function(e){return e===eo.activeElement&&eo.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:eC(!1),disabled:eC(!0),checked:function(e){return C(e,"input")&&!!e.checked||C(e,"option")&&!!e.selected},selected:function(e){return D&&e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.expr.pseudos.empty(e)},header:function(e){return ey.test(e.nodeName)},input:function(e){return ev.test(e.nodeName)},button:function(e){return C(e,"input")&&"button"===e.type||C(e,"button")},text:function(e){return C(e,"input")&&"text"===e.type},first:eE(function(){return[0]}),last:eE(function(e,t){return[t-1]}),eq:eE(function(e,t,n){return[n<0?n+t:n]}),even:eE(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:eE(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:eE(function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:eE(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},T.expr.pseudos.nth=T.expr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.expr.pseudos[er]=function(e){return function(t){return C(t,"input")&&t.type===e}}(er);for(er in{submit:!0,reset:!0})T.expr.pseudos[er]=function(e){return function(t){return(C(t,"input")||C(t,"button"))&&t.type===e}}(er);function eD(){}function eA(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=el++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f=[eu,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(c=t[T.expando]||(t[T.expando]={}),i&&C(t,i))t=t[r]||t;else{if((l=c[o])&&l[0]===eu&&l[1]===s)return f[2]=l[2];if(c[o]=f,f[2]=e(t,n,u))return!0}return!1}}function eN(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ek(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function eO(e,t){var n,r,i,o,u=[],l=[],c=ef[e+" "];if(!c){t||(t=V(e)),o=t.length;while(o--)(c=function e(t){for(var n,r,i,o=t.length,u=T.expr.relative[t[0].type],l=u||T.expr.relative[" "],c=+!!u,f=eA(function(e){return e===n},l,!0),p=eA(function(e){return s.call(n,e)>-1},l,!0),d=[function(e,t,r){var i=!u&&(r||t!=ei)||((n=t).nodeType?f(e,t,r):p(e,t,r));return n=null,i}];c<o;c++)if(r=T.expr.relative[t[c].type])d=[eA(eN(d),r)];else{if((r=T.expr.filter[t[c].type].apply(null,t[c].matches))[T.expando]){for(i=++c;i<o&&!T.expr.relative[t[i].type];i++);return function e(t,n,r,i,o,u){return i&&!i[T.expando]&&(i=e(i)),o&&!o[T.expando]&&(o=e(o,u)),eT(function(e,u,l,c){var f,p,d,h,g=[],v=[],y=u.length,m=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ew(e,t[r],n);return n}(n||"*",l.nodeType?[l]:l,[]),x=t&&(e||!n)?ek(m,g,t,l,c):m;if(r?r(x,h=o||(e?t:y||i)?[]:u,l,c):h=x,i){f=ek(h,v),i(f,[],l,c),p=f.length;while(p--)(d=f[p])&&(h[v[p]]=!(x[v[p]]=d))}if(e){if(o||t){if(o){f=[],p=h.length;while(p--)(d=h[p])&&f.push(x[p]=d);o(null,h=[],f,c)}p=h.length;while(p--)(d=h[p])&&(f=o?s.call(e,d):g[p])>-1&&(e[f]=!(u[f]=d))}}else h=ek(h===u?h.splice(y,h.length):h),o?o(null,u,h,c):a.apply(u,h)})}(c>1&&eN(d),c>1&&Y(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(N,"$1"),r,c<i&&e(t.slice(c,i)),i<o&&e(t=t.slice(i)),i<o&&Y(t))}d.push(r)}return eN(d)}(t[o]))[T.expando]?u.push(c):l.push(c);(c=ef(e,(n=u.length>0,r=l.length>0,i=function(e,t,i,o,s){var c,f,p,d=0,h="0",g=e&&[],v=[],y=ei,m=e||r&&T.expr.find.TAG("*",s),x=eu+=null==y?1:Math.random()||.1;for(s&&(ei=t==eo||t||s);null!=(c=m[h]);h++){if(r&&c){f=0,t||c.ownerDocument==eo||(eS(c),i=!es);while(p=l[f++])if(p(c,t||eo,i)){a.call(o,c);break}s&&(eu=x)}n&&((c=!p&&c)&&d--,e&&g.push(c))}if(d+=h,n&&h!==d){f=0;while(p=u[f++])p(g,v,t,i);if(e){if(d>0)while(h--)g[h]||v[h]||(v[h]=E.call(o));v=ek(v)}a.apply(o,v),s&&!e&&v.length>0&&d+u.length>1&&T.uniqueSort(o)}return s&&(eu=x,ei=y),g},n?eT(i):i))).selector=e}return c}function ej(e,t,n,r){var i,o,s,u,l,c="function"==typeof e&&e,f=!r&&V(e=c.selector||e);if(n=n||[],1===f.length){if((o=f[0]=f[0].slice(0)).length>2&&"ID"===(s=o[0]).type&&9===t.nodeType&&es&&T.expr.relative[o[1].type]){if(!(t=(T.expr.find.ID(U(s.matches[0]),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=eg.needsContext.test(e)?0:o.length;while(i--){if(s=o[i],T.expr.relative[u=s.type])break;if((l=T.expr.find[u])&&(r=l(U(s.matches[0]),L.test(o[0].type)&&H(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Y(o)))return a.apply(n,r),n;break}}}return(c||eO(e,f))(r,t,!es,n,!t||L.test(e)&&H(t.parentNode)||t),n}function eL(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r}function eP(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}eD.prototype=T.expr.pseudos,T.expr.setFilters=new eD,eS(),T.find=ew,ew.compile=eO,ew.select=ej,ew.setDocument=eS,ew.tokenize=V;var eR=T.expr.match.needsContext,eI=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function eH(e){return"<"===e[0]&&">"===e[e.length-1]&&e.length>=3}function e$(e,t,n){return"function"==typeof t?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return s.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return(n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType)?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<r;t++)if(T.contains(i[t],this))return!0}));for(t=0,n=this.pushStack([]);t<r;t++)T.find(e,i[t],n);return r>1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(e$(this,e||[],!1))},not:function(e){return this.pushStack(e$(this,e||[],!0))},is:function(e){return!!e$(this,"string"==typeof e&&eR.test(e)?T(e):e||[],!1).length}});var eM,eB=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t){var n,r;if(!e)return this;if(e.nodeType)return this[0]=e,this.length=1,this;if("function"==typeof e)return void 0!==eM.ready?eM.ready(e):e(T);if(eH(n=e+""))n=[null,e,null];else{if("string"!=typeof e)return T.makeArray(e,this);n=eB.exec(e)}if(n&&(n[1]||!t))if(!n[1])return(r=y.getElementById(n[2]))&&(this[0]=r,this.length=1),this;else{if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),eI.test(n[1])&&T.isPlainObject(t))for(n in t)"function"==typeof this[n]?this[n](t[n]):this.attr(n,t[n]);return this}return!t||t.jquery?(t||eM).find(e):this.constructor(t).find(e)}).prototype=T.fn,eM=T(y);var eF=/^(?:parents|prev(?:Until|All))/,eq={children:!0,contents:!0,next:!0,prev:!0};function eW(e,t){while((e=e[t])&&1!==e.nodeType);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&T(e);if(!eR.test(e)){for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(T(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return eL(e,"parentNode")},parentsUntil:function(e,t,n){return eL(e,"parentNode",n)},next:function(e){return eW(e,"nextSibling")},prev:function(e){return eW(e,"previousSibling")},nextAll:function(e){return eL(e,"nextSibling")},prevAll:function(e){return eL(e,"previousSibling")},nextUntil:function(e,t,n){return eL(e,"nextSibling",n)},prevUntil:function(e,t,n){return eL(e,"previousSibling",n)},siblings:function(e){return eP((e.parentNode||{}).firstChild,e)},children:function(e){return eP(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(C(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var i=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(eq[e]||T.uniqueSort(i),eF.test(e)&&i.reverse()),this.pushStack(i)}});var eU=/-([a-z])/g;function ez(e,t){return t.toUpperCase()}function eX(e){return e.replace(eU,ez)}function e_(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function eV(){this.expando=T.expando+eV.uid++}eV.uid=1,eV.prototype={cache:function(e){var t=e[this.expando];return!t&&(t=Object.create(null),e_(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[eX(t)]=n;else for(r in t)i[eX(r)]=t[r];return n},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][eX(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(eX):(t=eX(t))in r?[t]:t.match(G)||[]).length;while(n--)delete r[t[n]]}(void 0===t||T.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};var eY=new eV,eQ=new eV,eG=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,eK=/[A-Z]/g;function eJ(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(eK,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{i=n,n="true"===i||"false"!==i&&("null"===i?null:i===+i+""?+i:eG.test(i)?JSON.parse(i):i)}catch(e){}eQ.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return eQ.hasData(e)||eY.hasData(e)},data:function(e,t,n){return eQ.access(e,t,n)},removeData:function(e,t){eQ.remove(e,t)},_data:function(e,t,n){return eY.access(e,t,n)},_removeData:function(e,t){eY.remove(e,t)}}),T.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=eQ.get(o),1===o.nodeType&&!eY.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&eJ(o,r=eX(r.slice(5)),i[r]);eY.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){eQ.set(this,e)}):Q(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=eQ.get(o,e))||void 0!==(n=eJ(o,e))?n:void 0;this.each(function(){eQ.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){eQ.remove(this,e)})}});var eZ=/^(?:input|select|textarea|button)$/i,e0=/^(?:a|area)$/i;function e1(e){return(e.match(G)||[]).join(" ")}function e2(e){return e.getAttribute&&e.getAttribute("class")||""}function e3(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(G)||[]}T.fn.extend({prop:function(e,t){return Q(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return(1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n)?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttribute("tabindex");return t?parseInt(t,10):eZ.test(e.nodeName)||e0.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),D&&(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,i,o,a;return"function"==typeof e?this.each(function(t){T(this).addClass(e.call(this,t,e2(this)))}):(t=e3(e)).length?this.each(function(){if(r=e2(this),n=1===this.nodeType&&" "+e1(r)+" "){for(o=0;o<t.length;o++)i=t[o],0>n.indexOf(" "+i+" ")&&(n+=i+" ");r!==(a=e1(n))&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,i,o,a;return"function"==typeof e?this.each(function(t){T(this).removeClass(e.call(this,t,e2(this)))}):arguments.length?(t=e3(e)).length?this.each(function(){if(r=e2(this),n=1===this.nodeType&&" "+e1(r)+" "){for(o=0;o<t.length;o++){i=t[o];while(n.indexOf(" "+i+" ")>-1)n=n.replace(" "+i+" "," ")}r!==(a=e1(n))&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o;return"function"==typeof e?this.each(function(n){T(this).toggleClass(e.call(this,n,e2(this),t),t)}):"boolean"==typeof t?t?this.addClass(e):this.removeClass(e):(n=e3(e)).length?this.each(function(){for(i=0,o=T(this);i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r)}):this},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+e1(e2(n))+" ").indexOf(t)>-1)return!0;return!1}}),T.fn.extend({val:function(e){var t,n,r,i=this[0];if(!arguments.length)return i?(t=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:null==(n=i.value)?"":n:void 0;return r="function"==typeof e,this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,T(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})}}),T.extend({valHooks:{select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if((n=i[r]).selected&&!n.disabled&&(!n.parentNode.disabled||!C(n.parentNode,"optgroup"))){if(t=T(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=T.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=T.inArray(T(r).val(),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),D&&(T.valHooks.option={get:function(e){var t=e.getAttribute("value");return null!=t?t:e1(T.text(e))}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}}});var e5=/^(?:checkbox|radio)$/i,e9=/^([^.]*)(?:\.(.+)|)/;function e6(){return!0}function e4(){return!1}function e8(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)e8(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=e4;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return T().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}function e7(e,t,n){if(!n){void 0===eY.get(e,t)&&T.event.add(e,t,e6);return}eY.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var n,r=eY.get(this,t);if(1&e.isTrigger&&this[t]){if(r.length)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=i.call(arguments),eY.set(this,t,r),this[t](),n=eY.get(this,t),eY.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(eY.set(this,t,{value:T.event.trigger(r[0],r.slice(1),this)}),e.stopPropagation(),e.isImmediatePropagationStopped=e6)}})}T.event={add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=eY.get(e);if(e_(e)){n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(P,i),n.guid||(n.guid=T.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(G)||[""]).length;while(l--){if(d=g=(s=e9.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),!d)continue;f=T.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=T.event.special[d]||{},c=T.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,(!f.setup||!1===f.setup.call(e,r,h,a))&&e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c)}}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=eY.hasData(e)&&eY.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(G)||[""]).length;while(l--){if(d=g=(s=e9.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),!d){for(d in u)T.event.remove(e,d+t[l],n,r,!0);continue}f=T.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],(i||g===c.origType)&&(!n||n.guid===c.guid)&&(!s||s.test(c.namespace))&&(!r||r===c.selector||"**"===r&&c.selector)&&(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||T.removeEvent(e,d,v.handle),delete u[d])}T.isEmptyObject(u)&&eY.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Array(arguments.length),u=T.event.fix(e),l=(eY.get(this,"events")||Object.create(null))[u.type]||[],c=T.event.special[u.type]||{};for(t=1,s[0]=u;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=T.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())(!u.rnamespace||!1===o.namespace||u.rnamespace.test(o.namespace))&&(u.handleObj=o,u.data=o.data,void 0!==(r=((T.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&!("click"===e.type&&e.button>=1)){for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(n=0,o=[],a={};n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?T(i,this).index(l)>-1:T.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(T.Event.prototype,e,{enumerable:!0,configurable:!0,get:"function"==typeof t?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[T.expando]?e:new T.Event(e)},special:T.extend(Object.create(null),{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return e5.test(t.type)&&t.click&&C(t,"input")&&e7(t,"click",!0),!1},trigger:function(e){var t=this||e;return e5.test(t.type)&&t.click&&C(t,"input")&&e7(t,"click"),!0},_default:function(e){var t=e.target;return e5.test(t.type)&&t.click&&C(t,"input")&&eY.get(t,"click")||C(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.preventDefault()}}})},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?e6:e4,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:e4,isPropagationStopped:e4,isImmediatePropagationStopped:e4,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=e6,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=e6,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=e6,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){var t=T.event.fix(e);t.type="focusin"===e.type?"focus":"blur",t.isSimulated=!0,t.target===t.currentTarget&&eY.get(this,"handle")(t)}T.event.special[e]={setup:function(){if(e7(this,e,!0),!D)return!1;this.addEventListener(t,n)},trigger:function(){return e7(this,e),!0},teardown:function(){if(!D)return!1;this.removeEventListener(t,n)},_default:function(t){return eY.get(t.target,e)},delegateType:t}}),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){T.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||T.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),T.fn.extend({on:function(e,t,n,r){return e8(this,e,t,n,r)},one:function(e,t,n,r){return e8(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,T(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(!1===t||"function"==typeof t)&&(n=t,t=void 0),!1===n&&(n=e4),this.each(function(){T.event.remove(this,e,n,t)})}});var te=/^(?:focusinfocus|focusoutblur)$/,tt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(t,n,r,i){var o,a,s,u,l,f,p,d,h=[r||y],v=c.call(t,"type")?t.type:t,m=c.call(t,"namespace")?t.namespace.split("."):[];if((a=d=s=r=r||y,!(3===r.nodeType||8===r.nodeType||te.test(v+T.event.triggered)))&&(v.indexOf(".")>-1&&(v=(m=v.split(".")).shift(),m.sort()),l=0>v.indexOf(":")&&"on"+v,(t=t[T.expando]?t:new T.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:T.makeArray(n,[t]),p=T.event.special[v]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!g(r)){for(u=p.delegateType||v,!te.test(u+v)&&(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||y)&&h.push(s.defaultView||s.parentWindow||e)}o=0;while((a=h[o++])&&!t.isPropagationStopped())d=a,t.type=o>1?u:p.bindType||v,(f=(eY.get(a,"events")||Object.create(null))[t.type]&&eY.get(a,"handle"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&e_(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=v,!i&&!t.isDefaultPrevented()&&(!p._default||!1===p._default.apply(h.pop(),n))&&e_(r)&&l&&"function"==typeof r[v]&&!g(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=v,t.isPropagationStopped()&&d.addEventListener(v,tt),r[v](),t.isPropagationStopped()&&d.removeEventListener(v,tt),T.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}});var tn=function(e){return T.contains(e.ownerDocument,e)||e.getRootNode(tr)===e.ownerDocument},tr={composed:!0};P.getRootNode||(tn=function(e){return T.contains(e.ownerDocument,e)});var ti=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,to={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};function ta(e,t){var r;return(r=void 0!==e.getElementsByTagName?n.slice.call(e.getElementsByTagName(t||"*")):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&C(e,t))?T.merge([e],r):r}to.tbody=to.tfoot=to.colgroup=to.caption=to.thead,to.th=to.td;var ts=/^$|^module$|\/(?:java|ecma)script/i;function tu(e,t){for(var n=0,r=e.length;n<r;n++)eY.set(e[n],"globalEval",!t||eY.get(t[n],"globalEval"))}var tl=/<|&#?\w+;/;function tc(e,t,r,i,o){for(var a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,g=e.length;d<g;d++)if((a=e[d])||0===a)if("object"===h(a)&&(a.nodeType||v(a)))T.merge(p,a.nodeType?[a]:a);else if(tl.test(a)){s=s||f.appendChild(t.createElement("div")),c=(u=to[(ti.exec(a)||["",""])[1].toLowerCase()]||n).length;while(--c>-1)s=s.appendChild(t.createElement(u[c]));s.innerHTML=T.htmlPrefilter(a),T.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(a));f.textContent="",d=0;while(a=p[d++]){if(i&&T.inArray(a,i)>-1){o&&o.push(a);continue}if(l=tn(a),s=ta(f.appendChild(a),"script"),l&&tu(s),r){c=0;while(a=s[c++])ts.test(a.type||"")&&r.push(a)}}return f}function tf(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function tp(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function td(e,t,n,r){t=o(t);var i,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0];if("function"==typeof h)return e.each(function(i){var o=e.eq(i);t[0]=h.call(this,i,o.html()),td(o,t,n,r)});if(p&&(a=(i=tc(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=T.map(ta(i,"script"),tf)).length;f<p;f++)l=i,f!==d&&(l=T.clone(l,!0,!0),u&&T.merge(s,ta(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,T.map(s,tp),f=0;f<u;f++)l=s[f],ts.test(l.type||"")&&!eY.get(l,"globalEval")&&T.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?T._evalUrl&&!l.noModule&&T._evalUrl(l.src,{nonce:l.nonce,crossOrigin:l.crossOrigin},c):x(l.textContent,l,c))}return e}var th=/<script|<style|<link/i;function tg(e,t){return C(e,"table")&&C(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function tv(e,t){var n,r,i,o=eY.get(e,"events");if(1===t.nodeType){if(o)for(n in eY.remove(t,"handle events"),o)for(r=0,i=o[n].length;r<i;r++)T.event.add(t,n,o[n][r]);eQ.hasData(e)&&eQ.set(t,T.extend({},eQ.get(e)))}}function ty(e,t,n){for(var r,i=t?T.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||T.cleanData(ta(r)),r.parentNode&&(n&&tn(r)&&tu(ta(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=tn(e);if(D&&(1===e.nodeType||11===e.nodeType)&&!T.isXMLDoc(e))for(r=0,a=ta(s),i=(o=ta(e)).length;r<i;r++)C(a[r],"textarea")&&(a[r].defaultValue=o[r].defaultValue);if(t)if(n)for(r=0,o=o||ta(e),a=a||ta(s),i=o.length;r<i;r++)tv(o[r],a[r]);else tv(e,s);return(a=ta(s,"script")).length>0&&tu(a,!u&&ta(e,"script")),s},cleanData:function(e){for(var t,n,r,i=T.event.special,o=0;void 0!==(n=e[o]);o++)if(e_(n)){if(t=n[eY.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[eY.expando]=void 0}n[eQ.expando]&&(n[eQ.expando]=void 0)}}}),T.fn.extend({detach:function(e){return ty(this,e,!0)},remove:function(e){return ty(this,e)},text:function(e){return Q(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return td(this,arguments,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&tg(this,e).appendChild(e)})},prepend:function(){return td(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=tg(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return td(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return td(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(ta(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return Q(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!th.test(e)&&!to[(ti.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(T.cleanData(ta(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return td(this,arguments,function(t){var n=this.parentNode;0>T.inArray(this,e)&&(T.cleanData(ta(this)),n&&n.replaceChild(t,this))},e)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){T.fn[e]=function(e){for(var n,r=[],i=T(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),T(i[s])[t](n),a.apply(r,n);return this.pushStack(r)}}),T.fn.extend({wrapAll:function(e){var t;return this[0]&&("function"==typeof e&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return"function"==typeof e?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t="function"==typeof e;return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}});var tm=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,tx=RegExp("^(?:([+-])=|)("+tm+")([a-z%]*)$","i"),tb=RegExp("^("+tm+")(?!px)[a-z%]+$","i"),tw=/^--/,tT=["Top","Right","Bottom","Left"],tC=/^[a-z]/,tE=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;function tS(e){return tC.test(e)&&tE.test(e[0].toUpperCase()+e.slice(1))}var tD=/^-ms-/;function tA(e){return eX(e.replace(tD,"ms-"))}function tN(t){var n=t.ownerDocument.defaultView;return n||(n=e),n.getComputedStyle(t)}function tk(e,t,n){var r,i=tw.test(t);return(n=n||tN(e))&&(r=n.getPropertyValue(t)||n[t],i&&r&&(r=r.replace(N,"$1")||void 0),""!==r||tn(e)||(r=T.style(e,t))),void 0!==r?r+"":r}var tO=["Webkit","Moz","ms"],tj=y.createElement("div").style;function tL(e){return e in tj?e:function(e){var t=e[0].toUpperCase()+e.slice(1),n=tO.length;while(n--)if((e=tO[n]+t)in tj)return e}(e)||e}var tP,tR,tI=y.createElement("table");function tH(){if(tI&&tI.style){var t,n=y.createElement("col"),r=y.createElement("tr"),i=y.createElement("td");if(tI.style.cssText="position:absolute;left:-11111px;border-collapse:separate;border-spacing:0",r.style.cssText="box-sizing:content-box;border:1px solid;height:1px",i.style.cssText="height:9px;width:9px;padding:0",n.span=2,P.appendChild(tI).appendChild(n).parentNode.appendChild(r).appendChild(i).parentNode.appendChild(i.cloneNode(!0)),0===tI.offsetWidth)return void P.removeChild(tI);t=e.getComputedStyle(r),tR=D||18===Math.round(parseFloat(e.getComputedStyle(n).width)),tP=Math.round(parseFloat(t.height)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth))===r.offsetHeight,P.removeChild(tI),tI=null}}T.extend(d,{reliableTrDimensions:function(){return tH(),tP},reliableColDimensions:function(){return tH(),tR}});var t$={position:"absolute",visibility:"hidden",display:"block"},tM={letterSpacing:"0",fontWeight:"400"};function tB(e,t,n){var r=tx.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function tF(e,t,n,r,i,o){var a=+("width"===t),s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=T.css(e,n+tT[a],!0,i)),r?("content"===n&&(u-=T.css(e,"padding"+tT[a],!0,i)),"margin"!==n&&(u-=T.css(e,"border"+tT[a]+"Width",!0,i))):(u+=T.css(e,"padding"+tT[a],!0,i),"padding"!==n?u+=T.css(e,"border"+tT[a]+"Width",!0,i):s+=T.css(e,"border"+tT[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function tq(e,t,n){var r=tN(e),i=(D||n)&&"border-box"===T.css(e,"boxSizing",!1,r),o=i,a=tk(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(tb.test(a)){if(!n)return a;a="auto"}return("auto"===a||D&&i||!d.reliableColDimensions()&&C(e,"col")||!d.reliableTrDimensions()&&C(e,"tr"))&&e.getClientRects().length&&(i="border-box"===T.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+tF(e,t,n||(i?"border":"content"),o,r,a)+"px"}function tW(e,t){return"none"===e.style.display||""===e.style.display&&"none"===T.css(e,"display")}T.extend({cssHooks:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=tA(t),u=tw.test(t),l=e.style;if(u||(t=tL(s)),a=T.cssHooks[t]||T.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];if("string"==(o=typeof n)&&(i=tx.exec(n))&&i[1]&&(n=function(e,t,n,r){var i,o,a=20,s=function(){return T.css(e,t,"")},u=s(),l=n&&n[3]||(tS(t)?"px":""),c=e.nodeType&&(!tS(t)||"px"!==l&&+u)&&tx.exec(T.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)T.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,T.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2]),i}(e,t,i),o="number"),null!=n&&n==n)"number"===o&&(n+=i&&i[3]||(tS(s)?"px":"")),D&&""===n&&0===t.indexOf("background")&&(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n)}},css:function(e,t,n,r){var i,o,a,s=tA(t);return(tw.test(t)||(t=tL(s)),(a=T.cssHooks[t]||T.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=tk(e,t,r)),"normal"===i&&t in tM&&(i=tM[t]),""===n||n)?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return"none"===T.css(e,"display")?function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r}(e,t$,function(){return tq(e,t,r)}):tq(e,t,r)},set:function(e,n,r){var i,o=tN(e),a=r&&"border-box"===T.css(e,"boxSizing",!1,o),s=r?tF(e,t,r,a,o):0;return s&&(i=tx.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),tB(e,n,s)}}}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+tT[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(T.cssHooks[e+t].set=tB)}),T.fn.extend({css:function(e,t){return Q(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=tN(e),i=t.length;a<i;a++)o[t[a]]=T.css(e,t[a],!1,r);return o}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,arguments.length>1)}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)};var tU={};function tz(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=eY.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&tW(r)&&(i[o]=function(e){var t,n=e.ownerDocument,r=e.nodeName,i=tU[r];return i||(t=n.body.appendChild(n.createElement(r)),i=T.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),tU[r]=i),i}(r))):"none"!==n&&(i[o]="none",eY.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}T.fn.extend({show:function(){return tz(this,!0)},hide:function(){return tz(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){tW(this)?T(this).show():T(this).hide()})}});var tX=/\[\]$/,t_=/\r?\n/g,tV=/^(?:submit|button|image|reset|file)$/i,tY=/^(?:input|select|textarea|keygen)/i;T.param=function(e,t){var n,r=[],i=function(e,t){var n="function"==typeof t?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)!function e(t,n,r,i){var o;if(Array.isArray(n))T.each(n,function(n,o){r||tX.test(t)?i(t,o):e(t+"["+("object"==typeof o&&null!=o?n:"")+"]",o,r,i)});else if(r||"object"!==h(n))i(t,n);else for(o in n)e(t+"["+o+"]",n[o],r,i)}(n,e[n],t,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&tY.test(this.nodeName)&&!tV.test(e)&&(this.checked||!e5.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(t_,"\r\n")}}):{name:t.name,value:n.replace(t_,"\r\n")}}).get()}}),T.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{n=new e.DOMParser().parseFromString(t,"text/xml")}catch(e){}return r=n&&n.getElementsByTagName("parsererror")[0],(!n||r)&&T.error("Invalid XML: "+(r?T.map(r.childNodes,function(e){return e.textContent}).join("\n"):t)),n},T.parseHTML=function(t,n,r){var i,o;return"string"==typeof t||eH(t+"")?("boolean"==typeof n&&(r=n,n=!1),n||(n=new e.DOMParser().parseFromString("","text/html")),i=eI.exec(t),o=!r&&[],i)?[n.createElement(i[1])]:(i=tc([t],n,o),o&&o.length&&T(o).remove(),T.merge([],i.childNodes)):[]},T.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=T.css(e,"position"),c=T(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=T.css(e,"top"),u=T.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),"function"==typeof t&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){T.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===T.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&e!==n.documentElement&&"static"===T.css(e,"position"))e=e.offsetParent||n.documentElement;e&&e!==r&&1===e.nodeType&&"static"!==T.css(e,"position")&&(i=T(e).offset(),i.top+=T.css(e,"borderTopWidth",!0),i.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-T.css(r,"marginTop",!0),left:t.left-i.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===T.css(e,"position"))e=e.offsetParent;return e||P})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;T.fn[e]=function(r){return Q(this,function(e,r,i){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),T.each({Height:"height",Width:"width"},function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){T.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Q(this,function(t,n,i){var o;return g(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?T.css(t,n,s):T.style(t,n,i,s)},t,a?i:void 0,a)}})}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1==arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){T.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),T.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),"function"==typeof e)return r=i.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||T.guid++,o},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.expr[":"]=T.expr.filters=T.expr.pseudos,"function"==typeof define&&define.amd&&define("jquery",[],function(){return T});var tQ=e.jQuery,tG=e.$;T.noConflict=function(t){return e.$===T&&(e.$=tG),t&&e.jQuery===T&&(e.jQuery=tQ),T},void 0===t&&(e.jQuery=e.$=T);var tK=[],tJ=function(e){tK.push(e)},tZ=function(t){e.setTimeout(function(){t.call(y,T)})};function t0(){y.removeEventListener("DOMContentLoaded",t0),e.removeEventListener("load",t0),T.ready()}return T.fn.ready=function(e){return tJ(e),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||(tJ=function(e){tK.push(e);while(tK.length)"function"==typeof(e=tK.shift())&&tZ(e)})())}}),T.ready.then=T.fn.ready,"loading"!==y.readyState?e.setTimeout(T.ready):(y.addEventListener("DOMContentLoaded",t0),e.addEventListener("load",t0)),T});jquery/jquery.min.js000064400000231634152336434510010541 0ustar00/*! jQuery v4.0.0 | (c) OpenJS Foundation and other contributors | jquery.com/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,!0):t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";if(!e.document)throw Error("jQuery requires a window with a document");var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,f=c.toString,p=f.call(Object),d={};function h(e){return null==e?e+"":"object"==typeof e?u[l.call(e)]||"object":typeof e}function g(e){return null!=e&&e===e.window}function v(e){var t=!!e&&e.length,n=h(e);return!("function"==typeof e||g(e))&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var y=e.document,m={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,i=(n=n||y).createElement("script");for(r in i.text=e,m)t&&t[r]&&(i[r]=t[r]);n.head.appendChild(i).parentNode&&i.parentNode.removeChild(i)}var b="4.0.0",w=/HTML$/i,T=function(e,t){return new T.fn.init(e,t)};function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}T.fn=T.prototype={jquery:b,constructor:T,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(T.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()}},T.extend=T.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"!=typeof a&&"function"!=typeof a&&(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(T.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||T.isPlainObject(n)?n:{},i=!1,a[t]=T.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},T.extend({expando:"jQuery"+(b+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!!e&&"[object Object]"===l.call(e)&&(!(t=r(e))||"function"==typeof(n=c.call(t,"constructor")&&t.constructor)&&f.call(n)===p)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(v(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=T.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(v(Object(e))?T.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!w.test(t||n&&n.nodeName||"HTML")},contains:function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&1===n.nodeType&&(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(v(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return o(s)},guid:1,support:d}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=n[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){u["[object "+t+"]"]=t.toLowerCase()});var j=n.pop,E="[\\x20\\t\\r\\n\\f]",k=y.documentMode,S=k&&RegExp(":enabled|:disabled|\\["+E+"*name"+E+"*="+E+"*(?:''|\"\")"),D=RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),A="(?:\\\\[\\da-fA-F]{1,6}"+E+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N=RegExp("^"+E+"*([>+~]|"+E+")"+E+"*"),q=RegExp(E+"|>"),O=/[+~]/,L=y.documentElement,H=L.matches||L.msMatchesSelector;function P(){var e=[];function t(n,r){return e.push(n+" ")>T.expr.cacheLength&&delete t[e.shift()],t[n+" "]=r}return t}function R(e){return e&&void 0!==e.getElementsByTagName&&e}var M="\\["+E+"*("+A+")(?:"+E+"*([*^$|!~]?=)"+E+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+A+"))|)"+E+"*\\]",W=":("+A+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",$={ID:RegExp("^#("+A+")"),CLASS:RegExp("^\\.("+A+")"),TAG:RegExp("^("+A+"|[*])"),ATTR:RegExp("^"+M),PSEUDO:RegExp("^"+W),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i")},I=new RegExp(W),F=RegExp("\\\\[\\da-fA-F]{1,6}"+E+"?|\\\\([^\\r\\n\\f])","g"),B=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))};function _(e){return e.replace(F,B)}function U(e){T.error("Syntax error, unrecognized expression: "+e)}var X=RegExp("^"+E+"*,"+E+"*"),z=P();function Y(e,t){var n,r,i,o,a,s,u,l=z[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=T.expr.preFilter;while(a){for(o in(!n||(r=X.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=N.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(D," ")}),a=a.slice(n.length)),$)(r=T.expr.match[o].exec(a))&&(!u[o]||(r=u[o](r)))&&(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?U(e):z(e,s).slice(0)}function G(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function V(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===h(n))for(s in i=!0,n)V(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,"function"!=typeof r&&(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(T(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o}var Q=/[^\x20\t\r\n\f]+/g;T.fn.extend({attr:function(e,t){return V(this,T.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(i=T.attrHooks[t.toLowerCase()]),void 0!==n)?null===n||!1===n&&0!==t.toLowerCase().indexOf("aria-")?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=e.getAttribute(t))?void 0:r},attrHooks:{},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Q);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),k&&(T.attrHooks.type={set:function(e,t){if("radio"===t&&C(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}});var J=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function K(e,t){return t?"\0"===e?"\uFFFD":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}T.escapeSelector=function(e){return(e+"").replace(J,K)};var Z=n.sort,ee=n.splice;function et(e,t){if(e===t)return en=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)?e==y||e.ownerDocument==y&&T.contains(y,e)?-1:t==y||t.ownerDocument==y&&T.contains(y,t)?1:0:4&n?-1:1}T.uniqueSort=function(e){var t,n=[],r=0,i=0;if(en=!1,Z.call(e,et),en){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)ee.call(e,n[r],1)}return e},T.fn.uniqueSort=function(){return this.pushStack(T.uniqueSort(i.apply(this)))};var en,er,ei,eo,ea,es,eu=0,el=0,ec=P(),ef=P(),ep=P(),ed=RegExp(E+"+","g"),eh=RegExp("^"+A+"$"),eg=T.extend({needsContext:RegExp("^"+E+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)","i")},$),ev=/^(?:input|select|textarea|button)$/i,ey=/^h\d$/i,em=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ex=function(){eE()},eb=eS(function(e){return!0===e.disabled&&C(e,"fieldset")},{dir:"parentNode",next:"legend"});function ew(e,t,n,r){var i,o,s,u,l,c,f,p=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!r&&(eE(t),t=t||eo,es)){if(11!==d&&(l=em.exec(e))){if(i=l[1]){if(9===d)return(s=t.getElementById(i))&&a.call(n,s),n;else if(p&&(s=p.getElementById(i))&&T.contains(t,s))return a.call(n,s),n}else if(l[2])return a.apply(n,t.getElementsByTagName(e)),n;else if((i=l[3])&&t.getElementsByClassName)return a.apply(n,t.getElementsByClassName(i)),n}if(!ep[e+" "]&&(!S||!S.test(e))){if(f=e,p=t,1===d&&(q.test(e)||N.test(e))){((p=O.test(e)&&R(t.parentNode)||t)!=t||k)&&((u=t.getAttribute("id"))?u=T.escapeSelector(u):t.setAttribute("id",u=T.expando)),o=(c=Y(e)).length;while(o--)c[o]=(u?"#"+u:":scope")+" "+G(c[o]);f=c.join(",")}try{return a.apply(n,p.querySelectorAll(f)),n}catch(t){ep(e,!0)}finally{u===T.expando&&t.removeAttribute("id")}}}return eq(e.replace(D,"$1"),t,n,r)}function eT(e){return e[T.expando]=!0,e}function eC(e){return function(t){if("form"in t){if(t.parentNode&&!1===t.disabled){if("label"in t)if("label"in t.parentNode)return t.parentNode.disabled===e;else return t.disabled===e;return t.isDisabled===e||!e!==t.isDisabled&&eb(t)===e}return t.disabled===e}return"label"in t&&t.disabled===e}}function ej(e){return eT(function(t){return t*=1,eT(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function eE(e){var t,n=e?e.ownerDocument||e:y;n!=eo&&9===n.nodeType&&(ea=(eo=n).documentElement,es=!T.isXMLDoc(eo),k&&y!=eo&&(t=eo.defaultView)&&t.top!==t&&t.addEventListener("unload",ex))}for(er in ew.matches=function(e,t){return ew(e,null,null,t)},ew.matchesSelector=function(e,t){if(eE(e),es&&!ep[t+" "]&&(!S||!S.test(t)))try{return H.call(e,t)}catch(e){ep(t,!0)}return ew(t,eo,null,[e]).length>0},T.expr={cacheLength:50,createPseudo:eT,match:eg,find:{ID:function(e,t){if(void 0!==t.getElementById&&es){var n=t.getElementById(e);return n?[n]:[]}},TAG:function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},CLASS:function(e,t){if(void 0!==t.getElementsByClassName&&es)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=_(e[1]),e[3]=_(e[3]||e[4]||e[5]||""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||U(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&U(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&I.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{ID:function(e){var t=_(e);return function(e){return e.getAttribute("id")===t}},TAG:function(e){var t=_(e).toLowerCase();return"*"===e?function(){return!0}:function(e){return C(e,t)}},CLASS:function(e){var t=ec[e+" "];return t||(t=RegExp("(^|"+E+")"+e+"("+E+"|$)"))&&ec(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=T.attr(r,e);return null==i?"!="===t:!t||((i+="","="===t)?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(ed," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,m=!1;if(g){if(o){while(h){f=t;while(f=f[h])if(s?C(f,v):1===f.nodeType)return!1;d=h="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&y){m=(p=(l=(c=g[T.expando]||(g[T.expando]={}))[e]||[])[0]===eu&&l[1])&&l[2],f=p&&g.childNodes[p];while(f=++p&&f&&f[h]||(m=p=0)||d.pop())if(1===f.nodeType&&++m&&f===t){c[e]=[eu,p,m];break}}else if(y&&(m=p=(l=(c=t[T.expando]||(t[T.expando]={}))[e]||[])[0]===eu&&l[1]),!1===m){while(f=++p&&f&&f[h]||(m=p=0)||d.pop())if((s?C(f,v):1===f.nodeType)&&++m&&(y&&((c=f[T.expando]||(f[T.expando]={}))[e]=[eu,m]),f===t))break}return(m-=i)===r||m%r==0&&m/r>=0}}},PSEUDO:function(e,t){var n=T.expr.pseudos[e]||T.expr.setFilters[e.toLowerCase()]||U("unsupported pseudo: "+e);return n[T.expando]?n(t):n}},pseudos:{not:eT(function(e){var t=[],n=[],r=eN(e.replace(D,"$1"));return r[T.expando]?eT(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:eT(function(e){return function(t){return ew(e,t).length>0}}),contains:eT(function(e){return e=_(e),function(t){return(t.textContent||T.text(t)).indexOf(e)>-1}}),lang:eT(function(e){return eh.test(e||"")||U("unsupported lang: "+e),e=_(e).toLowerCase(),function(t){var n;do if(n=es?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===ea},focus:function(e){return e===eo.activeElement&&eo.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:eC(!1),disabled:eC(!0),checked:function(e){return C(e,"input")&&!!e.checked||C(e,"option")&&!!e.selected},selected:function(e){return k&&e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.expr.pseudos.empty(e)},header:function(e){return ey.test(e.nodeName)},input:function(e){return ev.test(e.nodeName)},button:function(e){return C(e,"input")&&"button"===e.type||C(e,"button")},text:function(e){return C(e,"input")&&"text"===e.type},first:ej(function(){return[0]}),last:ej(function(e,t){return[t-1]}),eq:ej(function(e,t,n){return[n<0?n+t:n]}),even:ej(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ej(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ej(function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:ej(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},T.expr.pseudos.nth=T.expr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.expr.pseudos[er]=function(e){return function(t){return C(t,"input")&&t.type===e}}(er);for(er in{submit:!0,reset:!0})T.expr.pseudos[er]=function(e){return function(t){return(C(t,"input")||C(t,"button"))&&t.type===e}}(er);function ek(){}function eS(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=el++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f=[eu,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(c=t[T.expando]||(t[T.expando]={}),i&&C(t,i))t=t[r]||t;else{if((l=c[o])&&l[0]===eu&&l[1]===s)return f[2]=l[2];if(c[o]=f,f[2]=e(t,n,u))return!0}return!1}}function eD(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function eA(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function eN(e,t){var n,r,i,o,u=[],l=[],c=ef[e+" "];if(!c){t||(t=Y(e)),o=t.length;while(o--)(c=function e(t){for(var n,r,i,o=t.length,u=T.expr.relative[t[0].type],l=u||T.expr.relative[" "],c=+!!u,f=eS(function(e){return e===n},l,!0),p=eS(function(e){return s.call(n,e)>-1},l,!0),d=[function(e,t,r){var i=!u&&(r||t!=ei)||((n=t).nodeType?f(e,t,r):p(e,t,r));return n=null,i}];c<o;c++)if(r=T.expr.relative[t[c].type])d=[eS(eD(d),r)];else{if((r=T.expr.filter[t[c].type].apply(null,t[c].matches))[T.expando]){for(i=++c;i<o&&!T.expr.relative[t[i].type];i++);return function e(t,n,r,i,o,u){return i&&!i[T.expando]&&(i=e(i)),o&&!o[T.expando]&&(o=e(o,u)),eT(function(e,u,l,c){var f,p,d,h,g=[],v=[],y=u.length,m=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ew(e,t[r],n);return n}(n||"*",l.nodeType?[l]:l,[]),x=t&&(e||!n)?eA(m,g,t,l,c):m;if(r?r(x,h=o||(e?t:y||i)?[]:u,l,c):h=x,i){f=eA(h,v),i(f,[],l,c),p=f.length;while(p--)(d=f[p])&&(h[v[p]]=!(x[v[p]]=d))}if(e){if(o||t){if(o){f=[],p=h.length;while(p--)(d=h[p])&&f.push(x[p]=d);o(null,h=[],f,c)}p=h.length;while(p--)(d=h[p])&&(f=o?s.call(e,d):g[p])>-1&&(e[f]=!(u[f]=d))}}else h=eA(h===u?h.splice(y,h.length):h),o?o(null,u,h,c):a.apply(u,h)})}(c>1&&eD(d),c>1&&G(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(D,"$1"),r,c<i&&e(t.slice(c,i)),i<o&&e(t=t.slice(i)),i<o&&G(t))}d.push(r)}return eD(d)}(t[o]))[T.expando]?u.push(c):l.push(c);(c=ef(e,(n=u.length>0,r=l.length>0,i=function(e,t,i,o,s){var c,f,p,d=0,h="0",g=e&&[],v=[],y=ei,m=e||r&&T.expr.find.TAG("*",s),x=eu+=null==y?1:Math.random()||.1;for(s&&(ei=t==eo||t||s);null!=(c=m[h]);h++){if(r&&c){f=0,t||c.ownerDocument==eo||(eE(c),i=!es);while(p=l[f++])if(p(c,t||eo,i)){a.call(o,c);break}s&&(eu=x)}n&&((c=!p&&c)&&d--,e&&g.push(c))}if(d+=h,n&&h!==d){f=0;while(p=u[f++])p(g,v,t,i);if(e){if(d>0)while(h--)g[h]||v[h]||(v[h]=j.call(o));v=eA(v)}a.apply(o,v),s&&!e&&v.length>0&&d+u.length>1&&T.uniqueSort(o)}return s&&(eu=x,ei=y),g},n?eT(i):i))).selector=e}return c}function eq(e,t,n,r){var i,o,s,u,l,c="function"==typeof e&&e,f=!r&&Y(e=c.selector||e);if(n=n||[],1===f.length){if((o=f[0]=f[0].slice(0)).length>2&&"ID"===(s=o[0]).type&&9===t.nodeType&&es&&T.expr.relative[o[1].type]){if(!(t=(T.expr.find.ID(_(s.matches[0]),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=eg.needsContext.test(e)?0:o.length;while(i--){if(s=o[i],T.expr.relative[u=s.type])break;if((l=T.expr.find[u])&&(r=l(_(s.matches[0]),O.test(o[0].type)&&R(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&G(o)))return a.apply(n,r),n;break}}}return(c||eN(e,f))(r,t,!es,n,!t||O.test(e)&&R(t.parentNode)||t),n}function eO(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r}function eL(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}ek.prototype=T.expr.pseudos,T.expr.setFilters=new ek,eE(),T.find=ew,ew.compile=eN,ew.select=eq,ew.setDocument=eE,ew.tokenize=Y;var eH=T.expr.match.needsContext,eP=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function eR(e){return"<"===e[0]&&">"===e[e.length-1]&&e.length>=3}function eM(e,t,n){return"function"==typeof t?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return s.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return(n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType)?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<r;t++)if(T.contains(i[t],this))return!0}));for(t=0,n=this.pushStack([]);t<r;t++)T.find(e,i[t],n);return r>1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(eM(this,e||[],!1))},not:function(e){return this.pushStack(eM(this,e||[],!0))},is:function(e){return!!eM(this,"string"==typeof e&&eH.test(e)?T(e):e||[],!1).length}});var eW,e$=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t){var n,r;if(!e)return this;if(e.nodeType)return this[0]=e,this.length=1,this;if("function"==typeof e)return void 0!==eW.ready?eW.ready(e):e(T);if(eR(n=e+""))n=[null,e,null];else{if("string"!=typeof e)return T.makeArray(e,this);n=e$.exec(e)}if(n&&(n[1]||!t))if(!n[1])return(r=y.getElementById(n[2]))&&(this[0]=r,this.length=1),this;else{if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),eP.test(n[1])&&T.isPlainObject(t))for(n in t)"function"==typeof this[n]?this[n](t[n]):this.attr(n,t[n]);return this}return!t||t.jquery?(t||eW).find(e):this.constructor(t).find(e)}).prototype=T.fn,eW=T(y);var eI=/^(?:parents|prev(?:Until|All))/,eF={children:!0,contents:!0,next:!0,prev:!0};function eB(e,t){while((e=e[t])&&1!==e.nodeType);return e}function e_(e){return e}function eU(e){throw e}function eX(e,t,n,r){var i;try{e&&"function"==typeof(i=e.promise)?i.call(e).done(t).fail(n):e&&"function"==typeof(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n(e)}}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&T(e);if(!eH.test(e)){for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(T(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return eO(e,"parentNode")},parentsUntil:function(e,t,n){return eO(e,"parentNode",n)},next:function(e){return eB(e,"nextSibling")},prev:function(e){return eB(e,"previousSibling")},nextAll:function(e){return eO(e,"nextSibling")},prevAll:function(e){return eO(e,"previousSibling")},nextUntil:function(e,t,n){return eO(e,"nextSibling",n)},prevUntil:function(e,t,n){return eO(e,"previousSibling",n)},siblings:function(e){return eL((e.parentNode||{}).firstChild,e)},children:function(e){return eL(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(C(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var i=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(eF[e]||T.uniqueSort(i),eI.test(e)&&i.reverse()),this.pushStack(i)}}),T.Callbacks=function(e){e="string"==typeof e?(t=e,n={},T.each(t.match(Q)||[],function(e,t){n[t]=!0}),n):T.extend({},e);var t,n,r,i,o,a,s=[],u=[],l=-1,c=function(){for(a=a||e.once,o=r=!0;u.length;l=-1){i=u.shift();while(++l<s.length)!1===s[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=s.length,i=!1)}e.memory||(i=!1),r=!1,a&&(s=i?[]:"")},f={add:function(){return s&&(i&&!r&&(l=s.length-1,u.push(i)),!function t(n){T.each(n,function(n,r){"function"==typeof r?e.unique&&f.has(r)||s.push(r):r&&r.length&&"string"!==h(r)&&t(r)})}(arguments),i&&!r&&c()),this},remove:function(){return T.each(arguments,function(e,t){var n;while((n=T.inArray(t,s,n))>-1)s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?T.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=i="",this},disabled:function(){return!s},lock:function(){return a=u=[],i||r||(s=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return!a&&(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),r||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},T.extend({Deferred:function(t){var n=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return T.Deferred(function(t){T.each(n,function(n,r){var i="function"==typeof e[r[4]]&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw TypeError("Thenable self-resolution");"function"==typeof(l=e&&("object"==typeof e||"function"==typeof e)&&e.then)?i?l.call(e,a(o,n,e_,i),a(o,n,eU,i)):(o++,l.call(e,a(o,n,e_,i),a(o,n,eU,i),a(o,n,e_,n.notifyWith))):(r!==e_&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(e,c.error),t+1>=o&&(r!==eU&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(T.Deferred.getErrorHook&&(c.error=T.Deferred.getErrorHook()),e.setTimeout(c))}}return T.Deferred(function(e){n[0][3].add(a(0,e,"function"==typeof i?i:e_,e.notifyWith)),n[1][3].add(a(0,e,"function"==typeof t?t:e_)),n[2][3].add(a(0,e,"function"==typeof r?r:eU))}).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},o={};return T.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=T.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(eX(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||"function"==typeof(o[n]&&o[n].then)))return a.then();while(n--)eX(o[n],s(n),a.reject);return a.promise()}});var ez=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(t,n){t&&ez.test(t.name)&&e.console.warn("jQuery.Deferred exception",t,n)},T.readyException=function(t){e.setTimeout(function(){throw t})};var eY=T.Deferred();function eG(){y.removeEventListener("DOMContentLoaded",eG),e.removeEventListener("load",eG),T.ready()}T.fn.ready=function(e){return eY.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||eY.resolveWith(y,[T]))}}),T.ready.then=eY.then,"loading"!==y.readyState?e.setTimeout(T.ready):(y.addEventListener("DOMContentLoaded",eG),e.addEventListener("load",eG));var eV=/-([a-z])/g;function eQ(e,t){return t.toUpperCase()}function eJ(e){return e.replace(eV,eQ)}function eK(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function eZ(){this.expando=T.expando+eZ.uid++}eZ.uid=1,eZ.prototype={cache:function(e){var t=e[this.expando];return!t&&(t=Object.create(null),eK(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[eJ(t)]=n;else for(r in t)i[eJ(r)]=t[r];return n},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][eJ(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(eJ):(t=eJ(t))in r?[t]:t.match(Q)||[]).length;while(n--)delete r[t[n]]}(void 0===t||T.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};var e0=new eZ,e1=new eZ,e2=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,e3=/[A-Z]/g;function e4(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(e3,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{i=n,n="true"===i||"false"!==i&&("null"===i?null:i===+i+""?+i:e2.test(i)?JSON.parse(i):i)}catch(e){}e1.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return e1.hasData(e)||e0.hasData(e)},data:function(e,t,n){return e1.access(e,t,n)},removeData:function(e,t){e1.remove(e,t)},_data:function(e,t,n){return e0.access(e,t,n)},_removeData:function(e,t){e0.remove(e,t)}}),T.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=e1.get(o),1===o.nodeType&&!e0.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&e4(o,r=eJ(r.slice(5)),i[r]);e0.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){e1.set(this,e)}):V(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=e1.get(o,e))||void 0!==(n=e4(o,e))?n:void 0;this.each(function(){e1.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){e1.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=e0.get(e,t),n&&(!r||Array.isArray(n)?r=e0.set(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),o=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){T.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return e0.get(e,n)||e0.set(e,n,{empty:T.Callbacks("once memory").add(function(){e0.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(e,t){var n=2;return("string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n)?T.queue(this[0],e):void 0===t?this:this.each(function(){var n=T.queue(this,e,t);T._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&T.dequeue(this,e)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=T.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=e0.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var e5=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,e9=RegExp("^(?:([+-])=|)("+e5+")([a-z%]*)$","i"),e6=["Top","Right","Bottom","Left"];function e8(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&"none"===T.css(e,"display")}var e7=/^[a-z]/,te=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;function tt(e){return e7.test(e)&&te.test(e[0].toUpperCase()+e.slice(1))}function tn(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return T.css(e,t,"")},u=s(),l=n&&n[3]||(tt(t)?"px":""),c=e.nodeType&&(!tt(t)||"px"!==l&&+u)&&e9.exec(T.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)T.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,T.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var tr=/^-ms-/;function ti(e){return eJ(e.replace(tr,"ms-"))}var to={};function ta(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=e0.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&e8(r)&&(i[o]=function(e){var t,n=e.ownerDocument,r=e.nodeName,i=to[r];return i||(t=n.body.appendChild(n.createElement(r)),i=T.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),to[r]=i),i}(r))):"none"!==n&&(i[o]="none",e0.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}T.fn.extend({show:function(){return ta(this,!0)},hide:function(){return ta(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){e8(this)?T(this).show():T(this).hide()})}});var ts=function(e){return T.contains(e.ownerDocument,e)||e.getRootNode(tu)===e.ownerDocument},tu={composed:!0};L.getRootNode||(ts=function(e){return T.contains(e.ownerDocument,e)});var tl=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,tc={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};function tf(e,t){var r;return(r=void 0!==e.getElementsByTagName?n.slice.call(e.getElementsByTagName(t||"*")):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&C(e,t))?T.merge([e],r):r}tc.tbody=tc.tfoot=tc.colgroup=tc.caption=tc.thead,tc.th=tc.td;var tp=/^$|^module$|\/(?:java|ecma)script/i;function td(e,t){for(var n=0,r=e.length;n<r;n++)e0.set(e[n],"globalEval",!t||e0.get(t[n],"globalEval"))}var th=/<|&#?\w+;/;function tg(e,t,r,i,o){for(var a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,g=e.length;d<g;d++)if((a=e[d])||0===a)if("object"===h(a)&&(a.nodeType||v(a)))T.merge(p,a.nodeType?[a]:a);else if(th.test(a)){s=s||f.appendChild(t.createElement("div")),c=(u=tc[(tl.exec(a)||["",""])[1].toLowerCase()]||n).length;while(--c>-1)s=s.appendChild(t.createElement(u[c]));s.innerHTML=T.htmlPrefilter(a),T.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(a));f.textContent="",d=0;while(a=p[d++]){if(i&&T.inArray(a,i)>-1){o&&o.push(a);continue}if(l=ts(a),s=tf(f.appendChild(a),"script"),l&&td(s),r){c=0;while(a=s[c++])tp.test(a.type||"")&&r.push(a)}}return f}function tv(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ty(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function tm(e,t,n,r){t=o(t);var i,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0];if("function"==typeof h)return e.each(function(i){var o=e.eq(i);t[0]=h.call(this,i,o.html()),tm(o,t,n,r)});if(p&&(a=(i=tg(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=T.map(tf(i,"script"),tv)).length;f<p;f++)l=i,f!==d&&(l=T.clone(l,!0,!0),u&&T.merge(s,tf(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,T.map(s,ty),f=0;f<u;f++)l=s[f],tp.test(l.type||"")&&!e0.get(l,"globalEval")&&T.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?T._evalUrl&&!l.noModule&&T._evalUrl(l.src,{nonce:l.nonce,crossOrigin:l.crossOrigin},c):x(l.textContent,l,c))}return e}var tx=/^(?:checkbox|radio)$/i,tb=/^([^.]*)(?:\.(.+)|)/;function tw(){return!0}function tT(){return!1}function tC(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)tC(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=tT;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return T().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}function tj(e,t,n){if(!n){void 0===e0.get(e,t)&&T.event.add(e,t,tw);return}e0.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var n,r=e0.get(this,t);if(1&e.isTrigger&&this[t]){if(r.length)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=i.call(arguments),e0.set(this,t,r),this[t](),n=e0.get(this,t),e0.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(e0.set(this,t,{value:T.event.trigger(r[0],r.slice(1),this)}),e.stopPropagation(),e.isImmediatePropagationStopped=tw)}})}T.event={add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=e0.get(e);if(eK(e)){n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(L,i),n.guid||(n.guid=T.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(Q)||[""]).length;while(l--){if(d=g=(s=tb.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),!d)continue;f=T.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=T.event.special[d]||{},c=T.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,(!f.setup||!1===f.setup.call(e,r,h,a))&&e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c)}}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=e0.hasData(e)&&e0.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(Q)||[""]).length;while(l--){if(d=g=(s=tb.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),!d){for(d in u)T.event.remove(e,d+t[l],n,r,!0);continue}f=T.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],(i||g===c.origType)&&(!n||n.guid===c.guid)&&(!s||s.test(c.namespace))&&(!r||r===c.selector||"**"===r&&c.selector)&&(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||T.removeEvent(e,d,v.handle),delete u[d])}T.isEmptyObject(u)&&e0.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Array(arguments.length),u=T.event.fix(e),l=(e0.get(this,"events")||Object.create(null))[u.type]||[],c=T.event.special[u.type]||{};for(t=1,s[0]=u;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=T.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())(!u.rnamespace||!1===o.namespace||u.rnamespace.test(o.namespace))&&(u.handleObj=o,u.data=o.data,void 0!==(r=((T.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&!("click"===e.type&&e.button>=1)){for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(n=0,o=[],a={};n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?T(i,this).index(l)>-1:T.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(T.Event.prototype,e,{enumerable:!0,configurable:!0,get:"function"==typeof t?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[T.expando]?e:new T.Event(e)},special:T.extend(Object.create(null),{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return tx.test(t.type)&&t.click&&C(t,"input")&&tj(t,"click",!0),!1},trigger:function(e){var t=this||e;return tx.test(t.type)&&t.click&&C(t,"input")&&tj(t,"click"),!0},_default:function(e){var t=e.target;return tx.test(t.type)&&t.click&&C(t,"input")&&e0.get(t,"click")||C(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.preventDefault()}}})},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?tw:tT,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:tT,isPropagationStopped:tT,isImmediatePropagationStopped:tT,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=tw,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=tw,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=tw,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){var t=T.event.fix(e);t.type="focusin"===e.type?"focus":"blur",t.isSimulated=!0,t.target===t.currentTarget&&e0.get(this,"handle")(t)}T.event.special[e]={setup:function(){if(tj(this,e,!0),!k)return!1;this.addEventListener(t,n)},trigger:function(){return tj(this,e),!0},teardown:function(){if(!k)return!1;this.removeEventListener(t,n)},_default:function(t){return e0.get(t.target,e)},delegateType:t}}),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){T.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||T.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),T.fn.extend({on:function(e,t,n,r){return tC(this,e,t,n,r)},one:function(e,t,n,r){return tC(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,T(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(!1===t||"function"==typeof t)&&(n=t,t=void 0),!1===n&&(n=tT),this.each(function(){T.event.remove(this,e,n,t)})}});var tE=/<script|<style|<link/i;function tk(e,t){return C(e,"table")&&C(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function tS(e,t){var n,r,i,o=e0.get(e,"events");if(1===t.nodeType){if(o)for(n in e0.remove(t,"handle events"),o)for(r=0,i=o[n].length;r<i;r++)T.event.add(t,n,o[n][r]);e1.hasData(e)&&e1.set(t,T.extend({},e1.get(e)))}}function tD(e,t,n){for(var r,i=t?T.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||T.cleanData(tf(r)),r.parentNode&&(n&&ts(r)&&td(tf(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=ts(e);if(k&&(1===e.nodeType||11===e.nodeType)&&!T.isXMLDoc(e))for(r=0,a=tf(s),i=(o=tf(e)).length;r<i;r++)C(a[r],"textarea")&&(a[r].defaultValue=o[r].defaultValue);if(t)if(n)for(r=0,o=o||tf(e),a=a||tf(s),i=o.length;r<i;r++)tS(o[r],a[r]);else tS(e,s);return(a=tf(s,"script")).length>0&&td(a,!u&&tf(e,"script")),s},cleanData:function(e){for(var t,n,r,i=T.event.special,o=0;void 0!==(n=e[o]);o++)if(eK(n)){if(t=n[e0.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[e0.expando]=void 0}n[e1.expando]&&(n[e1.expando]=void 0)}}}),T.fn.extend({detach:function(e){return tD(this,e,!0)},remove:function(e){return tD(this,e)},text:function(e){return V(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return tm(this,arguments,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&tk(this,e).appendChild(e)})},prepend:function(){return tm(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=tk(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return tm(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return tm(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(tf(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return V(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tE.test(e)&&!tc[(tl.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(T.cleanData(tf(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return tm(this,arguments,function(t){var n=this.parentNode;0>T.inArray(this,e)&&(T.cleanData(tf(this)),n&&n.replaceChild(t,this))},e)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){T.fn[e]=function(e){for(var n,r=[],i=T(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),T(i[s])[t](n),a.apply(r,n);return this.pushStack(r)}});var tA=RegExp("^("+e5+")(?!px)[a-z%]+$","i"),tN=/^--/;function tq(t){var n=t.ownerDocument.defaultView;return n||(n=e),n.getComputedStyle(t)}function tO(e,t,n){var r,i=tN.test(t);return(n=n||tq(e))&&(r=n.getPropertyValue(t)||n[t],i&&r&&(r=r.replace(D,"$1")||void 0),""!==r||ts(e)||(r=T.style(e,t))),void 0!==r?r+"":r}var tL=["Webkit","Moz","ms"],tH=y.createElement("div").style;function tP(e){return e in tH?e:function(e){var t=e[0].toUpperCase()+e.slice(1),n=tL.length;while(n--)if((e=tL[n]+t)in tH)return e}(e)||e}var tR,tM,tW=y.createElement("table");function t$(){if(tW&&tW.style){var t,n=y.createElement("col"),r=y.createElement("tr"),i=y.createElement("td");if(tW.style.cssText="position:absolute;left:-11111px;border-collapse:separate;border-spacing:0",r.style.cssText="box-sizing:content-box;border:1px solid;height:1px",i.style.cssText="height:9px;width:9px;padding:0",n.span=2,L.appendChild(tW).appendChild(n).parentNode.appendChild(r).appendChild(i).parentNode.appendChild(i.cloneNode(!0)),0===tW.offsetWidth)return void L.removeChild(tW);t=e.getComputedStyle(r),tM=k||18===Math.round(parseFloat(e.getComputedStyle(n).width)),tR=Math.round(parseFloat(t.height)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth))===r.offsetHeight,L.removeChild(tW),tW=null}}T.extend(d,{reliableTrDimensions:function(){return t$(),tR},reliableColDimensions:function(){return t$(),tM}});var tI={position:"absolute",visibility:"hidden",display:"block"},tF={letterSpacing:"0",fontWeight:"400"};function tB(e,t,n){var r=e9.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function t_(e,t,n,r,i,o){var a=+("width"===t),s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=T.css(e,n+e6[a],!0,i)),r?("content"===n&&(u-=T.css(e,"padding"+e6[a],!0,i)),"margin"!==n&&(u-=T.css(e,"border"+e6[a]+"Width",!0,i))):(u+=T.css(e,"padding"+e6[a],!0,i),"padding"!==n?u+=T.css(e,"border"+e6[a]+"Width",!0,i):s+=T.css(e,"border"+e6[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function tU(e,t,n){var r=tq(e),i=(k||n)&&"border-box"===T.css(e,"boxSizing",!1,r),o=i,a=tO(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(tA.test(a)){if(!n)return a;a="auto"}return("auto"===a||k&&i||!d.reliableColDimensions()&&C(e,"col")||!d.reliableTrDimensions()&&C(e,"tr"))&&e.getClientRects().length&&(i="border-box"===T.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+t_(e,t,n||(i?"border":"content"),o,r,a)+"px"}function tX(e,t,n,r,i){return new tX.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=ti(t),u=tN.test(t),l=e.style;if(u||(t=tP(s)),a=T.cssHooks[t]||T.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];if("string"==(o=typeof n)&&(i=e9.exec(n))&&i[1]&&(n=tn(e,t,i),o="number"),null!=n&&n==n)"number"===o&&(n+=i&&i[3]||(tt(s)?"px":"")),k&&""===n&&0===t.indexOf("background")&&(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n)}},css:function(e,t,n,r){var i,o,a,s=ti(t);return(tN.test(t)||(t=tP(s)),(a=T.cssHooks[t]||T.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=tO(e,t,r)),"normal"===i&&t in tF&&(i=tF[t]),""===n||n)?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return"none"===T.css(e,"display")?function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r}(e,tI,function(){return tU(e,t,r)}):tU(e,t,r)},set:function(e,n,r){var i,o=tq(e),a=r&&"border-box"===T.css(e,"boxSizing",!1,o),s=r?t_(e,t,r,a,o):0;return s&&(i=e9.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),tB(e,n,s)}}}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+e6[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(T.cssHooks[e+t].set=tB)}),T.fn.extend({css:function(e,t){return V(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=tq(e),i=t.length;a<i;a++)o[t[a]]=T.css(e,t[a],!1,r);return o}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,arguments.length>1)}}),T.Tween=tX,tX.prototype={constructor:tX,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(tt(n)?"px":"")},cur:function(){var e=tX.propHooks[this.prop];return e&&e.get?e.get(this):tX.propHooks._default.get(this)},run:function(e){var t,n=tX.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tX.propHooks._default.set(this),this}},tX.prototype.init.prototype=tX.prototype,tX.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1===e.elem.nodeType&&(T.cssHooks[e.prop]||null!=e.elem.style[tP(e.prop)])?T.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},T.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=tX.prototype.init,T.fx.step={};var tz,tY,tG=/^(?:toggle|show|hide)$/,tV=/queueHooks$/;function tQ(){return e.setTimeout(function(){tz=void 0}),tz=Date.now()}function tJ(e,t){var n,r=0,i={height:e};for(t=+!!t;r<4;r+=2-t)i["margin"+(n=e6[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function tK(e,t,n){for(var r,i=(tZ.tweeners[t]||[]).concat(tZ.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function tZ(e,t,n){var r,i,o=0,a=tZ.prefilters.length,s=T.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=tz||tQ(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return(s.notifyWith(e,[l,r,n]),r<1&&a)?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:T.extend({},t),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},n),originalProperties:t,originalOptions:n,startTime:tz||tQ(),duration:n.duration,tweens:[],createTween:function(t,n){var r=T.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=ti(n)],Array.isArray(o=e[n])&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=T.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=tZ.prefilters[o].call(l,e,c,l.opts))return"function"==typeof r.stop&&(T._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return T.map(c,tK,l),"function"==typeof l.opts.start&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),T.fx.timer(T.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}T.Animation=T.extend(tZ,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return tn(n.elem,e,e9.exec(t),n),n}]},tweener:function(e,t){"function"==typeof e?(t=e,e=["*"]):e=e.match(Q);for(var n,r=0,i=e.length;r<i;r++)n=e[r],tZ.tweeners[n]=tZ.tweeners[n]||[],tZ.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&e8(e),v=e0.get(e,"fxshow");for(r in n.queue||(null==(a=T._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,T.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],tG.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show"))if("show"!==i||!v||void 0===v[r])continue;else g=!0;d[r]=v&&v[r]||T.style(e,r)}if(!(!(u=!T.isEmptyObject(t))&&T.isEmptyObject(d)))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=e0.get(e,"display")),"none"===(c=T.css(e,"display"))&&(l?c=l:(ta([e],!0),l=e.style.display||l,c=T.css(e,"display"),ta([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===T.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(l="none"===(c=h.display)?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=e0.set(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&ta([e],!0),p.done(function(){for(r in g||ta([e]),e0.remove(e,"fxshow"),d)T.style(e,r,d[r])})),u=tK(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?tZ.prefilters.unshift(e):tZ.prefilters.push(e)}}),T.speed=function(e,t,n){var r=e&&"object"==typeof e?T.extend({},e):{complete:n||t||"function"==typeof e&&e,duration:e,easing:n&&t||t&&"function"!=typeof t&&t};return T.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in T.fx.speeds?r.duration=T.fx.speeds[r.duration]:r.duration=T.fx.speeds._default),(null==r.queue||!0===r.queue)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){"function"==typeof r.old&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(e8).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=T.isEmptyObject(e),o=T.speed(t,n,r),a=function(){var t=tZ(this,T.extend({},e),o);(i||e0.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=T.timers,a=e0.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&tV.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem===this&&(null==e||o[i].queue===e)&&(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&T.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=e0.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=T.timers,a=r?r.length:0;for(n.finish=!0,T.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),T.each(["toggle","show","hide"],function(e,t){var n=T.fn[t];T.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(tJ(t,!0),e,r,i)}}),T.each({slideDown:tJ("show"),slideUp:tJ("hide"),slideToggle:tJ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){T.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(tz=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),tz=void 0},T.fx.timer=function(e){T.timers.push(e),T.fx.start()},T.fx.start=function(){tY||(tY=!0,function t(){tY&&(!1===y.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,13),T.fx.tick())}())},T.fx.stop=function(){tY=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(t,n){return t=T.fx&&T.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})};var t0=/^(?:input|select|textarea|button)$/i,t1=/^(?:a|area)$/i;function t2(e){return(e.match(Q)||[]).join(" ")}function t3(e){return e.getAttribute&&e.getAttribute("class")||""}function t4(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Q)||[]}T.fn.extend({prop:function(e,t){return V(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return(1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n)?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttribute("tabindex");return t?parseInt(t,10):t0.test(e.nodeName)||t1.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),k&&(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,i,o,a;return"function"==typeof e?this.each(function(t){T(this).addClass(e.call(this,t,t3(this)))}):(t=t4(e)).length?this.each(function(){if(r=t3(this),n=1===this.nodeType&&" "+t2(r)+" "){for(o=0;o<t.length;o++)i=t[o],0>n.indexOf(" "+i+" ")&&(n+=i+" ");r!==(a=t2(n))&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,i,o,a;return"function"==typeof e?this.each(function(t){T(this).removeClass(e.call(this,t,t3(this)))}):arguments.length?(t=t4(e)).length?this.each(function(){if(r=t3(this),n=1===this.nodeType&&" "+t2(r)+" "){for(o=0;o<t.length;o++){i=t[o];while(n.indexOf(" "+i+" ")>-1)n=n.replace(" "+i+" "," ")}r!==(a=t2(n))&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o;return"function"==typeof e?this.each(function(n){T(this).toggleClass(e.call(this,n,t3(this),t),t)}):"boolean"==typeof t?t?this.addClass(e):this.removeClass(e):(n=t4(e)).length?this.each(function(){for(i=0,o=T(this);i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r)}):this},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+t2(t3(n))+" ").indexOf(t)>-1)return!0;return!1}}),T.fn.extend({val:function(e){var t,n,r,i=this[0];if(!arguments.length)return i?(t=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:null==(n=i.value)?"":n:void 0;return r="function"==typeof e,this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,T(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})}}),T.extend({valHooks:{select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if((n=i[r]).selected&&!n.disabled&&(!n.parentNode.disabled||!C(n.parentNode,"optgroup"))){if(t=T(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=T.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=T.inArray(T(r).val(),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k&&(T.valHooks.option={get:function(e){var t=e.getAttribute("value");return null!=t?t:t2(T.text(e))}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}}});var t5=/^(?:focusinfocus|focusoutblur)$/,t9=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(t,n,r,i){var o,a,s,u,l,f,p,d,h=[r||y],v=c.call(t,"type")?t.type:t,m=c.call(t,"namespace")?t.namespace.split("."):[];if((a=d=s=r=r||y,!(3===r.nodeType||8===r.nodeType||t5.test(v+T.event.triggered)))&&(v.indexOf(".")>-1&&(v=(m=v.split(".")).shift(),m.sort()),l=0>v.indexOf(":")&&"on"+v,(t=t[T.expando]?t:new T.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:T.makeArray(n,[t]),p=T.event.special[v]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!g(r)){for(u=p.delegateType||v,!t5.test(u+v)&&(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||y)&&h.push(s.defaultView||s.parentWindow||e)}o=0;while((a=h[o++])&&!t.isPropagationStopped())d=a,t.type=o>1?u:p.bindType||v,(f=(e0.get(a,"events")||Object.create(null))[t.type]&&e0.get(a,"handle"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&eK(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=v,!i&&!t.isDefaultPrevented()&&(!p._default||!1===p._default.apply(h.pop(),n))&&eK(r)&&l&&"function"==typeof r[v]&&!g(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=v,t.isPropagationStopped()&&d.addEventListener(v,t9),r[v](),t.isPropagationStopped()&&d.removeEventListener(v,t9),T.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}});var t6=e.location,t8={guid:Date.now()},t7=/\?/;T.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{n=new e.DOMParser().parseFromString(t,"text/xml")}catch(e){}return r=n&&n.getElementsByTagName("parsererror")[0],(!n||r)&&T.error("Invalid XML: "+(r?T.map(r.childNodes,function(e){return e.textContent}).join("\n"):t)),n};var ne=/\[\]$/,nt=/\r?\n/g,nn=/^(?:submit|button|image|reset|file)$/i,nr=/^(?:input|select|textarea|keygen)/i;T.param=function(e,t){var n,r=[],i=function(e,t){var n="function"==typeof t?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)!function e(t,n,r,i){var o;if(Array.isArray(n))T.each(n,function(n,o){r||ne.test(t)?i(t,o):e(t+"["+("object"==typeof o&&null!=o?n:"")+"]",o,r,i)});else if(r||"object"!==h(n))i(t,n);else for(o in n)e(t+"["+o+"]",n[o],r,i)}(n,e[n],t,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&nr.test(this.nodeName)&&!nn.test(e)&&(this.checked||!tx.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(nt,"\r\n")}}):{name:t.name,value:n.replace(nt,"\r\n")}}).get()}});var ni=/%20/g,no=/#.*$/,na=/([?&])_=[^&]*/,ns=/^(.*?):[ \t]*([^\r\n]*)$/mg,nu=/^(?:GET|HEAD)$/,nl=/^\/\//,nc={},nf={},np="*/".concat("*"),nd=y.createElement("a");function nh(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Q)||[];if("function"==typeof n)while(r=o[i++])"+"===r[0]?(e[r=r.slice(1)||"*"]=e[r]||[]).unshift(n):(e[r]=e[r]||[]).push(n)}}function ng(e,t,n,r){var i={},o=e===nf;function a(s){var u;return i[s]=!0,T.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function nv(e,t){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}nd.href=t6.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:t6.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(t6.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":np,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?nv(nv(e,T.ajaxSettings),t):nv(T.ajaxSettings,e)},ajaxPrefilter:nh(nc),ajaxTransport:nh(nf),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,u,l,c,f,p,d=T.ajaxSetup({},n),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?T(h):T.event,v=T.Deferred(),m=T.Callbacks("once memory"),x=d.statusCode||{},b={},w={},C="canceled",j={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a){a={};while(t=ns.exec(o))a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(b[e=w[e.toLowerCase()]=w[e.toLowerCase()]||e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)j.always(e[j.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),E(0,t),this}};if(v.promise(j),d.url=((t||d.url||t6.href)+"").replace(nl,t6.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(Q)||[""],null==d.crossDomain){u=y.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=nd.protocol+"//"+nd.host!=u.protocol+"//"+u.host}catch(e){d.crossDomain=!0}}if(ng(nc,d,n,j),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=T.param(d.data,d.traditional)),l)return j;for(f in(c=T.event&&d.global)&&0==T.active++&&T.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!nu.test(d.type),i=d.url.replace(no,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(ni,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(t7.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(na,"$1"),p=(t7.test(i)?"&":"?")+"_="+t8.guid+++p),d.url=i+p),d.ifModified&&(T.lastModified[i]&&j.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&j.setRequestHeader("If-None-Match",T.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&j.setRequestHeader("Content-Type",d.contentType),j.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+np+"; q=0.01":""):d.accepts["*"]),d.headers)j.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,j,d)||l))return j.abort();if(C="abort",m.add(d.complete),j.done(d.success),j.fail(d.error),r=ng(nf,d,n,j)){if(j.readyState=1,c&&g.trigger("ajaxSend",[j,d]),l)return j;d.async&&d.timeout>0&&(s=e.setTimeout(function(){j.abort("timeout")},d.timeout));try{l=!1,r.send(b,E)}catch(e){if(l)throw e;E(-1,e)}}else E(-1,"No Transport");function E(t,n,a,u){var f,p,y,b,w,C=n;!l&&(l=!0,s&&e.clearTimeout(s),r=void 0,o=u||"",j.readyState=4*(t>0),f=t>=200&&t<300||304===t,a&&(b=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r){for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,j,a)),!f&&T.inArray("script",d.dataTypes)>-1&&0>T.inArray("json",d.dataTypes)&&(d.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift()){if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o])){for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}}return{state:"success",data:t}}(d,b,j,f),f?(d.ifModified&&((w=j.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=w),(w=j.getResponseHeader("etag"))&&(T.etag[i]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,f=!(y=b.error))):(y=C,(t||!C)&&(C="error",t<0&&(t=0))),j.status=t,j.statusText=(n||C)+"",f?v.resolveWith(h,[p,C,j]):v.rejectWith(h,[j,C,y]),j.statusCode(x),x=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[j,d,f?p:y]),m.fireWith(h,[j,C]),c&&(g.trigger("ajaxComplete",[j,d]),--T.active||T.event.trigger("ajaxStop")))}return j},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,t){T[t]=function(e,n,r,i){return("function"==typeof n||null===n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:i,data:n,success:r},T.isPlainObject(e)&&e))}}),T.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),T._evalUrl=function(e,t,n){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,scriptAttrs:t.crossOrigin?{crossOrigin:t.crossOrigin}:void 0,converters:{"text script":function(){}},dataFilter:function(e){T.globalEval(e,t,n)}})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&("function"==typeof e&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return"function"==typeof e?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t="function"==typeof e;return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){return new e.XMLHttpRequest};var ny={0:200};function nm(e){return e.scriptAttrs||!e.headers&&(e.crossDomain||e.async&&0>T.inArray("json",e.dataTypes))}T.ajaxTransport(function(e){var t;return{send:function(n,r){var i,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];for(i in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(t=o.onload=o.onerror=o.onabort=o.ontimeout=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(ny[o.status]||o.status,o.statusText,"text"===(o.responseType||"text")?{text:o.responseText}:{binary:o.response},o.getAllResponseHeaders()))}},o.onload=t(),o.onabort=o.onerror=o.ontimeout=t("error"),t=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),nm(e)&&(e.type="GET")}),T.ajaxTransport("script",function(e){if(nm(e)){var t,n;return{send:function(r,i){t=T("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),y.head.appendChild(t[0])},abort:function(){n&&n()}}}});var nx=[],nb=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=nx.pop()||T.expando+"_"+t8.guid++;return this[e]=!0,e}}),T.ajaxPrefilter("jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(nb.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nb.test(t.data)&&"data");return i=t.jsonpCallback="function"==typeof t.jsonpCallback?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(nb,"$1"+i):!1!==t.jsonp&&(t.url+=(t7.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||T.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?T(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,nx.push(i)),a&&"function"==typeof o&&o(a[0]),a=o=void 0}),"script"}),T.ajaxPrefilter(function(t,n){"string"==typeof t.data||T.isPlainObject(t.data)||Array.isArray(t.data)||"processData"in n||(t.processData=!1),t.data instanceof e.FormData&&(t.contentType=!1)}),T.parseHTML=function(t,n,r){var i,o;return"string"==typeof t||eR(t+"")?("boolean"==typeof n&&(r=n,n=!1),n||(n=new e.DOMParser().parseFromString("","text/html")),i=eP.exec(t),o=!r&&[],i)?[n.createElement(i[1])]:(i=tg([t],n,o),o&&o.length&&T(o).remove(),T.merge([],i.childNodes)):[]},T.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=t2(e.slice(s)),e=e.slice(0,s)),"function"==typeof t?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&T.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?T("<div>").append(T.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},T.expr.pseudos.animated=function(e){return T.grep(T.timers,function(t){return e===t.elem}).length},T.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=T.css(e,"position"),c=T(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=T.css(e,"top"),u=T.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),"function"==typeof t&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){T.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===T.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&e!==n.documentElement&&"static"===T.css(e,"position"))e=e.offsetParent||n.documentElement;e&&e!==r&&1===e.nodeType&&"static"!==T.css(e,"position")&&(i=T(e).offset(),i.top+=T.css(e,"borderTopWidth",!0),i.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-T.css(r,"marginTop",!0),left:t.left-i.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===T.css(e,"position"))e=e.offsetParent;return e||L})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;T.fn[e]=function(r){return V(this,function(e,r,i){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),T.each({Height:"height",Width:"width"},function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){T.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return V(this,function(t,n,i){var o;return g(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?T.css(t,n,s):T.style(t,n,i,s)},t,a?i:void 0,a)}})}),T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1==arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){T.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),T.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),"function"==typeof e)return r=i.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||T.guid++,o},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.expr[":"]=T.expr.filters=T.expr.pseudos,"function"==typeof define&&define.amd&&define("jquery",[],function(){return T});var nw=e.jQuery,nT=e.$;return T.noConflict=function(t){return e.$===T&&(e.$=nT),t&&e.jQuery===T&&(e.jQuery=nw),T},void 0===t&&(e.jQuery=e.$=T),T});jquery/bower.json000064400000000447152336434510010107 0ustar00{
    "name": "jquery",
    "version": "4.0.0",
    "description": "jQuery component",
    "license": "MIT",
    "keywords": [
        "jquery",
        "component"
    ],
    "main": "jquery.js",
    "ignore": [
        "component.json",
        "package.json",
        "composer.json"
    ]
}