nodality 1.0.0-beta.7 → 1.0.0-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/animator.cjs.js +2 -1
- package/dist/animator.cjs.js.LICENSE.txt +5 -0
- package/dist/animator.esm.js +2 -1
- package/dist/animator.esm.js.LICENSE.txt +5 -0
- package/dist/appleanim.cjs.js +2 -0
- package/dist/appleanim.cjs.js.LICENSE.txt +5 -0
- package/dist/appleanim.esm.js +2 -0
- package/dist/appleanim.esm.js.LICENSE.txt +5 -0
- package/dist/audionew.cjs.js +2 -1
- package/dist/audionew.cjs.js.LICENSE.txt +5 -0
- package/dist/audionew.esm.js +2 -1
- package/dist/audionew.esm.js.LICENSE.txt +5 -0
- package/dist/base.cjs.js +2 -1
- package/dist/base.cjs.js.LICENSE.txt +5 -0
- package/dist/base.esm.js +2 -1
- package/dist/base.esm.js.LICENSE.txt +5 -0
- package/dist/betaDesktopBar.esm.js +2 -1
- package/dist/betaDesktopBar.esm.js.LICENSE.txt +5 -0
- package/dist/betaMobileBar.esm.js +2 -1
- package/dist/betaMobileBar.esm.js.LICENSE.txt +5 -0
- package/dist/bundle.umd.js +2 -1
- package/dist/bundle.umd.js.LICENSE.txt +5 -0
- package/dist/button.cjs.js +2 -1
- package/dist/button.cjs.js.LICENSE.txt +5 -0
- package/dist/button.esm.js +2 -1
- package/dist/button.esm.js.LICENSE.txt +5 -0
- package/dist/cardGetter.cjs.js +2 -1
- package/dist/cardGetter.cjs.js.LICENSE.txt +5 -0
- package/dist/cardGetter.esm.js +2 -1
- package/dist/cardGetter.esm.js.LICENSE.txt +5 -0
- package/dist/center.cjs.js +2 -1
- package/dist/center.cjs.js.LICENSE.txt +5 -0
- package/dist/center.esm.js +2 -1
- package/dist/center.esm.js.LICENSE.txt +5 -0
- package/dist/checkbox.cjs.js +2 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +5 -0
- package/dist/checkbox.esm.js +2 -1
- package/dist/checkbox.esm.js.LICENSE.txt +5 -0
- package/dist/code.cjs.js +2 -1
- package/dist/code.cjs.js.LICENSE.txt +5 -0
- package/dist/code.esm.js +2 -1
- package/dist/code.esm.js.LICENSE.txt +5 -0
- package/dist/container.cjs.js +2 -1
- package/dist/container.cjs.js.LICENSE.txt +5 -0
- package/dist/container.esm.js +2 -1
- package/dist/container.esm.js.LICENSE.txt +5 -0
- package/dist/datalist.cjs.js +2 -1
- package/dist/datalist.cjs.js.LICENSE.txt +5 -0
- package/dist/datalist.esm.js +2 -1
- package/dist/datalist.esm.js.LICENSE.txt +5 -0
- package/dist/designer.cjs.js +2 -1
- package/dist/designer.cjs.js.LICENSE.txt +5 -0
- package/dist/designer.esm.js +2 -1
- package/dist/designer.esm.js.LICENSE.txt +5 -0
- package/dist/dropdown.cjs.js +2 -1
- package/dist/dropdown.cjs.js.LICENSE.txt +5 -0
- package/dist/dropdown.esm.js +2 -1
- package/dist/dropdown.esm.js.LICENSE.txt +5 -0
- package/dist/elementMapper.cjs.js +2 -1
- package/dist/elementMapper.cjs.js.LICENSE.txt +5 -0
- package/dist/elementMapper.esm.js +2 -1
- package/dist/elementMapper.esm.js.LICENSE.txt +5 -0
- package/dist/finalresult.esm.js +2 -1
- package/dist/finalresult.esm.js.LICENSE.txt +5 -0
- package/dist/flexCard.cjs.js +2 -1
- package/dist/flexCard.cjs.js.LICENSE.txt +5 -0
- package/dist/flexCard.esm.js +2 -1
- package/dist/flexCard.esm.js.LICENSE.txt +5 -0
- package/dist/flexGrid.cjs.js +2 -1
- package/dist/flexGrid.cjs.js.LICENSE.txt +5 -0
- package/dist/flexGrid.esm.js +2 -1
- package/dist/flexGrid.esm.js.LICENSE.txt +5 -0
- package/dist/flexRow.cjs.js +2 -1
- package/dist/flexRow.cjs.js.LICENSE.txt +5 -0
- package/dist/flexRow.esm.js +2 -1
- package/dist/flexRow.esm.js.LICENSE.txt +5 -0
- package/dist/floatingInput.cjs.js +2 -1
- package/dist/floatingInput.cjs.js.LICENSE.txt +5 -0
- package/dist/floatingInput.esm.js +2 -1
- package/dist/floatingInput.esm.js.LICENSE.txt +5 -0
- package/dist/free.cjs.js +2 -1
- package/dist/free.cjs.js.LICENSE.txt +5 -0
- package/dist/free.esm.js +2 -1
- package/dist/free.esm.js.LICENSE.txt +5 -0
- package/dist/horizontalScroller.esm.js +2 -1
- package/dist/horizontalScroller.esm.js.LICENSE.txt +5 -0
- package/dist/image.cjs.js +2 -1
- package/dist/image.cjs.js.LICENSE.txt +5 -0
- package/dist/image.esm.js +2 -1
- package/dist/image.esm.js.LICENSE.txt +5 -0
- package/dist/imagePicker.cjs.js +2 -1
- package/dist/imagePicker.cjs.js.LICENSE.txt +5 -0
- package/dist/imagePicker.esm.js +2 -1
- package/dist/imagePicker.esm.js.LICENSE.txt +5 -0
- package/dist/index.cjs.js +2 -1
- package/dist/index.cjs.js.LICENSE.txt +5 -0
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.LICENSE.txt +5 -0
- package/dist/link.cjs.js +2 -1
- package/dist/link.cjs.js.LICENSE.txt +5 -0
- package/dist/link.esm.js +2 -1
- package/dist/link.esm.js.LICENSE.txt +5 -0
- package/dist/linkGetter.cjs.js +2 -1
- package/dist/linkGetter.cjs.js.LICENSE.txt +5 -0
- package/dist/linkGetter.esm.js +2 -1
- package/dist/linkGetter.esm.js.LICENSE.txt +5 -0
- package/dist/metaAdder.cjs.js +2 -1
- package/dist/metaAdder.cjs.js.LICENSE.txt +5 -0
- package/dist/metaAdder.esm.js +2 -1
- package/dist/metaAdder.esm.js.LICENSE.txt +5 -0
- package/dist/modal2025.cjs.js +2 -1
- package/dist/modal2025.cjs.js.LICENSE.txt +5 -0
- package/dist/modal2025.esm.js +2 -1
- package/dist/modal2025.esm.js.LICENSE.txt +5 -0
- package/dist/multiswitchers.esm.js +2 -1
- package/dist/multiswitchers.esm.js.LICENSE.txt +5 -0
- package/dist/newNavBar.cjs.js +2 -1
- package/dist/newNavBar.cjs.js.LICENSE.txt +5 -0
- package/dist/newNavBar.esm.js +2 -1
- package/dist/newNavBar.esm.js.LICENSE.txt +5 -0
- package/dist/picker.cjs.js +2 -1
- package/dist/picker.cjs.js.LICENSE.txt +5 -0
- package/dist/picker.esm.js +2 -1
- package/dist/picker.esm.js.LICENSE.txt +5 -0
- package/dist/progress.cjs.js +2 -1
- package/dist/progress.cjs.js.LICENSE.txt +5 -0
- package/dist/progress.esm.js +2 -1
- package/dist/progress.esm.js.LICENSE.txt +5 -0
- package/dist/radio.cjs.js +2 -1
- package/dist/radio.cjs.js.LICENSE.txt +5 -0
- package/dist/radio.esm.js +2 -1
- package/dist/radio.esm.js.LICENSE.txt +5 -0
- package/dist/range.cjs.js +2 -1
- package/dist/range.cjs.js.LICENSE.txt +5 -0
- package/dist/range.esm.js +2 -1
- package/dist/range.esm.js.LICENSE.txt +5 -0
- package/dist/scrollvideo.cjs.js +2 -0
- package/dist/scrollvideo.cjs.js.LICENSE.txt +5 -0
- package/dist/scrollvideo.esm.js +2 -0
- package/dist/scrollvideo.esm.js.LICENSE.txt +5 -0
- package/dist/sideBar.cjs.js +2 -1
- package/dist/sideBar.cjs.js.LICENSE.txt +5 -0
- package/dist/sideBar.esm.js +2 -1
- package/dist/sideBar.esm.js.LICENSE.txt +5 -0
- package/dist/sideNavBar.cjs.js +2 -1
- package/dist/sideNavBar.cjs.js.LICENSE.txt +5 -0
- package/dist/sideNavBar.esm.js +2 -1
- package/dist/sideNavBar.esm.js.LICENSE.txt +5 -0
- package/dist/simpleBar.cjs.js +2 -1
- package/dist/simpleBar.cjs.js.LICENSE.txt +5 -0
- package/dist/simpleBar.esm.js +2 -1
- package/dist/simpleBar.esm.js.LICENSE.txt +5 -0
- package/dist/stack.cjs.js +2 -1
- package/dist/stack.cjs.js.LICENSE.txt +5 -0
- package/dist/stack.esm.js +2 -1
- package/dist/stack.esm.js.LICENSE.txt +5 -0
- package/dist/stacker.cjs.js +2 -0
- package/dist/stacker.cjs.js.LICENSE.txt +5 -0
- package/dist/stacker.esm.js +2 -0
- package/dist/stacker.esm.js.LICENSE.txt +5 -0
- package/dist/table.cjs.js +2 -1
- package/dist/table.cjs.js.LICENSE.txt +5 -0
- package/dist/table.esm.js +2 -1
- package/dist/table.esm.js.LICENSE.txt +5 -0
- package/dist/text.cjs.js +2 -1
- package/dist/text.cjs.js.LICENSE.txt +5 -0
- package/dist/text.esm.js +2 -1
- package/dist/text.esm.js.LICENSE.txt +5 -0
- package/dist/textField.cjs.js +2 -1
- package/dist/textField.cjs.js.LICENSE.txt +5 -0
- package/dist/textField.esm.js +2 -1
- package/dist/textField.esm.js.LICENSE.txt +5 -0
- package/dist/transformanim.cjs.js +2 -0
- package/dist/transformanim.cjs.js.LICENSE.txt +5 -0
- package/dist/transformanim.esm.js +2 -0
- package/dist/transformanim.esm.js.LICENSE.txt +5 -0
- package/dist/wrap.cjs.js +2 -1
- package/dist/wrap.cjs.js.LICENSE.txt +5 -0
- package/dist/wrap.esm.js +2 -1
- package/dist/wrap.esm.js.LICENSE.txt +5 -0
- package/dist/zoomCard.cjs.js +2 -1
- package/dist/zoomCard.cjs.js.LICENSE.txt +5 -0
- package/dist/zoomCard.esm.js +2 -1
- package/dist/zoomCard.esm.js.LICENSE.txt +5 -0
- package/layout/DEPRECATED-PARAGRAPH.js +6 -0
- package/layout/animator.js +5 -2
- package/layout/audio.js +6 -0
- package/layout/audionew.js +6 -0
- package/layout/base-2.js +6 -0
- package/layout/base.js +6 -0
- package/layout/betaDesktopBar.js +6 -0
- package/layout/betaMobileBar.js +6 -0
- package/layout/box.js +6 -0
- package/layout/button.js +6 -0
- package/layout/cards.js +6 -0
- package/layout/center.js +6 -0
- package/layout/checkbox.js +6 -0
- package/layout/cleanRow.js +6 -0
- package/layout/code.js +6 -0
- package/layout/container.js +6 -0
- package/layout/custom.js +6 -0
- package/layout/divImage.js +6 -0
- package/layout/dropdown.js +6 -0
- package/layout/dropdown2025.js +6 -0
- package/layout/emptyElement.js +6 -0
- package/layout/externalStylesheet.js +6 -0
- package/layout/flexCard.js +6 -0
- package/layout/flexGrid.js +6 -0
- package/layout/flexrow.js +6 -0
- package/layout/footer.js +6 -0
- package/layout/formComponents/custom.js +6 -0
- package/layout/formComponents/dataList.js +6 -0
- package/layout/formComponents/floatingInput.js +5 -0
- package/layout/formComponents/form-all.js +6 -0
- package/layout/formComponents/form.js +5 -0
- package/layout/formComponents/imagePicker.js +6 -0
- package/layout/formComponents/picker.js +6 -0
- package/layout/formComponents/radio.js +6 -0
- package/layout/formComponents/radiogroup.js +6 -0
- package/layout/formComponents/range.js +6 -0
- package/layout/free.js +6 -0
- package/layout/grid-new.js +6 -0
- package/layout/grid.js +6 -0
- package/layout/gridSwitcher.js +6 -0
- package/layout/group.js +6 -0
- package/layout/header.js +6 -0
- package/layout/horizontalScroller.js +6 -0
- package/layout/image-old.js +6 -0
- package/layout/image.js +6 -0
- package/layout/index.js +22 -0
- package/layout/label.js +6 -0
- package/layout/link.js +6 -0
- package/layout/list-OLD.js +6 -0
- package/layout/list.js +6 -0
- package/layout/metaAdder.js +6 -0
- package/layout/modal2025.js +6 -0
- package/layout/modernwrap.js +6 -0
- package/layout/multiswitcher.js +6 -0
- package/layout/multiswitcherBeta.js +6 -0
- package/layout/navBar-OLD.js +6 -0
- package/layout/navBar.js +6 -0
- package/layout/navFactor/customDiv.js +5 -1
- package/layout/newFlatAdder.js +6 -0
- package/layout/newNavBar copy 2.js +6 -0
- package/layout/newNavBar copy.js +6 -0
- package/layout/newNavBar.js +6 -0
- package/layout/offsetContainer.js +6 -0
- package/layout/progress.js +6 -0
- package/layout/row.js +6 -0
- package/layout/savedNewNavBar.js +6 -0
- package/layout/scrollvideo.js +6 -0
- package/layout/sideBar.js +6 -0
- package/layout/sideNavBar.js +6 -0
- package/layout/simpleBar.js +6 -0
- package/layout/slider2025.js +6 -0
- package/layout/spacer.js +6 -0
- package/layout/stack.js +6 -0
- package/layout/styler.js +6 -0
- package/layout/switcher.js +6 -0
- package/layout/table.js +6 -0
- package/layout/text.js +9 -1
- package/layout/textField.js +6 -0
- package/layout/ulist.js +6 -0
- package/layout/video.js +6 -0
- package/layout/withoutNew.js +6 -0
- package/layout/wrap.js +6 -0
- package/layout/zoomCard.js +6 -0
- package/lib/AppleAnim.js +794 -0
- package/lib/Stacker.js +40 -0
- package/lib/TransformAnim.js +517 -0
- package/lib/cardGetter.js +6 -0
- package/lib/designer.js +217 -14
- package/lib/elementMapper.js +15 -8
- package/lib/linkGetter.js +6 -0
- package/lib/scrollvideo.js +129 -0
- package/package.json +23 -4
package/dist/button.cjs.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Button:()=>i});class s{constructor(){this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}}keySet(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}onScroll(t){"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform=`scale(${t.valMax})`),window.addEventListener("scroll",(()=>{let e=this.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?this.res.style.opacity=e:"scale"===t.value&&(this.res.style.transform=`scale(${e})`)}))}setAny(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}setID(t){this.id=t}setPrevText(t){this.prevText=t}getCSS(){return this.css}getPX(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}respad(t){const e=()=>{this.pad(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(min-width: ${this.getPX(s)}`).matches&&this.pad(t[e].values)}};window.addEventListener("resize",e),e()}resmar(t){const e=()=>{this.mar(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(max-width: ${this.getPX(s)}`).matches&&this.mar(t[e].values)}};window.addEventListener("resize",e),e()}resprop(t){this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;const e=()=>{this.res.style.background=this.prevBackground,this.res.style.width=this.prevWidth,this.res.style.height=this.prevHeight,this.res.style.border=this.prevBorder;for(let e=0;e<t.length;e++){let s=t[e].breakpoint;if(window.matchMedia(`(max-width: ${this.getPX(s)}`).matches){const s={};for(const i in t[e])"breakpoint"!==i&&(s[i]=t[e][i]);this.set(s)}}};window.addEventListener("resize",e),e()}isNumber(t){return"number"==typeof t&&!isNaN(t)}pad(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++)switch(r[t]){case"a":this.res.style.padding=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.paddingTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.paddingLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.paddingRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.paddingBottom=this.isNumber(a)?`${a}px`:a}}}return this}as(t){return this.res.style.alignSelf=t,this}mar(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++){switch(r[t]){case"a":this.res.style.margin=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.marginTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.marginLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.marginRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.marginBottom=this.isNumber(a)?`${a}px`:a}"auto"===r[t]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}}}return this}smartRange(t,e,s){t<e.min&&(t=e.min),t>e.max&&(t=e.max);let i=(t-e.min)/(e.max-e.min);e.min>e.max&&(i=(t-e.max)/(e.min-e.max));let r=(s.min-s.max)*i-s.min;if(r=Math.abs(r),s.min<s.max){let t=(s.max+Math.abs(s.min))*i;r=s.min+t}return r}gpos(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}fluidCopy(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}setIndex(t){this.index=t}borderObj(t){let e=t.type??"solid";return this.res.style.border=`${t.width} ${e} ${t.color}`,this.res.style.borderRadius=t.radius,this}protoReact(t,e){t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,o=parseInt(t),l=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=o&&s<=l&&h&&("gradient"===a.log&&(i+="gradient"),"blast"===a.log&&(i+="blast"),"animation"===a.log&&(i+="animation"),"shadow"===a.log&&(i+="shadow"),"span"===a.log&&(i+="span"),"filter"===a.log&&(i+="filter"),"background"===a.log&&(i+="background"))}this.res.style.margin="";let a=this.res.style.color;for(t.map((t=>t.log)).filter((t=>null!=t)).includes("gradient")&&(this.res.style.WebkitBackgroundClip="",this.res.style.background=""),this.res.style["-webkit-text-stroke"]="",this.res.style.filter="",this.res.style.textShadow="",this.res.style.border="";this.res.firstChild;)this.res.removeChild(this.res.firstChild);if(this.res.textContent=this.text,""===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.color=a),"blast"===i){for(r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}for(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]=this.globalBlast,r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}}if("gradient"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.border="1px solid orange"),"background"===i&&(this.res.style.background="orange"),"gradientblast"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke"]=this.globalBlast),"gradientanimation"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.textShadow=this.globalShadow),"animationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"shadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"span"===i&&this.options.span){let t;for(t=Array.isArray(this.options.span)?this.options.span.filter((t=>"span"===t.op.name))[0]:this.options.span,this.res.textContent="",r=0;r<t.op.parts.length;r++){let e=t.op.parts[r].style,s=new Text(t.op.parts[r].text).setup({type:"span"}).set(e).render();this.res.appendChild(s)}}if("filter"===i){let t=this.options.filtera.op.filter;this.res.style.filter=t,this.res.style.border="8px solid orange"}};window.addEventListener("resize",s),s()}setPref(t){this.preffersId=t}setClass(t){this.class=t}betaReact(t,e){this.ap=!1,this.cta=0,this.once=!1,t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,o=parseInt(t),l=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=o&&s<=l&&h&&("blast"===a.log&&(i+="blast"),"shadow"===a.log&&(i+="shadow"),"background"===a.log&&(i+="background"),"gradient"===a.log&&(i+="gradient"),"spana"===a.log&&(i+="spana"),"layout"===a.log&&(i+="layout"),"margin"===a.log&&(i+="margin"),a.op&&a.op.margin&&(this.useMargin=a.op.margin))}if(this.res.style.background="",this.res.style.backgroundColor="",this.res.style.textShadow="",this.res.style.border="",this.res.style.margin="",this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke"]="",this.res.style["-webkit-text-stroke-width"]="","background"===i&&(this.res.style.backgroundColor="green"),"margin"===i)for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if("blastbackgroundmargin"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green","FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green",this.useMargin?this.res.style.margin="1rem":this.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===i&&(this.res.style.alignSelf="start",this.res.style.border="1px solid purple"),"blast"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===i&&(this.res.style.border="1px solid yellow",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===i&&(this.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.textContent=this.text)),"shadow"===i&&("FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",this.res.textContent=this.text))};window.addEventListener("resize",s),s()}cssGen(t,e,s,i){return this.css=[""],[""]}chainReact(t,e,s){this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;for(let e of t)e.range||(e.range=["0px","999999px"]);t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const i=()=>{const i=window.visualViewport.width;let r=[],a=[];this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const s of t){this.counterIndex++;const[t,o]=s.range,l=parseInt(t),h=parseInt(o);let d=!0;if(s.target){d=!1;for(var n=0;n<s.target.length;n++)s.target[n]===e&&(d=!0)}i>=l&&i<=h&&d&&(r.push(s.log),a.push(s),s.op&&s.op.margin&&(this.useMargin=s.op.margin))}if(s&&!s.includes("background")&&(this.res.style.background="",this.res.style.backgroundColor=""),this.res.style.textShadow="",s&&!s.includes("border")&&(this.res.style.border=""),s&&!s.includes("margin")&&(this.res.style.margin=""),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke-color"]="",this.res.style["-webkit-text-stroke-width"]="",this.res.style.filter="",(r.includes("gradient")||r.includes("shadow"))&&(this.res.style.position="relative",this.res.style.zIndex=-1),r.includes("blast")){let t=a.filter((t=>"blast"===t.log))[0].op.color,e=a.filter((t=>"blast"===t.log))[0].op.width??"1px";"FlexRowLayoutElement"===this.getType()?this.res.style.border=`${e}px solid orange`:(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]=t,this.res.style["-webkit-text-stroke-width"]=`${e}`)}if(r.includes("filter")){let t=a.filter((t=>"filter"===t.log))[0].op.filter;this.res.style.filter=t}if(r.includes("background")&&(this.res.style.backgroundColor="green"),r.includes("gradient")&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["background-clip"]="text"),r.includes("shadow"))if("FlexRowLayoutElement"===this.getType());else{let t="",e=0;for(n=0;n<this.options.shadow.op.steps;n++)e+=3,t+=`drop-shadow(${e}px ${e}px ${e}px gray) `;this.res.style.filter=t}if(r.includes("margin"))for(n=0;n<t.length;n++){if(!t[n].op)continue;const e=t[n].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if(r.includes("animation")){if(this.options.animation&&!this.hasAnimated&&!this.options.animation.op.fireAt){this.hasAnimated=!0;let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),this.res.animate(t.keyframesOpen,t.openOptions)}if(this.options.animation&&this.options.animation.op.fireAt&&this.options.animation.op.fireAt.endsWith("px")){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"});const e=()=>{window.scrollY>parseFloat(t.fireAt)&&(this.res.animate(t.keyframesOpen,t.openOptions),window.removeEventListener("scroll",e))};window.addEventListener("scroll",e)}if(this.options.animation&&this.options.animation.op.fireAt&&"inview"===this.options.animation.op.fireAt){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver(((e,s)=>{e.forEach((e=>{e.isIntersecting&&(this.res.animate(t.keyframesOpen,t.openOptions),s.disconnect())}))})).observe(this.res)}}};window.addEventListener("resize",i),i()}reactOnTransform=t=>{if(t.transform||t.op&&t.op.transform){let e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),this.setDefault=(t,e="0px")=>0===t.length?e+" ":t;const s=t=>{const e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;const s=e[1].split(",").map((t=>t.trim()));return 1===s.length?`rotate(${s[0]})`:2===s.length?`rotateX(${s[0]}) rotateY(${s[1]})`:3===s.length?`rotateX(${s[0]}) rotateY(${s[1]}) rotate(${s[2]})`:t},i=()=>{let i="",r="",a="",n="",o="",l="",h="",d="",c="";if(0===e.values.length)return;e.values.forEach((t=>{t.startsWith("tx:")&&(i=t.replace("tx:","")),t.startsWith("ty:")&&(r=t.replace("ty:","")),t.startsWith("tz:")?a=t.replace("tz:",""):t.startsWith("scale(")?n=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=s(t):t.startsWith("perspective(")?h=t:t.startsWith("matrix(")?d=t:t.startsWith("opacity:")&&(c=t.replace("opacity:",""))})),i=this.setDefault(i),r=this.setDefault(r),a=this.setDefault(a);let p="";if("0px"!=r&&"0px"!=i&&"0px"!=a?p+=`translate3d(${i}, ${r}, ${a})`:"0px"==r&&"0px"==i||(p+=`translate(${i}, ${r})`),n&&(p+=` ${n}`),l&&(p+=` ${l}`),o&&(p+=` ${o}`),h&&(p+=` ${h}`),d&&(p+=` ${d}`),p){if(t.op.transform.duration){let e=t.op.transform.duration.replace(/^(\d+)(s)-/,((t,e,s)=>e/2+s+" ")),s=`transform ${e}, opacity ${e}`;this.res.style.transition=s}else this.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";this.res.style.transform=p,this.res.style.opacity=c}};e.on?this.res.addEventListener(e.on,(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()})):window.addEventListener("load",(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()}));const r=()=>{let t="";e.values.forEach((e=>{e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),this.res.style.opacity="1"})),t&&(this.res.style.transform=t.trim())};if(e.on)this.res.addEventListener("mouseout",(()=>{e.keep||r()}));else{let t=1e3*parseFloat(e.duration),s=e.closeAfter?e.closeAfter:0;setTimeout((()=>{e.keep||r()}),t/2+s)}}};maxWidth(t){return this.res.style.maxWidth=t,this}removeQuotesFromFirstWord(t){return t.replace(/"([^"]+)":/g,"$1:")}arrayMargin(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}navBarExpand(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}scrollFade(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}expand(t){return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(()=>{this.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}move(t){return"click"===t.on?this.res.addEventListener("click",(()=>{this.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}moveLeft(t){return this.res.animate([{transform:"translateX(0px)"},{transform:`translateX(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpa(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveDowna(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpaBack(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}innerExpandBack(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}innerExpand(t){return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:t.width??this.prevWidth,height:t.height??this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}fade(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}faden(t,e,s){return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(s,(()=>{this.res.style.visibility="visible";var i=window.innerHeight;(this.res.getBoundingClientRect().top-i<=0||"load"==s)&&0==this.scrolled&&("left"==e&&this.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&this.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&this.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&this.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),this.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),this.scrolled=!0)})),this}}class i extends s{constructor(t,e){super(),this.text=t,this.res=null,this.val=e,this.setup()}setup(t){return this}hover(t){return this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,t.animation&&(this.res.style.transition=`${t.animation}s ease-in-out`,this.res.style.transionProperty="background, color"),this.res.onmouseout=()=>{this.res.style.backgroundColor=`${this.prevColor}`,this.res.style.color=`${this.foreColor}`},this.res.onmouseover=()=>{this.res.style.backgroundColor=t.background,this.res.style.color=t.color},this}set(t){this.options=t;let e=document.createElement("button");if(e.style.background="transparent",t.url){let s=document.createElement("img");s.setAttribute("src",t.url),s.style.width=t.frame.width,s.style.height=t.frame.height,e.appendChild(s)}else{let t=document.createTextNode(this.text.replace("$",this.val));e.appendChild(t)}this.res=e,t&&"submit"===t.type&&e.setAttribute("type",t.type);let s="";return this.border("none"),this.res.style.display="block",t.background&&this.background(t.background),t.padding&&this.padding(t.padding),t.margin&&this.margin(t.margin),t.mar&&this.mar(t.mar),t.pad&&this.pad(t.pad),t.centered&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto",this.res.style.backgroundColor="black"),t.border&&this.border(t.border),t.radius&&this.borderRadius(t.radius),t.class&&this.setClass(t.class),t.color&&this.color(t.color),t.auto&&this.auto(),t.weight&&(this.res.style.fontWeight=t.weight),t.fluidc&&this.fluidButtonCopy(t.fluidc),t.fluidc&&(s+=`\n fluidc: "${t.fluidc}",`),t.onTap&&this.onTap(t.onTap),t.frame&&this.frame(t.frame),t.frame&&(s+=`\n frame: "${t.frame}",`),t.arrpad&&this.arrayPadding(t.arrpad.sides,t.arrpad.value),t.arrpad&&(s+=`\n arrpad: {sides: ["${t.arrpad.sides}"], value: "${t.arrpad.value}"},`),t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&(s+=`\n arrayMargin: {sides: ["${t.arrayMargin.sides}"], value: "${t.arrayMargin.value}"},`),t.keySet&&this.keySet(t.keySet),this}arrayPadding(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),t.includes("all")&&(this.res.style.padding=e),e||(this.res.style.paddingBottom=t),this}arrayMargin(t,e){return e||(this.res.style.marginLeft=`${t[0]}px`,this.res.style.marginTop=`${t[1]}px`,this.res.style.marginRight=`${t[2]}px`,this.res.style.marginBottom=`${t[3]}px`),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}fluidButtonCopy(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}setClass(t){return this.res.setAttribute("class",t),this}color(t){return this.res.style.color=t,this}background(t){return this.res.style.background=t,this}width(t){return this.res.style.width=t,this}borderRadius(t){return this.res.style.borderRadius=t,this}padding(t,e,s,i){return t&&e&&s&&i?(this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=s,this.res.style.paddingBottom=i):this.res.style.padding=t,this}margin(t,e,s,i){return t&&e&&s&&i?(this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=s,this.res.style.marginBottom=i):this.res.style.margin=t,this}auto(){const t=()=>{window.matchMedia("(max-device-width: 415px)").matches?this.res.style.fontSize="2.2rem":this.res.style.fontSize="1rem"};return t(),window.addEventListener("resize",t),this}large(){const t=()=>{window.matchMedia("(max-device-width: 415px)").matches?(alert("WOW"),this.res.style.fontSize="6rem"):this.res.style.fontSize="3rem"};return t(),window.addEventListener("resize",t),this}border(t,e){return"none"===t&&(this.res.style.border="none"),this.res.style.border=`${t} solid ${e}px`,this}frame(t){return this.res.style.width=t.width,this.res.style.height=t.height,this}updating(t,e){var s=this.res,i=this.text;return Object.defineProperty(t,e,{set(t){let e=document.createTextNode(i.replace("$",t));s.replaceChild(e,s.childNodes[0])}}),this}onTap(t){return this.res.addEventListener("click",t),this}toCode(){const t=JSON.stringify(this.options,((t,e)=>"function"==typeof e?e.toString():e),4).replace(/"(\w+)":/g,"$1:").replace(/"(\(\)\s*=>\s*{[^}]*})"/gs,"$1").replace(/\\n/g,"").replace(/\\"/g,'"');return[`new Button("${this.text}").set(${t})`]}render(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}module.exports=e})();
|
|
1
|
+
/*! For license information please see button.cjs.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,i,n,a,o=[],l=!0,c=!1;try{if(n=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=n.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}(t,e)||n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function n(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function o(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,l(s.key),s)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,d(s.key),s)}}function d(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}t.r(e),t.d(e,{Button:()=>p});var p=function(t){function e(t,r){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(s=function(t,e,r){return e=y(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}(this,e)).text=t,s.res=null,s.val=r,s.setup(),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(e,t),r=e,s=[{key:"setup",value:function(t){return this}},{key:"hover",value:function(t){var e=this;return this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,t.animation&&(this.res.style.transition="".concat(t.animation,"s ease-in-out"),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){e.res.style.backgroundColor="".concat(e.prevColor),e.res.style.color="".concat(e.foreColor)},this.res.onmouseover=function(){e.res.style.backgroundColor=t.background,e.res.style.color=t.color},this}},{key:"set",value:function(t){this.options=t;var e=document.createElement("button");if(e.style.background="transparent",t.url){var r=document.createElement("img");r.setAttribute("src",t.url),r.style.width=t.frame.width,r.style.height=t.frame.height,e.appendChild(r)}else{var s=document.createTextNode(this.text.replace("$",this.val));e.appendChild(s)}return this.res=e,t&&"submit"===t.type&&e.setAttribute("type",t.type),this.border("none"),this.res.style.display="block",t.background&&this.background(t.background),t.padding&&this.padding(t.padding),t.margin&&this.margin(t.margin),t.mar&&this.mar(t.mar),t.pad&&this.pad(t.pad),t.centered&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto",this.res.style.backgroundColor="black"),t.border&&this.border(t.border),t.radius&&this.borderRadius(t.radius),t.class&&this.setClass(t.class),t.color&&this.color(t.color),t.auto&&this.auto(),t.weight&&(this.res.style.fontWeight=t.weight),t.fluidc&&this.fluidButtonCopy(t.fluidc),t.fluidc&&'\n fluidc: "'.concat(t.fluidc,'",'),t.onTap&&this.onTap(t.onTap),t.frame&&this.frame(t.frame),t.frame&&'\n frame: "'.concat(t.frame,'",'),t.arrpad&&this.arrayPadding(t.arrpad.sides,t.arrpad.value),t.arrpad&&'\n arrpad: {sides: ["'.concat(t.arrpad.sides,'"], value: "').concat(t.arrpad.value,'"},'),t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&'\n arrayMargin: {sides: ["'.concat(t.arrayMargin.sides,'"], value: "').concat(t.arrayMargin.value,'"},'),t.keySet&&this.keySet(t.keySet),this}},{key:"arrayPadding",value:function(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),t.includes("all")&&(this.res.style.padding=e),e||(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(t,e){return e||(this.res.style.marginLeft="".concat(t[0],"px"),this.res.style.marginTop="".concat(t[1],"px"),this.res.style.marginRight="".concat(t[2],"px"),this.res.style.marginBottom="".concat(t[3],"px")),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"fluidButtonCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setClass",value:function(t){return this.res.setAttribute("class",t),this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"width",value:function(t){return this.res.style.width=t,this}},{key:"borderRadius",value:function(t){return this.res.style.borderRadius=t,this}},{key:"padding",value:function(t,e,r,s){return t&&e&&r&&s?(this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=r,this.res.style.paddingBottom=s):this.res.style.padding=t,this}},{key:"margin",value:function(t,e,r,s){return t&&e&&r&&s?(this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=r,this.res.style.marginBottom=s):this.res.style.margin=t,this}},{key:"auto",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="2.2rem":t.res.style.fontSize="1rem"};return e(),window.addEventListener("resize",e),this}},{key:"large",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?(alert("WOW"),t.res.style.fontSize="6rem"):t.res.style.fontSize="3rem"};return e(),window.addEventListener("resize",e),this}},{key:"border",value:function(t,e){return"none"===t&&(this.res.style.border="none"),this.res.style.border="".concat(t," solid ").concat(e,"px"),this}},{key:"frame",value:function(t){return this.res.style.width=t.width,this.res.style.height=t.height,this}},{key:"updating",value:function(t,e){var r=this.res,s=this.text;return Object.defineProperty(t,e,{set:function(t){var e=document.createTextNode(s.replace("$",t));r.replaceChild(e,r.childNodes[0])}}),this}},{key:"onTap",value:function(t){return this.res.addEventListener("click",t),this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,(function(t,e){return"function"==typeof e?e.toString():e}),4).replace(/"(\w+)":/g,"$1:").replace(/"(\(\)\s*=>\s*{[^}]*})"/g,"$1").replace(/\\n/g,"").replace(/\\"/g,'"');return['new Button("'.concat(this.text,'").set(').concat(t,")")]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],s&&u(r.prototype,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,s}(function(){return t=function t(){var e,r,s,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),i.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",n="",a="",o="",l="",c="",u="",d="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?n=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(d=t.replace("opacity:",""))})),r=i.setDefault(r),s=i.setDefault(s),n=i.setDefault(n);var h="";if("0px"!=s&&"0px"!=r&&"0px"!=n?h+="translate3d(".concat(r,", ").concat(s,", ").concat(n,")"):"0px"==s&&"0px"==r||(h+="translate(".concat(r,", ").concat(s,")")),a&&(h+=" ".concat(a)),l&&(h+=" ".concat(l)),o&&(h+=" ".concat(o)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(t.op.transform.duration){var y=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),f="transform ".concat(y,", opacity ").concat(y);i.res.style.transition=f}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";i.res.style.transform=h,i.res.style.opacity=d}}};e.on?i.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"})),t&&(i.res.style.transform=t.trim())};if(e.on)i.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var n=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),n/2+a)}}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var i={};for(var n in t[r])"breakpoint"!==n&&(i[n]=t[r][n]);e.set(i)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++)switch(i[a]){case"a":this.res.style.padding=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.paddingTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.paddingLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.paddingRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.paddingBottom=this.isNumber(n)?"".concat(n,"px"):n}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++){switch(i[a]){case"a":this.res.style.margin=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.marginTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.marginLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.marginRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.marginBottom=this.isNumber(n)?"".concat(n,"px"):n}"auto"===i[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var i=(r.min-r.max)*s-r.min;if(i=Math.abs(i),r.min<r.max){var n=(r.max+Math.abs(r.min))*s;i=r.min+n}return i}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,e){var r=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=i(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),d=u[0],h=u[1],y=parseInt(d),f=parseInt(h),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(p=!0)}n>=y&&n<=f&&p&&("gradient"===c.log&&(a+="gradient"),"blast"===c.log&&(a+="blast"),"animation"===c.log&&(a+="animation"),"shadow"===c.log&&(a+="shadow"),"span"===c.log&&(a+="span"),"filter"===c.log&&(a+="filter"),"background"===c.log&&(a+="background"))}}catch(t){l.e(t)}finally{l.f()}r.res.style.margin="";var v,g=r.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(r.res.style.WebkitBackgroundClip="",r.res.style.background=""),r.res.style["-webkit-text-stroke"]="",r.res.style.filter="",r.res.style.textShadow="",r.res.style.border="";r.res.firstChild;)r.res.removeChild(r.res.firstChild);if(r.res.textContent=r.text,""===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.color=g),"blast"===a){for(m=0;m<t.length;m++){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}for(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]=r.globalBlast,m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}}if("gradient"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.border="1px solid orange"),"background"===a&&(r.res.style.background="orange"),"gradientblast"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke"]=r.globalBlast),"gradientanimation"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.textShadow=r.globalShadow),"animationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"shadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"span"===a&&r.options.span)for(v=Array.isArray(r.options.span)?r.options.span.filter((function(t){return"span"===t.op.name}))[0]:r.options.span,r.res.textContent="",m=0;m<v.op.parts.length;m++){var k=v.op.parts[m].style,w=new Text(v.op.parts[m].text).setup({type:"span"}).set(k).render();r.res.appendChild(w)}if("filter"===a){var S=r.options.filtera.op.filter;r.res.style.filter=S,r.res.style.border="8px solid orange"}};window.addEventListener("resize",n),n()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,e){var r=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";r.resCopy=r.res,r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=i(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),d=u[0],h=u[1],y=parseInt(d),f=parseInt(h),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(p=!0)}n>=y&&n<=f&&p&&("blast"===c.log&&(a+="blast"),"shadow"===c.log&&(a+="shadow"),"background"===c.log&&(a+="background"),"gradient"===c.log&&(a+="gradient"),"spana"===c.log&&(a+="spana"),"layout"===c.log&&(a+="layout"),"margin"===c.log&&(a+="margin"),c.op&&c.op.margin&&(r.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(r.res.style.background="",r.res.style.backgroundColor="",r.res.style.textShadow="",r.res.style.border="",r.res.style.margin="",r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-stroke"]="",r.res.style["-webkit-text-stroke-width"]="","background"===a&&(r.res.style.backgroundColor="green"),"margin"===a)for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==r.index&&(r.res.style.margin=v[Number(r.index)]+"px")}if("blastbackgroundmargin"===a){for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==r.index&&(r.res.style.margin=g[Number(r.index)]+"px")}r.res.style.backgroundColor="green","FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===a){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}r.res.style.backgroundColor="green",r.useMargin?r.res.style.margin="1rem":r.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===a&&(r.res.style.alignSelf="start",r.res.style.border="1px solid purple"),"blast"===a){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===a&&(r.res.style.border="1px solid yellow",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===a&&(r.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.textContent=r.text)),"shadow"===a&&("FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",r.res.textContent=r.text))};window.addEventListener("resize",n),n()}},{key:"cssGen",value:function(t,e,r,s){return this.css=[""],[""]}},{key:"chainReact",value:function(t,e,r){var n=this;this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var a,o=i(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var a=window.visualViewport.width,o=[],l=[];n.resCopy=n.res,n.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=i(t);try{for(u.s();!(c=u.n()).done;){var d=c.value;n.counterIndex++;var h=s(d.range,2),y=h[0],f=h[1],p=parseInt(y),m=parseInt(f),v=!0;if(d.target){v=!1;for(var g=0;g<d.target.length;g++)d.target[g]===e&&(v=!0)}a>=p&&a<=m&&v&&(o.push(d.log),l.push(d),d.op&&d.op.margin&&(n.useMargin=d.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",(o.includes("gradient")||o.includes("shadow"))&&(n.res.style.position="relative",n.res.style.zIndex=-1),o.includes("blast")){var b,x=l.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(b=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===n.getType()?n.res.style.border="".concat(k,"px solid orange"):(n.res.textContent=n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.res.style["-webkit-text-stroke-width"]="".concat(k))}if(o.includes("filter")){var w=l.filter((function(t){return"filter"===t.log}))[0].op.filter;n.res.style.filter=w}if(o.includes("background")&&(n.res.style.backgroundColor="green"),o.includes("gradient")&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["background-clip"]="text"),o.includes("shadow"))if("FlexRowLayoutElement"===n.getType());else{var S="",T=0;for(g=0;g<n.options.shadow.op.steps;g++)S+="drop-shadow(".concat(T+=3,"px ").concat(T,"px ").concat(T,"px gray) ");n.res.style.filter=S}if(o.includes("margin"))for(g=0;g<t.length;g++)if(t[g].op){var C=t[g].op.offsets;C&&void 0!==n.index&&(n.res.style.margin=C[Number(n.index)]+"px")}if(o.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){n.hasAnimated=!0;var E=n.options.animation.op;n.res.animate(E.keyframesClose,{duration:0,fill:"forwards"}),n.res.animate(E.keyframesOpen,E.openOptions)}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var O=n.options.animation.op;n.res.animate(O.keyframesClose,{duration:0,fill:"forwards"});var L=function(){window.scrollY>parseFloat(O.fireAt)&&(n.res.animate(O.keyframesOpen,O.openOptions),window.removeEventListener("scroll",L))};window.addEventListener("scroll",L)}if(n.options.animation&&n.options.animation.op.fireAt&&"inview"===n.options.animation.op.fireAt){var N=n.options.animation.op;n.res.animate(N.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(n.res.animate(N.keyframesOpen,N.openOptions),e.disconnect())}))})).observe(n.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var s=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){s.res.style.visibility="visible";var i=window.innerHeight;(s.res.getBoundingClientRect().top-i<=0||"load"==r)&&0==s.scrolled&&("left"==e&&s.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&s.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&s.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&s.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),s.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),s.scrolled=!0)})),this}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());module.exports=e})();
|
package/dist/button.esm.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
class t{constructor(){this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}}keySet(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}onScroll(t){"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform=`scale(${t.valMax})`),window.addEventListener("scroll",(()=>{let e=this.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?this.res.style.opacity=e:"scale"===t.value&&(this.res.style.transform=`scale(${e})`)}))}setAny(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}setID(t){this.id=t}setPrevText(t){this.prevText=t}getCSS(){return this.css}getPX(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}respad(t){const e=()=>{this.pad(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(min-width: ${this.getPX(s)}`).matches&&this.pad(t[e].values)}};window.addEventListener("resize",e),e()}resmar(t){const e=()=>{this.mar(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(max-width: ${this.getPX(s)}`).matches&&this.mar(t[e].values)}};window.addEventListener("resize",e),e()}resprop(t){this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;const e=()=>{this.res.style.background=this.prevBackground,this.res.style.width=this.prevWidth,this.res.style.height=this.prevHeight,this.res.style.border=this.prevBorder;for(let e=0;e<t.length;e++){let s=t[e].breakpoint;if(window.matchMedia(`(max-width: ${this.getPX(s)}`).matches){const s={};for(const i in t[e])"breakpoint"!==i&&(s[i]=t[e][i]);this.set(s)}}};window.addEventListener("resize",e),e()}isNumber(t){return"number"==typeof t&&!isNaN(t)}pad(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++)switch(r[t]){case"a":this.res.style.padding=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.paddingTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.paddingLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.paddingRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.paddingBottom=this.isNumber(a)?`${a}px`:a}}}return this}as(t){return this.res.style.alignSelf=t,this}mar(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++){switch(r[t]){case"a":this.res.style.margin=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.marginTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.marginLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.marginRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.marginBottom=this.isNumber(a)?`${a}px`:a}"auto"===r[t]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}}}return this}smartRange(t,e,s){t<e.min&&(t=e.min),t>e.max&&(t=e.max);let i=(t-e.min)/(e.max-e.min);e.min>e.max&&(i=(t-e.max)/(e.min-e.max));let r=(s.min-s.max)*i-s.min;if(r=Math.abs(r),s.min<s.max){let t=(s.max+Math.abs(s.min))*i;r=s.min+t}return r}gpos(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}fluidCopy(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}setIndex(t){this.index=t}borderObj(t){let e=t.type??"solid";return this.res.style.border=`${t.width} ${e} ${t.color}`,this.res.style.borderRadius=t.radius,this}protoReact(t,e){t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,o=parseInt(t),l=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=o&&s<=l&&h&&("gradient"===a.log&&(i+="gradient"),"blast"===a.log&&(i+="blast"),"animation"===a.log&&(i+="animation"),"shadow"===a.log&&(i+="shadow"),"span"===a.log&&(i+="span"),"filter"===a.log&&(i+="filter"),"background"===a.log&&(i+="background"))}this.res.style.margin="";let a=this.res.style.color;for(t.map((t=>t.log)).filter((t=>null!=t)).includes("gradient")&&(this.res.style.WebkitBackgroundClip="",this.res.style.background=""),this.res.style["-webkit-text-stroke"]="",this.res.style.filter="",this.res.style.textShadow="",this.res.style.border="";this.res.firstChild;)this.res.removeChild(this.res.firstChild);if(this.res.textContent=this.text,""===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.color=a),"blast"===i){for(r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}for(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]=this.globalBlast,r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}}if("gradient"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.border="1px solid orange"),"background"===i&&(this.res.style.background="orange"),"gradientblast"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke"]=this.globalBlast),"gradientanimation"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.textShadow=this.globalShadow),"animationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"shadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"span"===i&&this.options.span){let t;for(t=Array.isArray(this.options.span)?this.options.span.filter((t=>"span"===t.op.name))[0]:this.options.span,this.res.textContent="",r=0;r<t.op.parts.length;r++){let e=t.op.parts[r].style,s=new Text(t.op.parts[r].text).setup({type:"span"}).set(e).render();this.res.appendChild(s)}}if("filter"===i){let t=this.options.filtera.op.filter;this.res.style.filter=t,this.res.style.border="8px solid orange"}};window.addEventListener("resize",s),s()}setPref(t){this.preffersId=t}setClass(t){this.class=t}betaReact(t,e){this.ap=!1,this.cta=0,this.once=!1,t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,o=parseInt(t),l=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=o&&s<=l&&h&&("blast"===a.log&&(i+="blast"),"shadow"===a.log&&(i+="shadow"),"background"===a.log&&(i+="background"),"gradient"===a.log&&(i+="gradient"),"spana"===a.log&&(i+="spana"),"layout"===a.log&&(i+="layout"),"margin"===a.log&&(i+="margin"),a.op&&a.op.margin&&(this.useMargin=a.op.margin))}if(this.res.style.background="",this.res.style.backgroundColor="",this.res.style.textShadow="",this.res.style.border="",this.res.style.margin="",this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke"]="",this.res.style["-webkit-text-stroke-width"]="","background"===i&&(this.res.style.backgroundColor="green"),"margin"===i)for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if("blastbackgroundmargin"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green","FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green",this.useMargin?this.res.style.margin="1rem":this.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===i&&(this.res.style.alignSelf="start",this.res.style.border="1px solid purple"),"blast"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===i&&(this.res.style.border="1px solid yellow",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===i&&(this.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.textContent=this.text)),"shadow"===i&&("FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",this.res.textContent=this.text))};window.addEventListener("resize",s),s()}cssGen(t,e,s,i){return this.css=[""],[""]}chainReact(t,e,s){this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;for(let e of t)e.range||(e.range=["0px","999999px"]);t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const i=()=>{const i=window.visualViewport.width;let r=[],a=[];this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const s of t){this.counterIndex++;const[t,o]=s.range,l=parseInt(t),h=parseInt(o);let d=!0;if(s.target){d=!1;for(var n=0;n<s.target.length;n++)s.target[n]===e&&(d=!0)}i>=l&&i<=h&&d&&(r.push(s.log),a.push(s),s.op&&s.op.margin&&(this.useMargin=s.op.margin))}if(s&&!s.includes("background")&&(this.res.style.background="",this.res.style.backgroundColor=""),this.res.style.textShadow="",s&&!s.includes("border")&&(this.res.style.border=""),s&&!s.includes("margin")&&(this.res.style.margin=""),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke-color"]="",this.res.style["-webkit-text-stroke-width"]="",this.res.style.filter="",(r.includes("gradient")||r.includes("shadow"))&&(this.res.style.position="relative",this.res.style.zIndex=-1),r.includes("blast")){let t=a.filter((t=>"blast"===t.log))[0].op.color,e=a.filter((t=>"blast"===t.log))[0].op.width??"1px";"FlexRowLayoutElement"===this.getType()?this.res.style.border=`${e}px solid orange`:(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]=t,this.res.style["-webkit-text-stroke-width"]=`${e}`)}if(r.includes("filter")){let t=a.filter((t=>"filter"===t.log))[0].op.filter;this.res.style.filter=t}if(r.includes("background")&&(this.res.style.backgroundColor="green"),r.includes("gradient")&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["background-clip"]="text"),r.includes("shadow"))if("FlexRowLayoutElement"===this.getType());else{let t="",e=0;for(n=0;n<this.options.shadow.op.steps;n++)e+=3,t+=`drop-shadow(${e}px ${e}px ${e}px gray) `;this.res.style.filter=t}if(r.includes("margin"))for(n=0;n<t.length;n++){if(!t[n].op)continue;const e=t[n].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if(r.includes("animation")){if(this.options.animation&&!this.hasAnimated&&!this.options.animation.op.fireAt){this.hasAnimated=!0;let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),this.res.animate(t.keyframesOpen,t.openOptions)}if(this.options.animation&&this.options.animation.op.fireAt&&this.options.animation.op.fireAt.endsWith("px")){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"});const e=()=>{window.scrollY>parseFloat(t.fireAt)&&(this.res.animate(t.keyframesOpen,t.openOptions),window.removeEventListener("scroll",e))};window.addEventListener("scroll",e)}if(this.options.animation&&this.options.animation.op.fireAt&&"inview"===this.options.animation.op.fireAt){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver(((e,s)=>{e.forEach((e=>{e.isIntersecting&&(this.res.animate(t.keyframesOpen,t.openOptions),s.disconnect())}))})).observe(this.res)}}};window.addEventListener("resize",i),i()}reactOnTransform=t=>{if(t.transform||t.op&&t.op.transform){let e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),this.setDefault=(t,e="0px")=>0===t.length?e+" ":t;const s=t=>{const e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;const s=e[1].split(",").map((t=>t.trim()));return 1===s.length?`rotate(${s[0]})`:2===s.length?`rotateX(${s[0]}) rotateY(${s[1]})`:3===s.length?`rotateX(${s[0]}) rotateY(${s[1]}) rotate(${s[2]})`:t},i=()=>{let i="",r="",a="",n="",o="",l="",h="",d="",c="";if(0===e.values.length)return;e.values.forEach((t=>{t.startsWith("tx:")&&(i=t.replace("tx:","")),t.startsWith("ty:")&&(r=t.replace("ty:","")),t.startsWith("tz:")?a=t.replace("tz:",""):t.startsWith("scale(")?n=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=s(t):t.startsWith("perspective(")?h=t:t.startsWith("matrix(")?d=t:t.startsWith("opacity:")&&(c=t.replace("opacity:",""))})),i=this.setDefault(i),r=this.setDefault(r),a=this.setDefault(a);let p="";if("0px"!=r&&"0px"!=i&&"0px"!=a?p+=`translate3d(${i}, ${r}, ${a})`:"0px"==r&&"0px"==i||(p+=`translate(${i}, ${r})`),n&&(p+=` ${n}`),l&&(p+=` ${l}`),o&&(p+=` ${o}`),h&&(p+=` ${h}`),d&&(p+=` ${d}`),p){if(t.op.transform.duration){let e=t.op.transform.duration.replace(/^(\d+)(s)-/,((t,e,s)=>e/2+s+" ")),s=`transform ${e}, opacity ${e}`;this.res.style.transition=s}else this.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";this.res.style.transform=p,this.res.style.opacity=c}};e.on?this.res.addEventListener(e.on,(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()})):window.addEventListener("load",(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()}));const r=()=>{let t="";e.values.forEach((e=>{e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),this.res.style.opacity="1"})),t&&(this.res.style.transform=t.trim())};if(e.on)this.res.addEventListener("mouseout",(()=>{e.keep||r()}));else{let t=1e3*parseFloat(e.duration),s=e.closeAfter?e.closeAfter:0;setTimeout((()=>{e.keep||r()}),t/2+s)}}};maxWidth(t){return this.res.style.maxWidth=t,this}removeQuotesFromFirstWord(t){return t.replace(/"([^"]+)":/g,"$1:")}arrayMargin(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}navBarExpand(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}scrollFade(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}expand(t){return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(()=>{this.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}move(t){return"click"===t.on?this.res.addEventListener("click",(()=>{this.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}moveLeft(t){return this.res.animate([{transform:"translateX(0px)"},{transform:`translateX(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpa(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveDowna(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpaBack(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}innerExpandBack(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}innerExpand(t){return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:t.width??this.prevWidth,height:t.height??this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}fade(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}faden(t,e,s){return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(s,(()=>{this.res.style.visibility="visible";var i=window.innerHeight;(this.res.getBoundingClientRect().top-i<=0||"load"==s)&&0==this.scrolled&&("left"==e&&this.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&this.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&this.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&this.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),this.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),this.scrolled=!0)})),this}}class e extends t{constructor(t,e){super(),this.text=t,this.res=null,this.val=e,this.setup()}setup(t){return this}hover(t){return this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,t.animation&&(this.res.style.transition=`${t.animation}s ease-in-out`,this.res.style.transionProperty="background, color"),this.res.onmouseout=()=>{this.res.style.backgroundColor=`${this.prevColor}`,this.res.style.color=`${this.foreColor}`},this.res.onmouseover=()=>{this.res.style.backgroundColor=t.background,this.res.style.color=t.color},this}set(t){this.options=t;let e=document.createElement("button");if(e.style.background="transparent",t.url){let s=document.createElement("img");s.setAttribute("src",t.url),s.style.width=t.frame.width,s.style.height=t.frame.height,e.appendChild(s)}else{let t=document.createTextNode(this.text.replace("$",this.val));e.appendChild(t)}this.res=e,t&&"submit"===t.type&&e.setAttribute("type",t.type);let s="";return this.border("none"),this.res.style.display="block",t.background&&this.background(t.background),t.padding&&this.padding(t.padding),t.margin&&this.margin(t.margin),t.mar&&this.mar(t.mar),t.pad&&this.pad(t.pad),t.centered&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto",this.res.style.backgroundColor="black"),t.border&&this.border(t.border),t.radius&&this.borderRadius(t.radius),t.class&&this.setClass(t.class),t.color&&this.color(t.color),t.auto&&this.auto(),t.weight&&(this.res.style.fontWeight=t.weight),t.fluidc&&this.fluidButtonCopy(t.fluidc),t.fluidc&&(s+=`\n fluidc: "${t.fluidc}",`),t.onTap&&this.onTap(t.onTap),t.frame&&this.frame(t.frame),t.frame&&(s+=`\n frame: "${t.frame}",`),t.arrpad&&this.arrayPadding(t.arrpad.sides,t.arrpad.value),t.arrpad&&(s+=`\n arrpad: {sides: ["${t.arrpad.sides}"], value: "${t.arrpad.value}"},`),t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&(s+=`\n arrayMargin: {sides: ["${t.arrayMargin.sides}"], value: "${t.arrayMargin.value}"},`),t.keySet&&this.keySet(t.keySet),this}arrayPadding(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),t.includes("all")&&(this.res.style.padding=e),e||(this.res.style.paddingBottom=t),this}arrayMargin(t,e){return e||(this.res.style.marginLeft=`${t[0]}px`,this.res.style.marginTop=`${t[1]}px`,this.res.style.marginRight=`${t[2]}px`,this.res.style.marginBottom=`${t[3]}px`),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}fluidButtonCopy(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}setClass(t){return this.res.setAttribute("class",t),this}color(t){return this.res.style.color=t,this}background(t){return this.res.style.background=t,this}width(t){return this.res.style.width=t,this}borderRadius(t){return this.res.style.borderRadius=t,this}padding(t,e,s,i){return t&&e&&s&&i?(this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=s,this.res.style.paddingBottom=i):this.res.style.padding=t,this}margin(t,e,s,i){return t&&e&&s&&i?(this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=s,this.res.style.marginBottom=i):this.res.style.margin=t,this}auto(){const t=()=>{window.matchMedia("(max-device-width: 415px)").matches?this.res.style.fontSize="2.2rem":this.res.style.fontSize="1rem"};return t(),window.addEventListener("resize",t),this}large(){const t=()=>{window.matchMedia("(max-device-width: 415px)").matches?(alert("WOW"),this.res.style.fontSize="6rem"):this.res.style.fontSize="3rem"};return t(),window.addEventListener("resize",t),this}border(t,e){return"none"===t&&(this.res.style.border="none"),this.res.style.border=`${t} solid ${e}px`,this}frame(t){return this.res.style.width=t.width,this.res.style.height=t.height,this}updating(t,e){var s=this.res,i=this.text;return Object.defineProperty(t,e,{set(t){let e=document.createTextNode(i.replace("$",t));s.replaceChild(e,s.childNodes[0])}}),this}onTap(t){return this.res.addEventListener("click",t),this}toCode(){const t=JSON.stringify(this.options,((t,e)=>"function"==typeof e?e.toString():e),4).replace(/"(\w+)":/g,"$1:").replace(/"(\(\)\s*=>\s*{[^}]*})"/gs,"$1").replace(/\\n/g,"").replace(/\\"/g,'"');return[`new Button("${this.text}").set(${t})`]}render(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}export{e as Button};
|
|
1
|
+
/*! For license information please see button.esm.js.LICENSE.txt */
|
|
2
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,i,n,a,o=[],l=!0,c=!1;try{if(n=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=n.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function n(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,a(s.key),s)}}function a(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,"string");if("object"!=t(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}var o=function(){return t=function t(){var e,r,s,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),i.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",n="",a="",o="",l="",c="",u="",d="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?n=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(d=t.replace("opacity:",""))})),r=i.setDefault(r),s=i.setDefault(s),n=i.setDefault(n);var h="";if("0px"!=s&&"0px"!=r&&"0px"!=n?h+="translate3d(".concat(r,", ").concat(s,", ").concat(n,")"):"0px"==s&&"0px"==r||(h+="translate(".concat(r,", ").concat(s,")")),a&&(h+=" ".concat(a)),l&&(h+=" ".concat(l)),o&&(h+=" ".concat(o)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(t.op.transform.duration){var y=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),f="transform ".concat(y,", opacity ").concat(y);i.res.style.transition=f}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";i.res.style.transform=h,i.res.style.opacity=d}}};e.on?i.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"})),t&&(i.res.style.transform=t.trim())};if(e.on)i.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var n=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),n/2+a)}}},(r=a(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(s=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var i={};for(var n in t[r])"breakpoint"!==n&&(i[n]=t[r][n]);e.set(i)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++)switch(i[a]){case"a":this.res.style.padding=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.paddingTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.paddingLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.paddingRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.paddingBottom=this.isNumber(n)?"".concat(n,"px"):n}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++){switch(i[a]){case"a":this.res.style.margin=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.marginTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.marginLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.marginRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.marginBottom=this.isNumber(n)?"".concat(n,"px"):n}"auto"===i[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var i=(r.min-r.max)*s-r.min;if(i=Math.abs(i),r.min<r.max){var n=(r.max+Math.abs(r.min))*s;i=r.min+n}return i}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,s){var i=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=r(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;i.counterIndex++;var u=e(c.range,2),d=u[0],h=u[1],y=parseInt(d),f=parseInt(h),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===s&&(p=!0)}n>=y&&n<=f&&p&&("gradient"===c.log&&(a+="gradient"),"blast"===c.log&&(a+="blast"),"animation"===c.log&&(a+="animation"),"shadow"===c.log&&(a+="shadow"),"span"===c.log&&(a+="span"),"filter"===c.log&&(a+="filter"),"background"===c.log&&(a+="background"))}}catch(t){l.e(t)}finally{l.f()}i.res.style.margin="";var v,g=i.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(i.res.style.WebkitBackgroundClip="",i.res.style.background=""),i.res.style["-webkit-text-stroke"]="",i.res.style.filter="",i.res.style.textShadow="",i.res.style.border="";i.res.firstChild;)i.res.removeChild(i.res.firstChild);if(i.res.textContent=i.text,""===a&&(i.res.style["-webkit-text-fill-color"]="",i.res.style.color=g),"blast"===a){for(m=0;m<t.length;m++){var b=t[m].op.offsets;b&&void 0!==i.index&&(i.res.style.margin=b[Number(i.index)]+"px")}for(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke"]=i.globalBlast,m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==i.index&&(i.res.style.margin=x[Number(i.index)]+"px")}}if("gradient"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text",i.res.style.border="1px solid orange"),"background"===a&&(i.res.style.background="orange"),"gradientblast"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text",i.res.style["-webkit-text-stroke"]=i.globalBlast),"gradientanimation"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text",i.res.style.textShadow=i.globalShadow),"animationshadow"===a&&(i.res.style["-webkit-text-fill-color"]="",i.res.style.textShadow=i.globalShadow),"shadow"===a&&(i.res.style["-webkit-text-fill-color"]="",i.res.style.textShadow=i.globalShadow),"span"===a&&i.options.span)for(v=Array.isArray(i.options.span)?i.options.span.filter((function(t){return"span"===t.op.name}))[0]:i.options.span,i.res.textContent="",m=0;m<v.op.parts.length;m++){var k=v.op.parts[m].style,w=new Text(v.op.parts[m].text).setup({type:"span"}).set(k).render();i.res.appendChild(w)}if("filter"===a){var S=i.options.filtera.op.filter;i.res.style.filter=S,i.res.style.border="8px solid orange"}};window.addEventListener("resize",n),n()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,s){var i=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=r(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;i.counterIndex++;var u=e(c.range,2),d=u[0],h=u[1],y=parseInt(d),f=parseInt(h),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===s&&(p=!0)}n>=y&&n<=f&&p&&("blast"===c.log&&(a+="blast"),"shadow"===c.log&&(a+="shadow"),"background"===c.log&&(a+="background"),"gradient"===c.log&&(a+="gradient"),"spana"===c.log&&(a+="spana"),"layout"===c.log&&(a+="layout"),"margin"===c.log&&(a+="margin"),c.op&&c.op.margin&&(i.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(i.res.style.background="",i.res.style.backgroundColor="",i.res.style.textShadow="",i.res.style.border="",i.res.style.margin="",i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke"]="",i.res.style["-webkit-text-stroke-width"]="","background"===a&&(i.res.style.backgroundColor="green"),"margin"===a)for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==i.index&&(i.res.style.margin=v[Number(i.index)]+"px")}if("blastbackgroundmargin"===a){for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==i.index&&(i.res.style.margin=g[Number(i.index)]+"px")}i.res.style.backgroundColor="green","FlexRowLayoutElement"===i.getType()?i.res.style.border="1px solid orange":(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===a){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==i.index&&(i.res.style.margin=b[Number(i.index)]+"px")}i.res.style.backgroundColor="green",i.useMargin?i.res.style.margin="1rem":i.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===i.getType()?i.res.style.border="1px solid orange":(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===a&&(i.res.style.alignSelf="start",i.res.style.border="1px solid purple"),"blast"===a){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==i.index&&(i.res.style.margin=x[Number(i.index)]+"px")}"FlexRowLayoutElement"===i.getType()?i.res.style.border="1px solid orange":(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-background-clip"]="text",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===a&&(i.res.style.border="1px solid yellow",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===a&&(i.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===i.getType()||(i.res.children[0]&&i.res.removeChild(i.res.children[0]),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-background-clip"]="text",i.res.textContent=i.text)),"shadow"===a&&("FlexRowLayoutElement"===i.getType()||(i.res.children[0]&&i.res.removeChild(i.res.children[0]),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-fill-color"]="",i.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",i.res.textContent=i.text))};window.addEventListener("resize",n),n()}},{key:"cssGen",value:function(t,e,r,s){return this.css=[""],[""]}},{key:"chainReact",value:function(t,s,i){var n=this;this.cssGen(t,s,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var a,o=r(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var a=window.visualViewport.width,o=[],l=[];n.resCopy=n.res,n.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=r(t);try{for(u.s();!(c=u.n()).done;){var d=c.value;n.counterIndex++;var h=e(d.range,2),y=h[0],f=h[1],p=parseInt(y),m=parseInt(f),v=!0;if(d.target){v=!1;for(var g=0;g<d.target.length;g++)d.target[g]===s&&(v=!0)}a>=p&&a<=m&&v&&(o.push(d.log),l.push(d),d.op&&d.op.margin&&(n.useMargin=d.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(i&&!i.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",i&&!i.includes("border")&&(n.res.style.border=""),i&&!i.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",(o.includes("gradient")||o.includes("shadow"))&&(n.res.style.position="relative",n.res.style.zIndex=-1),o.includes("blast")){var b,x=l.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(b=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===n.getType()?n.res.style.border="".concat(k,"px solid orange"):(n.res.textContent=n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.res.style["-webkit-text-stroke-width"]="".concat(k))}if(o.includes("filter")){var w=l.filter((function(t){return"filter"===t.log}))[0].op.filter;n.res.style.filter=w}if(o.includes("background")&&(n.res.style.backgroundColor="green"),o.includes("gradient")&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["background-clip"]="text"),o.includes("shadow"))if("FlexRowLayoutElement"===n.getType());else{var S="",T=0;for(g=0;g<n.options.shadow.op.steps;g++)S+="drop-shadow(".concat(T+=3,"px ").concat(T,"px ").concat(T,"px gray) ");n.res.style.filter=S}if(o.includes("margin"))for(g=0;g<t.length;g++)if(t[g].op){var C=t[g].op.offsets;C&&void 0!==n.index&&(n.res.style.margin=C[Number(n.index)]+"px")}if(o.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){n.hasAnimated=!0;var E=n.options.animation.op;n.res.animate(E.keyframesClose,{duration:0,fill:"forwards"}),n.res.animate(E.keyframesOpen,E.openOptions)}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var O=n.options.animation.op;n.res.animate(O.keyframesClose,{duration:0,fill:"forwards"});var L=function(){window.scrollY>parseFloat(O.fireAt)&&(n.res.animate(O.keyframesOpen,O.openOptions),window.removeEventListener("scroll",L))};window.addEventListener("scroll",L)}if(n.options.animation&&n.options.animation.op.fireAt&&"inview"===n.options.animation.op.fireAt){var N=n.options.animation.op;n.res.animate(N.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(n.res.animate(N.keyframesOpen,N.openOptions),e.disconnect())}))})).observe(n.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var s=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){s.res.style.visibility="visible";var i=window.innerHeight;(s.res.getBoundingClientRect().top-i<=0||"load"==r)&&0==s.scrolled&&("left"==e&&s.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&s.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&s.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&s.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),s.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),s.scrolled=!0)})),this}}])&&n(t.prototype,s),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,s}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,u(s.key),s)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var f=function(){function t(e,r){var s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(s=function(t,e,r){return e=h(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}(this,t)).text=e,s.res=null,s.val=r,s.setup(),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(t,o),e=t,r=[{key:"setup",value:function(t){return this}},{key:"hover",value:function(t){var e=this;return this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,t.animation&&(this.res.style.transition="".concat(t.animation,"s ease-in-out"),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){e.res.style.backgroundColor="".concat(e.prevColor),e.res.style.color="".concat(e.foreColor)},this.res.onmouseover=function(){e.res.style.backgroundColor=t.background,e.res.style.color=t.color},this}},{key:"set",value:function(t){this.options=t;var e=document.createElement("button");if(e.style.background="transparent",t.url){var r=document.createElement("img");r.setAttribute("src",t.url),r.style.width=t.frame.width,r.style.height=t.frame.height,e.appendChild(r)}else{var s=document.createTextNode(this.text.replace("$",this.val));e.appendChild(s)}return this.res=e,t&&"submit"===t.type&&e.setAttribute("type",t.type),this.border("none"),this.res.style.display="block",t.background&&this.background(t.background),t.padding&&this.padding(t.padding),t.margin&&this.margin(t.margin),t.mar&&this.mar(t.mar),t.pad&&this.pad(t.pad),t.centered&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto",this.res.style.backgroundColor="black"),t.border&&this.border(t.border),t.radius&&this.borderRadius(t.radius),t.class&&this.setClass(t.class),t.color&&this.color(t.color),t.auto&&this.auto(),t.weight&&(this.res.style.fontWeight=t.weight),t.fluidc&&this.fluidButtonCopy(t.fluidc),t.fluidc&&'\n fluidc: "'.concat(t.fluidc,'",'),t.onTap&&this.onTap(t.onTap),t.frame&&this.frame(t.frame),t.frame&&'\n frame: "'.concat(t.frame,'",'),t.arrpad&&this.arrayPadding(t.arrpad.sides,t.arrpad.value),t.arrpad&&'\n arrpad: {sides: ["'.concat(t.arrpad.sides,'"], value: "').concat(t.arrpad.value,'"},'),t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&'\n arrayMargin: {sides: ["'.concat(t.arrayMargin.sides,'"], value: "').concat(t.arrayMargin.value,'"},'),t.keySet&&this.keySet(t.keySet),this}},{key:"arrayPadding",value:function(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),t.includes("all")&&(this.res.style.padding=e),e||(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(t,e){return e||(this.res.style.marginLeft="".concat(t[0],"px"),this.res.style.marginTop="".concat(t[1],"px"),this.res.style.marginRight="".concat(t[2],"px"),this.res.style.marginBottom="".concat(t[3],"px")),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"fluidButtonCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setClass",value:function(t){return this.res.setAttribute("class",t),this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"width",value:function(t){return this.res.style.width=t,this}},{key:"borderRadius",value:function(t){return this.res.style.borderRadius=t,this}},{key:"padding",value:function(t,e,r,s){return t&&e&&r&&s?(this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=r,this.res.style.paddingBottom=s):this.res.style.padding=t,this}},{key:"margin",value:function(t,e,r,s){return t&&e&&r&&s?(this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=r,this.res.style.marginBottom=s):this.res.style.margin=t,this}},{key:"auto",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="2.2rem":t.res.style.fontSize="1rem"};return e(),window.addEventListener("resize",e),this}},{key:"large",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?(alert("WOW"),t.res.style.fontSize="6rem"):t.res.style.fontSize="3rem"};return e(),window.addEventListener("resize",e),this}},{key:"border",value:function(t,e){return"none"===t&&(this.res.style.border="none"),this.res.style.border="".concat(t," solid ").concat(e,"px"),this}},{key:"frame",value:function(t){return this.res.style.width=t.width,this.res.style.height=t.height,this}},{key:"updating",value:function(t,e){var r=this.res,s=this.text;return Object.defineProperty(t,e,{set:function(t){var e=document.createTextNode(s.replace("$",t));r.replaceChild(e,r.childNodes[0])}}),this}},{key:"onTap",value:function(t){return this.res.addEventListener("click",t),this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,(function(t,e){return"function"==typeof e?e.toString():e}),4).replace(/"(\w+)":/g,"$1:").replace(/"(\(\)\s*=>\s*{[^}]*})"/g,"$1").replace(/\\n/g,"").replace(/\\"/g,'"');return['new Button("'.concat(this.text,'").set(').concat(t,")")]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],r&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{f as Button};
|
package/dist/cardGetter.cjs.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! For license information please see cardGetter.cjs.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function n(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}e.r(t),e.d(t,{CardGen:()=>a});var a=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"cards",value:function(e,t,o){console.log("PP"),console.log(o);for(var n=[],r=0;r<e.children.length;r++){var a=e.children[r];"text"===a&&this.insertTextToCard(n,t,e,o),"image"!==a||e.backgroundCard||n.push('\n new Image("https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg").set({})'),"link"===a&&(t.op?n.push("\n ".concat(o.tabSpace(6)," ").concat(o.link[t.op.theme.toLowerCase()].code)):n.push("\n ".concat(o.tabSpace(6)," ").concat(o.link.base.code)))}return n}},{key:"insertTextToCard",value:function(e,t,o,n){if(t.op)if(t.op.ops&&t.op.ops.includes("text-blast")){var r="\n ".concat(n.tabSpace(6)," ").concat(n.text[t.op.theme.toLowerCase()].code),a=n.ops[t.op.theme.toLowerCase()].blast.code;o.backgroundCard||(a=n.ops[t.op.theme.toLowerCase()].blastFun(1));var c=this.insertTextBetween(r,a);e.push(c)}else e.push("\n ".concat(n.tabSpace(6)," ").concat(n.text[t.op.theme.toLowerCase()].code));else e.push("\n ".concat(n.tabSpace(6)," ").concat(n.text.base.code))}},{key:"insertTextBetween",value:function(e,t){var o=e.match(/(color: ".+?",)(.+?)(id: ".+?")/);if(o){var n=o.index+o[0].length,r=e.slice(0,n)+", "+t+", "+e.slice(n);return console.log("RETA"),console.log(r),r}return e}}],null&&n(e.prototype,null),t&&n(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();module.exports=t})();
|
package/dist/cardGetter.esm.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! For license information please see cardGetter.esm.js.LICENSE.txt */
|
|
2
|
+
var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function n(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}e.d(t,{Z:()=>a});var a=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"cards",value:function(e,t,o){console.log("PP"),console.log(o);for(var n=[],r=0;r<e.children.length;r++){var a=e.children[r];"text"===a&&this.insertTextToCard(n,t,e,o),"image"!==a||e.backgroundCard||n.push('\n new Image("https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg").set({})'),"link"===a&&(t.op?n.push("\n ".concat(o.tabSpace(6)," ").concat(o.link[t.op.theme.toLowerCase()].code)):n.push("\n ".concat(o.tabSpace(6)," ").concat(o.link.base.code)))}return n}},{key:"insertTextToCard",value:function(e,t,o,n){if(t.op)if(t.op.ops&&t.op.ops.includes("text-blast")){var r="\n ".concat(n.tabSpace(6)," ").concat(n.text[t.op.theme.toLowerCase()].code),a=n.ops[t.op.theme.toLowerCase()].blast.code;o.backgroundCard||(a=n.ops[t.op.theme.toLowerCase()].blastFun(1));var c=this.insertTextBetween(r,a);e.push(c)}else e.push("\n ".concat(n.tabSpace(6)," ").concat(n.text[t.op.theme.toLowerCase()].code));else e.push("\n ".concat(n.tabSpace(6)," ").concat(n.text.base.code))}},{key:"insertTextBetween",value:function(e,t){var o=e.match(/(color: ".+?",)(.+?)(id: ".+?")/);if(o){var n=o.index+o[0].length,r=e.slice(0,n)+", "+t+", "+e.slice(n);return console.log("RETA"),console.log(r),r}return e}}],null&&n(e.prototype,null),t&&n(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),c=t.Z;export{c as CardGen};
|
package/dist/center.cjs.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! For license information please see center.cjs.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}e.r(t),e.d(t,{Center:()=>o});var o=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.setup(t)},(t=[{key:"setup",value:function(e){var t=document.createElement("div");e&&t.setAttribute("id",e),t.style.display="flex",t.style.flexDirection="column",t.style.justifyContent="center",t.style.alignItems="center",t.style.width="100%",t.style.height="auto",t.style.margin=0,t.style.padding=0,this.res=t}},{key:"toCode",value:function(){return[""]}},{key:"items",value:function(e){for(var t=0;t<e.length;t++){var r=e[t].render();this.res.appendChild(r)}return this}},{key:"itemWidth",value:function(e){for(var t=0;t<this.res.childNodes.length;t++)this.res.childNodes[t].style.width=e;return this}},{key:"margin",value:function(e,t,r,n){return(e||t||r||n)&&(this.res.style.marginLeft=e,this.res.style.marginTop=t,this.res.style.marginRight=r,this.res.style.marginBottom=n),t||r||n||(alert("j"),this.res.style.margin=e),this}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])&&n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();module.exports=t})();
|
package/dist/center.esm.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! For license information please see center.esm.js.LICENSE.txt */
|
|
2
|
+
var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}e.d(t,{o:()=>o});var o=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.setup(t)},(t=[{key:"setup",value:function(e){var t=document.createElement("div");e&&t.setAttribute("id",e),t.style.display="flex",t.style.flexDirection="column",t.style.justifyContent="center",t.style.alignItems="center",t.style.width="100%",t.style.height="auto",t.style.margin=0,t.style.padding=0,this.res=t}},{key:"toCode",value:function(){return[""]}},{key:"items",value:function(e){for(var t=0;t<e.length;t++){var r=e[t].render();this.res.appendChild(r)}return this}},{key:"itemWidth",value:function(e){for(var t=0;t<this.res.childNodes.length;t++)this.res.childNodes[t].style.width=e;return this}},{key:"margin",value:function(e,t,r,n){return(e||t||r||n)&&(this.res.style.marginLeft=e,this.res.style.marginTop=t,this.res.style.marginRight=r,this.res.style.marginBottom=n),t||r||n||(alert("j"),this.res.style.margin=e),this}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])&&n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),s=t.o;export{s as Center};
|