/*! * SplitText 3.11.2 * https://greensock.com * * @license Copyright 2022, GreenSock. All rights reserved. * This plugin is a membership benefit of Club GreenSock and is only authorized for use in sites/apps/products developed by individuals/companies with an active Club GreenSock membership. See https://greensock.com/club * @author: Jack Doyle, jack@greensock.com */ !function(D,u){"object"==typeof exports&&"undefined"!=typeof module?u(exports):"function"==typeof define&&define.amd?define(["exports"],u):u((D=D||self).window=D.window||{})}(this,function(D){"use strict";var _=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDD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72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;function k(D){return e.getComputedStyle(D)}function n(D,u){var e;return i(D)?D:"string"==(e=typeof D)&&!u&&D?E.call(X.querySelectorAll(D),0):D&&"object"==e&&"length"in D?E.call(D,0):D?[D]:[]}function o(D){return"absolute"===D.position||!0===D.absolute}function p(D,u){for(var e,t=u.length;-1<--t;)if(e=u[t],D.substr(0,e.length)===e)return e.length}function r(D,u){void 0===D&&(D="");var e=~D.indexOf("++"),t=1;return e&&(D=D.split("++").join("")),function(){return"<"+u+" style='position:relative;display:inline-block;'"+(D?" class='"+D+(e?t++:"")+"'>":">")}}function s(D,u,e){var t=D.nodeType;if(1===t||9===t||11===t)for(D=D.firstChild;D;D=D.nextSibling)s(D,u,e);else 3!==t&&4!==t||(D.nodeValue=D.nodeValue.split(u).join(e))}function t(D,u){for(var e=u.length;-1<--e;)D.push(u[e])}function u(D,u,e){for(var t;D&&D!==u;){if(t=D._next||D.nextSibling)return t.textContent.charAt(0)===e;D=D.parentNode||D._parent}}function v(D){var u,e,t=n(D.childNodes),F=t.length;for(u=0;uL&&("BR"!==d.nodeName||0===r)&&(B=[],z.push(B),b=g),G&&(d._x=d.offsetLeft,d._y=g,d._w=d.offsetWidth,d._h=d.offsetHeight),z&&((d._isSplit&&h||!q&&h||P&&h||!P&&d.parentNode.parentNode===D&&!d.parentNode._isSplit)&&(B.push(d),d._x-=_,u(d,D,j)&&(d._wordEnd=!0)),"BR"===d.nodeName&&(d.nextSibling&&"BR"===d.nextSibling.nodeName||0===r)&&z.push([])));for(r=0;rD.clientHeight&&(D.style.height=E-m+"px",D.clientHeightD.clientWidth&&(D.style.width=n-N+"px",D.clientWidth",x=1,g=u.specialChars?"function"==typeof u.specialChars?u.specialChars:p:null,y=X.createElement("div"),v=D.parentNode;for(v.insertBefore(y,D),y.textContent=D.nodeValue,v.removeChild(D),l=-1!==(F=function getText(D){var u=D.nodeType,e="";if(1===u||9===u||11===u){if("string"==typeof D.textContent)return D.textContent;for(D=D.firstChild;D;D=D.nextSibling)e+=getText(D)}else if(3===u||4===u)return D.nodeValue;return e}(D=y)).indexOf("<"),!1!==u.reduceWhiteSpace&&(F=F.replace(S," ").replace(b,"")),l&&(F=F.split("<").join("{{LT}}")),E=F.length,C=(" "===F.charAt(0)?A:"")+e(),i=0;i":r,i+=d-1;else if(r===f&&F.charAt(i-1)!==f&&i){for(C+=x?c:"",x=0;F.charAt(i+1)===f;)C+=A,i++;i===E-1?C+=A:")"!==F.charAt(i+1)&&(C+=A+e(),x=1)}else"{"===r&&"{{LT}}"===F.substr(i,6)?(C+=h?t()+"{{LT}}":"{{LT}}",i+=5):55296<=r.charCodeAt(0)&&r.charCodeAt(0)<=56319||65024<=F.charCodeAt(i+1)&&F.charCodeAt(i+1)<=65039?(n=((F.substr(i,12).split(_)||[])[1]||"").length||2,C+=h&&" "!==r?t()+F.substr(i,n)+"":F.substr(i,n),i+=n-1):C+=h&&" "!==r?t()+r+"":r;D.outerHTML=C+(x?c:""),l&&s(v,"{{LT}}","<")}function z(D,u,e,t){var F,C,i=n(D.childNodes),E=i.length,s=o(u);if(3!==D.nodeType||1 */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SplitType=e()}(this,(function(){"use strict";function t(t,e){return Object.getOwnPropertyNames(Object(t)).reduce(((n,s)=>{const i=Object.getOwnPropertyDescriptor(Object(t),s),o=Object.getOwnPropertyDescriptor(Object(e),s);return Object.defineProperty(n,s,o||i)}),{})}function e(t){return"string"==typeof t}function n(t){return Array.isArray(t)}function s(s={}){const i=t(s);let o;return void 0!==i.types?o=i.types:void 0!==i.split&&(o=i.split),void 0!==o&&(i.types=(e(o)||n(o)?String(o):"").split(",").map((t=>String(t).trim())).filter((t=>/((line)|(word)|(char))/i.test(t)))),(i.absolute||i.position)&&(i.absolute=i.absolute||/absolute/.test(s.position)),i}function i(t){const s=e(t)||n(t)?String(t):"";return{none:!s,lines:/line/i.test(s),words:/word/i.test(s),chars:/char/i.test(s)}}function o(t){return null!==t&&"object"==typeof t}function r(t){return o(t)&&/^(1|3|11)$/.test(t.nodeType)}function l(t){return n(t)?t:null==t?[]:function(t){return o(t)&&function(t){return"number"==typeof t&&t>-1&&t%1==0}(t.length)}(t)?Array.prototype.slice.call(t):[t]}function c(t){let n=t;return e(t)&&(n=/^(#[a-z]\w+)$/.test(t.trim())?document.getElementById(t.trim().slice(1)):document.querySelectorAll(t)),l(n).reduce(((t,e)=>[...t,...l(e).filter(r)]),[])}(()=>{function t(...t){const e=t.length;for(let n=0;n{const i=n[t],o=e(i)?i.trim():i;null!==o&&""!==o&&("children"===t?s.append(...l(o)):s.setAttribute(t,o))})),s):s}var H={splitClass:"",lineClass:"line",wordClass:"word",charClass:"char",types:["lines","words","chars"],absolute:!1,tagName:"div"};function M(e,n){const s=i((n=t(H,n)).types),o=n.tagName,r=e.nodeValue,l=document.createDocumentFragment();let c=[],d=[];return/^\s/.test(r)&&l.append(" "),c=function(t,e=" "){return(t?String(t):"").trim().replace(/\s+/g," ").split(e)}(r).reduce(((t,e,i,r)=>{let c,p;return s.chars&&(p=L(e).map((t=>{const e=P(o,{class:`${n.splitClass} ${n.charClass}`,style:"display: inline-block;",children:t});return g(e,"isChar",!0),d=[...d,e],e}))),s.words||s.lines?(c=P(o,{class:`${n.wordClass} ${n.splitClass}`,style:"display: inline-block; "+(s.words&&n.absolute?"position: relative;":""),children:s.chars?p:e}),g(c,{isWord:!0,isWordStart:!0,isWordEnd:!0}),l.appendChild(c)):p.forEach((t=>{l.appendChild(t)})),i{const{words:s,chars:i}=z(n,e);return{words:[...t.words,...s],chars:[...t.chars,...i]}}),s)}function V(t){y(t).isWord?(m(t),t.replaceWith(...t.childNodes)):l(t.children).forEach((t=>V(t)))}function q(t,e,n){const s=i(e.types),o=e.tagName,r=t.getElementsByTagName("*"),c=[];let d,p,h,u=[],a=null,f=[];const m=t.parentElement,w=t.nextElementSibling,b=document.createDocumentFragment(),C=window.getComputedStyle(t),E=C.textAlign,S=.2*parseFloat(C.fontSize);return e.absolute&&(h={left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth},p=t.offsetWidth,d=t.offsetHeight,g(t,{cssWidth:t.style.width,cssHeight:t.style.height})),l(r).forEach((i=>{const o=i.parentElement===t,{width:r,height:l,top:d,left:p}=function(t,e,n,s){if(!n.absolute)return{top:e?t.offsetTop:null};const i=t.offsetParent,[o,r]=s;let l=0,c=0;if(i&&i!==document.body){const t=i.getBoundingClientRect();l=t.x+o,c=t.y+r}const{width:d,height:p,x:h,y:u}=t.getBoundingClientRect();return{width:d,height:p,top:u+r-c,left:h+o-l}}(i,o,e,n);/^br$/i.test(i.nodeName)||(s.lines&&o&&((null===a||d-a>=S)&&(a=d,c.push(u=[])),u.push(i)),e.absolute&&g(i,{top:d,left:p,width:r,height:l}))})),m&&m.removeChild(t),s.lines&&(f=c.map((t=>{const n=P(o,{class:`${e.splitClass} ${e.lineClass}`,style:`display: block; text-align: ${E}; width: 100%;`});g(n,"isLine",!0);const s={height:0,top:1e4};return b.appendChild(n),t.forEach(((t,e,i)=>{const{isWordEnd:o,top:r,height:l}=y(t),c=i[e+1];s.height=Math.max(s.height,l),s.top=Math.min(s.top,r),n.appendChild(t),o&&y(c).isWordStart&&n.append(" ")})),e.absolute&&g(n,{height:s.height,top:s.top}),n})),s.words||V(b),t.replaceChildren(b)),e.absolute&&(t.style.width=(t.style.width||p)+"px",t.style.height=d+"px",l(r).forEach((t=>{const{isLine:e,top:n,left:s,width:i,height:o}=y(t),r=y(t.parentElement),l=!e&&r.isLine;t.style.top=(l?n-r.top:n)+"px",t.style.left=e?h.left+"px":s-(l?h.left:0)+"px",t.style.height=o+"px",t.style.width=e?h.width+"px":i+"px",t.style.position="absolute"}))),m&&(w?m.insertBefore(t,w):m.appendChild(t)),f}let I=t(H,{});class X{static get data(){return a}static get defaults(){return I}static set defaults(e){I=t(I,s(e))}static setDefaults(e){return I=t(I,s(e)),H}static revert(t){c(t).forEach((t=>{const{isSplit:e,html:n,cssWidth:s,cssHeight:i}=y(t);e&&(t.innerHTML=n,t.style.width=s||"",t.style.height=i||"",m(t))}))}static create(t,e){return new X(t,e)}constructor(e,n){this.isSplit=!1,this.settings=t(I,s(n)),this.elements=c(e),this.split()}split(e){this.revert(),this.elements.forEach((t=>{g(t,"html",t.innerHTML)})),this.lines=[],this.words=[],this.chars=[];const n=[window.pageXOffset,window.pageYOffset];void 0!==e&&(this.settings=t(this.settings,s(e)));const o=i(this.settings.types);o.none||(this.elements.forEach((t=>{g(t,"isRoot",!0);const{words:e,chars:n}=z(t,this.settings);this.words=[...this.words,...e],this.chars=[...this.chars,...n]})),this.elements.forEach((t=>{if(o.lines||this.settings.absolute){const e=q(t,this.settings,n);this.lines=[...this.lines,...e]}})),this.isSplit=!0,window.scrollTo(n[0],n[1]),d(a).forEach((([t,{isRoot:e,isSplit:n}])=>{e&&n||(a[t]=null,delete a[t])})))}revert(){this.isSplit&&(this.lines=null,this.words=null,this.chars=null,this.isSplit=!1),X.revert(this.elements)}}return X}));