@flowbase-co/boosters-gsap-text-highlight
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -17,2 +17,2 @@ (function(){"use strict";var _e={grad:.9,turn:360,rad:360/(2*Math.PI)},M=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},S=function(e,t,s){return t===void 0&&(t=0),s===void 0&&(s=Math.pow(10,t)),Math.round(s*e)/s+0},V=function(e,t,s){return t===void 0&&(t=0),s===void 0&&(s=1),e>s?s:e>t?e:t},zt=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qt=function(e){return{r:V(e.r,0,255),g:V(e.g,0,255),b:V(e.b,0,255),a:V(e.a)}},bt=function(e){return{r:S(e.r),g:S(e.g),b:S(e.b),a:S(e.a,3)}},Xe=/^#([0-9a-f]{3,8})$/i,ht=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Yt=function(e){var t=e.r,s=e.g,i=e.b,r=e.a,o=Math.max(t,s,i),l=o-Math.min(t,s,i),f=l?o===t?(s-i)/l:o===s?2+(i-t)/l:4+(t-s)/l:0;return{h:60*(f<0?f+6:f),s:o?l/o*100:0,v:o/255*100,a:r}},Zt=function(e){var t=e.h,s=e.s,i=e.v,r=e.a;t=t/360*6,s/=100,i/=100;var o=Math.floor(t),l=i*(1-s),f=i*(1-(t-o)*s),n=i*(1-(1-t+o)*s),a=o%6;return{r:255*[i,f,l,l,n,i][a],g:255*[n,i,i,f,l,l][a],b:255*[l,l,n,i,i,f][a],a:r}},Kt=function(e){return{h:zt(e.h),s:V(e.s,0,100),l:V(e.l,0,100),a:V(e.a)}},Jt=function(e){return{h:S(e.h),s:S(e.s),l:S(e.l),a:S(e.a,3)}},Qt=function(e){return Zt((s=(t=e).s,{h:t.h,s:(s*=((i=t.l)<50?i:100-i)/100)>0?2*s/(i+s)*100:0,v:i+s,a:t.a}));var t,s,i},nt=function(e){return{h:(t=Yt(e)).h,s:(r=(200-(s=t.s))*(i=t.v)/100)>0&&r<200?s*i/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,s,i,r},Ue=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,He=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Me=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,We=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Et={string:[[function(e){var t=Xe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?S(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?S(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Me.exec(e)||We.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qt({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Ue.exec(e)||He.exec(e);if(!t)return null;var s,i,r=Kt({h:(s=t[1],i=t[2],i===void 0&&(i="deg"),Number(s)*(_e[i]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Qt(r)},"hsl"]],object:[[function(e){var t=e.r,s=e.g,i=e.b,r=e.a,o=r===void 0?1:r;return M(t)&&M(s)&&M(i)?qt({r:Number(t),g:Number(s),b:Number(i),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,s=e.s,i=e.l,r=e.a,o=r===void 0?1:r;if(!M(t)||!M(s)||!M(i))return null;var l=Kt({h:Number(t),s:Number(s),l:Number(i),a:Number(o)});return Qt(l)},"hsl"],[function(e){var t=e.h,s=e.s,i=e.v,r=e.a,o=r===void 0?1:r;if(!M(t)||!M(s)||!M(i))return null;var l=function(f){return{h:zt(f.h),s:V(f.s,0,100),v:V(f.v,0,100),a:V(f.a)}}({h:Number(t),s:Number(s),v:Number(i),a:Number(o)});return Zt(l)},"hsv"]]},te=function(e,t){for(var s=0;s<t.length;s++){var i=t[s][0](e);if(i)return[i,t[s][1]]}return[null,void 0]},ze=function(e){return typeof e=="string"?te(e.trim(),Et.string):typeof e=="object"&&e!==null?te(e,Et.object):[null,void 0]},mt=function(e,t){var s=nt(e);return{h:s.h,s:V(s.s+100*t,0,100),l:s.l,a:s.a}},yt=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ee=function(e,t){var s=nt(e);return{h:s.h,s:s.s,l:V(s.l+100*t,0,100),a:s.a}},vt=function(){function e(t){this.parsed=ze(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return S(yt(this.rgba),2)},e.prototype.isDark=function(){return yt(this.rgba)<.5},e.prototype.isLight=function(){return yt(this.rgba)>=.5},e.prototype.toHex=function(){return t=bt(this.rgba),s=t.r,i=t.g,r=t.b,l=(o=t.a)<1?ht(S(255*o)):"","#"+ht(s)+ht(i)+ht(r)+l;var t,s,i,r,o,l},e.prototype.toRgb=function(){return bt(this.rgba)},e.prototype.toRgbString=function(){return t=bt(this.rgba),s=t.r,i=t.g,r=t.b,(o=t.a)<1?"rgba("+s+", "+i+", "+r+", "+o+")":"rgb("+s+", "+i+", "+r+")";var t,s,i,r,o},e.prototype.toHsl=function(){return Jt(nt(this.rgba))},e.prototype.toHslString=function(){return t=Jt(nt(this.rgba)),s=t.h,i=t.s,r=t.l,(o=t.a)<1?"hsla("+s+", "+i+"%, "+r+"%, "+o+")":"hsl("+s+", "+i+"%, "+r+"%)";var t,s,i,r,o},e.prototype.toHsv=function(){return t=Yt(this.rgba),{h:S(t.h),s:S(t.s),v:S(t.v),a:S(t.a,3)};var t},e.prototype.invert=function(){return N({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),N(mt(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),N(mt(this.rgba,-t))},e.prototype.grayscale=function(){return N(mt(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),N(ee(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),N(ee(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?N({r:(s=this.rgba).r,g:s.g,b:s.b,a:t}):S(this.rgba.a,3);var s},e.prototype.hue=function(t){var s=nt(this.rgba);return typeof t=="number"?N({h:t,s:s.s,l:s.l,a:s.a}):S(s.h)},e.prototype.isEqual=function(t){return this.toHex()===N(t).toHex()},e}(),N=function(e){return e instanceof vt?e:new vt(e)},se=[],qe=function(e){e.forEach(function(t){se.indexOf(t)<0&&(t(vt,Et),se.push(t))})};function Ye(e,t){var s={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var r in s)i[s[r]]=r;var o={};e.prototype.toName=function(l){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var f,n,a=i[this.toHex()];if(a)return a;if(l!=null&&l.closest){var p=this.toRgb(),m=1/0,w="black";if(!o.length)for(var R in s)o[R]=new e(s[R]).toRgb();for(var c in s){var T=(f=p,n=o[c],Math.pow(f.r-n.r,2)+Math.pow(f.g-n.g,2)+Math.pow(f.b-n.b,2));T<m&&(m=T,w=c)}return w}},t.string.push([function(l){var f=l.toLowerCase(),n=f==="transparent"?"#0000":s[f];return n?new e(n).toRgb():null},"name"])}function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}class Ke{constructor(){this.max=1e3,this.map=new Map}get(t){const s=this.map.get(t);if(s!==void 0)return this.map.delete(t),this.map.set(t,s),s}delete(t){return this.map.delete(t)}set(t,s){if(!this.delete(t)&&s!==void 0){if(this.map.size>=this.max){const r=this.map.keys().next().value;this.delete(r)}this.map.set(t,s)}return this}}var Je=Ke;const Qe=Object.freeze({loose:!0}),ts=Object.freeze({});var wt=e=>e?typeof e!="object"?Qe:e:ts,$t={exports:{}};const es="2.0.0",ie=256,ss=Number.MAX_SAFE_INTEGER||9007199254740991,is=16,rs=ie-6;var Rt={MAX_LENGTH:ie,MAX_SAFE_COMPONENT_LENGTH:is,MAX_SAFE_BUILD_LENGTH:rs,MAX_SAFE_INTEGER:ss,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:es,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ct=typeof process=="object"&&{}&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=Rt,o=ct;t=e.exports={};const l=t.re=[],f=t.safeRe=[],n=t.src=[],a=t.t={};let p=0;const m="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",r],[m,i]],R=T=>{for(const[P,_]of w)T=T.split(`${P}*`).join(`${P}{0,${_}}`).split(`${P}+`).join(`${P}{1,${_}}`);return T},c=(T,P,_)=>{const at=R(P),I=p++;o(T,I,P),a[T]=I,n[I]=P,l[I]=new RegExp(P,_?"g":void 0),f[I]=new RegExp(at,_?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","\\d+"),c("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),c("MAINVERSION",`(${n[a.NUMERICIDENTIFIER]})\\.(${n[a.NUMERICIDENTIFIER]})\\.(${n[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${n[a.NUMERICIDENTIFIERLOOSE]})\\.(${n[a.NUMERICIDENTIFIERLOOSE]})\\.(${n[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${n[a.NUMERICIDENTIFIER]}|${n[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${n[a.NUMERICIDENTIFIERLOOSE]}|${n[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${n[a.PRERELEASEIDENTIFIER]}(?:\\.${n[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${n[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER",`${m}+`),c("BUILD",`(?:\\+(${n[a.BUILDIDENTIFIER]}(?:\\.${n[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${n[a.MAINVERSION]}${n[a.PRERELEASE]}?${n[a.BUILD]}?`),c("FULL",`^${n[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${n[a.MAINVERSIONLOOSE]}${n[a.PRERELEASELOOSE]}?${n[a.BUILD]}?`),c("LOOSE",`^${n[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${n[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${n[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${n[a.XRANGEIDENTIFIER]})(?:\\.(${n[a.XRANGEIDENTIFIER]})(?:\\.(${n[a.XRANGEIDENTIFIER]})(?:${n[a.PRERELEASE]})?${n[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${n[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[a.XRANGEIDENTIFIERLOOSE]})(?:${n[a.PRERELEASELOOSE]})?${n[a.BUILD]}?)?)?`),c("XRANGE",`^${n[a.GTLT]}\\s*${n[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${n[a.GTLT]}\\s*${n[a.XRANGEPLAINLOOSE]}$`),c("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),c("COERCE",`${n[a.COERCEPLAIN]}(?:$|[^\\d])`),c("COERCEFULL",n[a.COERCEPLAIN]+`(?:${n[a.PRERELEASE]})?(?:${n[a.BUILD]})?(?:$|[^\\d])`),c("COERCERTL",n[a.COERCE],!0),c("COERCERTLFULL",n[a.COERCEFULL],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${n[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${n[a.LONETILDE]}${n[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${n[a.LONETILDE]}${n[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${n[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${n[a.LONECARET]}${n[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${n[a.LONECARET]}${n[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${n[a.GTLT]}\\s*(${n[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${n[a.GTLT]}\\s*(${n[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${n[a.GTLT]}\\s*(${n[a.LOOSEPLAIN]}|${n[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${n[a.XRANGEPLAIN]})\\s+-\\s+(${n[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${n[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})($t,$t.exports);var It=$t.exports;const re=/^[0-9]+$/,ne=(e,t)=>{const s=re.test(e),i=re.test(t);return s&&i&&(e=+e,t=+t),e===t?0:s&&!i?-1:i&&!s?1:e<t?-1:1};var ns={compareIdentifiers:ne,rcompareIdentifiers:(e,t)=>ne(t,e)};const ut=ct,{MAX_LENGTH:oe,MAX_SAFE_INTEGER:ft}=Rt,{safeRe:ae,t:le}=It,os=wt,{compareIdentifiers:Q}=ns;var Ct=class H{constructor(t,s){if(s=os(s),t instanceof H){if(t.loose===!!s.loose&&t.includePrerelease===!!s.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>oe)throw new TypeError(`version is longer than ${oe} characters`);ut("SemVer",t,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;const i=t.trim().match(s.loose?ae[le.LOOSE]:ae[le.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>ft||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ft||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ft||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){const o=+r;if(o>=0&&o<ft)return o}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(ut("SemVer.compare",this.version,this.options,t),!(t instanceof H)){if(typeof t=="string"&&t===this.version)return 0;t=new H(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof H||(t=new H(t,this.options)),Q(this.major,t.major)||Q(this.minor,t.minor)||Q(this.patch,t.patch)}comparePre(t){if(t instanceof H||(t=new H(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let s=0;do{const i=this.prerelease[s],r=t.prerelease[s];if(ut("prerelease compare",s,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Q(i,r)}while(++s)}compareBuild(t){t instanceof H||(t=new H(t,this.options));let s=0;do{const i=this.build[s],r=t.build[s];if(ut("build compare",s,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Q(i,r)}while(++s)}inc(t,s,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",s,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",s,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",s,i),this.inc("pre",s,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",s,i),this.inc("pre",s,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const r=Number(i)?1:0;if(!s&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[r];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(s===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(s){let o=[s,r];i===!1&&(o=[s]),Q(this.prerelease[0],s)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const he=Ct;var tt=(e,t,s)=>new he(e,s).compare(new he(t,s));const as=tt;var ls=(e,t,s)=>as(e,t,s)===0;const hs=tt;var cs=(e,t,s)=>hs(e,t,s)!==0;const us=tt;var fs=(e,t,s)=>us(e,t,s)>0;const ps=tt;var gs=(e,t,s)=>ps(e,t,s)>=0;const ds=tt;var bs=(e,t,s)=>ds(e,t,s)<0;const Es=tt;var ms=(e,t,s)=>Es(e,t,s)<=0;const ys=ls,vs=cs,ws=fs,$s=gs,Rs=bs,Is=ms;var Cs=(e,t,s,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof s=="object"&&(s=s.version),e===s;case"!==":return typeof e=="object"&&(e=e.version),typeof s=="object"&&(s=s.version),e!==s;case"":case"=":case"==":return ys(e,s,i);case"!=":return vs(e,s,i);case">":return ws(e,s,i);case">=":return $s(e,s,i);case"<":return Rs(e,s,i);case"<=":return Is(e,s,i);default:throw new TypeError(`Invalid operator: ${t}`)}},Tt,ce;function Ts(){if(ce)return Tt;ce=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(p,m){if(m=s(m),p instanceof t){if(p.loose===!!m.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),l("comparator",p,m),this.options=m,this.loose=!!m.loose,this.parse(p),this.semver===e?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(p){const m=this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR],w=p.match(m);if(!w)throw new TypeError(`Invalid comparator: ${p}`);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new f(w[2],this.options.loose):this.semver=e}toString(){return this.value}test(p){if(l("Comparator.test",p,this.options.loose),this.semver===e||p===e)return!0;if(typeof p=="string")try{p=new f(p,this.options)}catch{return!1}return o(p,this.operator,this.semver,this.options)}intersects(p,m){if(!(p instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new n(p.value,m).test(this.value):p.operator===""?p.value===""?!0:new n(this.value,m).test(p.semver):(m=s(m),m.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!m.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||o(this.semver,"<",p.semver,m)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||o(this.semver,">",p.semver,m)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}}Tt=t;const s=wt,{safeRe:i,t:r}=It,o=Cs,l=ct,f=Ct,n=fe();return Tt}var Ot,ue;function fe(){if(ue)return Ot;ue=1;const e=/\s+/g;class t{constructor(h,b){if(b=r(b),h instanceof t)return h.loose===!!b.loose&&h.includePrerelease===!!b.includePrerelease?h:new t(h.raw,b);if(h instanceof o)return this.raw=h.value,this.set=[[h]],this.formatted=void 0,this;if(this.options=b,this.loose=!!b.loose,this.includePrerelease=!!b.includePrerelease,this.raw=h.trim().replace(e," "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(E=>!T(E[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const E of this.set)if(E.length===1&&P(E[0])){this.set=[E];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let h=0;h<this.set.length;h++){h>0&&(this.formatted+="||");const b=this.set[h];for(let g=0;g<b.length;g++)g>0&&(this.formatted+=" "),this.formatted+=b[g].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(h){const g=((this.options.includePrerelease&&R)|(this.options.loose&&c))+":"+h,E=i.get(g);if(E)return E;const d=this.options.loose,y=d?n[a.HYPHENRANGELOOSE]:n[a.HYPHENRANGE];h=h.replace(y,rt(this.options.includePrerelease)),l("hyphen replace",h),h=h.replace(n[a.COMPARATORTRIM],p),l("comparator trim",h),h=h.replace(n[a.TILDETRIM],m),l("tilde trim",h),h=h.replace(n[a.CARETTRIM],w),l("caret trim",h);let $=h.split(" ").map(O=>at(O,this.options)).join(" ").split(/\s+/).map(O=>it(O,this.options));d&&($=$.filter(O=>(l("loose invalid filter",O,this.options),!!O.match(n[a.COMPARATORLOOSE])))),l("range list",$);const v=new Map,C=$.map(O=>new o(O,this.options));for(const O of C){if(T(O))return[O];v.set(O.value,O)}v.size>1&&v.has("")&&v.delete("");const j=[...v.values()];return i.set(g,j),j}intersects(h,b){if(!(h instanceof t))throw new TypeError("a Range is required");return this.set.some(g=>_(g,b)&&h.set.some(E=>_(E,b)&&g.every(d=>E.every(y=>d.intersects(y,b)))))}test(h){if(!h)return!1;if(typeof h=="string")try{h=new f(h,this.options)}catch{return!1}for(let b=0;b<this.set.length;b++)if(Wt(this.set[b],h,this.options))return!0;return!1}}Ot=t;const s=Je,i=new s,r=wt,o=Ts(),l=ct,f=Ct,{safeRe:n,t:a,comparatorTrimReplace:p,tildeTrimReplace:m,caretTrimReplace:w}=It,{FLAG_INCLUDE_PRERELEASE:R,FLAG_LOOSE:c}=Rt,T=u=>u.value==="<0.0.0-0",P=u=>u.value==="",_=(u,h)=>{let b=!0;const g=u.slice();let E=g.pop();for(;b&&g.length;)b=g.every(d=>E.intersects(d,h)),E=g.pop();return b},at=(u,h)=>(l("comp",u,h),u=x(u,h),l("caret",u),u=L(u,h),l("tildes",u),u=J(u,h),l("xrange",u),u=q(u,h),l("stars",u),u),I=u=>!u||u.toLowerCase()==="x"||u==="*",L=(u,h)=>u.trim().split(/\s+/).map(b=>A(b,h)).join(" "),A=(u,h)=>{const b=h.loose?n[a.TILDELOOSE]:n[a.TILDE];return u.replace(b,(g,E,d,y,$)=>{l("tilde",u,g,E,d,y,$);let v;return I(E)?v="":I(d)?v=`>=${E}.0.0 <${+E+1}.0.0-0`:I(y)?v=`>=${E}.${d}.0 <${E}.${+d+1}.0-0`:$?(l("replaceTilde pr",$),v=`>=${E}.${d}.${y}-${$} <${E}.${+d+1}.0-0`):v=`>=${E}.${d}.${y} <${E}.${+d+1}.0-0`,l("tilde return",v),v})},x=(u,h)=>u.trim().split(/\s+/).map(b=>W(b,h)).join(" "),W=(u,h)=>{l("caret",u,h);const b=h.loose?n[a.CARETLOOSE]:n[a.CARET],g=h.includePrerelease?"-0":"";return u.replace(b,(E,d,y,$,v)=>{l("caret",u,E,d,y,$,v);let C;return I(d)?C="":I(y)?C=`>=${d}.0.0${g} <${+d+1}.0.0-0`:I($)?d==="0"?C=`>=${d}.${y}.0${g} <${d}.${+y+1}.0-0`:C=`>=${d}.${y}.0${g} <${+d+1}.0.0-0`:v?(l("replaceCaret pr",v),d==="0"?y==="0"?C=`>=${d}.${y}.${$}-${v} <${d}.${y}.${+$+1}-0`:C=`>=${d}.${y}.${$}-${v} <${d}.${+y+1}.0-0`:C=`>=${d}.${y}.${$}-${v} <${+d+1}.0.0-0`):(l("no pr"),d==="0"?y==="0"?C=`>=${d}.${y}.${$}${g} <${d}.${y}.${+$+1}-0`:C=`>=${d}.${y}.${$}${g} <${d}.${+y+1}.0-0`:C=`>=${d}.${y}.${$} <${+d+1}.0.0-0`),l("caret return",C),C})},J=(u,h)=>(l("replaceXRanges",u,h),u.split(/\s+/).map(b=>z(b,h)).join(" ")),z=(u,h)=>{u=u.trim();const b=h.loose?n[a.XRANGELOOSE]:n[a.XRANGE];return u.replace(b,(g,E,d,y,$,v)=>{l("xRange",u,g,E,d,y,$,v);const C=I(d),j=C||I(y),O=j||I($),lt=O;return E==="="&<&&(E=""),v=h.includePrerelease?"-0":"",C?E===">"||E==="<"?g="<0.0.0-0":g="*":E&<?(j&&(y=0),$=0,E===">"?(E=">=",j?(d=+d+1,y=0,$=0):(y=+y+1,$=0)):E==="<="&&(E="<",j?d=+d+1:y=+y+1),E==="<"&&(v="-0"),g=`${E+d}.${y}.${$}${v}`):j?g=`>=${d}.0.0${v} <${+d+1}.0.0-0`:O&&(g=`>=${d}.${y}.0${v} <${d}.${+y+1}.0-0`),l("xRange return",g),g})},q=(u,h)=>(l("replaceStars",u,h),u.trim().replace(n[a.STAR],"")),it=(u,h)=>(l("replaceGTE0",u,h),u.trim().replace(n[h.includePrerelease?a.GTE0PRE:a.GTE0],"")),rt=u=>(h,b,g,E,d,y,$,v,C,j,O,lt)=>(I(g)?b="":I(E)?b=`>=${g}.0.0${u?"-0":""}`:I(d)?b=`>=${g}.${E}.0${u?"-0":""}`:y?b=`>=${b}`:b=`>=${b}${u?"-0":""}`,I(C)?v="":I(j)?v=`<${+C+1}.0.0-0`:I(O)?v=`<${C}.${+j+1}.0-0`:lt?v=`<=${C}.${j}.${O}-${lt}`:u?v=`<${C}.${j}.${+O+1}-0`:v=`<=${v}`,`${b} ${v}`.trim()),Wt=(u,h,b)=>{for(let g=0;g<u.length;g++)if(!u[g].test(h))return!1;if(h.prerelease.length&&!b.includePrerelease){for(let g=0;g<u.length;g++)if(l(u[g].semver),u[g].semver!==o.ANY&&u[g].semver.prerelease.length>0){const E=u[g].semver;if(E.major===h.major&&E.minor===h.minor&&E.patch===h.patch)return!0}return!1}return!0};return Ot}const Os=fe();var Ns=(e,t,s)=>{try{t=new Os(t,s)}catch{return!1}return t.test(e)};const pe=Ze(Ns);class Nt{constructor(){this.dependencies=[],this.await=[]}static init(){return window.hasOwnProperty("FlowbaseBoosters")||(window.FlowbaseBoosters={}),window.FlowbaseBoosters.hasOwnProperty("deps")||(window.FlowbaseBoosters.deps=new Nt),window.FlowbaseBoosters.deps}register(t){this.dependencies.push(t);const s=t.get();for(const i of this.await)i.name===t.name&&pe(t.version,i.version)&&i.resolve(s)}get(t,s){return new Promise((i,r)=>{const o=this.dependencies.find(l=>t===l.name&&pe(l.version,s));if(!o){const l={name:t,version:s,resolve:f=>i(f)};setTimeout(()=>{r(),this.await.splice(this.await.indexOf(l),1)},1e4),this.await.push(l)}o&&i(o.get())})}}class Ss{constructor(){this.data={}}set(t,s){this.data[t]=s}get(t){return this.data[t]}}const F={Dependencies:Nt,Booster:class{constructor(t){this.options=t}log(t,s){const i=` | ||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y(e,t){return Object.getOwnPropertyNames(Object(e)).reduce(function(s,i){var r=Object.getOwnPropertyDescriptor(Object(e),i),o=Object.getOwnPropertyDescriptor(Object(t),i);return Object.defineProperty(s,i,o||r)},{})}function ot(e){return typeof e=="string"}function Lt(e){return Array.isArray(e)}function pt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Y(e),s;return t.types!==void 0?s=t.types:t.split!==void 0&&(s=t.split),s!==void 0&&(t.types=(ot(s)||Lt(s)?String(s):"").split(",").map(function(i){return String(i).trim()}).filter(function(i){return/((line)|(word)|(char))/i.test(i)})),(t.absolute||t.position)&&(t.absolute=t.absolute||/absolute/.test(e.position)),t}function At(e){var t=ot(e)||Lt(e)?String(e):"";return{none:!t,lines:/line/i.test(t),words:/word/i.test(t),chars:/char/i.test(t)}}function gt(e){return e!==null&&typeof e=="object"}function Vs(e){return gt(e)&&/^(1|3|11)$/.test(e.nodeType)}function Bs(e){return typeof e=="number"&&e>-1&&e%1===0}function Gs(e){return gt(e)&&Bs(e.length)}function Z(e){return Lt(e)?e:e==null?[]:Gs(e)?Array.prototype.slice.call(e):[e]}function ve(e){var t=e;return ot(e)&&(/^(#[a-z]\w+)$/.test(e.trim())?t=document.getElementById(e.trim().slice(1)):t=document.querySelectorAll(e)),Z(t).reduce(function(s,i){return[].concat(D(s),D(Z(i).filter(Vs)))},[])}var _s=Object.entries,dt="_splittype",X={},Xs=0;function U(e,t,s){if(!gt(e))return console.warn("[data.set] owner is not an object"),null;var i=e[dt]||(e[dt]=++Xs),r=X[i]||(X[i]={});return s===void 0?t&&Object.getPrototypeOf(t)===Object.prototype&&(X[i]=Ee(Ee({},r),t)):t!==void 0&&(r[t]=s),s}function K(e,t){var s=gt(e)?e[dt]:null,i=s&&X[s]||{};return t===void 0?i:i[t]}function we(e){var t=e&&e[dt];t&&(delete e[t],delete X[t])}function Us(){Object.keys(X).forEach(function(e){delete X[e]})}function Hs(){_s(X).forEach(function(e){var t=me(e,2),s=t[0],i=t[1],r=i.isRoot,o=i.isSplit;(!r||!o)&&(X[s]=null,delete X[s])})}function Ms(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" ",s=e?String(e):"";return s.trim().replace(/\s+/g," ").split(t)}var xt="\\ud800-\\udfff",$e="\\u0300-\\u036f\\ufe20-\\ufe23",Re="\\u20d0-\\u20f0",Ie="\\ufe0e\\ufe0f",Ws="[".concat(xt,"]"),Pt="[".concat($e).concat(Re,"]"),Dt="\\ud83c[\\udffb-\\udfff]",zs="(?:".concat(Pt,"|").concat(Dt,")"),Ce="[^".concat(xt,"]"),Te="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="\\u200d",Se="".concat(zs,"?"),Le="[".concat(Ie,"]?"),qs="(?:"+Ne+"(?:"+[Ce,Te,Oe].join("|")+")"+Le+Se+")*",Ys=Le+Se+qs,Zs="(?:".concat(["".concat(Ce).concat(Pt,"?"),Pt,Te,Oe,Ws].join("|"),` | ||
)`),Ks=RegExp("".concat(Dt,"(?=").concat(Dt,")|").concat(Zs).concat(Ys),"g"),Js=[Ne,xt,$e,Re,Ie],Qs=RegExp("[".concat(Js.join(""),"]"));function ti(e){return e.split("")}function Ae(e){return Qs.test(e)}function ei(e){return e.match(Ks)||[]}function si(e){return Ae(e)?ei(e):ti(e)}function ii(e){return e==null?"":String(e)}function ri(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e=ii(e),e&&ot(e)&&!t&&Ae(e)?si(e):e.split(t)}function kt(e,t){var s=document.createElement(e);return t&&Object.keys(t).forEach(function(i){var r=t[i],o=ot(r)?r.trim():r;o===null||o===""||(i==="children"?s.append.apply(s,D(Z(o))):s.setAttribute(i,o))}),s}var Ft={splitClass:"",lineClass:"line",wordClass:"word",charClass:"char",types:["lines","words","chars"],absolute:!1,tagName:"div"};function ni(e,t){t=Y(Ft,t);var s=At(t.types),i=t.tagName,r=e.nodeValue,o=document.createDocumentFragment(),l=[],f=[];return/^\s/.test(r)&&o.append(" "),l=Ms(r).reduce(function(n,a,p,m){var w,R;return s.chars&&(R=ri(a).map(function(c){var T=kt(i,{class:"".concat(t.splitClass," ").concat(t.charClass),style:"display: inline-block;",children:c});return U(T,"isChar",!0),f=[].concat(D(f),[T]),T})),s.words||s.lines?(w=kt(i,{class:"".concat(t.wordClass," ").concat(t.splitClass),style:"display: inline-block; ".concat(s.words&&t.absolute?"position: relative;":""),children:s.chars?R:a}),U(w,{isWord:!0,isWordStart:!0,isWordEnd:!0}),o.appendChild(w)):R.forEach(function(c){o.appendChild(c)}),p<m.length-1&&o.append(" "),s.words?n.concat(w):n},[]),/\s$/.test(r)&&o.append(" "),e.replaceWith(o),{words:l,chars:f}}function xe(e,t){var s=e.nodeType,i={words:[],chars:[]};if(!/(1|3|11)/.test(s))return i;if(s===3&&/\S/.test(e.nodeValue))return ni(e,t);var r=Z(e.childNodes);if(r.length&&(U(e,"isSplit",!0),!K(e).isRoot)){e.style.display="inline-block",e.style.position="relative";var o=e.nextSibling,l=e.previousSibling,f=e.textContent||"",n=o?o.textContent:" ",a=l?l.textContent:" ";U(e,{isWordEnd:/\s$/.test(f)||/^\s/.test(n),isWordStart:/^\s/.test(f)||/\s$/.test(a)})}return r.reduce(function(p,m){var w=xe(m,t),R=w.words,c=w.chars;return{words:[].concat(D(p.words),D(R)),chars:[].concat(D(p.chars),D(c))}},i)}function oi(e,t,s,i){if(!s.absolute)return{top:t?e.offsetTop:null};var r=e.offsetParent,o=me(i,2),l=o[0],f=o[1],n=0,a=0;if(r&&r!==document.body){var p=r.getBoundingClientRect();n=p.x+l,a=p.y+f}var m=e.getBoundingClientRect(),w=m.width,R=m.height,c=m.x,T=m.y,P=T+f-a,_=c+l-n;return{width:w,height:R,top:P,left:_}}function Pe(e){K(e).isWord?(we(e),e.replaceWith.apply(e,D(e.childNodes))):Z(e.children).forEach(function(t){return Pe(t)})}var ai=function(){return document.createDocumentFragment()};function li(e,t,s){var i=At(t.types),r=t.tagName,o=e.getElementsByTagName("*"),l=[],f=[],n=null,a,p,m,w=[],R=e.parentElement,c=e.nextElementSibling,T=ai(),P=window.getComputedStyle(e),_=P.textAlign,at=parseFloat(P.fontSize),I=at*.2;return t.absolute&&(m={left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth},p=e.offsetWidth,a=e.offsetHeight,U(e,{cssWidth:e.style.width,cssHeight:e.style.height})),Z(o).forEach(function(L){var A=L.parentElement===e,x=oi(L,A,t,s),W=x.width,J=x.height,z=x.top,q=x.left;/^br$/i.test(L.nodeName)||(i.lines&&A&&((n===null||z-n>=I)&&(n=z,l.push(f=[])),f.push(L)),t.absolute&&U(L,{top:z,left:q,width:W,height:J}))}),R&&R.removeChild(e),i.lines&&(w=l.map(function(L){var A=kt(r,{class:"".concat(t.splitClass," ").concat(t.lineClass),style:"display: block; text-align: ".concat(_,"; width: 100%;")});U(A,"isLine",!0);var x={height:0,top:1e4};return T.appendChild(A),L.forEach(function(W,J,z){var q=K(W),it=q.isWordEnd,rt=q.top,Wt=q.height,u=z[J+1];x.height=Math.max(x.height,Wt),x.top=Math.min(x.top,rt),A.appendChild(W),it&&K(u).isWordStart&&A.append(" ")}),t.absolute&&U(A,{height:x.height,top:x.top}),A}),i.words||Pe(T),e.replaceChildren(T)),t.absolute&&(e.style.width="".concat(e.style.width||p,"px"),e.style.height="".concat(a,"px"),Z(o).forEach(function(L){var A=K(L),x=A.isLine,W=A.top,J=A.left,z=A.width,q=A.height,it=K(L.parentElement),rt=!x&&it.isLine;L.style.top="".concat(rt?W-it.top:W,"px"),L.style.left=x?"".concat(m.left,"px"):"".concat(J-(rt?m.left:0),"px"),L.style.height="".concat(q,"px"),L.style.width=x?"".concat(m.width,"px"):"".concat(z,"px"),L.style.position="absolute"})),R&&(c?R.insertBefore(e,c):R.appendChild(e)),w}var et=Y(Ft,{}),De=function(){de(e,null,[{key:"clearData",value:function(){Us()}},{key:"setDefaults",value:function(s){return et=Y(et,pt(s)),Ft}},{key:"revert",value:function(s){ve(s).forEach(function(i){var r=K(i),o=r.isSplit,l=r.html,f=r.cssWidth,n=r.cssHeight;o&&(i.innerHTML=l,i.style.width=f||"",i.style.height=n||"",we(i))})}},{key:"create",value:function(s,i){return new e(s,i)}},{key:"data",get:function(){return X}},{key:"defaults",get:function(){return et},set:function(s){et=Y(et,pt(s))}}]);function e(t,s){Ls(this,e),this.isSplit=!1,this.settings=Y(et,pt(s)),this.elements=ve(t),this.split()}return de(e,[{key:"split",value:function(s){var i=this;this.revert(),this.elements.forEach(function(l){U(l,"html",l.innerHTML)}),this.lines=[],this.words=[],this.chars=[];var r=[window.pageXOffset,window.pageYOffset];s!==void 0&&(this.settings=Y(this.settings,pt(s)));var o=At(this.settings.types);o.none||(this.elements.forEach(function(l){U(l,"isRoot",!0);var f=xe(l,i.settings),n=f.words,a=f.chars;i.words=[].concat(D(i.words),D(n)),i.chars=[].concat(D(i.chars),D(a))}),this.elements.forEach(function(l){if(o.lines||i.settings.absolute){var f=li(l,i.settings,r);i.lines=[].concat(D(i.lines),D(f))}}),this.isSplit=!0,window.scrollTo(r[0],r[1]),Hs())}},{key:"revert",value:function(){this.isSplit&&(this.lines=null,this.words=null,this.chars=null,this.isSplit=!1),e.revert(this.elements)}}]),e}();const hi=(e,t)=>{let s;return(...i)=>{clearTimeout(s),s=setTimeout(()=>e(...i),t)}};class B{constructor(t,s,i){var r,o,l;if(this.target=t,this.options=s,this.resizeCallback=i,this.lines=null,this.words=null,this.chars=null,!(t instanceof HTMLElement))throw new Error("Invalid target provided");De.setDefaults({lineClass:"fb-line",wordClass:"fb-word",charClass:"fb-char"}),this.split(),((r=this.options)!=null&&r.absolute||(l=(o=this.options)==null?void 0:o.split)!=null&&l.includes("lines")||this.resizeCallback)&&this.initResizeObserver()}split(){const t=new De(this.target,this.options);this.lines=t.lines,this.words=t.words,this.chars=t.chars}initResizeObserver(){new ResizeObserver(hi(s=>this.handleResize(s),100)).observe(this.target)}handleResize(t){const[{contentRect:s}]=t,i=Math.floor(s.width);this.prevTargetWidth&&this.prevTargetWidth!==i&&(this.options&&(this.options.absolute||/lines/.test(String(this.options.split)))&&this.split(),this.resizeCallback&&this.resizeCallback()),this.prevTargetWidth=i}}const G=(e,t)=>(e.onEnter=()=>t.play(),t.once?e.once=!0:(e.onLeaveBack=()=>t.reset(),t.direction==="both"&&(e.onEnterBack=()=>t.play(),e.onLeave=()=>t.reset())),e);class ci{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.display="inline-block",this.gsap.set(this.element,{perspective:500}),this.gsap.set(this.split.words,{transformStyle:"preserve-3d"})}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.chars,{opacity:0,rotationX:-45,z:300},{opacity:1,rotationX:0,z:0,duration:.8,ease:"power2",stagger:.04})}reset(){var t;(t=this.split.chars)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{clearProps:"opacity,rotationX,z"})})}}class ui{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}play(){var s;const t=this.gsap.timeline({defaults:{duration:.6,ease:"power1"}}).timeScale(this.options.speedFactor);(s=this.split.chars)==null||s.forEach((i,r)=>{t.to(i,{opacity:0,delay:r*.05,repeat:2,yoyo:!0},0).to(i,{opacity:1},">")})}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"opacity"})}}const ke={colorEnd:"#d686c1",shadowColor:"#ffdbf5"},jt={colorEnd:`var(--fb-highlight-color-end, ${ke.colorEnd})`,shadowColor:`var(--fb-highlight-shadow-color, ${ke.shadowColor})`};class fi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}play(){const t={duration:.5,ease:"power1"};this.gsap.timeline({defaults:t}).timeScale(this.options.speedFactor).set(this.split.chars,{willChange:"color, filter, opacity, transform"}).to(this.split.chars,{opacity:0,scale:.8,stagger:.06}).to(this.split.chars,{startAt:{filter:`drop-shadow(0px 0px 0px ${this.options.highlightShadowColor||jt.shadowColor})`},color:this.options.highlightColorEnd||jt.colorEnd,filter:`drop-shadow(0px 0px 20px ${this.options.highlightShadowColor||jt.shadowColor})`,opacity:1,scale:1,stagger:.06},t.duration)}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"color,filter,opacity,scale"})}}const Fe={colorEnd:"#49af42",colorEndAlt:"#4252af"},je={colorEnd:`var(--fb-highlight-color-end, ${Fe.colorEnd})`,colorEndAlt:`var(--fb-highlight-color-end-alt, ${Fe.colorEndAlt})`};class pi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}play(){const t={duration:.3,ease:"power3.in"};this.gsap.timeline({defaults:t}).timeScale(this.options.speedFactor).set(this.split.chars,{willChange:"color, opacity, transform"}).to(this.split.chars,{color:this.options.highlightColorEnd||je.colorEnd,scale:1.45,stagger:.05}).to(this.split.chars,{color:this.options.highlightColorEndAlt||je.colorEndAlt,scale:1,duration:.4,ease:"sine",stagger:.05},t.duration)}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"color,scale"})}}const Vt={bgColor:"#6a5ace",bgInset:"-2px -8px",bgRadius:"8px"},Bt={bgColor:`var(--fb-highlight-bg-color, ${Vt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Vt.bgInset})`,bgRadius:`var(--fb-highlight-bg-radius, ${Vt.bgRadius})`};class gi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||Bt.bgInset,this.bgEl.style.zIndex="-1",this.bgEl.style.width="auto",this.bgEl.style.height="auto",this.bgEl.style.borderRadius=this.options.highlightBgRadius||Bt.bgRadius,this.bgEl.style.backgroundColor=this.options.highlightBgColor||Bt.bgColor,this.bgEl.style.transform="scale(0)"}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.chars,{opacity:0,scale:1.3},{opacity:1,scale:1,duration:.4,ease:"power1",stagger:t=>.1+.05*t}).fromTo(this.bgEl,{scale:0},{scale:1,duration:.8,ease:"expo"},0)}reset(){var t;(t=this.split.chars)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{clearProps:"opacity,scale"})}),this.gsap.killTweensOf(this.bgEl),this.gsap.set(this.bgEl,{scale:0})}}const Gt={bgColor:"#dc764c",bgInset:"-2px -8px",bgRadius:"8px"},_t={bgColor:`var(--fb-highlight-bg-color, ${Gt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Gt.bgInset})`,bgRadius:`var(--fb-highlight-bg-radius, ${Gt.bgRadius})`};class di{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||_t.bgInset,this.bgEl.style.zIndex="-1",this.bgEl.style.width="0%",this.bgEl.style.height="auto",this.bgEl.style.borderRadius=this.options.highlightBgRadius||_t.bgRadius,this.bgEl.style.backgroundColor=this.options.highlightBgColor||_t.bgColor}play(){this.gsap.timeline({defaults:{duration:.1,ease:"sine"}}).timeScale(this.options.speedFactor).to(this.split.chars,{opacity:0,stagger:(t,s,i)=>.06*(i.length-1-t)}).to(this.split.chars,{opacity:1,stagger:t=>.2+.05*t}).fromTo(this.bgEl,{width:"0%",willChange:"width"},{width:"auto",duration:1,ease:"power4"},"<")}reset(){this.gsap.killTweensOf([this.split.chars,this.bgEl]),this.gsap.set(this.split.chars,{clearProps:"opacity"}),this.gsap.set(this.bgEl,{width:"0%"})}}const Xt={bgColor:"#437745",bgInset:"-2px -8px",bgRadius:"8px"},Ut={bgColor:`var(--fb-highlight-bg-color, ${Xt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Xt.bgInset})`,bgRadius:`var(--fb-highlight-bg-radius, ${Xt.bgRadius})`};class bi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||Ut.bgInset,this.bgEl.style.zIndex="-1",this.bgEl.style.width="auto",this.bgEl.style.height="0%",this.bgEl.style.borderRadius=this.options.highlightBgRadius||Ut.bgRadius,this.bgEl.style.backgroundColor=this.options.highlightBgColor||Ut.bgColor}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.chars,{scaleY:0,transformOrigin:"50% 80%"},{scaleY:1,duration:.2,ease:"sine",stagger:t=>.2+.05*t}).fromTo(this.bgEl,{height:"0%",willChange:"height"},{height:"auto",duration:.7,ease:"sine.inOut"},"<")}reset(){var t;(t=this.split.chars)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{clearProps:"scaleY"})}),this.gsap.killTweensOf(this.bgEl),this.gsap.set(this.bgEl,{height:"0%"})}}const Ei={colorEnd:`var(--fb-highlight-color-end, ${{colorEnd:"#c3c58c"}.colorEnd})`};class mi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words"}),this.split.words&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.gsap.set(this.split.words,{transformOrigin:"0% 50%"})}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.words,{opacity:0,rotationZ:-30},{color:this.options.highlightColorEnd||Ei.colorEnd,opacity:1,rotationZ:0,duration:1.2,ease:"elastic.out(0.7)",stagger:.2}).timeScale(this.options.speedFactor)}reset(){var t;(t=this.split.words)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{opacity:1,rotationZ:0,clearProps:"color"})})}}const yi={colorEnd:`var(--fb-highlight-color-end, ${{colorEnd:"#a86088"}.colorEnd})`};class vi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.originalChars=[],this.duplicateChars=[],this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){if(this.split.chars)for(const t of this.split.chars){const s=document.createElement("div"),i=document.createElement("div");s.innerHTML=t.innerHTML,i.innerHTML=t.innerHTML,t.innerHTML="",s.style.color=this.options.highlightColorEnd||yi.colorEnd,i.style.position="absolute",i.style.inset="0",i.style.pointerEvents="none",i.style.userSelect="none",t.style.position="relative",t.append(s,i),this.originalChars.push(s),this.duplicateChars.push(i)}}play(){if(!this.split.chars)return;const t=Array.from(this.split.chars,()=>this.gsap.utils.random(-45,45)),s=this.gsap.timeline({defaults:{stagger:i=>.06*(i+1)}}).timeScale(this.options.speedFactor);s.fromTo(this.originalChars,{opacity:0,rotation:i=>t[i],yPercent:80},{opacity:1,rotation:0,yPercent:0,duration:.2,ease:"sine"}),s.to(this.duplicateChars,{opacity:0,rotation:i=>-1*t[i],scale:this.gsap.utils.random(1,2),xPercent:this.gsap.utils.random(-15,15),yPercent:this.gsap.utils.random(-130,-50),duration:1,ease:"expo"},0)}reset(){this.gsap.killTweensOf([this.originalChars,this.duplicateChars]),this.gsap.set(this.originalChars,{opacity:0,rotation:0,yPercent:0}),this.gsap.set(this.duplicateChars,{opacity:1,rotation:0,scale:1,xPercent:0,yPercent:0})}}const wi={colors:["#ff0000"]};class $i{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.colors=wi.colors,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.options.highlightColors.length&&(this.colors=this.options.highlightColors)}play(){var s;const t=this.gsap.timeline().timeScale(this.options.speedFactor);(s=this.split.chars)==null||s.forEach(i=>{const r=this.gsap.utils.random(this.colors);t.fromTo(i,{filter:`brightness(100%) drop-shadow(0 0 0 ${r})`,willChange:"filter"},{filter:`brightness(300%) drop-shadow(0 0 50px ${r})`,delay:this.gsap.utils.random(0,1),duration:.2,ease:"power2.in",immediateRender:!1,repeat:1,yoyo:!0,onComplete:()=>{this.gsap.set(i,{clearProps:"filter"})}},0)})}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"filter"})}}const Ht={duplicates:8,colorEnd:"#fff"},Ve={colorEnd:`var(--fb-highlight-color-end, ${Ht.colorEnd})`};class Ri{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words"}),this.split.words&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){if(this.split.words)for(const t of this.split.words){t.style.position="relative";const s=t.cloneNode(!0);s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.opacity="0",s.style.pointerEvents="none",s.style.userSelect="none",s.style.color=this.options.highlightColorEnd||Ve.colorEnd;for(let i=0;i<(this.options.highlightDuplicates||Ht.duplicates);i++)t.appendChild(s.cloneNode(!0))}}play(){var r;const s={duration:.15*(this.options.highlightDuplicates||Ht.duplicates),ease:"expo"},i=this.gsap.timeline({defaults:s}).timeScale(this.options.speedFactor);(r=this.split.words)==null||r.forEach(o=>{const l=o.querySelectorAll(".fb-word");i.fromTo(l,{opacity:0,yPercent:150},{opacity:1,yPercent:0,stagger:.15},0).to(l,{opacity:0,duration:.01,stagger:.15},s.duration).to(o,{color:this.options.highlightColorEnd||Ve.colorEnd},s.duration-.15)})}reset(){var t;(t=this.split.words)==null||t.forEach(s=>{const i=s.querySelectorAll(".fb-word");this.gsap.killTweensOf([i,s]),this.gsap.set(i,{opacity:"0"}),this.gsap.set(s,{clearProps:"color"})})}}const Mt={bgColor:"#6dd7e6",bgInset:"0 -4px",shadowColor:"#ffdbf5"},st={bgColor:`var(--fb-highlight-bg-color, ${Mt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Mt.bgInset})`,shadowColor:`var(--fb-highlight-shadow-color, ${Mt.shadowColor})`};class Ii{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||st.bgInset,this.bgEl.style.width="0%",this.bgEl.style.height="auto",this.bgEl.style.mixBlendMode="plus-lighter";let t=this.options.highlightBgColor;t||(this.bgEl.style.backgroundColor=st.bgColor,t=getComputedStyle(this.bgEl).getPropertyValue("background-color")),this.bgEl.style.backgroundColor=N(t).alpha(.14).toRgbString();const s=document.createElement("div");s.style.position="absolute",s.style.display="flex",s.style.flexDirection="column",s.style.alignItems="center";const i=s.cloneNode(!0);s.style.top="-7px",s.style.bottom="0",s.style.left="0",s.style.transform="translateX(-50%)",i.style.top="0",i.style.bottom="-7px",i.style.right="0",i.style.transform="translateX(50%)";const r=document.createElement("div"),o=document.createElement("div");r.style.flexShrink="0",r.style.width="8px",r.style.height="8px",r.style.borderRadius="100%",r.style.backgroundColor=this.options.highlightBgColor||st.bgColor,o.style.width="1px",o.style.height="100%",o.style.backgroundColor=this.options.highlightBgColor||st.bgColor,s.append(r.cloneNode(!0),o.cloneNode(!0)),i.append(o.cloneNode(!0),r.cloneNode(!0)),this.bgEl.append(s,i)}play(){this.gsap.timeline().timeScale(this.options.speedFactor).to(this.split.chars,{startAt:{filter:`drop-shadow(0px 0px 0px ${this.options.highlightShadowColor||st.shadowColor})`},filter:`drop-shadow(0px 0px 20px ${this.options.highlightShadowColor||st.shadowColor})`,duration:.4,ease:"power1.inOut",stagger:.03}).fromTo(this.bgEl,{width:"0%",willChange:"width"},{width:"auto",duration:.8,ease:"expo"},"<")}reset(){this.gsap.killTweensOf([this.split.chars,this.bgEl]),this.gsap.set(this.split.chars,{clearProps:"filter"}),this.gsap.set(this.bgEl,{width:"0%"})}}const Ci=[1,2,3,4,5,6,7,8,9,10,11,12],Ti=["both","forward"];qe([Ye]);let k;const Be=new F.Booster({name:"fb-text-highlight",attributes:{"fb-text-highlight-type":{defaultValue:1,validate:e=>F.validation.isValidType(Number(e),Ci),parse:e=>Number(e)},"fb-text-highlight-direction":{defaultValue:"both",validate:e=>F.validation.isValidType(e,Ti),parse:e=>e},"fb-text-highlight-multi-line":{defaultValue:!1,validate:F.validation.isBoolean,parse:F.parse.stringToBoolean},"fb-text-highlight-offset":{defaultValue:0,validate:F.validation.isNumber,parse:Number},"fb-text-highlight-once":{defaultValue:!1,validate:F.validation.isBoolean,parse:F.parse.stringToBoolean},"fb-text-highlight-speed":{defaultValue:1,validate:e=>{if(!F.validation.isNumber(e))return!1;const t=Number(e);return t>=.5&&t<=2},parse:Number},"fb-text-highlight-class":{defaultValue:void 0,parse:e=>e.toLowerCase().replaceAll(" ","-")},"fb-text-highlight-colors":{defaultValue:[],parse:e=>{var t;return(t=e.match(/([^(,]+(?:\([^)]+\))?|[^,]+)/g))==null?void 0:t.map(s=>s.trim()).filter(s=>N(s).isValid())}},"fb-text-highlight-duplicates":{defaultValue:0,validate:F.validation.isNumber,parse:Number},"fb-text-highlight-bg-color":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()},"fb-text-highlight-bg-inset":{defaultValue:void 0,validate:e=>F.validation.isValidCSSPropertyValue("inset",e)},"fb-text-highlight-bg-radius":{defaultValue:void 0,validate:e=>F.validation.isValidCSSPropertyValue("border-radius",e)},"fb-text-highlight-color-end":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()},"fb-text-highlight-color-end-alt":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()},"fb-text-highlight-shadow-color":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()}},async apply(e,t){if(!k)return;e.style.fontKerning="none",e.style.textRendering="optimizeSpeed";const s=t.get("fb-text-highlight-type"),i=t.get("fb-text-highlight-direction"),r=t.get("fb-text-highlight-offset"),o=t.get("fb-text-highlight-once"),l=t.get("fb-text-highlight-speed"),f=t.get("fb-text-highlight-multi-line"),n=t.get("fb-text-highlight-class"),a=t.get("fb-text-highlight-bg-color"),p=t.get("fb-text-highlight-bg-inset"),m=t.get("fb-text-highlight-bg-radius"),w=t.get("fb-text-highlight-color-end"),R=t.get("fb-text-highlight-shadow-color"),c={direction:i,offset:r,once:o,speedFactor:l};switch(s){case 1:return new ci(e,k,c);case 2:return new ui(e,k,c);case 3:return new fi(e,k,{...c,highlightColorEnd:w,highlightShadowColor:R});case 4:return new pi(e,k,{...c,highlightColorEnd:w,highlightColorEndAlt:t.get("fb-text-highlight-color-end-alt")});case 5:return new gi(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightBgRadius:m});case 6:return new di(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightBgRadius:m});case 7:return new bi(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightBgRadius:m});case 8:return new mi(e,k,{...c,highlightColorEnd:w});case 9:return new vi(e,k,{...c,highlightColorEnd:w});case 10:return new $i(e,k,{...c,highlightColors:t.get("fb-text-highlight-colors")});case 11:return new Ri(e,k,{...c,highlightDuplicates:t.get("fb-text-highlight-duplicates"),highlightColorEnd:w});case 12:return new Ii(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightShadowColor:R})}},title:"GSAP Text Highlight Booster",documentationLink:"https://www.flowbase.co/booster/gsap-text-highlight"}),Ge=async()=>{if(k=await F.Dependencies.init().get("gsap","3.12.x").catch(()=>{}),!k)return Be.log("GSAP isn't initialized");Be.init()};document.readyState==="complete"?Ge():window.addEventListener("load",Ge)})(); | ||
)`),Ks=RegExp("".concat(Dt,"(?=").concat(Dt,")|").concat(Zs).concat(Ys),"g"),Js=[Ne,xt,$e,Re,Ie],Qs=RegExp("[".concat(Js.join(""),"]"));function ti(e){return e.split("")}function Ae(e){return Qs.test(e)}function ei(e){return e.match(Ks)||[]}function si(e){return Ae(e)?ei(e):ti(e)}function ii(e){return e==null?"":String(e)}function ri(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e=ii(e),e&&ot(e)&&!t&&Ae(e)?si(e):e.split(t)}function kt(e,t){var s=document.createElement(e);return t&&Object.keys(t).forEach(function(i){var r=t[i],o=ot(r)?r.trim():r;o===null||o===""||(i==="children"?s.append.apply(s,D(Z(o))):s.setAttribute(i,o))}),s}var Ft={splitClass:"",lineClass:"line",wordClass:"word",charClass:"char",types:["lines","words","chars"],absolute:!1,tagName:"div"};function ni(e,t){t=Y(Ft,t);var s=At(t.types),i=t.tagName,r=e.nodeValue,o=document.createDocumentFragment(),l=[],f=[];return/^\s/.test(r)&&o.append(" "),l=Ms(r).reduce(function(n,a,p,m){var w,R;return s.chars&&(R=ri(a).map(function(c){var T=kt(i,{class:"".concat(t.splitClass," ").concat(t.charClass),style:"display: inline-block;",children:c});return U(T,"isChar",!0),f=[].concat(D(f),[T]),T})),s.words||s.lines?(w=kt(i,{class:"".concat(t.wordClass," ").concat(t.splitClass),style:"display: inline-block; ".concat(s.words&&t.absolute?"position: relative;":""),children:s.chars?R:a}),U(w,{isWord:!0,isWordStart:!0,isWordEnd:!0}),o.appendChild(w)):R.forEach(function(c){o.appendChild(c)}),p<m.length-1&&o.append(" "),s.words?n.concat(w):n},[]),/\s$/.test(r)&&o.append(" "),e.replaceWith(o),{words:l,chars:f}}function xe(e,t){var s=e.nodeType,i={words:[],chars:[]};if(!/(1|3|11)/.test(s))return i;if(s===3&&/\S/.test(e.nodeValue))return ni(e,t);var r=Z(e.childNodes);if(r.length&&(U(e,"isSplit",!0),!K(e).isRoot)){e.style.display="inline-block",e.style.position="relative";var o=e.nextSibling,l=e.previousSibling,f=e.textContent||"",n=o?o.textContent:" ",a=l?l.textContent:" ";U(e,{isWordEnd:/\s$/.test(f)||/^\s/.test(n),isWordStart:/^\s/.test(f)||/\s$/.test(a)})}return r.reduce(function(p,m){var w=xe(m,t),R=w.words,c=w.chars;return{words:[].concat(D(p.words),D(R)),chars:[].concat(D(p.chars),D(c))}},i)}function oi(e,t,s,i){if(!s.absolute)return{top:t?e.offsetTop:null};var r=e.offsetParent,o=me(i,2),l=o[0],f=o[1],n=0,a=0;if(r&&r!==document.body){var p=r.getBoundingClientRect();n=p.x+l,a=p.y+f}var m=e.getBoundingClientRect(),w=m.width,R=m.height,c=m.x,T=m.y,P=T+f-a,_=c+l-n;return{width:w,height:R,top:P,left:_}}function Pe(e){K(e).isWord?(we(e),e.replaceWith.apply(e,D(e.childNodes))):Z(e.children).forEach(function(t){return Pe(t)})}var ai=function(){return document.createDocumentFragment()};function li(e,t,s){var i=At(t.types),r=t.tagName,o=e.getElementsByTagName("*"),l=[],f=[],n=null,a,p,m,w=[],R=e.parentElement,c=e.nextElementSibling,T=ai(),P=window.getComputedStyle(e),_=P.textAlign,at=parseFloat(P.fontSize),I=at*.2;return t.absolute&&(m={left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth},p=e.offsetWidth,a=e.offsetHeight,U(e,{cssWidth:e.style.width,cssHeight:e.style.height})),Z(o).forEach(function(L){var A=L.parentElement===e,x=oi(L,A,t,s),W=x.width,J=x.height,z=x.top,q=x.left;/^br$/i.test(L.nodeName)||(i.lines&&A&&((n===null||z-n>=I)&&(n=z,l.push(f=[])),f.push(L)),t.absolute&&U(L,{top:z,left:q,width:W,height:J}))}),R&&R.removeChild(e),i.lines&&(w=l.map(function(L){var A=kt(r,{class:"".concat(t.splitClass," ").concat(t.lineClass),style:"display: block; text-align: ".concat(_,"; width: 100%;")});U(A,"isLine",!0);var x={height:0,top:1e4};return T.appendChild(A),L.forEach(function(W,J,z){var q=K(W),it=q.isWordEnd,rt=q.top,Wt=q.height,u=z[J+1];x.height=Math.max(x.height,Wt),x.top=Math.min(x.top,rt),A.appendChild(W),it&&K(u).isWordStart&&A.append(" ")}),t.absolute&&U(A,{height:x.height,top:x.top}),A}),i.words||Pe(T),e.replaceChildren(T)),t.absolute&&(e.style.width="".concat(e.style.width||p,"px"),e.style.height="".concat(a,"px"),Z(o).forEach(function(L){var A=K(L),x=A.isLine,W=A.top,J=A.left,z=A.width,q=A.height,it=K(L.parentElement),rt=!x&&it.isLine;L.style.top="".concat(rt?W-it.top:W,"px"),L.style.left=x?"".concat(m.left,"px"):"".concat(J-(rt?m.left:0),"px"),L.style.height="".concat(q,"px"),L.style.width=x?"".concat(m.width,"px"):"".concat(z,"px"),L.style.position="absolute"})),R&&(c?R.insertBefore(e,c):R.appendChild(e)),w}var et=Y(Ft,{}),De=function(){de(e,null,[{key:"clearData",value:function(){Us()}},{key:"setDefaults",value:function(s){return et=Y(et,pt(s)),Ft}},{key:"revert",value:function(s){ve(s).forEach(function(i){var r=K(i),o=r.isSplit,l=r.html,f=r.cssWidth,n=r.cssHeight;o&&(i.innerHTML=l,i.style.width=f||"",i.style.height=n||"",we(i))})}},{key:"create",value:function(s,i){return new e(s,i)}},{key:"data",get:function(){return X}},{key:"defaults",get:function(){return et},set:function(s){et=Y(et,pt(s))}}]);function e(t,s){Ls(this,e),this.isSplit=!1,this.settings=Y(et,pt(s)),this.elements=ve(t),this.split()}return de(e,[{key:"split",value:function(s){var i=this;this.revert(),this.elements.forEach(function(l){U(l,"html",l.innerHTML)}),this.lines=[],this.words=[],this.chars=[];var r=[window.pageXOffset,window.pageYOffset];s!==void 0&&(this.settings=Y(this.settings,pt(s)));var o=At(this.settings.types);o.none||(this.elements.forEach(function(l){U(l,"isRoot",!0);var f=xe(l,i.settings),n=f.words,a=f.chars;i.words=[].concat(D(i.words),D(n)),i.chars=[].concat(D(i.chars),D(a))}),this.elements.forEach(function(l){if(o.lines||i.settings.absolute){var f=li(l,i.settings,r);i.lines=[].concat(D(i.lines),D(f))}}),this.isSplit=!0,window.scrollTo(r[0],r[1]),Hs())}},{key:"revert",value:function(){this.isSplit&&(this.lines=null,this.words=null,this.chars=null,this.isSplit=!1),e.revert(this.elements)}}]),e}();const hi=(e,t)=>{let s;return(...i)=>{clearTimeout(s),s=setTimeout(()=>e(...i),t)}};class B{constructor(t,s,i){var r,o,l;if(this.target=t,this.options=s,this.resizeCallback=i,this.lines=null,this.words=null,this.chars=null,!(t instanceof HTMLElement))throw new Error("Invalid target provided");De.setDefaults({lineClass:"fb-line",wordClass:"fb-word",charClass:"fb-char"}),this.split(),((r=this.options)!=null&&r.absolute||(l=(o=this.options)==null?void 0:o.split)!=null&&l.includes("lines")||this.resizeCallback)&&this.initResizeObserver()}split(){const t=new De(this.target,this.options);this.lines=t.lines,this.words=t.words,this.chars=t.chars}initResizeObserver(){new ResizeObserver(hi(s=>this.handleResize(s),100)).observe(this.target)}handleResize(t){const[{contentRect:s}]=t,i=Math.floor(s.width);this.prevTargetWidth&&this.prevTargetWidth!==i&&(this.options&&(this.options.absolute||/lines/.test(String(this.options.split)))&&this.split(),this.resizeCallback&&this.resizeCallback()),this.prevTargetWidth=i}}const G=(e,t)=>(e.onEnter=()=>t.play(),t.once?e.once=!0:(e.onLeaveBack=()=>t.reset(),t.direction==="both"&&(e.onEnterBack=()=>t.play(),e.onLeave=()=>t.reset())),e);class ci{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.display="inline-block",this.gsap.set(this.element,{perspective:500}),this.gsap.set(this.split.words,{transformStyle:"preserve-3d"})}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.chars,{opacity:0,rotationX:-45,z:300},{opacity:1,rotationX:0,z:0,duration:.8,ease:"power2",stagger:.04})}reset(){var t;(t=this.split.chars)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{clearProps:"opacity,rotationX,z"})})}}class ui{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}play(){var s;const t=this.gsap.timeline({defaults:{duration:.6,ease:"power1"}}).timeScale(this.options.speedFactor);(s=this.split.chars)==null||s.forEach((i,r)=>{t.to(i,{opacity:0,delay:r*.05,repeat:2,yoyo:!0},0).to(i,{opacity:1},">")})}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"opacity"})}}const ke={colorEnd:"#d686c1",shadowColor:"#ffdbf5"},jt={colorEnd:`var(--fb-highlight-color-end, ${ke.colorEnd})`,shadowColor:`var(--fb-highlight-shadow-color, ${ke.shadowColor})`};class fi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}play(){const t={duration:.5,ease:"power1"};this.gsap.timeline({defaults:t}).timeScale(this.options.speedFactor).set(this.split.chars,{willChange:"color, filter, opacity, transform"}).to(this.split.chars,{opacity:0,scale:.8,stagger:.06}).to(this.split.chars,{startAt:{filter:`drop-shadow(0px 0px 0px ${this.options.highlightShadowColor||jt.shadowColor})`},color:this.options.highlightColorEnd||jt.colorEnd,filter:`drop-shadow(0px 0px 20px ${this.options.highlightShadowColor||jt.shadowColor})`,opacity:1,scale:1,stagger:.06},t.duration)}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"color,filter,opacity,scale"})}}const Fe={colorEnd:"#49af42",colorEndAlt:"#4252af"},je={colorEnd:`var(--fb-highlight-color-end, ${Fe.colorEnd})`,colorEndAlt:`var(--fb-highlight-color-end-alt, ${Fe.colorEndAlt})`};class pi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}play(){const t={duration:.3,ease:"power3.in"};this.gsap.timeline({defaults:t}).timeScale(this.options.speedFactor).set(this.split.chars,{willChange:"color, opacity, transform"}).to(this.split.chars,{color:this.options.highlightColorEnd||je.colorEnd,scale:1.45,stagger:.05}).to(this.split.chars,{color:this.options.highlightColorEndAlt||je.colorEndAlt,scale:1,duration:.4,ease:"sine",stagger:.05},t.duration)}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"color,scale"})}}const Vt={bgColor:"#6a5ace",bgInset:"-2px -8px",bgRadius:"8px"},Bt={bgColor:`var(--fb-highlight-bg-color, ${Vt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Vt.bgInset})`,bgRadius:`var(--fb-highlight-bg-radius, ${Vt.bgRadius})`};class gi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.element.style.isolation="isolate",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||Bt.bgInset,this.bgEl.style.zIndex="-1",this.bgEl.style.width="auto",this.bgEl.style.height="auto",this.bgEl.style.borderRadius=this.options.highlightBgRadius||Bt.bgRadius,this.bgEl.style.backgroundColor=this.options.highlightBgColor||Bt.bgColor,this.bgEl.style.transform="scale(0)"}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.chars,{opacity:0,scale:1.3},{opacity:1,scale:1,duration:.4,ease:"power1",stagger:t=>.1+.05*t}).fromTo(this.bgEl,{scale:0},{scale:1,duration:.8,ease:"expo"},0)}reset(){var t;(t=this.split.chars)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{clearProps:"opacity,scale"})}),this.gsap.killTweensOf(this.bgEl),this.gsap.set(this.bgEl,{scale:0})}}const Gt={bgColor:"#dc764c",bgInset:"-2px -8px",bgRadius:"8px"},_t={bgColor:`var(--fb-highlight-bg-color, ${Gt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Gt.bgInset})`,bgRadius:`var(--fb-highlight-bg-radius, ${Gt.bgRadius})`};class di{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.element.style.isolation="isolate",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||_t.bgInset,this.bgEl.style.zIndex="-1",this.bgEl.style.width="0%",this.bgEl.style.height="auto",this.bgEl.style.borderRadius=this.options.highlightBgRadius||_t.bgRadius,this.bgEl.style.backgroundColor=this.options.highlightBgColor||_t.bgColor}play(){this.gsap.timeline({defaults:{duration:.1,ease:"sine"}}).timeScale(this.options.speedFactor).to(this.split.chars,{opacity:0,stagger:(t,s,i)=>.06*(i.length-1-t)}).to(this.split.chars,{opacity:1,stagger:t=>.2+.05*t}).fromTo(this.bgEl,{width:"0%",willChange:"width"},{width:"auto",duration:1,ease:"power4"},"<")}reset(){this.gsap.killTweensOf([this.split.chars,this.bgEl]),this.gsap.set(this.split.chars,{clearProps:"opacity"}),this.gsap.set(this.bgEl,{width:"0%"})}}const Xt={bgColor:"#437745",bgInset:"-2px -8px",bgRadius:"8px"},Ut={bgColor:`var(--fb-highlight-bg-color, ${Xt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Xt.bgInset})`,bgRadius:`var(--fb-highlight-bg-radius, ${Xt.bgRadius})`};class bi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.element.style.isolation="isolate",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||Ut.bgInset,this.bgEl.style.zIndex="-1",this.bgEl.style.width="auto",this.bgEl.style.height="0%",this.bgEl.style.borderRadius=this.options.highlightBgRadius||Ut.bgRadius,this.bgEl.style.backgroundColor=this.options.highlightBgColor||Ut.bgColor}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.chars,{scaleY:0,transformOrigin:"50% 80%"},{scaleY:1,duration:.2,ease:"sine",stagger:t=>.2+.05*t}).fromTo(this.bgEl,{height:"0%",willChange:"height"},{height:"auto",duration:.7,ease:"sine.inOut"},"<")}reset(){var t;(t=this.split.chars)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{clearProps:"scaleY"})}),this.gsap.killTweensOf(this.bgEl),this.gsap.set(this.bgEl,{height:"0%"})}}const Ei={colorEnd:`var(--fb-highlight-color-end, ${{colorEnd:"#c3c58c"}.colorEnd})`};class mi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words"}),this.split.words&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.gsap.set(this.split.words,{transformOrigin:"0% 50%"})}play(){this.gsap.timeline().timeScale(this.options.speedFactor).fromTo(this.split.words,{opacity:0,rotationZ:-30},{color:this.options.highlightColorEnd||Ei.colorEnd,opacity:1,rotationZ:0,duration:1.2,ease:"elastic.out(0.7)",stagger:.2}).timeScale(this.options.speedFactor)}reset(){var t;(t=this.split.words)==null||t.forEach(s=>{this.gsap.killTweensOf(s),this.gsap.set(s,{opacity:1,rotationZ:0,clearProps:"color"})})}}const yi={colorEnd:`var(--fb-highlight-color-end, ${{colorEnd:"#a86088"}.colorEnd})`};class vi{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.originalChars=[],this.duplicateChars=[],this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){if(this.split.chars)for(const t of this.split.chars){const s=document.createElement("div"),i=document.createElement("div");s.innerHTML=t.innerHTML,i.innerHTML=t.innerHTML,t.innerHTML="",s.style.color=this.options.highlightColorEnd||yi.colorEnd,i.style.position="absolute",i.style.inset="0",i.style.pointerEvents="none",i.style.userSelect="none",t.style.position="relative",t.append(s,i),this.originalChars.push(s),this.duplicateChars.push(i)}}play(){if(!this.split.chars)return;const t=Array.from(this.split.chars,()=>this.gsap.utils.random(-45,45)),s=this.gsap.timeline({defaults:{stagger:i=>.06*(i+1)}}).timeScale(this.options.speedFactor);s.fromTo(this.originalChars,{opacity:0,rotation:i=>t[i],yPercent:80},{opacity:1,rotation:0,yPercent:0,duration:.2,ease:"sine"}),s.to(this.duplicateChars,{opacity:0,rotation:i=>-1*t[i],scale:this.gsap.utils.random(1,2),xPercent:this.gsap.utils.random(-15,15),yPercent:this.gsap.utils.random(-130,-50),duration:1,ease:"expo"},0)}reset(){this.gsap.killTweensOf([this.originalChars,this.duplicateChars]),this.gsap.set(this.originalChars,{opacity:0,rotation:0,yPercent:0}),this.gsap.set(this.duplicateChars,{opacity:1,rotation:0,scale:1,xPercent:0,yPercent:0})}}const wi={colors:["#ff0000"]};class $i{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.colors=wi.colors,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.options.highlightColors.length&&(this.colors=this.options.highlightColors)}play(){var s;const t=this.gsap.timeline().timeScale(this.options.speedFactor);(s=this.split.chars)==null||s.forEach(i=>{const r=this.gsap.utils.random(this.colors);t.fromTo(i,{filter:`brightness(100%) drop-shadow(0 0 0 ${r})`,willChange:"filter"},{filter:`brightness(300%) drop-shadow(0 0 50px ${r})`,delay:this.gsap.utils.random(0,1),duration:.2,ease:"power2.in",immediateRender:!1,repeat:1,yoyo:!0,onComplete:()=>{this.gsap.set(i,{clearProps:"filter"})}},0)})}reset(){this.gsap.killTweensOf(this.split.chars),this.gsap.set(this.split.chars,{clearProps:"filter"})}}const Ht={duplicates:8,colorEnd:"#fff"},Ve={colorEnd:`var(--fb-highlight-color-end, ${Ht.colorEnd})`};class Ri{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.split=new B(this.element,{split:"words"}),this.split.words&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){if(this.split.words)for(const t of this.split.words){t.style.position="relative";const s=t.cloneNode(!0);s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.opacity="0",s.style.pointerEvents="none",s.style.userSelect="none",s.style.color=this.options.highlightColorEnd||Ve.colorEnd;for(let i=0;i<(this.options.highlightDuplicates||Ht.duplicates);i++)t.appendChild(s.cloneNode(!0))}}play(){var r;const s={duration:.15*(this.options.highlightDuplicates||Ht.duplicates),ease:"expo"},i=this.gsap.timeline({defaults:s}).timeScale(this.options.speedFactor);(r=this.split.words)==null||r.forEach(o=>{const l=o.querySelectorAll(".fb-word");i.fromTo(l,{opacity:0,yPercent:150},{opacity:1,yPercent:0,stagger:.15},0).to(l,{opacity:0,duration:.01,stagger:.15},s.duration).to(o,{color:this.options.highlightColorEnd||Ve.colorEnd},s.duration-.15)})}reset(){var t;(t=this.split.words)==null||t.forEach(s=>{const i=s.querySelectorAll(".fb-word");this.gsap.killTweensOf([i,s]),this.gsap.set(i,{opacity:"0"}),this.gsap.set(s,{clearProps:"color"})})}}const Mt={bgColor:"#6dd7e6",bgInset:"0 -4px",shadowColor:"#ffdbf5"},st={bgColor:`var(--fb-highlight-bg-color, ${Mt.bgColor})`,bgInset:`var(--fb-highlight-bg-inset, ${Mt.bgInset})`,shadowColor:`var(--fb-highlight-shadow-color, ${Mt.shadowColor})`};class Ii{constructor(t,s,i){this.element=t,this.gsap=s,this.options=i,this.bgEl=null,this.split=new B(this.element,{split:"words,chars"}),this.split.chars&&this.init()}init(){this.setup(),this.gsap.to(this.element,{scrollTrigger:G({trigger:this.element,start:`${this.options.offset}% bottom`},{direction:this.options.direction,once:this.options.once,play:()=>this.play(),reset:()=>this.reset()})})}setup(){this.element.style.position="relative",this.element.style.display="inline-block",this.options.allowMultiLine||(this.element.style.whiteSpace="nowrap"),this.addBgElement()}addBgElement(){this.bgEl=document.createElement("div"),this.options.highlightClass&&this.bgEl.classList.add(this.options.highlightClass),this.element.prepend(this.bgEl),this.bgEl.style.position="absolute",this.bgEl.style.inset=this.options.highlightBgInset||st.bgInset,this.bgEl.style.width="0%",this.bgEl.style.height="auto",this.bgEl.style.mixBlendMode="plus-lighter";let t=this.options.highlightBgColor;t||(this.bgEl.style.backgroundColor=st.bgColor,t=getComputedStyle(this.bgEl).getPropertyValue("background-color")),this.bgEl.style.backgroundColor=N(t).alpha(.14).toRgbString();const s=document.createElement("div");s.style.position="absolute",s.style.display="flex",s.style.flexDirection="column",s.style.alignItems="center";const i=s.cloneNode(!0);s.style.top="-7px",s.style.bottom="0",s.style.left="0",s.style.transform="translateX(-50%)",i.style.top="0",i.style.bottom="-7px",i.style.right="0",i.style.transform="translateX(50%)";const r=document.createElement("div"),o=document.createElement("div");r.style.flexShrink="0",r.style.width="8px",r.style.height="8px",r.style.borderRadius="100%",r.style.backgroundColor=this.options.highlightBgColor||st.bgColor,o.style.width="1px",o.style.height="100%",o.style.backgroundColor=this.options.highlightBgColor||st.bgColor,s.append(r.cloneNode(!0),o.cloneNode(!0)),i.append(o.cloneNode(!0),r.cloneNode(!0)),this.bgEl.append(s,i)}play(){this.gsap.timeline().timeScale(this.options.speedFactor).to(this.split.chars,{startAt:{filter:`drop-shadow(0px 0px 0px ${this.options.highlightShadowColor||st.shadowColor})`},filter:`drop-shadow(0px 0px 20px ${this.options.highlightShadowColor||st.shadowColor})`,duration:.4,ease:"power1.inOut",stagger:.03}).fromTo(this.bgEl,{width:"0%",willChange:"width"},{width:"auto",duration:.8,ease:"expo"},"<")}reset(){this.gsap.killTweensOf([this.split.chars,this.bgEl]),this.gsap.set(this.split.chars,{clearProps:"filter"}),this.gsap.set(this.bgEl,{width:"0%"})}}const Ci=[1,2,3,4,5,6,7,8,9,10,11,12],Ti=["both","forward"];qe([Ye]);let k;const Be=new F.Booster({name:"fb-text-highlight",attributes:{"fb-text-highlight-type":{defaultValue:1,validate:e=>F.validation.isValidType(Number(e),Ci),parse:e=>Number(e)},"fb-text-highlight-direction":{defaultValue:"both",validate:e=>F.validation.isValidType(e,Ti),parse:e=>e},"fb-text-highlight-multi-line":{defaultValue:!1,validate:F.validation.isBoolean,parse:F.parse.stringToBoolean},"fb-text-highlight-offset":{defaultValue:0,validate:F.validation.isNumber,parse:Number},"fb-text-highlight-once":{defaultValue:!1,validate:F.validation.isBoolean,parse:F.parse.stringToBoolean},"fb-text-highlight-speed":{defaultValue:1,validate:e=>{if(!F.validation.isNumber(e))return!1;const t=Number(e);return t>=.5&&t<=2},parse:Number},"fb-text-highlight-class":{defaultValue:void 0,parse:e=>e.toLowerCase().replaceAll(" ","-")},"fb-text-highlight-colors":{defaultValue:[],parse:e=>{var t;return(t=e.match(/([^(,]+(?:\([^)]+\))?|[^,]+)/g))==null?void 0:t.map(s=>s.trim()).filter(s=>N(s).isValid())}},"fb-text-highlight-duplicates":{defaultValue:0,validate:F.validation.isNumber,parse:Number},"fb-text-highlight-bg-color":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()},"fb-text-highlight-bg-inset":{defaultValue:void 0,validate:e=>F.validation.isValidCSSPropertyValue("inset",e)},"fb-text-highlight-bg-radius":{defaultValue:void 0,validate:e=>F.validation.isValidCSSPropertyValue("border-radius",e)},"fb-text-highlight-color-end":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()},"fb-text-highlight-color-end-alt":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()},"fb-text-highlight-shadow-color":{defaultValue:void 0,validate:e=>N(e).isValid(),parse:e=>N(e).toRgbString()}},async apply(e,t){if(!k)return;e.style.fontKerning="none",e.style.textRendering="optimizeSpeed";const s=t.get("fb-text-highlight-type"),i=t.get("fb-text-highlight-direction"),r=t.get("fb-text-highlight-offset"),o=t.get("fb-text-highlight-once"),l=t.get("fb-text-highlight-speed"),f=t.get("fb-text-highlight-multi-line"),n=t.get("fb-text-highlight-class"),a=t.get("fb-text-highlight-bg-color"),p=t.get("fb-text-highlight-bg-inset"),m=t.get("fb-text-highlight-bg-radius"),w=t.get("fb-text-highlight-color-end"),R=t.get("fb-text-highlight-shadow-color"),c={direction:i,offset:r,once:o,speedFactor:l};switch(s){case 1:return new ci(e,k,c);case 2:return new ui(e,k,c);case 3:return new fi(e,k,{...c,highlightColorEnd:w,highlightShadowColor:R});case 4:return new pi(e,k,{...c,highlightColorEnd:w,highlightColorEndAlt:t.get("fb-text-highlight-color-end-alt")});case 5:return new gi(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightBgRadius:m});case 6:return new di(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightBgRadius:m});case 7:return new bi(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightBgRadius:m});case 8:return new mi(e,k,{...c,highlightColorEnd:w});case 9:return new vi(e,k,{...c,highlightColorEnd:w});case 10:return new $i(e,k,{...c,highlightColors:t.get("fb-text-highlight-colors")});case 11:return new Ri(e,k,{...c,highlightDuplicates:t.get("fb-text-highlight-duplicates"),highlightColorEnd:w});case 12:return new Ii(e,k,{...c,allowMultiLine:f,highlightClass:n,highlightBgColor:a,highlightBgInset:p,highlightShadowColor:R})}},title:"GSAP Text Highlight Booster",documentationLink:"https://www.flowbase.co/booster/gsap-text-highlight"}),Ge=async()=>{if(k=await F.Dependencies.init().get("gsap","3.12.x").catch(()=>{}),!k)return Be.log("GSAP isn't initialized");Be.init()};document.readyState==="complete"?Ge():window.addEventListener("load",Ge)})(); |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://www.flowbase.co/", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63083