a.top+a.height&&(c=a.top+a.height),l-=a.left,c-=a.top;}else n&&(l=n.x*a.width,c=n.y*a.height);"h"!==i&&(s.style.left=`calc(${l/a.width*100}% - ${s.offsetWidth/2}px)`),"v"!==i&&(s.style.top=`calc(${c/a.height*100}% - ${s.offsetHeight/2}px)`),e.cache={x:l/a.width,y:c/a.height};const p=C(l/a.width),u=C(c/a.height);switch(i){case"v":return o.onchange(p);case"h":return o.onchange(u);default:return o.onchange(p,u)}},_tapstop(){e.options.onstop(),s(document,["mouseup","touchend","touchcancel"],e._tapstop),s(document,["mousemove","touchmove"],e._tapmove);},trigger(){e._tapmove();},update(t=0,o=0){const{left:n,top:i,width:s,height:r}=e.options.wrapper.getBoundingClientRect();"h"===e.options.lock&&(o=t),e._tapmove({clientX:n+s*t,clientY:i+r*o});},destroy(){const{options:t,_tapstart:o,_keyboard:n}=e;s(document,["keydown","keyup"],n),s([t.wrapper,t.element],"mousedown",o),s([t.wrapper,t.element],"touchstart",o,{passive:!1});}},{options:o,_tapstart:n,_keyboard:r}=e;return i([o.wrapper,o.element],"mousedown",n),i([o.wrapper,o.element],"touchstart",n,{passive:!1}),i(document,["keydown","keyup"],r),e}function k(t={}){t=Object.assign({onchange:()=>0,className:"",elements:[]},t);const e=i(t.elements,"click",(e=>{t.elements.forEach((o=>o.classList[e.target===o?"add":"remove"](t.className))),t.onchange(e),e.stopPropagation();}));return {destroy:()=>s(...e)}}const S={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8},O=(t,e,o)=>{const{container:n,margin:i,position:s,variantFlipOrder:r,positionFlipOrder:a}={container:document.documentElement.getBoundingClientRect(),...S,...o},{left:l,top:c}=e.style;e.style.left="0",e.style.top="0";const p=t.getBoundingClientRect(),u=e.getBoundingClientRect(),h={t:p.top-u.height-i,b:p.bottom+i,r:p.right+i,l:p.left-u.width-i},d={vs:p.left,vm:p.left+p.width/2+-u.width/2,ve:p.left+p.width-u.width,hs:p.top,hm:p.bottom-p.height/2-u.height/2,he:p.bottom-u.height},[m,f="middle"]=s.split("-"),v=a[m],b=r[f],{top:y,left:g,bottom:_,right:w}=n;for(const t of v){const o="t"===t||"b"===t,n=h[t],[i,s]=o?["top","left"]:["left","top"],[r,a]=o?[u.height,u.width]:[u.width,u.height],[l,c]=o?[_,w]:[w,_],[p,m]=o?[y,g]:[g,y];if(!(nl))for(const r of b){const l=d[(o?"v":"h")+r];if(!(lc))return e.style[s]=l-u[s]+"px",e.style[i]=n-u[i]+"px",t+r}}return e.style.left=l,e.style.top=c,null};function E(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class L{constructor(t){E(this,"_initializingActive",!0),E(this,"_recalc",!0),E(this,"_nanopop",null),E(this,"_root",null),E(this,"_color",A()),E(this,"_lastColor",A()),E(this,"_swatchColors",[]),E(this,"_setupAnimationFrame",null),E(this,"_eventListener",{init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]}),this.options=t=Object.assign({...L.DEFAULT_OPTIONS},t);const{swatches:e,components:o,theme:n,sliders:i,lockOpacity:s,padding:r}=t;["nano","monolith"].includes(n)&&!i&&(t.sliders="h"),o.interaction||(o.interaction={});const{preview:a,opacity:l,hue:c,palette:p}=o;o.opacity=!s&&l,o.palette=p||a||l||c,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),e&&e.length&&e.forEach((t=>this.addSwatch(t)));const{button:u,app:h}=this._root;this._nanopop=((t,e,o)=>{const n="object"!=typeof t||t instanceof HTMLElement?{reference:t,popper:e,...o}:t;return {update(t=n){const{reference:e,popper:o}=Object.assign(n,t);if(!o||!e)throw new Error("Popper- or reference-element missing.");return O(e,o,n)}}})(u,h,{margin:r}),u.setAttribute("role","button"),u.setAttribute("aria-label",this._t("btn:toggle"));const d=this;this._setupAnimationFrame=requestAnimationFrame((function e(){if(!h.offsetWidth)return requestAnimationFrame(e);d.setColor(t.default),d._rePositioningPicker(),t.defaultRepresentation&&(d._representation=t.defaultRepresentation,d.setColorRepresentation(d._representation)),t.showAlways&&d.show(),d._initializingActive=!1,d._emit("init");}));}_preBuild(){const{options:t}=this;for(const e of ["el","container"])t[e]=c(t[e]);this._root=(t=>{const{components:e,useAsButton:o,inline:n,appClass:i,theme:s,lockOpacity:r}=t.options,l=t=>t?"":'style="display:none" hidden',c=e=>t._t(e),p=a(`\n \n `),u=p.interaction;return u.options.find((t=>!t.hidden&&!t.classList.add("active"))),u.type=()=>u.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root);}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app);}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide();}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[n,i]=o.match(/^[vh]+$/g)?o:[],s=()=>this._color||(this._color=this._lastColor.clone()),r={palette:$({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,n){if(!e.palette)return;const i=s(),{_root:r,options:a}=t,{lastColor:l,currentColor:c}=r.preview;t._recalc&&(i.s=100*o,i.v=100-100*n,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||l.style.setProperty("--pcr-color",p):(r.button.style.setProperty("--pcr-color",p),r.button.classList.remove("clear"));const u=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[u===o.toHEXA().toString()?"add":"remove"]("pcr-active");c.style.setProperty("--pcr-color",p);}}),hue:$({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const n=s();t._recalc&&(n.h=360*o),this.element.style.backgroundColor=`hsl(${n.h}, 100%, 50%)`,r.palette.trigger();}}),opacity:$({lock:"v"===n?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const n=s();t._recalc&&(n.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${n.a})`,r.palette.trigger();}}),selectable:k({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch");}})};this._components=r;}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel");})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide();})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation();})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null);})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const n=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===n||t.code===n)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!l(e).some((e=>e===t.app||e===t.button))&&this.hide();}),{capture:!0}));}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,n)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[n],s=t+(e>=100?1e3*o:o);return s<=0?0:Number((s{n.isOpen()&&(e.closeOnScroll&&n.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){n._rePositioningPicker(),null!==t&&requestAnimationFrame(e);}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)));}),{capture:!0}));}this._eventBindings=o;}_rePositioningPicker(){const{options:t}=this;if(!t.inline){if(!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px";}}}_updateOutput(t){const{_root:e,_color:o,options:n}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(n.outputPrecision):"";}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this);}_clearColor(t=!1){const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"));}_parseLocalColor(t){const{values:e,type:o,a:n}=w(t),{lockOpacity:i}=this.options,s=void 0!==n&&1!==n;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&s?null:e,type:o}}_t(t){return this.options.i18n[t]||L.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach((t=>t(...e,this)));}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],n=o.indexOf(e);return ~n&&o.splice(n,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,n=A(...e),s=r(` `);return o.swatches.appendChild(s),t.push({el:s,color:n}),this._eventBindings.push(i(s,"click",(()=>{this.setHSVA(...n.toHSVA(),!0),this._emit("swatchselect",n),this._emit("change",n,"swatch",this);}))),!0}return !1}removeSwatch(t){const e=this._swatchColors[t];if(e){const{el:o}=e;return this._root.swatches.removeChild(o),this._swatchColors.splice(t,1),!0}return !1}applyColor(t=!1){const{preview:e,button:o}=this._root,n=this._color.toRGBA().toString(0);return e.lastColor.style.setProperty("--pcr-color",n),this.options.useAsButton||o.style.setProperty("--pcr-color",n),o.classList.remove("clear"),this._lastColor=this._color.clone(),this._initializingActive||t||this._emit("save",this._color),this}destroy(){cancelAnimationFrame(this._setupAnimationFrame),this._eventBindings.forEach((t=>s(...t))),Object.keys(this._components).forEach((t=>this._components[t].destroy()));}destroyAndRemove(){this.destroy();const{root:t,app:e}=this._root;t.parentElement&&t.parentElement.removeChild(t),e.parentElement.removeChild(e),Object.keys(this).forEach((t=>this[t]=null));}hide(){return !!this.isOpen()&&(this._root.app.classList.remove("visible"),this._emit("hide"),!0)}show(){return !this.options.disabled&&!this.isOpen()&&(this._root.app.classList.add("visible"),this._rePositioningPicker(),this._emit("show",this._color),this)}isOpen(){return this._root.app.classList.contains("visible")}setHSVA(t=360,e=0,o=0,n=1,i=!1){const s=this._recalc;if(this._recalc=!1,t<0||t>360||e<0||e>100||o<0||o>100||n<0||n>1)return !1;this._color=A(t,e,o,n);const{hue:r,opacity:a,palette:l}=this._components;return r.update(t/360),a.update(n),l.update(e/100,1-o/100),i||this.applyColor(),s&&this._updateOutput(),this._recalc=s,!0}setColor(t,e=!1){if(null===t)return this._clearColor(e),!0;const{values:o,type:n}=this._parseLocalColor(t);if(o){const t=n.toUpperCase(),{options:i}=this._root.interaction,s=i.find((e=>e.getAttribute("data-type")===t));if(s&&!s.hidden)for(const t of i)t.classList[t===s?"add":"remove"]("active");return !!this.setHSVA(...o,e)&&this.setColorRepresentation(t)}return !1}setColorRepresentation(t){return t=t.toUpperCase(),!!this._root.interaction.options.find((e=>e.getAttribute("data-type").startsWith(t)&&!e.click()))}getColorRepresentation(){return this._representation}getColor(){return this._color}getSelectedColor(){return this._lastColor}getRoot(){return this._root}disable(){return this.hide(),this.options.disabled=!0,this._root.button.classList.add("disabled"),this}enable(){return this.options.disabled=!1,this._root.button.classList.remove("disabled"),this}}return E(L,"utils",o),E(L,"version","1.8.2"),E(L,"I18N_DEFAULTS",{"ui:dialog":"color picker dialog","btn:toggle":"toggle color picker dialog","btn:swatch":"color swatch","btn:last-color":"use previous color","btn:save":"Save","btn:cancel":"Cancel","btn:clear":"Clear","aria:btn:save":"save and close","aria:btn:cancel":"cancel and close","aria:btn:clear":"clear and close","aria:input":"color input field","aria:palette":"color selection area","aria:hue":"hue selection slider","aria:opacity":"selection slider"}),E(L,"DEFAULT_OPTIONS",{appClass:null,theme:"classic",useAsButton:!1,padding:8,disabled:!1,comparison:!0,closeOnScroll:!1,outputPrecision:0,lockOpacity:!1,autoReposition:!0,container:"body",components:{interaction:{}},i18n:{},swatches:null,inline:!1,sliders:null,default:"#42445a",defaultRepresentation:null,position:"bottom-middle",adjustableNumbers:!0,showAlways:!1,closeWithKey:"Escape"}),E(L,"create",(t=>new L(t))),e=e.default})()}));
+
+});
+
+var Pickr = /*@__PURE__*/getDefaultExportFromCjs(pickr_min);
+
+/**!
+ * Sortable 1.15.0
+ * @author RubaXa
+ * @author owenm
+ * @license MIT
+ */
+function ownKeys(object, enumerableOnly) {
+ var keys = Object.keys(object);
+
+ if (Object.getOwnPropertySymbols) {
+ var symbols = Object.getOwnPropertySymbols(object);
+
+ if (enumerableOnly) {
+ symbols = symbols.filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+ });
+ }
+
+ keys.push.apply(keys, symbols);
+ }
+
+ return keys;
+}
+
+function _objectSpread2(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i] != null ? arguments[i] : {};
+
+ if (i % 2) {
+ ownKeys(Object(source), true).forEach(function (key) {
+ _defineProperty(target, key, source[key]);
+ });
+ } else if (Object.getOwnPropertyDescriptors) {
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+ } else {
+ ownKeys(Object(source)).forEach(function (key) {
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+ });
+ }
+ }
+
+ return target;
+}
+
+function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+ _typeof = function (obj) {
+ return typeof obj;
+ };
+ } else {
+ _typeof = function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ };
+ }
+
+ return _typeof(obj);
+}
+
+function _defineProperty(obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+}
+
+function _extends() {
+ _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+
+ return target;
+ };
+
+ return _extends.apply(this, arguments);
+}
+
+function _objectWithoutPropertiesLoose(source, excluded) {
+ if (source == null) return {};
+ var target = {};
+ var sourceKeys = Object.keys(source);
+ var key, i;
+
+ for (i = 0; i < sourceKeys.length; i++) {
+ key = sourceKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ target[key] = source[key];
+ }
+
+ return target;
+}
+
+function _objectWithoutProperties(source, excluded) {
+ if (source == null) return {};
+
+ var target = _objectWithoutPropertiesLoose(source, excluded);
+
+ var key, i;
+
+ if (Object.getOwnPropertySymbols) {
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
+ key = sourceSymbolKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+}
+
+var version = "1.15.0";
+
+function userAgent(pattern) {
+ if (typeof window !== 'undefined' && window.navigator) {
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
+ }
+}
+
+var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
+var Edge = userAgent(/Edge/i);
+var FireFox = userAgent(/firefox/i);
+var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
+var IOS = userAgent(/iP(ad|od|hone)/i);
+var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
+
+var captureMode = {
+ capture: false,
+ passive: false
+};
+
+function on(el, event, fn) {
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
+}
+
+function off(el, event, fn) {
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
+}
+
+function matches(
+/**HTMLElement*/
+el,
+/**String*/
+selector) {
+ if (!selector) return;
+ selector[0] === '>' && (selector = selector.substring(1));
+
+ if (el) {
+ try {
+ if (el.matches) {
+ return el.matches(selector);
+ } else if (el.msMatchesSelector) {
+ return el.msMatchesSelector(selector);
+ } else if (el.webkitMatchesSelector) {
+ return el.webkitMatchesSelector(selector);
+ }
+ } catch (_) {
+ return false;
+ }
+ }
+
+ return false;
+}
+
+function getParentOrHost(el) {
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
+}
+
+function closest(
+/**HTMLElement*/
+el,
+/**String*/
+selector,
+/**HTMLElement*/
+ctx, includeCTX) {
+ if (el) {
+ ctx = ctx || document;
+
+ do {
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
+ return el;
+ }
+
+ if (el === ctx) break;
+ /* jshint boss:true */
+ } while (el = getParentOrHost(el));
+ }
+
+ return null;
+}
+
+var R_SPACE = /\s+/g;
+
+function toggleClass(el, name, state) {
+ if (el && name) {
+ if (el.classList) {
+ el.classList[state ? 'add' : 'remove'](name);
+ } else {
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
+ }
+ }
+}
+
+function css(el, prop, val) {
+ var style = el && el.style;
+
+ if (style) {
+ if (val === void 0) {
+ if (document.defaultView && document.defaultView.getComputedStyle) {
+ val = document.defaultView.getComputedStyle(el, '');
+ } else if (el.currentStyle) {
+ val = el.currentStyle;
+ }
+
+ return prop === void 0 ? val : val[prop];
+ } else {
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
+ prop = '-webkit-' + prop;
+ }
+
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
+ }
+ }
+}
+
+function matrix(el, selfOnly) {
+ var appliedTransforms = '';
+
+ if (typeof el === 'string') {
+ appliedTransforms = el;
+ } else {
+ do {
+ var transform = css(el, 'transform');
+
+ if (transform && transform !== 'none') {
+ appliedTransforms = transform + ' ' + appliedTransforms;
+ }
+ /* jshint boss:true */
+
+ } while (!selfOnly && (el = el.parentNode));
+ }
+
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
+ /*jshint -W056 */
+
+ return matrixFn && new matrixFn(appliedTransforms);
+}
+
+function find(ctx, tagName, iterator) {
+ if (ctx) {
+ var list = ctx.getElementsByTagName(tagName),
+ i = 0,
+ n = list.length;
+
+ if (iterator) {
+ for (; i < n; i++) {
+ iterator(list[i], i);
+ }
+ }
+
+ return list;
+ }
+
+ return [];
+}
+
+function getWindowScrollingElement() {
+ var scrollingElement = document.scrollingElement;
+
+ if (scrollingElement) {
+ return scrollingElement;
+ } else {
+ return document.documentElement;
+ }
+}
+/**
+ * Returns the "bounding client rect" of given element
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
+ * @param {[HTMLElement]} container The parent the element will be placed in
+ * @return {Object} The boundingClientRect of el, with specified adjustments
+ */
+
+
+function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
+ if (!el.getBoundingClientRect && el !== window) return;
+ var elRect, top, left, bottom, right, height, width;
+
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
+ elRect = el.getBoundingClientRect();
+ top = elRect.top;
+ left = elRect.left;
+ bottom = elRect.bottom;
+ right = elRect.right;
+ height = elRect.height;
+ width = elRect.width;
+ } else {
+ top = 0;
+ left = 0;
+ bottom = window.innerHeight;
+ right = window.innerWidth;
+ height = window.innerHeight;
+ width = window.innerWidth;
+ }
+
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
+ // Adjust for translate()
+ container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
+ // Not needed on <= IE11
+
+ if (!IE11OrLess) {
+ do {
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
+ var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
+
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
+ bottom = top + elRect.height;
+ right = left + elRect.width;
+ break;
+ }
+ /* jshint boss:true */
+
+ } while (container = container.parentNode);
+ }
+ }
+
+ if (undoScale && el !== window) {
+ // Adjust for scale()
+ var elMatrix = matrix(container || el),
+ scaleX = elMatrix && elMatrix.a,
+ scaleY = elMatrix && elMatrix.d;
+
+ if (elMatrix) {
+ top /= scaleY;
+ left /= scaleX;
+ width /= scaleX;
+ height /= scaleY;
+ bottom = top + height;
+ right = left + width;
+ }
+ }
+
+ return {
+ top: top,
+ left: left,
+ bottom: bottom,
+ right: right,
+ width: width,
+ height: height
+ };
+}
+/**
+ * Checks if a side of an element is scrolled past a side of its parents
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
+ */
+
+
+function isScrolledPast(el, elSide, parentSide) {
+ var parent = getParentAutoScrollElement(el, true),
+ elSideVal = getRect(el)[elSide];
+ /* jshint boss:true */
+
+ while (parent) {
+ var parentSideVal = getRect(parent)[parentSide],
+ visible = void 0;
+
+ if (parentSide === 'top' || parentSide === 'left') {
+ visible = elSideVal >= parentSideVal;
+ } else {
+ visible = elSideVal <= parentSideVal;
+ }
+
+ if (!visible) return parent;
+ if (parent === getWindowScrollingElement()) break;
+ parent = getParentAutoScrollElement(parent, false);
+ }
+
+ return false;
+}
+/**
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
+ * and non-draggable elements
+ * @param {HTMLElement} el The parent element
+ * @param {Number} childNum The index of the child
+ * @param {Object} options Parent Sortable's options
+ * @return {HTMLElement} The child at index childNum, or null if not found
+ */
+
+
+function getChild(el, childNum, options, includeDragEl) {
+ var currentChild = 0,
+ i = 0,
+ children = el.children;
+
+ while (i < children.length) {
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
+ if (currentChild === childNum) {
+ return children[i];
+ }
+
+ currentChild++;
+ }
+
+ i++;
+ }
+
+ return null;
+}
+/**
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
+ * @param {HTMLElement} el Parent element
+ * @param {selector} selector Any other elements that should be ignored
+ * @return {HTMLElement} The last child, ignoring ghostEl
+ */
+
+
+function lastChild(el, selector) {
+ var last = el.lastElementChild;
+
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
+ last = last.previousElementSibling;
+ }
+
+ return last || null;
+}
+/**
+ * Returns the index of an element within its parent for a selected set of
+ * elements
+ * @param {HTMLElement} el
+ * @param {selector} selector
+ * @return {number}
+ */
+
+
+function index(el, selector) {
+ var index = 0;
+
+ if (!el || !el.parentNode) {
+ return -1;
+ }
+ /* jshint boss:true */
+
+
+ while (el = el.previousElementSibling) {
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
+ index++;
+ }
+ }
+
+ return index;
+}
+/**
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
+ * The value is returned in real pixels.
+ * @param {HTMLElement} el
+ * @return {Array} Offsets in the format of [left, top]
+ */
+
+
+function getRelativeScrollOffset(el) {
+ var offsetLeft = 0,
+ offsetTop = 0,
+ winScroller = getWindowScrollingElement();
+
+ if (el) {
+ do {
+ var elMatrix = matrix(el),
+ scaleX = elMatrix.a,
+ scaleY = elMatrix.d;
+ offsetLeft += el.scrollLeft * scaleX;
+ offsetTop += el.scrollTop * scaleY;
+ } while (el !== winScroller && (el = el.parentNode));
+ }
+
+ return [offsetLeft, offsetTop];
+}
+/**
+ * Returns the index of the object within the given array
+ * @param {Array} arr Array that may or may not hold the object
+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
+ * @return {Number} The index of the object in the array, or -1
+ */
+
+
+function indexOfObject(arr, obj) {
+ for (var i in arr) {
+ if (!arr.hasOwnProperty(i)) continue;
+
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
+ }
+ }
+
+ return -1;
+}
+
+function getParentAutoScrollElement(el, includeSelf) {
+ // skip to window
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
+ var elem = el;
+ var gotSelf = false;
+
+ do {
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
+ var elemCSS = css(elem);
+
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
+ if (gotSelf || includeSelf) return elem;
+ gotSelf = true;
+ }
+ }
+ /* jshint boss:true */
+
+ } while (elem = elem.parentNode);
+
+ return getWindowScrollingElement();
+}
+
+function extend(dst, src) {
+ if (dst && src) {
+ for (var key in src) {
+ if (src.hasOwnProperty(key)) {
+ dst[key] = src[key];
+ }
+ }
+ }
+
+ return dst;
+}
+
+function isRectEqual(rect1, rect2) {
+ return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
+}
+
+var _throttleTimeout;
+
+function throttle(callback, ms) {
+ return function () {
+ if (!_throttleTimeout) {
+ var args = arguments,
+ _this = this;
+
+ if (args.length === 1) {
+ callback.call(_this, args[0]);
+ } else {
+ callback.apply(_this, args);
+ }
+
+ _throttleTimeout = setTimeout(function () {
+ _throttleTimeout = void 0;
+ }, ms);
+ }
+ };
+}
+
+function cancelThrottle() {
+ clearTimeout(_throttleTimeout);
+ _throttleTimeout = void 0;
+}
+
+function scrollBy(el, x, y) {
+ el.scrollLeft += x;
+ el.scrollTop += y;
+}
+
+function clone(el) {
+ var Polymer = window.Polymer;
+ var $ = window.jQuery || window.Zepto;
+
+ if (Polymer && Polymer.dom) {
+ return Polymer.dom(el).cloneNode(true);
+ } else if ($) {
+ return $(el).clone(true)[0];
+ } else {
+ return el.cloneNode(true);
+ }
+}
+
+var expando = 'Sortable' + new Date().getTime();
+
+function AnimationStateManager() {
+ var animationStates = [],
+ animationCallbackId;
+ return {
+ captureAnimationState: function captureAnimationState() {
+ animationStates = [];
+ if (!this.options.animation) return;
+ var children = [].slice.call(this.el.children);
+ children.forEach(function (child) {
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
+ animationStates.push({
+ target: child,
+ rect: getRect(child)
+ });
+
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
+
+
+ if (child.thisAnimationDuration) {
+ var childMatrix = matrix(child, true);
+
+ if (childMatrix) {
+ fromRect.top -= childMatrix.f;
+ fromRect.left -= childMatrix.e;
+ }
+ }
+
+ child.fromRect = fromRect;
+ });
+ },
+ addAnimationState: function addAnimationState(state) {
+ animationStates.push(state);
+ },
+ removeAnimationState: function removeAnimationState(target) {
+ animationStates.splice(indexOfObject(animationStates, {
+ target: target
+ }), 1);
+ },
+ animateAll: function animateAll(callback) {
+ var _this = this;
+
+ if (!this.options.animation) {
+ clearTimeout(animationCallbackId);
+ if (typeof callback === 'function') callback();
+ return;
+ }
+
+ var animating = false,
+ animationTime = 0;
+ animationStates.forEach(function (state) {
+ var time = 0,
+ target = state.target,
+ fromRect = target.fromRect,
+ toRect = getRect(target),
+ prevFromRect = target.prevFromRect,
+ prevToRect = target.prevToRect,
+ animatingRect = state.rect,
+ targetMatrix = matrix(target, true);
+
+ if (targetMatrix) {
+ // Compensate for current animation
+ toRect.top -= targetMatrix.f;
+ toRect.left -= targetMatrix.e;
+ }
+
+ target.toRect = toRect;
+
+ if (target.thisAnimationDuration) {
+ // Could also check if animatingRect is between fromRect and toRect
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
+ // If returning to same place as started from animation and on same axis
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
+ }
+ } // if fromRect != toRect: animate
+
+
+ if (!isRectEqual(toRect, fromRect)) {
+ target.prevFromRect = fromRect;
+ target.prevToRect = toRect;
+
+ if (!time) {
+ time = _this.options.animation;
+ }
+
+ _this.animate(target, animatingRect, toRect, time);
+ }
+
+ if (time) {
+ animating = true;
+ animationTime = Math.max(animationTime, time);
+ clearTimeout(target.animationResetTimer);
+ target.animationResetTimer = setTimeout(function () {
+ target.animationTime = 0;
+ target.prevFromRect = null;
+ target.fromRect = null;
+ target.prevToRect = null;
+ target.thisAnimationDuration = null;
+ }, time);
+ target.thisAnimationDuration = time;
+ }
+ });
+ clearTimeout(animationCallbackId);
+
+ if (!animating) {
+ if (typeof callback === 'function') callback();
+ } else {
+ animationCallbackId = setTimeout(function () {
+ if (typeof callback === 'function') callback();
+ }, animationTime);
+ }
+
+ animationStates = [];
+ },
+ animate: function animate(target, currentRect, toRect, duration) {
+ if (duration) {
+ css(target, 'transition', '');
+ css(target, 'transform', '');
+ var elMatrix = matrix(this.el),
+ scaleX = elMatrix && elMatrix.a,
+ scaleY = elMatrix && elMatrix.d,
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
+ target.animatingX = !!translateX;
+ target.animatingY = !!translateY;
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
+ this.forRepaintDummy = repaint(target); // repaint
+
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
+ css(target, 'transform', 'translate3d(0,0,0)');
+ typeof target.animated === 'number' && clearTimeout(target.animated);
+ target.animated = setTimeout(function () {
+ css(target, 'transition', '');
+ css(target, 'transform', '');
+ target.animated = false;
+ target.animatingX = false;
+ target.animatingY = false;
+ }, duration);
+ }
+ }
+ };
+}
+
+function repaint(target) {
+ return target.offsetWidth;
+}
+
+function calculateRealTime(animatingRect, fromRect, toRect, options) {
+ return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
+}
+
+var plugins = [];
+var defaults = {
+ initializeByDefault: true
+};
+var PluginManager = {
+ mount: function mount(plugin) {
+ // Set default static properties
+ for (var option in defaults) {
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
+ plugin[option] = defaults[option];
+ }
+ }
+
+ plugins.forEach(function (p) {
+ if (p.pluginName === plugin.pluginName) {
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
+ }
+ });
+ plugins.push(plugin);
+ },
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
+ var _this = this;
+
+ this.eventCanceled = false;
+
+ evt.cancel = function () {
+ _this.eventCanceled = true;
+ };
+
+ var eventNameGlobal = eventName + 'Global';
+ plugins.forEach(function (plugin) {
+ if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
+
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
+ sortable: sortable
+ }, evt));
+ } // Only fire plugin event if plugin is enabled in this sortable,
+ // and plugin has event defined
+
+
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
+ sortable[plugin.pluginName][eventName](_objectSpread2({
+ sortable: sortable
+ }, evt));
+ }
+ });
+ },
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
+ plugins.forEach(function (plugin) {
+ var pluginName = plugin.pluginName;
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
+ var initialized = new plugin(sortable, el, sortable.options);
+ initialized.sortable = sortable;
+ initialized.options = sortable.options;
+ sortable[pluginName] = initialized; // Add default options from plugin
+
+ _extends(defaults, initialized.defaults);
+ });
+
+ for (var option in sortable.options) {
+ if (!sortable.options.hasOwnProperty(option)) continue;
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
+
+ if (typeof modified !== 'undefined') {
+ sortable.options[option] = modified;
+ }
+ }
+ },
+ getEventProperties: function getEventProperties(name, sortable) {
+ var eventProperties = {};
+ plugins.forEach(function (plugin) {
+ if (typeof plugin.eventProperties !== 'function') return;
+
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
+ });
+ return eventProperties;
+ },
+ modifyOption: function modifyOption(sortable, name, value) {
+ var modifiedValue;
+ plugins.forEach(function (plugin) {
+ // Plugin must exist on the Sortable
+ if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
+
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
+ }
+ });
+ return modifiedValue;
+ }
+};
+
+function dispatchEvent$1(_ref) {
+ var sortable = _ref.sortable,
+ rootEl = _ref.rootEl,
+ name = _ref.name,
+ targetEl = _ref.targetEl,
+ cloneEl = _ref.cloneEl,
+ toEl = _ref.toEl,
+ fromEl = _ref.fromEl,
+ oldIndex = _ref.oldIndex,
+ newIndex = _ref.newIndex,
+ oldDraggableIndex = _ref.oldDraggableIndex,
+ newDraggableIndex = _ref.newDraggableIndex,
+ originalEvent = _ref.originalEvent,
+ putSortable = _ref.putSortable,
+ extraEventProperties = _ref.extraEventProperties;
+ sortable = sortable || rootEl && rootEl[expando];
+ if (!sortable) return;
+ var evt,
+ options = sortable.options,
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
+
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
+ evt = new CustomEvent(name, {
+ bubbles: true,
+ cancelable: true
+ });
+ } else {
+ evt = document.createEvent('Event');
+ evt.initEvent(name, true, true);
+ }
+
+ evt.to = toEl || rootEl;
+ evt.from = fromEl || rootEl;
+ evt.item = targetEl || rootEl;
+ evt.clone = cloneEl;
+ evt.oldIndex = oldIndex;
+ evt.newIndex = newIndex;
+ evt.oldDraggableIndex = oldDraggableIndex;
+ evt.newDraggableIndex = newDraggableIndex;
+ evt.originalEvent = originalEvent;
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
+
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
+
+ for (var option in allEventProperties) {
+ evt[option] = allEventProperties[option];
+ }
+
+ if (rootEl) {
+ rootEl.dispatchEvent(evt);
+ }
+
+ if (options[onName]) {
+ options[onName].call(sortable, evt);
+ }
+}
+
+var _excluded = ["evt"];
+
+var pluginEvent = function pluginEvent(eventName, sortable) {
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
+ originalEvent = _ref.evt,
+ data = _objectWithoutProperties(_ref, _excluded);
+
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
+ dragEl: dragEl,
+ parentEl: parentEl,
+ ghostEl: ghostEl,
+ rootEl: rootEl,
+ nextEl: nextEl,
+ lastDownEl: lastDownEl,
+ cloneEl: cloneEl,
+ cloneHidden: cloneHidden,
+ dragStarted: moved,
+ putSortable: putSortable,
+ activeSortable: Sortable.active,
+ originalEvent: originalEvent,
+ oldIndex: oldIndex,
+ oldDraggableIndex: oldDraggableIndex,
+ newIndex: newIndex,
+ newDraggableIndex: newDraggableIndex,
+ hideGhostForTarget: _hideGhostForTarget,
+ unhideGhostForTarget: _unhideGhostForTarget,
+ cloneNowHidden: function cloneNowHidden() {
+ cloneHidden = true;
+ },
+ cloneNowShown: function cloneNowShown() {
+ cloneHidden = false;
+ },
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
+ _dispatchEvent({
+ sortable: sortable,
+ name: name,
+ originalEvent: originalEvent
+ });
+ }
+ }, data));
+};
+
+function _dispatchEvent(info) {
+ dispatchEvent$1(_objectSpread2({
+ putSortable: putSortable,
+ cloneEl: cloneEl,
+ targetEl: dragEl,
+ rootEl: rootEl,
+ oldIndex: oldIndex,
+ oldDraggableIndex: oldDraggableIndex,
+ newIndex: newIndex,
+ newDraggableIndex: newDraggableIndex
+ }, info));
+}
+
+var dragEl,
+ parentEl,
+ ghostEl,
+ rootEl,
+ nextEl,
+ lastDownEl,
+ cloneEl,
+ cloneHidden,
+ oldIndex,
+ newIndex,
+ oldDraggableIndex,
+ newDraggableIndex,
+ activeGroup,
+ putSortable,
+ awaitingDragStarted = false,
+ ignoreNextClick = false,
+ sortables = [],
+ tapEvt,
+ touchEvt,
+ lastDx,
+ lastDy,
+ tapDistanceLeft,
+ tapDistanceTop,
+ moved,
+ lastTarget,
+ lastDirection,
+ pastFirstInvertThresh = false,
+ isCircumstantialInvert = false,
+ targetMoveDistance,
+ // For positioning ghost absolutely
+ghostRelativeParent,
+ ghostRelativeParentInitialScroll = [],
+ // (left, top)
+_silent = false,
+ savedInputChecked = [];
+/** @const */
+
+var documentExists = typeof document !== 'undefined',
+ PositionGhostAbsolutely = IOS,
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
+ // This will not pass for IE9, because IE9 DnD only works on anchors
+supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
+ supportCssPointerEvents = function () {
+ if (!documentExists) return; // false when <= IE11
+
+ if (IE11OrLess) {
+ return false;
+ }
+
+ var el = document.createElement('x');
+ el.style.cssText = 'pointer-events:auto';
+ return el.style.pointerEvents === 'auto';
+}(),
+ _detectDirection = function _detectDirection(el, options) {
+ var elCSS = css(el),
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
+ child1 = getChild(el, 0, options),
+ child2 = getChild(el, 1, options),
+ firstChildCSS = child1 && css(child1),
+ secondChildCSS = child2 && css(child2),
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
+
+ if (elCSS.display === 'flex') {
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
+ }
+
+ if (elCSS.display === 'grid') {
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
+ }
+
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
+ }
+
+ return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
+},
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
+},
+
+/**
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
+ * @param {Number} x X position
+ * @param {Number} y Y position
+ * @return {HTMLElement} Element of the first found nearest Sortable
+ */
+_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
+ var ret;
+ sortables.some(function (sortable) {
+ var threshold = sortable[expando].options.emptyInsertThreshold;
+ if (!threshold || lastChild(sortable)) return;
+ var rect = getRect(sortable),
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
+
+ if (insideHorizontally && insideVertically) {
+ return ret = sortable;
+ }
+ });
+ return ret;
+},
+ _prepareGroup = function _prepareGroup(options) {
+ function toFn(value, pull) {
+ return function (to, from, dragEl, evt) {
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
+
+ if (value == null && (pull || sameGroup)) {
+ // Default pull value
+ // Default pull and put value if same group
+ return true;
+ } else if (value == null || value === false) {
+ return false;
+ } else if (pull && value === 'clone') {
+ return value;
+ } else if (typeof value === 'function') {
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
+ } else {
+ var otherGroup = (pull ? to : from).options.group.name;
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
+ }
+ };
+ }
+
+ var group = {};
+ var originalGroup = options.group;
+
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
+ originalGroup = {
+ name: originalGroup
+ };
+ }
+
+ group.name = originalGroup.name;
+ group.checkPull = toFn(originalGroup.pull, true);
+ group.checkPut = toFn(originalGroup.put);
+ group.revertClone = originalGroup.revertClone;
+ options.group = group;
+},
+ _hideGhostForTarget = function _hideGhostForTarget() {
+ if (!supportCssPointerEvents && ghostEl) {
+ css(ghostEl, 'display', 'none');
+ }
+},
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
+ if (!supportCssPointerEvents && ghostEl) {
+ css(ghostEl, 'display', '');
+ }
+}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
+
+
+if (documentExists && !ChromeForAndroid) {
+ document.addEventListener('click', function (evt) {
+ if (ignoreNextClick) {
+ evt.preventDefault();
+ evt.stopPropagation && evt.stopPropagation();
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
+ ignoreNextClick = false;
+ return false;
+ }
+ }, true);
+}
+
+var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
+ if (dragEl) {
+ evt = evt.touches ? evt.touches[0] : evt;
+
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
+
+ if (nearest) {
+ // Create imitation event
+ var event = {};
+
+ for (var i in evt) {
+ if (evt.hasOwnProperty(i)) {
+ event[i] = evt[i];
+ }
+ }
+
+ event.target = event.rootEl = nearest;
+ event.preventDefault = void 0;
+ event.stopPropagation = void 0;
+
+ nearest[expando]._onDragOver(event);
+ }
+ }
+};
+
+var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
+ if (dragEl) {
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
+ }
+};
+/**
+ * @class Sortable
+ * @param {HTMLElement} el
+ * @param {Object} [options]
+ */
+
+
+function Sortable(el, options) {
+ if (!(el && el.nodeType && el.nodeType === 1)) {
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
+ }
+
+ this.el = el; // root element
+
+ this.options = options = _extends({}, options); // Export instance
+
+ el[expando] = this;
+ var defaults = {
+ group: null,
+ sort: true,
+ disabled: false,
+ store: null,
+ handle: null,
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
+ swapThreshold: 1,
+ // percentage; 0 <= x <= 1
+ invertSwap: false,
+ // invert always
+ invertedSwapThreshold: null,
+ // will be set to same as swapThreshold if default
+ removeCloneOnHide: true,
+ direction: function direction() {
+ return _detectDirection(el, this.options);
+ },
+ ghostClass: 'sortable-ghost',
+ chosenClass: 'sortable-chosen',
+ dragClass: 'sortable-drag',
+ ignore: 'a, img',
+ filter: null,
+ preventOnFilter: true,
+ animation: 0,
+ easing: null,
+ setData: function setData(dataTransfer, dragEl) {
+ dataTransfer.setData('Text', dragEl.textContent);
+ },
+ dropBubble: false,
+ dragoverBubble: false,
+ dataIdAttr: 'data-id',
+ delay: 0,
+ delayOnTouchOnly: false,
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
+ forceFallback: false,
+ fallbackClass: 'sortable-fallback',
+ fallbackOnBody: false,
+ fallbackTolerance: 0,
+ fallbackOffset: {
+ x: 0,
+ y: 0
+ },
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
+ emptyInsertThreshold: 5
+ };
+ PluginManager.initializePlugins(this, el, defaults); // Set default options
+
+ for (var name in defaults) {
+ !(name in options) && (options[name] = defaults[name]);
+ }
+
+ _prepareGroup(options); // Bind all private methods
+
+
+ for (var fn in this) {
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
+ this[fn] = this[fn].bind(this);
+ }
+ } // Setup drag mode
+
+
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
+
+ if (this.nativeDraggable) {
+ // Touch start threshold cannot be greater than the native dragstart threshold
+ this.options.touchStartThreshold = 1;
+ } // Bind events
+
+
+ if (options.supportPointer) {
+ on(el, 'pointerdown', this._onTapStart);
+ } else {
+ on(el, 'mousedown', this._onTapStart);
+ on(el, 'touchstart', this._onTapStart);
+ }
+
+ if (this.nativeDraggable) {
+ on(el, 'dragover', this);
+ on(el, 'dragenter', this);
+ }
+
+ sortables.push(this.el); // Restore sorting
+
+ options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
+
+ _extends(this, AnimationStateManager());
+}
+
+Sortable.prototype =
+/** @lends Sortable.prototype */
+{
+ constructor: Sortable,
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
+ if (!this.el.contains(target) && target !== this.el) {
+ lastTarget = null;
+ }
+ },
+ _getDirection: function _getDirection(evt, target) {
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
+ },
+ _onTapStart: function _onTapStart(
+ /** Event|TouchEvent */
+ evt) {
+ if (!evt.cancelable) return;
+
+ var _this = this,
+ el = this.el,
+ options = this.options,
+ preventOnFilter = options.preventOnFilter,
+ type = evt.type,
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
+ target = (touch || evt).target,
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
+ filter = options.filter;
+
+ _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
+
+
+ if (dragEl) {
+ return;
+ }
+
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
+ return; // only left button and enabled
+ } // cancel dnd if original target is content editable
+
+
+ if (originalTarget.isContentEditable) {
+ return;
+ } // Safari ignores further event handling after mousedown
+
+
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
+ return;
+ }
+
+ target = closest(target, options.draggable, el, false);
+
+ if (target && target.animated) {
+ return;
+ }
+
+ if (lastDownEl === target) {
+ // Ignoring duplicate `down`
+ return;
+ } // Get the index of the dragged element within its parent
+
+
+ oldIndex = index(target);
+ oldDraggableIndex = index(target, options.draggable); // Check filter
+
+ if (typeof filter === 'function') {
+ if (filter.call(this, evt, target, this)) {
+ _dispatchEvent({
+ sortable: _this,
+ rootEl: originalTarget,
+ name: 'filter',
+ targetEl: target,
+ toEl: el,
+ fromEl: el
+ });
+
+ pluginEvent('filter', _this, {
+ evt: evt
+ });
+ preventOnFilter && evt.cancelable && evt.preventDefault();
+ return; // cancel dnd
+ }
+ } else if (filter) {
+ filter = filter.split(',').some(function (criteria) {
+ criteria = closest(originalTarget, criteria.trim(), el, false);
+
+ if (criteria) {
+ _dispatchEvent({
+ sortable: _this,
+ rootEl: criteria,
+ name: 'filter',
+ targetEl: target,
+ fromEl: el,
+ toEl: el
+ });
+
+ pluginEvent('filter', _this, {
+ evt: evt
+ });
+ return true;
+ }
+ });
+
+ if (filter) {
+ preventOnFilter && evt.cancelable && evt.preventDefault();
+ return; // cancel dnd
+ }
+ }
+
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
+ return;
+ } // Prepare `dragstart`
+
+
+ this._prepareDragStart(evt, touch, target);
+ },
+ _prepareDragStart: function _prepareDragStart(
+ /** Event */
+ evt,
+ /** Touch */
+ touch,
+ /** HTMLElement */
+ target) {
+ var _this = this,
+ el = _this.el,
+ options = _this.options,
+ ownerDocument = el.ownerDocument,
+ dragStartFn;
+
+ if (target && !dragEl && target.parentNode === el) {
+ var dragRect = getRect(target);
+ rootEl = el;
+ dragEl = target;
+ parentEl = dragEl.parentNode;
+ nextEl = dragEl.nextSibling;
+ lastDownEl = target;
+ activeGroup = options.group;
+ Sortable.dragged = dragEl;
+ tapEvt = {
+ target: dragEl,
+ clientX: (touch || evt).clientX,
+ clientY: (touch || evt).clientY
+ };
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
+ this._lastX = (touch || evt).clientX;
+ this._lastY = (touch || evt).clientY;
+ dragEl.style['will-change'] = 'all';
+
+ dragStartFn = function dragStartFn() {
+ pluginEvent('delayEnded', _this, {
+ evt: evt
+ });
+
+ if (Sortable.eventCanceled) {
+ _this._onDrop();
+
+ return;
+ } // Delayed drag has been triggered
+ // we can re-enable the events: touchmove/mousemove
+
+
+ _this._disableDelayedDragEvents();
+
+ if (!FireFox && _this.nativeDraggable) {
+ dragEl.draggable = true;
+ } // Bind the events: dragstart/dragend
+
+
+ _this._triggerDragStart(evt, touch); // Drag start event
+
+
+ _dispatchEvent({
+ sortable: _this,
+ name: 'choose',
+ originalEvent: evt
+ }); // Chosen item
+
+
+ toggleClass(dragEl, options.chosenClass, true);
+ }; // Disable "draggable"
+
+
+ options.ignore.split(',').forEach(function (criteria) {
+ find(dragEl, criteria.trim(), _disableDraggable);
+ });
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
+ on(ownerDocument, 'mouseup', _this._onDrop);
+ on(ownerDocument, 'touchend', _this._onDrop);
+ on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
+
+ if (FireFox && this.nativeDraggable) {
+ this.options.touchStartThreshold = 4;
+ dragEl.draggable = true;
+ }
+
+ pluginEvent('delayStart', this, {
+ evt: evt
+ }); // Delay is impossible for native DnD in Edge or IE
+
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
+ if (Sortable.eventCanceled) {
+ this._onDrop();
+
+ return;
+ } // If the user moves the pointer or let go the click or touch
+ // before the delay has been reached:
+ // disable the delayed drag
+
+
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
+ } else {
+ dragStartFn();
+ }
+ }
+ },
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
+ /** TouchEvent|PointerEvent **/
+ e) {
+ var touch = e.touches ? e.touches[0] : e;
+
+ if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
+ this._disableDelayedDrag();
+ }
+ },
+ _disableDelayedDrag: function _disableDelayedDrag() {
+ dragEl && _disableDraggable(dragEl);
+ clearTimeout(this._dragStartTimer);
+
+ this._disableDelayedDragEvents();
+ },
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
+ var ownerDocument = this.el.ownerDocument;
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
+ },
+ _triggerDragStart: function _triggerDragStart(
+ /** Event */
+ evt,
+ /** Touch */
+ touch) {
+ touch = touch || evt.pointerType == 'touch' && evt;
+
+ if (!this.nativeDraggable || touch) {
+ if (this.options.supportPointer) {
+ on(document, 'pointermove', this._onTouchMove);
+ } else if (touch) {
+ on(document, 'touchmove', this._onTouchMove);
+ } else {
+ on(document, 'mousemove', this._onTouchMove);
+ }
+ } else {
+ on(dragEl, 'dragend', this);
+ on(rootEl, 'dragstart', this._onDragStart);
+ }
+
+ try {
+ if (document.selection) {
+ // Timeout neccessary for IE9
+ _nextTick(function () {
+ document.selection.empty();
+ });
+ } else {
+ window.getSelection().removeAllRanges();
+ }
+ } catch (err) {}
+ },
+ _dragStarted: function _dragStarted(fallback, evt) {
+
+ awaitingDragStarted = false;
+
+ if (rootEl && dragEl) {
+ pluginEvent('dragStarted', this, {
+ evt: evt
+ });
+
+ if (this.nativeDraggable) {
+ on(document, 'dragover', _checkOutsideTargetEl);
+ }
+
+ var options = this.options; // Apply effect
+
+ !fallback && toggleClass(dragEl, options.dragClass, false);
+ toggleClass(dragEl, options.ghostClass, true);
+ Sortable.active = this;
+ fallback && this._appendGhost(); // Drag start event
+
+ _dispatchEvent({
+ sortable: this,
+ name: 'start',
+ originalEvent: evt
+ });
+ } else {
+ this._nulling();
+ }
+ },
+ _emulateDragOver: function _emulateDragOver() {
+ if (touchEvt) {
+ this._lastX = touchEvt.clientX;
+ this._lastY = touchEvt.clientY;
+
+ _hideGhostForTarget();
+
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
+ var parent = target;
+
+ while (target && target.shadowRoot) {
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
+ if (target === parent) break;
+ parent = target;
+ }
+
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
+
+ if (parent) {
+ do {
+ if (parent[expando]) {
+ var inserted = void 0;
+ inserted = parent[expando]._onDragOver({
+ clientX: touchEvt.clientX,
+ clientY: touchEvt.clientY,
+ target: target,
+ rootEl: parent
+ });
+
+ if (inserted && !this.options.dragoverBubble) {
+ break;
+ }
+ }
+
+ target = parent; // store last element
+ }
+ /* jshint boss:true */
+ while (parent = parent.parentNode);
+ }
+
+ _unhideGhostForTarget();
+ }
+ },
+ _onTouchMove: function _onTouchMove(
+ /**TouchEvent*/
+ evt) {
+ if (tapEvt) {
+ var options = this.options,
+ fallbackTolerance = options.fallbackTolerance,
+ fallbackOffset = options.fallbackOffset,
+ touch = evt.touches ? evt.touches[0] : evt,
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
+
+ if (!Sortable.active && !awaitingDragStarted) {
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
+ return;
+ }
+
+ this._onDragStart(evt, true);
+ }
+
+ if (ghostEl) {
+ if (ghostMatrix) {
+ ghostMatrix.e += dx - (lastDx || 0);
+ ghostMatrix.f += dy - (lastDy || 0);
+ } else {
+ ghostMatrix = {
+ a: 1,
+ b: 0,
+ c: 0,
+ d: 1,
+ e: dx,
+ f: dy
+ };
+ }
+
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
+ css(ghostEl, 'webkitTransform', cssMatrix);
+ css(ghostEl, 'mozTransform', cssMatrix);
+ css(ghostEl, 'msTransform', cssMatrix);
+ css(ghostEl, 'transform', cssMatrix);
+ lastDx = dx;
+ lastDy = dy;
+ touchEvt = touch;
+ }
+
+ evt.cancelable && evt.preventDefault();
+ }
+ },
+ _appendGhost: function _appendGhost() {
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
+ // Not being adjusted for
+ if (!ghostEl) {
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
+ options = this.options; // Position absolutely
+
+ if (PositionGhostAbsolutely) {
+ // Get relatively positioned parent
+ ghostRelativeParent = container;
+
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
+ ghostRelativeParent = ghostRelativeParent.parentNode;
+ }
+
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
+ rect.top += ghostRelativeParent.scrollTop;
+ rect.left += ghostRelativeParent.scrollLeft;
+ } else {
+ ghostRelativeParent = getWindowScrollingElement();
+ }
+
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
+ }
+
+ ghostEl = dragEl.cloneNode(true);
+ toggleClass(ghostEl, options.ghostClass, false);
+ toggleClass(ghostEl, options.fallbackClass, true);
+ toggleClass(ghostEl, options.dragClass, true);
+ css(ghostEl, 'transition', '');
+ css(ghostEl, 'transform', '');
+ css(ghostEl, 'box-sizing', 'border-box');
+ css(ghostEl, 'margin', 0);
+ css(ghostEl, 'top', rect.top);
+ css(ghostEl, 'left', rect.left);
+ css(ghostEl, 'width', rect.width);
+ css(ghostEl, 'height', rect.height);
+ css(ghostEl, 'opacity', '0.8');
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
+ css(ghostEl, 'zIndex', '100000');
+ css(ghostEl, 'pointerEvents', 'none');
+ Sortable.ghost = ghostEl;
+ container.appendChild(ghostEl); // Set transform-origin
+
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
+ }
+ },
+ _onDragStart: function _onDragStart(
+ /**Event*/
+ evt,
+ /**boolean*/
+ fallback) {
+ var _this = this;
+
+ var dataTransfer = evt.dataTransfer;
+ var options = _this.options;
+ pluginEvent('dragStart', this, {
+ evt: evt
+ });
+
+ if (Sortable.eventCanceled) {
+ this._onDrop();
+
+ return;
+ }
+
+ pluginEvent('setupClone', this);
+
+ if (!Sortable.eventCanceled) {
+ cloneEl = clone(dragEl);
+ cloneEl.removeAttribute("id");
+ cloneEl.draggable = false;
+ cloneEl.style['will-change'] = '';
+
+ this._hideClone();
+
+ toggleClass(cloneEl, this.options.chosenClass, false);
+ Sortable.clone = cloneEl;
+ } // #1143: IFrame support workaround
+
+
+ _this.cloneId = _nextTick(function () {
+ pluginEvent('clone', _this);
+ if (Sortable.eventCanceled) return;
+
+ if (!_this.options.removeCloneOnHide) {
+ rootEl.insertBefore(cloneEl, dragEl);
+ }
+
+ _this._hideClone();
+
+ _dispatchEvent({
+ sortable: _this,
+ name: 'clone'
+ });
+ });
+ !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
+
+ if (fallback) {
+ ignoreNextClick = true;
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
+ } else {
+ // Undo what was set in _prepareDragStart before drag started
+ off(document, 'mouseup', _this._onDrop);
+ off(document, 'touchend', _this._onDrop);
+ off(document, 'touchcancel', _this._onDrop);
+
+ if (dataTransfer) {
+ dataTransfer.effectAllowed = 'move';
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
+ }
+
+ on(document, 'drop', _this); // #1276 fix:
+
+ css(dragEl, 'transform', 'translateZ(0)');
+ }
+
+ awaitingDragStarted = true;
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
+ on(document, 'selectstart', _this);
+ moved = true;
+
+ if (Safari) {
+ css(document.body, 'user-select', 'none');
+ }
+ },
+ // Returns true - if no further action is needed (either inserted or another condition)
+ _onDragOver: function _onDragOver(
+ /**Event*/
+ evt) {
+ var el = this.el,
+ target = evt.target,
+ dragRect,
+ targetRect,
+ revert,
+ options = this.options,
+ group = options.group,
+ activeSortable = Sortable.active,
+ isOwner = activeGroup === group,
+ canSort = options.sort,
+ fromSortable = putSortable || activeSortable,
+ vertical,
+ _this = this,
+ completedFired = false;
+
+ if (_silent) return;
+
+ function dragOverEvent(name, extra) {
+ pluginEvent(name, _this, _objectSpread2({
+ evt: evt,
+ isOwner: isOwner,
+ axis: vertical ? 'vertical' : 'horizontal',
+ revert: revert,
+ dragRect: dragRect,
+ targetRect: targetRect,
+ canSort: canSort,
+ fromSortable: fromSortable,
+ target: target,
+ completed: completed,
+ onMove: function onMove(target, after) {
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
+ },
+ changed: changed
+ }, extra));
+ } // Capture animation state
+
+
+ function capture() {
+ dragOverEvent('dragOverAnimationCapture');
+
+ _this.captureAnimationState();
+
+ if (_this !== fromSortable) {
+ fromSortable.captureAnimationState();
+ }
+ } // Return invocation when dragEl is inserted (or completed)
+
+
+ function completed(insertion) {
+ dragOverEvent('dragOverCompleted', {
+ insertion: insertion
+ });
+
+ if (insertion) {
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
+ if (isOwner) {
+ activeSortable._hideClone();
+ } else {
+ activeSortable._showClone(_this);
+ }
+
+ if (_this !== fromSortable) {
+ // Set ghost class to new sortable's ghost class
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
+ toggleClass(dragEl, options.ghostClass, true);
+ }
+
+ if (putSortable !== _this && _this !== Sortable.active) {
+ putSortable = _this;
+ } else if (_this === Sortable.active && putSortable) {
+ putSortable = null;
+ } // Animation
+
+
+ if (fromSortable === _this) {
+ _this._ignoreWhileAnimating = target;
+ }
+
+ _this.animateAll(function () {
+ dragOverEvent('dragOverAnimationComplete');
+ _this._ignoreWhileAnimating = null;
+ });
+
+ if (_this !== fromSortable) {
+ fromSortable.animateAll();
+ fromSortable._ignoreWhileAnimating = null;
+ }
+ } // Null lastTarget if it is not inside a previously swapped element
+
+
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
+ lastTarget = null;
+ } // no bubbling and not fallback
+
+
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
+
+
+ !insertion && nearestEmptyInsertDetectEvent(evt);
+ }
+
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
+ return completedFired = true;
+ } // Call when dragEl has been inserted
+
+
+ function changed() {
+ newIndex = index(dragEl);
+ newDraggableIndex = index(dragEl, options.draggable);
+
+ _dispatchEvent({
+ sortable: _this,
+ name: 'change',
+ toEl: el,
+ newIndex: newIndex,
+ newDraggableIndex: newDraggableIndex,
+ originalEvent: evt
+ });
+ }
+
+ if (evt.preventDefault !== void 0) {
+ evt.cancelable && evt.preventDefault();
+ }
+
+ target = closest(target, options.draggable, el, true);
+ dragOverEvent('dragOver');
+ if (Sortable.eventCanceled) return completedFired;
+
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
+ return completed(false);
+ }
+
+ ignoreNextClick = false;
+
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
+ vertical = this._getDirection(evt, target) === 'vertical';
+ dragRect = getRect(dragEl);
+ dragOverEvent('dragOverValid');
+ if (Sortable.eventCanceled) return completedFired;
+
+ if (revert) {
+ parentEl = rootEl; // actualization
+
+ capture();
+
+ this._hideClone();
+
+ dragOverEvent('revert');
+
+ if (!Sortable.eventCanceled) {
+ if (nextEl) {
+ rootEl.insertBefore(dragEl, nextEl);
+ } else {
+ rootEl.appendChild(dragEl);
+ }
+ }
+
+ return completed(true);
+ }
+
+ var elLastChild = lastChild(el, options.draggable);
+
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
+ // Insert to end of list
+ // If already at end of list: Do not insert
+ if (elLastChild === dragEl) {
+ return completed(false);
+ } // if there is a last element, it is the target
+
+
+ if (elLastChild && el === evt.target) {
+ target = elLastChild;
+ }
+
+ if (target) {
+ targetRect = getRect(target);
+ }
+
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
+ capture();
+
+ if (elLastChild && elLastChild.nextSibling) {
+ // the last draggable element is not the last node
+ el.insertBefore(dragEl, elLastChild.nextSibling);
+ } else {
+ el.appendChild(dragEl);
+ }
+
+ parentEl = el; // actualization
+
+ changed();
+ return completed(true);
+ }
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
+ // Insert to start of list
+ var firstChild = getChild(el, 0, options, true);
+
+ if (firstChild === dragEl) {
+ return completed(false);
+ }
+
+ target = firstChild;
+ targetRect = getRect(target);
+
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
+ capture();
+ el.insertBefore(dragEl, firstChild);
+ parentEl = el; // actualization
+
+ changed();
+ return completed(true);
+ }
+ } else if (target.parentNode === el) {
+ targetRect = getRect(target);
+ var direction = 0,
+ targetBeforeFirstSwap,
+ differentLevel = dragEl.parentNode !== el,
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
+ side1 = vertical ? 'top' : 'left',
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
+
+ if (lastTarget !== target) {
+ targetBeforeFirstSwap = targetRect[side1];
+ pastFirstInvertThresh = false;
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
+ }
+
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
+ var sibling;
+
+ if (direction !== 0) {
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
+ var dragIndex = index(dragEl);
+
+ do {
+ dragIndex -= direction;
+ sibling = parentEl.children[dragIndex];
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
+ } // If dragEl is already beside target: Do not insert
+
+
+ if (direction === 0 || sibling === target) {
+ return completed(false);
+ }
+
+ lastTarget = target;
+ lastDirection = direction;
+ var nextSibling = target.nextElementSibling,
+ after = false;
+ after = direction === 1;
+
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
+
+ if (moveVector !== false) {
+ if (moveVector === 1 || moveVector === -1) {
+ after = moveVector === 1;
+ }
+
+ _silent = true;
+ setTimeout(_unsilent, 30);
+ capture();
+
+ if (after && !nextSibling) {
+ el.appendChild(dragEl);
+ } else {
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
+ } // Undo chrome's scroll adjustment (has no effect on other browsers)
+
+
+ if (scrolledPastTop) {
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
+ }
+
+ parentEl = dragEl.parentNode; // actualization
+ // must be done before animation
+
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
+ }
+
+ changed();
+ return completed(true);
+ }
+ }
+
+ if (el.contains(dragEl)) {
+ return completed(false);
+ }
+ }
+
+ return false;
+ },
+ _ignoreWhileAnimating: null,
+ _offMoveEvents: function _offMoveEvents() {
+ off(document, 'mousemove', this._onTouchMove);
+ off(document, 'touchmove', this._onTouchMove);
+ off(document, 'pointermove', this._onTouchMove);
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
+ },
+ _offUpEvents: function _offUpEvents() {
+ var ownerDocument = this.el.ownerDocument;
+ off(ownerDocument, 'mouseup', this._onDrop);
+ off(ownerDocument, 'touchend', this._onDrop);
+ off(ownerDocument, 'pointerup', this._onDrop);
+ off(ownerDocument, 'touchcancel', this._onDrop);
+ off(document, 'selectstart', this);
+ },
+ _onDrop: function _onDrop(
+ /**Event*/
+ evt) {
+ var el = this.el,
+ options = this.options; // Get the index of the dragged element within its parent
+
+ newIndex = index(dragEl);
+ newDraggableIndex = index(dragEl, options.draggable);
+ pluginEvent('drop', this, {
+ evt: evt
+ });
+ parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
+
+ newIndex = index(dragEl);
+ newDraggableIndex = index(dragEl, options.draggable);
+
+ if (Sortable.eventCanceled) {
+ this._nulling();
+
+ return;
+ }
+
+ awaitingDragStarted = false;
+ isCircumstantialInvert = false;
+ pastFirstInvertThresh = false;
+ clearInterval(this._loopId);
+ clearTimeout(this._dragStartTimer);
+
+ _cancelNextTick(this.cloneId);
+
+ _cancelNextTick(this._dragStartId); // Unbind events
+
+
+ if (this.nativeDraggable) {
+ off(document, 'drop', this);
+ off(el, 'dragstart', this._onDragStart);
+ }
+
+ this._offMoveEvents();
+
+ this._offUpEvents();
+
+ if (Safari) {
+ css(document.body, 'user-select', '');
+ }
+
+ css(dragEl, 'transform', '');
+
+ if (evt) {
+ if (moved) {
+ evt.cancelable && evt.preventDefault();
+ !options.dropBubble && evt.stopPropagation();
+ }
+
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
+
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
+ // Remove clone(s)
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
+ }
+
+ if (dragEl) {
+ if (this.nativeDraggable) {
+ off(dragEl, 'dragend', this);
+ }
+
+ _disableDraggable(dragEl);
+
+ dragEl.style['will-change'] = ''; // Remove classes
+ // ghostClass is added in dragStarted
+
+ if (moved && !awaitingDragStarted) {
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
+ }
+
+ toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
+
+ _dispatchEvent({
+ sortable: this,
+ name: 'unchoose',
+ toEl: parentEl,
+ newIndex: null,
+ newDraggableIndex: null,
+ originalEvent: evt
+ });
+
+ if (rootEl !== parentEl) {
+ if (newIndex >= 0) {
+ // Add event
+ _dispatchEvent({
+ rootEl: parentEl,
+ name: 'add',
+ toEl: parentEl,
+ fromEl: rootEl,
+ originalEvent: evt
+ }); // Remove event
+
+
+ _dispatchEvent({
+ sortable: this,
+ name: 'remove',
+ toEl: parentEl,
+ originalEvent: evt
+ }); // drag from one list and drop into another
+
+
+ _dispatchEvent({
+ rootEl: parentEl,
+ name: 'sort',
+ toEl: parentEl,
+ fromEl: rootEl,
+ originalEvent: evt
+ });
+
+ _dispatchEvent({
+ sortable: this,
+ name: 'sort',
+ toEl: parentEl,
+ originalEvent: evt
+ });
+ }
+
+ putSortable && putSortable.save();
+ } else {
+ if (newIndex !== oldIndex) {
+ if (newIndex >= 0) {
+ // drag & drop within the same list
+ _dispatchEvent({
+ sortable: this,
+ name: 'update',
+ toEl: parentEl,
+ originalEvent: evt
+ });
+
+ _dispatchEvent({
+ sortable: this,
+ name: 'sort',
+ toEl: parentEl,
+ originalEvent: evt
+ });
+ }
+ }
+ }
+
+ if (Sortable.active) {
+ /* jshint eqnull:true */
+ if (newIndex == null || newIndex === -1) {
+ newIndex = oldIndex;
+ newDraggableIndex = oldDraggableIndex;
+ }
+
+ _dispatchEvent({
+ sortable: this,
+ name: 'end',
+ toEl: parentEl,
+ originalEvent: evt
+ }); // Save sorting
+
+
+ this.save();
+ }
+ }
+ }
+
+ this._nulling();
+ },
+ _nulling: function _nulling() {
+ pluginEvent('nulling', this);
+ rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
+ savedInputChecked.forEach(function (el) {
+ el.checked = true;
+ });
+ savedInputChecked.length = lastDx = lastDy = 0;
+ },
+ handleEvent: function handleEvent(
+ /**Event*/
+ evt) {
+ switch (evt.type) {
+ case 'drop':
+ case 'dragend':
+ this._onDrop(evt);
+
+ break;
+
+ case 'dragenter':
+ case 'dragover':
+ if (dragEl) {
+ this._onDragOver(evt);
+
+ _globalDragOver(evt);
+ }
+
+ break;
+
+ case 'selectstart':
+ evt.preventDefault();
+ break;
+ }
+ },
+
+ /**
+ * Serializes the item into an array of string.
+ * @returns {String[]}
+ */
+ toArray: function toArray() {
+ var order = [],
+ el,
+ children = this.el.children,
+ i = 0,
+ n = children.length,
+ options = this.options;
+
+ for (; i < n; i++) {
+ el = children[i];
+
+ if (closest(el, options.draggable, this.el, false)) {
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
+ }
+ }
+
+ return order;
+ },
+
+ /**
+ * Sorts the elements according to the array.
+ * @param {String[]} order order of the items
+ */
+ sort: function sort(order, useAnimation) {
+ var items = {},
+ rootEl = this.el;
+ this.toArray().forEach(function (id, i) {
+ var el = rootEl.children[i];
+
+ if (closest(el, this.options.draggable, rootEl, false)) {
+ items[id] = el;
+ }
+ }, this);
+ useAnimation && this.captureAnimationState();
+ order.forEach(function (id) {
+ if (items[id]) {
+ rootEl.removeChild(items[id]);
+ rootEl.appendChild(items[id]);
+ }
+ });
+ useAnimation && this.animateAll();
+ },
+
+ /**
+ * Save the current sorting
+ */
+ save: function save() {
+ var store = this.options.store;
+ store && store.set && store.set(this);
+ },
+
+ /**
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
+ * @param {HTMLElement} el
+ * @param {String} [selector] default: `options.draggable`
+ * @returns {HTMLElement|null}
+ */
+ closest: function closest$1(el, selector) {
+ return closest(el, selector || this.options.draggable, this.el, false);
+ },
+
+ /**
+ * Set/get option
+ * @param {string} name
+ * @param {*} [value]
+ * @returns {*}
+ */
+ option: function option(name, value) {
+ var options = this.options;
+
+ if (value === void 0) {
+ return options[name];
+ } else {
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
+
+ if (typeof modifiedValue !== 'undefined') {
+ options[name] = modifiedValue;
+ } else {
+ options[name] = value;
+ }
+
+ if (name === 'group') {
+ _prepareGroup(options);
+ }
+ }
+ },
+
+ /**
+ * Destroy
+ */
+ destroy: function destroy() {
+ pluginEvent('destroy', this);
+ var el = this.el;
+ el[expando] = null;
+ off(el, 'mousedown', this._onTapStart);
+ off(el, 'touchstart', this._onTapStart);
+ off(el, 'pointerdown', this._onTapStart);
+
+ if (this.nativeDraggable) {
+ off(el, 'dragover', this);
+ off(el, 'dragenter', this);
+ } // Remove draggable attributes
+
+
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
+ el.removeAttribute('draggable');
+ });
+
+ this._onDrop();
+
+ this._disableDelayedDragEvents();
+
+ sortables.splice(sortables.indexOf(this.el), 1);
+ this.el = el = null;
+ },
+ _hideClone: function _hideClone() {
+ if (!cloneHidden) {
+ pluginEvent('hideClone', this);
+ if (Sortable.eventCanceled) return;
+ css(cloneEl, 'display', 'none');
+
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
+ cloneEl.parentNode.removeChild(cloneEl);
+ }
+
+ cloneHidden = true;
+ }
+ },
+ _showClone: function _showClone(putSortable) {
+ if (putSortable.lastPutMode !== 'clone') {
+ this._hideClone();
+
+ return;
+ }
+
+ if (cloneHidden) {
+ pluginEvent('showClone', this);
+ if (Sortable.eventCanceled) return; // show clone at dragEl or original position
+
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
+ rootEl.insertBefore(cloneEl, dragEl);
+ } else if (nextEl) {
+ rootEl.insertBefore(cloneEl, nextEl);
+ } else {
+ rootEl.appendChild(cloneEl);
+ }
+
+ if (this.options.group.revertClone) {
+ this.animate(dragEl, cloneEl);
+ }
+
+ css(cloneEl, 'display', '');
+ cloneHidden = false;
+ }
+ }
+};
+
+function _globalDragOver(
+/**Event*/
+evt) {
+ if (evt.dataTransfer) {
+ evt.dataTransfer.dropEffect = 'move';
+ }
+
+ evt.cancelable && evt.preventDefault();
+}
+
+function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
+ var evt,
+ sortable = fromEl[expando],
+ onMoveFn = sortable.options.onMove,
+ retVal; // Support for new CustomEvent feature
+
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
+ evt = new CustomEvent('move', {
+ bubbles: true,
+ cancelable: true
+ });
+ } else {
+ evt = document.createEvent('Event');
+ evt.initEvent('move', true, true);
+ }
+
+ evt.to = toEl;
+ evt.from = fromEl;
+ evt.dragged = dragEl;
+ evt.draggedRect = dragRect;
+ evt.related = targetEl || toEl;
+ evt.relatedRect = targetRect || getRect(toEl);
+ evt.willInsertAfter = willInsertAfter;
+ evt.originalEvent = originalEvent;
+ fromEl.dispatchEvent(evt);
+
+ if (onMoveFn) {
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
+ }
+
+ return retVal;
+}
+
+function _disableDraggable(el) {
+ el.draggable = false;
+}
+
+function _unsilent() {
+ _silent = false;
+}
+
+function _ghostIsFirst(evt, vertical, sortable) {
+ var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
+ var spacer = 10;
+ return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
+}
+
+function _ghostIsLast(evt, vertical, sortable) {
+ var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
+ var spacer = 10;
+ return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
+}
+
+function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
+ targetLength = vertical ? targetRect.height : targetRect.width,
+ targetS1 = vertical ? targetRect.top : targetRect.left,
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
+ invert = false;
+
+ if (!invertSwap) {
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
+ // check if past first invert threshold on side opposite of lastDirection
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
+ pastFirstInvertThresh = true;
+ }
+
+ if (!pastFirstInvertThresh) {
+ // dragEl shadow (target move distance shadow)
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
+ return -lastDirection;
+ }
+ } else {
+ invert = true;
+ }
+ } else {
+ // Regular
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
+ return _getInsertDirection(target);
+ }
+ }
+ }
+
+ invert = invert || invertSwap;
+
+ if (invert) {
+ // Invert of regular
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
+ }
+ }
+
+ return 0;
+}
+/**
+ * Gets the direction dragEl must be swapped relative to target in order to make it
+ * seem that dragEl has been "inserted" into that element's position
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
+ * @return {Number} Direction dragEl must be swapped
+ */
+
+
+function _getInsertDirection(target) {
+ if (index(dragEl) < index(target)) {
+ return 1;
+ } else {
+ return -1;
+ }
+}
+/**
+ * Generate id
+ * @param {HTMLElement} el
+ * @returns {String}
+ * @private
+ */
+
+
+function _generateId(el) {
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
+ i = str.length,
+ sum = 0;
+
+ while (i--) {
+ sum += str.charCodeAt(i);
+ }
+
+ return sum.toString(36);
+}
+
+function _saveInputCheckedState(root) {
+ savedInputChecked.length = 0;
+ var inputs = root.getElementsByTagName('input');
+ var idx = inputs.length;
+
+ while (idx--) {
+ var el = inputs[idx];
+ el.checked && savedInputChecked.push(el);
+ }
+}
+
+function _nextTick(fn) {
+ return setTimeout(fn, 0);
+}
+
+function _cancelNextTick(id) {
+ return clearTimeout(id);
+} // Fixed #973:
+
+
+if (documentExists) {
+ on(document, 'touchmove', function (evt) {
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
+ evt.preventDefault();
+ }
+ });
+} // Export utils
+
+
+Sortable.utils = {
+ on: on,
+ off: off,
+ css: css,
+ find: find,
+ is: function is(el, selector) {
+ return !!closest(el, selector, el, false);
+ },
+ extend: extend,
+ throttle: throttle,
+ closest: closest,
+ toggleClass: toggleClass,
+ clone: clone,
+ index: index,
+ nextTick: _nextTick,
+ cancelNextTick: _cancelNextTick,
+ detectDirection: _detectDirection,
+ getChild: getChild
+};
+/**
+ * Get the Sortable instance of an element
+ * @param {HTMLElement} element The element
+ * @return {Sortable|undefined} The instance of Sortable
+ */
+
+Sortable.get = function (element) {
+ return element[expando];
+};
+/**
+ * Mount a plugin to Sortable
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
+ */
+
+
+Sortable.mount = function () {
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
+ plugins[_key] = arguments[_key];
+ }
+
+ if (plugins[0].constructor === Array) plugins = plugins[0];
+ plugins.forEach(function (plugin) {
+ if (!plugin.prototype || !plugin.prototype.constructor) {
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
+ }
+
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
+ PluginManager.mount(plugin);
+ });
+};
+/**
+ * Create sortable instance
+ * @param {HTMLElement} el
+ * @param {Object} [options]
+ */
+
+
+Sortable.create = function (el, options) {
+ return new Sortable(el, options);
+}; // Export
+
+
+Sortable.version = version;
+
+var autoScrolls = [],
+ scrollEl,
+ scrollRootEl,
+ scrolling = false,
+ lastAutoScrollX,
+ lastAutoScrollY,
+ touchEvt$1,
+ pointerElemChangedInterval;
+
+function AutoScrollPlugin() {
+ function AutoScroll() {
+ this.defaults = {
+ scroll: true,
+ forceAutoScrollFallback: false,
+ scrollSensitivity: 30,
+ scrollSpeed: 10,
+ bubbleScroll: true
+ }; // Bind all private methods
+
+ for (var fn in this) {
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
+ this[fn] = this[fn].bind(this);
+ }
+ }
+ }
+
+ AutoScroll.prototype = {
+ dragStarted: function dragStarted(_ref) {
+ var originalEvent = _ref.originalEvent;
+
+ if (this.sortable.nativeDraggable) {
+ on(document, 'dragover', this._handleAutoScroll);
+ } else {
+ if (this.options.supportPointer) {
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
+ } else if (originalEvent.touches) {
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
+ } else {
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
+ }
+ }
+ },
+ dragOverCompleted: function dragOverCompleted(_ref2) {
+ var originalEvent = _ref2.originalEvent;
+
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
+ this._handleAutoScroll(originalEvent);
+ }
+ },
+ drop: function drop() {
+ if (this.sortable.nativeDraggable) {
+ off(document, 'dragover', this._handleAutoScroll);
+ } else {
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
+ }
+
+ clearPointerElemChangedInterval();
+ clearAutoScrolls();
+ cancelThrottle();
+ },
+ nulling: function nulling() {
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
+ autoScrolls.length = 0;
+ },
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
+ this._handleAutoScroll(evt, true);
+ },
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
+ var _this = this;
+
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
+ elem = document.elementFromPoint(x, y);
+ touchEvt$1 = evt; // IE does not seem to have native autoscroll,
+ // Edge's autoscroll seems too conditional,
+ // MACOS Safari does not have autoscroll,
+ // Firefox and Chrome are good
+
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
+ autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
+
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
+
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
+ pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
+
+ pointerElemChangedInterval = setInterval(function () {
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
+
+ if (newElem !== ogElemScroller) {
+ ogElemScroller = newElem;
+ clearAutoScrolls();
+ }
+
+ autoScroll(evt, _this.options, newElem, fallback);
+ }, 10);
+ lastAutoScrollX = x;
+ lastAutoScrollY = y;
+ }
+ } else {
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
+ clearAutoScrolls();
+ return;
+ }
+
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
+ }
+ }
+ };
+ return _extends(AutoScroll, {
+ pluginName: 'scroll',
+ initializeByDefault: true
+ });
+}
+
+function clearAutoScrolls() {
+ autoScrolls.forEach(function (autoScroll) {
+ clearInterval(autoScroll.pid);
+ });
+ autoScrolls = [];
+}
+
+function clearPointerElemChangedInterval() {
+ clearInterval(pointerElemChangedInterval);
+}
+
+var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
+ if (!options.scroll) return;
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
+ sens = options.scrollSensitivity,
+ speed = options.scrollSpeed,
+ winScroller = getWindowScrollingElement();
+ var scrollThisInstance = false,
+ scrollCustomFn; // New scroll root, set scrollEl
+
+ if (scrollRootEl !== rootEl) {
+ scrollRootEl = rootEl;
+ clearAutoScrolls();
+ scrollEl = options.scroll;
+ scrollCustomFn = options.scrollFn;
+
+ if (scrollEl === true) {
+ scrollEl = getParentAutoScrollElement(rootEl, true);
+ }
+ }
+
+ var layersOut = 0;
+ var currentParent = scrollEl;
+
+ do {
+ var el = currentParent,
+ rect = getRect(el),
+ top = rect.top,
+ bottom = rect.bottom,
+ left = rect.left,
+ right = rect.right,
+ width = rect.width,
+ height = rect.height,
+ canScrollX = void 0,
+ canScrollY = void 0,
+ scrollWidth = el.scrollWidth,
+ scrollHeight = el.scrollHeight,
+ elCSS = css(el),
+ scrollPosX = el.scrollLeft,
+ scrollPosY = el.scrollTop;
+
+ if (el === winScroller) {
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
+ } else {
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
+ }
+
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
+
+ if (!autoScrolls[layersOut]) {
+ for (var i = 0; i <= layersOut; i++) {
+ if (!autoScrolls[i]) {
+ autoScrolls[i] = {};
+ }
+ }
+ }
+
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
+ autoScrolls[layersOut].el = el;
+ autoScrolls[layersOut].vx = vx;
+ autoScrolls[layersOut].vy = vy;
+ clearInterval(autoScrolls[layersOut].pid);
+
+ if (vx != 0 || vy != 0) {
+ scrollThisInstance = true;
+ /* jshint loopfunc:true */
+
+ autoScrolls[layersOut].pid = setInterval(function () {
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
+ if (isFallback && this.layer === 0) {
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
+
+ }
+
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
+
+ if (typeof scrollCustomFn === 'function') {
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
+ return;
+ }
+ }
+
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
+ }.bind({
+ layer: layersOut
+ }), 24);
+ }
+ }
+
+ layersOut++;
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
+
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
+}, 30);
+
+var drop = function drop(_ref) {
+ var originalEvent = _ref.originalEvent,
+ putSortable = _ref.putSortable,
+ dragEl = _ref.dragEl,
+ activeSortable = _ref.activeSortable,
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
+ hideGhostForTarget = _ref.hideGhostForTarget,
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
+ if (!originalEvent) return;
+ var toSortable = putSortable || activeSortable;
+ hideGhostForTarget();
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
+ unhideGhostForTarget();
+
+ if (toSortable && !toSortable.el.contains(target)) {
+ dispatchSortableEvent('spill');
+ this.onSpill({
+ dragEl: dragEl,
+ putSortable: putSortable
+ });
+ }
+};
+
+function Revert() {}
+
+Revert.prototype = {
+ startIndex: null,
+ dragStart: function dragStart(_ref2) {
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
+ this.startIndex = oldDraggableIndex;
+ },
+ onSpill: function onSpill(_ref3) {
+ var dragEl = _ref3.dragEl,
+ putSortable = _ref3.putSortable;
+ this.sortable.captureAnimationState();
+
+ if (putSortable) {
+ putSortable.captureAnimationState();
+ }
+
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
+
+ if (nextSibling) {
+ this.sortable.el.insertBefore(dragEl, nextSibling);
+ } else {
+ this.sortable.el.appendChild(dragEl);
+ }
+
+ this.sortable.animateAll();
+
+ if (putSortable) {
+ putSortable.animateAll();
+ }
+ },
+ drop: drop
+};
+
+_extends(Revert, {
+ pluginName: 'revertOnSpill'
+});
+
+function Remove() {}
+
+Remove.prototype = {
+ onSpill: function onSpill(_ref4) {
+ var dragEl = _ref4.dragEl,
+ putSortable = _ref4.putSortable;
+ var parentSortable = putSortable || this.sortable;
+ parentSortable.captureAnimationState();
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
+ parentSortable.animateAll();
+ },
+ drop: drop
+};
+
+_extends(Remove, {
+ pluginName: 'removeOnSpill'
+});
+
+Sortable.mount(new AutoScrollPlugin());
+Sortable.mount(Remove, Revert);
+
+const HIGHLIGHTER_STYLES = [
+ "none",
+ "lowlight",
+ "floating",
+ "rounded",
+ "realistic",
+];
+const HIGHLIGHTER_METHODS = ["css-classes", "inline-styles"];
+const DEFAULT_SETTINGS = {
+ highlighterStyle: "none",
+ highlighterMethods: "inline-styles",
+ highlighters: {
+ Pink: "#FFB8EBA6",
+ Red: "#FF5582A6",
+ Orange: "#FFB86CA6",
+ Yellow: "#FFF3A3A6",
+ Green: "#BBFABBA6",
+ Cyan: "#ABF7F7A6",
+ Blue: "#ADCCFFA6",
+ Purple: "#D2B3FFA6",
+ Grey: "#CACFD9A6",
+ },
+ highlighterOrder: [],
+};
+DEFAULT_SETTINGS.highlighterOrder = Object.keys(DEFAULT_SETTINGS.highlighters);
+
+function setAttributes(element, attributes) {
+ for (let key in attributes) {
+ element.setAttribute(key, attributes[key]);
+ }
+}
+
+class HighlightrSettingTab extends obsidian.PluginSettingTab {
+ constructor(app, plugin) {
+ super(app, plugin);
+ this.plugin = plugin;
+ }
+ display() {
+ const { containerEl } = this;
+ containerEl.empty();
+ containerEl.createEl("h1", { text: "Highlightr" });
+ containerEl.createEl("p", { text: "Created by " }).createEl("a", {
+ text: "Chetachi 👩🏽💻",
+ href: "https://github.com/chetachiezikeuzor",
+ });
+ containerEl.createEl("h2", { text: "Plugin Settings" });
+ new obsidian.Setting(containerEl)
+ .setName("Choose highlight method")
+ .setDesc(`Choose between highlighting with inline CSS or CSS classes. Please note that there are pros and cons to both choices. Inline CSS will keep you from being reliant on external CSS files if you choose to export your notes. CSS classes are more flexible and easier to customize.`)
+ .addDropdown((dropdown) => {
+ let methods = {};
+ HIGHLIGHTER_METHODS.map((method) => (methods[method] = method));
+ dropdown.addOptions(methods);
+ dropdown
+ .setValue(this.plugin.settings.highlighterMethods)
+ .onChange((highlightrMethod) => {
+ this.plugin.settings.highlighterMethods = highlightrMethod;
+ setTimeout(() => {
+ dispatchEvent(new Event("Highlightr-NewCommand"));
+ }, 100);
+ this.plugin.saveSettings();
+ this.plugin.saveData(this.plugin.settings);
+ this.display();
+ });
+ });
+ const stylesSetting = new obsidian.Setting(containerEl);
+ stylesSetting
+ .setName("Choose highlight style")
+ .setDesc(`Depending on your design aesthetic, you may want to customize the style of your highlights. Choose from an assortment of different highlighter styles by using the dropdown. Depending on your theme, this plugin's CSS may be overriden.`)
+ .addDropdown((dropdown) => {
+ let styles = {};
+ HIGHLIGHTER_STYLES.map((style) => (styles[style] = style));
+ dropdown.addOptions(styles);
+ dropdown
+ .setValue(this.plugin.settings.highlighterStyle)
+ .onChange((highlighterStyle) => {
+ this.plugin.settings.highlighterStyle = highlighterStyle;
+ this.plugin.saveSettings();
+ this.plugin.saveData(this.plugin.settings);
+ this.plugin.refresh();
+ });
+ });
+ const styleDemo = () => {
+ const d = createEl("p");
+ d.setAttribute("style", "font-size: .925em; margin-top: 12px;");
+ d.innerHTML = `
+ Lowlight
+ Floating
+ Realistic
+ Rounded `;
+ return d;
+ };
+ stylesSetting.infoEl.appendChild(styleDemo());
+ const highlighterSetting = new obsidian.Setting(containerEl);
+ highlighterSetting
+ .setName("Choose highlight colors")
+ .setClass("highlighterplugin-setting-item")
+ .setDesc(`Create new highlight colors by providing a color name and using the color picker to set the hex code value. Don't forget to save the color before exiting the color picker. Drag and drop the highlight color to change the order for your highlighter component.`);
+ const colorInput = new obsidian.TextComponent(highlighterSetting.controlEl);
+ colorInput.setPlaceholder("Color name");
+ colorInput.inputEl.addClass("highlighter-settings-color");
+ const valueInput = new obsidian.TextComponent(highlighterSetting.controlEl);
+ valueInput.setPlaceholder("Color hex code");
+ valueInput.inputEl.addClass("highlighter-settings-value");
+ highlighterSetting
+ .addButton((button) => {
+ button.setClass("highlightr-color-picker");
+ })
+ .then(() => {
+ let input = valueInput.inputEl;
+ valueInput.inputEl.value || null;
+ const colorMap = this.plugin.settings.highlighterOrder.map((highlightKey) => this.plugin.settings.highlighters[highlightKey]);
+ let colorHex;
+ let pickrCreate = new Pickr({
+ el: ".highlightr-color-picker",
+ theme: "nano",
+ swatches: colorMap,
+ defaultRepresentation: "HEXA",
+ default: colorMap[colorMap.length - 1],
+ comparison: false,
+ components: {
+ preview: true,
+ opacity: true,
+ hue: true,
+ interaction: {
+ hex: true,
+ rgba: true,
+ hsla: false,
+ hsva: false,
+ cmyk: false,
+ input: true,
+ clear: true,
+ cancel: true,
+ save: true,
+ },
+ },
+ });
+ pickrCreate
+ .on("clear", function (instance) {
+ instance.hide();
+ input.trigger("change");
+ })
+ .on("cancel", function (instance) {
+ instance.getSelectedColor().toHEXA().toString();
+ input.trigger("change");
+ instance.hide();
+ })
+ .on("change", function (color) {
+ colorHex = color.toHEXA().toString();
+ let newColor;
+ colorHex.length == 6
+ ? (newColor = `${color.toHEXA().toString()}A6`)
+ : (newColor = color.toHEXA().toString());
+ colorInput.inputEl.setAttribute("style", `background-color: ${newColor}; color: var(--text-normal);`);
+ setAttributes(input, {
+ value: newColor,
+ style: `background-color: ${newColor}; color: var(--text-normal);`,
+ });
+ input.setText(newColor);
+ input.textContent = newColor;
+ input.value = newColor;
+ input.trigger("change");
+ })
+ .on("save", function (color, instance) {
+ let newColorValue = color.toHEXA().toString();
+ input.setText(newColorValue);
+ input.textContent = newColorValue;
+ input.value = newColorValue;
+ input.trigger("change");
+ instance.hide();
+ instance.addSwatch(color.toHEXA().toString());
+ });
+ })
+ .addButton((button) => {
+ button
+ .setClass("HighlightrSettingsButton")
+ .setClass("HighlightrSettingsButtonAdd")
+ .setIcon("highlightr-save")
+ .setTooltip("Save")
+ .onClick((buttonEl) => __awaiter(this, void 0, void 0, function* () {
+ let color = colorInput.inputEl.value.replace(" ", "-");
+ let value = valueInput.inputEl.value;
+ if (color && value) {
+ if (!this.plugin.settings.highlighterOrder.includes(color)) {
+ this.plugin.settings.highlighterOrder.push(color);
+ this.plugin.settings.highlighters[color] = value;
+ setTimeout(() => {
+ dispatchEvent(new Event("Highlightr-NewCommand"));
+ }, 100);
+ yield this.plugin.saveSettings();
+ this.display();
+ }
+ else {
+ buttonEl.stopImmediatePropagation();
+ new obsidian.Notice("This color already exists");
+ }
+ }
+ color && !value
+ ? new obsidian.Notice("Highlighter hex code missing")
+ : !color && value
+ ? new obsidian.Notice("Highlighter name missing")
+ : new obsidian.Notice("Highlighter values missing"); // else
+ }));
+ });
+ const highlightersContainer = containerEl.createEl("div", {
+ cls: "HighlightrSettingsTabsContainer",
+ });
+ Sortable.create(highlightersContainer, {
+ animation: 500,
+ ghostClass: "highlighter-sortable-ghost",
+ chosenClass: "highlighter-sortable-chosen",
+ dragClass: "highlighter-sortable-drag",
+ dragoverBubble: true,
+ forceFallback: true,
+ fallbackClass: "highlighter-sortable-fallback",
+ easing: "cubic-bezier(1, 0, 0, 1)",
+ onSort: (command) => {
+ const arrayResult = this.plugin.settings.highlighterOrder;
+ const [removed] = arrayResult.splice(command.oldIndex, 1);
+ arrayResult.splice(command.newIndex, 0, removed);
+ this.plugin.settings.highlighterOrder = arrayResult;
+ this.plugin.saveSettings();
+ },
+ });
+ this.plugin.settings.highlighterOrder.forEach((highlighter) => {
+ const icon = ` `;
+ const settingItem = highlightersContainer.createEl("div");
+ settingItem.addClass("highlighter-item-draggable");
+ const colorIcon = settingItem.createEl("span");
+ colorIcon.addClass("highlighter-setting-icon");
+ colorIcon.innerHTML = icon;
+ new obsidian.Setting(settingItem)
+ .setClass("highlighter-setting-item")
+ .setName(highlighter)
+ .setDesc(this.plugin.settings.highlighters[highlighter])
+ .addButton((button) => {
+ button
+ .setClass("HighlightrSettingsButton")
+ .setClass("HighlightrSettingsButtonDelete")
+ .setIcon("highlightr-delete")
+ .setTooltip("Remove")
+ .onClick(() => __awaiter(this, void 0, void 0, function* () {
+ new obsidian.Notice(`${highlighter} highlight deleted`);
+ this.app.commands.removeCommand(`highlightr-plugin:${highlighter}`);
+ delete this.plugin.settings.highlighters[highlighter];
+ this.plugin.settings.highlighterOrder.remove(highlighter);
+ setTimeout(() => {
+ dispatchEvent(new Event("Highlightr-NewCommand"));
+ }, 100);
+ yield this.plugin.saveSettings();
+ this.display();
+ }));
+ });
+ const a = createEl("a");
+ a.setAttribute("href", "");
+ });
+ const hltrDonationDiv = containerEl.createEl("div", {
+ cls: "hltrDonationSection",
+ });
+ const donateText = createEl("p");
+ donateText.appendText("If you like this Plugin and are considering donating to support continued development, use the buttons below!");
+ hltrDonationDiv.appendChild(donateText);
+ hltrDonationDiv.appendChild(paypalButton("https://paypal.me/chelseaezikeuzor"));
+ hltrDonationDiv.appendChild(buyMeACoffeeButton("https://www.buymeacoffee.com/chetachi"));
+ hltrDonationDiv.appendChild(kofiButton("https://ko-fi.com/chetachi"));
+ }
+}
+const buyMeACoffeeButton = (link) => {
+ const a = createEl("a");
+ a.setAttribute("href", link);
+ a.addClass("buymeacoffee-chetachi-img");
+ a.innerHTML = ` `;
+ return a;
+};
+const paypalButton = (link) => {
+ const a = createEl("a");
+ a.setAttribute("href", link);
+ a.addClass("buymeacoffee-chetachi-img");
+ a.innerHTML = `
+
+
+
+
+
+
+ `;
+ return a;
+};
+const kofiButton = (link) => {
+ const a = createEl("a");
+ a.setAttribute("href", link);
+ a.addClass("buymeacoffee-chetachi-img");
+ a.innerHTML = ` `;
+ return a;
+};
+
+const highlighterMenu = (app, settings, editor) => {
+ var _a, _b, _c;
+ if (editor && editor.hasFocus()) {
+ const cursor = editor.getCursor("from");
+ let coords;
+ const menu = new obsidian.Menu();
+ menu.setUseNativeMenu(false);
+ const menuDom = menu.dom;
+ menuDom.addClass("highlighterContainer");
+ settings.highlighterOrder.forEach((highlighter) => {
+ menu.addItem((highlighterItem) => {
+ highlighterItem.setTitle(highlighter);
+ highlighterItem.setIcon(`highlightr-pen-${highlighter}`.toLowerCase());
+ highlighterItem.onClick(() => {
+ app.commands.executeCommandById(`highlightr-plugin:${highlighter}`);
+ });
+ });
+ });
+ if (editor.cursorCoords) {
+ coords = editor.cursorCoords(true, "window");
+ }
+ else if (editor.coordsAtPos) {
+ const offset = editor.posToOffset(cursor);
+ coords = (_c = (_b = (_a = editor.cm).coordsAtPos) === null || _b === void 0 ? void 0 : _b.call(_a, offset)) !== null && _c !== void 0 ? _c : editor.coordsAtPos(offset);
+ }
+ else {
+ return;
+ }
+ menu.showAtPosition({
+ x: coords.right + 25,
+ y: coords.top + 20,
+ });
+ }
+ else {
+ new obsidian.Notice("Focus must be in editor");
+ }
+};
+
+function contextMenu(app, menu, editor, plugin, settings) {
+ const selection = editor.getSelection();
+ menu.addItem((item) => {
+ const itemDom = item.dom;
+ itemDom.addClass("highlighter-button");
+ item
+ .setTitle("Highlight")
+ .setIcon("highlightr-pen")
+ .onClick((e) => __awaiter(this, void 0, void 0, function* () {
+ highlighterMenu(app, settings, editor);
+ }));
+ });
+ if (selection) {
+ menu.addItem((item) => {
+ item
+ .setTitle("Erase highlight")
+ .setIcon("highlightr-eraser")
+ .onClick((e) => {
+ if (editor.getSelection()) {
+ plugin.eraseHighlight(editor);
+ }
+ });
+ });
+ }
+}
+
+function addNewStyle(selector, style, sheet) {
+ sheet.textContent += selector + `{\n ${style}\n}\n\n`;
+}
+function createStyles(settings) {
+ let styleSheet = document.createElement("style");
+ setAttributes(styleSheet, {
+ type: "text/css",
+ id: "highlightr-styles",
+ });
+ let header = document.getElementsByTagName("HEAD")[0];
+ header.appendChild(styleSheet);
+ Object.keys(settings.highlighters).forEach((highlighter) => {
+ let colorLowercase = highlighter.toLowerCase();
+ addNewStyle(`.hltr-${colorLowercase},\nmark.hltr-${colorLowercase},\n.markdown-preview-view mark.hltr-${colorLowercase}`, `background: ${settings.highlighters[highlighter]};`, styleSheet);
+ });
+}
+
+class HighlightrPlugin extends obsidian.Plugin {
+ constructor() {
+ super(...arguments);
+ this.eraseHighlight = (editor) => {
+ const currentStr = editor.getSelection();
+ const newStr = currentStr
+ .replace(/\]\>/g, "")
+ .replace(/\]\>/g, "")
+ .replace(/\<\/mark>/g, "");
+ editor.replaceSelection(newStr);
+ editor.focus();
+ };
+ this.refresh = () => {
+ this.updateStyle();
+ };
+ this.updateStyle = () => {
+ document.body.classList.toggle("highlightr-lowlight", this.settings.highlighterStyle === "lowlight");
+ document.body.classList.toggle("highlightr-floating", this.settings.highlighterStyle === "floating");
+ document.body.classList.toggle("highlightr-rounded", this.settings.highlighterStyle === "rounded");
+ document.body.classList.toggle("highlightr-realistic", this.settings.highlighterStyle === "realistic");
+ };
+ this.handleHighlighterInContextMenu = (menu, editor) => {
+ contextMenu(this.app, menu, editor, this, this.settings);
+ };
+ }
+ onload() {
+ return __awaiter(this, void 0, void 0, function* () {
+ console.log(`Highlightr v${this.manifest.version} loaded`);
+ addIcons();
+ yield this.loadSettings();
+ this.app.workspace.onLayoutReady(() => {
+ this.reloadStyles(this.settings);
+ createHighlighterIcons(this.settings, this);
+ });
+ this.registerEvent(this.app.workspace.on("editor-menu", this.handleHighlighterInContextMenu));
+ this.addSettingTab(new HighlightrSettingTab(this.app, this));
+ this.addCommand({
+ id: "highlighter-plugin-menu",
+ name: "Open Highlightr",
+ icon: "highlightr-pen",
+ editorCallback: (editor) => {
+ !document.querySelector(".menu.highlighterContainer")
+ ? highlighterMenu(this.app, this.settings, editor)
+ : true;
+ },
+ });
+ addEventListener("Highlightr-NewCommand", () => {
+ this.reloadStyles(this.settings);
+ this.generateCommands(this.editor);
+ createHighlighterIcons(this.settings, this);
+ });
+ this.generateCommands(this.editor);
+ this.refresh();
+ });
+ }
+ reloadStyles(settings) {
+ let currentSheet = document.querySelector("style#highlightr-styles");
+ if (currentSheet) {
+ currentSheet.remove();
+ createStyles(settings);
+ }
+ else {
+ createStyles(settings);
+ }
+ }
+ generateCommands(editor) {
+ this.settings.highlighterOrder.forEach((highlighterKey) => {
+ const applyCommand = (command, editor) => {
+ const selectedText = editor.getSelection();
+ const curserStart = editor.getCursor("from");
+ const curserEnd = editor.getCursor("to");
+ const prefix = command.prefix;
+ const suffix = command.suffix || prefix;
+ const setCursor = (mode) => {
+ editor.setCursor(curserStart.line + command.line * mode, curserEnd.ch + cursorPos * mode);
+ };
+ const cursorPos = selectedText.length > 0
+ ? prefix.length + suffix.length + 1
+ : prefix.length;
+ const preStart = {
+ line: curserStart.line - command.line,
+ ch: curserStart.ch - prefix.length,
+ };
+ const pre = editor.getRange(preStart, curserStart);
+ const sufEnd = {
+ line: curserStart.line + command.line,
+ ch: curserEnd.ch + suffix.length,
+ };
+ const suf = editor.getRange(curserEnd, sufEnd);
+ const preLast = pre.slice(-1);
+ const prefixLast = prefix.trimStart().slice(-1);
+ suf[0];
+ if (suf === suffix.trimEnd()) {
+ if (preLast === prefixLast && selectedText) {
+ editor.replaceRange(selectedText, preStart, sufEnd);
+ const changeCursor = (mode) => {
+ editor.setCursor(curserStart.line + command.line * mode, curserEnd.ch + (cursorPos * mode + 8));
+ };
+ return changeCursor(-1);
+ }
+ }
+ editor.replaceSelection(`${prefix}${selectedText}${suffix}`);
+ return setCursor(1);
+ };
+ const commandsMap = {
+ highlight: {
+ char: 34,
+ line: 0,
+ prefix: this.settings.highlighterMethods === "css-classes"
+ ? ``
+ : ``,
+ suffix: " ",
+ },
+ };
+ Object.keys(commandsMap).forEach((type) => {
+ let highlighterpen = `highlightr-pen-${highlighterKey}`.toLowerCase();
+ this.addCommand({
+ id: highlighterKey,
+ name: highlighterKey,
+ icon: highlighterpen,
+ editorCallback: (editor) => __awaiter(this, void 0, void 0, function* () {
+ applyCommand(commandsMap[type], editor);
+ yield wait(10);
+ editor.focus();
+ }),
+ });
+ });
+ this.addCommand({
+ id: "unhighlight",
+ name: "Remove highlight",
+ icon: "highlightr-eraser",
+ editorCallback: (editor) => __awaiter(this, void 0, void 0, function* () {
+ this.eraseHighlight(editor);
+ editor.focus();
+ }),
+ });
+ });
+ }
+ onunload() {
+ console.log("Highlightr unloaded");
+ }
+ loadSettings() {
+ return __awaiter(this, void 0, void 0, function* () {
+ this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData());
+ });
+ }
+ saveSettings() {
+ return __awaiter(this, void 0, void 0, function* () {
+ yield this.saveData(this.settings);
+ });
+ }
+}
+
+module.exports = HighlightrPlugin;
+
+
+/* nosourcemap */
\ No newline at end of file
diff --git a/.obsidian/plugins/highlightr-plugin/manifest.json b/.obsidian/plugins/highlightr-plugin/manifest.json
new file mode 100644
index 0000000..2dc93f2
--- /dev/null
+++ b/.obsidian/plugins/highlightr-plugin/manifest.json
@@ -0,0 +1,10 @@
+{
+ "id": "highlightr-plugin",
+ "name": "Highlightr",
+ "version": "1.2.2",
+ "minAppVersion": "0.12.8",
+ "description": "A minimal and aesthetically pleasing highlighting menu that makes color-coded highlighting much easier with a configurable assortment of highlight colors 🎨.",
+ "author": "chetachi",
+ "authorUrl": "https://github.com/chetachiezikeuzor",
+ "isDesktopOnly": false
+}
diff --git a/.obsidian/plugins/highlightr-plugin/styles.css b/.obsidian/plugins/highlightr-plugin/styles.css
new file mode 100644
index 0000000..a779139
--- /dev/null
+++ b/.obsidian/plugins/highlightr-plugin/styles.css
@@ -0,0 +1,774 @@
+/*highlighter style*/
+/*lowlight*/
+.highlightr-lowlight mark,
+.highlightr-lowlight span.cm-highlight,
+.highlightr-lowlight .markdown-preview-view mark {
+ --lowlight-background: var(--background-primary);
+ border-radius: 0;
+ background-image: linear-gradient(
+ 360deg,
+ rgba(255, 255, 255, 0) 40%,
+ var(--lowlight-background) 40%
+ ) !important;
+}
+
+.highlightr-lowlight .workspace-split.mod-left-split mark,
+.highlightr-lowlight .workspace-split.mod-left-split span.cm-highlight,
+.highlightr-lowlight
+ .workspace-split.mod-left-split
+ .markdown-preview-view
+ mark,
+.highlightr-lowlight .workspace-split.mod-right-split mark,
+.highlightr-lowlight .workspace-split.mod-right-split span.cm-highlight,
+.highlightr-lowlight
+ .workspace-split.mod-right-split
+ .markdown-preview-view
+ mark {
+ --lowlight-background: var(--background-secondary);
+}
+
+.highlightr-lowlight .admonition-content mark,
+.highlightr-lowlight .admonition-content span.cm-highlight,
+.highlightr-lowlight .admonition-content > .markdown-preview-view mark {
+ --lowlight-background: var(--background-primary-alt);
+}
+
+/*floating*/
+.highlightr-floating mark,
+.highlightr-floating span.cm-highlight,
+.highlightr-floating .markdown-preview-view mark {
+ --floating-background: var(--background-primary);
+ border-radius: 0;
+ padding-bottom: 5px;
+ background-image: linear-gradient(
+ 360deg,
+ rgba(255, 255, 255, 0) 28%,
+ var(--floating-background) 28%
+ ) !important;
+}
+
+.highlightr-floating .workspace-split.mod-left-split mark,
+.highlightr-floating .workspace-split.mod-left-split span.cm-highlight,
+.highlightr-floating
+ .workspace-split.mod-left-split
+ .markdown-preview-view
+ mark,
+.highlightr-floating .workspace-split.mod-right-split mark,
+.highlightr-floating .workspace-split.mod-right-split span.cm-highlight,
+.highlightr-floating
+ .workspace-split.mod-right-split
+ .markdown-preview-view
+ mark {
+ --floating-background: var(--background-secondary);
+}
+
+.highlightr-floating .admonition-content mark,
+.highlightr-floating .admonition-content span.cm-highlight,
+.highlightr-floating .admonition-content > .markdown-preview-view mark {
+ --floating-background: var(--background-primary-alt);
+}
+
+/*rounded*/
+.highlightr-rounded mark,
+.highlightr-rounded .markdown-preview-view mark {
+ margin: 0 -0.05em;
+ padding: 0.125em 0.15em;
+ border-radius: 0.2em;
+ -webkit-box-decoration-break: clone;
+ box-decoration-break: clone;
+}
+
+.highlightr-rounded span.cm-highlight {
+ border-radius: 0.2em;
+ -webkit-box-decoration-break: clone;
+ box-decoration-break: clone;
+}
+
+.highlightr-rounded .cm-s-obsidian span.cm-highlight {
+ font-weight: inherit;
+}
+
+.highlightr-rounded .cm-highlight + span.cm-formatting-highlight {
+ padding-left: 0em;
+ padding-right: 0.15em;
+ -webkit-box-decoration-break: clone;
+ box-decoration-break: clone;
+}
+
+/*realistic*/
+.highlightr-realistic mark,
+.highlightr-realistic .markdown-preview-view mark {
+ margin: 0 -0.05em;
+ padding: 0.1em 0.4em;
+ border-radius: 0.8em 0.3em;
+ -webkit-box-decoration-break: clone;
+ box-decoration-break: clone;
+ text-shadow: 0 0 0.75em var(--background-primary-alt);
+}
+
+.highlightr-realistic.hide-tokens .cm-s-obsidian span.cm-highlight,
+.hide-tokens.highlightr-realistic .cm-s-obsidian span.cm-highlight {
+ border-radius: 0.8em 0.3em;
+}
+
+.highlightr-realistic .cm-s-obsidian span.cm-highlight {
+ padding: 0.15em 0.25em;
+ -webkit-box-decoration-break: clone;
+ box-decoration-break: clone;
+ text-shadow: 0 0 0.75em var(--background-primary-alt);
+}
+
+.highlightr-realistic .cm-s-obsidian span.cm-formatting-highlight {
+ margin: 0 0 0 -0.05em;
+ padding: 0.15em 0.25em;
+ border-radius: 0.8em 0 0 0.3em;
+ -webkit-box-decoration-break: clone;
+ box-decoration-break: clone;
+}
+
+.highlightr-realistic
+ .cm-s-obsidian
+ .cm-highlight
+ + span.cm-formatting-highlight {
+ margin: 0 -0.05em 0 0;
+ padding: 0.15em 0.25em;
+ border-radius: 0 0.3em 0.8em 0;
+ -webkit-box-decoration-break: clone;
+ box-decoration-break: clone;
+}
+
+/**/
+
+button.copy-highlights {
+ padding: 4px 14px;
+ border-radius: 5px;
+ background-color: var(--interactive-accent);
+}
+
+.copy-highlights svg {
+ width: 1.3em;
+ height: 1.3em;
+ display: flex;
+}
+
+details summary.highlight-summary:before {
+ width: 2em;
+ height: 2em;
+ content: "☐";
+ font-size: 9px;
+ cursor: pointer;
+ margin-right: 5px;
+ display: inline-block;
+ vertical-align: 0.05em;
+ background-color: currentColor;
+ -webkit-mask-image: url('data:image/svg+xml;utf8, ');
+}
+
+details[open] summary.highlight-summary::before {
+ transform: rotate(90deg);
+}
+
+/*highlightr component*/
+
+@keyframes fade {
+ 0% {
+ opacity: 0;
+ }
+ 20% {
+ opacity: 0.9;
+ }
+ 40% {
+ opacity: 0.95;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
+
+.menu.highlighterContainer {
+ min-width: 140px;
+ max-width: 225px;
+ max-height: 180px;
+ padding-left: 0em;
+ padding: 0;
+ margin: 0 auto;
+ border-radius: 6px;
+ font-size: 14px;
+ overflow-y: auto;
+ overflow-x: hidden;
+ position: fixed;
+ animation: fade 300ms ease-in-out;
+ background-color: var(--background-primary);
+ box-shadow: 0px 3px 25px rgba(31, 38, 135, 0.1);
+ border: 1px solid var(--background-modifier-border);
+}
+
+.menu.highlighterContainer .menu-item .menu-item-icon {
+ display: inline-block;
+ width: 25px;
+ position: relative;
+ top: 2px;
+}
+
+.menu.highlighterContainer .menu-item {
+ display: flex;
+ padding: 2px 14px 3px 14px;
+ align-items: unset;
+ margin: auto;
+ cursor: pointer;
+ font-size: 14px;
+ height: 32px;
+ line-height: 31px;
+ white-space: nowrap;
+ border-radius: 0;
+ border-bottom: 1px solid var(--background-modifier-border);
+}
+
+.menu.highlighterContainer .menu-item:last-of-type {
+ border-bottom: none;
+}
+
+/*----------------------------------------------------------------
+SETTINGS TAB
+----------------------------------------------------------------*/
+
+button.HighlightrSettingsButton {
+ padding: 4px 14px;
+ border-radius: 6px;
+ height: fit-content;
+}
+
+button.HighlightrSettingsButton svg {
+ width: 1.3em;
+ height: 1.3em;
+ display: flex;
+}
+
+.highlighter-settings-color,
+.highlighter-settings-value {
+ width: 42%;
+ color: var(--text-normal);
+}
+
+.highlighterplugin-setting-item {
+ display: block;
+}
+
+.highlighterplugin-setting-item .setting-item-control {
+ justify-content: space-between;
+ margin-top: 12px;
+ align-content: center;
+ align-items: flex-end;
+ grid-gap: 6px;
+}
+
+.modal.mod-settings
+ button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonAdd,
+button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonAdd {
+ background-color: var(--interactive-accent);
+}
+
+.modal.mod-settings
+ button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonDelete,
+button:not(.mod-cta):not(.mod-warning).HighlightrSettingsButton.HighlightrSettingsButtonDelete {
+ background-color: #989cab;
+}
+
+/**/
+.highlighter-setting-icon {
+ display: flex;
+ height: 24px;
+ width: 24px;
+}
+
+.highlighter-item-draggable {
+ cursor: grab;
+ display: grid;
+ grid-gap: 8px;
+ grid-template-columns: 0.5fr 7fr;
+ align-items: center;
+ border-top: 1px solid var(--background-modifier-border);
+}
+
+.HighlightrSettingsTabsContainer {
+ border-bottom: 1px solid var(--background-modifier-border);
+}
+
+.setting-item.highlighter-setting-item:first-child {
+ padding-top: 18px;
+}
+
+.highlighter-setting-item {
+ padding: 18px 0 18px 0;
+ border-top: none;
+}
+
+.highlighter-sortable-fallback {
+ cursor: grabbing;
+ box-shadow: 0px 3px 32px rgb(31 38 135 / 15%);
+}
+
+.highlighter-sortable-grab {
+ cursor: grabbing !important;
+}
+
+.highlighter-sortable-ghost {
+ opacity: 0.4;
+ cursor: grabbing;
+}
+
+.highlighter-sortable-chosen {
+ cursor: grabbing;
+ padding: 0 0 0 18px;
+ background-color: var(--background-primary);
+}
+
+.highlighter-sortable-drag {
+ cursor: grabbing;
+ box-shadow: 0px 3px 32px rgb(31 38 135 / 15%);
+}
+
+/*----------------------------------------------------------------
+HIGHLIGHTR SUPPORT
+----------------------------------------------------------------*/
+
+.hltrDonationSection {
+ width: 65%;
+ height: 50vh;
+ margin: 0 auto;
+ text-align: center;
+ color: var(--text-normal);
+}
+
+.pcr-app .pcr-swatches > button {
+ padding: 0;
+}
+
+.pickr .pcr-button {
+ margin-right: 0;
+}
+
+.themed-color-wrapper > div {
+ background: var(--background-primary);
+ padding: 10px;
+ display: flex;
+ align-items: center;
+ border-radius: 4px;
+}
+
+.themed-color-wrapper > div + div {
+ margin-top: 6px;
+}
+
+.themed-color-wrapper button {
+ display: block;
+}
+
+.themed-color-wrapper .pickr-reset > button {
+ margin: 0 0 0 10px;
+ padding: 9px;
+ line-height: 1;
+}
+
+.themed-color-wrapper .pickr-reset > button > svg {
+ display: block;
+}
+
+/*----------------------------------------------------------------
+PICKR 1.8.2 MIT | https://github.com/Simonwep/pickr
+----------------------------------------------------------------*/
+.pickr {
+ position: relative;
+ overflow: visible;
+ transform: translateY(0);
+}
+.pickr * {
+ box-sizing: border-box;
+ outline: none;
+ border: none;
+ -webkit-appearance: none;
+}
+.pickr .pcr-button {
+ position: relative;
+ height: 2em;
+ width: 2em;
+ padding: 0.5em;
+ cursor: pointer;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
+ "Helvetica Neue", Arial, sans-serif;
+ border-radius: 0.15em;
+ background: url('data:image/svg+xml;utf8, ')
+ no-repeat center;
+ background-size: 0;
+ transition: all 0.3s;
+}
+.pickr .pcr-button::before {
+ position: absolute;
+ content: "";
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: url('data:image/svg+xml;utf8, ');
+ background-size: 0.5em;
+ border-radius: 0.15em;
+ z-index: -1;
+}
+.pickr .pcr-button::before {
+ z-index: initial;
+}
+.pickr .pcr-button::after {
+ position: absolute;
+ content: "";
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ transition: background 0.3s;
+ background: var(--pcr-color);
+ border-radius: 0.15em;
+}
+.pickr .pcr-button.clear {
+ background-size: 70%;
+}
+.pickr .pcr-button.clear::before {
+ opacity: 0;
+}
+.pickr .pcr-button.clear:focus {
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 3px var(--pcr-color);
+}
+.pickr .pcr-button.disabled {
+ cursor: not-allowed;
+}
+.pickr *,
+.pcr-app * {
+ box-sizing: border-box;
+ outline: none;
+ border: none;
+ -webkit-appearance: none;
+}
+.pickr input:focus,
+.pickr input.pcr-active,
+.pickr button:focus,
+.pickr button.pcr-active,
+.pcr-app input:focus,
+.pcr-app input.pcr-active,
+.pcr-app button:focus,
+.pcr-app button.pcr-active {
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 3px var(--pcr-color);
+}
+.pickr .pcr-palette,
+.pickr .pcr-slider,
+.pcr-app .pcr-palette,
+.pcr-app .pcr-slider {
+ transition: box-shadow 0.3s;
+}
+.pickr .pcr-palette:focus,
+.pickr .pcr-slider:focus,
+.pcr-app .pcr-palette:focus,
+.pcr-app .pcr-slider:focus {
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 3px rgba(0, 0, 0, 0.25);
+}
+.pcr-app {
+ position: fixed;
+ display: flex;
+ flex-direction: column;
+ z-index: 10000;
+ border-radius: 0.1em;
+ background: #fff;
+ opacity: 0;
+ visibility: hidden;
+ transition: opacity 0.3s, visibility 0s 0.3s;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
+ "Helvetica Neue", Arial, sans-serif;
+ box-shadow: 0 0.15em 1.5em 0 rgba(0, 0, 0, 0.1), 0 0 1em 0 rgba(0, 0, 0, 0.03);
+ left: 0;
+ top: 0;
+}
+.pcr-app.visible {
+ transition: opacity 0.3s;
+ visibility: visible;
+ opacity: 1;
+}
+.pcr-app .pcr-swatches {
+ display: flex;
+ flex-wrap: wrap;
+ margin-top: 0.75em;
+}
+.pcr-app .pcr-swatches.pcr-last {
+ margin: 0;
+}
+@supports (display: grid) {
+ .pcr-app .pcr-swatches {
+ display: grid;
+ align-items: center;
+ grid-template-columns: repeat(auto-fit, 1.75em);
+ }
+}
+.pcr-app .pcr-swatches > button {
+ font-size: 1em;
+ position: relative;
+ width: calc(1.75em - 5px);
+ height: calc(1.75em - 5px);
+ border-radius: 0.15em;
+ cursor: pointer;
+ margin: 2.5px;
+ flex-shrink: 0;
+ justify-self: center;
+ transition: all 0.15s;
+ overflow: hidden;
+ background: transparent;
+ z-index: 1;
+}
+.pcr-app .pcr-swatches > button::before {
+ position: absolute;
+ content: "";
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: url('data:image/svg+xml;utf8, ');
+ background-size: 6px;
+ border-radius: 0.15em;
+ z-index: -1;
+}
+.pcr-app .pcr-swatches > button::after {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: var(--pcr-color);
+ border: 1px solid rgba(0, 0, 0, 0.05);
+ border-radius: 0.15em;
+ box-sizing: border-box;
+}
+.pcr-app .pcr-swatches > button:hover {
+ filter: brightness(1.05);
+}
+.pcr-app .pcr-swatches > button:not(.pcr-active) {
+ box-shadow: none;
+}
+.pcr-app .pcr-interaction {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ margin: 0 -0.2em 0 -0.2em;
+}
+.pcr-app .pcr-interaction > * {
+ margin: 0 0.2em;
+}
+.pcr-app .pcr-interaction input {
+ letter-spacing: 0.07em;
+ font-size: 0.75em;
+ text-align: center;
+ cursor: pointer;
+ color: #75797e;
+ background: #f1f3f4;
+ border-radius: 0.15em;
+ transition: all 0.15s;
+ padding: 0.45em 0.5em;
+ margin-top: 0.75em;
+}
+.pcr-app .pcr-interaction input:hover {
+ filter: brightness(0.975);
+}
+.pcr-app .pcr-interaction input:focus {
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85),
+ 0 0 0 3px rgba(66, 133, 244, 0.75);
+}
+.pcr-app .pcr-interaction .pcr-result {
+ color: #75797e;
+ text-align: left;
+ flex: 1 1 8em;
+ min-width: 8em;
+ transition: all 0.2s;
+ border-radius: 0.15em;
+ background: #f1f3f4;
+ cursor: text;
+}
+.pcr-app .pcr-interaction .pcr-result::-moz-selection {
+ background: #4285f4;
+ color: #fff;
+}
+.pcr-app .pcr-interaction .pcr-result::selection {
+ background: #4285f4;
+ color: #fff;
+}
+.pcr-app .pcr-interaction .pcr-type.active {
+ color: #fff;
+ background: #4285f4;
+}
+.pcr-app .pcr-interaction .pcr-save,
+.pcr-app .pcr-interaction .pcr-cancel,
+.pcr-app .pcr-interaction .pcr-clear {
+ color: #fff;
+ width: auto;
+}
+.pcr-app .pcr-interaction .pcr-save,
+.pcr-app .pcr-interaction .pcr-cancel,
+.pcr-app .pcr-interaction .pcr-clear {
+ color: #fff;
+}
+.pcr-app .pcr-interaction .pcr-save:hover,
+.pcr-app .pcr-interaction .pcr-cancel:hover,
+.pcr-app .pcr-interaction .pcr-clear:hover {
+ filter: brightness(0.925);
+}
+.pcr-app .pcr-interaction .pcr-save {
+ background: #4285f4;
+}
+.pcr-app .pcr-interaction .pcr-clear,
+.pcr-app .pcr-interaction .pcr-cancel {
+ background: #f44250;
+}
+.pcr-app .pcr-interaction .pcr-clear:focus,
+.pcr-app .pcr-interaction .pcr-cancel:focus {
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85),
+ 0 0 0 3px rgba(244, 66, 80, 0.75);
+}
+.pcr-app .pcr-selection .pcr-picker {
+ position: absolute;
+ height: 18px;
+ width: 18px;
+ border: 2px solid #fff;
+ border-radius: 100%;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.pcr-app .pcr-selection .pcr-color-palette,
+.pcr-app .pcr-selection .pcr-color-chooser,
+.pcr-app .pcr-selection .pcr-color-opacity {
+ position: relative;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ display: flex;
+ flex-direction: column;
+ cursor: grab;
+ cursor: -webkit-grab;
+}
+.pcr-app .pcr-selection .pcr-color-palette:active,
+.pcr-app .pcr-selection .pcr-color-chooser:active,
+.pcr-app .pcr-selection .pcr-color-opacity:active {
+ cursor: grabbing;
+ cursor: -webkit-grabbing;
+}
+.pcr-app[data-theme="nano"] {
+ width: 14.25em;
+ max-width: 95vw;
+}
+.pcr-app[data-theme="nano"] .pcr-swatches {
+ margin-top: 0.6em;
+ padding: 0 0.6em;
+}
+.pcr-app[data-theme="nano"] .pcr-interaction {
+ padding: 0 0.6em 0.6em 0.6em;
+}
+.pcr-app[data-theme="nano"] .pcr-selection {
+ display: grid;
+ grid-gap: 0.6em;
+ grid-template-columns: 1fr 4fr;
+ grid-template-rows: 5fr auto auto;
+ align-items: center;
+ height: 10.5em;
+ width: 100%;
+ align-self: flex-start;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-preview {
+ grid-area: 2 / 1 / 4 / 1;
+ height: 100%;
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ margin-left: 0.6em;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-preview .pcr-last-color {
+ display: none;
+}
+.pcr-app[data-theme="nano"]
+ .pcr-selection
+ .pcr-color-preview
+ .pcr-current-color {
+ position: relative;
+ background: var(--pcr-color);
+ width: 2em;
+ height: 2em;
+ border-radius: 50em;
+ overflow: hidden;
+}
+.pcr-app[data-theme="nano"]
+ .pcr-selection
+ .pcr-color-preview
+ .pcr-current-color::before {
+ position: absolute;
+ content: "";
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: url('data:image/svg+xml;utf8, ');
+ background-size: 0.5em;
+ border-radius: 0.15em;
+ z-index: -1;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-palette {
+ grid-area: 1 / 1 / 2 / 3;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-palette .pcr-palette {
+ border-radius: 0.15em;
+ width: 100%;
+ height: 100%;
+}
+.pcr-app[data-theme="nano"]
+ .pcr-selection
+ .pcr-color-palette
+ .pcr-palette::before {
+ position: absolute;
+ content: "";
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: url('data:image/svg+xml;utf8, ');
+ background-size: 0.5em;
+ border-radius: 0.15em;
+ z-index: -1;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser {
+ grid-area: 2 / 2 / 2 / 2;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity {
+ grid-area: 3 / 2 / 3 / 2;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser,
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity {
+ height: 0.5em;
+ margin: 0 0.6em;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser .pcr-picker,
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity .pcr-picker {
+ top: 50%;
+ transform: translateY(-50%);
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser .pcr-slider,
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity .pcr-slider {
+ flex-grow: 1;
+ border-radius: 50em;
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-chooser .pcr-slider {
+ background: linear-gradient(to right, red, #ff0, lime, cyan, blue, #f0f, red);
+}
+.pcr-app[data-theme="nano"] .pcr-selection .pcr-color-opacity .pcr-slider {
+ background: linear-gradient(to right, transparent, black),
+ url('data:image/svg+xml;utf8, ');
+ background-size: 100%, 0.25em;
+}
diff --git a/.obsidian/plugins/obsidian-file-color/main.js b/.obsidian/plugins/obsidian-file-color/main.js
new file mode 100644
index 0000000..59ff8ca
--- /dev/null
+++ b/.obsidian/plugins/obsidian-file-color/main.js
@@ -0,0 +1,23291 @@
+"use strict";
+/*
+Sun Dec 03 2023 00:13:31 GMT+0100 (Central European Standard Time)
+THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
+if you want to view the source, please visit the github repository of this plugin
+*/
+
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// node_modules/react/cjs/react.development.js
+var require_react_development = __commonJS({
+ "node_modules/react/cjs/react.development.js"(exports, module2) {
+ "use strict";
+ if (true) {
+ (function() {
+ "use strict";
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
+ }
+ var ReactVersion = "18.2.0";
+ var REACT_ELEMENT_TYPE = Symbol.for("react.element");
+ var REACT_PORTAL_TYPE = Symbol.for("react.portal");
+ var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
+ var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
+ var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
+ var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
+ var REACT_CONTEXT_TYPE = Symbol.for("react.context");
+ var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
+ var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
+ var REACT_MEMO_TYPE = Symbol.for("react.memo");
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
+ var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
+ function getIteratorFn(maybeIterable) {
+ if (maybeIterable === null || typeof maybeIterable !== "object") {
+ return null;
+ }
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
+ if (typeof maybeIterator === "function") {
+ return maybeIterator;
+ }
+ return null;
+ }
+ var ReactCurrentDispatcher = {
+ current: null
+ };
+ var ReactCurrentBatchConfig = {
+ transition: null
+ };
+ var ReactCurrentActQueue = {
+ current: null,
+ isBatchingLegacy: false,
+ didScheduleLegacyUpdate: false
+ };
+ var ReactCurrentOwner = {
+ current: null
+ };
+ var ReactDebugCurrentFrame = {};
+ var currentExtraStackFrame = null;
+ function setExtraStackFrame(stack) {
+ {
+ currentExtraStackFrame = stack;
+ }
+ }
+ {
+ ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
+ {
+ currentExtraStackFrame = stack;
+ }
+ };
+ ReactDebugCurrentFrame.getCurrentStack = null;
+ ReactDebugCurrentFrame.getStackAddendum = function() {
+ var stack = "";
+ if (currentExtraStackFrame) {
+ stack += currentExtraStackFrame;
+ }
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
+ if (impl) {
+ stack += impl() || "";
+ }
+ return stack;
+ };
+ }
+ var enableScopeAPI = false;
+ var enableCacheElement = false;
+ var enableTransitionTracing = false;
+ var enableLegacyHidden = false;
+ var enableDebugTracing = false;
+ var ReactSharedInternals = {
+ ReactCurrentDispatcher,
+ ReactCurrentBatchConfig,
+ ReactCurrentOwner
+ };
+ {
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
+ ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
+ }
+ function warn(format) {
+ {
+ {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+ printWarning("warn", format, args);
+ }
+ }
+ }
+ function error(format) {
+ {
+ {
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ args[_key2 - 1] = arguments[_key2];
+ }
+ printWarning("error", format, args);
+ }
+ }
+ }
+ function printWarning(level, format, args) {
+ {
+ var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame2.getStackAddendum();
+ if (stack !== "") {
+ format += "%s";
+ args = args.concat([stack]);
+ }
+ var argsWithFormat = args.map(function(item) {
+ return String(item);
+ });
+ argsWithFormat.unshift("Warning: " + format);
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
+ }
+ }
+ var didWarnStateUpdateForUnmountedComponent = {};
+ function warnNoop(publicInstance, callerName) {
+ {
+ var _constructor = publicInstance.constructor;
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
+ var warningKey = componentName + "." + callerName;
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
+ return;
+ }
+ error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
+ }
+ }
+ var ReactNoopUpdateQueue = {
+ isMounted: function(publicInstance) {
+ return false;
+ },
+ enqueueForceUpdate: function(publicInstance, callback, callerName) {
+ warnNoop(publicInstance, "forceUpdate");
+ },
+ enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
+ warnNoop(publicInstance, "replaceState");
+ },
+ enqueueSetState: function(publicInstance, partialState, callback, callerName) {
+ warnNoop(publicInstance, "setState");
+ }
+ };
+ var assign = Object.assign;
+ var emptyObject = {};
+ {
+ Object.freeze(emptyObject);
+ }
+ function Component(props, context, updater) {
+ this.props = props;
+ this.context = context;
+ this.refs = emptyObject;
+ this.updater = updater || ReactNoopUpdateQueue;
+ }
+ Component.prototype.isReactComponent = {};
+ Component.prototype.setState = function(partialState, callback) {
+ if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
+ throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
+ }
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
+ };
+ Component.prototype.forceUpdate = function(callback) {
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
+ };
+ {
+ var deprecatedAPIs = {
+ isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
+ replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
+ };
+ var defineDeprecationWarning = function(methodName, info) {
+ Object.defineProperty(Component.prototype, methodName, {
+ get: function() {
+ warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
+ return void 0;
+ }
+ });
+ };
+ for (var fnName in deprecatedAPIs) {
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
+ }
+ }
+ }
+ function ComponentDummy() {
+ }
+ ComponentDummy.prototype = Component.prototype;
+ function PureComponent(props, context, updater) {
+ this.props = props;
+ this.context = context;
+ this.refs = emptyObject;
+ this.updater = updater || ReactNoopUpdateQueue;
+ }
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
+ pureComponentPrototype.constructor = PureComponent;
+ assign(pureComponentPrototype, Component.prototype);
+ pureComponentPrototype.isPureReactComponent = true;
+ function createRef() {
+ var refObject = {
+ current: null
+ };
+ {
+ Object.seal(refObject);
+ }
+ return refObject;
+ }
+ var isArrayImpl = Array.isArray;
+ function isArray(a2) {
+ return isArrayImpl(a2);
+ }
+ function typeName(value) {
+ {
+ var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
+ return type;
+ }
+ }
+ function willCoercionThrow(value) {
+ {
+ try {
+ testStringCoercion(value);
+ return false;
+ } catch (e2) {
+ return true;
+ }
+ }
+ }
+ function testStringCoercion(value) {
+ return "" + value;
+ }
+ function checkKeyStringCoercion(value) {
+ {
+ if (willCoercionThrow(value)) {
+ error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
+ return testStringCoercion(value);
+ }
+ }
+ }
+ function getWrappedName(outerType, innerType, wrapperName) {
+ var displayName = outerType.displayName;
+ if (displayName) {
+ return displayName;
+ }
+ var functionName = innerType.displayName || innerType.name || "";
+ return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
+ }
+ function getContextName(type) {
+ return type.displayName || "Context";
+ }
+ function getComponentNameFromType(type) {
+ if (type == null) {
+ return null;
+ }
+ {
+ if (typeof type.tag === "number") {
+ error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
+ }
+ }
+ if (typeof type === "function") {
+ return type.displayName || type.name || null;
+ }
+ if (typeof type === "string") {
+ return type;
+ }
+ switch (type) {
+ case REACT_FRAGMENT_TYPE:
+ return "Fragment";
+ case REACT_PORTAL_TYPE:
+ return "Portal";
+ case REACT_PROFILER_TYPE:
+ return "Profiler";
+ case REACT_STRICT_MODE_TYPE:
+ return "StrictMode";
+ case REACT_SUSPENSE_TYPE:
+ return "Suspense";
+ case REACT_SUSPENSE_LIST_TYPE:
+ return "SuspenseList";
+ }
+ if (typeof type === "object") {
+ switch (type.$$typeof) {
+ case REACT_CONTEXT_TYPE:
+ var context = type;
+ return getContextName(context) + ".Consumer";
+ case REACT_PROVIDER_TYPE:
+ var provider = type;
+ return getContextName(provider._context) + ".Provider";
+ case REACT_FORWARD_REF_TYPE:
+ return getWrappedName(type, type.render, "ForwardRef");
+ case REACT_MEMO_TYPE:
+ var outerName = type.displayName || null;
+ if (outerName !== null) {
+ return outerName;
+ }
+ return getComponentNameFromType(type.type) || "Memo";
+ case REACT_LAZY_TYPE: {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ try {
+ return getComponentNameFromType(init(payload));
+ } catch (x) {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var RESERVED_PROPS = {
+ key: true,
+ ref: true,
+ __self: true,
+ __source: true
+ };
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
+ {
+ didWarnAboutStringRefs = {};
+ }
+ function hasValidRef(config) {
+ {
+ if (hasOwnProperty.call(config, "ref")) {
+ var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.ref !== void 0;
+ }
+ function hasValidKey(config) {
+ {
+ if (hasOwnProperty.call(config, "key")) {
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.key !== void 0;
+ }
+ function defineKeyPropWarningGetter(props, displayName) {
+ var warnAboutAccessingKey = function() {
+ {
+ if (!specialPropKeyWarningShown) {
+ specialPropKeyWarningShown = true;
+ error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
+ }
+ }
+ };
+ warnAboutAccessingKey.isReactWarning = true;
+ Object.defineProperty(props, "key", {
+ get: warnAboutAccessingKey,
+ configurable: true
+ });
+ }
+ function defineRefPropWarningGetter(props, displayName) {
+ var warnAboutAccessingRef = function() {
+ {
+ if (!specialPropRefWarningShown) {
+ specialPropRefWarningShown = true;
+ error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
+ }
+ }
+ };
+ warnAboutAccessingRef.isReactWarning = true;
+ Object.defineProperty(props, "ref", {
+ get: warnAboutAccessingRef,
+ configurable: true
+ });
+ }
+ function warnIfStringRefCannotBeAutoConverted(config) {
+ {
+ if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
+ if (!didWarnAboutStringRefs[componentName]) {
+ error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
+ didWarnAboutStringRefs[componentName] = true;
+ }
+ }
+ }
+ }
+ var ReactElement = function(type, key, ref, self, source, owner, props) {
+ var element = {
+ $$typeof: REACT_ELEMENT_TYPE,
+ type,
+ key,
+ ref,
+ props,
+ _owner: owner
+ };
+ {
+ element._store = {};
+ Object.defineProperty(element._store, "validated", {
+ configurable: false,
+ enumerable: false,
+ writable: true,
+ value: false
+ });
+ Object.defineProperty(element, "_self", {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: self
+ });
+ Object.defineProperty(element, "_source", {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: source
+ });
+ if (Object.freeze) {
+ Object.freeze(element.props);
+ Object.freeze(element);
+ }
+ }
+ return element;
+ };
+ function createElement2(type, config, children) {
+ var propName;
+ var props = {};
+ var key = null;
+ var ref = null;
+ var self = null;
+ var source = null;
+ if (config != null) {
+ if (hasValidRef(config)) {
+ ref = config.ref;
+ {
+ warnIfStringRefCannotBeAutoConverted(config);
+ }
+ }
+ if (hasValidKey(config)) {
+ {
+ checkKeyStringCoercion(config.key);
+ }
+ key = "" + config.key;
+ }
+ self = config.__self === void 0 ? null : config.__self;
+ source = config.__source === void 0 ? null : config.__source;
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ props[propName] = config[propName];
+ }
+ }
+ }
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i2 = 0; i2 < childrenLength; i2++) {
+ childArray[i2] = arguments[i2 + 2];
+ }
+ {
+ if (Object.freeze) {
+ Object.freeze(childArray);
+ }
+ }
+ props.children = childArray;
+ }
+ if (type && type.defaultProps) {
+ var defaultProps = type.defaultProps;
+ for (propName in defaultProps) {
+ if (props[propName] === void 0) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ }
+ {
+ if (key || ref) {
+ var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
+ if (key) {
+ defineKeyPropWarningGetter(props, displayName);
+ }
+ if (ref) {
+ defineRefPropWarningGetter(props, displayName);
+ }
+ }
+ }
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
+ }
+ function cloneAndReplaceKey(oldElement, newKey) {
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
+ return newElement;
+ }
+ function cloneElement(element, config, children) {
+ if (element === null || element === void 0) {
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
+ }
+ var propName;
+ var props = assign({}, element.props);
+ var key = element.key;
+ var ref = element.ref;
+ var self = element._self;
+ var source = element._source;
+ var owner = element._owner;
+ if (config != null) {
+ if (hasValidRef(config)) {
+ ref = config.ref;
+ owner = ReactCurrentOwner.current;
+ }
+ if (hasValidKey(config)) {
+ {
+ checkKeyStringCoercion(config.key);
+ }
+ key = "" + config.key;
+ }
+ var defaultProps;
+ if (element.type && element.type.defaultProps) {
+ defaultProps = element.type.defaultProps;
+ }
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ if (config[propName] === void 0 && defaultProps !== void 0) {
+ props[propName] = defaultProps[propName];
+ } else {
+ props[propName] = config[propName];
+ }
+ }
+ }
+ }
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i2 = 0; i2 < childrenLength; i2++) {
+ childArray[i2] = arguments[i2 + 2];
+ }
+ props.children = childArray;
+ }
+ return ReactElement(element.type, key, ref, self, source, owner, props);
+ }
+ function isValidElement(object) {
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
+ }
+ var SEPARATOR = ".";
+ var SUBSEPARATOR = ":";
+ function escape(key) {
+ var escapeRegex = /[=:]/g;
+ var escaperLookup = {
+ "=": "=0",
+ ":": "=2"
+ };
+ var escapedString = key.replace(escapeRegex, function(match) {
+ return escaperLookup[match];
+ });
+ return "$" + escapedString;
+ }
+ var didWarnAboutMaps = false;
+ var userProvidedKeyEscapeRegex = /\/+/g;
+ function escapeUserProvidedKey(text) {
+ return text.replace(userProvidedKeyEscapeRegex, "$&/");
+ }
+ function getElementKey(element, index) {
+ if (typeof element === "object" && element !== null && element.key != null) {
+ {
+ checkKeyStringCoercion(element.key);
+ }
+ return escape("" + element.key);
+ }
+ return index.toString(36);
+ }
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
+ var type = typeof children;
+ if (type === "undefined" || type === "boolean") {
+ children = null;
+ }
+ var invokeCallback = false;
+ if (children === null) {
+ invokeCallback = true;
+ } else {
+ switch (type) {
+ case "string":
+ case "number":
+ invokeCallback = true;
+ break;
+ case "object":
+ switch (children.$$typeof) {
+ case REACT_ELEMENT_TYPE:
+ case REACT_PORTAL_TYPE:
+ invokeCallback = true;
+ }
+ }
+ }
+ if (invokeCallback) {
+ var _child = children;
+ var mappedChild = callback(_child);
+ var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
+ if (isArray(mappedChild)) {
+ var escapedChildKey = "";
+ if (childKey != null) {
+ escapedChildKey = escapeUserProvidedKey(childKey) + "/";
+ }
+ mapIntoArray(mappedChild, array, escapedChildKey, "", function(c2) {
+ return c2;
+ });
+ } else if (mappedChild != null) {
+ if (isValidElement(mappedChild)) {
+ {
+ if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
+ checkKeyStringCoercion(mappedChild.key);
+ }
+ }
+ mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey);
+ }
+ array.push(mappedChild);
+ }
+ return 1;
+ }
+ var child;
+ var nextName;
+ var subtreeCount = 0;
+ var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
+ if (isArray(children)) {
+ for (var i2 = 0; i2 < children.length; i2++) {
+ child = children[i2];
+ nextName = nextNamePrefix + getElementKey(child, i2);
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
+ }
+ } else {
+ var iteratorFn = getIteratorFn(children);
+ if (typeof iteratorFn === "function") {
+ var iterableChildren = children;
+ {
+ if (iteratorFn === iterableChildren.entries) {
+ if (!didWarnAboutMaps) {
+ warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
+ }
+ didWarnAboutMaps = true;
+ }
+ }
+ var iterator = iteratorFn.call(iterableChildren);
+ var step;
+ var ii = 0;
+ while (!(step = iterator.next()).done) {
+ child = step.value;
+ nextName = nextNamePrefix + getElementKey(child, ii++);
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
+ }
+ } else if (type === "object") {
+ var childrenString = String(children);
+ throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
+ }
+ }
+ return subtreeCount;
+ }
+ function mapChildren(children, func, context) {
+ if (children == null) {
+ return children;
+ }
+ var result = [];
+ var count = 0;
+ mapIntoArray(children, result, "", "", function(child) {
+ return func.call(context, child, count++);
+ });
+ return result;
+ }
+ function countChildren(children) {
+ var n2 = 0;
+ mapChildren(children, function() {
+ n2++;
+ });
+ return n2;
+ }
+ function forEachChildren(children, forEachFunc, forEachContext) {
+ mapChildren(children, function() {
+ forEachFunc.apply(this, arguments);
+ }, forEachContext);
+ }
+ function toArray(children) {
+ return mapChildren(children, function(child) {
+ return child;
+ }) || [];
+ }
+ function onlyChild(children) {
+ if (!isValidElement(children)) {
+ throw new Error("React.Children.only expected to receive a single React element child.");
+ }
+ return children;
+ }
+ function createContext4(defaultValue) {
+ var context = {
+ $$typeof: REACT_CONTEXT_TYPE,
+ _currentValue: defaultValue,
+ _currentValue2: defaultValue,
+ _threadCount: 0,
+ Provider: null,
+ Consumer: null,
+ _defaultValue: null,
+ _globalName: null
+ };
+ context.Provider = {
+ $$typeof: REACT_PROVIDER_TYPE,
+ _context: context
+ };
+ var hasWarnedAboutUsingNestedContextConsumers = false;
+ var hasWarnedAboutUsingConsumerProvider = false;
+ var hasWarnedAboutDisplayNameOnConsumer = false;
+ {
+ var Consumer = {
+ $$typeof: REACT_CONTEXT_TYPE,
+ _context: context
+ };
+ Object.defineProperties(Consumer, {
+ Provider: {
+ get: function() {
+ if (!hasWarnedAboutUsingConsumerProvider) {
+ hasWarnedAboutUsingConsumerProvider = true;
+ error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?");
+ }
+ return context.Provider;
+ },
+ set: function(_Provider) {
+ context.Provider = _Provider;
+ }
+ },
+ _currentValue: {
+ get: function() {
+ return context._currentValue;
+ },
+ set: function(_currentValue) {
+ context._currentValue = _currentValue;
+ }
+ },
+ _currentValue2: {
+ get: function() {
+ return context._currentValue2;
+ },
+ set: function(_currentValue2) {
+ context._currentValue2 = _currentValue2;
+ }
+ },
+ _threadCount: {
+ get: function() {
+ return context._threadCount;
+ },
+ set: function(_threadCount) {
+ context._threadCount = _threadCount;
+ }
+ },
+ Consumer: {
+ get: function() {
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
+ hasWarnedAboutUsingNestedContextConsumers = true;
+ error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?");
+ }
+ return context.Consumer;
+ }
+ },
+ displayName: {
+ get: function() {
+ return context.displayName;
+ },
+ set: function(displayName) {
+ if (!hasWarnedAboutDisplayNameOnConsumer) {
+ warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
+ hasWarnedAboutDisplayNameOnConsumer = true;
+ }
+ }
+ }
+ });
+ context.Consumer = Consumer;
+ }
+ {
+ context._currentRenderer = null;
+ context._currentRenderer2 = null;
+ }
+ return context;
+ }
+ var Uninitialized = -1;
+ var Pending = 0;
+ var Resolved = 1;
+ var Rejected = 2;
+ function lazyInitializer(payload) {
+ if (payload._status === Uninitialized) {
+ var ctor = payload._result;
+ var thenable = ctor();
+ thenable.then(function(moduleObject2) {
+ if (payload._status === Pending || payload._status === Uninitialized) {
+ var resolved = payload;
+ resolved._status = Resolved;
+ resolved._result = moduleObject2;
+ }
+ }, function(error2) {
+ if (payload._status === Pending || payload._status === Uninitialized) {
+ var rejected = payload;
+ rejected._status = Rejected;
+ rejected._result = error2;
+ }
+ });
+ if (payload._status === Uninitialized) {
+ var pending = payload;
+ pending._status = Pending;
+ pending._result = thenable;
+ }
+ }
+ if (payload._status === Resolved) {
+ var moduleObject = payload._result;
+ {
+ if (moduleObject === void 0) {
+ error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
+ }
+ }
+ {
+ if (!("default" in moduleObject)) {
+ error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
+ }
+ }
+ return moduleObject.default;
+ } else {
+ throw payload._result;
+ }
+ }
+ function lazy(ctor) {
+ var payload = {
+ _status: Uninitialized,
+ _result: ctor
+ };
+ var lazyType = {
+ $$typeof: REACT_LAZY_TYPE,
+ _payload: payload,
+ _init: lazyInitializer
+ };
+ {
+ var defaultProps;
+ var propTypes;
+ Object.defineProperties(lazyType, {
+ defaultProps: {
+ configurable: true,
+ get: function() {
+ return defaultProps;
+ },
+ set: function(newDefaultProps) {
+ error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
+ defaultProps = newDefaultProps;
+ Object.defineProperty(lazyType, "defaultProps", {
+ enumerable: true
+ });
+ }
+ },
+ propTypes: {
+ configurable: true,
+ get: function() {
+ return propTypes;
+ },
+ set: function(newPropTypes) {
+ error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
+ propTypes = newPropTypes;
+ Object.defineProperty(lazyType, "propTypes", {
+ enumerable: true
+ });
+ }
+ }
+ });
+ }
+ return lazyType;
+ }
+ function forwardRef(render) {
+ {
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
+ error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
+ } else if (typeof render !== "function") {
+ error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
+ } else {
+ if (render.length !== 0 && render.length !== 2) {
+ error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
+ }
+ }
+ if (render != null) {
+ if (render.defaultProps != null || render.propTypes != null) {
+ error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
+ }
+ }
+ }
+ var elementType = {
+ $$typeof: REACT_FORWARD_REF_TYPE,
+ render
+ };
+ {
+ var ownName;
+ Object.defineProperty(elementType, "displayName", {
+ enumerable: false,
+ configurable: true,
+ get: function() {
+ return ownName;
+ },
+ set: function(name) {
+ ownName = name;
+ if (!render.name && !render.displayName) {
+ render.displayName = name;
+ }
+ }
+ });
+ }
+ return elementType;
+ }
+ var REACT_MODULE_REFERENCE;
+ {
+ REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
+ }
+ function isValidElementType(type) {
+ if (typeof type === "string" || typeof type === "function") {
+ return true;
+ }
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
+ return true;
+ }
+ if (typeof type === "object" && type !== null) {
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
+ return true;
+ }
+ }
+ return false;
+ }
+ function memo(type, compare) {
+ {
+ if (!isValidElementType(type)) {
+ error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
+ }
+ }
+ var elementType = {
+ $$typeof: REACT_MEMO_TYPE,
+ type,
+ compare: compare === void 0 ? null : compare
+ };
+ {
+ var ownName;
+ Object.defineProperty(elementType, "displayName", {
+ enumerable: false,
+ configurable: true,
+ get: function() {
+ return ownName;
+ },
+ set: function(name) {
+ ownName = name;
+ if (!type.name && !type.displayName) {
+ type.displayName = name;
+ }
+ }
+ });
+ }
+ return elementType;
+ }
+ function resolveDispatcher() {
+ var dispatcher = ReactCurrentDispatcher.current;
+ {
+ if (dispatcher === null) {
+ error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
+ }
+ }
+ return dispatcher;
+ }
+ function useContext4(Context) {
+ var dispatcher = resolveDispatcher();
+ {
+ if (Context._context !== void 0) {
+ var realContext = Context._context;
+ if (realContext.Consumer === Context) {
+ error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
+ } else if (realContext.Provider === Context) {
+ error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
+ }
+ }
+ }
+ return dispatcher.useContext(Context);
+ }
+ function useState2(initialState) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useState(initialState);
+ }
+ function useReducer(reducer, initialArg, init) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useReducer(reducer, initialArg, init);
+ }
+ function useRef(initialValue) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useRef(initialValue);
+ }
+ function useEffect2(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useEffect(create, deps);
+ }
+ function useInsertionEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useInsertionEffect(create, deps);
+ }
+ function useLayoutEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useLayoutEffect(create, deps);
+ }
+ function useCallback(callback, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useCallback(callback, deps);
+ }
+ function useMemo(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useMemo(create, deps);
+ }
+ function useImperativeHandle(ref, create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useImperativeHandle(ref, create, deps);
+ }
+ function useDebugValue(value, formatterFn) {
+ {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useDebugValue(value, formatterFn);
+ }
+ }
+ function useTransition() {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useTransition();
+ }
+ function useDeferredValue(value) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useDeferredValue(value);
+ }
+ function useId() {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useId();
+ }
+ function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
+ }
+ var disabledDepth = 0;
+ var prevLog;
+ var prevInfo;
+ var prevWarn;
+ var prevError;
+ var prevGroup;
+ var prevGroupCollapsed;
+ var prevGroupEnd;
+ function disabledLog() {
+ }
+ disabledLog.__reactDisabledLog = true;
+ function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd;
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ };
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ }
+ disabledDepth++;
+ }
+ }
+ function reenableLogs() {
+ {
+ disabledDepth--;
+ if (disabledDepth === 0) {
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ };
+ Object.defineProperties(console, {
+ log: assign({}, props, {
+ value: prevLog
+ }),
+ info: assign({}, props, {
+ value: prevInfo
+ }),
+ warn: assign({}, props, {
+ value: prevWarn
+ }),
+ error: assign({}, props, {
+ value: prevError
+ }),
+ group: assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ }
+ if (disabledDepth < 0) {
+ error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
+ }
+ }
+ }
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
+ var prefix;
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === void 0) {
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || "";
+ }
+ }
+ return "\n" + prefix + name;
+ }
+ }
+ var reentry = false;
+ var componentFrameCache;
+ {
+ var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+ }
+ function describeNativeComponentFrame(fn, construct) {
+ if (!fn || reentry) {
+ return "";
+ }
+ {
+ var frame = componentFrameCache.get(fn);
+ if (frame !== void 0) {
+ return frame;
+ }
+ }
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ var previousDispatcher;
+ {
+ previousDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = null;
+ disableLogs();
+ }
+ try {
+ if (construct) {
+ var Fake = function() {
+ throw Error();
+ };
+ Object.defineProperty(Fake.prototype, "props", {
+ set: function() {
+ throw Error();
+ }
+ });
+ if (typeof Reflect === "object" && Reflect.construct) {
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+ fn();
+ }
+ } catch (sample) {
+ if (sample && control && typeof sample.stack === "string") {
+ var sampleLines = sample.stack.split("\n");
+ var controlLines = control.stack.split("\n");
+ var s2 = sampleLines.length - 1;
+ var c2 = controlLines.length - 1;
+ while (s2 >= 1 && c2 >= 0 && sampleLines[s2] !== controlLines[c2]) {
+ c2--;
+ }
+ for (; s2 >= 1 && c2 >= 0; s2--, c2--) {
+ if (sampleLines[s2] !== controlLines[c2]) {
+ if (s2 !== 1 || c2 !== 1) {
+ do {
+ s2--;
+ c2--;
+ if (c2 < 0 || sampleLines[s2] !== controlLines[c2]) {
+ var _frame = "\n" + sampleLines[s2].replace(" at new ", " at ");
+ if (fn.displayName && _frame.includes("")) {
+ _frame = _frame.replace("", fn.displayName);
+ }
+ {
+ if (typeof fn === "function") {
+ componentFrameCache.set(fn, _frame);
+ }
+ }
+ return _frame;
+ }
+ } while (s2 >= 1 && c2 >= 0);
+ }
+ break;
+ }
+ }
+ }
+ } finally {
+ reentry = false;
+ {
+ ReactCurrentDispatcher$1.current = previousDispatcher;
+ reenableLogs();
+ }
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ }
+ var name = fn ? fn.displayName || fn.name : "";
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
+ {
+ if (typeof fn === "function") {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
+ }
+ return syntheticFrame;
+ }
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
+ }
+ function shouldConstruct(Component2) {
+ var prototype = Component2.prototype;
+ return !!(prototype && prototype.isReactComponent);
+ }
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+ if (type == null) {
+ return "";
+ }
+ if (typeof type === "function") {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+ if (typeof type === "string") {
+ return describeBuiltInComponentFrame(type);
+ }
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame("Suspense");
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame("SuspenseList");
+ }
+ if (typeof type === "object") {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+ case REACT_MEMO_TYPE:
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+ case REACT_LAZY_TYPE: {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ try {
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {
+ }
+ }
+ }
+ }
+ return "";
+ }
+ var loggedTypeFailures = {};
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
+ function setCurrentlyValidatingElement(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
+ } else {
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
+ }
+ }
+ }
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
+ {
+ var has = Function.call.bind(hasOwnProperty);
+ for (var typeSpecName in typeSpecs) {
+ if (has(typeSpecs, typeSpecName)) {
+ var error$1 = void 0;
+ try {
+ if (typeof typeSpecs[typeSpecName] !== "function") {
+ var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
+ err.name = "Invariant Violation";
+ throw err;
+ }
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
+ } catch (ex) {
+ error$1 = ex;
+ }
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
+ error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
+ setCurrentlyValidatingElement(null);
+ }
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
+ error("Failed %s type: %s", location, error$1.message);
+ setCurrentlyValidatingElement(null);
+ }
+ }
+ }
+ }
+ }
+ function setCurrentlyValidatingElement$1(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ setExtraStackFrame(stack);
+ } else {
+ setExtraStackFrame(null);
+ }
+ }
+ }
+ var propTypesMisspellWarningShown;
+ {
+ propTypesMisspellWarningShown = false;
+ }
+ function getDeclarationErrorAddendum() {
+ if (ReactCurrentOwner.current) {
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
+ if (name) {
+ return "\n\nCheck the render method of `" + name + "`.";
+ }
+ }
+ return "";
+ }
+ function getSourceInfoErrorAddendum(source) {
+ if (source !== void 0) {
+ var fileName = source.fileName.replace(/^.*[\\\/]/, "");
+ var lineNumber = source.lineNumber;
+ return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
+ }
+ return "";
+ }
+ function getSourceInfoErrorAddendumForProps(elementProps) {
+ if (elementProps !== null && elementProps !== void 0) {
+ return getSourceInfoErrorAddendum(elementProps.__source);
+ }
+ return "";
+ }
+ var ownerHasKeyUseWarning = {};
+ function getCurrentComponentErrorInfo(parentType) {
+ var info = getDeclarationErrorAddendum();
+ if (!info) {
+ var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
+ if (parentName) {
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
+ }
+ }
+ return info;
+ }
+ function validateExplicitKey(element, parentType) {
+ if (!element._store || element._store.validated || element.key != null) {
+ return;
+ }
+ element._store.validated = true;
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
+ return;
+ }
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
+ var childOwner = "";
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
+ }
+ {
+ setCurrentlyValidatingElement$1(element);
+ error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
+ setCurrentlyValidatingElement$1(null);
+ }
+ }
+ function validateChildKeys(node, parentType) {
+ if (typeof node !== "object") {
+ return;
+ }
+ if (isArray(node)) {
+ for (var i2 = 0; i2 < node.length; i2++) {
+ var child = node[i2];
+ if (isValidElement(child)) {
+ validateExplicitKey(child, parentType);
+ }
+ }
+ } else if (isValidElement(node)) {
+ if (node._store) {
+ node._store.validated = true;
+ }
+ } else if (node) {
+ var iteratorFn = getIteratorFn(node);
+ if (typeof iteratorFn === "function") {
+ if (iteratorFn !== node.entries) {
+ var iterator = iteratorFn.call(node);
+ var step;
+ while (!(step = iterator.next()).done) {
+ if (isValidElement(step.value)) {
+ validateExplicitKey(step.value, parentType);
+ }
+ }
+ }
+ }
+ }
+ }
+ function validatePropTypes(element) {
+ {
+ var type = element.type;
+ if (type === null || type === void 0 || typeof type === "string") {
+ return;
+ }
+ var propTypes;
+ if (typeof type === "function") {
+ propTypes = type.propTypes;
+ } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) {
+ propTypes = type.propTypes;
+ } else {
+ return;
+ }
+ if (propTypes) {
+ var name = getComponentNameFromType(type);
+ checkPropTypes(propTypes, element.props, "prop", name, element);
+ } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
+ propTypesMisspellWarningShown = true;
+ var _name = getComponentNameFromType(type);
+ error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
+ }
+ if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
+ error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
+ }
+ }
+ }
+ function validateFragmentProps(fragment) {
+ {
+ var keys = Object.keys(fragment.props);
+ for (var i2 = 0; i2 < keys.length; i2++) {
+ var key = keys[i2];
+ if (key !== "children" && key !== "key") {
+ setCurrentlyValidatingElement$1(fragment);
+ error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
+ setCurrentlyValidatingElement$1(null);
+ break;
+ }
+ }
+ if (fragment.ref !== null) {
+ setCurrentlyValidatingElement$1(fragment);
+ error("Invalid attribute `ref` supplied to `React.Fragment`.");
+ setCurrentlyValidatingElement$1(null);
+ }
+ }
+ }
+ function createElementWithValidation(type, props, children) {
+ var validType = isValidElementType(type);
+ if (!validType) {
+ var info = "";
+ if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
+ info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
+ }
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
+ if (sourceInfo) {
+ info += sourceInfo;
+ } else {
+ info += getDeclarationErrorAddendum();
+ }
+ var typeString;
+ if (type === null) {
+ typeString = "null";
+ } else if (isArray(type)) {
+ typeString = "array";
+ } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
+ typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
+ info = " Did you accidentally export a JSX literal instead of a component?";
+ } else {
+ typeString = typeof type;
+ }
+ {
+ error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
+ }
+ }
+ var element = createElement2.apply(this, arguments);
+ if (element == null) {
+ return element;
+ }
+ if (validType) {
+ for (var i2 = 2; i2 < arguments.length; i2++) {
+ validateChildKeys(arguments[i2], type);
+ }
+ }
+ if (type === REACT_FRAGMENT_TYPE) {
+ validateFragmentProps(element);
+ } else {
+ validatePropTypes(element);
+ }
+ return element;
+ }
+ var didWarnAboutDeprecatedCreateFactory = false;
+ function createFactoryWithValidation(type) {
+ var validatedFactory = createElementWithValidation.bind(null, type);
+ validatedFactory.type = type;
+ {
+ if (!didWarnAboutDeprecatedCreateFactory) {
+ didWarnAboutDeprecatedCreateFactory = true;
+ warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
+ }
+ Object.defineProperty(validatedFactory, "type", {
+ enumerable: false,
+ get: function() {
+ warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
+ Object.defineProperty(this, "type", {
+ value: type
+ });
+ return type;
+ }
+ });
+ }
+ return validatedFactory;
+ }
+ function cloneElementWithValidation(element, props, children) {
+ var newElement = cloneElement.apply(this, arguments);
+ for (var i2 = 2; i2 < arguments.length; i2++) {
+ validateChildKeys(arguments[i2], newElement.type);
+ }
+ validatePropTypes(newElement);
+ return newElement;
+ }
+ function startTransition(scope, options) {
+ var prevTransition = ReactCurrentBatchConfig.transition;
+ ReactCurrentBatchConfig.transition = {};
+ var currentTransition = ReactCurrentBatchConfig.transition;
+ {
+ ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
+ }
+ try {
+ scope();
+ } finally {
+ ReactCurrentBatchConfig.transition = prevTransition;
+ {
+ if (prevTransition === null && currentTransition._updatedFibers) {
+ var updatedFibersCount = currentTransition._updatedFibers.size;
+ if (updatedFibersCount > 10) {
+ warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
+ }
+ currentTransition._updatedFibers.clear();
+ }
+ }
+ }
+ }
+ var didWarnAboutMessageChannel = false;
+ var enqueueTaskImpl = null;
+ function enqueueTask(task) {
+ if (enqueueTaskImpl === null) {
+ try {
+ var requireString = ("require" + Math.random()).slice(0, 7);
+ var nodeRequire = module2 && module2[requireString];
+ enqueueTaskImpl = nodeRequire.call(module2, "timers").setImmediate;
+ } catch (_err) {
+ enqueueTaskImpl = function(callback) {
+ {
+ if (didWarnAboutMessageChannel === false) {
+ didWarnAboutMessageChannel = true;
+ if (typeof MessageChannel === "undefined") {
+ error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.");
+ }
+ }
+ }
+ var channel = new MessageChannel();
+ channel.port1.onmessage = callback;
+ channel.port2.postMessage(void 0);
+ };
+ }
+ }
+ return enqueueTaskImpl(task);
+ }
+ var actScopeDepth = 0;
+ var didWarnNoAwaitAct = false;
+ function act(callback) {
+ {
+ var prevActScopeDepth = actScopeDepth;
+ actScopeDepth++;
+ if (ReactCurrentActQueue.current === null) {
+ ReactCurrentActQueue.current = [];
+ }
+ var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
+ var result;
+ try {
+ ReactCurrentActQueue.isBatchingLegacy = true;
+ result = callback();
+ if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
+ var queue = ReactCurrentActQueue.current;
+ if (queue !== null) {
+ ReactCurrentActQueue.didScheduleLegacyUpdate = false;
+ flushActQueue(queue);
+ }
+ }
+ } catch (error2) {
+ popActScope(prevActScopeDepth);
+ throw error2;
+ } finally {
+ ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
+ }
+ if (result !== null && typeof result === "object" && typeof result.then === "function") {
+ var thenableResult = result;
+ var wasAwaited = false;
+ var thenable = {
+ then: function(resolve, reject) {
+ wasAwaited = true;
+ thenableResult.then(function(returnValue2) {
+ popActScope(prevActScopeDepth);
+ if (actScopeDepth === 0) {
+ recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
+ } else {
+ resolve(returnValue2);
+ }
+ }, function(error2) {
+ popActScope(prevActScopeDepth);
+ reject(error2);
+ });
+ }
+ };
+ {
+ if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
+ Promise.resolve().then(function() {
+ }).then(function() {
+ if (!wasAwaited) {
+ didWarnNoAwaitAct = true;
+ error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);");
+ }
+ });
+ }
+ }
+ return thenable;
+ } else {
+ var returnValue = result;
+ popActScope(prevActScopeDepth);
+ if (actScopeDepth === 0) {
+ var _queue = ReactCurrentActQueue.current;
+ if (_queue !== null) {
+ flushActQueue(_queue);
+ ReactCurrentActQueue.current = null;
+ }
+ var _thenable = {
+ then: function(resolve, reject) {
+ if (ReactCurrentActQueue.current === null) {
+ ReactCurrentActQueue.current = [];
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ } else {
+ resolve(returnValue);
+ }
+ }
+ };
+ return _thenable;
+ } else {
+ var _thenable2 = {
+ then: function(resolve, reject) {
+ resolve(returnValue);
+ }
+ };
+ return _thenable2;
+ }
+ }
+ }
+ }
+ function popActScope(prevActScopeDepth) {
+ {
+ if (prevActScopeDepth !== actScopeDepth - 1) {
+ error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
+ }
+ actScopeDepth = prevActScopeDepth;
+ }
+ }
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
+ {
+ var queue = ReactCurrentActQueue.current;
+ if (queue !== null) {
+ try {
+ flushActQueue(queue);
+ enqueueTask(function() {
+ if (queue.length === 0) {
+ ReactCurrentActQueue.current = null;
+ resolve(returnValue);
+ } else {
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ }
+ });
+ } catch (error2) {
+ reject(error2);
+ }
+ } else {
+ resolve(returnValue);
+ }
+ }
+ }
+ var isFlushing = false;
+ function flushActQueue(queue) {
+ {
+ if (!isFlushing) {
+ isFlushing = true;
+ var i2 = 0;
+ try {
+ for (; i2 < queue.length; i2++) {
+ var callback = queue[i2];
+ do {
+ callback = callback(true);
+ } while (callback !== null);
+ }
+ queue.length = 0;
+ } catch (error2) {
+ queue = queue.slice(i2 + 1);
+ throw error2;
+ } finally {
+ isFlushing = false;
+ }
+ }
+ }
+ }
+ var createElement$1 = createElementWithValidation;
+ var cloneElement$1 = cloneElementWithValidation;
+ var createFactory = createFactoryWithValidation;
+ var Children = {
+ map: mapChildren,
+ forEach: forEachChildren,
+ count: countChildren,
+ toArray,
+ only: onlyChild
+ };
+ exports.Children = Children;
+ exports.Component = Component;
+ exports.Fragment = REACT_FRAGMENT_TYPE;
+ exports.Profiler = REACT_PROFILER_TYPE;
+ exports.PureComponent = PureComponent;
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
+ exports.Suspense = REACT_SUSPENSE_TYPE;
+ exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
+ exports.cloneElement = cloneElement$1;
+ exports.createContext = createContext4;
+ exports.createElement = createElement$1;
+ exports.createFactory = createFactory;
+ exports.createRef = createRef;
+ exports.forwardRef = forwardRef;
+ exports.isValidElement = isValidElement;
+ exports.lazy = lazy;
+ exports.memo = memo;
+ exports.startTransition = startTransition;
+ exports.unstable_act = act;
+ exports.useCallback = useCallback;
+ exports.useContext = useContext4;
+ exports.useDebugValue = useDebugValue;
+ exports.useDeferredValue = useDeferredValue;
+ exports.useEffect = useEffect2;
+ exports.useId = useId;
+ exports.useImperativeHandle = useImperativeHandle;
+ exports.useInsertionEffect = useInsertionEffect;
+ exports.useLayoutEffect = useLayoutEffect;
+ exports.useMemo = useMemo;
+ exports.useReducer = useReducer;
+ exports.useRef = useRef;
+ exports.useState = useState2;
+ exports.useSyncExternalStore = useSyncExternalStore;
+ exports.useTransition = useTransition;
+ exports.version = ReactVersion;
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
+ }
+ })();
+ }
+ }
+});
+
+// node_modules/react/index.js
+var require_react = __commonJS({
+ "node_modules/react/index.js"(exports, module2) {
+ "use strict";
+ if (false) {
+ module2.exports = null;
+ } else {
+ module2.exports = require_react_development();
+ }
+ }
+});
+
+// node_modules/scheduler/cjs/scheduler.development.js
+var require_scheduler_development = __commonJS({
+ "node_modules/scheduler/cjs/scheduler.development.js"(exports) {
+ "use strict";
+ if (true) {
+ (function() {
+ "use strict";
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
+ }
+ var enableSchedulerDebugging = false;
+ var enableProfiling = false;
+ var frameYieldMs = 5;
+ function push(heap, node) {
+ var index = heap.length;
+ heap.push(node);
+ siftUp(heap, node, index);
+ }
+ function peek(heap) {
+ return heap.length === 0 ? null : heap[0];
+ }
+ function pop(heap) {
+ if (heap.length === 0) {
+ return null;
+ }
+ var first = heap[0];
+ var last = heap.pop();
+ if (last !== first) {
+ heap[0] = last;
+ siftDown(heap, last, 0);
+ }
+ return first;
+ }
+ function siftUp(heap, node, i2) {
+ var index = i2;
+ while (index > 0) {
+ var parentIndex = index - 1 >>> 1;
+ var parent = heap[parentIndex];
+ if (compare(parent, node) > 0) {
+ heap[parentIndex] = node;
+ heap[index] = parent;
+ index = parentIndex;
+ } else {
+ return;
+ }
+ }
+ }
+ function siftDown(heap, node, i2) {
+ var index = i2;
+ var length = heap.length;
+ var halfLength = length >>> 1;
+ while (index < halfLength) {
+ var leftIndex = (index + 1) * 2 - 1;
+ var left = heap[leftIndex];
+ var rightIndex = leftIndex + 1;
+ var right = heap[rightIndex];
+ if (compare(left, node) < 0) {
+ if (rightIndex < length && compare(right, left) < 0) {
+ heap[index] = right;
+ heap[rightIndex] = node;
+ index = rightIndex;
+ } else {
+ heap[index] = left;
+ heap[leftIndex] = node;
+ index = leftIndex;
+ }
+ } else if (rightIndex < length && compare(right, node) < 0) {
+ heap[index] = right;
+ heap[rightIndex] = node;
+ index = rightIndex;
+ } else {
+ return;
+ }
+ }
+ }
+ function compare(a2, b2) {
+ var diff = a2.sortIndex - b2.sortIndex;
+ return diff !== 0 ? diff : a2.id - b2.id;
+ }
+ var ImmediatePriority = 1;
+ var UserBlockingPriority = 2;
+ var NormalPriority = 3;
+ var LowPriority = 4;
+ var IdlePriority = 5;
+ function markTaskErrored(task, ms) {
+ }
+ var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function";
+ if (hasPerformanceNow) {
+ var localPerformance = performance;
+ exports.unstable_now = function() {
+ return localPerformance.now();
+ };
+ } else {
+ var localDate = Date;
+ var initialTime = localDate.now();
+ exports.unstable_now = function() {
+ return localDate.now() - initialTime;
+ };
+ }
+ var maxSigned31BitInt = 1073741823;
+ var IMMEDIATE_PRIORITY_TIMEOUT = -1;
+ var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
+ var NORMAL_PRIORITY_TIMEOUT = 5e3;
+ var LOW_PRIORITY_TIMEOUT = 1e4;
+ var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt;
+ var taskQueue = [];
+ var timerQueue = [];
+ var taskIdCounter = 1;
+ var currentTask = null;
+ var currentPriorityLevel = NormalPriority;
+ var isPerformingWork = false;
+ var isHostCallbackScheduled = false;
+ var isHostTimeoutScheduled = false;
+ var localSetTimeout = typeof setTimeout === "function" ? setTimeout : null;
+ var localClearTimeout = typeof clearTimeout === "function" ? clearTimeout : null;
+ var localSetImmediate = typeof setImmediate !== "undefined" ? setImmediate : null;
+ var isInputPending = typeof navigator !== "undefined" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;
+ function advanceTimers(currentTime) {
+ var timer = peek(timerQueue);
+ while (timer !== null) {
+ if (timer.callback === null) {
+ pop(timerQueue);
+ } else if (timer.startTime <= currentTime) {
+ pop(timerQueue);
+ timer.sortIndex = timer.expirationTime;
+ push(taskQueue, timer);
+ } else {
+ return;
+ }
+ timer = peek(timerQueue);
+ }
+ }
+ function handleTimeout(currentTime) {
+ isHostTimeoutScheduled = false;
+ advanceTimers(currentTime);
+ if (!isHostCallbackScheduled) {
+ if (peek(taskQueue) !== null) {
+ isHostCallbackScheduled = true;
+ requestHostCallback(flushWork);
+ } else {
+ var firstTimer = peek(timerQueue);
+ if (firstTimer !== null) {
+ requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
+ }
+ }
+ }
+ }
+ function flushWork(hasTimeRemaining, initialTime2) {
+ isHostCallbackScheduled = false;
+ if (isHostTimeoutScheduled) {
+ isHostTimeoutScheduled = false;
+ cancelHostTimeout();
+ }
+ isPerformingWork = true;
+ var previousPriorityLevel = currentPriorityLevel;
+ try {
+ if (enableProfiling) {
+ try {
+ return workLoop(hasTimeRemaining, initialTime2);
+ } catch (error) {
+ if (currentTask !== null) {
+ var currentTime = exports.unstable_now();
+ markTaskErrored(currentTask, currentTime);
+ currentTask.isQueued = false;
+ }
+ throw error;
+ }
+ } else {
+ return workLoop(hasTimeRemaining, initialTime2);
+ }
+ } finally {
+ currentTask = null;
+ currentPriorityLevel = previousPriorityLevel;
+ isPerformingWork = false;
+ }
+ }
+ function workLoop(hasTimeRemaining, initialTime2) {
+ var currentTime = initialTime2;
+ advanceTimers(currentTime);
+ currentTask = peek(taskQueue);
+ while (currentTask !== null && !enableSchedulerDebugging) {
+ if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
+ break;
+ }
+ var callback = currentTask.callback;
+ if (typeof callback === "function") {
+ currentTask.callback = null;
+ currentPriorityLevel = currentTask.priorityLevel;
+ var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
+ var continuationCallback = callback(didUserCallbackTimeout);
+ currentTime = exports.unstable_now();
+ if (typeof continuationCallback === "function") {
+ currentTask.callback = continuationCallback;
+ } else {
+ if (currentTask === peek(taskQueue)) {
+ pop(taskQueue);
+ }
+ }
+ advanceTimers(currentTime);
+ } else {
+ pop(taskQueue);
+ }
+ currentTask = peek(taskQueue);
+ }
+ if (currentTask !== null) {
+ return true;
+ } else {
+ var firstTimer = peek(timerQueue);
+ if (firstTimer !== null) {
+ requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
+ }
+ return false;
+ }
+ }
+ function unstable_runWithPriority(priorityLevel, eventHandler) {
+ switch (priorityLevel) {
+ case ImmediatePriority:
+ case UserBlockingPriority:
+ case NormalPriority:
+ case LowPriority:
+ case IdlePriority:
+ break;
+ default:
+ priorityLevel = NormalPriority;
+ }
+ var previousPriorityLevel = currentPriorityLevel;
+ currentPriorityLevel = priorityLevel;
+ try {
+ return eventHandler();
+ } finally {
+ currentPriorityLevel = previousPriorityLevel;
+ }
+ }
+ function unstable_next(eventHandler) {
+ var priorityLevel;
+ switch (currentPriorityLevel) {
+ case ImmediatePriority:
+ case UserBlockingPriority:
+ case NormalPriority:
+ priorityLevel = NormalPriority;
+ break;
+ default:
+ priorityLevel = currentPriorityLevel;
+ break;
+ }
+ var previousPriorityLevel = currentPriorityLevel;
+ currentPriorityLevel = priorityLevel;
+ try {
+ return eventHandler();
+ } finally {
+ currentPriorityLevel = previousPriorityLevel;
+ }
+ }
+ function unstable_wrapCallback(callback) {
+ var parentPriorityLevel = currentPriorityLevel;
+ return function() {
+ var previousPriorityLevel = currentPriorityLevel;
+ currentPriorityLevel = parentPriorityLevel;
+ try {
+ return callback.apply(this, arguments);
+ } finally {
+ currentPriorityLevel = previousPriorityLevel;
+ }
+ };
+ }
+ function unstable_scheduleCallback(priorityLevel, callback, options) {
+ var currentTime = exports.unstable_now();
+ var startTime2;
+ if (typeof options === "object" && options !== null) {
+ var delay = options.delay;
+ if (typeof delay === "number" && delay > 0) {
+ startTime2 = currentTime + delay;
+ } else {
+ startTime2 = currentTime;
+ }
+ } else {
+ startTime2 = currentTime;
+ }
+ var timeout;
+ switch (priorityLevel) {
+ case ImmediatePriority:
+ timeout = IMMEDIATE_PRIORITY_TIMEOUT;
+ break;
+ case UserBlockingPriority:
+ timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
+ break;
+ case IdlePriority:
+ timeout = IDLE_PRIORITY_TIMEOUT;
+ break;
+ case LowPriority:
+ timeout = LOW_PRIORITY_TIMEOUT;
+ break;
+ case NormalPriority:
+ default:
+ timeout = NORMAL_PRIORITY_TIMEOUT;
+ break;
+ }
+ var expirationTime = startTime2 + timeout;
+ var newTask = {
+ id: taskIdCounter++,
+ callback,
+ priorityLevel,
+ startTime: startTime2,
+ expirationTime,
+ sortIndex: -1
+ };
+ if (startTime2 > currentTime) {
+ newTask.sortIndex = startTime2;
+ push(timerQueue, newTask);
+ if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
+ if (isHostTimeoutScheduled) {
+ cancelHostTimeout();
+ } else {
+ isHostTimeoutScheduled = true;
+ }
+ requestHostTimeout(handleTimeout, startTime2 - currentTime);
+ }
+ } else {
+ newTask.sortIndex = expirationTime;
+ push(taskQueue, newTask);
+ if (!isHostCallbackScheduled && !isPerformingWork) {
+ isHostCallbackScheduled = true;
+ requestHostCallback(flushWork);
+ }
+ }
+ return newTask;
+ }
+ function unstable_pauseExecution() {
+ }
+ function unstable_continueExecution() {
+ if (!isHostCallbackScheduled && !isPerformingWork) {
+ isHostCallbackScheduled = true;
+ requestHostCallback(flushWork);
+ }
+ }
+ function unstable_getFirstCallbackNode() {
+ return peek(taskQueue);
+ }
+ function unstable_cancelCallback(task) {
+ task.callback = null;
+ }
+ function unstable_getCurrentPriorityLevel() {
+ return currentPriorityLevel;
+ }
+ var isMessageLoopRunning = false;
+ var scheduledHostCallback = null;
+ var taskTimeoutID = -1;
+ var frameInterval = frameYieldMs;
+ var startTime = -1;
+ function shouldYieldToHost() {
+ var timeElapsed = exports.unstable_now() - startTime;
+ if (timeElapsed < frameInterval) {
+ return false;
+ }
+ return true;
+ }
+ function requestPaint() {
+ }
+ function forceFrameRate(fps) {
+ if (fps < 0 || fps > 125) {
+ console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");
+ return;
+ }
+ if (fps > 0) {
+ frameInterval = Math.floor(1e3 / fps);
+ } else {
+ frameInterval = frameYieldMs;
+ }
+ }
+ var performWorkUntilDeadline = function() {
+ if (scheduledHostCallback !== null) {
+ var currentTime = exports.unstable_now();
+ startTime = currentTime;
+ var hasTimeRemaining = true;
+ var hasMoreWork = true;
+ try {
+ hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
+ } finally {
+ if (hasMoreWork) {
+ schedulePerformWorkUntilDeadline();
+ } else {
+ isMessageLoopRunning = false;
+ scheduledHostCallback = null;
+ }
+ }
+ } else {
+ isMessageLoopRunning = false;
+ }
+ };
+ var schedulePerformWorkUntilDeadline;
+ if (typeof localSetImmediate === "function") {
+ schedulePerformWorkUntilDeadline = function() {
+ localSetImmediate(performWorkUntilDeadline);
+ };
+ } else if (typeof MessageChannel !== "undefined") {
+ var channel = new MessageChannel();
+ var port = channel.port2;
+ channel.port1.onmessage = performWorkUntilDeadline;
+ schedulePerformWorkUntilDeadline = function() {
+ port.postMessage(null);
+ };
+ } else {
+ schedulePerformWorkUntilDeadline = function() {
+ localSetTimeout(performWorkUntilDeadline, 0);
+ };
+ }
+ function requestHostCallback(callback) {
+ scheduledHostCallback = callback;
+ if (!isMessageLoopRunning) {
+ isMessageLoopRunning = true;
+ schedulePerformWorkUntilDeadline();
+ }
+ }
+ function requestHostTimeout(callback, ms) {
+ taskTimeoutID = localSetTimeout(function() {
+ callback(exports.unstable_now());
+ }, ms);
+ }
+ function cancelHostTimeout() {
+ localClearTimeout(taskTimeoutID);
+ taskTimeoutID = -1;
+ }
+ var unstable_requestPaint = requestPaint;
+ var unstable_Profiling = null;
+ exports.unstable_IdlePriority = IdlePriority;
+ exports.unstable_ImmediatePriority = ImmediatePriority;
+ exports.unstable_LowPriority = LowPriority;
+ exports.unstable_NormalPriority = NormalPriority;
+ exports.unstable_Profiling = unstable_Profiling;
+ exports.unstable_UserBlockingPriority = UserBlockingPriority;
+ exports.unstable_cancelCallback = unstable_cancelCallback;
+ exports.unstable_continueExecution = unstable_continueExecution;
+ exports.unstable_forceFrameRate = forceFrameRate;
+ exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
+ exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
+ exports.unstable_next = unstable_next;
+ exports.unstable_pauseExecution = unstable_pauseExecution;
+ exports.unstable_requestPaint = unstable_requestPaint;
+ exports.unstable_runWithPriority = unstable_runWithPriority;
+ exports.unstable_scheduleCallback = unstable_scheduleCallback;
+ exports.unstable_shouldYield = shouldYieldToHost;
+ exports.unstable_wrapCallback = unstable_wrapCallback;
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
+ }
+ })();
+ }
+ }
+});
+
+// node_modules/scheduler/index.js
+var require_scheduler = __commonJS({
+ "node_modules/scheduler/index.js"(exports, module2) {
+ "use strict";
+ if (false) {
+ module2.exports = null;
+ } else {
+ module2.exports = require_scheduler_development();
+ }
+ }
+});
+
+// node_modules/react-dom/cjs/react-dom.development.js
+var require_react_dom_development = __commonJS({
+ "node_modules/react-dom/cjs/react-dom.development.js"(exports) {
+ "use strict";
+ if (true) {
+ (function() {
+ "use strict";
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
+ }
+ var React9 = require_react();
+ var Scheduler = require_scheduler();
+ var ReactSharedInternals = React9.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
+ var suppressWarning = false;
+ function setSuppressWarning(newSuppressWarning) {
+ {
+ suppressWarning = newSuppressWarning;
+ }
+ }
+ function warn(format) {
+ {
+ if (!suppressWarning) {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+ printWarning("warn", format, args);
+ }
+ }
+ }
+ function error(format) {
+ {
+ if (!suppressWarning) {
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ args[_key2 - 1] = arguments[_key2];
+ }
+ printWarning("error", format, args);
+ }
+ }
+ }
+ function printWarning(level, format, args) {
+ {
+ var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame2.getStackAddendum();
+ if (stack !== "") {
+ format += "%s";
+ args = args.concat([stack]);
+ }
+ var argsWithFormat = args.map(function(item) {
+ return String(item);
+ });
+ argsWithFormat.unshift("Warning: " + format);
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
+ }
+ }
+ var FunctionComponent = 0;
+ var ClassComponent = 1;
+ var IndeterminateComponent = 2;
+ var HostRoot = 3;
+ var HostPortal = 4;
+ var HostComponent = 5;
+ var HostText = 6;
+ var Fragment = 7;
+ var Mode = 8;
+ var ContextConsumer = 9;
+ var ContextProvider = 10;
+ var ForwardRef = 11;
+ var Profiler = 12;
+ var SuspenseComponent = 13;
+ var MemoComponent = 14;
+ var SimpleMemoComponent = 15;
+ var LazyComponent = 16;
+ var IncompleteClassComponent = 17;
+ var DehydratedFragment = 18;
+ var SuspenseListComponent = 19;
+ var ScopeComponent = 21;
+ var OffscreenComponent = 22;
+ var LegacyHiddenComponent = 23;
+ var CacheComponent = 24;
+ var TracingMarkerComponent = 25;
+ var enableClientRenderFallbackOnTextMismatch = true;
+ var enableNewReconciler = false;
+ var enableLazyContextPropagation = false;
+ var enableLegacyHidden = false;
+ var enableSuspenseAvoidThisFallback = false;
+ var disableCommentsAsDOMContainers = true;
+ var enableCustomElementPropertySupport = false;
+ var warnAboutStringRefs = false;
+ var enableSchedulingProfiler = true;
+ var enableProfilerTimer = true;
+ var enableProfilerCommitHooks = true;
+ var allNativeEvents = /* @__PURE__ */ new Set();
+ var registrationNameDependencies = {};
+ var possibleRegistrationNames = {};
+ function registerTwoPhaseEvent(registrationName, dependencies) {
+ registerDirectEvent(registrationName, dependencies);
+ registerDirectEvent(registrationName + "Capture", dependencies);
+ }
+ function registerDirectEvent(registrationName, dependencies) {
+ {
+ if (registrationNameDependencies[registrationName]) {
+ error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName);
+ }
+ }
+ registrationNameDependencies[registrationName] = dependencies;
+ {
+ var lowerCasedName = registrationName.toLowerCase();
+ possibleRegistrationNames[lowerCasedName] = registrationName;
+ if (registrationName === "onDoubleClick") {
+ possibleRegistrationNames.ondblclick = registrationName;
+ }
+ }
+ for (var i2 = 0; i2 < dependencies.length; i2++) {
+ allNativeEvents.add(dependencies[i2]);
+ }
+ }
+ var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ function typeName(value) {
+ {
+ var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
+ return type;
+ }
+ }
+ function willCoercionThrow(value) {
+ {
+ try {
+ testStringCoercion(value);
+ return false;
+ } catch (e2) {
+ return true;
+ }
+ }
+ }
+ function testStringCoercion(value) {
+ return "" + value;
+ }
+ function checkAttributeStringCoercion(value, attributeName) {
+ {
+ if (willCoercionThrow(value)) {
+ error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.", attributeName, typeName(value));
+ return testStringCoercion(value);
+ }
+ }
+ }
+ function checkKeyStringCoercion(value) {
+ {
+ if (willCoercionThrow(value)) {
+ error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
+ return testStringCoercion(value);
+ }
+ }
+ }
+ function checkPropStringCoercion(value, propName) {
+ {
+ if (willCoercionThrow(value)) {
+ error("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value));
+ return testStringCoercion(value);
+ }
+ }
+ }
+ function checkCSSPropertyStringCoercion(value, propName) {
+ {
+ if (willCoercionThrow(value)) {
+ error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value));
+ return testStringCoercion(value);
+ }
+ }
+ }
+ function checkHtmlStringCoercion(value) {
+ {
+ if (willCoercionThrow(value)) {
+ error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
+ return testStringCoercion(value);
+ }
+ }
+ }
+ function checkFormFieldValueStringCoercion(value) {
+ {
+ if (willCoercionThrow(value)) {
+ error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.", typeName(value));
+ return testStringCoercion(value);
+ }
+ }
+ }
+ var RESERVED = 0;
+ var STRING = 1;
+ var BOOLEANISH_STRING = 2;
+ var BOOLEAN = 3;
+ var OVERLOADED_BOOLEAN = 4;
+ var NUMERIC = 5;
+ var POSITIVE_NUMERIC = 6;
+ var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$");
+ var illegalAttributeNameCache = {};
+ var validatedAttributeNameCache = {};
+ function isAttributeNameSafe(attributeName) {
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
+ return true;
+ }
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
+ return false;
+ }
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
+ validatedAttributeNameCache[attributeName] = true;
+ return true;
+ }
+ illegalAttributeNameCache[attributeName] = true;
+ {
+ error("Invalid attribute name: `%s`", attributeName);
+ }
+ return false;
+ }
+ function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
+ if (propertyInfo !== null) {
+ return propertyInfo.type === RESERVED;
+ }
+ if (isCustomComponentTag) {
+ return false;
+ }
+ if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) {
+ return true;
+ }
+ return false;
+ }
+ function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
+ if (propertyInfo !== null && propertyInfo.type === RESERVED) {
+ return false;
+ }
+ switch (typeof value) {
+ case "function":
+ case "symbol":
+ return true;
+ case "boolean": {
+ if (isCustomComponentTag) {
+ return false;
+ }
+ if (propertyInfo !== null) {
+ return !propertyInfo.acceptsBooleans;
+ } else {
+ var prefix2 = name.toLowerCase().slice(0, 5);
+ return prefix2 !== "data-" && prefix2 !== "aria-";
+ }
+ }
+ default:
+ return false;
+ }
+ }
+ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
+ if (value === null || typeof value === "undefined") {
+ return true;
+ }
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
+ return true;
+ }
+ if (isCustomComponentTag) {
+ return false;
+ }
+ if (propertyInfo !== null) {
+ switch (propertyInfo.type) {
+ case BOOLEAN:
+ return !value;
+ case OVERLOADED_BOOLEAN:
+ return value === false;
+ case NUMERIC:
+ return isNaN(value);
+ case POSITIVE_NUMERIC:
+ return isNaN(value) || value < 1;
+ }
+ }
+ return false;
+ }
+ function getPropertyInfo(name) {
+ return properties.hasOwnProperty(name) ? properties[name] : null;
+ }
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) {
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
+ this.attributeName = attributeName;
+ this.attributeNamespace = attributeNamespace;
+ this.mustUseProperty = mustUseProperty;
+ this.propertyName = name;
+ this.type = type;
+ this.sanitizeURL = sanitizeURL2;
+ this.removeEmptyString = removeEmptyString;
+ }
+ var properties = {};
+ var reservedProps = [
+ "children",
+ "dangerouslySetInnerHTML",
+ "defaultValue",
+ "defaultChecked",
+ "innerHTML",
+ "suppressContentEditableWarning",
+ "suppressHydrationWarning",
+ "style"
+ ];
+ reservedProps.forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, name, null, false, false);
+ });
+ [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) {
+ var name = _ref[0], attributeName = _ref[1];
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false);
+ });
+ ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name.toLowerCase(), null, false, false);
+ });
+ ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name, null, false, false);
+ });
+ [
+ "allowFullScreen",
+ "async",
+ "autoFocus",
+ "autoPlay",
+ "controls",
+ "default",
+ "defer",
+ "disabled",
+ "disablePictureInPicture",
+ "disableRemotePlayback",
+ "formNoValidate",
+ "hidden",
+ "loop",
+ "noModule",
+ "noValidate",
+ "open",
+ "playsInline",
+ "readOnly",
+ "required",
+ "reversed",
+ "scoped",
+ "seamless",
+ "itemScope"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, name.toLowerCase(), null, false, false);
+ });
+ [
+ "checked",
+ "multiple",
+ "muted",
+ "selected"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, name, null, false, false);
+ });
+ [
+ "capture",
+ "download"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, name, null, false, false);
+ });
+ [
+ "cols",
+ "rows",
+ "size",
+ "span"
+ ].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, name, null, false, false);
+ });
+ ["rowSpan", "start"].forEach(function(name) {
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, name.toLowerCase(), null, false, false);
+ });
+ var CAMELIZE = /[\-\:]([a-z])/g;
+ var capitalize = function(token) {
+ return token[1].toUpperCase();
+ };
+ [
+ "accent-height",
+ "alignment-baseline",
+ "arabic-form",
+ "baseline-shift",
+ "cap-height",
+ "clip-path",
+ "clip-rule",
+ "color-interpolation",
+ "color-interpolation-filters",
+ "color-profile",
+ "color-rendering",
+ "dominant-baseline",
+ "enable-background",
+ "fill-opacity",
+ "fill-rule",
+ "flood-color",
+ "flood-opacity",
+ "font-family",
+ "font-size",
+ "font-size-adjust",
+ "font-stretch",
+ "font-style",
+ "font-variant",
+ "font-weight",
+ "glyph-name",
+ "glyph-orientation-horizontal",
+ "glyph-orientation-vertical",
+ "horiz-adv-x",
+ "horiz-origin-x",
+ "image-rendering",
+ "letter-spacing",
+ "lighting-color",
+ "marker-end",
+ "marker-mid",
+ "marker-start",
+ "overline-position",
+ "overline-thickness",
+ "paint-order",
+ "panose-1",
+ "pointer-events",
+ "rendering-intent",
+ "shape-rendering",
+ "stop-color",
+ "stop-opacity",
+ "strikethrough-position",
+ "strikethrough-thickness",
+ "stroke-dasharray",
+ "stroke-dashoffset",
+ "stroke-linecap",
+ "stroke-linejoin",
+ "stroke-miterlimit",
+ "stroke-opacity",
+ "stroke-width",
+ "text-anchor",
+ "text-decoration",
+ "text-rendering",
+ "underline-position",
+ "underline-thickness",
+ "unicode-bidi",
+ "unicode-range",
+ "units-per-em",
+ "v-alphabetic",
+ "v-hanging",
+ "v-ideographic",
+ "v-mathematical",
+ "vector-effect",
+ "vert-adv-y",
+ "vert-origin-x",
+ "vert-origin-y",
+ "word-spacing",
+ "writing-mode",
+ "xmlns:xlink",
+ "x-height"
+ ].forEach(function(attributeName) {
+ var name = attributeName.replace(CAMELIZE, capitalize);
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false);
+ });
+ [
+ "xlink:actuate",
+ "xlink:arcrole",
+ "xlink:role",
+ "xlink:show",
+ "xlink:title",
+ "xlink:type"
+ ].forEach(function(attributeName) {
+ var name = attributeName.replace(CAMELIZE, capitalize);
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/1999/xlink", false, false);
+ });
+ [
+ "xml:base",
+ "xml:lang",
+ "xml:space"
+ ].forEach(function(attributeName) {
+ var name = attributeName.replace(CAMELIZE, capitalize);
+ properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/XML/1998/namespace", false, false);
+ });
+ ["tabIndex", "crossOrigin"].forEach(function(attributeName) {
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, false, false);
+ });
+ var xlinkHref = "xlinkHref";
+ properties[xlinkHref] = new PropertyInfoRecord("xlinkHref", STRING, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false);
+ ["src", "href", "action", "formAction"].forEach(function(attributeName) {
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, true, true);
+ });
+ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
+ var didWarn = false;
+ function sanitizeURL(url) {
+ {
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
+ didWarn = true;
+ error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url));
+ }
+ }
+ }
+ function getValueForProperty(node, name, expected, propertyInfo) {
+ {
+ if (propertyInfo.mustUseProperty) {
+ var propertyName = propertyInfo.propertyName;
+ return node[propertyName];
+ } else {
+ {
+ checkAttributeStringCoercion(expected, name);
+ }
+ if (propertyInfo.sanitizeURL) {
+ sanitizeURL("" + expected);
+ }
+ var attributeName = propertyInfo.attributeName;
+ var stringValue = null;
+ if (propertyInfo.type === OVERLOADED_BOOLEAN) {
+ if (node.hasAttribute(attributeName)) {
+ var value = node.getAttribute(attributeName);
+ if (value === "") {
+ return true;
+ }
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
+ return value;
+ }
+ if (value === "" + expected) {
+ return expected;
+ }
+ return value;
+ }
+ } else if (node.hasAttribute(attributeName)) {
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
+ return node.getAttribute(attributeName);
+ }
+ if (propertyInfo.type === BOOLEAN) {
+ return expected;
+ }
+ stringValue = node.getAttribute(attributeName);
+ }
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
+ return stringValue === null ? expected : stringValue;
+ } else if (stringValue === "" + expected) {
+ return expected;
+ } else {
+ return stringValue;
+ }
+ }
+ }
+ }
+ function getValueForAttribute(node, name, expected, isCustomComponentTag) {
+ {
+ if (!isAttributeNameSafe(name)) {
+ return;
+ }
+ if (!node.hasAttribute(name)) {
+ return expected === void 0 ? void 0 : null;
+ }
+ var value = node.getAttribute(name);
+ {
+ checkAttributeStringCoercion(expected, name);
+ }
+ if (value === "" + expected) {
+ return expected;
+ }
+ return value;
+ }
+ }
+ function setValueForProperty(node, name, value, isCustomComponentTag) {
+ var propertyInfo = getPropertyInfo(name);
+ if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
+ return;
+ }
+ if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
+ value = null;
+ }
+ if (isCustomComponentTag || propertyInfo === null) {
+ if (isAttributeNameSafe(name)) {
+ var _attributeName = name;
+ if (value === null) {
+ node.removeAttribute(_attributeName);
+ } else {
+ {
+ checkAttributeStringCoercion(value, name);
+ }
+ node.setAttribute(_attributeName, "" + value);
+ }
+ }
+ return;
+ }
+ var mustUseProperty = propertyInfo.mustUseProperty;
+ if (mustUseProperty) {
+ var propertyName = propertyInfo.propertyName;
+ if (value === null) {
+ var type = propertyInfo.type;
+ node[propertyName] = type === BOOLEAN ? false : "";
+ } else {
+ node[propertyName] = value;
+ }
+ return;
+ }
+ var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace;
+ if (value === null) {
+ node.removeAttribute(attributeName);
+ } else {
+ var _type = propertyInfo.type;
+ var attributeValue;
+ if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
+ attributeValue = "";
+ } else {
+ {
+ {
+ checkAttributeStringCoercion(value, attributeName);
+ }
+ attributeValue = "" + value;
+ }
+ if (propertyInfo.sanitizeURL) {
+ sanitizeURL(attributeValue.toString());
+ }
+ }
+ if (attributeNamespace) {
+ node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
+ } else {
+ node.setAttribute(attributeName, attributeValue);
+ }
+ }
+ }
+ var REACT_ELEMENT_TYPE = Symbol.for("react.element");
+ var REACT_PORTAL_TYPE = Symbol.for("react.portal");
+ var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
+ var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
+ var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
+ var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
+ var REACT_CONTEXT_TYPE = Symbol.for("react.context");
+ var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
+ var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
+ var REACT_MEMO_TYPE = Symbol.for("react.memo");
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
+ var REACT_SCOPE_TYPE = Symbol.for("react.scope");
+ var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode");
+ var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
+ var REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden");
+ var REACT_CACHE_TYPE = Symbol.for("react.cache");
+ var REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker");
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
+ function getIteratorFn(maybeIterable) {
+ if (maybeIterable === null || typeof maybeIterable !== "object") {
+ return null;
+ }
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
+ if (typeof maybeIterator === "function") {
+ return maybeIterator;
+ }
+ return null;
+ }
+ var assign = Object.assign;
+ var disabledDepth = 0;
+ var prevLog;
+ var prevInfo;
+ var prevWarn;
+ var prevError;
+ var prevGroup;
+ var prevGroupCollapsed;
+ var prevGroupEnd;
+ function disabledLog() {
+ }
+ disabledLog.__reactDisabledLog = true;
+ function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd;
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ };
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ }
+ disabledDepth++;
+ }
+ }
+ function reenableLogs() {
+ {
+ disabledDepth--;
+ if (disabledDepth === 0) {
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ };
+ Object.defineProperties(console, {
+ log: assign({}, props, {
+ value: prevLog
+ }),
+ info: assign({}, props, {
+ value: prevInfo
+ }),
+ warn: assign({}, props, {
+ value: prevWarn
+ }),
+ error: assign({}, props, {
+ value: prevError
+ }),
+ group: assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ }
+ if (disabledDepth < 0) {
+ error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
+ }
+ }
+ }
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
+ var prefix;
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === void 0) {
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || "";
+ }
+ }
+ return "\n" + prefix + name;
+ }
+ }
+ var reentry = false;
+ var componentFrameCache;
+ {
+ var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+ }
+ function describeNativeComponentFrame(fn, construct) {
+ if (!fn || reentry) {
+ return "";
+ }
+ {
+ var frame = componentFrameCache.get(fn);
+ if (frame !== void 0) {
+ return frame;
+ }
+ }
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ var previousDispatcher;
+ {
+ previousDispatcher = ReactCurrentDispatcher.current;
+ ReactCurrentDispatcher.current = null;
+ disableLogs();
+ }
+ try {
+ if (construct) {
+ var Fake = function() {
+ throw Error();
+ };
+ Object.defineProperty(Fake.prototype, "props", {
+ set: function() {
+ throw Error();
+ }
+ });
+ if (typeof Reflect === "object" && Reflect.construct) {
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+ fn();
+ }
+ } catch (sample) {
+ if (sample && control && typeof sample.stack === "string") {
+ var sampleLines = sample.stack.split("\n");
+ var controlLines = control.stack.split("\n");
+ var s2 = sampleLines.length - 1;
+ var c2 = controlLines.length - 1;
+ while (s2 >= 1 && c2 >= 0 && sampleLines[s2] !== controlLines[c2]) {
+ c2--;
+ }
+ for (; s2 >= 1 && c2 >= 0; s2--, c2--) {
+ if (sampleLines[s2] !== controlLines[c2]) {
+ if (s2 !== 1 || c2 !== 1) {
+ do {
+ s2--;
+ c2--;
+ if (c2 < 0 || sampleLines[s2] !== controlLines[c2]) {
+ var _frame = "\n" + sampleLines[s2].replace(" at new ", " at ");
+ if (fn.displayName && _frame.includes("")) {
+ _frame = _frame.replace("", fn.displayName);
+ }
+ {
+ if (typeof fn === "function") {
+ componentFrameCache.set(fn, _frame);
+ }
+ }
+ return _frame;
+ }
+ } while (s2 >= 1 && c2 >= 0);
+ }
+ break;
+ }
+ }
+ }
+ } finally {
+ reentry = false;
+ {
+ ReactCurrentDispatcher.current = previousDispatcher;
+ reenableLogs();
+ }
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ }
+ var name = fn ? fn.displayName || fn.name : "";
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
+ {
+ if (typeof fn === "function") {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
+ }
+ return syntheticFrame;
+ }
+ function describeClassComponentFrame(ctor, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(ctor, true);
+ }
+ }
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
+ }
+ function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+ }
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+ if (type == null) {
+ return "";
+ }
+ if (typeof type === "function") {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+ if (typeof type === "string") {
+ return describeBuiltInComponentFrame(type);
+ }
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame("Suspense");
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame("SuspenseList");
+ }
+ if (typeof type === "object") {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+ case REACT_MEMO_TYPE:
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+ case REACT_LAZY_TYPE: {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ try {
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {
+ }
+ }
+ }
+ }
+ return "";
+ }
+ function describeFiber(fiber) {
+ var owner = fiber._debugOwner ? fiber._debugOwner.type : null;
+ var source = fiber._debugSource;
+ switch (fiber.tag) {
+ case HostComponent:
+ return describeBuiltInComponentFrame(fiber.type);
+ case LazyComponent:
+ return describeBuiltInComponentFrame("Lazy");
+ case SuspenseComponent:
+ return describeBuiltInComponentFrame("Suspense");
+ case SuspenseListComponent:
+ return describeBuiltInComponentFrame("SuspenseList");
+ case FunctionComponent:
+ case IndeterminateComponent:
+ case SimpleMemoComponent:
+ return describeFunctionComponentFrame(fiber.type);
+ case ForwardRef:
+ return describeFunctionComponentFrame(fiber.type.render);
+ case ClassComponent:
+ return describeClassComponentFrame(fiber.type);
+ default:
+ return "";
+ }
+ }
+ function getStackByFiberInDevAndProd(workInProgress2) {
+ try {
+ var info = "";
+ var node = workInProgress2;
+ do {
+ info += describeFiber(node);
+ node = node.return;
+ } while (node);
+ return info;
+ } catch (x) {
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
+ }
+ }
+ function getWrappedName(outerType, innerType, wrapperName) {
+ var displayName = outerType.displayName;
+ if (displayName) {
+ return displayName;
+ }
+ var functionName = innerType.displayName || innerType.name || "";
+ return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
+ }
+ function getContextName(type) {
+ return type.displayName || "Context";
+ }
+ function getComponentNameFromType(type) {
+ if (type == null) {
+ return null;
+ }
+ {
+ if (typeof type.tag === "number") {
+ error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
+ }
+ }
+ if (typeof type === "function") {
+ return type.displayName || type.name || null;
+ }
+ if (typeof type === "string") {
+ return type;
+ }
+ switch (type) {
+ case REACT_FRAGMENT_TYPE:
+ return "Fragment";
+ case REACT_PORTAL_TYPE:
+ return "Portal";
+ case REACT_PROFILER_TYPE:
+ return "Profiler";
+ case REACT_STRICT_MODE_TYPE:
+ return "StrictMode";
+ case REACT_SUSPENSE_TYPE:
+ return "Suspense";
+ case REACT_SUSPENSE_LIST_TYPE:
+ return "SuspenseList";
+ }
+ if (typeof type === "object") {
+ switch (type.$$typeof) {
+ case REACT_CONTEXT_TYPE:
+ var context = type;
+ return getContextName(context) + ".Consumer";
+ case REACT_PROVIDER_TYPE:
+ var provider = type;
+ return getContextName(provider._context) + ".Provider";
+ case REACT_FORWARD_REF_TYPE:
+ return getWrappedName(type, type.render, "ForwardRef");
+ case REACT_MEMO_TYPE:
+ var outerName = type.displayName || null;
+ if (outerName !== null) {
+ return outerName;
+ }
+ return getComponentNameFromType(type.type) || "Memo";
+ case REACT_LAZY_TYPE: {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ try {
+ return getComponentNameFromType(init(payload));
+ } catch (x) {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+ function getWrappedName$1(outerType, innerType, wrapperName) {
+ var functionName = innerType.displayName || innerType.name || "";
+ return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
+ }
+ function getContextName$1(type) {
+ return type.displayName || "Context";
+ }
+ function getComponentNameFromFiber(fiber) {
+ var tag = fiber.tag, type = fiber.type;
+ switch (tag) {
+ case CacheComponent:
+ return "Cache";
+ case ContextConsumer:
+ var context = type;
+ return getContextName$1(context) + ".Consumer";
+ case ContextProvider:
+ var provider = type;
+ return getContextName$1(provider._context) + ".Provider";
+ case DehydratedFragment:
+ return "DehydratedFragment";
+ case ForwardRef:
+ return getWrappedName$1(type, type.render, "ForwardRef");
+ case Fragment:
+ return "Fragment";
+ case HostComponent:
+ return type;
+ case HostPortal:
+ return "Portal";
+ case HostRoot:
+ return "Root";
+ case HostText:
+ return "Text";
+ case LazyComponent:
+ return getComponentNameFromType(type);
+ case Mode:
+ if (type === REACT_STRICT_MODE_TYPE) {
+ return "StrictMode";
+ }
+ return "Mode";
+ case OffscreenComponent:
+ return "Offscreen";
+ case Profiler:
+ return "Profiler";
+ case ScopeComponent:
+ return "Scope";
+ case SuspenseComponent:
+ return "Suspense";
+ case SuspenseListComponent:
+ return "SuspenseList";
+ case TracingMarkerComponent:
+ return "TracingMarker";
+ case ClassComponent:
+ case FunctionComponent:
+ case IncompleteClassComponent:
+ case IndeterminateComponent:
+ case MemoComponent:
+ case SimpleMemoComponent:
+ if (typeof type === "function") {
+ return type.displayName || type.name || null;
+ }
+ if (typeof type === "string") {
+ return type;
+ }
+ break;
+ }
+ return null;
+ }
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var current = null;
+ var isRendering = false;
+ function getCurrentFiberOwnerNameInDevOrNull() {
+ {
+ if (current === null) {
+ return null;
+ }
+ var owner = current._debugOwner;
+ if (owner !== null && typeof owner !== "undefined") {
+ return getComponentNameFromFiber(owner);
+ }
+ }
+ return null;
+ }
+ function getCurrentFiberStackInDev() {
+ {
+ if (current === null) {
+ return "";
+ }
+ return getStackByFiberInDevAndProd(current);
+ }
+ }
+ function resetCurrentFiber() {
+ {
+ ReactDebugCurrentFrame.getCurrentStack = null;
+ current = null;
+ isRendering = false;
+ }
+ }
+ function setCurrentFiber(fiber) {
+ {
+ ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;
+ current = fiber;
+ isRendering = false;
+ }
+ }
+ function getCurrentFiber() {
+ {
+ return current;
+ }
+ }
+ function setIsRendering(rendering) {
+ {
+ isRendering = rendering;
+ }
+ }
+ function toString(value) {
+ return "" + value;
+ }
+ function getToStringValue(value) {
+ switch (typeof value) {
+ case "boolean":
+ case "number":
+ case "string":
+ case "undefined":
+ return value;
+ case "object":
+ {
+ checkFormFieldValueStringCoercion(value);
+ }
+ return value;
+ default:
+ return "";
+ }
+ }
+ var hasReadOnlyValue = {
+ button: true,
+ checkbox: true,
+ image: true,
+ hidden: true,
+ radio: true,
+ reset: true,
+ submit: true
+ };
+ function checkControlledValueProps(tagName, props) {
+ {
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
+ error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");
+ }
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
+ error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
+ }
+ }
+ }
+ function isCheckable(elem) {
+ var type = elem.type;
+ var nodeName = elem.nodeName;
+ return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio");
+ }
+ function getTracker(node) {
+ return node._valueTracker;
+ }
+ function detachTracker(node) {
+ node._valueTracker = null;
+ }
+ function getValueFromNode(node) {
+ var value = "";
+ if (!node) {
+ return value;
+ }
+ if (isCheckable(node)) {
+ value = node.checked ? "true" : "false";
+ } else {
+ value = node.value;
+ }
+ return value;
+ }
+ function trackValueOnNode(node) {
+ var valueField = isCheckable(node) ? "checked" : "value";
+ var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
+ {
+ checkFormFieldValueStringCoercion(node[valueField]);
+ }
+ var currentValue = "" + node[valueField];
+ if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") {
+ return;
+ }
+ var get2 = descriptor.get, set2 = descriptor.set;
+ Object.defineProperty(node, valueField, {
+ configurable: true,
+ get: function() {
+ return get2.call(this);
+ },
+ set: function(value) {
+ {
+ checkFormFieldValueStringCoercion(value);
+ }
+ currentValue = "" + value;
+ set2.call(this, value);
+ }
+ });
+ Object.defineProperty(node, valueField, {
+ enumerable: descriptor.enumerable
+ });
+ var tracker = {
+ getValue: function() {
+ return currentValue;
+ },
+ setValue: function(value) {
+ {
+ checkFormFieldValueStringCoercion(value);
+ }
+ currentValue = "" + value;
+ },
+ stopTracking: function() {
+ detachTracker(node);
+ delete node[valueField];
+ }
+ };
+ return tracker;
+ }
+ function track(node) {
+ if (getTracker(node)) {
+ return;
+ }
+ node._valueTracker = trackValueOnNode(node);
+ }
+ function updateValueIfChanged(node) {
+ if (!node) {
+ return false;
+ }
+ var tracker = getTracker(node);
+ if (!tracker) {
+ return true;
+ }
+ var lastValue = tracker.getValue();
+ var nextValue = getValueFromNode(node);
+ if (nextValue !== lastValue) {
+ tracker.setValue(nextValue);
+ return true;
+ }
+ return false;
+ }
+ function getActiveElement(doc) {
+ doc = doc || (typeof document !== "undefined" ? document : void 0);
+ if (typeof doc === "undefined") {
+ return null;
+ }
+ try {
+ return doc.activeElement || doc.body;
+ } catch (e2) {
+ return doc.body;
+ }
+ }
+ var didWarnValueDefaultValue = false;
+ var didWarnCheckedDefaultChecked = false;
+ var didWarnControlledToUncontrolled = false;
+ var didWarnUncontrolledToControlled = false;
+ function isControlled(props) {
+ var usesChecked = props.type === "checkbox" || props.type === "radio";
+ return usesChecked ? props.checked != null : props.value != null;
+ }
+ function getHostProps(element, props) {
+ var node = element;
+ var checked = props.checked;
+ var hostProps = assign({}, props, {
+ defaultChecked: void 0,
+ defaultValue: void 0,
+ value: void 0,
+ checked: checked != null ? checked : node._wrapperState.initialChecked
+ });
+ return hostProps;
+ }
+ function initWrapperState(element, props) {
+ {
+ checkControlledValueProps("input", props);
+ if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) {
+ error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type);
+ didWarnCheckedDefaultChecked = true;
+ }
+ if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) {
+ error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type);
+ didWarnValueDefaultValue = true;
+ }
+ }
+ var node = element;
+ var defaultValue = props.defaultValue == null ? "" : props.defaultValue;
+ node._wrapperState = {
+ initialChecked: props.checked != null ? props.checked : props.defaultChecked,
+ initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
+ controlled: isControlled(props)
+ };
+ }
+ function updateChecked(element, props) {
+ var node = element;
+ var checked = props.checked;
+ if (checked != null) {
+ setValueForProperty(node, "checked", checked, false);
+ }
+ }
+ function updateWrapper(element, props) {
+ var node = element;
+ {
+ var controlled = isControlled(props);
+ if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
+ error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components");
+ didWarnUncontrolledToControlled = true;
+ }
+ if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
+ error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components");
+ didWarnControlledToUncontrolled = true;
+ }
+ }
+ updateChecked(element, props);
+ var value = getToStringValue(props.value);
+ var type = props.type;
+ if (value != null) {
+ if (type === "number") {
+ if (value === 0 && node.value === "" || node.value != value) {
+ node.value = toString(value);
+ }
+ } else if (node.value !== toString(value)) {
+ node.value = toString(value);
+ }
+ } else if (type === "submit" || type === "reset") {
+ node.removeAttribute("value");
+ return;
+ }
+ {
+ if (props.hasOwnProperty("value")) {
+ setDefaultValue(node, props.type, value);
+ } else if (props.hasOwnProperty("defaultValue")) {
+ setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
+ }
+ }
+ {
+ if (props.checked == null && props.defaultChecked != null) {
+ node.defaultChecked = !!props.defaultChecked;
+ }
+ }
+ }
+ function postMountWrapper(element, props, isHydrating2) {
+ var node = element;
+ if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) {
+ var type = props.type;
+ var isButton = type === "submit" || type === "reset";
+ if (isButton && (props.value === void 0 || props.value === null)) {
+ return;
+ }
+ var initialValue = toString(node._wrapperState.initialValue);
+ if (!isHydrating2) {
+ {
+ if (initialValue !== node.value) {
+ node.value = initialValue;
+ }
+ }
+ }
+ {
+ node.defaultValue = initialValue;
+ }
+ }
+ var name = node.name;
+ if (name !== "") {
+ node.name = "";
+ }
+ {
+ node.defaultChecked = !node.defaultChecked;
+ node.defaultChecked = !!node._wrapperState.initialChecked;
+ }
+ if (name !== "") {
+ node.name = name;
+ }
+ }
+ function restoreControlledState(element, props) {
+ var node = element;
+ updateWrapper(node, props);
+ updateNamedCousins(node, props);
+ }
+ function updateNamedCousins(rootNode, props) {
+ var name = props.name;
+ if (props.type === "radio" && name != null) {
+ var queryRoot = rootNode;
+ while (queryRoot.parentNode) {
+ queryRoot = queryRoot.parentNode;
+ }
+ {
+ checkAttributeStringCoercion(name, "name");
+ }
+ var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]');
+ for (var i2 = 0; i2 < group.length; i2++) {
+ var otherNode = group[i2];
+ if (otherNode === rootNode || otherNode.form !== rootNode.form) {
+ continue;
+ }
+ var otherProps = getFiberCurrentPropsFromNode(otherNode);
+ if (!otherProps) {
+ throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");
+ }
+ updateValueIfChanged(otherNode);
+ updateWrapper(otherNode, otherProps);
+ }
+ }
+ }
+ function setDefaultValue(node, type, value) {
+ if (type !== "number" || getActiveElement(node.ownerDocument) !== node) {
+ if (value == null) {
+ node.defaultValue = toString(node._wrapperState.initialValue);
+ } else if (node.defaultValue !== toString(value)) {
+ node.defaultValue = toString(value);
+ }
+ }
+ }
+ var didWarnSelectedSetOnOption = false;
+ var didWarnInvalidChild = false;
+ var didWarnInvalidInnerHTML = false;
+ function validateProps(element, props) {
+ {
+ if (props.value == null) {
+ if (typeof props.children === "object" && props.children !== null) {
+ React9.Children.forEach(props.children, function(child) {
+ if (child == null) {
+ return;
+ }
+ if (typeof child === "string" || typeof child === "number") {
+ return;
+ }
+ if (!didWarnInvalidChild) {
+ didWarnInvalidChild = true;
+ error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to .");
+ }
+ });
+ } else if (props.dangerouslySetInnerHTML != null) {
+ if (!didWarnInvalidInnerHTML) {
+ didWarnInvalidInnerHTML = true;
+ error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.");
+ }
+ }
+ }
+ if (props.selected != null && !didWarnSelectedSetOnOption) {
+ error("Use the `defaultValue` or `value` props on instead of setting `selected` on .");
+ didWarnSelectedSetOnOption = true;
+ }
+ }
+ }
+ function postMountWrapper$1(element, props) {
+ if (props.value != null) {
+ element.setAttribute("value", toString(getToStringValue(props.value)));
+ }
+ }
+ var isArrayImpl = Array.isArray;
+ function isArray(a2) {
+ return isArrayImpl(a2);
+ }
+ var didWarnValueDefaultValue$1;
+ {
+ didWarnValueDefaultValue$1 = false;
+ }
+ function getDeclarationErrorAddendum() {
+ var ownerName = getCurrentFiberOwnerNameInDevOrNull();
+ if (ownerName) {
+ return "\n\nCheck the render method of `" + ownerName + "`.";
+ }
+ return "";
+ }
+ var valuePropNames = ["value", "defaultValue"];
+ function checkSelectPropTypes(props) {
+ {
+ checkControlledValueProps("select", props);
+ for (var i2 = 0; i2 < valuePropNames.length; i2++) {
+ var propName = valuePropNames[i2];
+ if (props[propName] == null) {
+ continue;
+ }
+ var propNameIsArray = isArray(props[propName]);
+ if (props.multiple && !propNameIsArray) {
+ error("The `%s` prop supplied to must be an array if `multiple` is true.%s", propName, getDeclarationErrorAddendum());
+ } else if (!props.multiple && propNameIsArray) {
+ error("The `%s` prop supplied to must be a scalar value if `multiple` is false.%s", propName, getDeclarationErrorAddendum());
+ }
+ }
+ }
+ }
+ function updateOptions(node, multiple, propValue, setDefaultSelected) {
+ var options2 = node.options;
+ if (multiple) {
+ var selectedValues = propValue;
+ var selectedValue = {};
+ for (var i2 = 0; i2 < selectedValues.length; i2++) {
+ selectedValue["$" + selectedValues[i2]] = true;
+ }
+ for (var _i = 0; _i < options2.length; _i++) {
+ var selected = selectedValue.hasOwnProperty("$" + options2[_i].value);
+ if (options2[_i].selected !== selected) {
+ options2[_i].selected = selected;
+ }
+ if (selected && setDefaultSelected) {
+ options2[_i].defaultSelected = true;
+ }
+ }
+ } else {
+ var _selectedValue = toString(getToStringValue(propValue));
+ var defaultSelected = null;
+ for (var _i2 = 0; _i2 < options2.length; _i2++) {
+ if (options2[_i2].value === _selectedValue) {
+ options2[_i2].selected = true;
+ if (setDefaultSelected) {
+ options2[_i2].defaultSelected = true;
+ }
+ return;
+ }
+ if (defaultSelected === null && !options2[_i2].disabled) {
+ defaultSelected = options2[_i2];
+ }
+ }
+ if (defaultSelected !== null) {
+ defaultSelected.selected = true;
+ }
+ }
+ }
+ function getHostProps$1(element, props) {
+ return assign({}, props, {
+ value: void 0
+ });
+ }
+ function initWrapperState$1(element, props) {
+ var node = element;
+ {
+ checkSelectPropTypes(props);
+ }
+ node._wrapperState = {
+ wasMultiple: !!props.multiple
+ };
+ {
+ if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue$1) {
+ error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components");
+ didWarnValueDefaultValue$1 = true;
+ }
+ }
+ }
+ function postMountWrapper$2(element, props) {
+ var node = element;
+ node.multiple = !!props.multiple;
+ var value = props.value;
+ if (value != null) {
+ updateOptions(node, !!props.multiple, value, false);
+ } else if (props.defaultValue != null) {
+ updateOptions(node, !!props.multiple, props.defaultValue, true);
+ }
+ }
+ function postUpdateWrapper(element, props) {
+ var node = element;
+ var wasMultiple = node._wrapperState.wasMultiple;
+ node._wrapperState.wasMultiple = !!props.multiple;
+ var value = props.value;
+ if (value != null) {
+ updateOptions(node, !!props.multiple, value, false);
+ } else if (wasMultiple !== !!props.multiple) {
+ if (props.defaultValue != null) {
+ updateOptions(node, !!props.multiple, props.defaultValue, true);
+ } else {
+ updateOptions(node, !!props.multiple, props.multiple ? [] : "", false);
+ }
+ }
+ }
+ function restoreControlledState$1(element, props) {
+ var node = element;
+ var value = props.value;
+ if (value != null) {
+ updateOptions(node, !!props.multiple, value, false);
+ }
+ }
+ var didWarnValDefaultVal = false;
+ function getHostProps$2(element, props) {
+ var node = element;
+ if (props.dangerouslySetInnerHTML != null) {
+ throw new Error("`dangerouslySetInnerHTML` does not make sense on